@starwind-ui/core 1.14.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/index.d.ts +0 -28
- package/dist/index.js +0 -85
- package/dist/index.js.map +0 -1
- package/dist/src/components/accordion/Accordion.astro +0 -254
- package/dist/src/components/accordion/AccordionContent.astro +0 -33
- package/dist/src/components/accordion/AccordionItem.astro +0 -27
- package/dist/src/components/accordion/AccordionTrigger.astro +0 -32
- package/dist/src/components/accordion/index.ts +0 -15
- package/dist/src/components/alert/Alert.astro +0 -31
- package/dist/src/components/alert/AlertDescription.astro +0 -14
- package/dist/src/components/alert/AlertTitle.astro +0 -16
- package/dist/src/components/alert/index.ts +0 -13
- package/dist/src/components/alert-dialog/AlertDialog.astro +0 -275
- package/dist/src/components/alert-dialog/AlertDialogAction.astro +0 -44
- package/dist/src/components/alert-dialog/AlertDialogCancel.astro +0 -45
- package/dist/src/components/alert-dialog/AlertDialogContent.astro +0 -52
- package/dist/src/components/alert-dialog/AlertDialogDescription.astro +0 -18
- package/dist/src/components/alert-dialog/AlertDialogFooter.astro +0 -16
- package/dist/src/components/alert-dialog/AlertDialogHeader.astro +0 -14
- package/dist/src/components/alert-dialog/AlertDialogTitle.astro +0 -20
- package/dist/src/components/alert-dialog/AlertDialogTrigger.astro +0 -47
- package/dist/src/components/alert-dialog/index.ts +0 -46
- package/dist/src/components/aspect-ratio/AspectRatio.astro +0 -32
- package/dist/src/components/aspect-ratio/index.ts +0 -7
- package/dist/src/components/avatar/Avatar.astro +0 -29
- package/dist/src/components/avatar/AvatarFallback.astro +0 -18
- package/dist/src/components/avatar/AvatarImage.astro +0 -49
- package/dist/src/components/avatar/index.ts +0 -13
- package/dist/src/components/badge/Badge.astro +0 -49
- package/dist/src/components/badge/index.ts +0 -7
- package/dist/src/components/breadcrumb/Breadcrumb.astro +0 -11
- package/dist/src/components/breadcrumb/BreadcrumbEllipsis.astro +0 -28
- package/dist/src/components/breadcrumb/BreadcrumbItem.astro +0 -14
- package/dist/src/components/breadcrumb/BreadcrumbLink.astro +0 -22
- package/dist/src/components/breadcrumb/BreadcrumbList.astro +0 -16
- package/dist/src/components/breadcrumb/BreadcrumbPage.astro +0 -21
- package/dist/src/components/breadcrumb/BreadcrumbSeparator.astro +0 -23
- package/dist/src/components/breadcrumb/index.ts +0 -37
- package/dist/src/components/button/Button.astro +0 -54
- package/dist/src/components/button/index.ts +0 -7
- package/dist/src/components/button-group/ButtonGroup.astro +0 -62
- package/dist/src/components/button-group/ButtonGroupSeparator.astro +0 -27
- package/dist/src/components/button-group/ButtonGroupText.astro +0 -19
- package/dist/src/components/button-group/index.ts +0 -17
- package/dist/src/components/card/Card.astro +0 -14
- package/dist/src/components/card/CardContent.astro +0 -14
- package/dist/src/components/card/CardDescription.astro +0 -14
- package/dist/src/components/card/CardFooter.astro +0 -14
- package/dist/src/components/card/CardHeader.astro +0 -14
- package/dist/src/components/card/CardTitle.astro +0 -14
- package/dist/src/components/card/index.ts +0 -26
- package/dist/src/components/carousel/Carousel.astro +0 -55
- package/dist/src/components/carousel/CarouselContent.astro +0 -26
- package/dist/src/components/carousel/CarouselItem.astro +0 -26
- package/dist/src/components/carousel/CarouselNext.astro +0 -37
- package/dist/src/components/carousel/CarouselPrevious.astro +0 -37
- package/dist/src/components/carousel/carousel-script.ts +0 -191
- package/dist/src/components/carousel/index.ts +0 -32
- package/dist/src/components/checkbox/Checkbox.astro +0 -128
- package/dist/src/components/checkbox/index.ts +0 -7
- package/dist/src/components/dialog/Dialog.astro +0 -355
- package/dist/src/components/dialog/DialogClose.astro +0 -35
- package/dist/src/components/dialog/DialogContent.astro +0 -78
- package/dist/src/components/dialog/DialogDescription.astro +0 -14
- package/dist/src/components/dialog/DialogFooter.astro +0 -14
- package/dist/src/components/dialog/DialogHeader.astro +0 -14
- package/dist/src/components/dialog/DialogTitle.astro +0 -22
- package/dist/src/components/dialog/DialogTrigger.astro +0 -47
- package/dist/src/components/dialog/index.ts +0 -45
- package/dist/src/components/dropdown/Dropdown.astro +0 -377
- package/dist/src/components/dropdown/DropdownContent.astro +0 -81
- package/dist/src/components/dropdown/DropdownItem.astro +0 -48
- package/dist/src/components/dropdown/DropdownLabel.astro +0 -29
- package/dist/src/components/dropdown/DropdownSeparator.astro +0 -21
- package/dist/src/components/dropdown/DropdownTrigger.astro +0 -52
- package/dist/src/components/dropdown/index.ts +0 -33
- package/dist/src/components/dropzone/Dropzone.astro +0 -236
- package/dist/src/components/dropzone/DropzoneFilesList.astro +0 -26
- package/dist/src/components/dropzone/DropzoneLoadingIndicator.astro +0 -10
- package/dist/src/components/dropzone/DropzoneUploadIndicator.astro +0 -10
- package/dist/src/components/dropzone/index.ts +0 -24
- package/dist/src/components/image/Image.astro +0 -24
- package/dist/src/components/image/index.ts +0 -9
- package/dist/src/components/input/Input.astro +0 -25
- package/dist/src/components/input/index.ts +0 -7
- package/dist/src/components/item/Item.astro +0 -52
- package/dist/src/components/item/ItemActions.astro +0 -16
- package/dist/src/components/item/ItemContent.astro +0 -16
- package/dist/src/components/item/ItemDescription.astro +0 -19
- package/dist/src/components/item/ItemFooter.astro +0 -16
- package/dist/src/components/item/ItemGroup.astro +0 -16
- package/dist/src/components/item/ItemHeader.astro +0 -16
- package/dist/src/components/item/ItemMedia.astro +0 -40
- package/dist/src/components/item/ItemSeparator.astro +0 -21
- package/dist/src/components/item/ItemTitle.astro +0 -16
- package/dist/src/components/item/index.ts +0 -50
- package/dist/src/components/kbd/Kbd.astro +0 -21
- package/dist/src/components/kbd/KbdGroup.astro +0 -16
- package/dist/src/components/kbd/index.ts +0 -11
- package/dist/src/components/label/Label.astro +0 -22
- package/dist/src/components/label/index.ts +0 -7
- package/dist/src/components/pagination/Pagination.astro +0 -20
- package/dist/src/components/pagination/PaginationContent.astro +0 -16
- package/dist/src/components/pagination/PaginationEllipsis.astro +0 -35
- package/dist/src/components/pagination/PaginationItem.astro +0 -16
- package/dist/src/components/pagination/PaginationLink.astro +0 -24
- package/dist/src/components/pagination/PaginationNext.astro +0 -30
- package/dist/src/components/pagination/PaginationPrevious.astro +0 -30
- package/dist/src/components/pagination/index.ts +0 -38
- package/dist/src/components/progress/Progress.astro +0 -155
- package/dist/src/components/progress/index.ts +0 -10
- package/dist/src/components/radio-group/RadioGroup.astro +0 -162
- package/dist/src/components/radio-group/RadioGroupItem.astro +0 -129
- package/dist/src/components/radio-group/RadioGroupTypes.ts +0 -6
- package/dist/src/components/radio-group/index.ts +0 -23
- package/dist/src/components/select/Select.astro +0 -751
- package/dist/src/components/select/SelectContent.astro +0 -94
- package/dist/src/components/select/SelectGroup.astro +0 -9
- package/dist/src/components/select/SelectItem.astro +0 -51
- package/dist/src/components/select/SelectLabel.astro +0 -14
- package/dist/src/components/select/SelectSearch.astro +0 -49
- package/dist/src/components/select/SelectSeparator.astro +0 -12
- package/dist/src/components/select/SelectTrigger.astro +0 -54
- package/dist/src/components/select/SelectTypes.ts +0 -13
- package/dist/src/components/select/SelectValue.astro +0 -19
- package/dist/src/components/select/index.ts +0 -49
- package/dist/src/components/separator/Separator.astro +0 -36
- package/dist/src/components/separator/index.ts +0 -7
- package/dist/src/components/sheet/Sheet.astro +0 -13
- package/dist/src/components/sheet/SheetClose.astro +0 -13
- package/dist/src/components/sheet/SheetContent.astro +0 -92
- package/dist/src/components/sheet/SheetDescription.astro +0 -16
- package/dist/src/components/sheet/SheetFooter.astro +0 -16
- package/dist/src/components/sheet/SheetHeader.astro +0 -16
- package/dist/src/components/sheet/SheetTitle.astro +0 -16
- package/dist/src/components/sheet/SheetTrigger.astro +0 -13
- package/dist/src/components/sheet/index.ts +0 -41
- package/dist/src/components/skeleton/Skeleton.astro +0 -14
- package/dist/src/components/skeleton/index.ts +0 -9
- package/dist/src/components/slider/Slider.astro +0 -411
- package/dist/src/components/slider/index.ts +0 -9
- package/dist/src/components/spinner/Spinner.astro +0 -21
- package/dist/src/components/spinner/index.ts +0 -7
- package/dist/src/components/switch/Switch.astro +0 -192
- package/dist/src/components/switch/SwitchTypes.ts +0 -6
- package/dist/src/components/switch/index.ts +0 -12
- package/dist/src/components/table/Table.astro +0 -18
- package/dist/src/components/table/TableBody.astro +0 -16
- package/dist/src/components/table/TableCaption.astro +0 -16
- package/dist/src/components/table/TableCell.astro +0 -16
- package/dist/src/components/table/TableFoot.astro +0 -16
- package/dist/src/components/table/TableHead.astro +0 -16
- package/dist/src/components/table/TableHeader.astro +0 -16
- package/dist/src/components/table/TableRow.astro +0 -16
- package/dist/src/components/table/index.ts +0 -42
- package/dist/src/components/tabs/Tabs.astro +0 -271
- package/dist/src/components/tabs/TabsContent.astro +0 -28
- package/dist/src/components/tabs/TabsList.astro +0 -22
- package/dist/src/components/tabs/TabsTrigger.astro +0 -34
- package/dist/src/components/tabs/index.ts +0 -20
- package/dist/src/components/textarea/Textarea.astro +0 -29
- package/dist/src/components/textarea/index.ts +0 -9
- package/dist/src/components/toast/ToastDescription.astro +0 -21
- package/dist/src/components/toast/ToastItem.astro +0 -54
- package/dist/src/components/toast/ToastTemplate.astro +0 -25
- package/dist/src/components/toast/ToastTitle.astro +0 -57
- package/dist/src/components/toast/Toaster.astro +0 -982
- package/dist/src/components/toast/index.ts +0 -29
- package/dist/src/components/toast/toast-manager.ts +0 -216
- package/dist/src/components/toggle/Toggle.astro +0 -174
- package/dist/src/components/toggle/ToggleTypes.ts +0 -14
- package/dist/src/components/toggle/index.ts +0 -8
- package/dist/src/components/tooltip/Tooltip.astro +0 -239
- package/dist/src/components/tooltip/TooltipContent.astro +0 -114
- package/dist/src/components/tooltip/TooltipTrigger.astro +0 -10
- package/dist/src/components/tooltip/index.ts +0 -16
- package/dist/src/components/video/Video.astro +0 -120
- package/dist/src/components/video/index.ts +0 -9
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import CircleFilled from "@tabler/icons/filled/circle.svg";
|
|
3
|
-
import type { HTMLAttributes } from "astro/types";
|
|
4
|
-
import { tv, type VariantProps } from "tailwind-variants";
|
|
5
|
-
|
|
6
|
-
type Props = HTMLAttributes<"input"> &
|
|
7
|
-
VariantProps<typeof radioWrapper> &
|
|
8
|
-
VariantProps<typeof radioControl> & {
|
|
9
|
-
/**
|
|
10
|
-
* Value of the radio item
|
|
11
|
-
*/
|
|
12
|
-
value: string;
|
|
13
|
-
/**
|
|
14
|
-
* Whether the radio is disabled
|
|
15
|
-
*/
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Optional ID for the radio item
|
|
19
|
-
*/
|
|
20
|
-
id?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Name to group radio inputs
|
|
23
|
-
*/
|
|
24
|
-
name?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Whether the radio is checked (only for initial state)
|
|
27
|
-
*/
|
|
28
|
-
checked?: boolean;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const radioWrapper = tv({
|
|
32
|
-
base: "relative isolate flex shrink-0",
|
|
33
|
-
variants: {
|
|
34
|
-
size: {
|
|
35
|
-
sm: "size-4",
|
|
36
|
-
md: "size-5",
|
|
37
|
-
lg: "size-6",
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
defaultVariants: {
|
|
41
|
-
size: "md",
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export const radioItem = tv({
|
|
46
|
-
base: [
|
|
47
|
-
"starwind-radio-item peer z-10 h-full w-full",
|
|
48
|
-
"absolute inset-0 cursor-pointer opacity-0 outline-none focus:outline-none focus-visible:outline-none",
|
|
49
|
-
"disabled:cursor-not-allowed",
|
|
50
|
-
],
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
export const radioControl = tv({
|
|
54
|
-
base: [
|
|
55
|
-
"starwind-radio-control",
|
|
56
|
-
"border-input bg-background dark:bg-input/30",
|
|
57
|
-
"outline-none peer-focus-visible:ring-3",
|
|
58
|
-
"absolute inset-0 rounded-full border shadow-xs",
|
|
59
|
-
"transition-[color,box-shadow] peer-checked:[&>svg]:opacity-100",
|
|
60
|
-
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
61
|
-
"peer-aria-invalid:border-error peer-focus-visible:peer-aria-invalid:ring-error/40",
|
|
62
|
-
"flex items-center justify-center",
|
|
63
|
-
],
|
|
64
|
-
variants: {
|
|
65
|
-
variant: {
|
|
66
|
-
default:
|
|
67
|
-
"peer-checked:border-foreground [&>svg]:fill-foreground peer-focus-visible:ring-outline/50",
|
|
68
|
-
primary:
|
|
69
|
-
"peer-checked:border-primary [&>svg]:fill-primary peer-focus-visible:ring-primary/50",
|
|
70
|
-
secondary:
|
|
71
|
-
"peer-checked:border-secondary [&>svg]:fill-secondary peer-focus-visible:ring-secondary/50",
|
|
72
|
-
info: "peer-checked:border-info [&>svg]:fill-info peer-focus-visible:ring-info/50",
|
|
73
|
-
success:
|
|
74
|
-
"peer-checked:border-success [&>svg]:fill-success peer-focus-visible:ring-success/50",
|
|
75
|
-
warning:
|
|
76
|
-
"peer-checked:border-warning [&>svg]:fill-warning peer-focus-visible:ring-warning/50",
|
|
77
|
-
error: "peer-checked:border-error [&>svg]:fill-error peer-focus-visible:ring-error/50",
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
defaultVariants: {
|
|
81
|
-
variant: "primary",
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
export const radioIndicator = tv({
|
|
86
|
-
base: ["starwind-radio-indicator", "opacity-0 transition-opacity"],
|
|
87
|
-
variants: {
|
|
88
|
-
size: {
|
|
89
|
-
sm: "size-2",
|
|
90
|
-
md: "size-3",
|
|
91
|
-
lg: "size-4",
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
defaultVariants: {
|
|
95
|
-
size: "md",
|
|
96
|
-
},
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
const {
|
|
100
|
-
value,
|
|
101
|
-
name,
|
|
102
|
-
disabled = false,
|
|
103
|
-
checked = false,
|
|
104
|
-
id,
|
|
105
|
-
class: className,
|
|
106
|
-
size = "md",
|
|
107
|
-
variant = "default",
|
|
108
|
-
...rest
|
|
109
|
-
} = Astro.props;
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
<div class={radioWrapper({ size })} data-slot="radio-group-item-wrapper">
|
|
113
|
-
<input
|
|
114
|
-
type="radio"
|
|
115
|
-
class={radioItem()}
|
|
116
|
-
name={name}
|
|
117
|
-
id={id}
|
|
118
|
-
value={value}
|
|
119
|
-
checked={checked}
|
|
120
|
-
disabled={disabled}
|
|
121
|
-
data-slot="radio-group-item"
|
|
122
|
-
{...rest}
|
|
123
|
-
/>
|
|
124
|
-
<span class={radioControl({ variant, class: className })} data-slot="radio-group-item-control">
|
|
125
|
-
<slot name="icon">
|
|
126
|
-
<CircleFilled class={radioIndicator({ size })} />
|
|
127
|
-
</slot>
|
|
128
|
-
</span>
|
|
129
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import RadioGroup, { radioGroup } from "./RadioGroup.astro";
|
|
2
|
-
import RadioGroupItem, {
|
|
3
|
-
radioControl,
|
|
4
|
-
radioIndicator,
|
|
5
|
-
radioItem,
|
|
6
|
-
radioWrapper,
|
|
7
|
-
} from "./RadioGroupItem.astro";
|
|
8
|
-
import type { RadioGroupChangeEvent } from "./RadioGroupTypes";
|
|
9
|
-
|
|
10
|
-
const RadioGroupVariants = {
|
|
11
|
-
radioGroup,
|
|
12
|
-
radioWrapper,
|
|
13
|
-
radioItem,
|
|
14
|
-
radioControl,
|
|
15
|
-
radioIndicator,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { RadioGroup, type RadioGroupChangeEvent, RadioGroupItem, RadioGroupVariants };
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
Root: RadioGroup,
|
|
22
|
-
Item: RadioGroupItem,
|
|
23
|
-
};
|