From ec1bace2a2e02e462568aa926e65cd64b24175be Mon Sep 17 00:00:00 2001 From: "Jacob S." Date: Thu, 16 Nov 2023 19:46:20 -0600 Subject: [PATCH] feat(components): add material style Starting with the Switch component, this adds a style to match Material UI. --- apps/www/__registry__/index.tsx | 1079 +++++++++++++++++ apps/www/package.json | 2 +- .../registry/styles/default/accordion.json | 2 +- .../registry/styles/default/alert-dialog.json | 2 +- .../public/registry/styles/default/alert.json | 2 +- .../registry/styles/default/aspect-ratio.json | 2 +- .../registry/styles/default/avatar.json | 2 +- .../public/registry/styles/default/badge.json | 2 +- .../registry/styles/default/button.json | 2 +- .../registry/styles/default/calendar.json | 2 +- .../public/registry/styles/default/card.json | 2 +- .../registry/styles/default/checkbox.json | 2 +- .../registry/styles/default/collapsible.json | 2 +- .../registry/styles/default/command.json | 2 +- .../registry/styles/default/context-menu.json | 2 +- .../registry/styles/default/dialog.json | 2 +- .../styles/default/dropdown-menu.json | 2 +- .../public/registry/styles/default/form.json | 2 +- .../registry/styles/default/hover-card.json | 2 +- .../public/registry/styles/default/input.json | 2 +- .../public/registry/styles/default/label.json | 2 +- .../registry/styles/default/menubar.json | 2 +- .../styles/default/navigation-menu.json | 2 +- .../registry/styles/default/popover.json | 2 +- .../registry/styles/default/progress.json | 2 +- .../registry/styles/default/radio-group.json | 2 +- .../registry/styles/default/scroll-area.json | 2 +- .../registry/styles/default/select.json | 2 +- .../registry/styles/default/separator.json | 2 +- .../public/registry/styles/default/sheet.json | 2 +- .../registry/styles/default/skeleton.json | 2 +- .../registry/styles/default/slider.json | 2 +- .../registry/styles/default/switch.json | 2 +- .../public/registry/styles/default/table.json | 2 +- .../public/registry/styles/default/tabs.json | 2 +- .../registry/styles/default/textarea.json | 2 +- .../public/registry/styles/default/toast.json | 6 +- .../registry/styles/default/toggle-group.json | 2 +- .../registry/styles/default/toggle.json | 2 +- .../registry/styles/default/tooltip.json | 2 +- apps/www/public/registry/styles/index.json | 4 + .../registry/styles/material/accordion.json | 13 + .../styles/material/alert-dialog.json | 16 + .../registry/styles/material/alert.json | 10 + .../styles/material/aspect-ratio.json | 13 + .../registry/styles/material/avatar.json | 13 + .../registry/styles/material/badge.json | 10 + .../registry/styles/material/button.json | 13 + .../registry/styles/material/calendar.json | 17 + .../public/registry/styles/material/card.json | 10 + .../registry/styles/material/checkbox.json | 13 + .../registry/styles/material/collapsible.json | 13 + .../registry/styles/material/command.json | 16 + .../styles/material/context-menu.json | 13 + .../registry/styles/material/dialog.json | 13 + .../styles/material/dropdown-menu.json | 13 + .../public/registry/styles/material/form.json | 21 + .../registry/styles/material/hover-card.json | 13 + .../registry/styles/material/input.json | 10 + .../registry/styles/material/label.json | 13 + .../registry/styles/material/menubar.json | 13 + .../styles/material/navigation-menu.json | 13 + .../registry/styles/material/popover.json | 13 + .../registry/styles/material/progress.json | 13 + .../registry/styles/material/radio-group.json | 13 + .../registry/styles/material/scroll-area.json | 13 + .../registry/styles/material/select.json | 13 + .../registry/styles/material/separator.json | 13 + .../registry/styles/material/sheet.json | 13 + .../registry/styles/material/skeleton.json | 10 + .../registry/styles/material/slider.json | 13 + .../registry/styles/material/switch.json | 13 + .../registry/styles/material/table.json | 10 + .../public/registry/styles/material/tabs.json | 13 + .../registry/styles/material/textarea.json | 10 + .../registry/styles/material/toast.json | 21 + .../styles/material/toggle-group.json | 16 + .../registry/styles/material/toggle.json | 13 + .../registry/styles/material/tooltip.json | 13 + .../registry/styles/new-york/accordion.json | 2 +- .../styles/new-york/alert-dialog.json | 2 +- .../registry/styles/new-york/alert.json | 2 +- .../styles/new-york/aspect-ratio.json | 2 +- .../registry/styles/new-york/avatar.json | 2 +- .../registry/styles/new-york/badge.json | 2 +- .../registry/styles/new-york/button.json | 2 +- .../registry/styles/new-york/calendar.json | 2 +- .../public/registry/styles/new-york/card.json | 2 +- .../registry/styles/new-york/checkbox.json | 2 +- .../registry/styles/new-york/collapsible.json | 2 +- .../registry/styles/new-york/command.json | 2 +- .../styles/new-york/context-menu.json | 2 +- .../registry/styles/new-york/dialog.json | 2 +- .../styles/new-york/dropdown-menu.json | 2 +- .../public/registry/styles/new-york/form.json | 2 +- .../registry/styles/new-york/hover-card.json | 2 +- .../registry/styles/new-york/input.json | 2 +- .../registry/styles/new-york/label.json | 2 +- .../registry/styles/new-york/menubar.json | 2 +- .../styles/new-york/navigation-menu.json | 2 +- .../registry/styles/new-york/popover.json | 2 +- .../registry/styles/new-york/progress.json | 2 +- .../registry/styles/new-york/radio-group.json | 2 +- .../registry/styles/new-york/scroll-area.json | 2 +- .../registry/styles/new-york/select.json | 2 +- .../registry/styles/new-york/separator.json | 2 +- .../registry/styles/new-york/sheet.json | 2 +- .../registry/styles/new-york/skeleton.json | 2 +- .../registry/styles/new-york/slider.json | 2 +- .../registry/styles/new-york/switch.json | 2 +- .../registry/styles/new-york/table.json | 2 +- .../public/registry/styles/new-york/tabs.json | 2 +- .../registry/styles/new-york/textarea.json | 2 +- .../registry/styles/new-york/toast.json | 6 +- .../styles/new-york/toggle-group.json | 2 +- .../registry/styles/new-york/toggle.json | 2 +- .../registry/styles/new-york/tooltip.json | 2 +- .../material/example/accordion-demo.tsx | 32 + .../registry/material/example/alert-demo.tsx | 19 + .../material/example/alert-destructive.tsx | 19 + .../material/example/alert-dialog-demo.tsx | 35 + .../material/example/aspect-ratio-demo.tsx | 16 + .../registry/material/example/avatar-demo.tsx | 14 + .../registry/material/example/badge-demo.tsx | 5 + .../material/example/badge-destructive.tsx | 5 + .../material/example/badge-outline.tsx | 5 + .../material/example/badge-secondary.tsx | 5 + .../material/example/button-as-child.tsx | 11 + .../registry/material/example/button-demo.tsx | 5 + .../material/example/button-destructive.tsx | 5 + .../material/example/button-ghost.tsx | 5 + .../registry/material/example/button-icon.tsx | 11 + .../registry/material/example/button-link.tsx | 5 + .../material/example/button-loading.tsx | 12 + .../material/example/button-outline.tsx | 5 + .../material/example/button-secondary.tsx | 5 + .../material/example/button-with-icon.tsx | 11 + .../material/example/calendar-demo.tsx | 18 + .../material/example/calendar-form.tsx | 101 ++ .../registry/material/example/card-demo.tsx | 78 ++ .../material/example/card-with-form.tsx | 59 + .../material/example/cards/activity-goal.tsx | 132 ++ .../material/example/cards/calendar.tsx | 26 + .../registry/material/example/cards/chat.tsx | 260 ++++ .../example/cards/cookie-settings.tsx | 60 + .../material/example/cards/create-account.tsx | 60 + .../material/example/cards/data-table.tsx | 332 +++++ .../registry/material/example/cards/index.tsx | 63 + .../material/example/cards/metric.tsx | 142 +++ .../material/example/cards/payment-method.tsx | 154 +++ .../material/example/cards/report-issue.tsx | 90 ++ .../registry/material/example/cards/share.tsx | 126 ++ .../registry/material/example/cards/stats.tsx | 131 ++ .../material/example/cards/team-members.tsx | 209 ++++ .../material/example/checkbox-demo.tsx | 17 + .../material/example/checkbox-disabled.tsx | 15 + .../example/checkbox-form-multiple.tsx | 127 ++ .../material/example/checkbox-form-single.tsx | 73 ++ .../material/example/checkbox-with-text.tsx | 22 + .../material/example/collapsible-demo.tsx | 46 + .../material/example/combobox-demo.tsx | 91 ++ .../example/combobox-dropdown-menu.tsx | 102 ++ .../material/example/combobox-form.tsx | 138 +++ .../material/example/combobox-popover.tsx | 91 ++ .../material/example/command-demo.tsx | 62 + .../material/example/command-dialog.tsx | 87 ++ .../material/example/context-menu-demo.tsx | 67 + .../material/example/data-table-demo.tsx | 313 +++++ .../material/example/date-picker-demo.tsx | 43 + .../material/example/date-picker-form.tsx | 101 ++ .../example/date-picker-with-presets.tsx | 65 + .../example/date-picker-with-range.tsx | 65 + .../material/example/dialog-close-button.tsx | 56 + .../registry/material/example/dialog-demo.tsx | 47 + .../example/dropdown-menu-checkboxes.tsx | 53 + .../material/example/dropdown-menu-demo.tsx | 75 ++ .../example/dropdown-menu-radio-group.tsx | 35 + .../material/example/hover-card-demo.tsx | 43 + .../registry/material/example/input-demo.tsx | 5 + .../material/example/input-disabled.tsx | 5 + .../registry/material/example/input-file.tsx | 11 + .../registry/material/example/input-form.tsx | 68 ++ .../material/example/input-with-button.tsx | 11 + .../material/example/input-with-label.tsx | 11 + .../material/example/input-with-text.tsx | 12 + .../registry/material/example/label-demo.tsx | 13 + .../material/example/menubar-demo.tsx | 107 ++ .../registry/material/example/mode-toggle.tsx | 40 + .../material/example/navigation-menu-demo.tsx | 145 +++ .../material/example/popover-demo.tsx | 62 + .../material/example/progress-demo.tsx | 16 + .../material/example/radio-group-demo.tsx | 21 + .../material/example/radio-group-form.tsx | 88 ++ .../material/example/scroll-area-demo.tsx | 26 + .../example/scroll-area-horizontal-demo.tsx | 53 + .../registry/material/example/select-demo.tsx | 31 + .../registry/material/example/select-form.tsx | 84 ++ .../material/example/select-scrollable.tsx | 75 ++ .../material/example/separator-demo.tsx | 22 + .../registry/material/example/sheet-demo.tsx | 50 + .../registry/material/example/sheet-side.tsx | 60 + .../material/example/skeleton-demo.tsx | 13 + .../registry/material/example/slider-demo.tsx | 16 + .../registry/material/example/switch-demo.tsx | 11 + .../registry/material/example/switch-form.tsx | 97 ++ .../registry/material/example/table-demo.tsx | 87 ++ .../registry/material/example/tabs-demo.tsx | 74 ++ .../material/example/textarea-demo.tsx | 5 + .../material/example/textarea-disabled.tsx | 5 + .../material/example/textarea-form.tsx | 74 ++ .../material/example/textarea-with-button.tsx | 11 + .../material/example/textarea-with-label.tsx | 11 + .../material/example/textarea-with-text.tsx | 14 + .../registry/material/example/toast-demo.tsx | 26 + .../material/example/toast-destructive.tsx | 25 + .../material/example/toast-simple.tsx | 21 + .../material/example/toast-with-action.tsx | 24 + .../material/example/toast-with-title.tsx | 22 + .../registry/material/example/toggle-demo.tsx | 11 + .../material/example/toggle-disabled.tsx | 11 + .../material/example/toggle-group-demo.tsx | 26 + .../example/toggle-group-disabled.tsx | 26 + .../material/example/toggle-group-lg.tsx | 26 + .../material/example/toggle-group-outline.tsx | 26 + .../material/example/toggle-group-single.tsx | 26 + .../material/example/toggle-group-sm.tsx | 26 + .../registry/material/example/toggle-lg.tsx | 11 + .../material/example/toggle-outline.tsx | 11 + .../registry/material/example/toggle-sm.tsx | 11 + .../material/example/toggle-with-text.tsx | 12 + .../material/example/tooltip-demo.tsx | 22 + .../example/typography-blockquote.tsx | 8 + .../material/example/typography-demo.tsx | 119 ++ .../material/example/typography-h1.tsx | 7 + .../material/example/typography-h2.tsx | 7 + .../material/example/typography-h3.tsx | 7 + .../material/example/typography-h4.tsx | 7 + .../example/typography-inline-code.tsx | 7 + .../material/example/typography-large.tsx | 5 + .../material/example/typography-lead.tsx | 8 + .../material/example/typography-list.tsx | 9 + .../material/example/typography-muted.tsx | 5 + .../material/example/typography-p.tsx | 8 + .../material/example/typography-small.tsx | 5 + .../material/example/typography-table.tsx | 44 + apps/www/registry/material/ui/accordion.tsx | 57 + .../www/registry/material/ui/alert-dialog.tsx | 141 +++ apps/www/registry/material/ui/alert.tsx | 59 + .../www/registry/material/ui/aspect-ratio.tsx | 7 + apps/www/registry/material/ui/avatar.tsx | 50 + apps/www/registry/material/ui/badge.tsx | 36 + apps/www/registry/material/ui/button.tsx | 57 + apps/www/registry/material/ui/calendar.tsx | 72 ++ apps/www/registry/material/ui/card.tsx | 76 ++ apps/www/registry/material/ui/checkbox.tsx | 30 + apps/www/registry/material/ui/collapsible.tsx | 11 + apps/www/registry/material/ui/command.tsx | 155 +++ .../www/registry/material/ui/context-menu.tsx | 204 ++++ apps/www/registry/material/ui/dialog.tsx | 122 ++ .../registry/material/ui/dropdown-menu.tsx | 205 ++++ apps/www/registry/material/ui/form.tsx | 176 +++ apps/www/registry/material/ui/hover-card.tsx | 29 + apps/www/registry/material/ui/input.tsx | 25 + apps/www/registry/material/ui/label.tsx | 26 + apps/www/registry/material/ui/menubar.tsx | 240 ++++ .../registry/material/ui/navigation-menu.tsx | 128 ++ apps/www/registry/material/ui/popover.tsx | 31 + apps/www/registry/material/ui/progress.tsx | 28 + apps/www/registry/material/ui/radio-group.tsx | 44 + apps/www/registry/material/ui/scroll-area.tsx | 48 + apps/www/registry/material/ui/select.tsx | 164 +++ apps/www/registry/material/ui/separator.tsx | 31 + apps/www/registry/material/ui/sheet.tsx | 140 +++ apps/www/registry/material/ui/skeleton.tsx | 15 + apps/www/registry/material/ui/slider.tsx | 28 + apps/www/registry/material/ui/switch.tsx | 29 + apps/www/registry/material/ui/table.tsx | 120 ++ apps/www/registry/material/ui/tabs.tsx | 55 + apps/www/registry/material/ui/textarea.tsx | 24 + apps/www/registry/material/ui/toast.tsx | 127 ++ apps/www/registry/material/ui/toaster.tsx | 35 + .../www/registry/material/ui/toggle-group.tsx | 61 + apps/www/registry/material/ui/toggle.tsx | 45 + apps/www/registry/material/ui/tooltip.tsx | 30 + apps/www/registry/material/ui/use-toast.ts | 192 +++ apps/www/registry/styles.ts | 4 + 286 files changed, 10971 insertions(+), 81 deletions(-) create mode 100644 apps/www/public/registry/styles/material/accordion.json create mode 100644 apps/www/public/registry/styles/material/alert-dialog.json create mode 100644 apps/www/public/registry/styles/material/alert.json create mode 100644 apps/www/public/registry/styles/material/aspect-ratio.json create mode 100644 apps/www/public/registry/styles/material/avatar.json create mode 100644 apps/www/public/registry/styles/material/badge.json create mode 100644 apps/www/public/registry/styles/material/button.json create mode 100644 apps/www/public/registry/styles/material/calendar.json create mode 100644 apps/www/public/registry/styles/material/card.json create mode 100644 apps/www/public/registry/styles/material/checkbox.json create mode 100644 apps/www/public/registry/styles/material/collapsible.json create mode 100644 apps/www/public/registry/styles/material/command.json create mode 100644 apps/www/public/registry/styles/material/context-menu.json create mode 100644 apps/www/public/registry/styles/material/dialog.json create mode 100644 apps/www/public/registry/styles/material/dropdown-menu.json create mode 100644 apps/www/public/registry/styles/material/form.json create mode 100644 apps/www/public/registry/styles/material/hover-card.json create mode 100644 apps/www/public/registry/styles/material/input.json create mode 100644 apps/www/public/registry/styles/material/label.json create mode 100644 apps/www/public/registry/styles/material/menubar.json create mode 100644 apps/www/public/registry/styles/material/navigation-menu.json create mode 100644 apps/www/public/registry/styles/material/popover.json create mode 100644 apps/www/public/registry/styles/material/progress.json create mode 100644 apps/www/public/registry/styles/material/radio-group.json create mode 100644 apps/www/public/registry/styles/material/scroll-area.json create mode 100644 apps/www/public/registry/styles/material/select.json create mode 100644 apps/www/public/registry/styles/material/separator.json create mode 100644 apps/www/public/registry/styles/material/sheet.json create mode 100644 apps/www/public/registry/styles/material/skeleton.json create mode 100644 apps/www/public/registry/styles/material/slider.json create mode 100644 apps/www/public/registry/styles/material/switch.json create mode 100644 apps/www/public/registry/styles/material/table.json create mode 100644 apps/www/public/registry/styles/material/tabs.json create mode 100644 apps/www/public/registry/styles/material/textarea.json create mode 100644 apps/www/public/registry/styles/material/toast.json create mode 100644 apps/www/public/registry/styles/material/toggle-group.json create mode 100644 apps/www/public/registry/styles/material/toggle.json create mode 100644 apps/www/public/registry/styles/material/tooltip.json create mode 100644 apps/www/registry/material/example/accordion-demo.tsx create mode 100644 apps/www/registry/material/example/alert-demo.tsx create mode 100644 apps/www/registry/material/example/alert-destructive.tsx create mode 100644 apps/www/registry/material/example/alert-dialog-demo.tsx create mode 100644 apps/www/registry/material/example/aspect-ratio-demo.tsx create mode 100644 apps/www/registry/material/example/avatar-demo.tsx create mode 100644 apps/www/registry/material/example/badge-demo.tsx create mode 100644 apps/www/registry/material/example/badge-destructive.tsx create mode 100644 apps/www/registry/material/example/badge-outline.tsx create mode 100644 apps/www/registry/material/example/badge-secondary.tsx create mode 100644 apps/www/registry/material/example/button-as-child.tsx create mode 100644 apps/www/registry/material/example/button-demo.tsx create mode 100644 apps/www/registry/material/example/button-destructive.tsx create mode 100644 apps/www/registry/material/example/button-ghost.tsx create mode 100644 apps/www/registry/material/example/button-icon.tsx create mode 100644 apps/www/registry/material/example/button-link.tsx create mode 100644 apps/www/registry/material/example/button-loading.tsx create mode 100644 apps/www/registry/material/example/button-outline.tsx create mode 100644 apps/www/registry/material/example/button-secondary.tsx create mode 100644 apps/www/registry/material/example/button-with-icon.tsx create mode 100644 apps/www/registry/material/example/calendar-demo.tsx create mode 100644 apps/www/registry/material/example/calendar-form.tsx create mode 100644 apps/www/registry/material/example/card-demo.tsx create mode 100644 apps/www/registry/material/example/card-with-form.tsx create mode 100644 apps/www/registry/material/example/cards/activity-goal.tsx create mode 100644 apps/www/registry/material/example/cards/calendar.tsx create mode 100644 apps/www/registry/material/example/cards/chat.tsx create mode 100644 apps/www/registry/material/example/cards/cookie-settings.tsx create mode 100644 apps/www/registry/material/example/cards/create-account.tsx create mode 100644 apps/www/registry/material/example/cards/data-table.tsx create mode 100644 apps/www/registry/material/example/cards/index.tsx create mode 100644 apps/www/registry/material/example/cards/metric.tsx create mode 100644 apps/www/registry/material/example/cards/payment-method.tsx create mode 100644 apps/www/registry/material/example/cards/report-issue.tsx create mode 100644 apps/www/registry/material/example/cards/share.tsx create mode 100644 apps/www/registry/material/example/cards/stats.tsx create mode 100644 apps/www/registry/material/example/cards/team-members.tsx create mode 100644 apps/www/registry/material/example/checkbox-demo.tsx create mode 100644 apps/www/registry/material/example/checkbox-disabled.tsx create mode 100644 apps/www/registry/material/example/checkbox-form-multiple.tsx create mode 100644 apps/www/registry/material/example/checkbox-form-single.tsx create mode 100644 apps/www/registry/material/example/checkbox-with-text.tsx create mode 100644 apps/www/registry/material/example/collapsible-demo.tsx create mode 100644 apps/www/registry/material/example/combobox-demo.tsx create mode 100644 apps/www/registry/material/example/combobox-dropdown-menu.tsx create mode 100644 apps/www/registry/material/example/combobox-form.tsx create mode 100644 apps/www/registry/material/example/combobox-popover.tsx create mode 100644 apps/www/registry/material/example/command-demo.tsx create mode 100644 apps/www/registry/material/example/command-dialog.tsx create mode 100644 apps/www/registry/material/example/context-menu-demo.tsx create mode 100644 apps/www/registry/material/example/data-table-demo.tsx create mode 100644 apps/www/registry/material/example/date-picker-demo.tsx create mode 100644 apps/www/registry/material/example/date-picker-form.tsx create mode 100644 apps/www/registry/material/example/date-picker-with-presets.tsx create mode 100644 apps/www/registry/material/example/date-picker-with-range.tsx create mode 100644 apps/www/registry/material/example/dialog-close-button.tsx create mode 100644 apps/www/registry/material/example/dialog-demo.tsx create mode 100644 apps/www/registry/material/example/dropdown-menu-checkboxes.tsx create mode 100644 apps/www/registry/material/example/dropdown-menu-demo.tsx create mode 100644 apps/www/registry/material/example/dropdown-menu-radio-group.tsx create mode 100644 apps/www/registry/material/example/hover-card-demo.tsx create mode 100644 apps/www/registry/material/example/input-demo.tsx create mode 100644 apps/www/registry/material/example/input-disabled.tsx create mode 100644 apps/www/registry/material/example/input-file.tsx create mode 100644 apps/www/registry/material/example/input-form.tsx create mode 100644 apps/www/registry/material/example/input-with-button.tsx create mode 100644 apps/www/registry/material/example/input-with-label.tsx create mode 100644 apps/www/registry/material/example/input-with-text.tsx create mode 100644 apps/www/registry/material/example/label-demo.tsx create mode 100644 apps/www/registry/material/example/menubar-demo.tsx create mode 100644 apps/www/registry/material/example/mode-toggle.tsx create mode 100644 apps/www/registry/material/example/navigation-menu-demo.tsx create mode 100644 apps/www/registry/material/example/popover-demo.tsx create mode 100644 apps/www/registry/material/example/progress-demo.tsx create mode 100644 apps/www/registry/material/example/radio-group-demo.tsx create mode 100644 apps/www/registry/material/example/radio-group-form.tsx create mode 100644 apps/www/registry/material/example/scroll-area-demo.tsx create mode 100644 apps/www/registry/material/example/scroll-area-horizontal-demo.tsx create mode 100644 apps/www/registry/material/example/select-demo.tsx create mode 100644 apps/www/registry/material/example/select-form.tsx create mode 100644 apps/www/registry/material/example/select-scrollable.tsx create mode 100644 apps/www/registry/material/example/separator-demo.tsx create mode 100644 apps/www/registry/material/example/sheet-demo.tsx create mode 100644 apps/www/registry/material/example/sheet-side.tsx create mode 100644 apps/www/registry/material/example/skeleton-demo.tsx create mode 100644 apps/www/registry/material/example/slider-demo.tsx create mode 100644 apps/www/registry/material/example/switch-demo.tsx create mode 100644 apps/www/registry/material/example/switch-form.tsx create mode 100644 apps/www/registry/material/example/table-demo.tsx create mode 100644 apps/www/registry/material/example/tabs-demo.tsx create mode 100644 apps/www/registry/material/example/textarea-demo.tsx create mode 100644 apps/www/registry/material/example/textarea-disabled.tsx create mode 100644 apps/www/registry/material/example/textarea-form.tsx create mode 100644 apps/www/registry/material/example/textarea-with-button.tsx create mode 100644 apps/www/registry/material/example/textarea-with-label.tsx create mode 100644 apps/www/registry/material/example/textarea-with-text.tsx create mode 100644 apps/www/registry/material/example/toast-demo.tsx create mode 100644 apps/www/registry/material/example/toast-destructive.tsx create mode 100644 apps/www/registry/material/example/toast-simple.tsx create mode 100644 apps/www/registry/material/example/toast-with-action.tsx create mode 100644 apps/www/registry/material/example/toast-with-title.tsx create mode 100644 apps/www/registry/material/example/toggle-demo.tsx create mode 100644 apps/www/registry/material/example/toggle-disabled.tsx create mode 100644 apps/www/registry/material/example/toggle-group-demo.tsx create mode 100644 apps/www/registry/material/example/toggle-group-disabled.tsx create mode 100644 apps/www/registry/material/example/toggle-group-lg.tsx create mode 100644 apps/www/registry/material/example/toggle-group-outline.tsx create mode 100644 apps/www/registry/material/example/toggle-group-single.tsx create mode 100644 apps/www/registry/material/example/toggle-group-sm.tsx create mode 100644 apps/www/registry/material/example/toggle-lg.tsx create mode 100644 apps/www/registry/material/example/toggle-outline.tsx create mode 100644 apps/www/registry/material/example/toggle-sm.tsx create mode 100644 apps/www/registry/material/example/toggle-with-text.tsx create mode 100644 apps/www/registry/material/example/tooltip-demo.tsx create mode 100644 apps/www/registry/material/example/typography-blockquote.tsx create mode 100644 apps/www/registry/material/example/typography-demo.tsx create mode 100644 apps/www/registry/material/example/typography-h1.tsx create mode 100644 apps/www/registry/material/example/typography-h2.tsx create mode 100644 apps/www/registry/material/example/typography-h3.tsx create mode 100644 apps/www/registry/material/example/typography-h4.tsx create mode 100644 apps/www/registry/material/example/typography-inline-code.tsx create mode 100644 apps/www/registry/material/example/typography-large.tsx create mode 100644 apps/www/registry/material/example/typography-lead.tsx create mode 100644 apps/www/registry/material/example/typography-list.tsx create mode 100644 apps/www/registry/material/example/typography-muted.tsx create mode 100644 apps/www/registry/material/example/typography-p.tsx create mode 100644 apps/www/registry/material/example/typography-small.tsx create mode 100644 apps/www/registry/material/example/typography-table.tsx create mode 100644 apps/www/registry/material/ui/accordion.tsx create mode 100644 apps/www/registry/material/ui/alert-dialog.tsx create mode 100644 apps/www/registry/material/ui/alert.tsx create mode 100644 apps/www/registry/material/ui/aspect-ratio.tsx create mode 100644 apps/www/registry/material/ui/avatar.tsx create mode 100644 apps/www/registry/material/ui/badge.tsx create mode 100644 apps/www/registry/material/ui/button.tsx create mode 100644 apps/www/registry/material/ui/calendar.tsx create mode 100644 apps/www/registry/material/ui/card.tsx create mode 100644 apps/www/registry/material/ui/checkbox.tsx create mode 100644 apps/www/registry/material/ui/collapsible.tsx create mode 100644 apps/www/registry/material/ui/command.tsx create mode 100644 apps/www/registry/material/ui/context-menu.tsx create mode 100644 apps/www/registry/material/ui/dialog.tsx create mode 100644 apps/www/registry/material/ui/dropdown-menu.tsx create mode 100644 apps/www/registry/material/ui/form.tsx create mode 100644 apps/www/registry/material/ui/hover-card.tsx create mode 100644 apps/www/registry/material/ui/input.tsx create mode 100644 apps/www/registry/material/ui/label.tsx create mode 100644 apps/www/registry/material/ui/menubar.tsx create mode 100644 apps/www/registry/material/ui/navigation-menu.tsx create mode 100644 apps/www/registry/material/ui/popover.tsx create mode 100644 apps/www/registry/material/ui/progress.tsx create mode 100644 apps/www/registry/material/ui/radio-group.tsx create mode 100644 apps/www/registry/material/ui/scroll-area.tsx create mode 100644 apps/www/registry/material/ui/select.tsx create mode 100644 apps/www/registry/material/ui/separator.tsx create mode 100644 apps/www/registry/material/ui/sheet.tsx create mode 100644 apps/www/registry/material/ui/skeleton.tsx create mode 100644 apps/www/registry/material/ui/slider.tsx create mode 100644 apps/www/registry/material/ui/switch.tsx create mode 100644 apps/www/registry/material/ui/table.tsx create mode 100644 apps/www/registry/material/ui/tabs.tsx create mode 100644 apps/www/registry/material/ui/textarea.tsx create mode 100644 apps/www/registry/material/ui/toast.tsx create mode 100644 apps/www/registry/material/ui/toaster.tsx create mode 100644 apps/www/registry/material/ui/toggle-group.tsx create mode 100644 apps/www/registry/material/ui/toggle.tsx create mode 100644 apps/www/registry/material/ui/tooltip.tsx create mode 100644 apps/www/registry/material/ui/use-toast.ts diff --git a/apps/www/__registry__/index.tsx b/apps/www/__registry__/index.tsx index af4376f8533..8bbfeca89a4 100644 --- a/apps/www/__registry__/index.tsx +++ b/apps/www/__registry__/index.tsx @@ -2162,5 +2162,1084 @@ export const Index: Record = { component: React.lazy(() => import("@/registry/new-york/example/cards")), files: ["registry/new-york/example/cards/cards.tsx"], }, + }, "material": { + "accordion": { + name: "accordion", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/accordion")), + files: ["registry/material/ui/accordion.tsx"], + }, + "alert": { + name: "alert", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/alert")), + files: ["registry/material/ui/alert.tsx"], + }, + "alert-dialog": { + name: "alert-dialog", + type: "components:ui", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/ui/alert-dialog")), + files: ["registry/material/ui/alert-dialog.tsx"], + }, + "aspect-ratio": { + name: "aspect-ratio", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/aspect-ratio")), + files: ["registry/material/ui/aspect-ratio.tsx"], + }, + "avatar": { + name: "avatar", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/avatar")), + files: ["registry/material/ui/avatar.tsx"], + }, + "badge": { + name: "badge", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/badge")), + files: ["registry/material/ui/badge.tsx"], + }, + "button": { + name: "button", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/button")), + files: ["registry/material/ui/button.tsx"], + }, + "calendar": { + name: "calendar", + type: "components:ui", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/ui/calendar")), + files: ["registry/material/ui/calendar.tsx"], + }, + "card": { + name: "card", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/card")), + files: ["registry/material/ui/card.tsx"], + }, + "checkbox": { + name: "checkbox", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/checkbox")), + files: ["registry/material/ui/checkbox.tsx"], + }, + "collapsible": { + name: "collapsible", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/collapsible")), + files: ["registry/material/ui/collapsible.tsx"], + }, + "command": { + name: "command", + type: "components:ui", + registryDependencies: ["dialog"], + component: React.lazy(() => import("@/registry/material/ui/command")), + files: ["registry/material/ui/command.tsx"], + }, + "context-menu": { + name: "context-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/context-menu")), + files: ["registry/material/ui/context-menu.tsx"], + }, + "dialog": { + name: "dialog", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/dialog")), + files: ["registry/material/ui/dialog.tsx"], + }, + "dropdown-menu": { + name: "dropdown-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/dropdown-menu")), + files: ["registry/material/ui/dropdown-menu.tsx"], + }, + "form": { + name: "form", + type: "components:ui", + registryDependencies: ["button","label"], + component: React.lazy(() => import("@/registry/material/ui/form")), + files: ["registry/material/ui/form.tsx"], + }, + "hover-card": { + name: "hover-card", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/hover-card")), + files: ["registry/material/ui/hover-card.tsx"], + }, + "input": { + name: "input", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/input")), + files: ["registry/material/ui/input.tsx"], + }, + "label": { + name: "label", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/label")), + files: ["registry/material/ui/label.tsx"], + }, + "menubar": { + name: "menubar", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/menubar")), + files: ["registry/material/ui/menubar.tsx"], + }, + "navigation-menu": { + name: "navigation-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/navigation-menu")), + files: ["registry/material/ui/navigation-menu.tsx"], + }, + "popover": { + name: "popover", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/popover")), + files: ["registry/material/ui/popover.tsx"], + }, + "progress": { + name: "progress", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/progress")), + files: ["registry/material/ui/progress.tsx"], + }, + "radio-group": { + name: "radio-group", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/radio-group")), + files: ["registry/material/ui/radio-group.tsx"], + }, + "scroll-area": { + name: "scroll-area", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/scroll-area")), + files: ["registry/material/ui/scroll-area.tsx"], + }, + "select": { + name: "select", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/select")), + files: ["registry/material/ui/select.tsx"], + }, + "separator": { + name: "separator", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/separator")), + files: ["registry/material/ui/separator.tsx"], + }, + "sheet": { + name: "sheet", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/sheet")), + files: ["registry/material/ui/sheet.tsx"], + }, + "skeleton": { + name: "skeleton", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/skeleton")), + files: ["registry/material/ui/skeleton.tsx"], + }, + "slider": { + name: "slider", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/slider")), + files: ["registry/material/ui/slider.tsx"], + }, + "switch": { + name: "switch", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/switch")), + files: ["registry/material/ui/switch.tsx"], + }, + "table": { + name: "table", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/table")), + files: ["registry/material/ui/table.tsx"], + }, + "tabs": { + name: "tabs", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/tabs")), + files: ["registry/material/ui/tabs.tsx"], + }, + "textarea": { + name: "textarea", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/textarea")), + files: ["registry/material/ui/textarea.tsx"], + }, + "toast": { + name: "toast", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/toast")), + files: ["registry/material/ui/toast.tsx","registry/material/ui/use-toast.ts","registry/material/ui/toaster.tsx"], + }, + "toggle": { + name: "toggle", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/toggle")), + files: ["registry/material/ui/toggle.tsx"], + }, + "toggle-group": { + name: "toggle-group", + type: "components:ui", + registryDependencies: ["toggle"], + component: React.lazy(() => import("@/registry/material/ui/toggle-group")), + files: ["registry/material/ui/toggle-group.tsx"], + }, + "tooltip": { + name: "tooltip", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/ui/tooltip")), + files: ["registry/material/ui/tooltip.tsx"], + }, + "accordion-demo": { + name: "accordion-demo", + type: "components:example", + registryDependencies: ["accordion"], + component: React.lazy(() => import("@/registry/material/example/accordion-demo")), + files: ["registry/material/example/accordion-demo.tsx"], + }, + "alert-demo": { + name: "alert-demo", + type: "components:example", + registryDependencies: ["alert"], + component: React.lazy(() => import("@/registry/material/example/alert-demo")), + files: ["registry/material/example/alert-demo.tsx"], + }, + "alert-destructive": { + name: "alert-destructive", + type: "components:example", + registryDependencies: ["alert"], + component: React.lazy(() => import("@/registry/material/example/alert-destructive")), + files: ["registry/material/example/alert-destructive.tsx"], + }, + "alert-dialog-demo": { + name: "alert-dialog-demo", + type: "components:example", + registryDependencies: ["alert-dialog","button"], + component: React.lazy(() => import("@/registry/material/example/alert-dialog-demo")), + files: ["registry/material/example/alert-dialog-demo.tsx"], + }, + "aspect-ratio-demo": { + name: "aspect-ratio-demo", + type: "components:example", + registryDependencies: ["aspect-ratio"], + component: React.lazy(() => import("@/registry/material/example/aspect-ratio-demo")), + files: ["registry/material/example/aspect-ratio-demo.tsx"], + }, + "avatar-demo": { + name: "avatar-demo", + type: "components:example", + registryDependencies: ["avatar"], + component: React.lazy(() => import("@/registry/material/example/avatar-demo")), + files: ["registry/material/example/avatar-demo.tsx"], + }, + "badge-demo": { + name: "badge-demo", + type: "components:example", + registryDependencies: ["badge"], + component: React.lazy(() => import("@/registry/material/example/badge-demo")), + files: ["registry/material/example/badge-demo.tsx"], + }, + "badge-destructive": { + name: "badge-destructive", + type: "components:example", + registryDependencies: ["badge"], + component: React.lazy(() => import("@/registry/material/example/badge-destructive")), + files: ["registry/material/example/badge-destructive.tsx"], + }, + "badge-outline": { + name: "badge-outline", + type: "components:example", + registryDependencies: ["badge"], + component: React.lazy(() => import("@/registry/material/example/badge-outline")), + files: ["registry/material/example/badge-outline.tsx"], + }, + "badge-secondary": { + name: "badge-secondary", + type: "components:example", + registryDependencies: ["badge"], + component: React.lazy(() => import("@/registry/material/example/badge-secondary")), + files: ["registry/material/example/badge-secondary.tsx"], + }, + "button-demo": { + name: "button-demo", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-demo")), + files: ["registry/material/example/button-demo.tsx"], + }, + "button-secondary": { + name: "button-secondary", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-secondary")), + files: ["registry/material/example/button-secondary.tsx"], + }, + "button-destructive": { + name: "button-destructive", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-destructive")), + files: ["registry/material/example/button-destructive.tsx"], + }, + "button-outline": { + name: "button-outline", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-outline")), + files: ["registry/material/example/button-outline.tsx"], + }, + "button-ghost": { + name: "button-ghost", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-ghost")), + files: ["registry/material/example/button-ghost.tsx"], + }, + "button-link": { + name: "button-link", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-link")), + files: ["registry/material/example/button-link.tsx"], + }, + "button-with-icon": { + name: "button-with-icon", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-with-icon")), + files: ["registry/material/example/button-with-icon.tsx"], + }, + "button-loading": { + name: "button-loading", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-loading")), + files: ["registry/material/example/button-loading.tsx"], + }, + "button-icon": { + name: "button-icon", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-icon")), + files: ["registry/material/example/button-icon.tsx"], + }, + "button-as-child": { + name: "button-as-child", + type: "components:example", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/material/example/button-as-child")), + files: ["registry/material/example/button-as-child.tsx"], + }, + "calendar-demo": { + name: "calendar-demo", + type: "components:example", + registryDependencies: ["calendar"], + component: React.lazy(() => import("@/registry/material/example/calendar-demo")), + files: ["registry/material/example/calendar-demo.tsx"], + }, + "calendar-form": { + name: "calendar-form", + type: "components:example", + registryDependencies: ["calendar","form","popover"], + component: React.lazy(() => import("@/registry/material/example/calendar-form")), + files: ["registry/material/example/calendar-form.tsx"], + }, + "card-demo": { + name: "card-demo", + type: "components:example", + registryDependencies: ["card","button","switch"], + component: React.lazy(() => import("@/registry/material/example/card-demo")), + files: ["registry/material/example/card-demo.tsx"], + }, + "card-with-form": { + name: "card-with-form", + type: "components:example", + registryDependencies: ["button","card","input","label","select"], + component: React.lazy(() => import("@/registry/material/example/card-with-form")), + files: ["registry/material/example/card-with-form.tsx"], + }, + "checkbox-demo": { + name: "checkbox-demo", + type: "components:example", + registryDependencies: ["checkbox"], + component: React.lazy(() => import("@/registry/material/example/checkbox-demo")), + files: ["registry/material/example/checkbox-demo.tsx"], + }, + "checkbox-disabled": { + name: "checkbox-disabled", + type: "components:example", + registryDependencies: ["checkbox"], + component: React.lazy(() => import("@/registry/material/example/checkbox-disabled")), + files: ["registry/material/example/checkbox-disabled.tsx"], + }, + "checkbox-form-multiple": { + name: "checkbox-form-multiple", + type: "components:example", + registryDependencies: ["checkbox","form"], + component: React.lazy(() => import("@/registry/material/example/checkbox-form-multiple")), + files: ["registry/material/example/checkbox-form-multiple.tsx"], + }, + "checkbox-form-single": { + name: "checkbox-form-single", + type: "components:example", + registryDependencies: ["checkbox","form"], + component: React.lazy(() => import("@/registry/material/example/checkbox-form-single")), + files: ["registry/material/example/checkbox-form-single.tsx"], + }, + "checkbox-with-text": { + name: "checkbox-with-text", + type: "components:example", + registryDependencies: ["checkbox"], + component: React.lazy(() => import("@/registry/material/example/checkbox-with-text")), + files: ["registry/material/example/checkbox-with-text.tsx"], + }, + "collapsible-demo": { + name: "collapsible-demo", + type: "components:example", + registryDependencies: ["collapsible"], + component: React.lazy(() => import("@/registry/material/example/collapsible-demo")), + files: ["registry/material/example/collapsible-demo.tsx"], + }, + "combobox-demo": { + name: "combobox-demo", + type: "components:example", + registryDependencies: ["command"], + component: React.lazy(() => import("@/registry/material/example/combobox-demo")), + files: ["registry/material/example/combobox-demo.tsx"], + }, + "combobox-dropdown-menu": { + name: "combobox-dropdown-menu", + type: "components:example", + registryDependencies: ["command","dropdown-menu","button"], + component: React.lazy(() => import("@/registry/material/example/combobox-dropdown-menu")), + files: ["registry/material/example/combobox-dropdown-menu.tsx"], + }, + "combobox-form": { + name: "combobox-form", + type: "components:example", + registryDependencies: ["command","form"], + component: React.lazy(() => import("@/registry/material/example/combobox-form")), + files: ["registry/material/example/combobox-form.tsx"], + }, + "combobox-popover": { + name: "combobox-popover", + type: "components:example", + registryDependencies: ["combobox","popover"], + component: React.lazy(() => import("@/registry/material/example/combobox-popover")), + files: ["registry/material/example/combobox-popover.tsx"], + }, + "command-demo": { + name: "command-demo", + type: "components:example", + registryDependencies: ["command"], + component: React.lazy(() => import("@/registry/material/example/command-demo")), + files: ["registry/material/example/command-demo.tsx"], + }, + "command-dialog": { + name: "command-dialog", + type: "components:example", + registryDependencies: ["command","dialog"], + component: React.lazy(() => import("@/registry/material/example/command-dialog")), + files: ["registry/material/example/command-dialog.tsx"], + }, + "context-menu-demo": { + name: "context-menu-demo", + type: "components:example", + registryDependencies: ["context-menu"], + component: React.lazy(() => import("@/registry/material/example/context-menu-demo")), + files: ["registry/material/example/context-menu-demo.tsx"], + }, + "data-table-demo": { + name: "data-table-demo", + type: "components:example", + registryDependencies: ["data-table"], + component: React.lazy(() => import("@/registry/material/example/data-table-demo")), + files: ["registry/material/example/data-table-demo.tsx"], + }, + "date-picker-demo": { + name: "date-picker-demo", + type: "components:example", + registryDependencies: ["button","calendar","popover"], + component: React.lazy(() => import("@/registry/material/example/date-picker-demo")), + files: ["registry/material/example/date-picker-demo.tsx"], + }, + "date-picker-form": { + name: "date-picker-form", + type: "components:example", + registryDependencies: ["button","calendar","form","popover"], + component: React.lazy(() => import("@/registry/material/example/date-picker-form")), + files: ["registry/material/example/date-picker-form.tsx"], + }, + "date-picker-with-presets": { + name: "date-picker-with-presets", + type: "components:example", + registryDependencies: ["button","calendar","popover","select"], + component: React.lazy(() => import("@/registry/material/example/date-picker-with-presets")), + files: ["registry/material/example/date-picker-with-presets.tsx"], + }, + "date-picker-with-range": { + name: "date-picker-with-range", + type: "components:example", + registryDependencies: ["button","calendar","popover"], + component: React.lazy(() => import("@/registry/material/example/date-picker-with-range")), + files: ["registry/material/example/date-picker-with-range.tsx"], + }, + "dialog-demo": { + name: "dialog-demo", + type: "components:example", + registryDependencies: ["dialog"], + component: React.lazy(() => import("@/registry/material/example/dialog-demo")), + files: ["registry/material/example/dialog-demo.tsx"], + }, + "dialog-close-button": { + name: "dialog-close-button", + type: "components:example", + registryDependencies: ["dialog","button"], + component: React.lazy(() => import("@/registry/material/example/dialog-close-button")), + files: ["registry/material/example/dialog-close-button.tsx"], + }, + "dropdown-menu-demo": { + name: "dropdown-menu-demo", + type: "components:example", + registryDependencies: ["dropdown-menu"], + component: React.lazy(() => import("@/registry/material/example/dropdown-menu-demo")), + files: ["registry/material/example/dropdown-menu-demo.tsx"], + }, + "dropdown-menu-checkboxes": { + name: "dropdown-menu-checkboxes", + type: "components:example", + registryDependencies: ["dropdown-menu","checkbox"], + component: React.lazy(() => import("@/registry/material/example/dropdown-menu-checkboxes")), + files: ["registry/material/example/dropdown-menu-checkboxes.tsx"], + }, + "dropdown-menu-radio-group": { + name: "dropdown-menu-radio-group", + type: "components:example", + registryDependencies: ["dropdown-menu","radio-group"], + component: React.lazy(() => import("@/registry/material/example/dropdown-menu-radio-group")), + files: ["registry/material/example/dropdown-menu-radio-group.tsx"], + }, + "hover-card-demo": { + name: "hover-card-demo", + type: "components:example", + registryDependencies: ["hover-card"], + component: React.lazy(() => import("@/registry/material/example/hover-card-demo")), + files: ["registry/material/example/hover-card-demo.tsx"], + }, + "input-demo": { + name: "input-demo", + type: "components:example", + registryDependencies: ["input"], + component: React.lazy(() => import("@/registry/material/example/input-demo")), + files: ["registry/material/example/input-demo.tsx"], + }, + "input-disabled": { + name: "input-disabled", + type: "components:example", + registryDependencies: ["input"], + component: React.lazy(() => import("@/registry/material/example/input-disabled")), + files: ["registry/material/example/input-disabled.tsx"], + }, + "input-file": { + name: "input-file", + type: "components:example", + registryDependencies: ["input"], + component: React.lazy(() => import("@/registry/material/example/input-file")), + files: ["registry/material/example/input-file.tsx"], + }, + "input-form": { + name: "input-form", + type: "components:example", + registryDependencies: ["input","button","form"], + component: React.lazy(() => import("@/registry/material/example/input-form")), + files: ["registry/material/example/input-form.tsx"], + }, + "input-with-button": { + name: "input-with-button", + type: "components:example", + registryDependencies: ["input","button"], + component: React.lazy(() => import("@/registry/material/example/input-with-button")), + files: ["registry/material/example/input-with-button.tsx"], + }, + "input-with-label": { + name: "input-with-label", + type: "components:example", + registryDependencies: ["input","button","label"], + component: React.lazy(() => import("@/registry/material/example/input-with-label")), + files: ["registry/material/example/input-with-label.tsx"], + }, + "input-with-text": { + name: "input-with-text", + type: "components:example", + registryDependencies: ["input","button","label"], + component: React.lazy(() => import("@/registry/material/example/input-with-text")), + files: ["registry/material/example/input-with-text.tsx"], + }, + "label-demo": { + name: "label-demo", + type: "components:example", + registryDependencies: ["label"], + component: React.lazy(() => import("@/registry/material/example/label-demo")), + files: ["registry/material/example/label-demo.tsx"], + }, + "menubar-demo": { + name: "menubar-demo", + type: "components:example", + registryDependencies: ["menubar"], + component: React.lazy(() => import("@/registry/material/example/menubar-demo")), + files: ["registry/material/example/menubar-demo.tsx"], + }, + "navigation-menu-demo": { + name: "navigation-menu-demo", + type: "components:example", + registryDependencies: ["navigation-menu"], + component: React.lazy(() => import("@/registry/material/example/navigation-menu-demo")), + files: ["registry/material/example/navigation-menu-demo.tsx"], + }, + "popover-demo": { + name: "popover-demo", + type: "components:example", + registryDependencies: ["popover"], + component: React.lazy(() => import("@/registry/material/example/popover-demo")), + files: ["registry/material/example/popover-demo.tsx"], + }, + "progress-demo": { + name: "progress-demo", + type: "components:example", + registryDependencies: ["progress"], + component: React.lazy(() => import("@/registry/material/example/progress-demo")), + files: ["registry/material/example/progress-demo.tsx"], + }, + "radio-group-demo": { + name: "radio-group-demo", + type: "components:example", + registryDependencies: ["radio-group"], + component: React.lazy(() => import("@/registry/material/example/radio-group-demo")), + files: ["registry/material/example/radio-group-demo.tsx"], + }, + "radio-group-form": { + name: "radio-group-form", + type: "components:example", + registryDependencies: ["radio-group","form"], + component: React.lazy(() => import("@/registry/material/example/radio-group-form")), + files: ["registry/material/example/radio-group-form.tsx"], + }, + "scroll-area-demo": { + name: "scroll-area-demo", + type: "components:example", + registryDependencies: ["scroll-area"], + component: React.lazy(() => import("@/registry/material/example/scroll-area-demo")), + files: ["registry/material/example/scroll-area-demo.tsx"], + }, + "scroll-area-horizontal-demo": { + name: "scroll-area-horizontal-demo", + type: "components:example", + registryDependencies: ["scroll-area"], + component: React.lazy(() => import("@/registry/material/example/scroll-area-horizontal-demo")), + files: ["registry/material/example/scroll-area-horizontal-demo.tsx"], + }, + "select-demo": { + name: "select-demo", + type: "components:example", + registryDependencies: ["select"], + component: React.lazy(() => import("@/registry/material/example/select-demo")), + files: ["registry/material/example/select-demo.tsx"], + }, + "select-scrollable": { + name: "select-scrollable", + type: "components:example", + registryDependencies: ["select"], + component: React.lazy(() => import("@/registry/material/example/select-scrollable")), + files: ["registry/material/example/select-scrollable.tsx"], + }, + "select-form": { + name: "select-form", + type: "components:example", + registryDependencies: ["select"], + component: React.lazy(() => import("@/registry/material/example/select-form")), + files: ["registry/material/example/select-form.tsx"], + }, + "separator-demo": { + name: "separator-demo", + type: "components:example", + registryDependencies: ["separator"], + component: React.lazy(() => import("@/registry/material/example/separator-demo")), + files: ["registry/material/example/separator-demo.tsx"], + }, + "sheet-demo": { + name: "sheet-demo", + type: "components:example", + registryDependencies: ["sheet"], + component: React.lazy(() => import("@/registry/material/example/sheet-demo")), + files: ["registry/material/example/sheet-demo.tsx"], + }, + "sheet-side": { + name: "sheet-side", + type: "components:example", + registryDependencies: ["sheet"], + component: React.lazy(() => import("@/registry/material/example/sheet-side")), + files: ["registry/material/example/sheet-side.tsx"], + }, + "skeleton-demo": { + name: "skeleton-demo", + type: "components:example", + registryDependencies: ["skeleton"], + component: React.lazy(() => import("@/registry/material/example/skeleton-demo")), + files: ["registry/material/example/skeleton-demo.tsx"], + }, + "slider-demo": { + name: "slider-demo", + type: "components:example", + registryDependencies: ["slider"], + component: React.lazy(() => import("@/registry/material/example/slider-demo")), + files: ["registry/material/example/slider-demo.tsx"], + }, + "switch-demo": { + name: "switch-demo", + type: "components:example", + registryDependencies: ["switch"], + component: React.lazy(() => import("@/registry/material/example/switch-demo")), + files: ["registry/material/example/switch-demo.tsx"], + }, + "switch-form": { + name: "switch-form", + type: "components:example", + registryDependencies: ["switch","form"], + component: React.lazy(() => import("@/registry/material/example/switch-form")), + files: ["registry/material/example/switch-form.tsx"], + }, + "table-demo": { + name: "table-demo", + type: "components:example", + registryDependencies: ["table"], + component: React.lazy(() => import("@/registry/material/example/table-demo")), + files: ["registry/material/example/table-demo.tsx"], + }, + "tabs-demo": { + name: "tabs-demo", + type: "components:example", + registryDependencies: ["tabs"], + component: React.lazy(() => import("@/registry/material/example/tabs-demo")), + files: ["registry/material/example/tabs-demo.tsx"], + }, + "textarea-demo": { + name: "textarea-demo", + type: "components:example", + registryDependencies: ["textarea"], + component: React.lazy(() => import("@/registry/material/example/textarea-demo")), + files: ["registry/material/example/textarea-demo.tsx"], + }, + "textarea-disabled": { + name: "textarea-disabled", + type: "components:example", + registryDependencies: ["textarea"], + component: React.lazy(() => import("@/registry/material/example/textarea-disabled")), + files: ["registry/material/example/textarea-disabled.tsx"], + }, + "textarea-form": { + name: "textarea-form", + type: "components:example", + registryDependencies: ["textarea","form"], + component: React.lazy(() => import("@/registry/material/example/textarea-form")), + files: ["registry/material/example/textarea-form.tsx"], + }, + "textarea-with-button": { + name: "textarea-with-button", + type: "components:example", + registryDependencies: ["textarea","button"], + component: React.lazy(() => import("@/registry/material/example/textarea-with-button")), + files: ["registry/material/example/textarea-with-button.tsx"], + }, + "textarea-with-label": { + name: "textarea-with-label", + type: "components:example", + registryDependencies: ["textarea","label"], + component: React.lazy(() => import("@/registry/material/example/textarea-with-label")), + files: ["registry/material/example/textarea-with-label.tsx"], + }, + "textarea-with-text": { + name: "textarea-with-text", + type: "components:example", + registryDependencies: ["textarea","label"], + component: React.lazy(() => import("@/registry/material/example/textarea-with-text")), + files: ["registry/material/example/textarea-with-text.tsx"], + }, + "toast-demo": { + name: "toast-demo", + type: "components:example", + registryDependencies: ["toast"], + component: React.lazy(() => import("@/registry/material/example/toast-demo")), + files: ["registry/material/example/toast-demo.tsx"], + }, + "toast-destructive": { + name: "toast-destructive", + type: "components:example", + registryDependencies: ["toast"], + component: React.lazy(() => import("@/registry/material/example/toast-destructive")), + files: ["registry/material/example/toast-destructive.tsx"], + }, + "toast-simple": { + name: "toast-simple", + type: "components:example", + registryDependencies: ["toast"], + component: React.lazy(() => import("@/registry/material/example/toast-simple")), + files: ["registry/material/example/toast-simple.tsx"], + }, + "toast-with-action": { + name: "toast-with-action", + type: "components:example", + registryDependencies: ["toast"], + component: React.lazy(() => import("@/registry/material/example/toast-with-action")), + files: ["registry/material/example/toast-with-action.tsx"], + }, + "toast-with-title": { + name: "toast-with-title", + type: "components:example", + registryDependencies: ["toast"], + component: React.lazy(() => import("@/registry/material/example/toast-with-title")), + files: ["registry/material/example/toast-with-title.tsx"], + }, + "toggle-group-demo": { + name: "toggle-group-demo", + type: "components:example", + registryDependencies: ["toggle-group"], + component: React.lazy(() => import("@/registry/material/example/toggle-group-demo")), + files: ["registry/material/example/toggle-group-demo.tsx"], + }, + "toggle-group-disabled": { + name: "toggle-group-disabled", + type: "components:example", + registryDependencies: ["toggle-group"], + component: React.lazy(() => import("@/registry/material/example/toggle-group-disabled")), + files: ["registry/material/example/toggle-group-disabled.tsx"], + }, + "toggle-group-lg": { + name: "toggle-group-lg", + type: "components:example", + registryDependencies: ["toggle-group"], + component: React.lazy(() => import("@/registry/material/example/toggle-group-lg")), + files: ["registry/material/example/toggle-group-lg.tsx"], + }, + "toggle-group-outline": { + name: "toggle-group-outline", + type: "components:example", + registryDependencies: ["toggle-group"], + component: React.lazy(() => import("@/registry/material/example/toggle-group-outline")), + files: ["registry/material/example/toggle-group-outline.tsx"], + }, + "toggle-group-sm": { + name: "toggle-group-sm", + type: "components:example", + registryDependencies: ["toggle-group"], + component: React.lazy(() => import("@/registry/material/example/toggle-group-sm")), + files: ["registry/material/example/toggle-group-sm.tsx"], + }, + "toggle-group-single": { + name: "toggle-group-single", + type: "components:example", + registryDependencies: ["toggle-group"], + component: React.lazy(() => import("@/registry/material/example/toggle-group-single")), + files: ["registry/material/example/toggle-group-single.tsx"], + }, + "toggle-demo": { + name: "toggle-demo", + type: "components:example", + registryDependencies: ["toggle"], + component: React.lazy(() => import("@/registry/material/example/toggle-demo")), + files: ["registry/material/example/toggle-demo.tsx"], + }, + "toggle-disabled": { + name: "toggle-disabled", + type: "components:example", + registryDependencies: ["toggle"], + component: React.lazy(() => import("@/registry/material/example/toggle-disabled")), + files: ["registry/material/example/toggle-disabled.tsx"], + }, + "toggle-lg": { + name: "toggle-lg", + type: "components:example", + registryDependencies: ["toggle"], + component: React.lazy(() => import("@/registry/material/example/toggle-lg")), + files: ["registry/material/example/toggle-lg.tsx"], + }, + "toggle-outline": { + name: "toggle-outline", + type: "components:example", + registryDependencies: ["toggle"], + component: React.lazy(() => import("@/registry/material/example/toggle-outline")), + files: ["registry/material/example/toggle-outline.tsx"], + }, + "toggle-sm": { + name: "toggle-sm", + type: "components:example", + registryDependencies: ["toggle"], + component: React.lazy(() => import("@/registry/material/example/toggle-sm")), + files: ["registry/material/example/toggle-sm.tsx"], + }, + "toggle-with-text": { + name: "toggle-with-text", + type: "components:example", + registryDependencies: ["toggle"], + component: React.lazy(() => import("@/registry/material/example/toggle-with-text")), + files: ["registry/material/example/toggle-with-text.tsx"], + }, + "tooltip-demo": { + name: "tooltip-demo", + type: "components:example", + registryDependencies: ["tooltip"], + component: React.lazy(() => import("@/registry/material/example/tooltip-demo")), + files: ["registry/material/example/tooltip-demo.tsx"], + }, + "typography-blockquote": { + name: "typography-blockquote", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-blockquote")), + files: ["registry/material/example/typography-blockquote.tsx"], + }, + "typography-demo": { + name: "typography-demo", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-demo")), + files: ["registry/material/example/typography-demo.tsx"], + }, + "typography-h1": { + name: "typography-h1", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-h1")), + files: ["registry/material/example/typography-h1.tsx"], + }, + "typography-h2": { + name: "typography-h2", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-h2")), + files: ["registry/material/example/typography-h2.tsx"], + }, + "typography-h3": { + name: "typography-h3", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-h3")), + files: ["registry/material/example/typography-h3.tsx"], + }, + "typography-h4": { + name: "typography-h4", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-h4")), + files: ["registry/material/example/typography-h4.tsx"], + }, + "typography-inline-code": { + name: "typography-inline-code", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-inline-code")), + files: ["registry/material/example/typography-inline-code.tsx"], + }, + "typography-large": { + name: "typography-large", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-large")), + files: ["registry/material/example/typography-large.tsx"], + }, + "typography-lead": { + name: "typography-lead", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-lead")), + files: ["registry/material/example/typography-lead.tsx"], + }, + "typography-list": { + name: "typography-list", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-list")), + files: ["registry/material/example/typography-list.tsx"], + }, + "typography-muted": { + name: "typography-muted", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-muted")), + files: ["registry/material/example/typography-muted.tsx"], + }, + "typography-p": { + name: "typography-p", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-p")), + files: ["registry/material/example/typography-p.tsx"], + }, + "typography-small": { + name: "typography-small", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-small")), + files: ["registry/material/example/typography-small.tsx"], + }, + "typography-table": { + name: "typography-table", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/typography-table")), + files: ["registry/material/example/typography-table.tsx"], + }, + "mode-toggle": { + name: "mode-toggle", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/mode-toggle")), + files: ["registry/material/example/mode-toggle.tsx"], + }, + "cards": { + name: "cards", + type: "components:example", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/material/example/cards")), + files: ["registry/material/example/cards/cards.tsx"], + }, }, } diff --git a/apps/www/package.json b/apps/www/package.json index 57d416fe4d8..a0d3b090533 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "dev": "next dev -p 3001", + "dev": "concurrently \"contentlayer dev\" \"next dev -p 3001\"", "build": "contentlayer build && pnpm build:registry && next build", "build:registry": "ts-node --esm --project ./tsconfig.scripts.json ./scripts/build-registry.ts", "seed:tasks": "ts-node --esm --project ./tsconfig.scripts.json ./app/examples/tasks/data/seed.ts", diff --git a/apps/www/public/registry/styles/default/accordion.json b/apps/www/public/registry/styles/default/accordion.json index 5482c2118c6..eb9679257c4 100644 --- a/apps/www/public/registry/styles/default/accordion.json +++ b/apps/www/public/registry/styles/default/accordion.json @@ -6,7 +6,7 @@ "files": [ { "name": "accordion.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAccordionItem.displayName = \"AccordionItem\"\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n \n \n \n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n
{children}
\n \n))\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\r\nimport { ChevronDown } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Accordion = AccordionPrimitive.Root\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAccordionItem.displayName = \"AccordionItem\"\r\n\r\nconst AccordionTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n svg]:rotate-180\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n \r\n \r\n \r\n))\r\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\r\n\r\nconst AccordionContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n
{children}
\r\n \r\n))\r\n\r\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\r\n\r\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/alert-dialog.json b/apps/www/public/registry/styles/default/alert-dialog.json index 2e949e14f87..916bfc7a100 100644 --- a/apps/www/public/registry/styles/default/alert-dialog.json +++ b/apps/www/public/registry/styles/default/alert-dialog.json @@ -9,7 +9,7 @@ "files": [ { "name": "alert-dialog.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants } from \"@/registry/default/ui/button\"\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n))\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nAlertDialogHeader.displayName = \"AlertDialogHeader\"\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nAlertDialogFooter.displayName = \"AlertDialogFooter\"\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { buttonVariants } from \"@/registry/default/ui/button\"\r\n\r\nconst AlertDialog = AlertDialogPrimitive.Root\r\n\r\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\r\n\r\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\r\n\r\nconst AlertDialogOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\r\n\r\nconst AlertDialogContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n))\r\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\r\n\r\nconst AlertDialogHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nAlertDialogHeader.displayName = \"AlertDialogHeader\"\r\n\r\nconst AlertDialogFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nAlertDialogFooter.displayName = \"AlertDialogFooter\"\r\n\r\nconst AlertDialogTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\r\n\r\nconst AlertDialogDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogDescription.displayName =\r\n AlertDialogPrimitive.Description.displayName\r\n\r\nconst AlertDialogAction = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\r\n\r\nconst AlertDialogCancel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\r\n\r\nexport {\r\n AlertDialog,\r\n AlertDialogPortal,\r\n AlertDialogOverlay,\r\n AlertDialogTrigger,\r\n AlertDialogContent,\r\n AlertDialogHeader,\r\n AlertDialogFooter,\r\n AlertDialogTitle,\r\n AlertDialogDescription,\r\n AlertDialogAction,\r\n AlertDialogCancel,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/alert.json b/apps/www/public/registry/styles/default/alert.json index e1bc8d0fa79..1e0944b1a49 100644 --- a/apps/www/public/registry/styles/default/alert.json +++ b/apps/www/public/registry/styles/default/alert.json @@ -3,7 +3,7 @@ "files": [ { "name": "alert.tsx", - "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes & VariantProps\n>(({ className, variant, ...props }, ref) => (\n \n))\nAlert.displayName = \"Alert\"\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nAlertTitle.displayName = \"AlertTitle\"\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nAlertDescription.displayName = \"AlertDescription\"\n\nexport { Alert, AlertTitle, AlertDescription }\n" + "content": "import * as React from \"react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst alertVariants = cva(\r\n \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-background text-foreground\",\r\n destructive:\r\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Alert = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes & VariantProps\r\n>(({ className, variant, ...props }, ref) => (\r\n \r\n))\r\nAlert.displayName = \"Alert\"\r\n\r\nconst AlertTitle = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertTitle.displayName = \"AlertTitle\"\r\n\r\nconst AlertDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDescription.displayName = \"AlertDescription\"\r\n\r\nexport { Alert, AlertTitle, AlertDescription }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/aspect-ratio.json b/apps/www/public/registry/styles/default/aspect-ratio.json index bf7ada618b2..82186770131 100644 --- a/apps/www/public/registry/styles/default/aspect-ratio.json +++ b/apps/www/public/registry/styles/default/aspect-ratio.json @@ -6,7 +6,7 @@ "files": [ { "name": "aspect-ratio.tsx", - "content": "\"use client\"\n\nimport * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\"\n\nconst AspectRatio = AspectRatioPrimitive.Root\n\nexport { AspectRatio }\n" + "content": "\"use client\"\r\n\r\nimport * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\"\r\n\r\nconst AspectRatio = AspectRatioPrimitive.Root\r\n\r\nexport { AspectRatio }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/avatar.json b/apps/www/public/registry/styles/default/avatar.json index 2fa35c3e237..82aba087492 100644 --- a/apps/www/public/registry/styles/default/avatar.json +++ b/apps/www/public/registry/styles/default/avatar.json @@ -6,7 +6,7 @@ "files": [ { "name": "avatar.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Avatar = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Avatar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatar.displayName = AvatarPrimitive.Root.displayName\r\n\r\nconst AvatarImage = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\r\n\r\nconst AvatarFallback = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\r\n\r\nexport { Avatar, AvatarImage, AvatarFallback }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/badge.json b/apps/www/public/registry/styles/default/badge.json index ef710481409..27359edaa13 100644 --- a/apps/www/public/registry/styles/default/badge.json +++ b/apps/www/public/registry/styles/default/badge.json @@ -3,7 +3,7 @@ "files": [ { "name": "badge.tsx", - "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes,\n VariantProps {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n
\n )\n}\n\nexport { Badge, badgeVariants }\n" + "content": "import * as React from \"react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst badgeVariants = cva(\r\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\r\n {\r\n variants: {\r\n variant: {\r\n default:\r\n \"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\r\n secondary:\r\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\r\n destructive:\r\n \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\r\n outline: \"text-foreground\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nexport interface BadgeProps\r\n extends React.HTMLAttributes,\r\n VariantProps {}\r\n\r\nfunction Badge({ className, variant, ...props }: BadgeProps) {\r\n return (\r\n
\r\n )\r\n}\r\n\r\nexport { Badge, badgeVariants }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/button.json b/apps/www/public/registry/styles/default/button.json index b292cab4316..fb6395f5f43 100644 --- a/apps/www/public/registry/styles/default/button.json +++ b/apps/www/public/registry/styles/default/button.json @@ -6,7 +6,7 @@ "files": [ { "name": "button.tsx", - "content": "import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes,\n VariantProps {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n \n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n" + "content": "import * as React from \"react\"\r\nimport { Slot } from \"@radix-ui/react-slot\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst buttonVariants = cva(\r\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\r\n destructive:\r\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\r\n outline:\r\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\r\n secondary:\r\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\r\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\r\n link: \"text-primary underline-offset-4 hover:underline\",\r\n },\r\n size: {\r\n default: \"h-10 px-4 py-2\",\r\n sm: \"h-9 rounded-md px-3\",\r\n lg: \"h-11 rounded-md px-8\",\r\n icon: \"h-10 w-10\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n size: \"default\",\r\n },\r\n }\r\n)\r\n\r\nexport interface ButtonProps\r\n extends React.ButtonHTMLAttributes,\r\n VariantProps {\r\n asChild?: boolean\r\n}\r\n\r\nconst Button = React.forwardRef(\r\n ({ className, variant, size, asChild = false, ...props }, ref) => {\r\n const Comp = asChild ? Slot : \"button\"\r\n return (\r\n \r\n )\r\n }\r\n)\r\nButton.displayName = \"Button\"\r\n\r\nexport { Button, buttonVariants }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/calendar.json b/apps/www/public/registry/styles/default/calendar.json index 70d5d5800a4..f5a5a55f42d 100644 --- a/apps/www/public/registry/styles/default/calendar.json +++ b/apps/www/public/registry/styles/default/calendar.json @@ -10,7 +10,7 @@ "files": [ { "name": "calendar.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ChevronLeft, ChevronRight } from \"lucide-react\"\nimport { DayPicker } from \"react-day-picker\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants } from \"@/registry/default/ui/button\"\n\nexport type CalendarProps = React.ComponentProps\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n ...props\n}: CalendarProps) {\n return (\n ,\n IconRight: ({ ...props }) => ,\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { ChevronLeft, ChevronRight } from \"lucide-react\"\r\nimport { DayPicker } from \"react-day-picker\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { buttonVariants } from \"@/registry/default/ui/button\"\r\n\r\nexport type CalendarProps = React.ComponentProps\r\n\r\nfunction Calendar({\r\n className,\r\n classNames,\r\n showOutsideDays = true,\r\n ...props\r\n}: CalendarProps) {\r\n return (\r\n ,\r\n IconRight: ({ ...props }) => ,\r\n }}\r\n {...props}\r\n />\r\n )\r\n}\r\nCalendar.displayName = \"Calendar\"\r\n\r\nexport { Calendar }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/card.json b/apps/www/public/registry/styles/default/card.json index ef31d3a699f..da0aeb1dff5 100644 --- a/apps/www/public/registry/styles/default/card.json +++ b/apps/www/public/registry/styles/default/card.json @@ -3,7 +3,7 @@ "files": [ { "name": "card.tsx", - "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardDescription.displayName = \"CardDescription\"\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n))\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n" + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Card = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCard.displayName = \"Card\"\r\n\r\nconst CardHeader = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardHeader.displayName = \"CardHeader\"\r\n\r\nconst CardTitle = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardTitle.displayName = \"CardTitle\"\r\n\r\nconst CardDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardDescription.displayName = \"CardDescription\"\r\n\r\nconst CardContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n
\r\n))\r\nCardContent.displayName = \"CardContent\"\r\n\r\nconst CardFooter = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardFooter.displayName = \"CardFooter\"\r\n\r\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/checkbox.json b/apps/www/public/registry/styles/default/checkbox.json index 2a31260e614..e61d57b21bc 100644 --- a/apps/www/public/registry/styles/default/checkbox.json +++ b/apps/www/public/registry/styles/default/checkbox.json @@ -6,7 +6,7 @@ "files": [ { "name": "checkbox.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\r\nimport { Check } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n))\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\r\n\r\nexport { Checkbox }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/collapsible.json b/apps/www/public/registry/styles/default/collapsible.json index 99a398a94f7..d6d08fe2b80 100644 --- a/apps/www/public/registry/styles/default/collapsible.json +++ b/apps/www/public/registry/styles/default/collapsible.json @@ -6,7 +6,7 @@ "files": [ { "name": "collapsible.tsx", - "content": "\"use client\"\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\"\n\nconst Collapsible = CollapsiblePrimitive.Root\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n" + "content": "\"use client\"\r\n\r\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\"\r\n\r\nconst Collapsible = CollapsiblePrimitive.Root\r\n\r\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger\r\n\r\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent\r\n\r\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/command.json b/apps/www/public/registry/styles/default/command.json index 37c2811d46f..2a8e7fdb283 100644 --- a/apps/www/public/registry/styles/default/command.json +++ b/apps/www/public/registry/styles/default/command.json @@ -9,7 +9,7 @@ "files": [ { "name": "command.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Dialog, DialogContent } from \"@/registry/default/ui/dialog\"\n\nconst Command = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nCommand.displayName = CommandPrimitive.displayName\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n \n \n \n {children}\n \n \n \n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n
\n \n \n
\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>((props, ref) => (\n \n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes) => {\n return (\n \n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\r\nimport { Command as CommandPrimitive } from \"cmdk\"\r\nimport { Search } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { Dialog, DialogContent } from \"@/registry/default/ui/dialog\"\r\n\r\nconst Command = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCommand.displayName = CommandPrimitive.displayName\r\n\r\ninterface CommandDialogProps extends DialogProps {}\r\n\r\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\r\n return (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n \r\n
\r\n))\r\n\r\nCommandInput.displayName = CommandPrimitive.Input.displayName\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandList.displayName = CommandPrimitive.List.displayName\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>((props, ref) => (\r\n \r\n))\r\n\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandItem.displayName = CommandPrimitive.Item.displayName\r\n\r\nconst CommandShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nCommandShortcut.displayName = \"CommandShortcut\"\r\n\r\nexport {\r\n Command,\r\n CommandDialog,\r\n CommandInput,\r\n CommandList,\r\n CommandEmpty,\r\n CommandGroup,\r\n CommandItem,\r\n CommandShortcut,\r\n CommandSeparator,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/context-menu.json b/apps/www/public/registry/styles/default/context-menu.json index 2eb10035eea..49ef62077bf 100644 --- a/apps/www/public/registry/styles/default/context-menu.json +++ b/apps/www/public/registry/styles/default/context-menu.json @@ -6,7 +6,7 @@ "files": [ { "name": "context-menu.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst ContextMenu = ContextMenuPrimitive.Root\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n))\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName\n\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes) => {\n return (\n \n )\n}\nContextMenuShortcut.displayName = \"ContextMenuShortcut\"\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\"\r\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nContextMenuCheckboxItem.displayName =\r\n ContextMenuPrimitive.CheckboxItem.displayName\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName\r\n\r\nconst ContextMenuShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\"\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuTrigger,\r\n ContextMenuContent,\r\n ContextMenuItem,\r\n ContextMenuCheckboxItem,\r\n ContextMenuRadioItem,\r\n ContextMenuLabel,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuGroup,\r\n ContextMenuPortal,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuRadioGroup,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/dialog.json b/apps/www/public/registry/styles/default/dialog.json index 321710646a1..b9182aee529 100644 --- a/apps/www/public/registry/styles/default/dialog.json +++ b/apps/www/public/registry/styles/default/dialog.json @@ -6,7 +6,7 @@ "files": [ { "name": "dialog.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n {children}\n \n \n Close\n \n \n \n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\r\nimport { X } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Dialog = DialogPrimitive.Root\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger\r\n\r\nconst DialogPortal = DialogPrimitive.Portal\r\n\r\nconst DialogClose = DialogPrimitive.Close\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n Close\r\n \r\n \r\n \r\n))\r\nDialogContent.displayName = DialogPrimitive.Content.displayName\r\n\r\nconst DialogHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nDialogHeader.displayName = \"DialogHeader\"\r\n\r\nconst DialogFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nDialogFooter.displayName = \"DialogFooter\"\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName\r\n\r\nexport {\r\n Dialog,\r\n DialogPortal,\r\n DialogOverlay,\r\n DialogClose,\r\n DialogTrigger,\r\n DialogContent,\r\n DialogHeader,\r\n DialogFooter,\r\n DialogTitle,\r\n DialogDescription,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/dropdown-menu.json b/apps/www/public/registry/styles/default/dropdown-menu.json index f9e2288fbc8..43a4c40eec6 100644 --- a/apps/www/public/registry/styles/default/dropdown-menu.json +++ b/apps/www/public/registry/styles/default/dropdown-menu.json @@ -6,7 +6,7 @@ "files": [ { "name": "dropdown-menu.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, sideOffset = 4, ...props }, ref) => (\n \n \n \n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes) => {\n return (\n \n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\r\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst DropdownMenu = DropdownMenuPrimitive.Root\r\n\r\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\r\n\r\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\r\n\r\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\r\n\r\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\r\n\r\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\r\n\r\nconst DropdownMenuSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nDropdownMenuSubTrigger.displayName =\r\n DropdownMenuPrimitive.SubTrigger.displayName\r\n\r\nconst DropdownMenuSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuSubContent.displayName =\r\n DropdownMenuPrimitive.SubContent.displayName\r\n\r\nconst DropdownMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, sideOffset = 4, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\r\n\r\nconst DropdownMenuItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\r\n\r\nconst DropdownMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nDropdownMenuCheckboxItem.displayName =\r\n DropdownMenuPrimitive.CheckboxItem.displayName\r\n\r\nconst DropdownMenuRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\r\n\r\nconst DropdownMenuLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\r\n\r\nconst DropdownMenuSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\r\n\r\nconst DropdownMenuShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\r\n\r\nexport {\r\n DropdownMenu,\r\n DropdownMenuTrigger,\r\n DropdownMenuContent,\r\n DropdownMenuItem,\r\n DropdownMenuCheckboxItem,\r\n DropdownMenuRadioItem,\r\n DropdownMenuLabel,\r\n DropdownMenuSeparator,\r\n DropdownMenuShortcut,\r\n DropdownMenuGroup,\r\n DropdownMenuPortal,\r\n DropdownMenuSub,\r\n DropdownMenuSubContent,\r\n DropdownMenuSubTrigger,\r\n DropdownMenuRadioGroup,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/form.json b/apps/www/public/registry/styles/default/form.json index 497c49459c3..55da15b3fe4 100644 --- a/apps/www/public/registry/styles/default/form.json +++ b/apps/www/public/registry/styles/default/form.json @@ -14,7 +14,7 @@ "files": [ { "name": "form.tsx", - "content": "import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n FormProvider,\n useFormContext,\n} from \"react-hook-form\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/registry/default/ui/label\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath = FieldPath\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext(\n {} as FormFieldContextValue\n)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath = FieldPath\n>({\n ...props\n}: ControllerProps) => {\n return (\n \n \n \n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within \")\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext(\n {} as FormItemContextValue\n)\n\nconst FormItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n \n
\n \n )\n})\nFormItem.displayName = \"FormItem\"\n\nconst FormLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n \n )\n})\nFormLabel.displayName = \"FormLabel\"\n\nconst FormControl = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n \n )\n})\nFormControl.displayName = \"FormControl\"\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n\n return (\n \n )\n})\nFormDescription.displayName = \"FormDescription\"\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message) : children\n\n if (!body) {\n return null\n }\n\n return (\n \n {body}\n

\n )\n})\nFormMessage.displayName = \"FormMessage\"\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n}\n" + "content": "import * as React from \"react\"\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\r\nimport { Slot } from \"@radix-ui/react-slot\"\r\nimport {\r\n Controller,\r\n ControllerProps,\r\n FieldPath,\r\n FieldValues,\r\n FormProvider,\r\n useFormContext,\r\n} from \"react-hook-form\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { Label } from \"@/registry/default/ui/label\"\r\n\r\nconst Form = FormProvider\r\n\r\ntype FormFieldContextValue<\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath = FieldPath\r\n> = {\r\n name: TName\r\n}\r\n\r\nconst FormFieldContext = React.createContext(\r\n {} as FormFieldContextValue\r\n)\r\n\r\nconst FormField = <\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath = FieldPath\r\n>({\r\n ...props\r\n}: ControllerProps) => {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nconst useFormField = () => {\r\n const fieldContext = React.useContext(FormFieldContext)\r\n const itemContext = React.useContext(FormItemContext)\r\n const { getFieldState, formState } = useFormContext()\r\n\r\n const fieldState = getFieldState(fieldContext.name, formState)\r\n\r\n if (!fieldContext) {\r\n throw new Error(\"useFormField should be used within \")\r\n }\r\n\r\n const { id } = itemContext\r\n\r\n return {\r\n id,\r\n name: fieldContext.name,\r\n formItemId: `${id}-form-item`,\r\n formDescriptionId: `${id}-form-item-description`,\r\n formMessageId: `${id}-form-item-message`,\r\n ...fieldState,\r\n }\r\n}\r\n\r\ntype FormItemContextValue = {\r\n id: string\r\n}\r\n\r\nconst FormItemContext = React.createContext(\r\n {} as FormItemContextValue\r\n)\r\n\r\nconst FormItem = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => {\r\n const id = React.useId()\r\n\r\n return (\r\n \r\n
\r\n \r\n )\r\n})\r\nFormItem.displayName = \"FormItem\"\r\n\r\nconst FormLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n const { error, formItemId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormLabel.displayName = \"FormLabel\"\r\n\r\nconst FormControl = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ ...props }, ref) => {\r\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormControl.displayName = \"FormControl\"\r\n\r\nconst FormDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => {\r\n const { formDescriptionId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormDescription.displayName = \"FormDescription\"\r\n\r\nconst FormMessage = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, children, ...props }, ref) => {\r\n const { error, formMessageId } = useFormField()\r\n const body = error ? String(error?.message) : children\r\n\r\n if (!body) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {body}\r\n

\r\n )\r\n})\r\nFormMessage.displayName = \"FormMessage\"\r\n\r\nexport {\r\n useFormField,\r\n Form,\r\n FormItem,\r\n FormLabel,\r\n FormControl,\r\n FormDescription,\r\n FormMessage,\r\n FormField,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/hover-card.json b/apps/www/public/registry/styles/default/hover-card.json index db69042ab24..44fae0a628f 100644 --- a/apps/www/public/registry/styles/default/hover-card.json +++ b/apps/www/public/registry/styles/default/hover-card.json @@ -6,7 +6,7 @@ "files": [ { "name": "hover-card.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst HoverCard = HoverCardPrimitive.Root\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger\n\nconst HoverCardContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n \n))\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst HoverCard = HoverCardPrimitive.Root\r\n\r\nconst HoverCardTrigger = HoverCardPrimitive.Trigger\r\n\r\nconst HoverCardContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\r\n \r\n))\r\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName\r\n\r\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/input.json b/apps/www/public/registry/styles/default/input.json index 762ccf00a42..1f02da253e6 100644 --- a/apps/www/public/registry/styles/default/input.json +++ b/apps/www/public/registry/styles/default/input.json @@ -3,7 +3,7 @@ "files": [ { "name": "input.tsx", - "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface InputProps\n extends React.InputHTMLAttributes {}\n\nconst Input = React.forwardRef(\n ({ className, type, ...props }, ref) => {\n return (\n \n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n" + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nexport interface InputProps\r\n extends React.InputHTMLAttributes {}\r\n\r\nconst Input = React.forwardRef(\r\n ({ className, type, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n }\r\n)\r\nInput.displayName = \"Input\"\r\n\r\nexport { Input }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/label.json b/apps/www/public/registry/styles/default/label.json index 81d3efd29e8..12caba3beaa 100644 --- a/apps/www/public/registry/styles/default/label.json +++ b/apps/www/public/registry/styles/default/label.json @@ -6,7 +6,7 @@ "files": [ { "name": "label.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nconst Label = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, ...props }, ref) => (\n \n))\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst labelVariants = cva(\r\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\r\n)\r\n\r\nconst Label = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nLabel.displayName = LabelPrimitive.Root.displayName\r\n\r\nexport { Label }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/menubar.json b/apps/www/public/registry/styles/default/menubar.json index 4d99795cd3a..d8a2f3ba1cc 100644 --- a/apps/www/public/registry/styles/default/menubar.json +++ b/apps/www/public/registry/styles/default/menubar.json @@ -6,7 +6,7 @@ "files": [ { "name": "menubar.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst MenubarMenu = MenubarPrimitive.Menu\n\nconst MenubarGroup = MenubarPrimitive.Group\n\nconst MenubarPortal = MenubarPrimitive.Portal\n\nconst MenubarSub = MenubarPrimitive.Sub\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n \n \n \n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes) => {\n return (\n \n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\r\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst MenubarMenu = MenubarPrimitive.Menu\r\n\r\nconst MenubarGroup = MenubarPrimitive.Group\r\n\r\nconst MenubarPortal = MenubarPrimitive.Portal\r\n\r\nconst MenubarSub = MenubarPrimitive.Sub\r\n\r\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup\r\n\r\nconst Menubar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubar.displayName = MenubarPrimitive.Root.displayName\r\n\r\nconst MenubarTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\r\n\r\nconst MenubarSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\r\n\r\nconst MenubarSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\r\n\r\nconst MenubarContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(\r\n (\r\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\r\n ref\r\n ) => (\r\n \r\n \r\n \r\n )\r\n)\r\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\r\n\r\nconst MenubarItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\r\n\r\nconst MenubarCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\r\n\r\nconst MenubarRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\r\n\r\nconst MenubarLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\r\n\r\nconst MenubarSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\r\n\r\nconst MenubarShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nMenubarShortcut.displayname = \"MenubarShortcut\"\r\n\r\nexport {\r\n Menubar,\r\n MenubarMenu,\r\n MenubarTrigger,\r\n MenubarContent,\r\n MenubarItem,\r\n MenubarSeparator,\r\n MenubarLabel,\r\n MenubarCheckboxItem,\r\n MenubarRadioGroup,\r\n MenubarRadioItem,\r\n MenubarPortal,\r\n MenubarSubContent,\r\n MenubarSubTrigger,\r\n MenubarGroup,\r\n MenubarSub,\r\n MenubarShortcut,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/navigation-menu.json b/apps/www/public/registry/styles/default/navigation-menu.json index a7efd54271a..7741ac3e56e 100644 --- a/apps/www/public/registry/styles/default/navigation-menu.json +++ b/apps/www/public/registry/styles/default/navigation-menu.json @@ -6,7 +6,7 @@ "files": [ { "name": "navigation-menu.tsx", - "content": "import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n {children}\n \n \n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\n)\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n {children}{\" \"}\n \n \n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n
\n \n
\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n
\n \n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n}\n" + "content": "import * as React from \"react\"\r\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\r\nimport { cva } from \"class-variance-authority\"\r\nimport { ChevronDown } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst NavigationMenu = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\r\n\r\nconst NavigationMenuList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\r\n\r\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\r\n\r\nconst navigationMenuTriggerStyle = cva(\r\n \"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\r\n)\r\n\r\nconst NavigationMenuTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n {children}{\" \"}\r\n \r\n \r\n))\r\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\r\n\r\nconst NavigationMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\r\n\r\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\r\n\r\nconst NavigationMenuViewport = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n
\r\n))\r\nNavigationMenuViewport.displayName =\r\n NavigationMenuPrimitive.Viewport.displayName\r\n\r\nconst NavigationMenuIndicator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n
\r\n \r\n))\r\nNavigationMenuIndicator.displayName =\r\n NavigationMenuPrimitive.Indicator.displayName\r\n\r\nexport {\r\n navigationMenuTriggerStyle,\r\n NavigationMenu,\r\n NavigationMenuList,\r\n NavigationMenuItem,\r\n NavigationMenuContent,\r\n NavigationMenuTrigger,\r\n NavigationMenuLink,\r\n NavigationMenuIndicator,\r\n NavigationMenuViewport,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/popover.json b/apps/www/public/registry/styles/default/popover.json index 28ffef3dbff..156f0e4f795 100644 --- a/apps/www/public/registry/styles/default/popover.json +++ b/apps/www/public/registry/styles/default/popover.json @@ -6,7 +6,7 @@ "files": [ { "name": "popover.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n \n \n \n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Popover = PopoverPrimitive.Root\r\n\r\nconst PopoverTrigger = PopoverPrimitive.Trigger\r\n\r\nconst PopoverContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\r\n\r\nexport { Popover, PopoverTrigger, PopoverContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/progress.json b/apps/www/public/registry/styles/default/progress.json index 16dd5136feb..e1e27e327ee 100644 --- a/apps/www/public/registry/styles/default/progress.json +++ b/apps/www/public/registry/styles/default/progress.json @@ -6,7 +6,7 @@ "files": [ { "name": "progress.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Progress = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, value, ...props }, ref) => (\n \n \n \n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Progress = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, value, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nProgress.displayName = ProgressPrimitive.Root.displayName\r\n\r\nexport { Progress }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/radio-group.json b/apps/www/public/registry/styles/default/radio-group.json index 4a7d7bbe6a3..a881cb4aced 100644 --- a/apps/www/public/registry/styles/default/radio-group.json +++ b/apps/www/public/registry/styles/default/radio-group.json @@ -6,7 +6,7 @@ "files": [ { "name": "radio-group.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n \n \n \n \n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\r\nimport { Circle } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst RadioGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n})\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n})\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\r\n\r\nexport { RadioGroup, RadioGroupItem }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/scroll-area.json b/apps/www/public/registry/styles/default/scroll-area.json index 6c45d05ff77..4c81e637cc5 100644 --- a/apps/www/public/registry/styles/default/scroll-area.json +++ b/apps/www/public/registry/styles/default/scroll-area.json @@ -6,7 +6,7 @@ "files": [ { "name": "scroll-area.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n {children}\n \n \n \n \n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n \n \n \n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ScrollArea = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\r\n\r\nconst ScrollBar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\r\n\r\nexport { ScrollArea, ScrollBar }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/select.json b/apps/www/public/registry/styles/default/select.json index 00e10e97ac8..f6af02ab723 100644 --- a/apps/www/public/registry/styles/default/select.json +++ b/apps/www/public/registry/styles/default/select.json @@ -6,7 +6,7 @@ "files": [ { "name": "select.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Select = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n span]:line-clamp-1\",\n className\n )}\n {...props}\n >\n {children}\n \n \n \n \n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n \n \n \n \n {children}\n \n \n \n \n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n\n {children}\n \n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\r\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Select = SelectPrimitive.Root\r\n\r\nconst SelectGroup = SelectPrimitive.Group\r\n\r\nconst SelectValue = SelectPrimitive.Value\r\n\r\nconst SelectTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n span]:line-clamp-1\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\r\n\r\nconst SelectScrollUpButton = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\r\n\r\nconst SelectScrollDownButton = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSelectScrollDownButton.displayName =\r\n SelectPrimitive.ScrollDownButton.displayName\r\n\r\nconst SelectContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, position = \"popper\", ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nSelectContent.displayName = SelectPrimitive.Content.displayName\r\n\r\nconst SelectLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSelectLabel.displayName = SelectPrimitive.Label.displayName\r\n\r\nconst SelectItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {children}\r\n \r\n))\r\nSelectItem.displayName = SelectPrimitive.Item.displayName\r\n\r\nconst SelectSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n SelectScrollUpButton,\r\n SelectScrollDownButton,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/separator.json b/apps/www/public/registry/styles/default/separator.json index fc49fac7f88..0f2c7e4ff74 100644 --- a/apps/www/public/registry/styles/default/separator.json +++ b/apps/www/public/registry/styles/default/separator.json @@ -6,7 +6,7 @@ "files": [ { "name": "separator.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Separator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref\n ) => (\n \n )\n)\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(\r\n (\r\n { className, orientation = \"horizontal\", decorative = true, ...props },\r\n ref\r\n ) => (\r\n \r\n )\r\n)\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/sheet.json b/apps/www/public/registry/styles/default/sheet.json index 80799b1474c..8947ee78447 100644 --- a/apps/www/public/registry/styles/default/sheet.json +++ b/apps/www/public/registry/styles/default/sheet.json @@ -6,7 +6,7 @@ "files": [ { "name": "sheet.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n }\n)\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef,\n VariantProps {}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n \n \n \n {children}\n \n \n Close\n \n \n \n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nSheetFooter.displayName = \"SheetFooter\"\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\nimport { X } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Sheet = SheetPrimitive.Root\r\n\r\nconst SheetTrigger = SheetPrimitive.Trigger\r\n\r\nconst SheetClose = SheetPrimitive.Close\r\n\r\nconst SheetPortal = SheetPrimitive.Portal\r\n\r\nconst SheetOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\r\n\r\nconst sheetVariants = cva(\r\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\r\n {\r\n variants: {\r\n side: {\r\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\r\n bottom:\r\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\r\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\r\n right:\r\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\r\n },\r\n },\r\n defaultVariants: {\r\n side: \"right\",\r\n },\r\n }\r\n)\r\n\r\ninterface SheetContentProps\r\n extends React.ComponentPropsWithoutRef,\r\n VariantProps {}\r\n\r\nconst SheetContent = React.forwardRef<\r\n React.ElementRef,\r\n SheetContentProps\r\n>(({ side = \"right\", className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n Close\r\n \r\n \r\n \r\n))\r\nSheetContent.displayName = SheetPrimitive.Content.displayName\r\n\r\nconst SheetHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nSheetHeader.displayName = \"SheetHeader\"\r\n\r\nconst SheetFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nSheetFooter.displayName = \"SheetFooter\"\r\n\r\nconst SheetTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetTitle.displayName = SheetPrimitive.Title.displayName\r\n\r\nconst SheetDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetDescription.displayName = SheetPrimitive.Description.displayName\r\n\r\nexport {\r\n Sheet,\r\n SheetPortal,\r\n SheetOverlay,\r\n SheetTrigger,\r\n SheetClose,\r\n SheetContent,\r\n SheetHeader,\r\n SheetFooter,\r\n SheetTitle,\r\n SheetDescription,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/skeleton.json b/apps/www/public/registry/styles/default/skeleton.json index 71d6d85f4d8..c22b515df1c 100644 --- a/apps/www/public/registry/styles/default/skeleton.json +++ b/apps/www/public/registry/styles/default/skeleton.json @@ -3,7 +3,7 @@ "files": [ { "name": "skeleton.tsx", - "content": "import { cn } from \"@/lib/utils\"\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes) {\n return (\n \n )\n}\n\nexport { Skeleton }\n" + "content": "import { cn } from \"@/lib/utils\"\r\n\r\nfunction Skeleton({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport { Skeleton }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/slider.json b/apps/www/public/registry/styles/default/slider.json index 662c5c2b66a..e3698c8a029 100644 --- a/apps/www/public/registry/styles/default/slider.json +++ b/apps/www/public/registry/styles/default/slider.json @@ -6,7 +6,7 @@ "files": [ { "name": "slider.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SliderPrimitive from \"@radix-ui/react-slider\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Slider = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n \n))\nSlider.displayName = SliderPrimitive.Root.displayName\n\nexport { Slider }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SliderPrimitive from \"@radix-ui/react-slider\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Slider = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n))\r\nSlider.displayName = SliderPrimitive.Root.displayName\r\n\r\nexport { Slider }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/switch.json b/apps/www/public/registry/styles/default/switch.json index 5c84749ced2..5ee47ae4616 100644 --- a/apps/www/public/registry/styles/default/switch.json +++ b/apps/www/public/registry/styles/default/switch.json @@ -6,7 +6,7 @@ "files": [ { "name": "switch.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Switch = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Switch = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSwitch.displayName = SwitchPrimitives.Root.displayName\r\n\r\nexport { Switch }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/table.json b/apps/www/public/registry/styles/default/table.json index 75ebf36c4b0..46be93b3fdc 100644 --- a/apps/www/public/registry/styles/default/table.json +++ b/apps/www/public/registry/styles/default/table.json @@ -3,7 +3,7 @@ "files": [ { "name": "table.tsx", - "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n \n
\n))\nTable.displayName = \"Table\"\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableHeader.displayName = \"TableHeader\"\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableBody.displayName = \"TableBody\"\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = \"TableFooter\"\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableRow.displayName = \"TableRow\"\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableHead.displayName = \"TableHead\"\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n" + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Table = React.forwardRef<\r\n HTMLTableElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n
\r\n))\r\nTable.displayName = \"Table\"\r\n\r\nconst TableHeader = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableHeader.displayName = \"TableHeader\"\r\n\r\nconst TableBody = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableBody.displayName = \"TableBody\"\r\n\r\nconst TableFooter = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n tr]:last:border-b-0\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nTableFooter.displayName = \"TableFooter\"\r\n\r\nconst TableRow = React.forwardRef<\r\n HTMLTableRowElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableRow.displayName = \"TableRow\"\r\n\r\nconst TableHead = React.forwardRef<\r\n HTMLTableCellElement,\r\n React.ThHTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableHead.displayName = \"TableHead\"\r\n\r\nconst TableCell = React.forwardRef<\r\n HTMLTableCellElement,\r\n React.TdHTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableCell.displayName = \"TableCell\"\r\n\r\nconst TableCaption = React.forwardRef<\r\n HTMLTableCaptionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableCaption.displayName = \"TableCaption\"\r\n\r\nexport {\r\n Table,\r\n TableHeader,\r\n TableBody,\r\n TableFooter,\r\n TableHead,\r\n TableRow,\r\n TableCell,\r\n TableCaption,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/tabs.json b/apps/www/public/registry/styles/default/tabs.json index 045928cdeb6..af1aa0fe363 100644 --- a/apps/www/public/registry/styles/default/tabs.json +++ b/apps/www/public/registry/styles/default/tabs.json @@ -6,7 +6,7 @@ "files": [ { "name": "tabs.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Tabs = TabsPrimitive.Root\r\n\r\nconst TabsList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsList.displayName = TabsPrimitive.List.displayName\r\n\r\nconst TabsTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\r\n\r\nconst TabsContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsContent.displayName = TabsPrimitive.Content.displayName\r\n\r\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/textarea.json b/apps/www/public/registry/styles/default/textarea.json index 1b94cf2117b..b52613e683d 100644 --- a/apps/www/public/registry/styles/default/textarea.json +++ b/apps/www/public/registry/styles/default/textarea.json @@ -3,7 +3,7 @@ "files": [ { "name": "textarea.tsx", - "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes {}\n\nconst Textarea = React.forwardRef(\n ({ className, ...props }, ref) => {\n return (\n \n )\n }\n)\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n" + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nexport interface TextareaProps\r\n extends React.TextareaHTMLAttributes {}\r\n\r\nconst Textarea = React.forwardRef(\r\n ({ className, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n }\r\n)\r\nTextarea.displayName = \"Textarea\"\r\n\r\nexport { Textarea }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/toast.json b/apps/www/public/registry/styles/default/toast.json index 6c4f7be14e4..8e9c4287e37 100644 --- a/apps/www/public/registry/styles/default/toast.json +++ b/apps/www/public/registry/styles/default/toast.json @@ -6,15 +6,15 @@ "files": [ { "name": "toast.tsx", - "content": "import * as React from \"react\"\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst ToastProvider = ToastPrimitives.Provider\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst Toast = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, ...props }, ref) => {\n return (\n \n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\nconst ToastAction = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastAction.displayName = ToastPrimitives.Action.displayName\n\nconst ToastClose = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\ntype ToastProps = React.ComponentPropsWithoutRef\n\ntype ToastActionElement = React.ReactElement\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n}\n" + "content": "import * as React from \"react\"\r\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\nimport { X } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ToastProvider = ToastPrimitives.Provider\r\n\r\nconst ToastViewport = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\r\n\r\nconst toastVariants = cva(\r\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"border bg-background text-foreground\",\r\n destructive:\r\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Toast = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n})\r\nToast.displayName = ToastPrimitives.Root.displayName\r\n\r\nconst ToastAction = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastAction.displayName = ToastPrimitives.Action.displayName\r\n\r\nconst ToastClose = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nToastClose.displayName = ToastPrimitives.Close.displayName\r\n\r\nconst ToastTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastTitle.displayName = ToastPrimitives.Title.displayName\r\n\r\nconst ToastDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastDescription.displayName = ToastPrimitives.Description.displayName\r\n\r\ntype ToastProps = React.ComponentPropsWithoutRef\r\n\r\ntype ToastActionElement = React.ReactElement\r\n\r\nexport {\r\n type ToastProps,\r\n type ToastActionElement,\r\n ToastProvider,\r\n ToastViewport,\r\n Toast,\r\n ToastTitle,\r\n ToastDescription,\r\n ToastClose,\r\n ToastAction,\r\n}\r\n" }, { "name": "use-toast.ts", - "content": "// Inspired by react-hot-toast library\nimport * as React from \"react\"\n\nimport type {\n ToastActionElement,\n ToastProps,\n} from \"@/registry/default/ui/toast\"\n\nconst TOAST_LIMIT = 1\nconst TOAST_REMOVE_DELAY = 1000000\n\ntype ToasterToast = ToastProps & {\n id: string\n title?: React.ReactNode\n description?: React.ReactNode\n action?: ToastActionElement\n}\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const\n\nlet count = 0\n\nfunction genId() {\n count = (count + 1) % Number.MAX_VALUE\n return count.toString()\n}\n\ntype ActionType = typeof actionTypes\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"]\n toast: ToasterToast\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"]\n toast: Partial\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n\ninterface State {\n toasts: ToasterToast[]\n}\n\nconst toastTimeouts = new Map>()\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n })\n }, TOAST_REMOVE_DELAY)\n\n toastTimeouts.set(toastId, timeout)\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n }\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n }\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId)\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id)\n })\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t\n ),\n }\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n }\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n }\n }\n}\n\nconst listeners: Array<(state: State) => void> = []\n\nlet memoryState: State = { toasts: [] }\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((listener) => {\n listener(memoryState)\n })\n}\n\ntype Toast = Omit\n\nfunction toast({ ...props }: Toast) {\n const id = genId()\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss()\n },\n },\n })\n\n return {\n id: id,\n dismiss,\n update,\n }\n}\n\nfunction useToast() {\n const [state, setState] = React.useState(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) {\n listeners.splice(index, 1)\n }\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n }\n}\n\nexport { useToast, toast }\n" + "content": "// Inspired by react-hot-toast library\r\nimport * as React from \"react\"\r\n\r\nimport type {\r\n ToastActionElement,\r\n ToastProps,\r\n} from \"@/registry/default/ui/toast\"\r\n\r\nconst TOAST_LIMIT = 1\r\nconst TOAST_REMOVE_DELAY = 1000000\r\n\r\ntype ToasterToast = ToastProps & {\r\n id: string\r\n title?: React.ReactNode\r\n description?: React.ReactNode\r\n action?: ToastActionElement\r\n}\r\n\r\nconst actionTypes = {\r\n ADD_TOAST: \"ADD_TOAST\",\r\n UPDATE_TOAST: \"UPDATE_TOAST\",\r\n DISMISS_TOAST: \"DISMISS_TOAST\",\r\n REMOVE_TOAST: \"REMOVE_TOAST\",\r\n} as const\r\n\r\nlet count = 0\r\n\r\nfunction genId() {\r\n count = (count + 1) % Number.MAX_VALUE\r\n return count.toString()\r\n}\r\n\r\ntype ActionType = typeof actionTypes\r\n\r\ntype Action =\r\n | {\r\n type: ActionType[\"ADD_TOAST\"]\r\n toast: ToasterToast\r\n }\r\n | {\r\n type: ActionType[\"UPDATE_TOAST\"]\r\n toast: Partial\r\n }\r\n | {\r\n type: ActionType[\"DISMISS_TOAST\"]\r\n toastId?: ToasterToast[\"id\"]\r\n }\r\n | {\r\n type: ActionType[\"REMOVE_TOAST\"]\r\n toastId?: ToasterToast[\"id\"]\r\n }\r\n\r\ninterface State {\r\n toasts: ToasterToast[]\r\n}\r\n\r\nconst toastTimeouts = new Map>()\r\n\r\nconst addToRemoveQueue = (toastId: string) => {\r\n if (toastTimeouts.has(toastId)) {\r\n return\r\n }\r\n\r\n const timeout = setTimeout(() => {\r\n toastTimeouts.delete(toastId)\r\n dispatch({\r\n type: \"REMOVE_TOAST\",\r\n toastId: toastId,\r\n })\r\n }, TOAST_REMOVE_DELAY)\r\n\r\n toastTimeouts.set(toastId, timeout)\r\n}\r\n\r\nexport const reducer = (state: State, action: Action): State => {\r\n switch (action.type) {\r\n case \"ADD_TOAST\":\r\n return {\r\n ...state,\r\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\r\n }\r\n\r\n case \"UPDATE_TOAST\":\r\n return {\r\n ...state,\r\n toasts: state.toasts.map((t) =>\r\n t.id === action.toast.id ? { ...t, ...action.toast } : t\r\n ),\r\n }\r\n\r\n case \"DISMISS_TOAST\": {\r\n const { toastId } = action\r\n\r\n // ! Side effects ! - This could be extracted into a dismissToast() action,\r\n // but I'll keep it here for simplicity\r\n if (toastId) {\r\n addToRemoveQueue(toastId)\r\n } else {\r\n state.toasts.forEach((toast) => {\r\n addToRemoveQueue(toast.id)\r\n })\r\n }\r\n\r\n return {\r\n ...state,\r\n toasts: state.toasts.map((t) =>\r\n t.id === toastId || toastId === undefined\r\n ? {\r\n ...t,\r\n open: false,\r\n }\r\n : t\r\n ),\r\n }\r\n }\r\n case \"REMOVE_TOAST\":\r\n if (action.toastId === undefined) {\r\n return {\r\n ...state,\r\n toasts: [],\r\n }\r\n }\r\n return {\r\n ...state,\r\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\r\n }\r\n }\r\n}\r\n\r\nconst listeners: Array<(state: State) => void> = []\r\n\r\nlet memoryState: State = { toasts: [] }\r\n\r\nfunction dispatch(action: Action) {\r\n memoryState = reducer(memoryState, action)\r\n listeners.forEach((listener) => {\r\n listener(memoryState)\r\n })\r\n}\r\n\r\ntype Toast = Omit\r\n\r\nfunction toast({ ...props }: Toast) {\r\n const id = genId()\r\n\r\n const update = (props: ToasterToast) =>\r\n dispatch({\r\n type: \"UPDATE_TOAST\",\r\n toast: { ...props, id },\r\n })\r\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\r\n\r\n dispatch({\r\n type: \"ADD_TOAST\",\r\n toast: {\r\n ...props,\r\n id,\r\n open: true,\r\n onOpenChange: (open) => {\r\n if (!open) dismiss()\r\n },\r\n },\r\n })\r\n\r\n return {\r\n id: id,\r\n dismiss,\r\n update,\r\n }\r\n}\r\n\r\nfunction useToast() {\r\n const [state, setState] = React.useState(memoryState)\r\n\r\n React.useEffect(() => {\r\n listeners.push(setState)\r\n return () => {\r\n const index = listeners.indexOf(setState)\r\n if (index > -1) {\r\n listeners.splice(index, 1)\r\n }\r\n }\r\n }, [state])\r\n\r\n return {\r\n ...state,\r\n toast,\r\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\r\n }\r\n}\r\n\r\nexport { useToast, toast }\r\n" }, { "name": "toaster.tsx", - "content": "\"use client\"\n\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"@/registry/default/ui/toast\"\nimport { useToast } from \"@/registry/default/ui/use-toast\"\n\nexport function Toaster() {\n const { toasts } = useToast()\n\n return (\n \n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n \n
\n {title && {title}}\n {description && (\n {description}\n )}\n
\n {action}\n \n
\n )\n })}\n \n
\n )\n}\n" + "content": "\"use client\"\r\n\r\nimport {\r\n Toast,\r\n ToastClose,\r\n ToastDescription,\r\n ToastProvider,\r\n ToastTitle,\r\n ToastViewport,\r\n} from \"@/registry/default/ui/toast\"\r\nimport { useToast } from \"@/registry/default/ui/use-toast\"\r\n\r\nexport function Toaster() {\r\n const { toasts } = useToast()\r\n\r\n return (\r\n \r\n {toasts.map(function ({ id, title, description, action, ...props }) {\r\n return (\r\n \r\n
\r\n {title && {title}}\r\n {description && (\r\n {description}\r\n )}\r\n
\r\n {action}\r\n \r\n
\r\n )\r\n })}\r\n \r\n
\r\n )\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/toggle-group.json b/apps/www/public/registry/styles/default/toggle-group.json index e95459e3ba0..b0c726f7d27 100644 --- a/apps/www/public/registry/styles/default/toggle-group.json +++ b/apps/www/public/registry/styles/default/toggle-group.json @@ -9,7 +9,7 @@ "files": [ { "name": "toggle-group.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\nimport { VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { toggleVariants } from \"@/registry/default/ui/toggle\"\n\nconst ToggleGroupContext = React.createContext<\n VariantProps\n>({\n size: \"default\",\n variant: \"default\",\n})\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, size, children, ...props }, ref) => (\n \n \n {children}\n \n \n))\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext)\n\n return (\n \n {children}\n \n )\n})\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName\n\nexport { ToggleGroup, ToggleGroupItem }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\r\nimport { VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { toggleVariants } from \"@/registry/default/ui/toggle\"\r\n\r\nconst ToggleGroupContext = React.createContext<\r\n VariantProps\r\n>({\r\n size: \"default\",\r\n variant: \"default\",\r\n})\r\n\r\nconst ToggleGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, size, children, ...props }, ref) => (\r\n \r\n \r\n {children}\r\n \r\n \r\n))\r\n\r\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName\r\n\r\nconst ToggleGroupItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, children, variant, size, ...props }, ref) => {\r\n const context = React.useContext(ToggleGroupContext)\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n})\r\n\r\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName\r\n\r\nexport { ToggleGroup, ToggleGroupItem }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/toggle.json b/apps/www/public/registry/styles/default/toggle.json index 3bb19f632e5..8cfa9540dde 100644 --- a/apps/www/public/registry/styles/default/toggle.json +++ b/apps/www/public/registry/styles/default/toggle.json @@ -6,7 +6,7 @@ "files": [ { "name": "toggle.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground\",\n },\n size: {\n default: \"h-10 px-3\",\n sm: \"h-9 px-2.5\",\n lg: \"h-11 px-5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst Toggle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, size, ...props }, ref) => (\n \n))\n\nToggle.displayName = TogglePrimitive.Root.displayName\n\nexport { Toggle, toggleVariants }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst toggleVariants = cva(\r\n \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-transparent\",\r\n outline:\r\n \"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground\",\r\n },\r\n size: {\r\n default: \"h-10 px-3\",\r\n sm: \"h-9 px-2.5\",\r\n lg: \"h-11 px-5\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n size: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Toggle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, size, ...props }, ref) => (\r\n \r\n))\r\n\r\nToggle.displayName = TogglePrimitive.Root.displayName\r\n\r\nexport { Toggle, toggleVariants }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/default/tooltip.json b/apps/www/public/registry/styles/default/tooltip.json index 6d5046ca5db..291f49374e9 100644 --- a/apps/www/public/registry/styles/default/tooltip.json +++ b/apps/www/public/registry/styles/default/tooltip.json @@ -6,7 +6,7 @@ "files": [ { "name": "tooltip.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, sideOffset = 4, ...props }, ref) => (\n \n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst TooltipProvider = TooltipPrimitive.Provider\r\n\r\nconst Tooltip = TooltipPrimitive.Root\r\n\r\nconst TooltipTrigger = TooltipPrimitive.Trigger\r\n\r\nconst TooltipContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, sideOffset = 4, ...props }, ref) => (\r\n \r\n))\r\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\r\n\r\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/index.json b/apps/www/public/registry/styles/index.json index bbefdacf4f3..bf2b6a0a97e 100644 --- a/apps/www/public/registry/styles/index.json +++ b/apps/www/public/registry/styles/index.json @@ -6,5 +6,9 @@ { "name": "new-york", "label": "New York" + }, + { + "name": "material", + "label": "Material" } ] \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/accordion.json b/apps/www/public/registry/styles/material/accordion.json new file mode 100644 index 00000000000..a3c8e6ee5d6 --- /dev/null +++ b/apps/www/public/registry/styles/material/accordion.json @@ -0,0 +1,13 @@ +{ + "name": "accordion", + "dependencies": [ + "@radix-ui/react-accordion" + ], + "files": [ + { + "name": "accordion.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\r\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Accordion = AccordionPrimitive.Root\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAccordionItem.displayName = \"AccordionItem\"\r\n\r\nconst AccordionTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n svg]:rotate-180\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n \r\n \r\n \r\n))\r\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\r\n\r\nconst AccordionContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n
{children}
\r\n \r\n))\r\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\r\n\r\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/alert-dialog.json b/apps/www/public/registry/styles/material/alert-dialog.json new file mode 100644 index 00000000000..bf27e4d938a --- /dev/null +++ b/apps/www/public/registry/styles/material/alert-dialog.json @@ -0,0 +1,16 @@ +{ + "name": "alert-dialog", + "dependencies": [ + "@radix-ui/react-alert-dialog" + ], + "registryDependencies": [ + "button" + ], + "files": [ + { + "name": "alert-dialog.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { buttonVariants } from \"@/registry/new-york/ui/button\"\r\n\r\nconst AlertDialog = AlertDialogPrimitive.Root\r\n\r\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\r\n\r\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\r\n\r\nconst AlertDialogOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\r\n\r\nconst AlertDialogContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n))\r\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\r\n\r\nconst AlertDialogHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nAlertDialogHeader.displayName = \"AlertDialogHeader\"\r\n\r\nconst AlertDialogFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nAlertDialogFooter.displayName = \"AlertDialogFooter\"\r\n\r\nconst AlertDialogTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\r\n\r\nconst AlertDialogDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogDescription.displayName =\r\n AlertDialogPrimitive.Description.displayName\r\n\r\nconst AlertDialogAction = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\r\n\r\nconst AlertDialogCancel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\r\n\r\nexport {\r\n AlertDialog,\r\n AlertDialogPortal,\r\n AlertDialogOverlay,\r\n AlertDialogTrigger,\r\n AlertDialogContent,\r\n AlertDialogHeader,\r\n AlertDialogFooter,\r\n AlertDialogTitle,\r\n AlertDialogDescription,\r\n AlertDialogAction,\r\n AlertDialogCancel,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/alert.json b/apps/www/public/registry/styles/material/alert.json new file mode 100644 index 00000000000..b2614d0e9ae --- /dev/null +++ b/apps/www/public/registry/styles/material/alert.json @@ -0,0 +1,10 @@ +{ + "name": "alert", + "files": [ + { + "name": "alert.tsx", + "content": "import * as React from \"react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst alertVariants = cva(\r\n \"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-background text-foreground\",\r\n destructive:\r\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Alert = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes & VariantProps\r\n>(({ className, variant, ...props }, ref) => (\r\n \r\n))\r\nAlert.displayName = \"Alert\"\r\n\r\nconst AlertTitle = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertTitle.displayName = \"AlertTitle\"\r\n\r\nconst AlertDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDescription.displayName = \"AlertDescription\"\r\n\r\nexport { Alert, AlertTitle, AlertDescription }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/aspect-ratio.json b/apps/www/public/registry/styles/material/aspect-ratio.json new file mode 100644 index 00000000000..82186770131 --- /dev/null +++ b/apps/www/public/registry/styles/material/aspect-ratio.json @@ -0,0 +1,13 @@ +{ + "name": "aspect-ratio", + "dependencies": [ + "@radix-ui/react-aspect-ratio" + ], + "files": [ + { + "name": "aspect-ratio.tsx", + "content": "\"use client\"\r\n\r\nimport * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\"\r\n\r\nconst AspectRatio = AspectRatioPrimitive.Root\r\n\r\nexport { AspectRatio }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/avatar.json b/apps/www/public/registry/styles/material/avatar.json new file mode 100644 index 00000000000..82aba087492 --- /dev/null +++ b/apps/www/public/registry/styles/material/avatar.json @@ -0,0 +1,13 @@ +{ + "name": "avatar", + "dependencies": [ + "@radix-ui/react-avatar" + ], + "files": [ + { + "name": "avatar.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Avatar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatar.displayName = AvatarPrimitive.Root.displayName\r\n\r\nconst AvatarImage = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\r\n\r\nconst AvatarFallback = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\r\n\r\nexport { Avatar, AvatarImage, AvatarFallback }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/badge.json b/apps/www/public/registry/styles/material/badge.json new file mode 100644 index 00000000000..1e51300af49 --- /dev/null +++ b/apps/www/public/registry/styles/material/badge.json @@ -0,0 +1,10 @@ +{ + "name": "badge", + "files": [ + { + "name": "badge.tsx", + "content": "import * as React from \"react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst badgeVariants = cva(\r\n \"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\r\n {\r\n variants: {\r\n variant: {\r\n default:\r\n \"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80\",\r\n secondary:\r\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\r\n destructive:\r\n \"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80\",\r\n outline: \"text-foreground\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nexport interface BadgeProps\r\n extends React.HTMLAttributes,\r\n VariantProps {}\r\n\r\nfunction Badge({ className, variant, ...props }: BadgeProps) {\r\n return (\r\n
\r\n )\r\n}\r\n\r\nexport { Badge, badgeVariants }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/button.json b/apps/www/public/registry/styles/material/button.json new file mode 100644 index 00000000000..0710f3cf9a7 --- /dev/null +++ b/apps/www/public/registry/styles/material/button.json @@ -0,0 +1,13 @@ +{ + "name": "button", + "dependencies": [ + "@radix-ui/react-slot" + ], + "files": [ + { + "name": "button.tsx", + "content": "import * as React from \"react\"\r\nimport { Slot } from \"@radix-ui/react-slot\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst buttonVariants = cva(\r\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\r\n {\r\n variants: {\r\n variant: {\r\n default:\r\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\r\n destructive:\r\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\r\n outline:\r\n \"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\r\n secondary:\r\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\r\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\r\n link: \"text-primary underline-offset-4 hover:underline\",\r\n },\r\n size: {\r\n default: \"h-9 px-4 py-2\",\r\n sm: \"h-8 rounded-md px-3 text-xs\",\r\n lg: \"h-10 rounded-md px-8\",\r\n icon: \"h-9 w-9\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n size: \"default\",\r\n },\r\n }\r\n)\r\n\r\nexport interface ButtonProps\r\n extends React.ButtonHTMLAttributes,\r\n VariantProps {\r\n asChild?: boolean\r\n}\r\n\r\nconst Button = React.forwardRef(\r\n ({ className, variant, size, asChild = false, ...props }, ref) => {\r\n const Comp = asChild ? Slot : \"button\"\r\n return (\r\n \r\n )\r\n }\r\n)\r\nButton.displayName = \"Button\"\r\n\r\nexport { Button, buttonVariants }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/calendar.json b/apps/www/public/registry/styles/material/calendar.json new file mode 100644 index 00000000000..b7409bf66d0 --- /dev/null +++ b/apps/www/public/registry/styles/material/calendar.json @@ -0,0 +1,17 @@ +{ + "name": "calendar", + "dependencies": [ + "react-day-picker", + "date-fns" + ], + "registryDependencies": [ + "button" + ], + "files": [ + { + "name": "calendar.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@radix-ui/react-icons\"\r\nimport { DayPicker } from \"react-day-picker\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { buttonVariants } from \"@/registry/default/ui/button\"\r\n\r\nexport type CalendarProps = React.ComponentProps\r\n\r\nfunction Calendar({\r\n className,\r\n classNames,\r\n showOutsideDays = true,\r\n ...props\r\n}: CalendarProps) {\r\n return (\r\n .day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\r\n : \"[&:has([aria-selected])]:rounded-md\"\r\n ),\r\n day: cn(\r\n buttonVariants({ variant: \"ghost\" }),\r\n \"h-8 w-8 p-0 font-normal aria-selected:opacity-100\"\r\n ),\r\n day_range_start: \"day-range-start\",\r\n day_range_end: \"day-range-end\",\r\n day_selected:\r\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\r\n day_today: \"bg-accent text-accent-foreground\",\r\n day_outside:\r\n \"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30\",\r\n day_disabled: \"text-muted-foreground opacity-50\",\r\n day_range_middle:\r\n \"aria-selected:bg-accent aria-selected:text-accent-foreground\",\r\n day_hidden: \"invisible\",\r\n ...classNames,\r\n }}\r\n components={{\r\n IconLeft: ({ ...props }) => ,\r\n IconRight: ({ ...props }) => ,\r\n }}\r\n {...props}\r\n />\r\n )\r\n}\r\nCalendar.displayName = \"Calendar\"\r\n\r\nexport { Calendar }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/card.json b/apps/www/public/registry/styles/material/card.json new file mode 100644 index 00000000000..43a58133ebd --- /dev/null +++ b/apps/www/public/registry/styles/material/card.json @@ -0,0 +1,10 @@ +{ + "name": "card", + "files": [ + { + "name": "card.tsx", + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Card = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCard.displayName = \"Card\"\r\n\r\nconst CardHeader = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardHeader.displayName = \"CardHeader\"\r\n\r\nconst CardTitle = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardTitle.displayName = \"CardTitle\"\r\n\r\nconst CardDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardDescription.displayName = \"CardDescription\"\r\n\r\nconst CardContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n
\r\n))\r\nCardContent.displayName = \"CardContent\"\r\n\r\nconst CardFooter = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardFooter.displayName = \"CardFooter\"\r\n\r\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/checkbox.json b/apps/www/public/registry/styles/material/checkbox.json new file mode 100644 index 00000000000..97c1850c10d --- /dev/null +++ b/apps/www/public/registry/styles/material/checkbox.json @@ -0,0 +1,13 @@ +{ + "name": "checkbox", + "dependencies": [ + "@radix-ui/react-checkbox" + ], + "files": [ + { + "name": "checkbox.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\r\nimport { CheckIcon } from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n))\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\r\n\r\nexport { Checkbox }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/collapsible.json b/apps/www/public/registry/styles/material/collapsible.json new file mode 100644 index 00000000000..d6d08fe2b80 --- /dev/null +++ b/apps/www/public/registry/styles/material/collapsible.json @@ -0,0 +1,13 @@ +{ + "name": "collapsible", + "dependencies": [ + "@radix-ui/react-collapsible" + ], + "files": [ + { + "name": "collapsible.tsx", + "content": "\"use client\"\r\n\r\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\"\r\n\r\nconst Collapsible = CollapsiblePrimitive.Root\r\n\r\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger\r\n\r\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent\r\n\r\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/command.json b/apps/www/public/registry/styles/material/command.json new file mode 100644 index 00000000000..0486453cf88 --- /dev/null +++ b/apps/www/public/registry/styles/material/command.json @@ -0,0 +1,16 @@ +{ + "name": "command", + "dependencies": [ + "cmdk" + ], + "registryDependencies": [ + "dialog" + ], + "files": [ + { + "name": "command.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\r\nimport { MagnifyingGlassIcon } from \"@radix-ui/react-icons\"\r\nimport { Command as CommandPrimitive } from \"cmdk\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { Dialog, DialogContent } from \"@/registry/new-york/ui/dialog\"\r\n\r\nconst Command = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCommand.displayName = CommandPrimitive.displayName\r\n\r\ninterface CommandDialogProps extends DialogProps {}\r\n\r\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\r\n return (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n \r\n
\r\n))\r\n\r\nCommandInput.displayName = CommandPrimitive.Input.displayName\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandList.displayName = CommandPrimitive.List.displayName\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>((props, ref) => (\r\n \r\n))\r\n\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandItem.displayName = CommandPrimitive.Item.displayName\r\n\r\nconst CommandShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nCommandShortcut.displayName = \"CommandShortcut\"\r\n\r\nexport {\r\n Command,\r\n CommandDialog,\r\n CommandInput,\r\n CommandList,\r\n CommandEmpty,\r\n CommandGroup,\r\n CommandItem,\r\n CommandShortcut,\r\n CommandSeparator,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/context-menu.json b/apps/www/public/registry/styles/material/context-menu.json new file mode 100644 index 00000000000..ca29cca9b87 --- /dev/null +++ b/apps/www/public/registry/styles/material/context-menu.json @@ -0,0 +1,13 @@ +{ + "name": "context-menu", + "dependencies": [ + "@radix-ui/react-context-menu" + ], + "files": [ + { + "name": "context-menu.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\"\r\nimport {\r\n CheckIcon,\r\n ChevronRightIcon,\r\n DotFilledIcon,\r\n} from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nContextMenuCheckboxItem.displayName =\r\n ContextMenuPrimitive.CheckboxItem.displayName\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName\r\n\r\nconst ContextMenuShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\"\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuTrigger,\r\n ContextMenuContent,\r\n ContextMenuItem,\r\n ContextMenuCheckboxItem,\r\n ContextMenuRadioItem,\r\n ContextMenuLabel,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuGroup,\r\n ContextMenuPortal,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuRadioGroup,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/dialog.json b/apps/www/public/registry/styles/material/dialog.json new file mode 100644 index 00000000000..7f433cace2b --- /dev/null +++ b/apps/www/public/registry/styles/material/dialog.json @@ -0,0 +1,13 @@ +{ + "name": "dialog", + "dependencies": [ + "@radix-ui/react-dialog" + ], + "files": [ + { + "name": "dialog.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\r\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Dialog = DialogPrimitive.Root\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger\r\n\r\nconst DialogPortal = DialogPrimitive.Portal\r\n\r\nconst DialogClose = DialogPrimitive.Close\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n Close\r\n \r\n \r\n \r\n))\r\nDialogContent.displayName = DialogPrimitive.Content.displayName\r\n\r\nconst DialogHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nDialogHeader.displayName = \"DialogHeader\"\r\n\r\nconst DialogFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nDialogFooter.displayName = \"DialogFooter\"\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName\r\n\r\nexport {\r\n Dialog,\r\n DialogPortal,\r\n DialogOverlay,\r\n DialogTrigger,\r\n DialogClose,\r\n DialogContent,\r\n DialogHeader,\r\n DialogFooter,\r\n DialogTitle,\r\n DialogDescription,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/dropdown-menu.json b/apps/www/public/registry/styles/material/dropdown-menu.json new file mode 100644 index 00000000000..c761edcfc60 --- /dev/null +++ b/apps/www/public/registry/styles/material/dropdown-menu.json @@ -0,0 +1,13 @@ +{ + "name": "dropdown-menu", + "dependencies": [ + "@radix-ui/react-dropdown-menu" + ], + "files": [ + { + "name": "dropdown-menu.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\r\nimport {\r\n CheckIcon,\r\n ChevronRightIcon,\r\n DotFilledIcon,\r\n} from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst DropdownMenu = DropdownMenuPrimitive.Root\r\n\r\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\r\n\r\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\r\n\r\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\r\n\r\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\r\n\r\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\r\n\r\nconst DropdownMenuSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nDropdownMenuSubTrigger.displayName =\r\n DropdownMenuPrimitive.SubTrigger.displayName\r\n\r\nconst DropdownMenuSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuSubContent.displayName =\r\n DropdownMenuPrimitive.SubContent.displayName\r\n\r\nconst DropdownMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, sideOffset = 4, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\r\n\r\nconst DropdownMenuItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\r\n\r\nconst DropdownMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nDropdownMenuCheckboxItem.displayName =\r\n DropdownMenuPrimitive.CheckboxItem.displayName\r\n\r\nconst DropdownMenuRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\r\n\r\nconst DropdownMenuLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\r\n\r\nconst DropdownMenuSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\r\n\r\nconst DropdownMenuShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\r\n\r\nexport {\r\n DropdownMenu,\r\n DropdownMenuTrigger,\r\n DropdownMenuContent,\r\n DropdownMenuItem,\r\n DropdownMenuCheckboxItem,\r\n DropdownMenuRadioItem,\r\n DropdownMenuLabel,\r\n DropdownMenuSeparator,\r\n DropdownMenuShortcut,\r\n DropdownMenuGroup,\r\n DropdownMenuPortal,\r\n DropdownMenuSub,\r\n DropdownMenuSubContent,\r\n DropdownMenuSubTrigger,\r\n DropdownMenuRadioGroup,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/form.json b/apps/www/public/registry/styles/material/form.json new file mode 100644 index 00000000000..787b7758980 --- /dev/null +++ b/apps/www/public/registry/styles/material/form.json @@ -0,0 +1,21 @@ +{ + "name": "form", + "dependencies": [ + "@radix-ui/react-label", + "@radix-ui/react-slot", + "@hookform/resolvers", + "zod", + "react-hook-form" + ], + "registryDependencies": [ + "button", + "label" + ], + "files": [ + { + "name": "form.tsx", + "content": "import * as React from \"react\"\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\r\nimport { Slot } from \"@radix-ui/react-slot\"\r\nimport {\r\n Controller,\r\n ControllerProps,\r\n FieldPath,\r\n FieldValues,\r\n FormProvider,\r\n useFormContext,\r\n} from \"react-hook-form\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { Label } from \"@/registry/new-york/ui/label\"\r\n\r\nconst Form = FormProvider\r\n\r\ntype FormFieldContextValue<\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath = FieldPath\r\n> = {\r\n name: TName\r\n}\r\n\r\nconst FormFieldContext = React.createContext(\r\n {} as FormFieldContextValue\r\n)\r\n\r\nconst FormField = <\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath = FieldPath\r\n>({\r\n ...props\r\n}: ControllerProps) => {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nconst useFormField = () => {\r\n const fieldContext = React.useContext(FormFieldContext)\r\n const itemContext = React.useContext(FormItemContext)\r\n const { getFieldState, formState } = useFormContext()\r\n\r\n const fieldState = getFieldState(fieldContext.name, formState)\r\n\r\n if (!fieldContext) {\r\n throw new Error(\"useFormField should be used within \")\r\n }\r\n\r\n const { id } = itemContext\r\n\r\n return {\r\n id,\r\n name: fieldContext.name,\r\n formItemId: `${id}-form-item`,\r\n formDescriptionId: `${id}-form-item-description`,\r\n formMessageId: `${id}-form-item-message`,\r\n ...fieldState,\r\n }\r\n}\r\n\r\ntype FormItemContextValue = {\r\n id: string\r\n}\r\n\r\nconst FormItemContext = React.createContext(\r\n {} as FormItemContextValue\r\n)\r\n\r\nconst FormItem = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => {\r\n const id = React.useId()\r\n\r\n return (\r\n \r\n
\r\n \r\n )\r\n})\r\nFormItem.displayName = \"FormItem\"\r\n\r\nconst FormLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n const { error, formItemId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormLabel.displayName = \"FormLabel\"\r\n\r\nconst FormControl = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ ...props }, ref) => {\r\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormControl.displayName = \"FormControl\"\r\n\r\nconst FormDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => {\r\n const { formDescriptionId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormDescription.displayName = \"FormDescription\"\r\n\r\nconst FormMessage = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, children, ...props }, ref) => {\r\n const { error, formMessageId } = useFormField()\r\n const body = error ? String(error?.message) : children\r\n\r\n if (!body) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {body}\r\n

\r\n )\r\n})\r\nFormMessage.displayName = \"FormMessage\"\r\n\r\nexport {\r\n useFormField,\r\n Form,\r\n FormItem,\r\n FormLabel,\r\n FormControl,\r\n FormDescription,\r\n FormMessage,\r\n FormField,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/hover-card.json b/apps/www/public/registry/styles/material/hover-card.json new file mode 100644 index 00000000000..44fae0a628f --- /dev/null +++ b/apps/www/public/registry/styles/material/hover-card.json @@ -0,0 +1,13 @@ +{ + "name": "hover-card", + "dependencies": [ + "@radix-ui/react-hover-card" + ], + "files": [ + { + "name": "hover-card.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst HoverCard = HoverCardPrimitive.Root\r\n\r\nconst HoverCardTrigger = HoverCardPrimitive.Trigger\r\n\r\nconst HoverCardContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\r\n \r\n))\r\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName\r\n\r\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/input.json b/apps/www/public/registry/styles/material/input.json new file mode 100644 index 00000000000..95e6cb873ec --- /dev/null +++ b/apps/www/public/registry/styles/material/input.json @@ -0,0 +1,10 @@ +{ + "name": "input", + "files": [ + { + "name": "input.tsx", + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nexport interface InputProps\r\n extends React.InputHTMLAttributes {}\r\n\r\nconst Input = React.forwardRef(\r\n ({ className, type, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n }\r\n)\r\nInput.displayName = \"Input\"\r\n\r\nexport { Input }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/label.json b/apps/www/public/registry/styles/material/label.json new file mode 100644 index 00000000000..12caba3beaa --- /dev/null +++ b/apps/www/public/registry/styles/material/label.json @@ -0,0 +1,13 @@ +{ + "name": "label", + "dependencies": [ + "@radix-ui/react-label" + ], + "files": [ + { + "name": "label.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst labelVariants = cva(\r\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\r\n)\r\n\r\nconst Label = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nLabel.displayName = LabelPrimitive.Root.displayName\r\n\r\nexport { Label }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/menubar.json b/apps/www/public/registry/styles/material/menubar.json new file mode 100644 index 00000000000..4c2ee6afdfb --- /dev/null +++ b/apps/www/public/registry/styles/material/menubar.json @@ -0,0 +1,13 @@ +{ + "name": "menubar", + "dependencies": [ + "@radix-ui/react-menubar" + ], + "files": [ + { + "name": "menubar.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport {\r\n CheckIcon,\r\n ChevronRightIcon,\r\n DotFilledIcon,\r\n} from \"@radix-ui/react-icons\"\r\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst MenubarMenu = MenubarPrimitive.Menu\r\n\r\nconst MenubarGroup = MenubarPrimitive.Group\r\n\r\nconst MenubarPortal = MenubarPrimitive.Portal\r\n\r\nconst MenubarSub = MenubarPrimitive.Sub\r\n\r\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup\r\n\r\nconst Menubar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubar.displayName = MenubarPrimitive.Root.displayName\r\n\r\nconst MenubarTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\r\n\r\nconst MenubarSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\r\n\r\nconst MenubarSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\r\n\r\nconst MenubarContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(\r\n (\r\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\r\n ref\r\n ) => (\r\n \r\n \r\n \r\n )\r\n)\r\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\r\n\r\nconst MenubarItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\r\n\r\nconst MenubarCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\r\n\r\nconst MenubarRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\r\n\r\nconst MenubarLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\r\n\r\nconst MenubarSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\r\n\r\nconst MenubarShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nMenubarShortcut.displayname = \"MenubarShortcut\"\r\n\r\nexport {\r\n Menubar,\r\n MenubarMenu,\r\n MenubarTrigger,\r\n MenubarContent,\r\n MenubarItem,\r\n MenubarSeparator,\r\n MenubarLabel,\r\n MenubarCheckboxItem,\r\n MenubarRadioGroup,\r\n MenubarRadioItem,\r\n MenubarPortal,\r\n MenubarSubContent,\r\n MenubarSubTrigger,\r\n MenubarGroup,\r\n MenubarSub,\r\n MenubarShortcut,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/navigation-menu.json b/apps/www/public/registry/styles/material/navigation-menu.json new file mode 100644 index 00000000000..73cc263080e --- /dev/null +++ b/apps/www/public/registry/styles/material/navigation-menu.json @@ -0,0 +1,13 @@ +{ + "name": "navigation-menu", + "dependencies": [ + "@radix-ui/react-navigation-menu" + ], + "files": [ + { + "name": "navigation-menu.tsx", + "content": "import * as React from \"react\"\r\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\r\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\r\nimport { cva } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst NavigationMenu = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\r\n\r\nconst NavigationMenuList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\r\n\r\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\r\n\r\nconst navigationMenuTriggerStyle = cva(\r\n \"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\r\n)\r\n\r\nconst NavigationMenuTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n {children}{\" \"}\r\n \r\n \r\n))\r\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\r\n\r\nconst NavigationMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\r\n\r\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\r\n\r\nconst NavigationMenuViewport = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n
\r\n))\r\nNavigationMenuViewport.displayName =\r\n NavigationMenuPrimitive.Viewport.displayName\r\n\r\nconst NavigationMenuIndicator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n
\r\n \r\n))\r\nNavigationMenuIndicator.displayName =\r\n NavigationMenuPrimitive.Indicator.displayName\r\n\r\nexport {\r\n navigationMenuTriggerStyle,\r\n NavigationMenu,\r\n NavigationMenuList,\r\n NavigationMenuItem,\r\n NavigationMenuContent,\r\n NavigationMenuTrigger,\r\n NavigationMenuLink,\r\n NavigationMenuIndicator,\r\n NavigationMenuViewport,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/popover.json b/apps/www/public/registry/styles/material/popover.json new file mode 100644 index 00000000000..156f0e4f795 --- /dev/null +++ b/apps/www/public/registry/styles/material/popover.json @@ -0,0 +1,13 @@ +{ + "name": "popover", + "dependencies": [ + "@radix-ui/react-popover" + ], + "files": [ + { + "name": "popover.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Popover = PopoverPrimitive.Root\r\n\r\nconst PopoverTrigger = PopoverPrimitive.Trigger\r\n\r\nconst PopoverContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\r\n\r\nexport { Popover, PopoverTrigger, PopoverContent }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/progress.json b/apps/www/public/registry/styles/material/progress.json new file mode 100644 index 00000000000..e34156f6e40 --- /dev/null +++ b/apps/www/public/registry/styles/material/progress.json @@ -0,0 +1,13 @@ +{ + "name": "progress", + "dependencies": [ + "@radix-ui/react-progress" + ], + "files": [ + { + "name": "progress.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Progress = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, value, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nProgress.displayName = ProgressPrimitive.Root.displayName\r\n\r\nexport { Progress }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/radio-group.json b/apps/www/public/registry/styles/material/radio-group.json new file mode 100644 index 00000000000..0432107f268 --- /dev/null +++ b/apps/www/public/registry/styles/material/radio-group.json @@ -0,0 +1,13 @@ +{ + "name": "radio-group", + "dependencies": [ + "@radix-ui/react-radio-group" + ], + "files": [ + { + "name": "radio-group.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { CheckIcon } from \"@radix-ui/react-icons\"\r\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst RadioGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n})\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n})\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\r\n\r\nexport { RadioGroup, RadioGroupItem }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/scroll-area.json b/apps/www/public/registry/styles/material/scroll-area.json new file mode 100644 index 00000000000..4c81e637cc5 --- /dev/null +++ b/apps/www/public/registry/styles/material/scroll-area.json @@ -0,0 +1,13 @@ +{ + "name": "scroll-area", + "dependencies": [ + "@radix-ui/react-scroll-area" + ], + "files": [ + { + "name": "scroll-area.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ScrollArea = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\r\n\r\nconst ScrollBar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\r\n\r\nexport { ScrollArea, ScrollBar }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/select.json b/apps/www/public/registry/styles/material/select.json new file mode 100644 index 00000000000..3e0f7272f0f --- /dev/null +++ b/apps/www/public/registry/styles/material/select.json @@ -0,0 +1,13 @@ +{ + "name": "select", + "dependencies": [ + "@radix-ui/react-select" + ], + "files": [ + { + "name": "select.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport {\r\n CaretSortIcon,\r\n CheckIcon,\r\n ChevronDownIcon,\r\n ChevronUpIcon,\r\n} from \"@radix-ui/react-icons\"\r\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Select = SelectPrimitive.Root\r\n\r\nconst SelectGroup = SelectPrimitive.Group\r\n\r\nconst SelectValue = SelectPrimitive.Value\r\n\r\nconst SelectTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n span]:line-clamp-1\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\r\n\r\nconst SelectScrollUpButton = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\r\n\r\nconst SelectScrollDownButton = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSelectScrollDownButton.displayName =\r\n SelectPrimitive.ScrollDownButton.displayName\r\n\r\nconst SelectContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, position = \"popper\", ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nSelectContent.displayName = SelectPrimitive.Content.displayName\r\n\r\nconst SelectLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSelectLabel.displayName = SelectPrimitive.Label.displayName\r\n\r\nconst SelectItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nSelectItem.displayName = SelectPrimitive.Item.displayName\r\n\r\nconst SelectSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n SelectScrollUpButton,\r\n SelectScrollDownButton,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/separator.json b/apps/www/public/registry/styles/material/separator.json new file mode 100644 index 00000000000..0f2c7e4ff74 --- /dev/null +++ b/apps/www/public/registry/styles/material/separator.json @@ -0,0 +1,13 @@ +{ + "name": "separator", + "dependencies": [ + "@radix-ui/react-separator" + ], + "files": [ + { + "name": "separator.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(\r\n (\r\n { className, orientation = \"horizontal\", decorative = true, ...props },\r\n ref\r\n ) => (\r\n \r\n )\r\n)\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/sheet.json b/apps/www/public/registry/styles/material/sheet.json new file mode 100644 index 00000000000..d68cb71a9e3 --- /dev/null +++ b/apps/www/public/registry/styles/material/sheet.json @@ -0,0 +1,13 @@ +{ + "name": "sheet", + "dependencies": [ + "@radix-ui/react-dialog" + ], + "files": [ + { + "name": "sheet.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\r\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Sheet = SheetPrimitive.Root\r\n\r\nconst SheetTrigger = SheetPrimitive.Trigger\r\n\r\nconst SheetClose = SheetPrimitive.Close\r\n\r\nconst SheetPortal = SheetPrimitive.Portal\r\n\r\nconst SheetOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\r\n\r\nconst sheetVariants = cva(\r\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\r\n {\r\n variants: {\r\n side: {\r\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\r\n bottom:\r\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\r\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\r\n right:\r\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\r\n },\r\n },\r\n defaultVariants: {\r\n side: \"right\",\r\n },\r\n }\r\n)\r\n\r\ninterface SheetContentProps\r\n extends React.ComponentPropsWithoutRef,\r\n VariantProps {}\r\n\r\nconst SheetContent = React.forwardRef<\r\n React.ElementRef,\r\n SheetContentProps\r\n>(({ side = \"right\", className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n Close\r\n \r\n \r\n \r\n))\r\nSheetContent.displayName = SheetPrimitive.Content.displayName\r\n\r\nconst SheetHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nSheetHeader.displayName = \"SheetHeader\"\r\n\r\nconst SheetFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nSheetFooter.displayName = \"SheetFooter\"\r\n\r\nconst SheetTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetTitle.displayName = SheetPrimitive.Title.displayName\r\n\r\nconst SheetDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetDescription.displayName = SheetPrimitive.Description.displayName\r\n\r\nexport {\r\n Sheet,\r\n SheetPortal,\r\n SheetOverlay,\r\n SheetTrigger,\r\n SheetClose,\r\n SheetContent,\r\n SheetHeader,\r\n SheetFooter,\r\n SheetTitle,\r\n SheetDescription,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/skeleton.json b/apps/www/public/registry/styles/material/skeleton.json new file mode 100644 index 00000000000..e8f8e72f858 --- /dev/null +++ b/apps/www/public/registry/styles/material/skeleton.json @@ -0,0 +1,10 @@ +{ + "name": "skeleton", + "files": [ + { + "name": "skeleton.tsx", + "content": "import { cn } from \"@/lib/utils\"\r\n\r\nfunction Skeleton({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport { Skeleton }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/slider.json b/apps/www/public/registry/styles/material/slider.json new file mode 100644 index 00000000000..1af9eab56fb --- /dev/null +++ b/apps/www/public/registry/styles/material/slider.json @@ -0,0 +1,13 @@ +{ + "name": "slider", + "dependencies": [ + "@radix-ui/react-slider" + ], + "files": [ + { + "name": "slider.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SliderPrimitive from \"@radix-ui/react-slider\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Slider = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n))\r\nSlider.displayName = SliderPrimitive.Root.displayName\r\n\r\nexport { Slider }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/switch.json b/apps/www/public/registry/styles/material/switch.json new file mode 100644 index 00000000000..ea3d55232a1 --- /dev/null +++ b/apps/www/public/registry/styles/material/switch.json @@ -0,0 +1,13 @@ +{ + "name": "switch", + "dependencies": [ + "@radix-ui/react-switch" + ], + "files": [ + { + "name": "switch.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Switch = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSwitch.displayName = SwitchPrimitives.Root.displayName\r\n\r\nexport { Switch }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/table.json b/apps/www/public/registry/styles/material/table.json new file mode 100644 index 00000000000..8e17fab5267 --- /dev/null +++ b/apps/www/public/registry/styles/material/table.json @@ -0,0 +1,10 @@ +{ + "name": "table", + "files": [ + { + "name": "table.tsx", + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Table = React.forwardRef<\r\n HTMLTableElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n
\r\n))\r\nTable.displayName = \"Table\"\r\n\r\nconst TableHeader = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableHeader.displayName = \"TableHeader\"\r\n\r\nconst TableBody = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableBody.displayName = \"TableBody\"\r\n\r\nconst TableFooter = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n tr]:last:border-b-0\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nTableFooter.displayName = \"TableFooter\"\r\n\r\nconst TableRow = React.forwardRef<\r\n HTMLTableRowElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableRow.displayName = \"TableRow\"\r\n\r\nconst TableHead = React.forwardRef<\r\n HTMLTableCellElement,\r\n React.ThHTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n [role=checkbox]]:translate-y-[2px]\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nTableHead.displayName = \"TableHead\"\r\n\r\nconst TableCell = React.forwardRef<\r\n HTMLTableCellElement,\r\n React.TdHTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n [role=checkbox]]:translate-y-[2px]\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nTableCell.displayName = \"TableCell\"\r\n\r\nconst TableCaption = React.forwardRef<\r\n HTMLTableCaptionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableCaption.displayName = \"TableCaption\"\r\n\r\nexport {\r\n Table,\r\n TableHeader,\r\n TableBody,\r\n TableFooter,\r\n TableHead,\r\n TableRow,\r\n TableCell,\r\n TableCaption,\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/tabs.json b/apps/www/public/registry/styles/material/tabs.json new file mode 100644 index 00000000000..ee38b5c6a67 --- /dev/null +++ b/apps/www/public/registry/styles/material/tabs.json @@ -0,0 +1,13 @@ +{ + "name": "tabs", + "dependencies": [ + "@radix-ui/react-tabs" + ], + "files": [ + { + "name": "tabs.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Tabs = TabsPrimitive.Root\r\n\r\nconst TabsList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsList.displayName = TabsPrimitive.List.displayName\r\n\r\nconst TabsTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\r\n\r\nconst TabsContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsContent.displayName = TabsPrimitive.Content.displayName\r\n\r\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/textarea.json b/apps/www/public/registry/styles/material/textarea.json new file mode 100644 index 00000000000..c4d7e7e9572 --- /dev/null +++ b/apps/www/public/registry/styles/material/textarea.json @@ -0,0 +1,10 @@ +{ + "name": "textarea", + "files": [ + { + "name": "textarea.tsx", + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nexport interface TextareaProps\r\n extends React.TextareaHTMLAttributes {}\r\n\r\nconst Textarea = React.forwardRef(\r\n ({ className, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n }\r\n)\r\nTextarea.displayName = \"Textarea\"\r\n\r\nexport { Textarea }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/toast.json b/apps/www/public/registry/styles/material/toast.json new file mode 100644 index 00000000000..488ab163af0 --- /dev/null +++ b/apps/www/public/registry/styles/material/toast.json @@ -0,0 +1,21 @@ +{ + "name": "toast", + "dependencies": [ + "@radix-ui/react-toast" + ], + "files": [ + { + "name": "toast.tsx", + "content": "import * as React from \"react\"\r\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\r\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ToastProvider = ToastPrimitives.Provider\r\n\r\nconst ToastViewport = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\r\n\r\nconst toastVariants = cva(\r\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"border bg-background text-foreground\",\r\n destructive:\r\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Toast = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n})\r\nToast.displayName = ToastPrimitives.Root.displayName\r\n\r\nconst ToastAction = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastAction.displayName = ToastPrimitives.Action.displayName\r\n\r\nconst ToastClose = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nToastClose.displayName = ToastPrimitives.Close.displayName\r\n\r\nconst ToastTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastTitle.displayName = ToastPrimitives.Title.displayName\r\n\r\nconst ToastDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastDescription.displayName = ToastPrimitives.Description.displayName\r\n\r\ntype ToastProps = React.ComponentPropsWithoutRef\r\n\r\ntype ToastActionElement = React.ReactElement\r\n\r\nexport {\r\n type ToastProps,\r\n type ToastActionElement,\r\n ToastProvider,\r\n ToastViewport,\r\n Toast,\r\n ToastTitle,\r\n ToastDescription,\r\n ToastClose,\r\n ToastAction,\r\n}\r\n" + }, + { + "name": "use-toast.ts", + "content": "// Inspired by react-hot-toast library\r\nimport * as React from \"react\"\r\n\r\nimport type {\r\n ToastActionElement,\r\n ToastProps,\r\n} from \"@/registry/default/ui/toast\"\r\n\r\nconst TOAST_LIMIT = 1\r\nconst TOAST_REMOVE_DELAY = 1000000\r\n\r\ntype ToasterToast = ToastProps & {\r\n id: string\r\n title?: React.ReactNode\r\n description?: React.ReactNode\r\n action?: ToastActionElement\r\n}\r\n\r\nconst actionTypes = {\r\n ADD_TOAST: \"ADD_TOAST\",\r\n UPDATE_TOAST: \"UPDATE_TOAST\",\r\n DISMISS_TOAST: \"DISMISS_TOAST\",\r\n REMOVE_TOAST: \"REMOVE_TOAST\",\r\n} as const\r\n\r\nlet count = 0\r\n\r\nfunction genId() {\r\n count = (count + 1) % Number.MAX_VALUE\r\n return count.toString()\r\n}\r\n\r\ntype ActionType = typeof actionTypes\r\n\r\ntype Action =\r\n | {\r\n type: ActionType[\"ADD_TOAST\"]\r\n toast: ToasterToast\r\n }\r\n | {\r\n type: ActionType[\"UPDATE_TOAST\"]\r\n toast: Partial\r\n }\r\n | {\r\n type: ActionType[\"DISMISS_TOAST\"]\r\n toastId?: ToasterToast[\"id\"]\r\n }\r\n | {\r\n type: ActionType[\"REMOVE_TOAST\"]\r\n toastId?: ToasterToast[\"id\"]\r\n }\r\n\r\ninterface State {\r\n toasts: ToasterToast[]\r\n}\r\n\r\nconst toastTimeouts = new Map>()\r\n\r\nconst addToRemoveQueue = (toastId: string) => {\r\n if (toastTimeouts.has(toastId)) {\r\n return\r\n }\r\n\r\n const timeout = setTimeout(() => {\r\n toastTimeouts.delete(toastId)\r\n dispatch({\r\n type: \"REMOVE_TOAST\",\r\n toastId: toastId,\r\n })\r\n }, TOAST_REMOVE_DELAY)\r\n\r\n toastTimeouts.set(toastId, timeout)\r\n}\r\n\r\nexport const reducer = (state: State, action: Action): State => {\r\n switch (action.type) {\r\n case \"ADD_TOAST\":\r\n return {\r\n ...state,\r\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\r\n }\r\n\r\n case \"UPDATE_TOAST\":\r\n return {\r\n ...state,\r\n toasts: state.toasts.map((t) =>\r\n t.id === action.toast.id ? { ...t, ...action.toast } : t\r\n ),\r\n }\r\n\r\n case \"DISMISS_TOAST\": {\r\n const { toastId } = action\r\n\r\n // ! Side effects ! - This could be extracted into a dismissToast() action,\r\n // but I'll keep it here for simplicity\r\n if (toastId) {\r\n addToRemoveQueue(toastId)\r\n } else {\r\n state.toasts.forEach((toast) => {\r\n addToRemoveQueue(toast.id)\r\n })\r\n }\r\n\r\n return {\r\n ...state,\r\n toasts: state.toasts.map((t) =>\r\n t.id === toastId || toastId === undefined\r\n ? {\r\n ...t,\r\n open: false,\r\n }\r\n : t\r\n ),\r\n }\r\n }\r\n case \"REMOVE_TOAST\":\r\n if (action.toastId === undefined) {\r\n return {\r\n ...state,\r\n toasts: [],\r\n }\r\n }\r\n return {\r\n ...state,\r\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\r\n }\r\n }\r\n}\r\n\r\nconst listeners: Array<(state: State) => void> = []\r\n\r\nlet memoryState: State = { toasts: [] }\r\n\r\nfunction dispatch(action: Action) {\r\n memoryState = reducer(memoryState, action)\r\n listeners.forEach((listener) => {\r\n listener(memoryState)\r\n })\r\n}\r\n\r\ntype Toast = Omit\r\n\r\nfunction toast({ ...props }: Toast) {\r\n const id = genId()\r\n\r\n const update = (props: ToasterToast) =>\r\n dispatch({\r\n type: \"UPDATE_TOAST\",\r\n toast: { ...props, id },\r\n })\r\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\r\n\r\n dispatch({\r\n type: \"ADD_TOAST\",\r\n toast: {\r\n ...props,\r\n id,\r\n open: true,\r\n onOpenChange: (open) => {\r\n if (!open) dismiss()\r\n },\r\n },\r\n })\r\n\r\n return {\r\n id: id,\r\n dismiss,\r\n update,\r\n }\r\n}\r\n\r\nfunction useToast() {\r\n const [state, setState] = React.useState(memoryState)\r\n\r\n React.useEffect(() => {\r\n listeners.push(setState)\r\n return () => {\r\n const index = listeners.indexOf(setState)\r\n if (index > -1) {\r\n listeners.splice(index, 1)\r\n }\r\n }\r\n }, [state])\r\n\r\n return {\r\n ...state,\r\n toast,\r\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\r\n }\r\n}\r\n\r\nexport { useToast, toast }\r\n" + }, + { + "name": "toaster.tsx", + "content": "\"use client\"\r\n\r\nimport {\r\n Toast,\r\n ToastClose,\r\n ToastDescription,\r\n ToastProvider,\r\n ToastTitle,\r\n ToastViewport,\r\n} from \"@/registry/new-york/ui/toast\"\r\nimport { useToast } from \"@/registry/new-york/ui/use-toast\"\r\n\r\nexport function Toaster() {\r\n const { toasts } = useToast()\r\n\r\n return (\r\n \r\n {toasts.map(function ({ id, title, description, action, ...props }) {\r\n return (\r\n \r\n
\r\n {title && {title}}\r\n {description && (\r\n {description}\r\n )}\r\n
\r\n {action}\r\n \r\n
\r\n )\r\n })}\r\n \r\n
\r\n )\r\n}\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/toggle-group.json b/apps/www/public/registry/styles/material/toggle-group.json new file mode 100644 index 00000000000..7282830fc00 --- /dev/null +++ b/apps/www/public/registry/styles/material/toggle-group.json @@ -0,0 +1,16 @@ +{ + "name": "toggle-group", + "dependencies": [ + "@radix-ui/react-toggle-group" + ], + "registryDependencies": [ + "toggle" + ], + "files": [ + { + "name": "toggle-group.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\r\nimport { VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { toggleVariants } from \"@/registry/new-york/ui/toggle\"\r\n\r\nconst ToggleGroupContext = React.createContext<\r\n VariantProps\r\n>({\r\n size: \"default\",\r\n variant: \"default\",\r\n})\r\n\r\nconst ToggleGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, size, children, ...props }, ref) => (\r\n \r\n \r\n {children}\r\n \r\n \r\n))\r\n\r\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName\r\n\r\nconst ToggleGroupItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, children, variant, size, ...props }, ref) => {\r\n const context = React.useContext(ToggleGroupContext)\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n})\r\n\r\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName\r\n\r\nexport { ToggleGroup, ToggleGroupItem }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/toggle.json b/apps/www/public/registry/styles/material/toggle.json new file mode 100644 index 00000000000..b2aa55ab6bd --- /dev/null +++ b/apps/www/public/registry/styles/material/toggle.json @@ -0,0 +1,13 @@ +{ + "name": "toggle", + "dependencies": [ + "@radix-ui/react-toggle" + ], + "files": [ + { + "name": "toggle.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst toggleVariants = cva(\r\n \"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-transparent\",\r\n outline:\r\n \"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\r\n },\r\n size: {\r\n default: \"h-9 px-3\",\r\n sm: \"h-8 px-2\",\r\n lg: \"h-10 px-3\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n size: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Toggle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, size, ...props }, ref) => (\r\n \r\n))\r\n\r\nToggle.displayName = TogglePrimitive.Root.displayName\r\n\r\nexport { Toggle, toggleVariants }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/material/tooltip.json b/apps/www/public/registry/styles/material/tooltip.json new file mode 100644 index 00000000000..098533fe6d7 --- /dev/null +++ b/apps/www/public/registry/styles/material/tooltip.json @@ -0,0 +1,13 @@ +{ + "name": "tooltip", + "dependencies": [ + "@radix-ui/react-tooltip" + ], + "files": [ + { + "name": "tooltip.tsx", + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst TooltipProvider = TooltipPrimitive.Provider\r\n\r\nconst Tooltip = TooltipPrimitive.Root\r\n\r\nconst TooltipTrigger = TooltipPrimitive.Trigger\r\n\r\nconst TooltipContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, sideOffset = 4, ...props }, ref) => (\r\n \r\n))\r\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\r\n\r\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\r\n" + } + ], + "type": "components:ui" +} \ No newline at end of file diff --git a/apps/www/public/registry/styles/new-york/accordion.json b/apps/www/public/registry/styles/new-york/accordion.json index d6bf8b0fd27..a3c8e6ee5d6 100644 --- a/apps/www/public/registry/styles/new-york/accordion.json +++ b/apps/www/public/registry/styles/new-york/accordion.json @@ -6,7 +6,7 @@ "files": [ { "name": "accordion.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAccordionItem.displayName = \"AccordionItem\"\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n \n \n \n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n
{children}
\n \n))\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\r\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Accordion = AccordionPrimitive.Root\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAccordionItem.displayName = \"AccordionItem\"\r\n\r\nconst AccordionTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n svg]:rotate-180\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n \r\n \r\n \r\n))\r\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\r\n\r\nconst AccordionContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n
{children}
\r\n \r\n))\r\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\r\n\r\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/alert-dialog.json b/apps/www/public/registry/styles/new-york/alert-dialog.json index 71617192af8..bf27e4d938a 100644 --- a/apps/www/public/registry/styles/new-york/alert-dialog.json +++ b/apps/www/public/registry/styles/new-york/alert-dialog.json @@ -9,7 +9,7 @@ "files": [ { "name": "alert-dialog.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants } from \"@/registry/new-york/ui/button\"\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n))\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nAlertDialogHeader.displayName = \"AlertDialogHeader\"\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nAlertDialogFooter.displayName = \"AlertDialogFooter\"\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { buttonVariants } from \"@/registry/new-york/ui/button\"\r\n\r\nconst AlertDialog = AlertDialogPrimitive.Root\r\n\r\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\r\n\r\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\r\n\r\nconst AlertDialogOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\r\n\r\nconst AlertDialogContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n))\r\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\r\n\r\nconst AlertDialogHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nAlertDialogHeader.displayName = \"AlertDialogHeader\"\r\n\r\nconst AlertDialogFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nAlertDialogFooter.displayName = \"AlertDialogFooter\"\r\n\r\nconst AlertDialogTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\r\n\r\nconst AlertDialogDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogDescription.displayName =\r\n AlertDialogPrimitive.Description.displayName\r\n\r\nconst AlertDialogAction = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\r\n\r\nconst AlertDialogCancel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\r\n\r\nexport {\r\n AlertDialog,\r\n AlertDialogPortal,\r\n AlertDialogOverlay,\r\n AlertDialogTrigger,\r\n AlertDialogContent,\r\n AlertDialogHeader,\r\n AlertDialogFooter,\r\n AlertDialogTitle,\r\n AlertDialogDescription,\r\n AlertDialogAction,\r\n AlertDialogCancel,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/alert.json b/apps/www/public/registry/styles/new-york/alert.json index 221afd4eae8..b2614d0e9ae 100644 --- a/apps/www/public/registry/styles/new-york/alert.json +++ b/apps/www/public/registry/styles/new-york/alert.json @@ -3,7 +3,7 @@ "files": [ { "name": "alert.tsx", - "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7\",\n {\n variants: {\n variant: {\n default: \"bg-background text-foreground\",\n destructive:\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes & VariantProps\n>(({ className, variant, ...props }, ref) => (\n \n))\nAlert.displayName = \"Alert\"\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nAlertTitle.displayName = \"AlertTitle\"\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nAlertDescription.displayName = \"AlertDescription\"\n\nexport { Alert, AlertTitle, AlertDescription }\n" + "content": "import * as React from \"react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst alertVariants = cva(\r\n \"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-background text-foreground\",\r\n destructive:\r\n \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Alert = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes & VariantProps\r\n>(({ className, variant, ...props }, ref) => (\r\n \r\n))\r\nAlert.displayName = \"Alert\"\r\n\r\nconst AlertTitle = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertTitle.displayName = \"AlertTitle\"\r\n\r\nconst AlertDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAlertDescription.displayName = \"AlertDescription\"\r\n\r\nexport { Alert, AlertTitle, AlertDescription }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/aspect-ratio.json b/apps/www/public/registry/styles/new-york/aspect-ratio.json index bf7ada618b2..82186770131 100644 --- a/apps/www/public/registry/styles/new-york/aspect-ratio.json +++ b/apps/www/public/registry/styles/new-york/aspect-ratio.json @@ -6,7 +6,7 @@ "files": [ { "name": "aspect-ratio.tsx", - "content": "\"use client\"\n\nimport * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\"\n\nconst AspectRatio = AspectRatioPrimitive.Root\n\nexport { AspectRatio }\n" + "content": "\"use client\"\r\n\r\nimport * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\"\r\n\r\nconst AspectRatio = AspectRatioPrimitive.Root\r\n\r\nexport { AspectRatio }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/avatar.json b/apps/www/public/registry/styles/new-york/avatar.json index 2fa35c3e237..82aba087492 100644 --- a/apps/www/public/registry/styles/new-york/avatar.json +++ b/apps/www/public/registry/styles/new-york/avatar.json @@ -6,7 +6,7 @@ "files": [ { "name": "avatar.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Avatar = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Avatar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatar.displayName = AvatarPrimitive.Root.displayName\r\n\r\nconst AvatarImage = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\r\n\r\nconst AvatarFallback = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\r\n\r\nexport { Avatar, AvatarImage, AvatarFallback }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/badge.json b/apps/www/public/registry/styles/new-york/badge.json index 416ca7812ed..1e51300af49 100644 --- a/apps/www/public/registry/styles/new-york/badge.json +++ b/apps/www/public/registry/styles/new-york/badge.json @@ -3,7 +3,7 @@ "files": [ { "name": "badge.tsx", - "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes,\n VariantProps {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n
\n )\n}\n\nexport { Badge, badgeVariants }\n" + "content": "import * as React from \"react\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst badgeVariants = cva(\r\n \"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\r\n {\r\n variants: {\r\n variant: {\r\n default:\r\n \"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80\",\r\n secondary:\r\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\r\n destructive:\r\n \"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80\",\r\n outline: \"text-foreground\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nexport interface BadgeProps\r\n extends React.HTMLAttributes,\r\n VariantProps {}\r\n\r\nfunction Badge({ className, variant, ...props }: BadgeProps) {\r\n return (\r\n
\r\n )\r\n}\r\n\r\nexport { Badge, badgeVariants }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/button.json b/apps/www/public/registry/styles/new-york/button.json index eb0706b9263..0710f3cf9a7 100644 --- a/apps/www/public/registry/styles/new-york/button.json +++ b/apps/www/public/registry/styles/new-york/button.json @@ -6,7 +6,7 @@ "files": [ { "name": "button.tsx", - "content": "import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes,\n VariantProps {\n asChild?: boolean\n}\n\nconst Button = React.forwardRef(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n \n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n" + "content": "import * as React from \"react\"\r\nimport { Slot } from \"@radix-ui/react-slot\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst buttonVariants = cva(\r\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\r\n {\r\n variants: {\r\n variant: {\r\n default:\r\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\r\n destructive:\r\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\r\n outline:\r\n \"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\r\n secondary:\r\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\r\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\r\n link: \"text-primary underline-offset-4 hover:underline\",\r\n },\r\n size: {\r\n default: \"h-9 px-4 py-2\",\r\n sm: \"h-8 rounded-md px-3 text-xs\",\r\n lg: \"h-10 rounded-md px-8\",\r\n icon: \"h-9 w-9\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n size: \"default\",\r\n },\r\n }\r\n)\r\n\r\nexport interface ButtonProps\r\n extends React.ButtonHTMLAttributes,\r\n VariantProps {\r\n asChild?: boolean\r\n}\r\n\r\nconst Button = React.forwardRef(\r\n ({ className, variant, size, asChild = false, ...props }, ref) => {\r\n const Comp = asChild ? Slot : \"button\"\r\n return (\r\n \r\n )\r\n }\r\n)\r\nButton.displayName = \"Button\"\r\n\r\nexport { Button, buttonVariants }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/calendar.json b/apps/www/public/registry/styles/new-york/calendar.json index c31d89448fa..b7409bf66d0 100644 --- a/apps/www/public/registry/styles/new-york/calendar.json +++ b/apps/www/public/registry/styles/new-york/calendar.json @@ -10,7 +10,7 @@ "files": [ { "name": "calendar.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@radix-ui/react-icons\"\nimport { DayPicker } from \"react-day-picker\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants } from \"@/registry/default/ui/button\"\n\nexport type CalendarProps = React.ComponentProps\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n ...props\n}: CalendarProps) {\n return (\n .day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\n : \"[&:has([aria-selected])]:rounded-md\"\n ),\n day: cn(\n buttonVariants({ variant: \"ghost\" }),\n \"h-8 w-8 p-0 font-normal aria-selected:opacity-100\"\n ),\n day_range_start: \"day-range-start\",\n day_range_end: \"day-range-end\",\n day_selected:\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n day_today: \"bg-accent text-accent-foreground\",\n day_outside:\n \"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30\",\n day_disabled: \"text-muted-foreground opacity-50\",\n day_range_middle:\n \"aria-selected:bg-accent aria-selected:text-accent-foreground\",\n day_hidden: \"invisible\",\n ...classNames,\n }}\n components={{\n IconLeft: ({ ...props }) => ,\n IconRight: ({ ...props }) => ,\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@radix-ui/react-icons\"\r\nimport { DayPicker } from \"react-day-picker\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { buttonVariants } from \"@/registry/default/ui/button\"\r\n\r\nexport type CalendarProps = React.ComponentProps\r\n\r\nfunction Calendar({\r\n className,\r\n classNames,\r\n showOutsideDays = true,\r\n ...props\r\n}: CalendarProps) {\r\n return (\r\n .day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\r\n : \"[&:has([aria-selected])]:rounded-md\"\r\n ),\r\n day: cn(\r\n buttonVariants({ variant: \"ghost\" }),\r\n \"h-8 w-8 p-0 font-normal aria-selected:opacity-100\"\r\n ),\r\n day_range_start: \"day-range-start\",\r\n day_range_end: \"day-range-end\",\r\n day_selected:\r\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\r\n day_today: \"bg-accent text-accent-foreground\",\r\n day_outside:\r\n \"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30\",\r\n day_disabled: \"text-muted-foreground opacity-50\",\r\n day_range_middle:\r\n \"aria-selected:bg-accent aria-selected:text-accent-foreground\",\r\n day_hidden: \"invisible\",\r\n ...classNames,\r\n }}\r\n components={{\r\n IconLeft: ({ ...props }) => ,\r\n IconRight: ({ ...props }) => ,\r\n }}\r\n {...props}\r\n />\r\n )\r\n}\r\nCalendar.displayName = \"Calendar\"\r\n\r\nexport { Calendar }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/card.json b/apps/www/public/registry/styles/new-york/card.json index af7ee0e12e5..43a58133ebd 100644 --- a/apps/www/public/registry/styles/new-york/card.json +++ b/apps/www/public/registry/styles/new-york/card.json @@ -3,7 +3,7 @@ "files": [ { "name": "card.tsx", - "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardDescription.displayName = \"CardDescription\"\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n))\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n" + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Card = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCard.displayName = \"Card\"\r\n\r\nconst CardHeader = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardHeader.displayName = \"CardHeader\"\r\n\r\nconst CardTitle = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardTitle.displayName = \"CardTitle\"\r\n\r\nconst CardDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardDescription.displayName = \"CardDescription\"\r\n\r\nconst CardContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n
\r\n))\r\nCardContent.displayName = \"CardContent\"\r\n\r\nconst CardFooter = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCardFooter.displayName = \"CardFooter\"\r\n\r\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/checkbox.json b/apps/www/public/registry/styles/new-york/checkbox.json index 0bb3bf861ef..97c1850c10d 100644 --- a/apps/www/public/registry/styles/new-york/checkbox.json +++ b/apps/www/public/registry/styles/new-york/checkbox.json @@ -6,7 +6,7 @@ "files": [ { "name": "checkbox.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { CheckIcon } from \"@radix-ui/react-icons\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\r\nimport { CheckIcon } from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n))\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\r\n\r\nexport { Checkbox }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/collapsible.json b/apps/www/public/registry/styles/new-york/collapsible.json index 99a398a94f7..d6d08fe2b80 100644 --- a/apps/www/public/registry/styles/new-york/collapsible.json +++ b/apps/www/public/registry/styles/new-york/collapsible.json @@ -6,7 +6,7 @@ "files": [ { "name": "collapsible.tsx", - "content": "\"use client\"\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\"\n\nconst Collapsible = CollapsiblePrimitive.Root\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n" + "content": "\"use client\"\r\n\r\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\"\r\n\r\nconst Collapsible = CollapsiblePrimitive.Root\r\n\r\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger\r\n\r\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent\r\n\r\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/command.json b/apps/www/public/registry/styles/new-york/command.json index fc7f644f237..0486453cf88 100644 --- a/apps/www/public/registry/styles/new-york/command.json +++ b/apps/www/public/registry/styles/new-york/command.json @@ -9,7 +9,7 @@ "files": [ { "name": "command.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { MagnifyingGlassIcon } from \"@radix-ui/react-icons\"\nimport { Command as CommandPrimitive } from \"cmdk\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Dialog, DialogContent } from \"@/registry/new-york/ui/dialog\"\n\nconst Command = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nCommand.displayName = CommandPrimitive.displayName\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n \n \n \n {children}\n \n \n \n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n
\n \n \n
\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>((props, ref) => (\n \n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes) => {\n return (\n \n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\r\nimport { MagnifyingGlassIcon } from \"@radix-ui/react-icons\"\r\nimport { Command as CommandPrimitive } from \"cmdk\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { Dialog, DialogContent } from \"@/registry/new-york/ui/dialog\"\r\n\r\nconst Command = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCommand.displayName = CommandPrimitive.displayName\r\n\r\ninterface CommandDialogProps extends DialogProps {}\r\n\r\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\r\n return (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n \r\n
\r\n))\r\n\r\nCommandInput.displayName = CommandPrimitive.Input.displayName\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandList.displayName = CommandPrimitive.List.displayName\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>((props, ref) => (\r\n \r\n))\r\n\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\n\r\nCommandItem.displayName = CommandPrimitive.Item.displayName\r\n\r\nconst CommandShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nCommandShortcut.displayName = \"CommandShortcut\"\r\n\r\nexport {\r\n Command,\r\n CommandDialog,\r\n CommandInput,\r\n CommandList,\r\n CommandEmpty,\r\n CommandGroup,\r\n CommandItem,\r\n CommandShortcut,\r\n CommandSeparator,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/context-menu.json b/apps/www/public/registry/styles/new-york/context-menu.json index 0de036bca87..ca29cca9b87 100644 --- a/apps/www/public/registry/styles/new-york/context-menu.json +++ b/apps/www/public/registry/styles/new-york/context-menu.json @@ -6,7 +6,7 @@ "files": [ { "name": "context-menu.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\"\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst ContextMenu = ContextMenuPrimitive.Root\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n))\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName\n\nconst ContextMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes) => {\n return (\n \n )\n}\nContextMenuShortcut.displayName = \"ContextMenuShortcut\"\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\"\r\nimport {\r\n CheckIcon,\r\n ChevronRightIcon,\r\n DotFilledIcon,\r\n} from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nContextMenuCheckboxItem.displayName =\r\n ContextMenuPrimitive.CheckboxItem.displayName\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName\r\n\r\nconst ContextMenuShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\"\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuTrigger,\r\n ContextMenuContent,\r\n ContextMenuItem,\r\n ContextMenuCheckboxItem,\r\n ContextMenuRadioItem,\r\n ContextMenuLabel,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuGroup,\r\n ContextMenuPortal,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuRadioGroup,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/dialog.json b/apps/www/public/registry/styles/new-york/dialog.json index 9e734c5c91c..7f433cace2b 100644 --- a/apps/www/public/registry/styles/new-york/dialog.json +++ b/apps/www/public/registry/styles/new-york/dialog.json @@ -6,7 +6,7 @@ "files": [ { "name": "dialog.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n {children}\n \n \n Close\n \n \n \n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\r\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Dialog = DialogPrimitive.Root\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger\r\n\r\nconst DialogPortal = DialogPrimitive.Portal\r\n\r\nconst DialogClose = DialogPrimitive.Close\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n Close\r\n \r\n \r\n \r\n))\r\nDialogContent.displayName = DialogPrimitive.Content.displayName\r\n\r\nconst DialogHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nDialogHeader.displayName = \"DialogHeader\"\r\n\r\nconst DialogFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nDialogFooter.displayName = \"DialogFooter\"\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName\r\n\r\nexport {\r\n Dialog,\r\n DialogPortal,\r\n DialogOverlay,\r\n DialogTrigger,\r\n DialogClose,\r\n DialogContent,\r\n DialogHeader,\r\n DialogFooter,\r\n DialogTitle,\r\n DialogDescription,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/dropdown-menu.json b/apps/www/public/registry/styles/new-york/dropdown-menu.json index 98b9819a789..c761edcfc60 100644 --- a/apps/www/public/registry/styles/new-york/dropdown-menu.json +++ b/apps/www/public/registry/styles/new-york/dropdown-menu.json @@ -6,7 +6,7 @@ "files": [ { "name": "dropdown-menu.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, sideOffset = 4, ...props }, ref) => (\n \n \n \n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes) => {\n return (\n \n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\r\nimport {\r\n CheckIcon,\r\n ChevronRightIcon,\r\n DotFilledIcon,\r\n} from \"@radix-ui/react-icons\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst DropdownMenu = DropdownMenuPrimitive.Root\r\n\r\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\r\n\r\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\r\n\r\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\r\n\r\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\r\n\r\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\r\n\r\nconst DropdownMenuSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nDropdownMenuSubTrigger.displayName =\r\n DropdownMenuPrimitive.SubTrigger.displayName\r\n\r\nconst DropdownMenuSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuSubContent.displayName =\r\n DropdownMenuPrimitive.SubContent.displayName\r\n\r\nconst DropdownMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, sideOffset = 4, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\r\n\r\nconst DropdownMenuItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\r\n\r\nconst DropdownMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nDropdownMenuCheckboxItem.displayName =\r\n DropdownMenuPrimitive.CheckboxItem.displayName\r\n\r\nconst DropdownMenuRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\r\n\r\nconst DropdownMenuLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\r\n\r\nconst DropdownMenuSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\r\n\r\nconst DropdownMenuShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\r\n\r\nexport {\r\n DropdownMenu,\r\n DropdownMenuTrigger,\r\n DropdownMenuContent,\r\n DropdownMenuItem,\r\n DropdownMenuCheckboxItem,\r\n DropdownMenuRadioItem,\r\n DropdownMenuLabel,\r\n DropdownMenuSeparator,\r\n DropdownMenuShortcut,\r\n DropdownMenuGroup,\r\n DropdownMenuPortal,\r\n DropdownMenuSub,\r\n DropdownMenuSubContent,\r\n DropdownMenuSubTrigger,\r\n DropdownMenuRadioGroup,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/form.json b/apps/www/public/registry/styles/new-york/form.json index 212c282e861..787b7758980 100644 --- a/apps/www/public/registry/styles/new-york/form.json +++ b/apps/www/public/registry/styles/new-york/form.json @@ -14,7 +14,7 @@ "files": [ { "name": "form.tsx", - "content": "import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n FormProvider,\n useFormContext,\n} from \"react-hook-form\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Label } from \"@/registry/new-york/ui/label\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath = FieldPath\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext(\n {} as FormFieldContextValue\n)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath = FieldPath\n>({\n ...props\n}: ControllerProps) => {\n return (\n \n \n \n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within \")\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext(\n {} as FormItemContextValue\n)\n\nconst FormItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n \n
\n \n )\n})\nFormItem.displayName = \"FormItem\"\n\nconst FormLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n \n )\n})\nFormLabel.displayName = \"FormLabel\"\n\nconst FormControl = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n \n )\n})\nFormControl.displayName = \"FormControl\"\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n\n return (\n \n )\n})\nFormDescription.displayName = \"FormDescription\"\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message) : children\n\n if (!body) {\n return null\n }\n\n return (\n \n {body}\n

\n )\n})\nFormMessage.displayName = \"FormMessage\"\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n}\n" + "content": "import * as React from \"react\"\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\r\nimport { Slot } from \"@radix-ui/react-slot\"\r\nimport {\r\n Controller,\r\n ControllerProps,\r\n FieldPath,\r\n FieldValues,\r\n FormProvider,\r\n useFormContext,\r\n} from \"react-hook-form\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { Label } from \"@/registry/new-york/ui/label\"\r\n\r\nconst Form = FormProvider\r\n\r\ntype FormFieldContextValue<\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath = FieldPath\r\n> = {\r\n name: TName\r\n}\r\n\r\nconst FormFieldContext = React.createContext(\r\n {} as FormFieldContextValue\r\n)\r\n\r\nconst FormField = <\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath = FieldPath\r\n>({\r\n ...props\r\n}: ControllerProps) => {\r\n return (\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nconst useFormField = () => {\r\n const fieldContext = React.useContext(FormFieldContext)\r\n const itemContext = React.useContext(FormItemContext)\r\n const { getFieldState, formState } = useFormContext()\r\n\r\n const fieldState = getFieldState(fieldContext.name, formState)\r\n\r\n if (!fieldContext) {\r\n throw new Error(\"useFormField should be used within \")\r\n }\r\n\r\n const { id } = itemContext\r\n\r\n return {\r\n id,\r\n name: fieldContext.name,\r\n formItemId: `${id}-form-item`,\r\n formDescriptionId: `${id}-form-item-description`,\r\n formMessageId: `${id}-form-item-message`,\r\n ...fieldState,\r\n }\r\n}\r\n\r\ntype FormItemContextValue = {\r\n id: string\r\n}\r\n\r\nconst FormItemContext = React.createContext(\r\n {} as FormItemContextValue\r\n)\r\n\r\nconst FormItem = React.forwardRef<\r\n HTMLDivElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => {\r\n const id = React.useId()\r\n\r\n return (\r\n \r\n
\r\n \r\n )\r\n})\r\nFormItem.displayName = \"FormItem\"\r\n\r\nconst FormLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n const { error, formItemId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormLabel.displayName = \"FormLabel\"\r\n\r\nconst FormControl = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ ...props }, ref) => {\r\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormControl.displayName = \"FormControl\"\r\n\r\nconst FormDescription = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => {\r\n const { formDescriptionId } = useFormField()\r\n\r\n return (\r\n \r\n )\r\n})\r\nFormDescription.displayName = \"FormDescription\"\r\n\r\nconst FormMessage = React.forwardRef<\r\n HTMLParagraphElement,\r\n React.HTMLAttributes\r\n>(({ className, children, ...props }, ref) => {\r\n const { error, formMessageId } = useFormField()\r\n const body = error ? String(error?.message) : children\r\n\r\n if (!body) {\r\n return null\r\n }\r\n\r\n return (\r\n \r\n {body}\r\n

\r\n )\r\n})\r\nFormMessage.displayName = \"FormMessage\"\r\n\r\nexport {\r\n useFormField,\r\n Form,\r\n FormItem,\r\n FormLabel,\r\n FormControl,\r\n FormDescription,\r\n FormMessage,\r\n FormField,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/hover-card.json b/apps/www/public/registry/styles/new-york/hover-card.json index db69042ab24..44fae0a628f 100644 --- a/apps/www/public/registry/styles/new-york/hover-card.json +++ b/apps/www/public/registry/styles/new-york/hover-card.json @@ -6,7 +6,7 @@ "files": [ { "name": "hover-card.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst HoverCard = HoverCardPrimitive.Root\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger\n\nconst HoverCardContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n \n))\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst HoverCard = HoverCardPrimitive.Root\r\n\r\nconst HoverCardTrigger = HoverCardPrimitive.Trigger\r\n\r\nconst HoverCardContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\r\n \r\n))\r\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName\r\n\r\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/input.json b/apps/www/public/registry/styles/new-york/input.json index 937dea44fc1..95e6cb873ec 100644 --- a/apps/www/public/registry/styles/new-york/input.json +++ b/apps/www/public/registry/styles/new-york/input.json @@ -3,7 +3,7 @@ "files": [ { "name": "input.tsx", - "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface InputProps\n extends React.InputHTMLAttributes {}\n\nconst Input = React.forwardRef(\n ({ className, type, ...props }, ref) => {\n return (\n \n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n" + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nexport interface InputProps\r\n extends React.InputHTMLAttributes {}\r\n\r\nconst Input = React.forwardRef(\r\n ({ className, type, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n }\r\n)\r\nInput.displayName = \"Input\"\r\n\r\nexport { Input }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/label.json b/apps/www/public/registry/styles/new-york/label.json index 81d3efd29e8..12caba3beaa 100644 --- a/apps/www/public/registry/styles/new-york/label.json +++ b/apps/www/public/registry/styles/new-york/label.json @@ -6,7 +6,7 @@ "files": [ { "name": "label.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nconst Label = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, ...props }, ref) => (\n \n))\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst labelVariants = cva(\r\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\r\n)\r\n\r\nconst Label = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nLabel.displayName = LabelPrimitive.Root.displayName\r\n\r\nexport { Label }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/menubar.json b/apps/www/public/registry/styles/new-york/menubar.json index e291c072fb3..4c2ee6afdfb 100644 --- a/apps/www/public/registry/styles/new-york/menubar.json +++ b/apps/www/public/registry/styles/new-york/menubar.json @@ -6,7 +6,7 @@ "files": [ { "name": "menubar.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst MenubarMenu = MenubarPrimitive.Menu\n\nconst MenubarGroup = MenubarPrimitive.Group\n\nconst MenubarPortal = MenubarPrimitive.Portal\n\nconst MenubarSub = MenubarPrimitive.Sub\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n \n \n \n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n \n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes) => {\n return (\n \n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport {\r\n CheckIcon,\r\n ChevronRightIcon,\r\n DotFilledIcon,\r\n} from \"@radix-ui/react-icons\"\r\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst MenubarMenu = MenubarPrimitive.Menu\r\n\r\nconst MenubarGroup = MenubarPrimitive.Group\r\n\r\nconst MenubarPortal = MenubarPrimitive.Portal\r\n\r\nconst MenubarSub = MenubarPrimitive.Sub\r\n\r\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup\r\n\r\nconst Menubar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubar.displayName = MenubarPrimitive.Root.displayName\r\n\r\nconst MenubarTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\r\n\r\nconst MenubarSubTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\r\n\r\nconst MenubarSubContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\r\n\r\nconst MenubarContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(\r\n (\r\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\r\n ref\r\n ) => (\r\n \r\n \r\n \r\n )\r\n)\r\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\r\n\r\nconst MenubarItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\r\n\r\nconst MenubarCheckboxItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, checked, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\r\n\r\nconst MenubarRadioItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\r\n\r\nconst MenubarLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n \r\n))\r\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\r\n\r\nconst MenubarSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\r\n\r\nconst MenubarShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => {\r\n return (\r\n \r\n )\r\n}\r\nMenubarShortcut.displayname = \"MenubarShortcut\"\r\n\r\nexport {\r\n Menubar,\r\n MenubarMenu,\r\n MenubarTrigger,\r\n MenubarContent,\r\n MenubarItem,\r\n MenubarSeparator,\r\n MenubarLabel,\r\n MenubarCheckboxItem,\r\n MenubarRadioGroup,\r\n MenubarRadioItem,\r\n MenubarPortal,\r\n MenubarSubContent,\r\n MenubarSubTrigger,\r\n MenubarGroup,\r\n MenubarSub,\r\n MenubarShortcut,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/navigation-menu.json b/apps/www/public/registry/styles/new-york/navigation-menu.json index 5fb09d18e41..73cc263080e 100644 --- a/apps/www/public/registry/styles/new-york/navigation-menu.json +++ b/apps/www/public/registry/styles/new-york/navigation-menu.json @@ -6,7 +6,7 @@ "files": [ { "name": "navigation-menu.tsx", - "content": "import * as React from \"react\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n {children}\n \n \n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\n)\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n {children}{\" \"}\n \n \n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n
\n \n
\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n
\n \n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n}\n" + "content": "import * as React from \"react\"\r\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\r\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\r\nimport { cva } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst NavigationMenu = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n {children}\r\n \r\n \r\n))\r\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\r\n\r\nconst NavigationMenuList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\r\n\r\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\r\n\r\nconst navigationMenuTriggerStyle = cva(\r\n \"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50\"\r\n)\r\n\r\nconst NavigationMenuTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n {children}{\" \"}\r\n \r\n \r\n))\r\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\r\n\r\nconst NavigationMenuContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\r\n\r\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\r\n\r\nconst NavigationMenuViewport = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n
\r\n))\r\nNavigationMenuViewport.displayName =\r\n NavigationMenuPrimitive.Viewport.displayName\r\n\r\nconst NavigationMenuIndicator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n
\r\n \r\n))\r\nNavigationMenuIndicator.displayName =\r\n NavigationMenuPrimitive.Indicator.displayName\r\n\r\nexport {\r\n navigationMenuTriggerStyle,\r\n NavigationMenu,\r\n NavigationMenuList,\r\n NavigationMenuItem,\r\n NavigationMenuContent,\r\n NavigationMenuTrigger,\r\n NavigationMenuLink,\r\n NavigationMenuIndicator,\r\n NavigationMenuViewport,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/popover.json b/apps/www/public/registry/styles/new-york/popover.json index 28ffef3dbff..156f0e4f795 100644 --- a/apps/www/public/registry/styles/new-york/popover.json +++ b/apps/www/public/registry/styles/new-york/popover.json @@ -6,7 +6,7 @@ "files": [ { "name": "popover.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n \n \n \n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Popover = PopoverPrimitive.Root\r\n\r\nconst PopoverTrigger = PopoverPrimitive.Trigger\r\n\r\nconst PopoverContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\r\n\r\nexport { Popover, PopoverTrigger, PopoverContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/progress.json b/apps/www/public/registry/styles/new-york/progress.json index ec72e3970f2..e34156f6e40 100644 --- a/apps/www/public/registry/styles/new-york/progress.json +++ b/apps/www/public/registry/styles/new-york/progress.json @@ -6,7 +6,7 @@ "files": [ { "name": "progress.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Progress = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, value, ...props }, ref) => (\n \n \n \n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Progress = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, value, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nProgress.displayName = ProgressPrimitive.Root.displayName\r\n\r\nexport { Progress }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/radio-group.json b/apps/www/public/registry/styles/new-york/radio-group.json index e2b9fedd832..0432107f268 100644 --- a/apps/www/public/registry/styles/new-york/radio-group.json +++ b/apps/www/public/registry/styles/new-york/radio-group.json @@ -6,7 +6,7 @@ "files": [ { "name": "radio-group.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { CheckIcon } from \"@radix-ui/react-icons\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n \n \n \n \n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { CheckIcon } from \"@radix-ui/react-icons\"\r\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst RadioGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n})\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n})\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\r\n\r\nexport { RadioGroup, RadioGroupItem }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/scroll-area.json b/apps/www/public/registry/styles/new-york/scroll-area.json index 6c45d05ff77..4c81e637cc5 100644 --- a/apps/www/public/registry/styles/new-york/scroll-area.json +++ b/apps/www/public/registry/styles/new-york/scroll-area.json @@ -6,7 +6,7 @@ "files": [ { "name": "scroll-area.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n {children}\n \n \n \n \n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n \n \n \n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ScrollArea = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\r\n\r\nconst ScrollBar = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\r\n\r\nexport { ScrollArea, ScrollBar }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/select.json b/apps/www/public/registry/styles/new-york/select.json index b296dccb507..3e0f7272f0f 100644 --- a/apps/www/public/registry/styles/new-york/select.json +++ b/apps/www/public/registry/styles/new-york/select.json @@ -6,7 +6,7 @@ "files": [ { "name": "select.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n CaretSortIcon,\n CheckIcon,\n ChevronDownIcon,\n ChevronUpIcon,\n} from \"@radix-ui/react-icons\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Select = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n span]:line-clamp-1\",\n className\n )}\n {...props}\n >\n {children}\n \n \n \n \n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n \n \n \n \n {children}\n \n \n \n \n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport {\r\n CaretSortIcon,\r\n CheckIcon,\r\n ChevronDownIcon,\r\n ChevronUpIcon,\r\n} from \"@radix-ui/react-icons\"\r\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Select = SelectPrimitive.Root\r\n\r\nconst SelectGroup = SelectPrimitive.Group\r\n\r\nconst SelectValue = SelectPrimitive.Value\r\n\r\nconst SelectTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n span]:line-clamp-1\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\r\n\r\nconst SelectScrollUpButton = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\r\n\r\nconst SelectScrollDownButton = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSelectScrollDownButton.displayName =\r\n SelectPrimitive.ScrollDownButton.displayName\r\n\r\nconst SelectContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, position = \"popper\", ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n))\r\nSelectContent.displayName = SelectPrimitive.Content.displayName\r\n\r\nconst SelectLabel = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSelectLabel.displayName = SelectPrimitive.Label.displayName\r\n\r\nconst SelectItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n))\r\nSelectItem.displayName = SelectPrimitive.Item.displayName\r\n\r\nconst SelectSeparator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n SelectScrollUpButton,\r\n SelectScrollDownButton,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/separator.json b/apps/www/public/registry/styles/new-york/separator.json index fc49fac7f88..0f2c7e4ff74 100644 --- a/apps/www/public/registry/styles/new-york/separator.json +++ b/apps/www/public/registry/styles/new-york/separator.json @@ -6,7 +6,7 @@ "files": [ { "name": "separator.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Separator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref\n ) => (\n \n )\n)\nSeparator.displayName = SeparatorPrimitive.Root.displayName\n\nexport { Separator }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(\r\n (\r\n { className, orientation = \"horizontal\", decorative = true, ...props },\r\n ref\r\n ) => (\r\n \r\n )\r\n)\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/sheet.json b/apps/www/public/registry/styles/new-york/sheet.json index 97d979db60e..d68cb71a9e3 100644 --- a/apps/www/public/registry/styles/new-york/sheet.json +++ b/apps/www/public/registry/styles/new-york/sheet.json @@ -6,7 +6,7 @@ "files": [ { "name": "sheet.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n }\n)\n\ninterface SheetContentProps\n extends React.ComponentPropsWithoutRef,\n VariantProps {}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n \n \n \n {children}\n \n \n Close\n \n \n \n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes) => (\n \n)\nSheetFooter.displayName = \"SheetFooter\"\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\r\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Sheet = SheetPrimitive.Root\r\n\r\nconst SheetTrigger = SheetPrimitive.Trigger\r\n\r\nconst SheetClose = SheetPrimitive.Close\r\n\r\nconst SheetPortal = SheetPrimitive.Portal\r\n\r\nconst SheetOverlay = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\r\n\r\nconst sheetVariants = cva(\r\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\r\n {\r\n variants: {\r\n side: {\r\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\r\n bottom:\r\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\r\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\r\n right:\r\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\r\n },\r\n },\r\n defaultVariants: {\r\n side: \"right\",\r\n },\r\n }\r\n)\r\n\r\ninterface SheetContentProps\r\n extends React.ComponentPropsWithoutRef,\r\n VariantProps {}\r\n\r\nconst SheetContent = React.forwardRef<\r\n React.ElementRef,\r\n SheetContentProps\r\n>(({ side = \"right\", className, children, ...props }, ref) => (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n Close\r\n \r\n \r\n \r\n))\r\nSheetContent.displayName = SheetPrimitive.Content.displayName\r\n\r\nconst SheetHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nSheetHeader.displayName = \"SheetHeader\"\r\n\r\nconst SheetFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) => (\r\n \r\n)\r\nSheetFooter.displayName = \"SheetFooter\"\r\n\r\nconst SheetTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetTitle.displayName = SheetPrimitive.Title.displayName\r\n\r\nconst SheetDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nSheetDescription.displayName = SheetPrimitive.Description.displayName\r\n\r\nexport {\r\n Sheet,\r\n SheetPortal,\r\n SheetOverlay,\r\n SheetTrigger,\r\n SheetClose,\r\n SheetContent,\r\n SheetHeader,\r\n SheetFooter,\r\n SheetTitle,\r\n SheetDescription,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/skeleton.json b/apps/www/public/registry/styles/new-york/skeleton.json index 1dfd060a95e..e8f8e72f858 100644 --- a/apps/www/public/registry/styles/new-york/skeleton.json +++ b/apps/www/public/registry/styles/new-york/skeleton.json @@ -3,7 +3,7 @@ "files": [ { "name": "skeleton.tsx", - "content": "import { cn } from \"@/lib/utils\"\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes) {\n return (\n \n )\n}\n\nexport { Skeleton }\n" + "content": "import { cn } from \"@/lib/utils\"\r\n\r\nfunction Skeleton({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport { Skeleton }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/slider.json b/apps/www/public/registry/styles/new-york/slider.json index 1256e82d314..1af9eab56fb 100644 --- a/apps/www/public/registry/styles/new-york/slider.json +++ b/apps/www/public/registry/styles/new-york/slider.json @@ -6,7 +6,7 @@ "files": [ { "name": "slider.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SliderPrimitive from \"@radix-ui/react-slider\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Slider = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n \n))\nSlider.displayName = SliderPrimitive.Root.displayName\n\nexport { Slider }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SliderPrimitive from \"@radix-ui/react-slider\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Slider = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n))\r\nSlider.displayName = SliderPrimitive.Root.displayName\r\n\r\nexport { Slider }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/switch.json b/apps/www/public/registry/styles/new-york/switch.json index dc679c4f68b..177d845a9a6 100644 --- a/apps/www/public/registry/styles/new-york/switch.json +++ b/apps/www/public/registry/styles/new-york/switch.json @@ -6,7 +6,7 @@ "files": [ { "name": "switch.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Switch = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Switch = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nSwitch.displayName = SwitchPrimitives.Root.displayName\r\n\r\nexport { Switch }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/table.json b/apps/www/public/registry/styles/new-york/table.json index 4c927f80347..8e17fab5267 100644 --- a/apps/www/public/registry/styles/new-york/table.json +++ b/apps/www/public/registry/styles/new-york/table.json @@ -3,7 +3,7 @@ "files": [ { "name": "table.tsx", - "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n \n
\n))\nTable.displayName = \"Table\"\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableHeader.displayName = \"TableHeader\"\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableBody.displayName = \"TableBody\"\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = \"TableFooter\"\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableRow.displayName = \"TableRow\"\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes\n>(({ className, ...props }, ref) => (\n [role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n))\nTableHead.displayName = \"TableHead\"\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes\n>(({ className, ...props }, ref) => (\n [role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n))\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n))\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n" + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Table = React.forwardRef<\r\n HTMLTableElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n
\r\n \r\n
\r\n))\r\nTable.displayName = \"Table\"\r\n\r\nconst TableHeader = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableHeader.displayName = \"TableHeader\"\r\n\r\nconst TableBody = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableBody.displayName = \"TableBody\"\r\n\r\nconst TableFooter = React.forwardRef<\r\n HTMLTableSectionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n tr]:last:border-b-0\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nTableFooter.displayName = \"TableFooter\"\r\n\r\nconst TableRow = React.forwardRef<\r\n HTMLTableRowElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableRow.displayName = \"TableRow\"\r\n\r\nconst TableHead = React.forwardRef<\r\n HTMLTableCellElement,\r\n React.ThHTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n [role=checkbox]]:translate-y-[2px]\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nTableHead.displayName = \"TableHead\"\r\n\r\nconst TableCell = React.forwardRef<\r\n HTMLTableCellElement,\r\n React.TdHTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n [role=checkbox]]:translate-y-[2px]\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nTableCell.displayName = \"TableCell\"\r\n\r\nconst TableCaption = React.forwardRef<\r\n HTMLTableCaptionElement,\r\n React.HTMLAttributes\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTableCaption.displayName = \"TableCaption\"\r\n\r\nexport {\r\n Table,\r\n TableHeader,\r\n TableBody,\r\n TableFooter,\r\n TableHead,\r\n TableRow,\r\n TableCell,\r\n TableCaption,\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/tabs.json b/apps/www/public/registry/styles/new-york/tabs.json index 82058ae92d7..ee38b5c6a67 100644 --- a/apps/www/public/registry/styles/new-york/tabs.json +++ b/apps/www/public/registry/styles/new-york/tabs.json @@ -6,7 +6,7 @@ "files": [ { "name": "tabs.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst Tabs = TabsPrimitive.Root\r\n\r\nconst TabsList = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsList.displayName = TabsPrimitive.List.displayName\r\n\r\nconst TabsTrigger = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\r\n\r\nconst TabsContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nTabsContent.displayName = TabsPrimitive.Content.displayName\r\n\r\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/textarea.json b/apps/www/public/registry/styles/new-york/textarea.json index 5cf8aecda65..c4d7e7e9572 100644 --- a/apps/www/public/registry/styles/new-york/textarea.json +++ b/apps/www/public/registry/styles/new-york/textarea.json @@ -3,7 +3,7 @@ "files": [ { "name": "textarea.tsx", - "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface TextareaProps\n extends React.TextareaHTMLAttributes {}\n\nconst Textarea = React.forwardRef(\n ({ className, ...props }, ref) => {\n return (\n \n )\n }\n)\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n" + "content": "import * as React from \"react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nexport interface TextareaProps\r\n extends React.TextareaHTMLAttributes {}\r\n\r\nconst Textarea = React.forwardRef(\r\n ({ className, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n }\r\n)\r\nTextarea.displayName = \"Textarea\"\r\n\r\nexport { Textarea }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/toast.json b/apps/www/public/registry/styles/new-york/toast.json index 69935b01d3d..488ab163af0 100644 --- a/apps/www/public/registry/styles/new-york/toast.json +++ b/apps/www/public/registry/styles/new-york/toast.json @@ -6,15 +6,15 @@ "files": [ { "name": "toast.tsx", - "content": "import * as React from \"react\"\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst ToastProvider = ToastPrimitives.Provider\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nconst Toast = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, ...props }, ref) => {\n return (\n \n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\nconst ToastAction = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastAction.displayName = ToastPrimitives.Action.displayName\n\nconst ToastClose = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\ntype ToastProps = React.ComponentPropsWithoutRef\n\ntype ToastActionElement = React.ReactElement\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n}\n" + "content": "import * as React from \"react\"\r\nimport { Cross2Icon } from \"@radix-ui/react-icons\"\r\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst ToastProvider = ToastPrimitives.Provider\r\n\r\nconst ToastViewport = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\r\n\r\nconst toastVariants = cva(\r\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"border bg-background text-foreground\",\r\n destructive:\r\n \"destructive group border-destructive bg-destructive text-destructive-foreground\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Toast = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, ...props }, ref) => {\r\n return (\r\n \r\n )\r\n})\r\nToast.displayName = ToastPrimitives.Root.displayName\r\n\r\nconst ToastAction = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastAction.displayName = ToastPrimitives.Action.displayName\r\n\r\nconst ToastClose = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n \r\n \r\n))\r\nToastClose.displayName = ToastPrimitives.Close.displayName\r\n\r\nconst ToastTitle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastTitle.displayName = ToastPrimitives.Title.displayName\r\n\r\nconst ToastDescription = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, ...props }, ref) => (\r\n \r\n))\r\nToastDescription.displayName = ToastPrimitives.Description.displayName\r\n\r\ntype ToastProps = React.ComponentPropsWithoutRef\r\n\r\ntype ToastActionElement = React.ReactElement\r\n\r\nexport {\r\n type ToastProps,\r\n type ToastActionElement,\r\n ToastProvider,\r\n ToastViewport,\r\n Toast,\r\n ToastTitle,\r\n ToastDescription,\r\n ToastClose,\r\n ToastAction,\r\n}\r\n" }, { "name": "use-toast.ts", - "content": "// Inspired by react-hot-toast library\nimport * as React from \"react\"\n\nimport type {\n ToastActionElement,\n ToastProps,\n} from \"@/registry/default/ui/toast\"\n\nconst TOAST_LIMIT = 1\nconst TOAST_REMOVE_DELAY = 1000000\n\ntype ToasterToast = ToastProps & {\n id: string\n title?: React.ReactNode\n description?: React.ReactNode\n action?: ToastActionElement\n}\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const\n\nlet count = 0\n\nfunction genId() {\n count = (count + 1) % Number.MAX_VALUE\n return count.toString()\n}\n\ntype ActionType = typeof actionTypes\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"]\n toast: ToasterToast\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"]\n toast: Partial\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n\ninterface State {\n toasts: ToasterToast[]\n}\n\nconst toastTimeouts = new Map>()\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n })\n }, TOAST_REMOVE_DELAY)\n\n toastTimeouts.set(toastId, timeout)\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n }\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n }\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId)\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id)\n })\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t\n ),\n }\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n }\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n }\n }\n}\n\nconst listeners: Array<(state: State) => void> = []\n\nlet memoryState: State = { toasts: [] }\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((listener) => {\n listener(memoryState)\n })\n}\n\ntype Toast = Omit\n\nfunction toast({ ...props }: Toast) {\n const id = genId()\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss()\n },\n },\n })\n\n return {\n id: id,\n dismiss,\n update,\n }\n}\n\nfunction useToast() {\n const [state, setState] = React.useState(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) {\n listeners.splice(index, 1)\n }\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n }\n}\n\nexport { useToast, toast }\n" + "content": "// Inspired by react-hot-toast library\r\nimport * as React from \"react\"\r\n\r\nimport type {\r\n ToastActionElement,\r\n ToastProps,\r\n} from \"@/registry/default/ui/toast\"\r\n\r\nconst TOAST_LIMIT = 1\r\nconst TOAST_REMOVE_DELAY = 1000000\r\n\r\ntype ToasterToast = ToastProps & {\r\n id: string\r\n title?: React.ReactNode\r\n description?: React.ReactNode\r\n action?: ToastActionElement\r\n}\r\n\r\nconst actionTypes = {\r\n ADD_TOAST: \"ADD_TOAST\",\r\n UPDATE_TOAST: \"UPDATE_TOAST\",\r\n DISMISS_TOAST: \"DISMISS_TOAST\",\r\n REMOVE_TOAST: \"REMOVE_TOAST\",\r\n} as const\r\n\r\nlet count = 0\r\n\r\nfunction genId() {\r\n count = (count + 1) % Number.MAX_VALUE\r\n return count.toString()\r\n}\r\n\r\ntype ActionType = typeof actionTypes\r\n\r\ntype Action =\r\n | {\r\n type: ActionType[\"ADD_TOAST\"]\r\n toast: ToasterToast\r\n }\r\n | {\r\n type: ActionType[\"UPDATE_TOAST\"]\r\n toast: Partial\r\n }\r\n | {\r\n type: ActionType[\"DISMISS_TOAST\"]\r\n toastId?: ToasterToast[\"id\"]\r\n }\r\n | {\r\n type: ActionType[\"REMOVE_TOAST\"]\r\n toastId?: ToasterToast[\"id\"]\r\n }\r\n\r\ninterface State {\r\n toasts: ToasterToast[]\r\n}\r\n\r\nconst toastTimeouts = new Map>()\r\n\r\nconst addToRemoveQueue = (toastId: string) => {\r\n if (toastTimeouts.has(toastId)) {\r\n return\r\n }\r\n\r\n const timeout = setTimeout(() => {\r\n toastTimeouts.delete(toastId)\r\n dispatch({\r\n type: \"REMOVE_TOAST\",\r\n toastId: toastId,\r\n })\r\n }, TOAST_REMOVE_DELAY)\r\n\r\n toastTimeouts.set(toastId, timeout)\r\n}\r\n\r\nexport const reducer = (state: State, action: Action): State => {\r\n switch (action.type) {\r\n case \"ADD_TOAST\":\r\n return {\r\n ...state,\r\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\r\n }\r\n\r\n case \"UPDATE_TOAST\":\r\n return {\r\n ...state,\r\n toasts: state.toasts.map((t) =>\r\n t.id === action.toast.id ? { ...t, ...action.toast } : t\r\n ),\r\n }\r\n\r\n case \"DISMISS_TOAST\": {\r\n const { toastId } = action\r\n\r\n // ! Side effects ! - This could be extracted into a dismissToast() action,\r\n // but I'll keep it here for simplicity\r\n if (toastId) {\r\n addToRemoveQueue(toastId)\r\n } else {\r\n state.toasts.forEach((toast) => {\r\n addToRemoveQueue(toast.id)\r\n })\r\n }\r\n\r\n return {\r\n ...state,\r\n toasts: state.toasts.map((t) =>\r\n t.id === toastId || toastId === undefined\r\n ? {\r\n ...t,\r\n open: false,\r\n }\r\n : t\r\n ),\r\n }\r\n }\r\n case \"REMOVE_TOAST\":\r\n if (action.toastId === undefined) {\r\n return {\r\n ...state,\r\n toasts: [],\r\n }\r\n }\r\n return {\r\n ...state,\r\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\r\n }\r\n }\r\n}\r\n\r\nconst listeners: Array<(state: State) => void> = []\r\n\r\nlet memoryState: State = { toasts: [] }\r\n\r\nfunction dispatch(action: Action) {\r\n memoryState = reducer(memoryState, action)\r\n listeners.forEach((listener) => {\r\n listener(memoryState)\r\n })\r\n}\r\n\r\ntype Toast = Omit\r\n\r\nfunction toast({ ...props }: Toast) {\r\n const id = genId()\r\n\r\n const update = (props: ToasterToast) =>\r\n dispatch({\r\n type: \"UPDATE_TOAST\",\r\n toast: { ...props, id },\r\n })\r\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\r\n\r\n dispatch({\r\n type: \"ADD_TOAST\",\r\n toast: {\r\n ...props,\r\n id,\r\n open: true,\r\n onOpenChange: (open) => {\r\n if (!open) dismiss()\r\n },\r\n },\r\n })\r\n\r\n return {\r\n id: id,\r\n dismiss,\r\n update,\r\n }\r\n}\r\n\r\nfunction useToast() {\r\n const [state, setState] = React.useState(memoryState)\r\n\r\n React.useEffect(() => {\r\n listeners.push(setState)\r\n return () => {\r\n const index = listeners.indexOf(setState)\r\n if (index > -1) {\r\n listeners.splice(index, 1)\r\n }\r\n }\r\n }, [state])\r\n\r\n return {\r\n ...state,\r\n toast,\r\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\r\n }\r\n}\r\n\r\nexport { useToast, toast }\r\n" }, { "name": "toaster.tsx", - "content": "\"use client\"\n\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from \"@/registry/new-york/ui/toast\"\nimport { useToast } from \"@/registry/new-york/ui/use-toast\"\n\nexport function Toaster() {\n const { toasts } = useToast()\n\n return (\n \n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n \n
\n {title && {title}}\n {description && (\n {description}\n )}\n
\n {action}\n \n
\n )\n })}\n \n
\n )\n}\n" + "content": "\"use client\"\r\n\r\nimport {\r\n Toast,\r\n ToastClose,\r\n ToastDescription,\r\n ToastProvider,\r\n ToastTitle,\r\n ToastViewport,\r\n} from \"@/registry/new-york/ui/toast\"\r\nimport { useToast } from \"@/registry/new-york/ui/use-toast\"\r\n\r\nexport function Toaster() {\r\n const { toasts } = useToast()\r\n\r\n return (\r\n \r\n {toasts.map(function ({ id, title, description, action, ...props }) {\r\n return (\r\n \r\n
\r\n {title && {title}}\r\n {description && (\r\n {description}\r\n )}\r\n
\r\n {action}\r\n \r\n
\r\n )\r\n })}\r\n \r\n
\r\n )\r\n}\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/toggle-group.json b/apps/www/public/registry/styles/new-york/toggle-group.json index d47906faefc..7282830fc00 100644 --- a/apps/www/public/registry/styles/new-york/toggle-group.json +++ b/apps/www/public/registry/styles/new-york/toggle-group.json @@ -9,7 +9,7 @@ "files": [ { "name": "toggle-group.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\nimport { VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { toggleVariants } from \"@/registry/new-york/ui/toggle\"\n\nconst ToggleGroupContext = React.createContext<\n VariantProps\n>({\n size: \"default\",\n variant: \"default\",\n})\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, size, children, ...props }, ref) => (\n \n \n {children}\n \n \n))\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext)\n\n return (\n \n {children}\n \n )\n})\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName\n\nexport { ToggleGroup, ToggleGroupItem }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\"\r\nimport { VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\nimport { toggleVariants } from \"@/registry/new-york/ui/toggle\"\r\n\r\nconst ToggleGroupContext = React.createContext<\r\n VariantProps\r\n>({\r\n size: \"default\",\r\n variant: \"default\",\r\n})\r\n\r\nconst ToggleGroup = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, size, children, ...props }, ref) => (\r\n \r\n \r\n {children}\r\n \r\n \r\n))\r\n\r\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName\r\n\r\nconst ToggleGroupItem = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, children, variant, size, ...props }, ref) => {\r\n const context = React.useContext(ToggleGroupContext)\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n})\r\n\r\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName\r\n\r\nexport { ToggleGroup, ToggleGroupItem }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/toggle.json b/apps/www/public/registry/styles/new-york/toggle.json index c51417ad689..b2aa55ab6bd 100644 --- a/apps/www/public/registry/styles/new-york/toggle.json +++ b/apps/www/public/registry/styles/new-york/toggle.json @@ -6,7 +6,7 @@ "files": [ { "name": "toggle.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline:\n \"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\n },\n size: {\n default: \"h-9 px-3\",\n sm: \"h-8 px-2\",\n lg: \"h-10 px-3\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst Toggle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, size, ...props }, ref) => (\n \n))\n\nToggle.displayName = TogglePrimitive.Root.displayName\n\nexport { Toggle, toggleVariants }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\"\r\nimport { cva, type VariantProps } from \"class-variance-authority\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst toggleVariants = cva(\r\n \"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-transparent\",\r\n outline:\r\n \"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground\",\r\n },\r\n size: {\r\n default: \"h-9 px-3\",\r\n sm: \"h-8 px-2\",\r\n lg: \"h-10 px-3\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n size: \"default\",\r\n },\r\n }\r\n)\r\n\r\nconst Toggle = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef &\r\n VariantProps\r\n>(({ className, variant, size, ...props }, ref) => (\r\n \r\n))\r\n\r\nToggle.displayName = TogglePrimitive.Root.displayName\r\n\r\nexport { Toggle, toggleVariants }\r\n" } ], "type": "components:ui" diff --git a/apps/www/public/registry/styles/new-york/tooltip.json b/apps/www/public/registry/styles/new-york/tooltip.json index 6ddc3201d34..098533fe6d7 100644 --- a/apps/www/public/registry/styles/new-york/tooltip.json +++ b/apps/www/public/registry/styles/new-york/tooltip.json @@ -6,7 +6,7 @@ "files": [ { "name": "tooltip.tsx", - "content": "\"use client\"\n\nimport * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, sideOffset = 4, ...props }, ref) => (\n \n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n" + "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nconst TooltipProvider = TooltipPrimitive.Provider\r\n\r\nconst Tooltip = TooltipPrimitive.Root\r\n\r\nconst TooltipTrigger = TooltipPrimitive.Trigger\r\n\r\nconst TooltipContent = React.forwardRef<\r\n React.ElementRef,\r\n React.ComponentPropsWithoutRef\r\n>(({ className, sideOffset = 4, ...props }, ref) => (\r\n \r\n))\r\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\r\n\r\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\r\n" } ], "type": "components:ui" diff --git a/apps/www/registry/material/example/accordion-demo.tsx b/apps/www/registry/material/example/accordion-demo.tsx new file mode 100644 index 00000000000..6d15f48a1b0 --- /dev/null +++ b/apps/www/registry/material/example/accordion-demo.tsx @@ -0,0 +1,32 @@ +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@/registry/new-york/ui/accordion" + +export default function AccordionDemo() { + return ( + + + Is it accessible? + + Yes. It adheres to the WAI-ARIA design pattern. + + + + Is it styled? + + Yes. It comes with default styles that matches the other + components' aesthetic. + + + + Is it animated? + + Yes. It's animated by default, but you can disable it if you prefer. + + + + ) +} diff --git a/apps/www/registry/material/example/alert-demo.tsx b/apps/www/registry/material/example/alert-demo.tsx new file mode 100644 index 00000000000..78ae6282006 --- /dev/null +++ b/apps/www/registry/material/example/alert-demo.tsx @@ -0,0 +1,19 @@ +import { RocketIcon } from "@radix-ui/react-icons" + +import { + Alert, + AlertDescription, + AlertTitle, +} from "@/registry/new-york/ui/alert" + +export default function AlertDemo() { + return ( + + + Heads up! + + You can add components to your app using the cli. + + + ) +} diff --git a/apps/www/registry/material/example/alert-destructive.tsx b/apps/www/registry/material/example/alert-destructive.tsx new file mode 100644 index 00000000000..f09ba842e74 --- /dev/null +++ b/apps/www/registry/material/example/alert-destructive.tsx @@ -0,0 +1,19 @@ +import { ExclamationTriangleIcon } from "@radix-ui/react-icons" + +import { + Alert, + AlertDescription, + AlertTitle, +} from "@/registry/new-york/ui/alert" + +export default function AlertDestructive() { + return ( + + + Error + + Your session has expired. Please log in again. + + + ) +} diff --git a/apps/www/registry/material/example/alert-dialog-demo.tsx b/apps/www/registry/material/example/alert-dialog-demo.tsx new file mode 100644 index 00000000000..2d2865ae98c --- /dev/null +++ b/apps/www/registry/material/example/alert-dialog-demo.tsx @@ -0,0 +1,35 @@ +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, +} from "@/registry/new-york/ui/alert-dialog" +import { Button } from "@/registry/new-york/ui/button" + +export default function AlertDialogDemo() { + return ( + + + + + + + Are you absolutely sure? + + This action cannot be undone. This will permanently delete your + account and remove your data from our servers. + + + + Cancel + Continue + + + + ) +} diff --git a/apps/www/registry/material/example/aspect-ratio-demo.tsx b/apps/www/registry/material/example/aspect-ratio-demo.tsx new file mode 100644 index 00000000000..2a06afa35b7 --- /dev/null +++ b/apps/www/registry/material/example/aspect-ratio-demo.tsx @@ -0,0 +1,16 @@ +import Image from "next/image" + +import { AspectRatio } from "@/registry/new-york/ui/aspect-ratio" + +export default function AspectRatioDemo() { + return ( + + Photo by Drew Beamer + + ) +} diff --git a/apps/www/registry/material/example/avatar-demo.tsx b/apps/www/registry/material/example/avatar-demo.tsx new file mode 100644 index 00000000000..0dadb8bb24b --- /dev/null +++ b/apps/www/registry/material/example/avatar-demo.tsx @@ -0,0 +1,14 @@ +import { + Avatar, + AvatarFallback, + AvatarImage, +} from "@/registry/new-york/ui/avatar" + +export default function AvatarDemo() { + return ( + + + CN + + ) +} diff --git a/apps/www/registry/material/example/badge-demo.tsx b/apps/www/registry/material/example/badge-demo.tsx new file mode 100644 index 00000000000..9695cb96ff6 --- /dev/null +++ b/apps/www/registry/material/example/badge-demo.tsx @@ -0,0 +1,5 @@ +import { Badge } from "@/registry/new-york/ui/badge" + +export default function BadgeDemo() { + return Badge +} diff --git a/apps/www/registry/material/example/badge-destructive.tsx b/apps/www/registry/material/example/badge-destructive.tsx new file mode 100644 index 00000000000..233729b18ae --- /dev/null +++ b/apps/www/registry/material/example/badge-destructive.tsx @@ -0,0 +1,5 @@ +import { Badge } from "@/registry/new-york/ui/badge" + +export default function BadgeDestructive() { + return Destructive +} diff --git a/apps/www/registry/material/example/badge-outline.tsx b/apps/www/registry/material/example/badge-outline.tsx new file mode 100644 index 00000000000..3a00a2f6030 --- /dev/null +++ b/apps/www/registry/material/example/badge-outline.tsx @@ -0,0 +1,5 @@ +import { Badge } from "@/registry/new-york/ui/badge" + +export default function BadgeOutline() { + return Outline +} diff --git a/apps/www/registry/material/example/badge-secondary.tsx b/apps/www/registry/material/example/badge-secondary.tsx new file mode 100644 index 00000000000..8d2769c3d69 --- /dev/null +++ b/apps/www/registry/material/example/badge-secondary.tsx @@ -0,0 +1,5 @@ +import { Badge } from "@/registry/new-york/ui/badge" + +export default function BadgeSecondary() { + return Secondary +} diff --git a/apps/www/registry/material/example/button-as-child.tsx b/apps/www/registry/material/example/button-as-child.tsx new file mode 100644 index 00000000000..141272fbc9f --- /dev/null +++ b/apps/www/registry/material/example/button-as-child.tsx @@ -0,0 +1,11 @@ +import Link from "next/link" + +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonAsChild() { + return ( + + ) +} diff --git a/apps/www/registry/material/example/button-demo.tsx b/apps/www/registry/material/example/button-demo.tsx new file mode 100644 index 00000000000..8ac7edc84db --- /dev/null +++ b/apps/www/registry/material/example/button-demo.tsx @@ -0,0 +1,5 @@ +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonDemo() { + return +} diff --git a/apps/www/registry/material/example/button-destructive.tsx b/apps/www/registry/material/example/button-destructive.tsx new file mode 100644 index 00000000000..104c93ee427 --- /dev/null +++ b/apps/www/registry/material/example/button-destructive.tsx @@ -0,0 +1,5 @@ +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonDestructive() { + return +} diff --git a/apps/www/registry/material/example/button-ghost.tsx b/apps/www/registry/material/example/button-ghost.tsx new file mode 100644 index 00000000000..efe9717b49b --- /dev/null +++ b/apps/www/registry/material/example/button-ghost.tsx @@ -0,0 +1,5 @@ +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonGhost() { + return +} diff --git a/apps/www/registry/material/example/button-icon.tsx b/apps/www/registry/material/example/button-icon.tsx new file mode 100644 index 00000000000..1478a4830f3 --- /dev/null +++ b/apps/www/registry/material/example/button-icon.tsx @@ -0,0 +1,11 @@ +import { ChevronRightIcon } from "@radix-ui/react-icons" + +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonIcon() { + return ( + + ) +} diff --git a/apps/www/registry/material/example/button-link.tsx b/apps/www/registry/material/example/button-link.tsx new file mode 100644 index 00000000000..bc234677a4d --- /dev/null +++ b/apps/www/registry/material/example/button-link.tsx @@ -0,0 +1,5 @@ +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonLink() { + return +} diff --git a/apps/www/registry/material/example/button-loading.tsx b/apps/www/registry/material/example/button-loading.tsx new file mode 100644 index 00000000000..df0ca032d49 --- /dev/null +++ b/apps/www/registry/material/example/button-loading.tsx @@ -0,0 +1,12 @@ +import { ReloadIcon } from "@radix-ui/react-icons" + +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonLoading() { + return ( + + ) +} diff --git a/apps/www/registry/material/example/button-outline.tsx b/apps/www/registry/material/example/button-outline.tsx new file mode 100644 index 00000000000..43499699a41 --- /dev/null +++ b/apps/www/registry/material/example/button-outline.tsx @@ -0,0 +1,5 @@ +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonOutline() { + return +} diff --git a/apps/www/registry/material/example/button-secondary.tsx b/apps/www/registry/material/example/button-secondary.tsx new file mode 100644 index 00000000000..ef2204d5a86 --- /dev/null +++ b/apps/www/registry/material/example/button-secondary.tsx @@ -0,0 +1,5 @@ +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonSecondary() { + return +} diff --git a/apps/www/registry/material/example/button-with-icon.tsx b/apps/www/registry/material/example/button-with-icon.tsx new file mode 100644 index 00000000000..df78483b5f5 --- /dev/null +++ b/apps/www/registry/material/example/button-with-icon.tsx @@ -0,0 +1,11 @@ +import { EnvelopeOpenIcon } from "@radix-ui/react-icons" + +import { Button } from "@/registry/new-york/ui/button" + +export default function ButtonWithIcon() { + return ( + + ) +} diff --git a/apps/www/registry/material/example/calendar-demo.tsx b/apps/www/registry/material/example/calendar-demo.tsx new file mode 100644 index 00000000000..14785800123 --- /dev/null +++ b/apps/www/registry/material/example/calendar-demo.tsx @@ -0,0 +1,18 @@ +"use client" + +import * as React from "react" + +import { Calendar } from "@/registry/new-york/ui/calendar" + +export default function CalendarDemo() { + const [date, setDate] = React.useState(new Date()) + + return ( + + ) +} diff --git a/apps/www/registry/material/example/calendar-form.tsx b/apps/www/registry/material/example/calendar-form.tsx new file mode 100644 index 00000000000..e769ca99d5a --- /dev/null +++ b/apps/www/registry/material/example/calendar-form.tsx @@ -0,0 +1,101 @@ +"use client" + +import { zodResolver } from "@hookform/resolvers/zod" +import { CalendarIcon } from "@radix-ui/react-icons" +import { format } from "date-fns" +import { useForm } from "react-hook-form" +import * as z from "zod" + +import { cn } from "@/lib/utils" +import { Button } from "@/registry/new-york/ui/button" +import { Calendar } from "@/registry/new-york/ui/calendar" +import { + Form, + FormControl, + FormDescription, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/registry/new-york/ui/form" +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/registry/new-york/ui/popover" +import { toast } from "@/registry/new-york/ui/use-toast" + +const FormSchema = z.object({ + dob: z.date({ + required_error: "A date of birth is required.", + }), +}) + +export default function CalendarForm() { + const form = useForm>({ + resolver: zodResolver(FormSchema), + }) + + function onSubmit(data: z.infer) { + toast({ + title: "You submitted the following values:", + description: ( +
+          {JSON.stringify(data, null, 2)}
+        
+ ), + }) + } + + return ( +
+ + ( + + Date of birth + + + + + + + + + date > new Date() || date < new Date("1900-01-01") + } + initialFocus + /> + + + + Your date of birth is used to calculate your age. + + + + )} + /> + + + + ) +} diff --git a/apps/www/registry/material/example/card-demo.tsx b/apps/www/registry/material/example/card-demo.tsx new file mode 100644 index 00000000000..1c3f8b17371 --- /dev/null +++ b/apps/www/registry/material/example/card-demo.tsx @@ -0,0 +1,78 @@ +import { BellIcon, CheckIcon } from "@radix-ui/react-icons" + +import { cn } from "@/lib/utils" +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { Switch } from "@/registry/new-york/ui/switch" + +const notifications = [ + { + title: "Your call has been confirmed.", + description: "1 hour ago", + }, + { + title: "You have a new message!", + description: "1 hour ago", + }, + { + title: "Your subscription is expiring soon!", + description: "2 hours ago", + }, +] + +type CardProps = React.ComponentProps + +export default function CardDemo({ className, ...props }: CardProps) { + return ( + + + Notifications + You have 3 unread messages. + + +
+ +
+

+ Push Notifications +

+

+ Send notifications to device. +

+
+ +
+
+ {notifications.map((notification, index) => ( +
+ +
+

+ {notification.title} +

+

+ {notification.description} +

+
+
+ ))} +
+
+ + + +
+ ) +} diff --git a/apps/www/registry/material/example/card-with-form.tsx b/apps/www/registry/material/example/card-with-form.tsx new file mode 100644 index 00000000000..dd77e264455 --- /dev/null +++ b/apps/www/registry/material/example/card-with-form.tsx @@ -0,0 +1,59 @@ +import * as React from "react" + +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { Input } from "@/registry/new-york/ui/input" +import { Label } from "@/registry/new-york/ui/label" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/registry/new-york/ui/select" + +export default function CardWithForm() { + return ( + + + Create project + Deploy your new project in one-click. + + +
+
+
+ + +
+
+ + +
+
+
+
+ + + + +
+ ) +} diff --git a/apps/www/registry/material/example/cards/activity-goal.tsx b/apps/www/registry/material/example/cards/activity-goal.tsx new file mode 100644 index 00000000000..1fc71b64d42 --- /dev/null +++ b/apps/www/registry/material/example/cards/activity-goal.tsx @@ -0,0 +1,132 @@ +"use client" + +import * as React from "react" +import { MinusIcon, PlusIcon } from "@radix-ui/react-icons" +import { useTheme } from "next-themes" +import { Bar, BarChart, ResponsiveContainer } from "recharts" + +import { useConfig } from "@/hooks/use-config" +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { themes } from "@/registry/themes" + +const data = [ + { + goal: 400, + }, + { + goal: 300, + }, + { + goal: 200, + }, + { + goal: 300, + }, + { + goal: 200, + }, + { + goal: 278, + }, + { + goal: 189, + }, + { + goal: 239, + }, + { + goal: 300, + }, + { + goal: 200, + }, + { + goal: 278, + }, + { + goal: 189, + }, + { + goal: 349, + }, +] + +export function CardsActivityGoal() { + const { theme: mode } = useTheme() + const [config] = useConfig() + + const theme = themes.find((theme) => theme.name === config.theme) + const [goal, setGoal] = React.useState(350) + + function onClick(adjustment: number) { + setGoal(Math.max(200, Math.min(400, goal + adjustment))) + } + + return ( + + + Move Goal + Set your daily activity goal. + + +
+ +
+
{goal}
+
+ Calories/day +
+
+ +
+
+ + + + + +
+
+ + + +
+ ) +} diff --git a/apps/www/registry/material/example/cards/calendar.tsx b/apps/www/registry/material/example/cards/calendar.tsx new file mode 100644 index 00000000000..4496a355e2e --- /dev/null +++ b/apps/www/registry/material/example/cards/calendar.tsx @@ -0,0 +1,26 @@ +"use client" + +import { addDays } from "date-fns" + +import { Calendar } from "@/registry/new-york/ui/calendar" +import { Card, CardContent } from "@/registry/new-york/ui/card" + +const start = new Date(2023, 5, 5) + +export function CardsCalendar() { + return ( + + + + + + ) +} diff --git a/apps/www/registry/material/example/cards/chat.tsx b/apps/www/registry/material/example/cards/chat.tsx new file mode 100644 index 00000000000..ccb8f596ae3 --- /dev/null +++ b/apps/www/registry/material/example/cards/chat.tsx @@ -0,0 +1,260 @@ +import * as React from "react" +import { CheckIcon, PaperPlaneIcon, PlusIcon } from "@radix-ui/react-icons" + +import { cn } from "@/lib/utils" +import { + Avatar, + AvatarFallback, + AvatarImage, +} from "@/registry/new-york/ui/avatar" +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardFooter, + CardHeader, +} from "@/registry/new-york/ui/card" +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from "@/registry/new-york/ui/command" +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/registry/new-york/ui/dialog" +import { Input } from "@/registry/new-york/ui/input" +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/registry/new-york/ui/tooltip" + +const users = [ + { + name: "Olivia Martin", + email: "m@example.com", + avatar: "/avatars/01.png", + }, + { + name: "Isabella Nguyen", + email: "isabella.nguyen@email.com", + avatar: "/avatars/03.png", + }, + { + name: "Emma Wilson", + email: "emma@example.com", + avatar: "/avatars/05.png", + }, + { + name: "Jackson Lee", + email: "lee@example.com", + avatar: "/avatars/02.png", + }, + { + name: "William Kim", + email: "will@email.com", + avatar: "/avatars/04.png", + }, +] as const + +type User = (typeof users)[number] + +export function CardsChat() { + const [open, setOpen] = React.useState(false) + const [selectedUsers, setSelectedUsers] = React.useState([]) + + const [messages, setMessages] = React.useState([ + { + role: "agent", + content: "Hi, how can I help you today?", + }, + { + role: "user", + content: "Hey, I'm having trouble with my account.", + }, + { + role: "agent", + content: "What seems to be the problem?", + }, + { + role: "user", + content: "I can't log in.", + }, + ]) + const [input, setInput] = React.useState("") + const inputLength = input.trim().length + + return ( + <> + + +
+ + + OM + +
+

Sofia Davis

+

m@example.com

+
+
+ + + + + + New message + + +
+ +
+ {messages.map((message, index) => ( +
+ {message.content} +
+ ))} +
+
+ +
{ + event.preventDefault() + if (inputLength === 0) return + setMessages([ + ...messages, + { + role: "user", + content: input, + }, + ]) + setInput("") + }} + className="flex w-full items-center space-x-2" + > + setInput(event.target.value)} + /> + +
+
+
+ + + + New message + + Invite a user to this thread. This will create a new group + message. + + + + + + No users found. + + {users.map((user) => ( + { + if (selectedUsers.includes(user)) { + return setSelectedUsers( + selectedUsers.filter( + (selectedUser) => selectedUser !== user + ) + ) + } + + return setSelectedUsers( + [...users].filter((u) => + [...selectedUsers, user].includes(u) + ) + ) + }} + > + + + {user.name[0]} + +
+

+ {user.name} +

+

+ {user.email} +

+
+ {selectedUsers.includes(user) ? ( + + ) : null} +
+ ))} +
+
+
+ + {selectedUsers.length > 0 ? ( +
+ {selectedUsers.map((user) => ( + + + {user.name[0]} + + ))} +
+ ) : ( +

+ Select users to add to this thread. +

+ )} + +
+
+
+ + ) +} diff --git a/apps/www/registry/material/example/cards/cookie-settings.tsx b/apps/www/registry/material/example/cards/cookie-settings.tsx new file mode 100644 index 00000000000..81448037484 --- /dev/null +++ b/apps/www/registry/material/example/cards/cookie-settings.tsx @@ -0,0 +1,60 @@ +"use client" + +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { Label } from "@/registry/new-york/ui/label" +import { Switch } from "@/registry/new-york/ui/switch" + +export function CardsCookieSettings() { + return ( + + + Cookie Settings + Manage your cookie settings here. + + +
+ + +
+
+ + +
+
+ + +
+
+ + + +
+ ) +} diff --git a/apps/www/registry/material/example/cards/create-account.tsx b/apps/www/registry/material/example/cards/create-account.tsx new file mode 100644 index 00000000000..49fcff83cbb --- /dev/null +++ b/apps/www/registry/material/example/cards/create-account.tsx @@ -0,0 +1,60 @@ +"use client" + +import { Icons } from "@/components/icons" +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { Input } from "@/registry/new-york/ui/input" +import { Label } from "@/registry/new-york/ui/label" + +export function CardsCreateAccount() { + return ( + + + Create an account + + Enter your email below to create your account + + + +
+ + +
+
+
+ +
+
+ + Or continue with + +
+
+
+ + +
+
+ + +
+
+ + + +
+ ) +} diff --git a/apps/www/registry/material/example/cards/data-table.tsx b/apps/www/registry/material/example/cards/data-table.tsx new file mode 100644 index 00000000000..ae812fe4e43 --- /dev/null +++ b/apps/www/registry/material/example/cards/data-table.tsx @@ -0,0 +1,332 @@ +"use client" + +import * as React from "react" +import { + CaretSortIcon, + ChevronDownIcon, + DotsHorizontalIcon, +} from "@radix-ui/react-icons" +import { + ColumnDef, + ColumnFiltersState, + SortingState, + VisibilityState, + flexRender, + getCoreRowModel, + getFilteredRowModel, + getPaginationRowModel, + getSortedRowModel, + useReactTable, +} from "@tanstack/react-table" + +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { Checkbox } from "@/registry/new-york/ui/checkbox" +import { + DropdownMenu, + DropdownMenuCheckboxItem, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/registry/new-york/ui/dropdown-menu" +import { Input } from "@/registry/new-york/ui/input" +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/registry/new-york/ui/table" + +const data: Payment[] = [ + { + id: "m5gr84i9", + amount: 316, + status: "success", + email: "ken99@yahoo.com", + }, + { + id: "3u1reuv4", + amount: 242, + status: "success", + email: "Abe45@gmail.com", + }, + { + id: "derv1ws0", + amount: 837, + status: "processing", + email: "Monserrat44@gmail.com", + }, + { + id: "5kma53ae", + amount: 874, + status: "success", + email: "Silas22@gmail.com", + }, + { + id: "bhqecj4p", + amount: 721, + status: "failed", + email: "carmella@hotmail.com", + }, +] + +export type Payment = { + id: string + amount: number + status: "pending" | "processing" | "success" | "failed" + email: string +} + +export const columns: ColumnDef[] = [ + { + id: "select", + header: ({ table }) => ( + table.toggleAllPageRowsSelected(!!value)} + aria-label="Select all" + /> + ), + cell: ({ row }) => ( + row.toggleSelected(!!value)} + aria-label="Select row" + /> + ), + enableSorting: false, + enableHiding: false, + }, + { + accessorKey: "status", + header: "Status", + cell: ({ row }) => ( +
{row.getValue("status")}
+ ), + }, + { + accessorKey: "email", + header: ({ column }) => { + return ( + + ) + }, + cell: ({ row }) =>
{row.getValue("email")}
, + }, + { + accessorKey: "amount", + header: () =>
Amount
, + cell: ({ row }) => { + const amount = parseFloat(row.getValue("amount")) + + // Format the amount as a dollar amount + const formatted = new Intl.NumberFormat("en-US", { + style: "currency", + currency: "USD", + }).format(amount) + + return
{formatted}
+ }, + }, + { + id: "actions", + enableHiding: false, + cell: ({ row }) => { + const payment = row.original + + return ( + + + + + + Actions + navigator.clipboard.writeText(payment.id)} + > + Copy payment ID + + + View customer + View payment details + + + ) + }, + }, +] + +export function CardsDataTable() { + const [sorting, setSorting] = React.useState([]) + const [columnFilters, setColumnFilters] = React.useState( + [] + ) + const [columnVisibility, setColumnVisibility] = + React.useState({}) + const [rowSelection, setRowSelection] = React.useState({}) + + const table = useReactTable({ + data, + columns, + onSortingChange: setSorting, + onColumnFiltersChange: setColumnFilters, + getCoreRowModel: getCoreRowModel(), + getPaginationRowModel: getPaginationRowModel(), + getSortedRowModel: getSortedRowModel(), + getFilteredRowModel: getFilteredRowModel(), + onColumnVisibilityChange: setColumnVisibility, + onRowSelectionChange: setRowSelection, + state: { + sorting, + columnFilters, + columnVisibility, + rowSelection, + }, + }) + + return ( + + + Payments + Manage your payments. + + +
+ + table.getColumn("email")?.setFilterValue(event.target.value) + } + className="max-w-sm" + /> + + + + + + {table + .getAllColumns() + .filter((column) => column.getCanHide()) + .map((column) => { + return ( + + column.toggleVisibility(!!value) + } + > + {column.id} + + ) + })} + + +
+
+ + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => { + return ( + + {header.isPlaceholder + ? null + : flexRender( + header.column.columnDef.header, + header.getContext() + )} + + ) + })} + + ))} + + + {table.getRowModel().rows?.length ? ( + table.getRowModel().rows.map((row) => ( + + {row.getVisibleCells().map((cell) => ( + + {flexRender( + cell.column.columnDef.cell, + cell.getContext() + )} + + ))} + + )) + ) : ( + + + No results. + + + )} + +
+
+
+
+ {table.getFilteredSelectedRowModel().rows.length} of{" "} + {table.getFilteredRowModel().rows.length} row(s) selected. +
+
+ + +
+
+
+
+ ) +} diff --git a/apps/www/registry/material/example/cards/index.tsx b/apps/www/registry/material/example/cards/index.tsx new file mode 100644 index 00000000000..856358529cd --- /dev/null +++ b/apps/www/registry/material/example/cards/index.tsx @@ -0,0 +1,63 @@ +import { CardsActivityGoal } from "@/registry/new-york/example/cards/activity-goal" +import { CardsCalendar } from "@/registry/new-york/example/cards/calendar" +import { CardsChat } from "@/registry/new-york/example/cards/chat" +import { CardsCookieSettings } from "@/registry/new-york/example/cards/cookie-settings" +import { CardsCreateAccount } from "@/registry/new-york/example/cards/create-account" +import { CardsDataTable } from "@/registry/new-york/example/cards/data-table" +import { CardsMetric } from "@/registry/new-york/example/cards/metric" +import { CardsPaymentMethod } from "@/registry/new-york/example/cards/payment-method" +import { CardsReportIssue } from "@/registry/new-york/example/cards/report-issue" +import { CardsShare } from "@/registry/new-york/example/cards/share" +import { CardsStats } from "@/registry/new-york/example/cards/stats" +import { CardsTeamMembers } from "@/registry/new-york/example/cards/team-members" + +export default function CardsDemo() { + return ( +
+
+ +
+ +
+ +
+
+ +
+
+
+
+ + + +
+
+ + +
+ +
+
+
+
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+ +
+
+
+ ) +} diff --git a/apps/www/registry/material/example/cards/metric.tsx b/apps/www/registry/material/example/cards/metric.tsx new file mode 100644 index 00000000000..7f4aa9a59d1 --- /dev/null +++ b/apps/www/registry/material/example/cards/metric.tsx @@ -0,0 +1,142 @@ +import { useTheme } from "next-themes" +import { Line, LineChart, ResponsiveContainer, Tooltip } from "recharts" + +import { useConfig } from "@/hooks/use-config" +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { themes } from "@/registry/themes" + +const data = [ + { + average: 400, + today: 240, + }, + { + average: 300, + today: 139, + }, + { + average: 200, + today: 980, + }, + { + average: 278, + today: 390, + }, + { + average: 189, + today: 480, + }, + { + average: 239, + today: 380, + }, + { + average: 349, + today: 430, + }, +] + +export function CardsMetric() { + const { theme: mode } = useTheme() + const [config] = useConfig() + + const theme = themes.find((theme) => theme.name === config.theme) + + return ( + + + Exercise Minutes + + Your excercise minutes are ahead of where you normally are. + + + +
+ + + { + if (active && payload && payload.length) { + return ( +
+
+
+ + Average + + + {payload[0].value} + +
+
+ + Today + + + {payload[1].value} + +
+
+
+ ) + } + + return null + }} + /> + + +
+
+
+
+
+ ) +} diff --git a/apps/www/registry/material/example/cards/payment-method.tsx b/apps/www/registry/material/example/cards/payment-method.tsx new file mode 100644 index 00000000000..d5f69dfd549 --- /dev/null +++ b/apps/www/registry/material/example/cards/payment-method.tsx @@ -0,0 +1,154 @@ +"use client" + +import { Icons } from "@/components/icons" +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { Input } from "@/registry/new-york/ui/input" +import { Label } from "@/registry/new-york/ui/label" +import { RadioGroup, RadioGroupItem } from "@/registry/new-york/ui/radio-group" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/registry/new-york/ui/select" + +export function CardsPaymentMethod() { + return ( + + + Payment Method + + Add a new payment method to your account. + + + + +
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + + +
+ ) +} diff --git a/apps/www/registry/material/example/cards/report-issue.tsx b/apps/www/registry/material/example/cards/report-issue.tsx new file mode 100644 index 00000000000..f33d5ef7951 --- /dev/null +++ b/apps/www/registry/material/example/cards/report-issue.tsx @@ -0,0 +1,90 @@ +"use client" + +import * as React from "react" + +import { Button } from "@/registry/new-york/ui/button" +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/registry/new-york/ui/card" +import { Input } from "@/registry/new-york/ui/input" +import { Label } from "@/registry/new-york/ui/label" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/registry/new-york/ui/select" +import { Textarea } from "@/registry/new-york/ui/textarea" + +export function CardsReportIssue() { + const id = React.useId() + + return ( + + + Report an issue + + What area are you having problems with? + + + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ +