tokka-ui 0.2.3 → 0.3.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/dist/alert-dialog.d.ts +5 -1
- package/dist/alert-dialog.js +13 -1
- package/dist/avatar.d.ts +4 -1
- package/dist/avatar.js +37 -1
- package/dist/breadcrumb.js +2 -2
- package/dist/button.d.ts +2 -2
- package/dist/button.js +1 -1
- package/dist/calendar.js +2 -2
- package/dist/card.d.ts +3 -2
- package/dist/card.js +11 -1
- package/dist/carousel.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/{chunk-QBAV4RWS.js → chunk-A7UVRY2Z.js} +1 -1
- package/dist/{chunk-HHN2GS4U.js → chunk-CR3N6JKY.js} +1 -1
- package/dist/{chunk-BOKKBA25.js → chunk-ETVGPIML.js} +35 -1
- package/dist/{chunk-63HUTNB3.js → chunk-UFTU4NA7.js} +2 -2
- package/dist/{chunk-DVPPDIDA.js → chunk-XWKD7TFC.js} +13 -9
- package/dist/combobox.d.ts +1 -1
- package/dist/combobox.js +9 -1
- package/dist/command.d.ts +7 -7
- package/dist/data-table.js +1 -1
- package/dist/date-picker.d.ts +1 -1
- package/dist/date-picker.js +11 -3
- package/dist/drawer.js +1 -1
- package/dist/dropdown-menu.d.ts +1 -0
- package/dist/dropdown-menu.js +2 -1
- package/dist/field.d.ts +9 -0
- package/dist/field.js +62 -0
- package/dist/input-otp.d.ts +2 -2
- package/dist/input.js +2 -2
- package/dist/native-select.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.d.ts +9 -1
- package/dist/popover.js +9 -1
- package/dist/radio-group.js +1 -1
- package/dist/resizable.d.ts +1 -1
- package/dist/scroll-area.js +1 -1
- package/dist/select.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/slider.js +2 -2
- package/dist/switch.js +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.js +2 -2
- package/dist/textarea.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +8 -4
- package/package.json +11 -7
- package/src/alert-dialog.tsx +12 -0
- package/src/avatar.tsx +44 -2
- package/src/breadcrumb.tsx +2 -2
- package/src/button.tsx +13 -9
- package/src/card.tsx +16 -4
- package/src/checkbox.tsx +2 -2
- package/src/drawer.tsx +1 -1
- package/src/dropdown-menu.tsx +3 -1
- package/src/field.tsx +67 -0
- package/src/input.tsx +2 -2
- package/src/native-select.tsx +1 -1
- package/src/popover.tsx +38 -1
- package/src/radio-group.tsx +1 -1
- package/src/scroll-area.tsx +1 -1
- package/src/select.tsx +1 -1
- package/src/slider.tsx +2 -2
- package/src/switch.tsx +1 -1
- package/src/table.tsx +2 -2
- package/src/tabs.tsx +2 -2
- package/src/textarea.tsx +1 -1
- package/src/toggle.tsx +1 -1
- package/src/tooltip.tsx +13 -12
- package/LICENSE +0 -21
package/dist/input.js
CHANGED
|
@@ -15,7 +15,7 @@ var Input = React.forwardRef(
|
|
|
15
15
|
{
|
|
16
16
|
type,
|
|
17
17
|
className: cn(
|
|
18
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
18
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
19
19
|
icon && "pl-10",
|
|
20
20
|
trailing && "pr-10",
|
|
21
21
|
className
|
|
@@ -32,7 +32,7 @@ var Input = React.forwardRef(
|
|
|
32
32
|
{
|
|
33
33
|
type,
|
|
34
34
|
className: cn(
|
|
35
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
35
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
36
36
|
className
|
|
37
37
|
),
|
|
38
38
|
ref,
|
package/dist/native-select.js
CHANGED
|
@@ -13,7 +13,7 @@ var NativeSelect = React.forwardRef(
|
|
|
13
13
|
"select",
|
|
14
14
|
{
|
|
15
15
|
className: cn(
|
|
16
|
-
"flex h-10 w-full appearance-none items-center justify-between rounded-md border border-input bg-background px-3 py-2 pr-8 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-
|
|
16
|
+
"flex h-10 w-full appearance-none items-center justify-between rounded-md border border-input bg-background px-3 py-2 pr-8 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
17
17
|
className
|
|
18
18
|
),
|
|
19
19
|
ref,
|
package/dist/pagination.js
CHANGED
package/dist/popover.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
4
|
|
|
4
5
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
5
6
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
8
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const PopoverHeader: {
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const PopoverTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
declare const PopoverDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
15
|
|
|
8
|
-
export { Popover, PopoverContent, PopoverTrigger };
|
|
16
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
package/dist/popover.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Popover,
|
|
3
|
+
PopoverAnchor,
|
|
3
4
|
PopoverContent,
|
|
5
|
+
PopoverDescription,
|
|
6
|
+
PopoverHeader,
|
|
7
|
+
PopoverTitle,
|
|
4
8
|
PopoverTrigger
|
|
5
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ETVGPIML.js";
|
|
6
10
|
import "./chunk-RQHJBTEU.js";
|
|
7
11
|
export {
|
|
8
12
|
Popover,
|
|
13
|
+
PopoverAnchor,
|
|
9
14
|
PopoverContent,
|
|
15
|
+
PopoverDescription,
|
|
16
|
+
PopoverHeader,
|
|
17
|
+
PopoverTitle,
|
|
10
18
|
PopoverTrigger
|
|
11
19
|
};
|
package/dist/radio-group.js
CHANGED
|
@@ -24,7 +24,7 @@ var RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
24
24
|
{
|
|
25
25
|
ref,
|
|
26
26
|
className: cn(
|
|
27
|
-
"aspect-square size-4 rounded-full border border-
|
|
27
|
+
"aspect-square size-4 rounded-full border border-input text-primary ring-offset-background focus:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
30
30
|
...props,
|
package/dist/resizable.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
4
4
|
|
|
5
5
|
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => react_jsx_runtime.JSX.Element;
|
|
6
|
-
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<
|
|
6
|
+
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLDivElement | HTMLObjectElement | HTMLAnchorElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
7
7
|
className?: string | undefined;
|
|
8
8
|
collapsedSize?: number | undefined;
|
|
9
9
|
collapsible?: boolean | undefined;
|
package/dist/scroll-area.js
CHANGED
|
@@ -32,7 +32,7 @@ var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...prop
|
|
|
32
32
|
className
|
|
33
33
|
),
|
|
34
34
|
...props,
|
|
35
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
35
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border hover:bg-border/80 transition-colors" })
|
|
36
36
|
}
|
|
37
37
|
));
|
|
38
38
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
package/dist/select.js
CHANGED
|
@@ -15,7 +15,7 @@ var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
15
15
|
{
|
|
16
16
|
ref,
|
|
17
17
|
className: cn(
|
|
18
|
-
"flex h-
|
|
18
|
+
"flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
19
19
|
className
|
|
20
20
|
),
|
|
21
21
|
...props,
|
package/dist/sidebar.js
CHANGED
package/dist/slider.js
CHANGED
|
@@ -16,8 +16,8 @@ var Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
16
16
|
),
|
|
17
17
|
...props,
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-
|
|
20
|
-
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block size-5 rounded-full border-2 border-primary bg-background
|
|
19
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
20
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block size-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50" })
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
));
|
package/dist/switch.js
CHANGED
|
@@ -10,7 +10,7 @@ var Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
10
10
|
SwitchPrimitives.Root,
|
|
11
11
|
{
|
|
12
12
|
className: cn(
|
|
13
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-
|
|
13
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
14
14
|
className
|
|
15
15
|
),
|
|
16
16
|
...props,
|
package/dist/table.js
CHANGED
package/dist/tabs.js
CHANGED
|
@@ -24,7 +24,7 @@ var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
24
24
|
{
|
|
25
25
|
ref,
|
|
26
26
|
className: cn(
|
|
27
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-
|
|
27
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
30
30
|
...props
|
|
@@ -36,7 +36,7 @@ var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
36
36
|
{
|
|
37
37
|
ref,
|
|
38
38
|
className: cn(
|
|
39
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-
|
|
39
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
40
40
|
className
|
|
41
41
|
),
|
|
42
42
|
...props
|
package/dist/textarea.js
CHANGED
|
@@ -11,7 +11,7 @@ var Textarea = React.forwardRef(
|
|
|
11
11
|
"textarea",
|
|
12
12
|
{
|
|
13
13
|
className: cn(
|
|
14
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
14
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
15
|
className
|
|
16
16
|
),
|
|
17
17
|
ref,
|
package/dist/toggle-group.js
CHANGED
package/dist/toggle.js
CHANGED
package/dist/tooltip.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
// src/tooltip.tsx
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
10
10
|
var Tooltip = TooltipPrimitive.Root;
|
|
11
11
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
12
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset =
|
|
12
|
+
var TooltipContent = React.forwardRef(({ className, sideOffset = 0, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
13
13
|
TooltipPrimitive.Content,
|
|
14
14
|
{
|
|
15
15
|
ref,
|
|
@@ -18,9 +18,13 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
18
18
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
19
19
|
className
|
|
20
20
|
),
|
|
21
|
-
...props
|
|
21
|
+
...props,
|
|
22
|
+
children: [
|
|
23
|
+
props.children,
|
|
24
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "fill-border" })
|
|
25
|
+
]
|
|
22
26
|
}
|
|
23
|
-
)
|
|
27
|
+
));
|
|
24
28
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
25
29
|
export {
|
|
26
30
|
Tooltip,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokka-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React UI components for tokka with design token support",
|
|
6
6
|
"keywords": [
|
|
@@ -111,6 +111,10 @@
|
|
|
111
111
|
"types": "./dist/dropdown-menu.d.ts",
|
|
112
112
|
"default": "./dist/dropdown-menu.js"
|
|
113
113
|
},
|
|
114
|
+
"./field": {
|
|
115
|
+
"types": "./dist/field.d.ts",
|
|
116
|
+
"default": "./dist/field.js"
|
|
117
|
+
},
|
|
114
118
|
"./form": {
|
|
115
119
|
"types": "./dist/form.d.ts",
|
|
116
120
|
"default": "./dist/form.js"
|
|
@@ -232,6 +236,11 @@
|
|
|
232
236
|
"dist",
|
|
233
237
|
"src"
|
|
234
238
|
],
|
|
239
|
+
"scripts": {
|
|
240
|
+
"build": "tsup src/*.tsx --format esm --dts --clean --external react",
|
|
241
|
+
"dev": "tsup src/*.tsx --format esm --dts --watch --external react",
|
|
242
|
+
"typecheck": "tsc --noEmit"
|
|
243
|
+
},
|
|
235
244
|
"peerDependencies": {
|
|
236
245
|
"react": "^18.2.0 || ^19.0.0",
|
|
237
246
|
"react-dom": "^18.2.0 || ^19.0.0",
|
|
@@ -287,10 +296,5 @@
|
|
|
287
296
|
"react-dom": "^18.2.0",
|
|
288
297
|
"tsup": "^8.0.2",
|
|
289
298
|
"typescript": "^5.3.3"
|
|
290
|
-
},
|
|
291
|
-
"scripts": {
|
|
292
|
-
"build": "tsup src/*.tsx --format esm --dts --clean --external react",
|
|
293
|
-
"dev": "tsup src/*.tsx --format esm --dts --watch --external react",
|
|
294
|
-
"typecheck": "tsc --noEmit"
|
|
295
299
|
}
|
|
296
|
-
}
|
|
300
|
+
}
|
package/src/alert-dialog.tsx
CHANGED
|
@@ -70,6 +70,17 @@ const AlertDialogFooter = ({
|
|
|
70
70
|
)
|
|
71
71
|
AlertDialogFooter.displayName = "AlertDialogFooter"
|
|
72
72
|
|
|
73
|
+
const AlertDialogMedia = ({
|
|
74
|
+
className,
|
|
75
|
+
...props
|
|
76
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
77
|
+
<div
|
|
78
|
+
className={cn("flex items-center justify-center py-4", className)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
AlertDialogMedia.displayName = "AlertDialogMedia"
|
|
83
|
+
|
|
73
84
|
const AlertDialogTitle = React.forwardRef<
|
|
74
85
|
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
75
86
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
@@ -131,6 +142,7 @@ export {
|
|
|
131
142
|
AlertDialogContent,
|
|
132
143
|
AlertDialogHeader,
|
|
133
144
|
AlertDialogFooter,
|
|
145
|
+
AlertDialogMedia,
|
|
134
146
|
AlertDialogTitle,
|
|
135
147
|
AlertDialogDescription,
|
|
136
148
|
AlertDialogAction,
|
package/src/avatar.tsx
CHANGED
|
@@ -9,7 +9,7 @@ const Avatar = React.forwardRef<
|
|
|
9
9
|
<AvatarPrimitive.Root
|
|
10
10
|
ref={ref}
|
|
11
11
|
className={cn(
|
|
12
|
-
"relative flex size-10
|
|
12
|
+
"relative flex size-10 shrink-0 overflow-hidden rounded-full",
|
|
13
13
|
className
|
|
14
14
|
)}
|
|
15
15
|
{...props}
|
|
@@ -44,4 +44,46 @@ const AvatarFallback = React.forwardRef<
|
|
|
44
44
|
))
|
|
45
45
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
const AvatarBadge = React.forwardRef<
|
|
48
|
+
HTMLDivElement,
|
|
49
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
50
|
+
>(({ className, ...props }, ref) => (
|
|
51
|
+
<div
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn(
|
|
54
|
+
"absolute bottom-0 right-0 flex size-3 items-center justify-center rounded-full border-2 border-background bg-primary",
|
|
55
|
+
className
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
))
|
|
60
|
+
AvatarBadge.displayName = "AvatarBadge"
|
|
61
|
+
|
|
62
|
+
const AvatarGroup = React.forwardRef<
|
|
63
|
+
HTMLDivElement,
|
|
64
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
65
|
+
>(({ className, ...props }, ref) => (
|
|
66
|
+
<div
|
|
67
|
+
ref={ref}
|
|
68
|
+
className={cn("flex -space-x-4", className)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
))
|
|
72
|
+
AvatarGroup.displayName = "AvatarGroup"
|
|
73
|
+
|
|
74
|
+
const AvatarGroupCount = React.forwardRef<
|
|
75
|
+
HTMLDivElement,
|
|
76
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
77
|
+
>(({ className, ...props }, ref) => (
|
|
78
|
+
<div
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn(
|
|
81
|
+
"relative flex size-10 shrink-0 items-center justify-center rounded-full border-2 border-background bg-muted text-xs font-medium",
|
|
82
|
+
className
|
|
83
|
+
)}
|
|
84
|
+
{...props}
|
|
85
|
+
/>
|
|
86
|
+
))
|
|
87
|
+
AvatarGroupCount.displayName = "AvatarGroupCount"
|
|
88
|
+
|
|
89
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount }
|
package/src/breadcrumb.tsx
CHANGED
|
@@ -49,7 +49,7 @@ const BreadcrumbLink = React.forwardRef<
|
|
|
49
49
|
return (
|
|
50
50
|
<Comp
|
|
51
51
|
ref={ref}
|
|
52
|
-
className={cn("transition-colors hover:text-foreground
|
|
52
|
+
className={cn("transition-colors hover:text-foreground", className)}
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
55
|
)
|
|
@@ -101,7 +101,7 @@ const BreadcrumbEllipsis = ({
|
|
|
101
101
|
<span className="sr-only">More</span>
|
|
102
102
|
</span>
|
|
103
103
|
)
|
|
104
|
-
BreadcrumbEllipsis.displayName = "
|
|
104
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis"
|
|
105
105
|
|
|
106
106
|
export {
|
|
107
107
|
Breadcrumb,
|
package/src/button.tsx
CHANGED
|
@@ -4,22 +4,26 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
4
4
|
import { cn } from "./lib/utils"
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-
|
|
7
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
13
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
14
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
12
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
13
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
15
15
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
16
|
link: "text-primary underline-offset-4 hover:underline",
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
|
-
default: "h-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
default: "h-9 px-4 py-2",
|
|
20
|
+
xs: "h-7 rounded px-2 text-xs",
|
|
21
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
22
|
+
lg: "h-10 rounded-md px-8",
|
|
23
|
+
icon: "size-9",
|
|
24
|
+
"icon-xs": "size-7",
|
|
25
|
+
"icon-sm": "size-8",
|
|
26
|
+
"icon-lg": "size-10",
|
|
23
27
|
},
|
|
24
28
|
},
|
|
25
29
|
defaultVariants: {
|
package/src/card.tsx
CHANGED
|
@@ -28,10 +28,10 @@ const CardHeader = React.forwardRef<
|
|
|
28
28
|
CardHeader.displayName = "CardHeader"
|
|
29
29
|
|
|
30
30
|
const CardTitle = React.forwardRef<
|
|
31
|
-
|
|
32
|
-
React.HTMLAttributes<
|
|
31
|
+
HTMLDivElement,
|
|
32
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
33
33
|
>(({ className, ...props }, ref) => (
|
|
34
|
-
<
|
|
34
|
+
<div
|
|
35
35
|
ref={ref}
|
|
36
36
|
className={cn("text-2xl font-semibold leading-none tracking-tight", className)}
|
|
37
37
|
{...props}
|
|
@@ -71,4 +71,16 @@ const CardFooter = React.forwardRef<
|
|
|
71
71
|
))
|
|
72
72
|
CardFooter.displayName = "CardFooter"
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
const CardAction = React.forwardRef<
|
|
75
|
+
HTMLDivElement,
|
|
76
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
77
|
+
>(({ className, ...props }, ref) => (
|
|
78
|
+
<div
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn("flex items-center gap-2", className)}
|
|
81
|
+
{...props}
|
|
82
|
+
/>
|
|
83
|
+
))
|
|
84
|
+
CardAction.displayName = "CardAction"
|
|
85
|
+
|
|
86
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, CardAction }
|
package/src/checkbox.tsx
CHANGED
|
@@ -10,7 +10,7 @@ const Checkbox = React.forwardRef<
|
|
|
10
10
|
<CheckboxPrimitive.Root
|
|
11
11
|
ref={ref}
|
|
12
12
|
className={cn(
|
|
13
|
-
"peer size-4 shrink-0 rounded-sm border
|
|
13
|
+
"peer size-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",
|
|
14
14
|
className
|
|
15
15
|
)}
|
|
16
16
|
{...props}
|
|
@@ -18,7 +18,7 @@ const Checkbox = React.forwardRef<
|
|
|
18
18
|
<CheckboxPrimitive.Indicator
|
|
19
19
|
className={cn("flex items-center justify-center text-current")}
|
|
20
20
|
>
|
|
21
|
-
<Check className="size-
|
|
21
|
+
<Check className="size-3.5" />
|
|
22
22
|
</CheckboxPrimitive.Indicator>
|
|
23
23
|
</CheckboxPrimitive.Root>
|
|
24
24
|
))
|
package/src/drawer.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const DrawerOverlay = React.forwardRef<
|
|
|
25
25
|
>(({ className, ...props }, ref) => (
|
|
26
26
|
<DrawerPrimitive.Overlay
|
|
27
27
|
ref={ref}
|
|
28
|
-
className={cn("fixed inset-0 z-50 bg-black/80", className)}
|
|
28
|
+
className={cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)}
|
|
29
29
|
{...props}
|
|
30
30
|
/>
|
|
31
31
|
))
|
package/src/dropdown-menu.tsx
CHANGED
|
@@ -75,12 +75,14 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
75
75
|
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
76
76
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
77
77
|
inset?: boolean
|
|
78
|
+
variant?: "default" | "destructive"
|
|
78
79
|
}
|
|
79
|
-
>(({ className, inset, ...props }, ref) => (
|
|
80
|
+
>(({ className, inset, variant = "default", ...props }, ref) => (
|
|
80
81
|
<DropdownMenuPrimitive.Item
|
|
81
82
|
ref={ref}
|
|
82
83
|
className={cn(
|
|
83
84
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
85
|
+
variant === "destructive" && "text-destructive focus:text-destructive",
|
|
84
86
|
inset && "pl-8",
|
|
85
87
|
className
|
|
86
88
|
)}
|
package/src/field.tsx
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "./lib/utils"
|
|
3
|
+
|
|
4
|
+
const Field = React.forwardRef<
|
|
5
|
+
HTMLDivElement,
|
|
6
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
7
|
+
>(({ className, ...props }, ref) => (
|
|
8
|
+
<div
|
|
9
|
+
ref={ref}
|
|
10
|
+
className={cn("space-y-2", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
))
|
|
14
|
+
Field.displayName = "Field"
|
|
15
|
+
|
|
16
|
+
const FieldLabel = React.forwardRef<
|
|
17
|
+
HTMLLabelElement,
|
|
18
|
+
React.LabelHTMLAttributes<HTMLLabelElement>
|
|
19
|
+
>(({ className, ...props }, ref) => (
|
|
20
|
+
<label
|
|
21
|
+
ref={ref}
|
|
22
|
+
className={cn(
|
|
23
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
))
|
|
29
|
+
FieldLabel.displayName = "FieldLabel"
|
|
30
|
+
|
|
31
|
+
const FieldDescription = React.forwardRef<
|
|
32
|
+
HTMLParagraphElement,
|
|
33
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
34
|
+
>(({ className, ...props }, ref) => (
|
|
35
|
+
<p
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
))
|
|
41
|
+
FieldDescription.displayName = "FieldDescription"
|
|
42
|
+
|
|
43
|
+
const FieldContent = React.forwardRef<
|
|
44
|
+
HTMLDivElement,
|
|
45
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
46
|
+
>(({ className, ...props }, ref) => (
|
|
47
|
+
<div
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={cn("space-y-1", className)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
))
|
|
53
|
+
FieldContent.displayName = "FieldContent"
|
|
54
|
+
|
|
55
|
+
const FieldGroup = React.forwardRef<
|
|
56
|
+
HTMLDivElement,
|
|
57
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
58
|
+
>(({ className, ...props }, ref) => (
|
|
59
|
+
<div
|
|
60
|
+
ref={ref}
|
|
61
|
+
className={cn("space-y-4", className)}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
))
|
|
65
|
+
FieldGroup.displayName = "FieldGroup"
|
|
66
|
+
|
|
67
|
+
export { Field, FieldLabel, FieldDescription, FieldContent, FieldGroup }
|
package/src/input.tsx
CHANGED
|
@@ -15,7 +15,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
15
15
|
<input
|
|
16
16
|
type={type}
|
|
17
17
|
className={cn(
|
|
18
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
18
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
19
19
|
icon && "pl-10",
|
|
20
20
|
trailing && "pr-10",
|
|
21
21
|
className
|
|
@@ -34,7 +34,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
34
34
|
<input
|
|
35
35
|
type={type}
|
|
36
36
|
className={cn(
|
|
37
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
37
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
38
38
|
className
|
|
39
39
|
)}
|
|
40
40
|
ref={ref}
|
package/src/native-select.tsx
CHANGED
|
@@ -11,7 +11,7 @@ const NativeSelect = React.forwardRef<HTMLSelectElement, NativeSelectProps>(
|
|
|
11
11
|
<div className="relative">
|
|
12
12
|
<select
|
|
13
13
|
className={cn(
|
|
14
|
-
"flex h-10 w-full appearance-none items-center justify-between rounded-md border border-input bg-background px-3 py-2 pr-8 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-
|
|
14
|
+
"flex h-10 w-full appearance-none items-center justify-between rounded-md border border-input bg-background px-3 py-2 pr-8 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
15
|
className
|
|
16
16
|
)}
|
|
17
17
|
ref={ref}
|