fulldev-ui 0.25.0 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/liquid/README.md +1 -1
- package/liquid/assets/ui-licenses.json +1 -1
- package/liquid/assets/ui-manifest.json +1 -1
- package/package.json +4 -2
- package/public/r/liquid/components.json +1 -1
- package/public/r/liquid/init.json +1 -1
- package/public/r/styles/base-luma/button-examples.json +2 -2
- package/public/r/styles/base-luma/collapsible-examples.json +1 -1
- package/public/r/styles/base-luma/combobox-examples.json +1 -1
- package/public/r/styles/base-luma/combobox.json +1 -1
- package/public/r/styles/base-luma/input-group-examples.json +2 -2
- package/public/r/styles/base-luma/item-examples.json +1 -1
- package/public/r/styles/base-luma/select.json +1 -1
- package/public/r/styles/base-luma/tabs.json +1 -1
- package/public/r/styles/base-luma/tooltip-examples.json +1 -1
- package/public/r/styles/base-lyra/button-examples.json +2 -2
- package/public/r/styles/base-lyra/collapsible-examples.json +1 -1
- package/public/r/styles/base-lyra/combobox-examples.json +1 -1
- package/public/r/styles/base-lyra/combobox.json +1 -1
- package/public/r/styles/base-lyra/input-group-examples.json +2 -2
- package/public/r/styles/base-lyra/item-examples.json +1 -1
- package/public/r/styles/base-lyra/select.json +1 -1
- package/public/r/styles/base-lyra/tabs.json +1 -1
- package/public/r/styles/base-lyra/tooltip-examples.json +1 -1
- package/public/r/styles/base-maia/button-examples.json +2 -2
- package/public/r/styles/base-maia/collapsible-examples.json +1 -1
- package/public/r/styles/base-maia/combobox-examples.json +1 -1
- package/public/r/styles/base-maia/combobox.json +1 -1
- package/public/r/styles/base-maia/input-group-examples.json +2 -2
- package/public/r/styles/base-maia/item-examples.json +1 -1
- package/public/r/styles/base-maia/select.json +1 -1
- package/public/r/styles/base-maia/tabs.json +1 -1
- package/public/r/styles/base-maia/tooltip-examples.json +1 -1
- package/public/r/styles/base-mira/button-examples.json +2 -2
- package/public/r/styles/base-mira/collapsible-examples.json +1 -1
- package/public/r/styles/base-mira/combobox-examples.json +1 -1
- package/public/r/styles/base-mira/combobox.json +1 -1
- package/public/r/styles/base-mira/input-group-examples.json +2 -2
- package/public/r/styles/base-mira/item-examples.json +1 -1
- package/public/r/styles/base-mira/select.json +1 -1
- package/public/r/styles/base-mira/tabs.json +1 -1
- package/public/r/styles/base-mira/tooltip-examples.json +1 -1
- package/public/r/styles/base-nova/button-examples.json +2 -2
- package/public/r/styles/base-nova/collapsible-examples.json +1 -1
- package/public/r/styles/base-nova/combobox-examples.json +1 -1
- package/public/r/styles/base-nova/combobox.json +1 -1
- package/public/r/styles/base-nova/input-group-examples.json +2 -2
- package/public/r/styles/base-nova/item-examples.json +1 -1
- package/public/r/styles/base-nova/select.json +1 -1
- package/public/r/styles/base-nova/tabs.json +1 -1
- package/public/r/styles/base-nova/tooltip-examples.json +1 -1
- package/public/r/styles/base-rhea/button-examples.json +2 -2
- package/public/r/styles/base-rhea/collapsible-examples.json +1 -1
- package/public/r/styles/base-rhea/combobox-examples.json +1 -1
- package/public/r/styles/base-rhea/combobox.json +1 -1
- package/public/r/styles/base-rhea/input-group-examples.json +2 -2
- package/public/r/styles/base-rhea/item-examples.json +1 -1
- package/public/r/styles/base-rhea/select.json +1 -1
- package/public/r/styles/base-rhea/tabs.json +1 -1
- package/public/r/styles/base-rhea/tooltip-examples.json +1 -1
- package/public/r/styles/base-sera/button-examples.json +2 -2
- package/public/r/styles/base-sera/collapsible-examples.json +1 -1
- package/public/r/styles/base-sera/combobox-examples.json +1 -1
- package/public/r/styles/base-sera/combobox.json +1 -1
- package/public/r/styles/base-sera/input-group-examples.json +2 -2
- package/public/r/styles/base-sera/item-examples.json +1 -1
- package/public/r/styles/base-sera/select.json +1 -1
- package/public/r/styles/base-sera/tabs.json +1 -1
- package/public/r/styles/base-sera/tooltip-examples.json +1 -1
- package/public/r/styles/base-vega/button-examples.json +2 -2
- package/public/r/styles/base-vega/collapsible-examples.json +1 -1
- package/public/r/styles/base-vega/combobox-examples.json +1 -1
- package/public/r/styles/base-vega/combobox.json +1 -1
- package/public/r/styles/base-vega/input-group-examples.json +2 -2
- package/public/r/styles/base-vega/item-examples.json +1 -1
- package/public/r/styles/base-vega/select.json +1 -1
- package/public/r/styles/base-vega/tabs.json +1 -1
- package/public/r/styles/base-vega/tooltip-examples.json +1 -1
- package/liquid/vendor.json +0 -180
- package/public/r/accordion-examples.json +0 -49
- package/public/r/accordion.json +0 -42
- package/public/r/alert-dialog-examples.json +0 -51
- package/public/r/alert-dialog.json +0 -84
- package/public/r/alert-examples.json +0 -47
- package/public/r/alert.json +0 -38
- package/public/r/article-1.json +0 -22
- package/public/r/article-2.json +0 -22
- package/public/r/articles-1.json +0 -22
- package/public/r/articles-2.json +0 -23
- package/public/r/articles-3.json +0 -22
- package/public/r/articles-4.json +0 -22
- package/public/r/aspect-ratio-examples.json +0 -33
- package/public/r/aspect-ratio.json +0 -23
- package/public/r/attachment-examples.json +0 -48
- package/public/r/attachment.json +0 -66
- package/public/r/avatar-examples.json +0 -68
- package/public/r/avatar.json +0 -48
- package/public/r/badge-examples.json +0 -52
- package/public/r/badge.json +0 -28
- package/public/r/banner-1.json +0 -24
- package/public/r/banner-2.json +0 -22
- package/public/r/banner.json +0 -31
- package/public/r/base.json +0 -143
- package/public/r/blocks-1.json +0 -27
- package/public/r/blocks.json +0 -92
- package/public/r/breadcrumb-examples.json +0 -53
- package/public/r/breadcrumb.json +0 -56
- package/public/r/button-examples.json +0 -87
- package/public/r/button-group-examples.json +0 -75
- package/public/r/button-group.json +0 -41
- package/public/r/button.json +0 -28
- package/public/r/card-examples.json +0 -51
- package/public/r/card.json +0 -53
- package/public/r/carousel-examples.json +0 -49
- package/public/r/carousel.json +0 -50
- package/public/r/checkbox-examples.json +0 -56
- package/public/r/checkbox.json +0 -23
- package/public/r/code-block-examples.json +0 -33
- package/public/r/code-block.json +0 -65
- package/public/r/collapsible-examples.json +0 -51
- package/public/r/collapsible.json +0 -36
- package/public/r/combobox-examples.json +0 -69
- package/public/r/combobox.json +0 -81
- package/public/r/command-examples.json +0 -47
- package/public/r/command.json +0 -71
- package/public/r/components.json +0 -74
- package/public/r/contact-1.json +0 -23
- package/public/r/contact-2.json +0 -23
- package/public/r/contact-3.json +0 -29
- package/public/r/content-1.json +0 -31
- package/public/r/content-2.json +0 -31
- package/public/r/content-3.json +0 -28
- package/public/r/content-4.json +0 -31
- package/public/r/cta-1.json +0 -24
- package/public/r/cta-2.json +0 -30
- package/public/r/cta-3.json +0 -24
- package/public/r/cta-4.json +0 -30
- package/public/r/cta-5.json +0 -31
- package/public/r/cta-6.json +0 -30
- package/public/r/cta-7.json +0 -23
- package/public/r/cta-8.json +0 -22
- package/public/r/dialog-examples.json +0 -47
- package/public/r/dialog.json +0 -75
- package/public/r/doc-1.json +0 -30
- package/public/r/drawer-examples.json +0 -54
- package/public/r/drawer.json +0 -109
- package/public/r/dropdown-menu-examples.json +0 -63
- package/public/r/dropdown-menu.json +0 -77
- package/public/r/empty-examples.json +0 -55
- package/public/r/empty.json +0 -48
- package/public/r/faqs-1.json +0 -23
- package/public/r/faqs-2.json +0 -23
- package/public/r/faqs-3.json +0 -23
- package/public/r/faqs-4.json +0 -22
- package/public/r/features-1.json +0 -26
- package/public/r/features-2.json +0 -22
- package/public/r/features-3.json +0 -21
- package/public/r/features-4.json +0 -26
- package/public/r/features-5.json +0 -22
- package/public/r/features-6.json +0 -23
- package/public/r/field-examples.json +0 -86
- package/public/r/field.json +0 -72
- package/public/r/footer-1.json +0 -24
- package/public/r/footer-2.json +0 -24
- package/public/r/footer-3.json +0 -24
- package/public/r/form.json +0 -23
- package/public/r/header-1.json +0 -29
- package/public/r/header-2.json +0 -29
- package/public/r/header-3.json +0 -30
- package/public/r/header-4.json +0 -29
- package/public/r/header-5.json +0 -30
- package/public/r/header.json +0 -40
- package/public/r/hero-1.json +0 -23
- package/public/r/hero-10.json +0 -24
- package/public/r/hero-11.json +0 -24
- package/public/r/hero-12.json +0 -22
- package/public/r/hero-13.json +0 -22
- package/public/r/hero-2.json +0 -24
- package/public/r/hero-3.json +0 -22
- package/public/r/hero-4.json +0 -25
- package/public/r/hero-5.json +0 -27
- package/public/r/hero-6.json +0 -27
- package/public/r/hero-7.json +0 -27
- package/public/r/hero-8.json +0 -22
- package/public/r/hero-9.json +0 -27
- package/public/r/hover-card-examples.json +0 -29
- package/public/r/hover-card.json +0 -37
- package/public/r/icon.json +0 -27
- package/public/r/init.json +0 -44
- package/public/r/input-examples.json +0 -97
- package/public/r/input-group-examples.json +0 -91
- package/public/r/input-group.json +0 -53
- package/public/r/input.json +0 -23
- package/public/r/item-examples.json +0 -74
- package/public/r/item.json +0 -71
- package/public/r/kbd-examples.json +0 -50
- package/public/r/kbd.json +0 -28
- package/public/r/label-examples.json +0 -24
- package/public/r/label.json +0 -23
- package/public/r/layout.json +0 -41
- package/public/r/links-2.json +0 -24
- package/public/r/logo.json +0 -33
- package/public/r/logos-1.json +0 -22
- package/public/r/logos-2.json +0 -23
- package/public/r/logos-3.json +0 -22
- package/public/r/marquee.json +0 -46
- package/public/r/native-select-examples.json +0 -38
- package/public/r/native-select.json +0 -36
- package/public/r/navigation-menu-examples.json +0 -26
- package/public/r/navigation-menu.json +0 -67
- package/public/r/pagination-examples.json +0 -35
- package/public/r/pagination.json +0 -59
- package/public/r/popover-examples.json +0 -42
- package/public/r/popover.json +0 -51
- package/public/r/price.json +0 -38
- package/public/r/pricing-1.json +0 -29
- package/public/r/pricing-2.json +0 -28
- package/public/r/pricing-3.json +0 -29
- package/public/r/product-1.json +0 -24
- package/public/r/products-1.json +0 -24
- package/public/r/products-2.json +0 -24
- package/public/r/products-3.json +0 -24
- package/public/r/products-4.json +0 -24
- package/public/r/products-5.json +0 -25
- package/public/r/progress-examples.json +0 -33
- package/public/r/progress.json +0 -23
- package/public/r/radio-group-examples.json +0 -50
- package/public/r/radio-group.json +0 -31
- package/public/r/rating.json +0 -26
- package/public/r/registry.json +0 -6959
- package/public/r/resizable-examples.json +0 -33
- package/public/r/resizable.json +0 -36
- package/public/r/reviews-1.json +0 -27
- package/public/r/reviews-2.json +0 -27
- package/public/r/reviews-3.json +0 -27
- package/public/r/reviews-4.json +0 -25
- package/public/r/reviews-5.json +0 -27
- package/public/r/section.json +0 -38
- package/public/r/select-examples.json +0 -53
- package/public/r/select.json +0 -62
- package/public/r/separator-examples.json +0 -38
- package/public/r/separator.json +0 -23
- package/public/r/services-1.json +0 -32
- package/public/r/services-2.json +0 -29
- package/public/r/services-3.json +0 -29
- package/public/r/services-4.json +0 -31
- package/public/r/services-5.json +0 -26
- package/public/r/services-6.json +0 -32
- package/public/r/services-7.json +0 -32
- package/public/r/sheet-examples.json +0 -37
- package/public/r/sheet.json +0 -66
- package/public/r/sidebar-1.json +0 -35
- package/public/r/sidebar-examples.json +0 -24
- package/public/r/sidebar.json +0 -146
- package/public/r/skeleton-examples.json +0 -49
- package/public/r/skeleton.json +0 -23
- package/public/r/slider-examples.json +0 -44
- package/public/r/slider.json +0 -26
- package/public/r/spinner-examples.json +0 -61
- package/public/r/spinner.json +0 -26
- package/public/r/switch-examples.json +0 -50
- package/public/r/switch.json +0 -26
- package/public/r/table-examples.json +0 -38
- package/public/r/table.json +0 -58
- package/public/r/tabs-examples.json +0 -47
- package/public/r/tabs.json +0 -46
- package/public/r/textarea-examples.json +0 -45
- package/public/r/textarea.json +0 -23
- package/public/r/theme-toggle.json +0 -34
- package/public/r/toast-examples.json +0 -29
- package/public/r/toast.json +0 -80
- package/public/r/toc.json +0 -43
- package/public/r/toggle-examples.json +0 -46
- package/public/r/toggle-group-examples.json +0 -57
- package/public/r/toggle-group.json +0 -34
- package/public/r/toggle.json +0 -31
- package/public/r/tooltip-examples.json +0 -43
- package/public/r/tooltip.json +0 -36
- package/public/r/typography.json +0 -103
- package/public/r/video.json +0 -23
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "table-examples",
|
|
4
|
-
"title": "Table examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Table docs.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro"
|
|
8
|
-
],
|
|
9
|
-
"registryDependencies": [
|
|
10
|
-
"@fulldev/button",
|
|
11
|
-
"@fulldev/dropdown-menu",
|
|
12
|
-
"@fulldev/table"
|
|
13
|
-
],
|
|
14
|
-
"files": [
|
|
15
|
-
{
|
|
16
|
-
"path": "src/components/examples/table/table-actions.astro",
|
|
17
|
-
"content": "---\nimport MoreHorizontalIcon from \"@lucide/astro/icons/ellipsis\"\n\nimport { buttonVariants } from \"@/components/ui/button\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/components/ui/table\"\n\nconst products = [\n { name: \"Wireless Mouse\", price: \"$29.99\" },\n { name: \"Mechanical Keyboard\", price: \"$129.99\" },\n { name: \"USB-C Hub\", price: \"$49.99\" },\n]\n---\n\n<Table>\n <TableHeader>\n <TableRow>\n <TableHead>Product</TableHead>\n <TableHead>Price</TableHead>\n <TableHead class=\"text-right\">Actions</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {products.map((product) => (\n <TableRow>\n <TableCell class=\"font-medium\">{product.name}</TableCell>\n <TableCell>{product.price}</TableCell>\n <TableCell class=\"text-right\">\n <DropdownMenu>\n <DropdownMenuTrigger\n class={buttonVariants({\n variant: \"ghost\",\n size: \"icon\",\n class: \"size-8\",\n })}\n >\n <MoreHorizontalIcon />\n <span class=\"sr-only\">Open menu</span>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem>Edit</DropdownMenuItem>\n <DropdownMenuItem>Duplicate</DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem variant=\"destructive\">Delete</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n</Table>\n",
|
|
18
|
-
"type": "registry:component"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"path": "src/components/examples/table/table-demo.astro",
|
|
22
|
-
"content": "---\nimport {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/components/ui/table\"\n\nconst invoices = [\n {\n invoice: \"INV001\",\n paymentStatus: \"Paid\",\n totalAmount: \"$250.00\",\n paymentMethod: \"Credit Card\",\n },\n {\n invoice: \"INV002\",\n paymentStatus: \"Pending\",\n totalAmount: \"$150.00\",\n paymentMethod: \"PayPal\",\n },\n {\n invoice: \"INV003\",\n paymentStatus: \"Unpaid\",\n totalAmount: \"$350.00\",\n paymentMethod: \"Bank Transfer\",\n },\n {\n invoice: \"INV004\",\n paymentStatus: \"Paid\",\n totalAmount: \"$450.00\",\n paymentMethod: \"Credit Card\",\n },\n {\n invoice: \"INV005\",\n paymentStatus: \"Paid\",\n totalAmount: \"$550.00\",\n paymentMethod: \"PayPal\",\n },\n {\n invoice: \"INV006\",\n paymentStatus: \"Pending\",\n totalAmount: \"$200.00\",\n paymentMethod: \"Bank Transfer\",\n },\n {\n invoice: \"INV007\",\n paymentStatus: \"Unpaid\",\n totalAmount: \"$300.00\",\n paymentMethod: \"Credit Card\",\n },\n]\n---\n\n<Table>\n <TableCaption>A list of your recent invoices.</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead class=\"w-[100px]\">Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Method</TableHead>\n <TableHead class=\"text-right\">Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {invoices.map((invoice) => (\n <TableRow>\n <TableCell class=\"font-medium\">{invoice.invoice}</TableCell>\n <TableCell>{invoice.paymentStatus}</TableCell>\n <TableCell>{invoice.paymentMethod}</TableCell>\n <TableCell class=\"text-right\">{invoice.totalAmount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TableCell colspan={3}>Total</TableCell>\n <TableCell class=\"text-right\">$2,500.00</TableCell>\n </TableRow>\n </TableFooter>\n</Table>\n",
|
|
23
|
-
"type": "registry:component"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"path": "src/components/examples/table/table-footer.astro",
|
|
27
|
-
"content": "---\nimport {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/components/ui/table\"\n\nconst invoices = [\n {\n invoice: \"INV001\",\n paymentStatus: \"Paid\",\n totalAmount: \"$250.00\",\n paymentMethod: \"Credit Card\",\n },\n {\n invoice: \"INV002\",\n paymentStatus: \"Pending\",\n totalAmount: \"$150.00\",\n paymentMethod: \"PayPal\",\n },\n {\n invoice: \"INV003\",\n paymentStatus: \"Unpaid\",\n totalAmount: \"$350.00\",\n paymentMethod: \"Bank Transfer\",\n },\n {\n invoice: \"INV004\",\n paymentStatus: \"Paid\",\n totalAmount: \"$450.00\",\n paymentMethod: \"Credit Card\",\n },\n {\n invoice: \"INV005\",\n paymentStatus: \"Paid\",\n totalAmount: \"$550.00\",\n paymentMethod: \"PayPal\",\n },\n {\n invoice: \"INV006\",\n paymentStatus: \"Pending\",\n totalAmount: \"$200.00\",\n paymentMethod: \"Bank Transfer\",\n },\n {\n invoice: \"INV007\",\n paymentStatus: \"Unpaid\",\n totalAmount: \"$300.00\",\n paymentMethod: \"Credit Card\",\n },\n]\n---\n\n<Table>\n <TableCaption>A list of your recent invoices.</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead class=\"w-[100px]\">Invoice</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Method</TableHead>\n <TableHead class=\"text-right\">Amount</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {invoices.slice(0, 3).map((invoice) => (\n <TableRow>\n <TableCell class=\"font-medium\">{invoice.invoice}</TableCell>\n <TableCell>{invoice.paymentStatus}</TableCell>\n <TableCell>{invoice.paymentMethod}</TableCell>\n <TableCell class=\"text-right\">{invoice.totalAmount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TableCell colspan={3}>Total</TableCell>\n <TableCell class=\"text-right\">$2,500.00</TableCell>\n </TableRow>\n </TableFooter>\n</Table>\n",
|
|
28
|
-
"type": "registry:component"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"path": "src/components/examples/table/table-rtl.astro",
|
|
32
|
-
"content": "---\nimport {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n} from \"@/components/ui/table\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n caption: \"A list of your recent invoices.\",\n invoice: \"Invoice\",\n status: \"Status\",\n method: \"Method\",\n amount: \"Amount\",\n paid: \"Paid\",\n pending: \"Pending\",\n unpaid: \"Unpaid\",\n creditCard: \"Credit Card\",\n paypal: \"PayPal\",\n bankTransfer: \"Bank Transfer\",\n total: \"Total\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n caption: \"قائمة بفواتيرك الأخيرة.\",\n invoice: \"الفاتورة\",\n status: \"الحالة\",\n method: \"الطريقة\",\n amount: \"المبلغ\",\n paid: \"مدفوع\",\n pending: \"قيد الانتظار\",\n unpaid: \"غير مدفوع\",\n creditCard: \"بطاقة ائتمانية\",\n paypal: \"PayPal\",\n bankTransfer: \"تحويل بنكي\",\n total: \"المجموع\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n caption: \"רשימת החשבוניות האחרונות שלך.\",\n invoice: \"חשבונית\",\n status: \"סטטוס\",\n method: \"שיטה\",\n amount: \"סכום\",\n paid: \"שולם\",\n pending: \"ממתין\",\n unpaid: \"לא שולם\",\n creditCard: \"כרטיס אשראי\",\n paypal: \"PayPal\",\n bankTransfer: \"העברה בנקאית\",\n total: 'סה\"כ',\n },\n },\n} as const\n\nconst invoices = [\n {\n invoice: \"INV001\",\n paymentStatus: \"paid\" as const,\n totalAmount: \"$250.00\",\n paymentMethod: \"creditCard\" as const,\n },\n {\n invoice: \"INV002\",\n paymentStatus: \"pending\" as const,\n totalAmount: \"$150.00\",\n paymentMethod: \"paypal\" as const,\n },\n {\n invoice: \"INV003\",\n paymentStatus: \"unpaid\" as const,\n totalAmount: \"$350.00\",\n paymentMethod: \"bankTransfer\" as const,\n },\n {\n invoice: \"INV004\",\n paymentStatus: \"paid\" as const,\n totalAmount: \"$450.00\",\n paymentMethod: \"creditCard\" as const,\n },\n {\n invoice: \"INV005\",\n paymentStatus: \"paid\" as const,\n totalAmount: \"$550.00\",\n paymentMethod: \"paypal\" as const,\n },\n {\n invoice: \"INV006\",\n paymentStatus: \"pending\" as const,\n totalAmount: \"$200.00\",\n paymentMethod: \"bankTransfer\" as const,\n },\n {\n invoice: \"INV007\",\n paymentStatus: \"unpaid\" as const,\n totalAmount: \"$300.00\",\n paymentMethod: \"creditCard\" as const,\n },\n]\n\nconst { dir, values: t } = translations.ar\n---\n\n<Table dir={dir}>\n <TableCaption>{t.caption}</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead class=\"w-[100px]\">{t.invoice}</TableHead>\n <TableHead>{t.status}</TableHead>\n <TableHead>{t.method}</TableHead>\n <TableHead class=\"text-right\">{t.amount}</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {invoices.map((invoice) => (\n <TableRow>\n <TableCell class=\"font-medium\">{invoice.invoice}</TableCell>\n <TableCell>{t[invoice.paymentStatus]}</TableCell>\n <TableCell>{t[invoice.paymentMethod]}</TableCell>\n <TableCell class=\"text-right\">{invoice.totalAmount}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooter>\n <TableRow>\n <TableCell colspan={3}>{t.total}</TableCell>\n <TableCell class=\"text-right\">$2,500.00</TableCell>\n </TableRow>\n </TableFooter>\n</Table>\n",
|
|
33
|
-
"type": "registry:component"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"docs": "https://ui.full.dev/components/table/",
|
|
37
|
-
"type": "registry:example"
|
|
38
|
-
}
|
package/public/r/table.json
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "table",
|
|
4
|
-
"title": "Table",
|
|
5
|
-
"description": "A data table component that displays information in rows and columns.",
|
|
6
|
-
"files": [
|
|
7
|
-
{
|
|
8
|
-
"path": "src/components/ui/table/table.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"table\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div data-slot=\"table-container\" class=\"relative w-full overflow-x-auto\">\n <table data-slot=\"table\" class={cn(\"w-full caption-bottom text-sm\", className)} {...props}>\n <slot />\n </table>\n</div>\n",
|
|
10
|
-
"type": "registry:ui"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"path": "src/components/ui/table/table-body.astro",
|
|
14
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"tbody\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<tbody data-slot=\"table-body\" class={cn(\"[&_tr:last-child]:border-0\", className)} {...props}>\n <slot />\n</tbody>\n",
|
|
15
|
-
"type": "registry:ui"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"path": "src/components/ui/table/table-caption.astro",
|
|
19
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"caption\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<caption\n data-slot=\"table-caption\"\n class={cn(\"text-muted-foreground mt-4 text-sm\", className)}\n {...props}\n>\n <slot />\n</caption>\n",
|
|
20
|
-
"type": "registry:ui"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"path": "src/components/ui/table/table-cell.astro",
|
|
24
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"td\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<td data-slot=\"table-cell\" class={cn(\"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0\", className)} {...props}>\n <slot />\n</td>\n",
|
|
25
|
-
"type": "registry:ui"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"path": "src/components/ui/table/table-footer.astro",
|
|
29
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"tfoot\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<tfoot\n data-slot=\"table-footer\"\n class={cn(\"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0\", className)}\n {...props}\n>\n <slot />\n</tfoot>\n",
|
|
30
|
-
"type": "registry:ui"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"path": "src/components/ui/table/table-head.astro",
|
|
34
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"th\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<th data-slot=\"table-head\" class={cn(\"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0\", className)} {...props}>\n <slot />\n</th>\n",
|
|
35
|
-
"type": "registry:ui"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"path": "src/components/ui/table/table-header.astro",
|
|
39
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"thead\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<thead\n data-slot=\"table-header\"\n class={cn(\"[&_tr]:border-b\", className)}\n {...props}\n>\n <slot />\n</thead>\n",
|
|
40
|
-
"type": "registry:ui"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"path": "src/components/ui/table/table-row.astro",
|
|
44
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"tr\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<tr\n data-slot=\"table-row\"\n class={cn(\"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50\", className)}\n {...props}\n>\n <slot />\n</tr>\n",
|
|
45
|
-
"type": "registry:ui"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "src/components/ui/table/index.ts",
|
|
49
|
-
"content": "export { default as Table } from \"./table.astro\"\nexport { default as TableHeader } from \"./table-header.astro\"\nexport { default as TableBody } from \"./table-body.astro\"\nexport { default as TableFooter } from \"./table-footer.astro\"\nexport { default as TableRow } from \"./table-row.astro\"\nexport { default as TableHead } from \"./table-head.astro\"\nexport { default as TableCell } from \"./table-cell.astro\"\nexport { default as TableCaption } from \"./table-caption.astro\"\n",
|
|
50
|
-
"type": "registry:ui"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"docs": "https://ui.full.dev/components/table/",
|
|
54
|
-
"categories": [
|
|
55
|
-
"ui"
|
|
56
|
-
],
|
|
57
|
-
"type": "registry:ui"
|
|
58
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "tabs-examples",
|
|
4
|
-
"title": "Tabs examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Tabs docs.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro"
|
|
8
|
-
],
|
|
9
|
-
"registryDependencies": [
|
|
10
|
-
"@fulldev/card",
|
|
11
|
-
"@fulldev/tabs"
|
|
12
|
-
],
|
|
13
|
-
"files": [
|
|
14
|
-
{
|
|
15
|
-
"path": "src/components/examples/tabs/tabs-demo.astro",
|
|
16
|
-
"content": "---\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n\nconst tabs = [\n {\n value: \"overview\",\n title: \"Overview\",\n description:\n \"View your key metrics and recent project activity. Track progress across all your active projects.\",\n content: \"You have 12 active projects and 3 pending tasks.\",\n },\n {\n value: \"analytics\",\n title: \"Analytics\",\n description:\n \"Track performance and user engagement metrics. Monitor trends and identify growth opportunities.\",\n content: \"Page views are up 25% compared to last month.\",\n },\n {\n value: \"reports\",\n title: \"Reports\",\n description:\n \"Generate and download your detailed reports. Export data in multiple formats for analysis.\",\n content: \"You have 5 reports ready and available to export.\",\n },\n {\n value: \"settings\",\n title: \"Settings\",\n description:\n \"Manage your account preferences and options. Customize your experience to fit your needs.\",\n content: \"Configure notifications, security, and themes.\",\n },\n]\n---\n\n<Tabs defaultValue=\"overview\" class=\"w-[400px]\">\n <TabsList>\n {tabs.map((tab) => (\n <TabsTrigger value={tab.value}>{tab.title}</TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((tab) => (\n <TabsContent value={tab.value}>\n <Card>\n <CardHeader>\n <CardTitle>{tab.title}</CardTitle>\n <CardDescription>{tab.description}</CardDescription>\n </CardHeader>\n <CardContent class=\"text-sm text-muted-foreground\">\n {tab.content}\n </CardContent>\n </Card>\n </TabsContent>\n ))}\n</Tabs>\n",
|
|
17
|
-
"type": "registry:component"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"path": "src/components/examples/tabs/tabs-disabled.astro",
|
|
21
|
-
"content": "---\nimport { Tabs, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n---\n\n<Tabs defaultValue=\"home\">\n <TabsList>\n <TabsTrigger value=\"home\">Home</TabsTrigger>\n <TabsTrigger value=\"settings\" disabled>\n Disabled\n </TabsTrigger>\n </TabsList>\n</Tabs>\n",
|
|
22
|
-
"type": "registry:component"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"path": "src/components/examples/tabs/tabs-icons.astro",
|
|
26
|
-
"content": "---\nimport AppWindowIcon from \"@lucide/astro/icons/app-window\"\nimport CodeIcon from \"@lucide/astro/icons/code\"\n\nimport { Tabs, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n---\n\n<Tabs defaultValue=\"preview\">\n <TabsList>\n <TabsTrigger value=\"preview\">\n <AppWindowIcon />\n Preview\n </TabsTrigger>\n <TabsTrigger value=\"code\">\n <CodeIcon />\n Code\n </TabsTrigger>\n </TabsList>\n</Tabs>\n",
|
|
27
|
-
"type": "registry:component"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "src/components/examples/tabs/tabs-line.astro",
|
|
31
|
-
"content": "---\nimport { Tabs, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n---\n\n<Tabs defaultValue=\"overview\">\n <TabsList variant=\"line\">\n <TabsTrigger value=\"overview\">Overview</TabsTrigger>\n <TabsTrigger value=\"analytics\">Analytics</TabsTrigger>\n <TabsTrigger value=\"reports\">Reports</TabsTrigger>\n </TabsList>\n</Tabs>\n",
|
|
32
|
-
"type": "registry:component"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"path": "src/components/examples/tabs/tabs-rtl.astro",
|
|
36
|
-
"content": "---\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n overview: \"Overview\",\n analytics: \"Analytics\",\n reports: \"Reports\",\n settings: \"Settings\",\n overviewTitle: \"Overview\",\n overviewDesc:\n \"View your key metrics and recent project activity. Track progress across all your active projects.\",\n overviewContent: \"You have 12 active projects and 3 pending tasks.\",\n analyticsTitle: \"Analytics\",\n analyticsDesc:\n \"Track performance and user engagement metrics. Monitor trends and identify growth opportunities.\",\n analyticsContent: \"Page views are up 25% compared to last month.\",\n reportsTitle: \"Reports\",\n reportsDesc:\n \"Generate and download your detailed reports. Export data in multiple formats for analysis.\",\n reportsContent: \"You have 5 reports ready and available to export.\",\n settingsTitle: \"Settings\",\n settingsDesc:\n \"Manage your account preferences and options. Customize your experience to fit your needs.\",\n settingsContent: \"Configure notifications, security, and themes.\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n overview: \"نظرة عامة\",\n analytics: \"التحليلات\",\n reports: \"التقارير\",\n settings: \"الإعدادات\",\n overviewTitle: \"نظرة عامة\",\n overviewDesc:\n \"عرض مقاييسك الرئيسية وأنشطة المشروع الأخيرة. تتبع التقدم عبر جميع مشاريعك النشطة.\",\n overviewContent: \"لديك ١٢ مشروعًا نشطًا و٣ مهام معلقة.\",\n analyticsTitle: \"التحليلات\",\n analyticsDesc:\n \"تتبع مقاييس الأداء ومشاركة المستخدمين. راقب الاتجاهات وحدد فرص النمو.\",\n analyticsContent: \"زادت مشاهدات الصفحة بنسبة ٢٥٪ مقارنة بالشهر الماضي.\",\n reportsTitle: \"التقارير\",\n reportsDesc:\n \"إنشاء وتنزيل تقاريرك التفصيلية. تصدير البيانات بتنسيقات متعددة للتحليل.\",\n reportsContent: \"لديك ٥ تقارير جاهزة ومتاحة للتصدير.\",\n settingsTitle: \"الإعدادات\",\n settingsDesc:\n \"إدارة تفضيلات حسابك وخياراته. تخصيص تجربتك لتناسب احتياجاتك.\",\n settingsContent: \"تكوين الإشعارات والأمان والسمات.\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n overview: \"סקירה כללית\",\n analytics: \"אנליטיקה\",\n reports: \"דוחות\",\n settings: \"הגדרות\",\n overviewTitle: \"סקירה כללית\",\n overviewDesc:\n \"הצג את המדדים העיקריים שלך ופעילות הפרויקט האחרונה. עקוב אחר התקדמות בכל הפרויקטים הפעילים שלך.\",\n overviewContent: \"יש לך 12 פרויקטים פעילים ו-3 משימות ממתינות.\",\n analyticsTitle: \"אנליטיקה\",\n analyticsDesc:\n \"עקוב אחר ביצועים ומדדי מעורבות משתמשים. עקוב אחר מגמות וזהה הזדמנויות צמיחה.\",\n analyticsContent: \"צפיות בדף עלו ב-25% בהשוואה לחודש שעבר.\",\n reportsTitle: \"דוחות\",\n reportsDesc:\n \"צור והורד את הדוחות המפורטים שלך. ייצא נתונים בפורמטים מרובים לניתוח.\",\n reportsContent: \"יש לך 5 דוחות מוכנים וזמינים לייצוא.\",\n settingsTitle: \"הגדרות\",\n settingsDesc:\n \"נהל את העדפות החשבון והאפשרויות שלך. התאם אישית את החוויה שלך כך שתתאים לצרכים שלך.\",\n settingsContent: \"הגדר התראות, אבטחה וערכות נושא.\",\n },\n },\n} as const\n\nconst { dir, values: t } = translations.ar\n\nconst tabs = [\n {\n value: \"overview\",\n label: t.overview,\n title: t.overviewTitle,\n description: t.overviewDesc,\n content: t.overviewContent,\n },\n {\n value: \"analytics\",\n label: t.analytics,\n title: t.analyticsTitle,\n description: t.analyticsDesc,\n content: t.analyticsContent,\n },\n {\n value: \"reports\",\n label: t.reports,\n title: t.reportsTitle,\n description: t.reportsDesc,\n content: t.reportsContent,\n },\n {\n value: \"settings\",\n label: t.settings,\n title: t.settingsTitle,\n description: t.settingsDesc,\n content: t.settingsContent,\n },\n]\n---\n\n<Tabs defaultValue=\"overview\" class=\"w-full max-w-sm\" dir={dir}>\n <TabsList dir={dir}>\n {tabs.map((tab) => (\n <TabsTrigger value={tab.value}>{tab.label}</TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((tab) => (\n <TabsContent value={tab.value}>\n <Card dir={dir}>\n <CardHeader>\n <CardTitle>{tab.title}</CardTitle>\n <CardDescription>{tab.description}</CardDescription>\n </CardHeader>\n <CardContent class=\"text-sm text-muted-foreground\">\n {tab.content}\n </CardContent>\n </Card>\n </TabsContent>\n ))}\n</Tabs>\n",
|
|
37
|
-
"type": "registry:component"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"path": "src/components/examples/tabs/tabs-vertical.astro",
|
|
41
|
-
"content": "---\nimport { Tabs, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n---\n\n<Tabs defaultValue=\"account\" orientation=\"vertical\">\n <TabsList>\n <TabsTrigger value=\"account\">Account</TabsTrigger>\n <TabsTrigger value=\"password\">Password</TabsTrigger>\n <TabsTrigger value=\"notifications\">Notifications</TabsTrigger>\n </TabsList>\n</Tabs>\n",
|
|
42
|
-
"type": "registry:component"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"docs": "https://ui.full.dev/components/tabs/",
|
|
46
|
-
"type": "registry:example"
|
|
47
|
-
}
|
package/public/r/tabs.json
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "tabs",
|
|
4
|
-
"title": "Tabs",
|
|
5
|
-
"description": "A set of layered sections of content, known as tabs, that display one panel of content at a time.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@data-slot/tabs@^1.1.2"
|
|
8
|
-
],
|
|
9
|
-
"files": [
|
|
10
|
-
{
|
|
11
|
-
"path": "src/components/ui/tabs/tabs.astro",
|
|
12
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n defaultValue?: string\n orientation?: \"horizontal\" | \"vertical\"\n activationMode?: \"auto\" | \"manual\"\n}\n\nconst {\n class: className,\n defaultValue,\n orientation = \"horizontal\",\n activationMode,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"tabs\"\n data-default-value={defaultValue}\n data-orientation={orientation}\n data-activation-mode={activationMode}\n data-horizontal={orientation === \"horizontal\" ? \"\" : undefined}\n data-vertical={orientation === \"vertical\" ? \"\" : undefined}\n class={cn(\"gap-2 group/tabs flex data-horizontal:flex-col\", className)}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/tabs\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
13
|
-
"type": "registry:ui"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"path": "src/components/ui/tabs/tabs-content.astro",
|
|
17
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n value: string\n}\n\nconst { class: className, hidden = true, value, ...props } = Astro.props\n---\n\n<div\n data-slot=\"tabs-content\"\n hidden={hidden}\n data-value={value}\n class={cn(\"text-sm flex-1 outline-none\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
18
|
-
"type": "registry:ui"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"path": "src/components/ui/tabs/tabs-list.astro",
|
|
22
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport { tabsListVariants } from \"./tabs-list-variants\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n variant?: \"default\" | \"line\"\n}\n\nconst { class: className, variant = \"default\", ...props } = Astro.props\n---\n\n<div\n data-slot=\"tabs-list\"\n data-variant={variant}\n class={cn(tabsListVariants({ variant }), className)}\n {...props}\n>\n {variant === \"line\" && (\n <div\n data-slot=\"tabs-indicator\"\n class=\"bg-border/60 pointer-events-none absolute rounded-full transition-[left,top,width,height] duration-200 group-data-horizontal/tabs-list:bottom-0 group-data-horizontal/tabs-list:left-(--active-tab-left,0px) group-data-horizontal/tabs-list:h-0.5 group-data-horizontal/tabs-list:w-(--active-tab-width,0px) group-data-vertical/tabs-list:top-(--active-tab-top,0px) group-data-vertical/tabs-list:left-0 group-data-vertical/tabs-list:h-(--active-tab-height,0px) group-data-vertical/tabs-list:w-0.5\"\n />\n )}\n <slot />\n</div>\n",
|
|
23
|
-
"type": "registry:ui"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"path": "src/components/ui/tabs/tabs-list-variants.ts",
|
|
27
|
-
"content": "import { cva, type VariantProps } from \"class-variance-authority\"\n\nexport const tabsListVariants = cva(\n \"rounded-lg p-[3px] group-data-horizontal/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list relative inline-flex w-fit items-center justify-center text-muted-foreground group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col\",\n {\n variants: {\n variant: {\n default: \"bg-muted\",\n line: \"gap-1 bg-transparent\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport type TabsListVariantProps = VariantProps<typeof tabsListVariants>\n",
|
|
28
|
-
"type": "registry:ui"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"path": "src/components/ui/tabs/tabs-trigger.astro",
|
|
32
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"button\"> & {\n value: string\n}\n\nconst { class: className, value, type = \"button\", ...props } = Astro.props\n---\n\n<button\n data-slot=\"tabs-trigger\"\n type={type}\n data-value={value}\n class={cn(\n \"gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg:not([class*='size-'])]:size-4 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent\",\n \"data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground\",\n \"after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100\",\n className\n )}\n {...props}\n>\n <slot />\n</button>\n",
|
|
33
|
-
"type": "registry:ui"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "src/components/ui/tabs/index.ts",
|
|
37
|
-
"content": "export { default as Tabs } from \"./tabs.astro\"\nexport { default as TabsList } from \"./tabs-list.astro\"\nexport { default as TabsTrigger } from \"./tabs-trigger.astro\"\nexport { default as TabsContent } from \"./tabs-content.astro\"\nexport {\n tabsListVariants,\n type TabsListVariantProps,\n} from \"./tabs-list-variants\"\n",
|
|
38
|
-
"type": "registry:ui"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"docs": "https://ui.full.dev/components/tabs/",
|
|
42
|
-
"categories": [
|
|
43
|
-
"ui"
|
|
44
|
-
],
|
|
45
|
-
"type": "registry:ui"
|
|
46
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "textarea-examples",
|
|
4
|
-
"title": "Textarea examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Textarea docs.",
|
|
6
|
-
"registryDependencies": [
|
|
7
|
-
"@fulldev/button",
|
|
8
|
-
"@fulldev/field",
|
|
9
|
-
"@fulldev/textarea"
|
|
10
|
-
],
|
|
11
|
-
"files": [
|
|
12
|
-
{
|
|
13
|
-
"path": "src/components/examples/textarea/textarea-button.astro",
|
|
14
|
-
"content": "---\nimport { Button } from \"@/components/ui/button\"\nimport { Textarea } from \"@/components/ui/textarea\"\n---\n\n<div class=\"grid w-full gap-2\">\n <Textarea placeholder=\"Type your message here.\" />\n <Button>Send message</Button>\n</div>\n",
|
|
15
|
-
"type": "registry:component"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"path": "src/components/examples/textarea/textarea-demo.astro",
|
|
19
|
-
"content": "---\nimport { Textarea } from \"@/components/ui/textarea\"\n---\n\n<Textarea placeholder=\"Type your message here.\" />\n",
|
|
20
|
-
"type": "registry:component"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"path": "src/components/examples/textarea/textarea-disabled.astro",
|
|
24
|
-
"content": "---\nimport { Field, FieldLabel } from \"@/components/ui/field\"\nimport { Textarea } from \"@/components/ui/textarea\"\n---\n\n<Field data-disabled>\n <FieldLabel for=\"textarea-disabled\">Message</FieldLabel>\n <Textarea\n id=\"textarea-disabled\"\n placeholder=\"Type your message here.\"\n disabled\n />\n</Field>\n",
|
|
25
|
-
"type": "registry:component"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"path": "src/components/examples/textarea/textarea-field.astro",
|
|
29
|
-
"content": "---\nimport { Field, FieldDescription, FieldLabel } from \"@/components/ui/field\"\nimport { Textarea } from \"@/components/ui/textarea\"\n---\n\n<Field>\n <FieldLabel for=\"textarea-message\">Message</FieldLabel>\n <FieldDescription>Enter your message below.</FieldDescription>\n <Textarea id=\"textarea-message\" placeholder=\"Type your message here.\" />\n</Field>\n",
|
|
30
|
-
"type": "registry:component"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"path": "src/components/examples/textarea/textarea-invalid.astro",
|
|
34
|
-
"content": "---\nimport { Field, FieldDescription, FieldLabel } from \"@/components/ui/field\"\nimport { Textarea } from \"@/components/ui/textarea\"\n---\n\n<Field data-invalid>\n <FieldLabel for=\"textarea-invalid\">Message</FieldLabel>\n <Textarea\n id=\"textarea-invalid\"\n placeholder=\"Type your message here.\"\n aria-invalid=\"true\"\n />\n <FieldDescription>Please enter a valid message.</FieldDescription>\n</Field>\n",
|
|
35
|
-
"type": "registry:component"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"path": "src/components/examples/textarea/textarea-rtl.astro",
|
|
39
|
-
"content": "---\nimport { Field, FieldDescription, FieldLabel } from \"@/components/ui/field\"\nimport { Textarea } from \"@/components/ui/textarea\"\n\nconst translations = {\n en: {\n dir: \"ltr\",\n values: {\n label: \"Feedback\",\n placeholder: \"Your feedback helps us improve...\",\n description: \"Share your thoughts about our service.\",\n },\n },\n ar: {\n dir: \"rtl\",\n values: {\n label: \"التعليقات\",\n placeholder: \"تعليقاتك تساعدنا على التحسين...\",\n description: \"شاركنا أفكارك حول خدمتنا.\",\n },\n },\n he: {\n dir: \"rtl\",\n values: {\n label: \"משוב\",\n placeholder: \"המשוב שלך עוזר לנו להשתפר...\",\n description: \"שתף את מחשבותיך על השירות שלנו.\",\n },\n },\n} as const\n\nconst { dir, values: t } = translations.ar\n---\n\n<Field class=\"w-full max-w-xs\" dir={dir}>\n <FieldLabel for=\"feedback\" dir={dir}>\n {t.label}\n </FieldLabel>\n <Textarea id=\"feedback\" placeholder={t.placeholder} dir={dir} rows={4} />\n <FieldDescription dir={dir}>{t.description}</FieldDescription>\n</Field>\n",
|
|
40
|
-
"type": "registry:component"
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"docs": "https://ui.full.dev/components/textarea/",
|
|
44
|
-
"type": "registry:example"
|
|
45
|
-
}
|
package/public/r/textarea.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "textarea",
|
|
4
|
-
"title": "Textarea",
|
|
5
|
-
"description": "Displays a form textarea or a component that looks like a textarea.",
|
|
6
|
-
"files": [
|
|
7
|
-
{
|
|
8
|
-
"path": "src/components/ui/textarea/textarea.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"textarea\">\n\nconst {\n class: className,\n \"data-slot\": dataSlot = \"textarea\",\n ...props\n} = Astro.props\n---\n\n<textarea\n data-slot={dataSlot}\n class={cn(\n \"border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n>\n</textarea>\n",
|
|
10
|
-
"type": "registry:ui"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"path": "src/components/ui/textarea/index.ts",
|
|
14
|
-
"content": "export { default as Textarea } from \"./textarea.astro\"\n",
|
|
15
|
-
"type": "registry:ui"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"docs": "https://ui.full.dev/components/textarea/",
|
|
19
|
-
"categories": [
|
|
20
|
-
"ui"
|
|
21
|
-
],
|
|
22
|
-
"type": "registry:ui"
|
|
23
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "theme-toggle",
|
|
4
|
-
"title": "Theme Toggle",
|
|
5
|
-
"description": "A two-state theme toggle that switches immediately between light and dark mode.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@lucide/astro"
|
|
8
|
-
],
|
|
9
|
-
"registryDependencies": [
|
|
10
|
-
"@fulldev/button"
|
|
11
|
-
],
|
|
12
|
-
"files": [
|
|
13
|
-
{
|
|
14
|
-
"path": "src/components/ui/theme-toggle/theme-toggle.astro",
|
|
15
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport Moon from \"@lucide/astro/icons/moon\"\nimport Sun from \"@lucide/astro/icons/sun\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button> & {\n disabled?: boolean\n}\n\nconst {\n class: className,\n variant = \"ghost\",\n size = \"icon-sm\",\n ...props\n} = Astro.props\n---\n\n<Button\n data-theme-toggle\n aria-label=\"Toggle theme\"\n variant={variant}\n size={size}\n class={cn(\"relative\", className)}\n {...props}\n>\n <Sun class=\"dark:hidden\" />\n <Moon class=\"hidden dark:block\" />\n <span class=\"sr-only\">Toggle theme</span>\n</Button>\n\n<script is:inline>\n if (!window.__themeToggleHandlersInitialized) {\n window.__themeToggleHandlersInitialized = true\n\n const syncThemeToggles = () => {\n const isDark = document.documentElement.classList.contains(\"dark\")\n\n document.querySelectorAll(\"[data-theme-toggle]\").forEach((toggle) => {\n if (!(toggle instanceof HTMLButtonElement)) return\n\n toggle.setAttribute(\"aria-pressed\", isDark ? \"true\" : \"false\")\n toggle.setAttribute(\"data-state\", isDark ? \"on\" : \"off\")\n\n if (isDark) {\n toggle.setAttribute(\"data-pressed\", \"\")\n } else {\n toggle.removeAttribute(\"data-pressed\")\n }\n })\n }\n\n syncThemeToggles()\n document.addEventListener(\"astro:page-load\", syncThemeToggles)\n\n const observer = new MutationObserver(syncThemeToggles)\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\"],\n })\n\n document.addEventListener(\"click\", (event) => {\n const target = event.target\n\n if (!(target instanceof Element)) return\n\n const toggle = target.closest(\"[data-theme-toggle]\")\n\n if (!(toggle instanceof HTMLButtonElement)) return\n if (toggle.disabled) return\n\n const isDark = document.documentElement.classList.contains(\"dark\")\n const nextTheme = isDark ? \"light\" : \"dark\"\n\n if (typeof window.__setTheme === \"function\") {\n window.__setTheme(nextTheme)\n return\n }\n\n document.documentElement.classList[\n nextTheme === \"dark\" ? \"add\" : \"remove\"\n ](\"dark\")\n })\n }\n</script>\n",
|
|
16
|
-
"type": "registry:ui"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"path": "src/components/ui/theme-toggle/theme-provider.astro",
|
|
20
|
-
"content": "<script is:inline>\n // A stored \"dark\" or \"light\" is the visitor's choice. Without one, such as\n // no value or \"system\", the theme follows the system.\n const getStoredTheme = () => {\n if (typeof localStorage === \"undefined\") return null\n const theme = localStorage.getItem(\"theme\")\n return theme === \"dark\" || theme === \"light\" ? theme : null\n }\n\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\")\n\n const getThemePreference = () =>\n getStoredTheme() ?? (media.matches ? \"dark\" : \"light\")\n\n const disableTransitionsTemporarily = () => {\n const style = document.createElement(\"style\")\n\n style.appendChild(\n document.createTextNode(\n \"*, *::before, *::after { transition: none !important; }\"\n )\n )\n\n document.head.appendChild(style)\n\n return () => {\n void document.documentElement.offsetHeight\n\n requestAnimationFrame(() => {\n style.remove()\n })\n }\n }\n\n // The theme this provider applied last. A class change to another theme\n // comes from outside, such as a toggle without the provider, and is saved\n // as the visitor's choice.\n let appliedTheme\n\n const applyTheme = (theme, disableTransitions = false) => {\n const restoreTransitions = disableTransitions\n ? disableTransitionsTemporarily()\n : null\n\n appliedTheme = theme\n document.documentElement.classList[theme === \"dark\" ? \"add\" : \"remove\"](\n \"dark\"\n )\n\n restoreTransitions?.()\n }\n\n // \"dark\" or \"light\" saves a choice; \"system\" follows the system again.\n window.__setTheme = (theme) => {\n if (typeof localStorage !== \"undefined\")\n localStorage.setItem(\"theme\", theme)\n applyTheme(getThemePreference(), true)\n }\n\n applyTheme(getThemePreference())\n\n // Follow the system while there is no choice, and a choice made in\n // another window or frame of the site.\n media.addEventListener(\"change\", () => {\n if (!getStoredTheme()) applyTheme(getThemePreference(), true)\n })\n window.addEventListener(\"storage\", (event) => {\n if (event.storageArea !== localStorage) return\n if (event.key === \"theme\" || event.key === null)\n applyTheme(getThemePreference(), true)\n })\n\n // Astro's <ClientRouter /> replaces the <html> attributes with those of the\n // next page, which cannot know the theme. Carry the theme over before the\n // swap, so it neither flashes nor reaches the observer below as a choice.\n document.addEventListener(\"astro:before-swap\", (event) => {\n const swap = event.swap\n event.swap = function (...args) {\n event.newDocument.documentElement.classList.toggle(\n \"dark\",\n appliedTheme === \"dark\"\n )\n return swap.apply(this, args)\n }\n })\n\n if (typeof localStorage !== \"undefined\") {\n const observer = new MutationObserver(() => {\n const theme = document.documentElement.classList.contains(\"dark\")\n ? \"dark\"\n : \"light\"\n if (theme === appliedTheme) return\n appliedTheme = theme\n localStorage.setItem(\"theme\", theme)\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"class\"],\n })\n }\n</script>\n",
|
|
21
|
-
"type": "registry:ui"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"path": "src/components/ui/theme-toggle/index.ts",
|
|
25
|
-
"content": "export { default as ThemeToggle } from \"./theme-toggle.astro\"\nexport { default as ThemeProvider } from \"./theme-provider.astro\"\n",
|
|
26
|
-
"type": "registry:ui"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"docs": "https://ui.full.dev/components/theme-toggle/",
|
|
30
|
-
"categories": [
|
|
31
|
-
"ui"
|
|
32
|
-
],
|
|
33
|
-
"type": "registry:ui"
|
|
34
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "toast-examples",
|
|
4
|
-
"title": "Toast examples",
|
|
5
|
-
"description": "The examples from the shadcn/ui Toast docs.",
|
|
6
|
-
"registryDependencies": [
|
|
7
|
-
"@fulldev/button",
|
|
8
|
-
"@fulldev/toast"
|
|
9
|
-
],
|
|
10
|
-
"files": [
|
|
11
|
-
{
|
|
12
|
-
"path": "src/components/examples/toast/toast-demo.astro",
|
|
13
|
-
"content": "---\nimport { Button } from \"@/components/ui/button\"\nimport { Toaster } from \"@/components/ui/toast\"\n---\n\n<div data-toast-demo>\n <Button variant=\"outline\" data-show-toast>\n Show Toast\n </Button>\n <Toaster portal />\n</div>\n\n<script>\n const initialize = () => {\n for (const root of document.querySelectorAll(\"[data-toast-demo]\")) {\n if (root.hasAttribute(\"data-bound\")) continue\n root.setAttribute(\"data-bound\", \"\")\n const toaster = root.querySelector('[data-slot=\"toast\"]')\n root.querySelector(\"[data-show-toast]\")?.addEventListener(\"click\", () => {\n // The action closes its toast, like toast.close(id) in the React example.\n toaster?.dispatchEvent(\n new CustomEvent(\"toast:show\", {\n detail: {\n title: \"Event created\",\n description: \"Sunday, December 3 at 9:00 AM\",\n action: { label: \"Undo\", value: \"undo\" },\n },\n })\n )\n })\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
|
|
14
|
-
"type": "registry:component"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"path": "src/components/examples/toast/toast-promise.astro",
|
|
18
|
-
"content": "---\nimport { Button } from \"@/components/ui/button\"\nimport { Toaster } from \"@/components/ui/toast\"\n---\n\n<div data-toast-promise>\n <Button variant=\"outline\" data-create-event>\n Create Event\n </Button>\n <Toaster portal />\n</div>\n\n<script>\n const initialize = () => {\n for (const root of document.querySelectorAll(\"[data-toast-promise]\")) {\n if (root.hasAttribute(\"data-bound\")) continue\n root.setAttribute(\"data-bound\", \"\")\n const toaster = root.querySelector('[data-slot=\"toast\"]')\n const send = (name: string, detail: object) =>\n toaster?.dispatchEvent(new CustomEvent(name, { detail }))\n root\n .querySelector(\"[data-create-event]\")\n ?.addEventListener(\"click\", async () => {\n // One toast moves from loading to success or error.\n const id = `event-${Date.now()}`\n send(\"toast:show\", {\n id,\n title: \"Creating event…\",\n type: \"loading\",\n duration: 0,\n })\n try {\n const data = await new Promise<{ name: string }>((resolve) => {\n window.setTimeout(() => resolve({ name: \"Event\" }), 2000)\n })\n send(\"toast:update\", {\n id,\n title: `${data.name} created.`,\n type: \"success\",\n duration: 5000,\n })\n } catch {\n send(\"toast:update\", {\n id,\n title: \"Could not create event.\",\n type: \"error\",\n duration: 5000,\n })\n }\n })\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
|
|
19
|
-
"type": "registry:component"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"path": "src/components/examples/toast/toast-types.astro",
|
|
23
|
-
"content": "---\nimport { Button } from \"@/components/ui/button\"\nimport { Toaster } from \"@/components/ui/toast\"\n\nconst toasts = [\n { label: \"Default\", description: \"Event has been created.\" },\n {\n label: \"Success\",\n type: \"success\",\n description: \"Event has been created.\",\n },\n {\n label: \"Info\",\n type: \"info\",\n description: \"Arrive 10 minutes before the event.\",\n },\n {\n label: \"Warning\",\n type: \"warning\",\n description: \"The event cannot start before 8:00 AM.\",\n },\n {\n label: \"Error\",\n type: \"error\",\n description: \"The event could not be created.\",\n },\n]\n---\n\n<div class=\"flex flex-wrap gap-2\" data-toast-types>\n {toasts.map((toast) => (\n <Button\n variant=\"outline\"\n data-toast-type={toast.type}\n data-toast-description={toast.description}\n >\n {toast.label}\n </Button>\n ))}\n <Toaster portal />\n</div>\n\n<script>\n const initialize = () => {\n for (const root of document.querySelectorAll(\"[data-toast-types]\")) {\n if (root.hasAttribute(\"data-bound\")) continue\n root.setAttribute(\"data-bound\", \"\")\n const toaster = root.querySelector('[data-slot=\"toast\"]')\n for (const button of root.querySelectorAll<HTMLElement>(\n \"[data-toast-description]\"\n )) {\n button.addEventListener(\"click\", () => {\n const { toastType, toastDescription } = button.dataset\n // A toast needs a title, so the text shows as the title.\n toaster?.dispatchEvent(\n new CustomEvent(\"toast:show\", {\n detail: { title: toastDescription, type: toastType },\n })\n )\n })\n }\n }\n }\n\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n</script>\n",
|
|
24
|
-
"type": "registry:component"
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"docs": "https://ui.full.dev/components/toast/",
|
|
28
|
-
"type": "registry:example"
|
|
29
|
-
}
|
package/public/r/toast.json
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "toast",
|
|
4
|
-
"title": "Toast",
|
|
5
|
-
"description": "A brief notification that appears without interrupting the user.",
|
|
6
|
-
"dependencies": [
|
|
7
|
-
"@data-slot/toast@^1.1.2",
|
|
8
|
-
"@lucide/astro"
|
|
9
|
-
],
|
|
10
|
-
"registryDependencies": [
|
|
11
|
-
"@fulldev/button"
|
|
12
|
-
],
|
|
13
|
-
"files": [
|
|
14
|
-
{
|
|
15
|
-
"path": "src/components/ui/toast/index.ts",
|
|
16
|
-
"content": "export { default as Toast } from \"./toast.astro\"\nexport { default as ToastTemplate } from \"./toast-template.astro\"\nexport { default as ToastViewport } from \"./toast-viewport.astro\"\nexport { default as ToastItem } from \"./toast-item.astro\"\nexport { default as ToastContent } from \"./toast-content.astro\"\nexport { default as ToastIcon } from \"./toast-icon.astro\"\nexport { default as ToastTitle } from \"./toast-title.astro\"\nexport { default as ToastDescription } from \"./toast-description.astro\"\nexport { default as ToastAction } from \"./toast-action.astro\"\nexport { default as ToastClose } from \"./toast-close.astro\"\nexport { default as Toaster } from \"./toaster.astro\"\n\nexport type {\n ToastActionEvent,\n ToastClearableField,\n ToastController,\n ToastOptions,\n ToastPosition,\n ToastPromiseErrorValue,\n ToastPromiseHandle,\n ToastPromiseOptions,\n ToastPromiseState,\n ToastPromiseStateValue,\n ToastShowOptions,\n ToastUpdateOptions,\n} from \"@data-slot/toast\"\n",
|
|
17
|
-
"type": "registry:ui"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"path": "src/components/ui/toast/toast-action.astro",
|
|
21
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants } from \"@/components/ui/button\"\n\ntype Props = HTMLAttributes<\"button\">\n\nconst {\n class: className,\n hidden = true,\n type = \"button\",\n ...props\n} = Astro.props\n---\n\n<button\n data-slot=\"toast-action\"\n data-variant=\"outline\"\n data-size=\"sm\"\n type={type}\n class={cn(buttonVariants({ variant: \"outline\", size: \"sm\" }), className)}\n hidden={hidden}\n {...props}\n>\n <slot />\n</button>\n",
|
|
22
|
-
"type": "registry:ui"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"path": "src/components/ui/toast/toast-close.astro",
|
|
26
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { class: className, ...props } = Astro.props\n---\n\n<Button\n data-slot=\"toast-close\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close notification\"\n class={cn(\n \"text-muted-foreground hover:text-foreground relative shrink-0 after:absolute after:-inset-2 after:content-['']\",\n className\n )}\n {...props}\n>\n <slot>\n <XIcon aria-hidden=\"true\" />\n </slot>\n</Button>\n",
|
|
27
|
-
"type": "registry:ui"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"path": "src/components/ui/toast/toast-content.astro",
|
|
31
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"toast-content\"\n class={cn(\n \"flex min-h-16 items-center gap-3 overflow-hidden p-4 transition-opacity duration-200\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
32
|
-
"type": "registry:ui"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"path": "src/components/ui/toast/toast-description.astro",
|
|
36
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, hidden = true, ...props } = Astro.props\n---\n\n<div\n data-slot=\"toast-description\"\n class={cn(\"text-muted-foreground text-sm\", className)}\n hidden={hidden}\n {...props}\n>\n <slot />\n</div>\n",
|
|
37
|
-
"type": "registry:ui"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"path": "src/components/ui/toast/toast-icon.astro",
|
|
41
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport CircleCheckIcon from \"@lucide/astro/icons/circle-check\"\nimport InfoIcon from \"@lucide/astro/icons/info\"\nimport LoaderIcon from \"@lucide/astro/icons/loader-circle\"\nimport OctagonXIcon from \"@lucide/astro/icons/octagon-x\"\nimport TriangleAlertIcon from \"@lucide/astro/icons/triangle-alert\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"span\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n data-slot=\"toast-icon\"\n class={cn(\n \"shrink-0 group-data-[type=error]/toast-item:[&_[data-toast-icon=error]]:block group-data-[type=info]/toast-item:[&_[data-toast-icon=info]]:block group-data-[type=loading]/toast-item:[&_[data-toast-icon=loading]]:block group-data-[type=success]/toast-item:[&_[data-toast-icon=success]]:block group-data-[type=warning]/toast-item:[&_[data-toast-icon=warning]]:block [&_svg]:hidden [&_svg]:size-4\",\n className\n )}\n {...props}\n>\n <CircleCheckIcon data-toast-icon=\"success\" aria-hidden=\"true\" />\n <InfoIcon data-toast-icon=\"info\" aria-hidden=\"true\" />\n <TriangleAlertIcon data-toast-icon=\"warning\" aria-hidden=\"true\" />\n <OctagonXIcon\n data-toast-icon=\"error\"\n class=\"text-destructive\"\n aria-hidden=\"true\"\n />\n <LoaderIcon\n data-toast-icon=\"loading\"\n class=\"animate-spin\"\n aria-hidden=\"true\"\n />\n</span>\n",
|
|
42
|
-
"type": "registry:ui"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "src/components/ui/toast/toast-item.astro",
|
|
46
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"toast-item\"\n role=\"status\"\n aria-atomic=\"true\"\n class={cn(\n \"rounded-2xl group/toast-item bg-popover text-popover-foreground ring-foreground/10 focus-visible:border-ring focus-visible:ring-ring/50 pointer-events-auto absolute inset-x-0 z-[calc(1000-var(--toast-index))] box-border w-full opacity-0 shadow-lg ring-1 transition-[transform,opacity,height,box-shadow] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none group-data-[position=bottom-center]/toast-viewport:bottom-0 group-data-[position=bottom-center]/toast-viewport:origin-bottom group-data-[position=bottom-left]/toast-viewport:bottom-0 group-data-[position=bottom-left]/toast-viewport:origin-bottom group-data-[position=bottom-right]/toast-viewport:bottom-0 group-data-[position=bottom-right]/toast-viewport:origin-bottom group-data-[position=top-center]/toast-viewport:top-0 group-data-[position=top-center]/toast-viewport:origin-top group-data-[position=top-left]/toast-viewport:top-0 group-data-[position=top-left]/toast-viewport:origin-top group-data-[position=top-right]/toast-viewport:top-0 group-data-[position=top-right]/toast-viewport:origin-top focus-visible:ring-3\",\n \"[transform:translate3d(0,calc(var(--toast-lift,-1)*-100%),0)] data-[mounted=true]:[transform:translate3d(0,0,0)] data-[mounted=true]:opacity-100 data-[swiping=true]:transition-none data-[visible=false]:pointer-events-none data-[visible=false]:opacity-0\",\n \"data-[mounted=true]:data-[expanded=true]:h-(--toast-initial-height) data-[mounted=true]:data-[expanded=true]:[transform:translate3d(0,calc(var(--toast-offset,0px)*var(--toast-lift,-1)),0)] data-[mounted=true]:data-[expanded=false]:data-[front=false]:h-(--toast-front-height) data-[mounted=true]:data-[expanded=false]:data-[front=false]:[transform:translate3d(0,calc(var(--toast-collapsed-offset-y,0px)*var(--toast-lift,-1)),0)_scale(calc(1-var(--toast-index,0)*0.05))]\",\n \"data-[removed=true]:data-[front=false]:data-[expanded=false]:[transform:translate3d(0,40%,0)] data-[removed=true]:data-[front=false]:data-[expanded=false]:opacity-0 data-[removed=true]:data-[front=false]:data-[expanded=true]:[transform:translate3d(0,calc(var(--toast-lift,-1)*var(--toast-offset,0px)+var(--toast-lift,-1)*-100%),0)] data-[removed=true]:data-[front=false]:data-[expanded=true]:opacity-0 data-[removed=true]:data-[front=true]:[transform:translate3d(0,calc(var(--toast-lift,-1)*-100%),0)] data-[removed=true]:data-[front=true]:opacity-0\",\n \"data-[swiping=true]:data-[expanded=true]:[transform:translate3d(var(--toast-swipe-amount-x,0px),calc(var(--toast-offset,0px)*var(--toast-lift,-1)+var(--toast-swipe-amount-y,0px)),0)] data-[swiping=true]:data-[front=false]:data-[expanded=false]:[transform:translate3d(var(--toast-swipe-amount-x,0px),calc(var(--toast-collapsed-offset-y,0px)*var(--toast-lift,-1)+var(--toast-swipe-amount-y,0px)),0)_scale(calc(1-var(--toast-index,0)*0.05))] data-[swiping=true]:data-[front=true]:[transform:translate3d(var(--toast-swipe-amount-x,0px),var(--toast-swipe-amount-y,0px),0)]\",\n \"data-[removed=true]:data-[swipe-out=true]:opacity-0 data-[removed=true]:data-[swipe-out=true]:data-[front=false]:data-[expanded=false]:[transform:translate3d(var(--toast-swipe-end-x,0px),calc(var(--toast-collapsed-offset-y,0px)*var(--toast-lift,-1)+var(--toast-swipe-end-y,0px)),0)_scale(calc(1-var(--toast-index,0)*0.05))] data-[removed=true]:data-[swipe-out=true]:data-[front=false]:data-[expanded=true]:[transform:translate3d(var(--toast-swipe-end-x,0px),calc(var(--toast-lift,-1)*var(--toast-offset,0px)+var(--toast-swipe-end-y,0px)),0)] data-[removed=true]:data-[swipe-out=true]:data-[front=true]:[transform:translate3d(var(--toast-swipe-end-x,0px),var(--toast-swipe-end-y,0px),0)]\",\n \"after:absolute after:left-0 after:h-[calc(var(--toast-gap,0px)+1px)] after:w-full after:content-[''] group-data-[position=bottom-center]/toast-viewport:after:bottom-full group-data-[position=bottom-left]/toast-viewport:after:bottom-full group-data-[position=bottom-right]/toast-viewport:after:bottom-full group-data-[position=top-center]/toast-viewport:after:top-full group-data-[position=top-left]/toast-viewport:after:top-full group-data-[position=top-right]/toast-viewport:after:top-full data-[expanded=false]:data-[front=false]:data-open:[&>*]:opacity-0\",\n className\n )}\n {...props}\n>\n <slot />\n</div>\n",
|
|
47
|
-
"type": "registry:ui"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"path": "src/components/ui/toast/toast-template.astro",
|
|
51
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { ...props } = Astro.props\n---\n\n<template data-slot=\"toast-template\" {...props}>\n <slot />\n</template>\n",
|
|
52
|
-
"type": "registry:ui"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"path": "src/components/ui/toast/toast-title.astro",
|
|
56
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n data-slot=\"toast-title\"\n class={cn(\"text-sm font-medium\", className)}\n {...props}\n>\n <slot />\n</div>\n",
|
|
57
|
-
"type": "registry:ui"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"path": "src/components/ui/toast/toast-viewport.astro",
|
|
61
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"section\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<section\n data-slot=\"toast-viewport\"\n class={cn(\n \"group/toast-viewport pointer-events-none fixed z-50 m-0 h-(--toast-stack-size,0px) w-[min(24rem,calc(100vw-2rem))] list-none p-0 outline-none [--toast-collapsed-peek:0.75rem] [--toast-gap:0.75rem] data-[position=bottom-center]:bottom-4 data-[position=bottom-center]:left-1/2 data-[position=bottom-center]:-translate-x-1/2 data-[position=bottom-left]:bottom-4 data-[position=bottom-left]:left-4 data-[position=bottom-right]:right-4 data-[position=bottom-right]:bottom-4 data-[position=top-center]:top-4 data-[position=top-center]:left-1/2 data-[position=top-center]:-translate-x-1/2 data-[position=top-left]:top-4 data-[position=top-left]:left-4 data-[position=top-right]:top-4 data-[position=top-right]:right-4\",\n className\n )}\n {...props}\n>\n <slot />\n</section>\n",
|
|
62
|
-
"type": "registry:ui"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"path": "src/components/ui/toast/toast.astro",
|
|
66
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { ToastPosition } from \"@data-slot/toast\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n limit?: number\n duration?: number\n position?: ToastPosition\n pauseOnHover?: boolean\n pauseOnFocus?: boolean\n portal?: boolean\n}\n\nconst {\n class: className,\n limit,\n duration,\n position,\n pauseOnHover,\n pauseOnFocus,\n portal,\n ...props\n} = Astro.props\n---\n\n<div\n data-slot=\"toast\"\n data-limit={limit}\n data-duration={duration}\n data-position={position}\n data-pause-on-hover={pauseOnHover}\n data-pause-on-focus={pauseOnFocus}\n data-portal={portal}\n class={className}\n {...props}\n>\n <slot />\n</div>\n\n<script>\n import { create } from \"@data-slot/toast\"\n\n const controllers: ReturnType<typeof create> = []\n const initialize = () => controllers.push(...create())\n initialize()\n document.addEventListener(\"astro:page-load\", initialize)\n document.addEventListener(\"astro:before-swap\", () => {\n for (const controller of controllers) controller.destroy()\n controllers.length = 0\n })\n</script>\n",
|
|
67
|
-
"type": "registry:ui"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"path": "src/components/ui/toast/toaster.astro",
|
|
71
|
-
"content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport ToastAction from \"./toast-action.astro\"\nimport ToastClose from \"./toast-close.astro\"\nimport ToastContent from \"./toast-content.astro\"\nimport ToastDescription from \"./toast-description.astro\"\nimport ToastIcon from \"./toast-icon.astro\"\nimport ToastItem from \"./toast-item.astro\"\nimport ToastTemplate from \"./toast-template.astro\"\nimport ToastTitle from \"./toast-title.astro\"\nimport ToastViewport from \"./toast-viewport.astro\"\nimport Toast from \"./toast.astro\"\n\ntype Props = ComponentProps<typeof Toast> & {\n viewportClass?: string\n}\n\nconst { viewportClass, ...props } = Astro.props\n---\n\n<Toast {...props}>\n <ToastTemplate>\n <ToastItem>\n <ToastContent>\n <ToastIcon />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <ToastTitle />\n <ToastDescription />\n </div>\n <ToastAction />\n <ToastClose />\n </ToastContent>\n </ToastItem>\n </ToastTemplate>\n <ToastViewport class={viewportClass} />\n</Toast>\n",
|
|
72
|
-
"type": "registry:ui"
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"docs": "https://ui.full.dev/components/toast/",
|
|
76
|
-
"categories": [
|
|
77
|
-
"ui"
|
|
78
|
-
],
|
|
79
|
-
"type": "registry:ui"
|
|
80
|
-
}
|
package/public/r/toc.json
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "toc",
|
|
4
|
-
"title": "Toc",
|
|
5
|
-
"description": "Displays a simple table of contents for page sections and subsections.",
|
|
6
|
-
"files": [
|
|
7
|
-
{
|
|
8
|
-
"path": "src/components/ui/toc/toc.astro",
|
|
9
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"nav\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<nav data-slot=\"toc\" class={cn(\"flex flex-col gap-3\", className)} {...props}>\n <slot />\n</nav>\n",
|
|
10
|
-
"type": "registry:ui"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"path": "src/components/ui/toc/toc-title.astro",
|
|
14
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"p\"> &\n HTMLAttributes<\"h2\"> &\n HTMLAttributes<\"div\"> & {\n as?: \"p\" | \"h2\" | \"div\"\n }\n\nconst { as: Tag = \"p\", class: className, ...props } = Astro.props\n---\n\n<Tag data-slot=\"toc-title\" class={cn(\"text-sm font-medium tracking-tight\", className)} {...props}>\n <slot />\n</Tag>\n",
|
|
15
|
-
"type": "registry:ui"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"path": "src/components/ui/toc/toc-menu.astro",
|
|
19
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"ul\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<ul\n data-slot=\"toc-menu\"\n class={cn(\"flex flex-col gap-1\", className)}\n {...props}\n>\n <slot />\n</ul>\n",
|
|
20
|
-
"type": "registry:ui"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"path": "src/components/ui/toc/toc-menu-item.astro",
|
|
24
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"li\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<li data-slot=\"toc-menu-item\" class={cn(\"relative\", className)} {...props}>\n <slot />\n</li>\n",
|
|
25
|
-
"type": "registry:ui"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"path": "src/components/ui/toc/toc-menu-link.astro",
|
|
29
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"a\"> & {\n depth?: number\n isActive?: boolean\n active?: boolean\n}\n\nconst {\n class: className,\n depth = 2,\n isActive,\n active = false,\n ...props\n} = Astro.props\n\nconst resolvedActive = isActive ?? active\n---\n\n<a\n data-slot=\"toc-menu-link\"\n data-depth={depth}\n data-active={resolvedActive ? \"true\" : undefined}\n aria-current={resolvedActive ? \"location\" : undefined}\n class={cn(\n \"text-sm leading-6 text-muted-foreground hover:text-foreground data-[active=true]:text-foreground block transition-colors\",\n depth === 3 && \"ps-4\",\n depth >= 4 && \"ps-8\",\n className\n )}\n {...props}\n>\n <slot />\n</a>\n",
|
|
30
|
-
"type": "registry:ui"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"path": "src/components/ui/toc/index.ts",
|
|
34
|
-
"content": "export { default as Toc } from \"./toc.astro\"\nexport { default as TocMenu } from \"./toc-menu.astro\"\nexport { default as TocMenuItem } from \"./toc-menu-item.astro\"\nexport { default as TocMenuLink } from \"./toc-menu-link.astro\"\nexport { default as TocTitle } from \"./toc-title.astro\"\n",
|
|
35
|
-
"type": "registry:ui"
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"docs": "https://ui.full.dev/components/toc/",
|
|
39
|
-
"categories": [
|
|
40
|
-
"ui"
|
|
41
|
-
],
|
|
42
|
-
"type": "registry:ui"
|
|
43
|
-
}
|