@a2v2ai/uikit 0.0.3 → 0.0.5
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/Alert/Alert.d.ts +13 -0
- package/Alert/Alert.js +64 -0
- package/AlertDialog/AlertDialog.d.ts +43 -0
- package/AlertDialog/AlertDialog.js +121 -0
- package/Avatar/Avatar.d.ts +14 -0
- package/Avatar/Avatar.js +64 -0
- package/Badge/Badge.d.ts +11 -0
- package/Badge/Badge.js +26 -0
- package/Breadcrumb/Breadcrumb.d.ts +19 -0
- package/Breadcrumb/Breadcrumb.js +65 -0
- package/Button/Button.d.ts +20 -0
- package/Button/Button.js +75 -0
- package/Calendar/Calendar.d.ts +16 -0
- package/Calendar/Calendar.js +113 -0
- package/Card/Card.d.ts +16 -0
- package/Card/Card.js +70 -0
- package/ChatBubble/ChatBubble.d.ts +33 -0
- package/ChatBubble/ChatBubble.js +133 -0
- package/Checkbox/Checkbox.d.ts +12 -0
- package/Checkbox/Checkbox.js +57 -0
- package/Dialog/Dialog.d.ts +35 -0
- package/Dialog/Dialog.js +130 -0
- package/Drawer/Drawer.d.ts +33 -0
- package/Drawer/Drawer.js +69 -0
- package/DropdownMenu/DropdownMenu.d.ts +27 -0
- package/DropdownMenu/DropdownMenu.js +85 -0
- package/ErrorMessage/ErrorMessage.d.ts +27 -0
- package/ErrorMessage/ErrorMessage.js +15 -0
- package/Flex/Flex.d.ts +31 -0
- package/Flex/Flex.js +101 -0
- package/IconButton/IconButton.d.ts +23 -0
- package/IconButton/IconButton.js +85 -0
- package/Input/Input.d.ts +22 -0
- package/Input/Input.js +75 -0
- package/InputOTP/InputOTP.d.ts +20 -0
- package/InputOTP/InputOTP.js +85 -0
- package/Label/Label.d.ts +12 -0
- package/Label/Label.js +57 -0
- package/Loader/Loader.d.ts +21 -0
- package/Loader/Loader.js +67 -0
- package/Popover/Popover.d.ts +7 -0
- package/Popover/Popover.js +49 -0
- package/Progress/Progress.d.ts +17 -0
- package/Progress/Progress.js +71 -0
- package/RadioGroup/RadioGroup.d.ts +13 -0
- package/RadioGroup/RadioGroup.js +64 -0
- package/ScrollArea/ScrollArea.d.ts +5 -0
- package/ScrollArea/ScrollArea.js +48 -0
- package/Select/Select.d.ts +21 -0
- package/Select/Select.js +85 -0
- package/Separator/Separator.d.ts +4 -0
- package/Separator/Separator.js +43 -0
- package/Skeleton/Skeleton.d.ts +4 -0
- package/Skeleton/Skeleton.js +8 -0
- package/Spinner/Spinner.d.ts +19 -0
- package/Spinner/Spinner.js +68 -0
- package/Switch/Switch.d.ts +12 -0
- package/Switch/Switch.js +67 -0
- package/Tabs/Tabs.d.ts +15 -0
- package/Tabs/Tabs.js +64 -0
- package/Textarea/Textarea.d.ts +14 -0
- package/Textarea/Textarea.js +64 -0
- package/Toast/Toast.d.ts +12 -0
- package/Toast/Toast.js +29 -0
- package/Tooltip/Tooltip.d.ts +17 -0
- package/Tooltip/Tooltip.js +68 -0
- package/Typography/Typography.d.ts +19 -0
- package/Typography/Typography.js +131 -0
- package/helpers.d.ts +4 -0
- package/helpers.js +13 -0
- package/icons.d.ts +1 -0
- package/icons.js +18 -0
- package/index.css +21 -0
- package/index.d.ts +35 -0
- package/index.js +183 -0
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +18 -0
- package/package.json +1 -1
- package/Alert/Alert.stories.tsx +0 -121
- package/Alert/Alert.tsx +0 -71
- package/AlertDialog/AlertDialog.stories.tsx +0 -665
- package/AlertDialog/AlertDialog.tsx +0 -241
- package/Avatar/Avatar.stories.tsx +0 -128
- package/Avatar/Avatar.tsx +0 -71
- package/Badge/Badge.stories.tsx +0 -76
- package/Badge/Badge.tsx +0 -39
- package/Breadcrumb/Breadcrumb.stories.tsx +0 -231
- package/Breadcrumb/Breadcrumb.tsx +0 -114
- package/Button/Button.stories.tsx +0 -684
- package/Button/Button.tsx +0 -90
- package/Calendar/Calendar.stories.tsx +0 -207
- package/Calendar/Calendar.tsx +0 -232
- package/Card/Card.stories.tsx +0 -136
- package/Card/Card.tsx +0 -96
- package/ChatBubble/ChatBubble.stories.tsx +0 -307
- package/ChatBubble/ChatBubble.tsx +0 -167
- package/Checkbox/Checkbox.stories.tsx +0 -137
- package/Checkbox/Checkbox.tsx +0 -53
- package/Drawer/Drawer.stories.tsx +0 -721
- package/Drawer/Drawer.tsx +0 -201
- package/DropdownMenu/DropdownMenu.stories.tsx +0 -251
- package/DropdownMenu/DropdownMenu.tsx +0 -199
- package/ErrorMessage/ErrorMessage.stories.tsx +0 -159
- package/ErrorMessage/ErrorMessage.tsx +0 -55
- package/Flex/Flex.tsx +0 -102
- package/IconButton/IconButton.stories.tsx +0 -566
- package/IconButton/IconButton.tsx +0 -95
- package/Input/Input.stories.tsx +0 -456
- package/Input/Input.tsx +0 -129
- package/InputOTP/InputOTP.stories.tsx +0 -246
- package/InputOTP/InputOTP.tsx +0 -127
- package/Label/Label.stories.tsx +0 -105
- package/Label/Label.tsx +0 -43
- package/Loader/Loader.stories.tsx +0 -170
- package/Loader/Loader.tsx +0 -62
- package/Popover/Popover.stories.tsx +0 -133
- package/Popover/Popover.tsx +0 -31
- package/Progress/Progress.stories.tsx +0 -146
- package/Progress/Progress.tsx +0 -67
- package/RadioGroup/RadioGroup.stories.tsx +0 -159
- package/RadioGroup/RadioGroup.tsx +0 -68
- package/ScrollArea/ScrollArea.stories.tsx +0 -136
- package/ScrollArea/ScrollArea.tsx +0 -46
- package/Select/Select.stories.tsx +0 -242
- package/Select/Select.tsx +0 -180
- package/Separator/Separator.stories.tsx +0 -110
- package/Separator/Separator.tsx +0 -29
- package/Skeleton/Skeleton.stories.tsx +0 -117
- package/Skeleton/Skeleton.tsx +0 -16
- package/Spinner/Spinner.stories.tsx +0 -210
- package/Spinner/Spinner.tsx +0 -78
- package/Switch/Switch.stories.tsx +0 -146
- package/Switch/Switch.tsx +0 -59
- package/Tabs/Tabs.stories.tsx +0 -197
- package/Tabs/Tabs.tsx +0 -74
- package/Textarea/Textarea.stories.tsx +0 -170
- package/Textarea/Textarea.tsx +0 -51
- package/Toast/Toast.stories.tsx +0 -285
- package/Toast/Toast.tsx +0 -59
- package/Tooltip/Tooltip.stories.tsx +0 -463
- package/Tooltip/Tooltip.tsx +0 -96
- package/Typography/Typography.stories.tsx +0 -235
- package/Typography/Typography.tsx +0 -171
- package/helpers.ts +0 -5
- package/icons.ts +0 -2
- package/index.ts +0 -136
- package/lib/utils.ts +0 -15
- package/tsconfig.json +0 -24
package/Checkbox/Checkbox.tsx
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
|
|
3
|
-
import { Check, Minus } from "lucide-react"
|
|
4
|
-
import { cva } from "class-variance-authority"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../lib/utils"
|
|
7
|
-
|
|
8
|
-
type CheckboxSize = "small" | "regular"
|
|
9
|
-
|
|
10
|
-
const checkboxVariants = cva(
|
|
11
|
-
"peer shrink-0 border border-grey-300 bg-white ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-main-950 data-[state=checked]:border-main-950 data-[state=checked]:text-main-50 data-[state=indeterminate]:bg-main-950 data-[state=indeterminate]:border-main-950 data-[state=indeterminate]:text-main-50",
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
size: {
|
|
15
|
-
small: "size-4 rounded-[4px]",
|
|
16
|
-
regular: "size-5 rounded-md",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
defaultVariants: {
|
|
20
|
-
size: "regular",
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
export interface CheckboxProps
|
|
26
|
-
extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
|
27
|
-
size?: CheckboxSize
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const Checkbox = React.forwardRef<
|
|
31
|
-
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
32
|
-
CheckboxProps
|
|
33
|
-
>(({ className, size, ...props }, ref) => (
|
|
34
|
-
<CheckboxPrimitive.Root
|
|
35
|
-
ref={ref}
|
|
36
|
-
className={cn(checkboxVariants({ size }), className)}
|
|
37
|
-
{...props}
|
|
38
|
-
>
|
|
39
|
-
<CheckboxPrimitive.Indicator
|
|
40
|
-
className={cn("flex items-center justify-center text-current")}
|
|
41
|
-
>
|
|
42
|
-
{props.checked === "indeterminate" ? (
|
|
43
|
-
<Minus className={cn(size === "small" ? "size-3" : "size-3.5")} />
|
|
44
|
-
) : (
|
|
45
|
-
<Check className={cn(size === "small" ? "size-3" : "size-3.5")} />
|
|
46
|
-
)}
|
|
47
|
-
</CheckboxPrimitive.Indicator>
|
|
48
|
-
</CheckboxPrimitive.Root>
|
|
49
|
-
))
|
|
50
|
-
Checkbox.displayName = CheckboxPrimitive.Root.displayName
|
|
51
|
-
|
|
52
|
-
export { Checkbox, checkboxVariants }
|
|
53
|
-
export type { CheckboxSize }
|