@gunjo/ui 0.0.1-alpha.0
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/README.md +129 -0
- package/design/atoms-metadata.json +82 -0
- package/design/molecules-metadata.json +130 -0
- package/design/organisms-metadata.json +38 -0
- package/design/templates-metadata.json +38 -0
- package/package.json +158 -0
- package/src/components/atoms/Alert.tsx +63 -0
- package/src/components/atoms/Avatar.tsx +57 -0
- package/src/components/atoms/Badge.tsx +30 -0
- package/src/components/atoms/Button.tsx +29 -0
- package/src/components/atoms/ButtonVariants.ts +37 -0
- package/src/components/atoms/Checkbox.tsx +52 -0
- package/src/components/atoms/Img.tsx +102 -0
- package/src/components/atoms/Input.tsx +37 -0
- package/src/components/atoms/Kbd.tsx +22 -0
- package/src/components/atoms/Label.tsx +22 -0
- package/src/components/atoms/Progress.tsx +38 -0
- package/src/components/atoms/RadioGroup.tsx +86 -0
- package/src/components/atoms/Select.tsx +28 -0
- package/src/components/atoms/Separator.tsx +33 -0
- package/src/components/atoms/Skeleton.tsx +36 -0
- package/src/components/atoms/Slider.tsx +26 -0
- package/src/components/atoms/Spinner.tsx +34 -0
- package/src/components/atoms/Switch.tsx +47 -0
- package/src/components/atoms/Textarea.tsx +34 -0
- package/src/components/atoms/ToggleGroup.tsx +60 -0
- package/src/components/atoms/ToolPill.tsx +77 -0
- package/src/components/atoms/generated/default-variant-keys.ts +36 -0
- package/src/components/atoms/generated/variant-keys.ts +61 -0
- package/src/components/generated/component-manifest.ts +741 -0
- package/src/components/generated/component-style-hints.ts +1262 -0
- package/src/components/molecules/AIChatInput.tsx +140 -0
- package/src/components/molecules/AIChatMessage.tsx +109 -0
- package/src/components/molecules/Accordion.tsx +99 -0
- package/src/components/molecules/Breadcrumb.tsx +115 -0
- package/src/components/molecules/Calendar.tsx +60 -0
- package/src/components/molecules/Card.tsx +78 -0
- package/src/components/molecules/Carousel.tsx +261 -0
- package/src/components/molecules/Command.tsx +152 -0
- package/src/components/molecules/ContextMenu.tsx +200 -0
- package/src/components/molecules/Dialog.tsx +122 -0
- package/src/components/molecules/DropdownMenu.tsx +200 -0
- package/src/components/molecules/FilterButton.tsx +133 -0
- package/src/components/molecules/Form.tsx +90 -0
- package/src/components/molecules/HoverCard.tsx +29 -0
- package/src/components/molecules/List.tsx +120 -0
- package/src/components/molecules/Menubar.tsx +231 -0
- package/src/components/molecules/Modal.tsx +66 -0
- package/src/components/molecules/NotificationCenter.tsx +118 -0
- package/src/components/molecules/Pagination.tsx +118 -0
- package/src/components/molecules/Popover.tsx +31 -0
- package/src/components/molecules/ProgressWidget.tsx +40 -0
- package/src/components/molecules/Resizable.tsx +47 -0
- package/src/components/molecules/ScrollArea.tsx +48 -0
- package/src/components/molecules/Sheet.tsx +140 -0
- package/src/components/molecules/SidebarItem.tsx +134 -0
- package/src/components/molecules/SortButton.tsx +56 -0
- package/src/components/molecules/StatusBar.tsx +41 -0
- package/src/components/molecules/Stepper.tsx +108 -0
- package/src/components/molecules/Table.tsx +117 -0
- package/src/components/molecules/Tabs.tsx +64 -0
- package/src/components/molecules/Toast.tsx +57 -0
- package/src/components/molecules/Tooltip.tsx +30 -0
- package/src/components/molecules/generated/default-variant-keys.ts +22 -0
- package/src/components/molecules/generated/variant-keys.ts +33 -0
- package/src/components/organisms/AppRail.tsx +28 -0
- package/src/components/organisms/CommandPalette.tsx +58 -0
- package/src/components/organisms/FileUploader.tsx +151 -0
- package/src/components/organisms/FloatingPanel.tsx +46 -0
- package/src/components/organisms/InspectorPanel.tsx +65 -0
- package/src/components/organisms/RightRail.tsx +29 -0
- package/src/components/organisms/ShareModal.tsx +182 -0
- package/src/components/organisms/SpatialCanvas.tsx +36 -0
- package/src/components/organisms/ToastProvider.tsx +49 -0
- package/src/components/templates/AuthTemplate.tsx +58 -0
- package/src/components/templates/BannalyzeTemplate.tsx +55 -0
- package/src/components/templates/ChatTemplate.tsx +55 -0
- package/src/components/templates/DashboardTemplate.tsx +34 -0
- package/src/components/templates/EditorTemplate.tsx +46 -0
- package/src/components/templates/KanbanTemplate.tsx +38 -0
- package/src/components/templates/LandingTemplate.tsx +53 -0
- package/src/components/templates/MediaLibraryTemplate.tsx +55 -0
- package/src/components/templates/SettingsTemplate.tsx +48 -0
- package/src/globals.css +108 -0
- package/src/index.ts +89 -0
- package/src/lib/utils.ts +6 -0
- package/tailwind-preset.js +11 -0
- package/tailwind-theme-extend.cjs +86 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentProps } from "react"
|
|
2
|
+
import { RefreshCw } from "lucide-react"
|
|
3
|
+
import { cn } from "../../lib/utils"
|
|
4
|
+
import type { SpinnerVariantKey } from "./generated/variant-keys"
|
|
5
|
+
import { spinnerDefaultVariantKey } from "./generated/default-variant-keys"
|
|
6
|
+
|
|
7
|
+
type SpinnerSize = SpinnerVariantKey | "icon"
|
|
8
|
+
|
|
9
|
+
const spinnerSizeClasses: Record<SpinnerVariantKey, string> = {
|
|
10
|
+
default: "h-4 w-4",
|
|
11
|
+
lg: "h-6 w-6",
|
|
12
|
+
sm: "h-3 w-3",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function isSpinnerVariantKey(size: SpinnerSize): size is SpinnerVariantKey {
|
|
16
|
+
return Object.prototype.hasOwnProperty.call(spinnerSizeClasses, size)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface SpinnerProps extends ComponentProps<"svg"> {
|
|
20
|
+
size?: SpinnerSize
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function Spinner({ className, size = spinnerDefaultVariantKey, ...props }: SpinnerProps) {
|
|
24
|
+
return (
|
|
25
|
+
<RefreshCw
|
|
26
|
+
className={cn(
|
|
27
|
+
"animate-spin text-muted-foreground",
|
|
28
|
+
isSpinnerVariantKey(size) ? spinnerSizeClasses[size] : "h-10 w-10",
|
|
29
|
+
className
|
|
30
|
+
)}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { cn } from "../../lib/utils"
|
|
5
|
+
import type { SwitchVariantKey } from "./generated/variant-keys"
|
|
6
|
+
import { switchDefaultVariantKey } from "./generated/default-variant-keys"
|
|
7
|
+
|
|
8
|
+
const switchStateClasses: Record<SwitchVariantKey, string> = {
|
|
9
|
+
checked: "justify-end bg-foreground",
|
|
10
|
+
unchecked: "justify-start bg-secondary",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SwitchProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
+
checked?: boolean
|
|
15
|
+
onCheckedChange?: (checked: boolean) => void
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(
|
|
19
|
+
({ className, checked, onCheckedChange, ...props }, ref) => {
|
|
20
|
+
const switchState: SwitchVariantKey = checked ? "checked" : switchDefaultVariantKey
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<button
|
|
24
|
+
type="button"
|
|
25
|
+
role="switch"
|
|
26
|
+
aria-checked={checked}
|
|
27
|
+
onClick={() => onCheckedChange?.(!checked)}
|
|
28
|
+
className={cn(
|
|
29
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border border-transparent p-0.5 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
30
|
+
switchStateClasses[switchState],
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
ref={ref}
|
|
34
|
+
{...props}
|
|
35
|
+
>
|
|
36
|
+
<span
|
|
37
|
+
className={cn(
|
|
38
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-sm ring-0 transition-transform"
|
|
39
|
+
)}
|
|
40
|
+
/>
|
|
41
|
+
</button>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
Switch.displayName = "Switch"
|
|
46
|
+
|
|
47
|
+
export { Switch }
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "../../lib/utils"
|
|
3
|
+
import type { TextareaVariantKey } from "./generated/variant-keys"
|
|
4
|
+
import { textareaDefaultVariantKey } from "./generated/default-variant-keys"
|
|
5
|
+
|
|
6
|
+
const textareaVariantClasses: Record<TextareaVariantKey, string> = {
|
|
7
|
+
default: "placeholder:text-muted-foreground",
|
|
8
|
+
disabled:
|
|
9
|
+
"placeholder:text-muted-foreground disabled:bg-muted disabled:text-muted-foreground disabled:opacity-50",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> { }
|
|
13
|
+
|
|
14
|
+
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
15
|
+
({ className, disabled, ...props }, ref) => {
|
|
16
|
+
const textareaState: TextareaVariantKey = disabled ? "disabled" : textareaDefaultVariantKey
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<textarea
|
|
20
|
+
className={cn(
|
|
21
|
+
"inline-flex h-20 w-[280px] max-w-full items-center rounded-lg border border-input bg-transparent px-3 py-2 text-sm font-normal shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed",
|
|
22
|
+
textareaVariantClasses[textareaState],
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
ref={ref}
|
|
26
|
+
disabled={disabled}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
Textarea.displayName = "Textarea"
|
|
33
|
+
|
|
34
|
+
export { Textarea }
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
|
|
5
|
+
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
|
+
import type { ToggleGroupVariantKey } from "./generated/variant-keys"
|
|
8
|
+
import { toggleGroupDefaultVariantKey } from "./generated/default-variant-keys"
|
|
9
|
+
|
|
10
|
+
const toggleGroupVariantClasses: Record<ToggleGroupVariantKey, string> = {
|
|
11
|
+
default: "bg-secondary text-foreground hover:bg-secondary/80",
|
|
12
|
+
outline: "border border-input bg-transparent text-foreground hover:bg-muted",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const ToggleGroup = React.forwardRef<
|
|
16
|
+
React.ElementRef<typeof ToggleGroupPrimitive.Root>,
|
|
17
|
+
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>
|
|
18
|
+
>(({ className, children, ...props }, ref) => (
|
|
19
|
+
<ToggleGroupPrimitive.Root
|
|
20
|
+
ref={ref}
|
|
21
|
+
className={cn("flex items-center justify-center gap-1", className)}
|
|
22
|
+
{...props}
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</ToggleGroupPrimitive.Root>
|
|
26
|
+
))
|
|
27
|
+
|
|
28
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName
|
|
29
|
+
|
|
30
|
+
const ToggleGroupItem = React.forwardRef<
|
|
31
|
+
React.ElementRef<typeof ToggleGroupPrimitive.Item>,
|
|
32
|
+
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> & {
|
|
33
|
+
variant?: ToggleGroupVariantKey
|
|
34
|
+
size?: "default" | "sm" | "lg"
|
|
35
|
+
}
|
|
36
|
+
>(({ className, children, variant, size = "default", ...props }, ref) => {
|
|
37
|
+
const resolvedVariant = variant ?? toggleGroupDefaultVariantKey
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<ToggleGroupPrimitive.Item
|
|
41
|
+
ref={ref}
|
|
42
|
+
className={cn(
|
|
43
|
+
"inline-flex w-fit items-center justify-center rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-foreground data-[state=on]:text-primary-foreground",
|
|
44
|
+
// Size variants
|
|
45
|
+
size === "default" && "h-9 py-0 px-3",
|
|
46
|
+
size === "sm" && "h-8 px-2",
|
|
47
|
+
size === "lg" && "h-10 px-3",
|
|
48
|
+
toggleGroupVariantClasses[resolvedVariant],
|
|
49
|
+
className
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
>
|
|
53
|
+
{children}
|
|
54
|
+
</ToggleGroupPrimitive.Item>
|
|
55
|
+
)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName
|
|
59
|
+
|
|
60
|
+
export { ToggleGroup, ToggleGroupItem }
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
4
|
+
import type { ToolPillVariantKey } from "./generated/variant-keys";
|
|
5
|
+
import { toolPillDefaultVariantKey } from "./generated/default-variant-keys";
|
|
6
|
+
|
|
7
|
+
interface ToolPillProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
+
icon: LucideIcon;
|
|
9
|
+
label?: string;
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
variant?: ToolPillVariantKey;
|
|
12
|
+
size?: 'sm' | 'md' | 'lg';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ToolPill: React.FC<ToolPillProps> = ({
|
|
16
|
+
icon: Icon,
|
|
17
|
+
label,
|
|
18
|
+
isActive,
|
|
19
|
+
variant = toolPillDefaultVariantKey,
|
|
20
|
+
size = 'md',
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}) => {
|
|
24
|
+
const sizeClasses = {
|
|
25
|
+
sm: 'p-1.5',
|
|
26
|
+
md: 'p-2.5',
|
|
27
|
+
lg: 'p-3.5',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const iconSizes = {
|
|
31
|
+
sm: 14,
|
|
32
|
+
md: 18,
|
|
33
|
+
lg: 22,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const variantClasses: Record<ToolPillVariantKey, { inactive: string; active: string }> = {
|
|
37
|
+
primary: {
|
|
38
|
+
inactive: "bg-primary/10 text-primary hover:bg-primary/20 hover:shadow-md hover:-translate-y-0.5",
|
|
39
|
+
active: "bg-primary text-primary-foreground shadow-lg shadow-primary/30 ring-2 ring-primary/20",
|
|
40
|
+
},
|
|
41
|
+
secondary: {
|
|
42
|
+
inactive: "bg-background/70 text-muted-foreground hover:bg-background hover:shadow-md hover:-translate-y-0.5",
|
|
43
|
+
active: "bg-secondary text-secondary-foreground shadow-lg shadow-foreground/10 ring-2 ring-border",
|
|
44
|
+
},
|
|
45
|
+
danger: {
|
|
46
|
+
inactive: "bg-destructive/10 text-destructive hover:bg-destructive/20 hover:shadow-md hover:-translate-y-0.5",
|
|
47
|
+
active: "bg-destructive text-destructive-foreground shadow-lg shadow-destructive/30 ring-2 ring-destructive/20",
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<button
|
|
53
|
+
type="button"
|
|
54
|
+
className={cn(
|
|
55
|
+
"group relative flex h-10 w-10 items-center justify-center rounded-xl transition-all duration-200",
|
|
56
|
+
isActive ? variantClasses[variant].active : variantClasses[variant].inactive,
|
|
57
|
+
|
|
58
|
+
sizeClasses[size],
|
|
59
|
+
className
|
|
60
|
+
)}
|
|
61
|
+
{...props}
|
|
62
|
+
>
|
|
63
|
+
<Icon size={iconSizes[size]} strokeWidth={isActive ? 2.5 : 2} />
|
|
64
|
+
|
|
65
|
+
{label && (
|
|
66
|
+
<span className="sr-only">{label}</span>
|
|
67
|
+
)}
|
|
68
|
+
|
|
69
|
+
{/* Tooltip on Hover */}
|
|
70
|
+
{label && (
|
|
71
|
+
<div className="absolute left-full ml-2 px-2 py-1 bg-foreground text-background text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-50">
|
|
72
|
+
{label}
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
</button>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Generated by `npm run design:sync:components`. Do not edit manually.
|
|
3
|
+
|
|
4
|
+
import type { AlertVariantKey, AvatarVariantKey, BadgeVariantKey, ButtonVariantKey, CheckboxVariantKey, ImgVariantKey, InputVariantKey, RadioGroupVariantKey, SeparatorVariantKey, SpinnerVariantKey, SwitchVariantKey, TextareaVariantKey, ToggleGroupVariantKey, ToolPillVariantKey } from "./variant-keys";
|
|
5
|
+
|
|
6
|
+
export const alertDefaultVariantKey: AlertVariantKey = "default";
|
|
7
|
+
export const avatarDefaultVariantKey: AvatarVariantKey = "fallback";
|
|
8
|
+
export const badgeDefaultVariantKey: BadgeVariantKey = "default";
|
|
9
|
+
export const buttonDefaultVariantKey: ButtonVariantKey = "default";
|
|
10
|
+
export const checkboxDefaultVariantKey: CheckboxVariantKey = "unchecked";
|
|
11
|
+
export const imgDefaultVariantKey: ImgVariantKey = "loading";
|
|
12
|
+
export const inputDefaultVariantKey: InputVariantKey = "default";
|
|
13
|
+
export const radioGroupDefaultVariantKey: RadioGroupVariantKey = "unchecked";
|
|
14
|
+
export const separatorDefaultVariantKey: SeparatorVariantKey = "horizontal";
|
|
15
|
+
export const spinnerDefaultVariantKey: SpinnerVariantKey = "default";
|
|
16
|
+
export const switchDefaultVariantKey: SwitchVariantKey = "unchecked";
|
|
17
|
+
export const textareaDefaultVariantKey: TextareaVariantKey = "default";
|
|
18
|
+
export const toggleGroupDefaultVariantKey: ToggleGroupVariantKey = "default";
|
|
19
|
+
export const toolPillDefaultVariantKey: ToolPillVariantKey = "primary";
|
|
20
|
+
|
|
21
|
+
export const atomDefaultVariantKeys = {
|
|
22
|
+
alert: alertDefaultVariantKey,
|
|
23
|
+
avatar: avatarDefaultVariantKey,
|
|
24
|
+
badge: badgeDefaultVariantKey,
|
|
25
|
+
button: buttonDefaultVariantKey,
|
|
26
|
+
checkbox: checkboxDefaultVariantKey,
|
|
27
|
+
img: imgDefaultVariantKey,
|
|
28
|
+
input: inputDefaultVariantKey,
|
|
29
|
+
radioGroup: radioGroupDefaultVariantKey,
|
|
30
|
+
separator: separatorDefaultVariantKey,
|
|
31
|
+
spinner: spinnerDefaultVariantKey,
|
|
32
|
+
switch: switchDefaultVariantKey,
|
|
33
|
+
textarea: textareaDefaultVariantKey,
|
|
34
|
+
toggleGroup: toggleGroupDefaultVariantKey,
|
|
35
|
+
toolPill: toolPillDefaultVariantKey,
|
|
36
|
+
} as const;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Generated by `npm run design:sync:components`. Do not edit manually.
|
|
3
|
+
|
|
4
|
+
export const alertVariantKeys = ["default", "destructive"] as const;
|
|
5
|
+
export type AlertVariantKey = (typeof alertVariantKeys)[number];
|
|
6
|
+
|
|
7
|
+
export const avatarVariantKeys = ["fallback", "image"] as const;
|
|
8
|
+
export type AvatarVariantKey = (typeof avatarVariantKeys)[number];
|
|
9
|
+
|
|
10
|
+
export const badgeVariantKeys = ["default", "destructive", "outline", "secondary"] as const;
|
|
11
|
+
export type BadgeVariantKey = (typeof badgeVariantKeys)[number];
|
|
12
|
+
|
|
13
|
+
export const buttonVariantKeys = ["default", "destructive", "ghost", "link", "outline", "secondary"] as const;
|
|
14
|
+
export type ButtonVariantKey = (typeof buttonVariantKeys)[number];
|
|
15
|
+
|
|
16
|
+
export const checkboxVariantKeys = ["checked", "disabled", "unchecked"] as const;
|
|
17
|
+
export type CheckboxVariantKey = (typeof checkboxVariantKeys)[number];
|
|
18
|
+
|
|
19
|
+
export const imgVariantKeys = ["error", "loaded", "loading"] as const;
|
|
20
|
+
export type ImgVariantKey = (typeof imgVariantKeys)[number];
|
|
21
|
+
|
|
22
|
+
export const inputVariantKeys = ["default", "disabled", "placeholder"] as const;
|
|
23
|
+
export type InputVariantKey = (typeof inputVariantKeys)[number];
|
|
24
|
+
|
|
25
|
+
export const radioGroupVariantKeys = ["checked", "unchecked"] as const;
|
|
26
|
+
export type RadioGroupVariantKey = (typeof radioGroupVariantKeys)[number];
|
|
27
|
+
|
|
28
|
+
export const separatorVariantKeys = ["horizontal", "vertical"] as const;
|
|
29
|
+
export type SeparatorVariantKey = (typeof separatorVariantKeys)[number];
|
|
30
|
+
|
|
31
|
+
export const spinnerVariantKeys = ["default", "lg", "sm"] as const;
|
|
32
|
+
export type SpinnerVariantKey = (typeof spinnerVariantKeys)[number];
|
|
33
|
+
|
|
34
|
+
export const switchVariantKeys = ["checked", "unchecked"] as const;
|
|
35
|
+
export type SwitchVariantKey = (typeof switchVariantKeys)[number];
|
|
36
|
+
|
|
37
|
+
export const textareaVariantKeys = ["default", "disabled"] as const;
|
|
38
|
+
export type TextareaVariantKey = (typeof textareaVariantKeys)[number];
|
|
39
|
+
|
|
40
|
+
export const toggleGroupVariantKeys = ["default", "outline"] as const;
|
|
41
|
+
export type ToggleGroupVariantKey = (typeof toggleGroupVariantKeys)[number];
|
|
42
|
+
|
|
43
|
+
export const toolPillVariantKeys = ["danger", "primary", "secondary"] as const;
|
|
44
|
+
export type ToolPillVariantKey = (typeof toolPillVariantKeys)[number];
|
|
45
|
+
|
|
46
|
+
export const atomVariantKeys = {
|
|
47
|
+
alert: alertVariantKeys,
|
|
48
|
+
avatar: avatarVariantKeys,
|
|
49
|
+
badge: badgeVariantKeys,
|
|
50
|
+
button: buttonVariantKeys,
|
|
51
|
+
checkbox: checkboxVariantKeys,
|
|
52
|
+
img: imgVariantKeys,
|
|
53
|
+
input: inputVariantKeys,
|
|
54
|
+
radioGroup: radioGroupVariantKeys,
|
|
55
|
+
separator: separatorVariantKeys,
|
|
56
|
+
spinner: spinnerVariantKeys,
|
|
57
|
+
switch: switchVariantKeys,
|
|
58
|
+
textarea: textareaVariantKeys,
|
|
59
|
+
toggleGroup: toggleGroupVariantKeys,
|
|
60
|
+
toolPill: toolPillVariantKeys,
|
|
61
|
+
} as const;
|