@axis-ds/ui-react 1.1.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/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/accordion/index.d.mts +13 -0
- package/dist/accordion/index.d.ts +13 -0
- package/dist/accordion/index.js +111 -0
- package/dist/accordion/index.mjs +13 -0
- package/dist/alert/index.d.mts +21 -0
- package/dist/alert/index.d.ts +21 -0
- package/dist/alert/index.js +104 -0
- package/dist/alert/index.mjs +13 -0
- package/dist/avatar/index.d.mts +26 -0
- package/dist/avatar/index.d.ts +26 -0
- package/dist/avatar/index.js +97 -0
- package/dist/avatar/index.mjs +9 -0
- package/dist/badge/index.d.mts +17 -0
- package/dist/badge/index.d.ts +17 -0
- package/dist/badge/index.js +84 -0
- package/dist/badge/index.mjs +9 -0
- package/dist/breadcrumb/index.d.mts +34 -0
- package/dist/breadcrumb/index.d.ts +34 -0
- package/dist/breadcrumb/index.js +177 -0
- package/dist/breadcrumb/index.mjs +19 -0
- package/dist/button/index.d.mts +21 -0
- package/dist/button/index.d.ts +21 -0
- package/dist/button/index.js +93 -0
- package/dist/button/index.mjs +9 -0
- package/dist/card/index.d.mts +19 -0
- package/dist/card/index.d.ts +19 -0
- package/dist/card/index.js +115 -0
- package/dist/card/index.mjs +17 -0
- package/dist/checkbox/index.d.mts +10 -0
- package/dist/checkbox/index.d.ts +10 -0
- package/dist/checkbox/index.js +88 -0
- package/dist/checkbox/index.mjs +7 -0
- package/dist/chunk-3H7DF7QZ.mjs +49 -0
- package/dist/chunk-3I222KOY.mjs +123 -0
- package/dist/chunk-3N6NG7VT.mjs +11 -0
- package/dist/chunk-4AWNSTZH.mjs +57 -0
- package/dist/chunk-4JQWQF3H.mjs +25 -0
- package/dist/chunk-54Y3KUM5.mjs +28 -0
- package/dist/chunk-5PIG7LWJ.mjs +139 -0
- package/dist/chunk-6TRDXC4W.mjs +69 -0
- package/dist/chunk-7OPZAWBW.mjs +58 -0
- package/dist/chunk-A5FJHFJQ.mjs +210 -0
- package/dist/chunk-AEBHTW7E.mjs +29 -0
- package/dist/chunk-AJERK2UH.mjs +49 -0
- package/dist/chunk-APUPJHAQ.mjs +43 -0
- package/dist/chunk-AUXVXNU2.mjs +105 -0
- package/dist/chunk-B2GWR74O.mjs +144 -0
- package/dist/chunk-CTWUJDKA.mjs +49 -0
- package/dist/chunk-E2C7WDLA.mjs +108 -0
- package/dist/chunk-ECF2JRI5.mjs +43 -0
- package/dist/chunk-EJNQRWUO.mjs +29 -0
- package/dist/chunk-F6RLUX3E.mjs +37 -0
- package/dist/chunk-FMXB7UCT.mjs +27 -0
- package/dist/chunk-HQB5TO4N.mjs +28 -0
- package/dist/chunk-HYW3HTBA.mjs +31 -0
- package/dist/chunk-IOOOCHIG.mjs +49 -0
- package/dist/chunk-IXLVGZWU.mjs +105 -0
- package/dist/chunk-JJY2MCTX.mjs +25 -0
- package/dist/chunk-JM45JPSK.mjs +43 -0
- package/dist/chunk-JQV5IP5Z.mjs +28 -0
- package/dist/chunk-KAIB45YN.mjs +132 -0
- package/dist/chunk-MARIIZN7.mjs +53 -0
- package/dist/chunk-NEZK6NO5.mjs +58 -0
- package/dist/chunk-NFFXJB2O.mjs +11 -0
- package/dist/chunk-O5SM54HW.mjs +71 -0
- package/dist/chunk-OIQGWWAS.mjs +42 -0
- package/dist/chunk-PJO7WJ4G.mjs +10 -0
- package/dist/chunk-PUERRSNI.mjs +37 -0
- package/dist/chunk-Q3KALTWT.mjs +37 -0
- package/dist/chunk-Q4WL74ZY.mjs +43 -0
- package/dist/chunk-RBVNJKEQ.mjs +210 -0
- package/dist/chunk-SCH6SFLB.mjs +37 -0
- package/dist/chunk-SLQ756Q7.mjs +36 -0
- package/dist/chunk-SPUFU4HC.mjs +139 -0
- package/dist/chunk-SR3JZW6T.mjs +210 -0
- package/dist/chunk-TD5OLTUB.mjs +62 -0
- package/dist/chunk-WVWKKHBP.mjs +44 -0
- package/dist/chunk-XHILRI24.mjs +111 -0
- package/dist/chunk-XW4HTSUY.mjs +123 -0
- package/dist/chunk-YKZAU3UV.mjs +144 -0
- package/dist/chunk-YVJ7BL4T.mjs +81 -0
- package/dist/chunk-ZU6FMFB5.mjs +31 -0
- package/dist/collapsible/index.d.mts +11 -0
- package/dist/collapsible/index.d.ts +11 -0
- package/dist/collapsible/index.js +47 -0
- package/dist/collapsible/index.mjs +10 -0
- package/dist/command/index.d.mts +86 -0
- package/dist/command/index.d.ts +86 -0
- package/dist/command/index.js +168 -0
- package/dist/command/index.mjs +19 -0
- package/dist/dialog/index.d.mts +32 -0
- package/dist/dialog/index.d.ts +32 -0
- package/dist/dialog/index.js +153 -0
- package/dist/dialog/index.mjs +25 -0
- package/dist/dropdown-menu/index.d.mts +57 -0
- package/dist/dropdown-menu/index.d.ts +57 -0
- package/dist/dropdown-menu/index.js +263 -0
- package/dist/dropdown-menu/index.mjs +35 -0
- package/dist/index.d.mts +60 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +2029 -0
- package/dist/index.mjs +308 -0
- package/dist/input/index.d.mts +14 -0
- package/dist/input/index.d.ts +14 -0
- package/dist/input/index.js +75 -0
- package/dist/input/index.mjs +7 -0
- package/dist/label/index.d.mts +16 -0
- package/dist/label/index.d.ts +16 -0
- package/dist/label/index.js +64 -0
- package/dist/label/index.mjs +7 -0
- package/dist/popover/index.d.mts +11 -0
- package/dist/popover/index.d.ts +11 -0
- package/dist/popover/index.js +72 -0
- package/dist/popover/index.mjs +11 -0
- package/dist/progress/index.d.mts +27 -0
- package/dist/progress/index.d.ts +27 -0
- package/dist/progress/index.js +122 -0
- package/dist/progress/index.mjs +11 -0
- package/dist/radio-group/index.d.mts +9 -0
- package/dist/radio-group/index.d.ts +9 -0
- package/dist/radio-group/index.js +89 -0
- package/dist/radio-group/index.mjs +9 -0
- package/dist/scroll-area/index.d.mts +9 -0
- package/dist/scroll-area/index.d.ts +9 -0
- package/dist/scroll-area/index.js +83 -0
- package/dist/scroll-area/index.mjs +9 -0
- package/dist/select/index.d.mts +21 -0
- package/dist/select/index.d.ts +21 -0
- package/dist/select/index.js +190 -0
- package/dist/select/index.mjs +21 -0
- package/dist/separator/index.d.mts +13 -0
- package/dist/separator/index.d.ts +13 -0
- package/dist/separator/index.js +68 -0
- package/dist/separator/index.mjs +7 -0
- package/dist/sheet/index.d.mts +43 -0
- package/dist/sheet/index.d.ts +43 -0
- package/dist/sheet/index.js +187 -0
- package/dist/sheet/index.mjs +25 -0
- package/dist/skeleton/index.d.mts +9 -0
- package/dist/skeleton/index.d.ts +9 -0
- package/dist/skeleton/index.js +66 -0
- package/dist/skeleton/index.mjs +7 -0
- package/dist/slider/index.d.mts +7 -0
- package/dist/slider/index.d.ts +7 -0
- package/dist/slider/index.js +67 -0
- package/dist/slider/index.mjs +7 -0
- package/dist/switch/index.d.mts +7 -0
- package/dist/switch/index.d.ts +7 -0
- package/dist/switch/index.js +76 -0
- package/dist/switch/index.mjs +7 -0
- package/dist/table/index.d.mts +20 -0
- package/dist/table/index.d.ts +20 -0
- package/dist/table/index.js +157 -0
- package/dist/table/index.mjs +21 -0
- package/dist/tabs/index.d.mts +13 -0
- package/dist/tabs/index.d.ts +13 -0
- package/dist/tabs/index.js +100 -0
- package/dist/tabs/index.mjs +13 -0
- package/dist/textarea/index.d.mts +6 -0
- package/dist/textarea/index.d.ts +6 -0
- package/dist/textarea/index.js +67 -0
- package/dist/textarea/index.mjs +7 -0
- package/dist/toast/index.d.mts +23 -0
- package/dist/toast/index.d.ts +23 -0
- package/dist/toast/index.js +153 -0
- package/dist/toast/index.mjs +19 -0
- package/dist/toggle/index.d.mts +16 -0
- package/dist/toggle/index.d.ts +16 -0
- package/dist/toggle/index.js +83 -0
- package/dist/toggle/index.mjs +9 -0
- package/dist/tooltip/index.d.mts +13 -0
- package/dist/tooltip/index.d.ts +13 -0
- package/dist/tooltip/index.js +79 -0
- package/dist/tooltip/index.mjs +13 -0
- package/package.json +206 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/toast/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var ToastProvider = ToastPrimitives.Provider;
|
|
11
|
+
var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12
|
+
ToastPrimitives.Viewport,
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
className: cn(
|
|
16
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
23
|
+
var toastVariants = cva(
|
|
24
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
25
|
+
{
|
|
26
|
+
variants: {
|
|
27
|
+
variant: {
|
|
28
|
+
default: "border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] text-[var(--axis-text-primary)]",
|
|
29
|
+
success: "border-[var(--axis-border-success)] bg-[var(--axis-surface-success)] text-[var(--axis-text-success)]",
|
|
30
|
+
error: "border-[var(--axis-border-error)] bg-[var(--axis-surface-error)] text-[var(--axis-text-error)]",
|
|
31
|
+
warning: "border-transparent bg-[var(--axis-surface-warning)] text-[var(--axis-text-warning)]"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: "default"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
var Toast = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
40
|
+
ToastPrimitives.Root,
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
className: cn(toastVariants({ variant }), className),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
));
|
|
47
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
48
|
+
var ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
49
|
+
ToastPrimitives.Action,
|
|
50
|
+
{
|
|
51
|
+
ref,
|
|
52
|
+
className: cn(
|
|
53
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border px-3 text-sm font-medium transition-colors",
|
|
54
|
+
"border-[var(--axis-border-default)] bg-transparent",
|
|
55
|
+
"hover:bg-[var(--axis-surface-secondary)]",
|
|
56
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--axis-border-focus)]",
|
|
57
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
58
|
+
className
|
|
59
|
+
),
|
|
60
|
+
...props
|
|
61
|
+
}
|
|
62
|
+
));
|
|
63
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
64
|
+
var ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
65
|
+
ToastPrimitives.Close,
|
|
66
|
+
{
|
|
67
|
+
ref,
|
|
68
|
+
className: cn(
|
|
69
|
+
"absolute right-2 top-2 rounded-md p-1 text-[var(--axis-text-secondary)] opacity-0 transition-opacity",
|
|
70
|
+
"hover:text-[var(--axis-text-primary)]",
|
|
71
|
+
"focus:opacity-100 focus:outline-none focus:ring-2",
|
|
72
|
+
"group-hover:opacity-100",
|
|
73
|
+
className
|
|
74
|
+
),
|
|
75
|
+
"toast-close": "",
|
|
76
|
+
...props,
|
|
77
|
+
children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
78
|
+
}
|
|
79
|
+
));
|
|
80
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
81
|
+
var ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
82
|
+
ToastPrimitives.Title,
|
|
83
|
+
{
|
|
84
|
+
ref,
|
|
85
|
+
className: cn("text-sm font-semibold", className),
|
|
86
|
+
...props
|
|
87
|
+
}
|
|
88
|
+
));
|
|
89
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
90
|
+
var ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
91
|
+
ToastPrimitives.Description,
|
|
92
|
+
{
|
|
93
|
+
ref,
|
|
94
|
+
className: cn("text-sm opacity-90", className),
|
|
95
|
+
...props
|
|
96
|
+
}
|
|
97
|
+
));
|
|
98
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
ToastProvider,
|
|
102
|
+
ToastViewport,
|
|
103
|
+
Toast,
|
|
104
|
+
ToastAction,
|
|
105
|
+
ToastClose,
|
|
106
|
+
ToastTitle,
|
|
107
|
+
ToastDescription
|
|
108
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/scroll-area/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
10
|
+
ScrollAreaPrimitive.Root,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
className: cn("relative overflow-hidden", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
17
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
18
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
ScrollArea.displayName = "ScrollArea";
|
|
23
|
+
var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
24
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
orientation,
|
|
28
|
+
className: cn(
|
|
29
|
+
"flex touch-none select-none transition-colors",
|
|
30
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
31
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
...props,
|
|
35
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-[var(--axis-border-default)]" })
|
|
36
|
+
}
|
|
37
|
+
));
|
|
38
|
+
ScrollBar.displayName = "ScrollBar";
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
ScrollArea,
|
|
42
|
+
ScrollBar
|
|
43
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/separator/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Separator = React.forwardRef(
|
|
10
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
11
|
+
SeparatorPrimitive.Root,
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
decorative,
|
|
15
|
+
orientation,
|
|
16
|
+
className: cn(
|
|
17
|
+
"shrink-0 bg-[var(--axis-border-default)]",
|
|
18
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
Separator
|
|
29
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/switch/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
+
SwitchPrimitive.Root,
|
|
11
|
+
{
|
|
12
|
+
className: cn(
|
|
13
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
14
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--axis-surface-primary)]",
|
|
15
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
"data-[state=checked]:bg-[var(--axis-interactive-primary)]",
|
|
17
|
+
"data-[state=unchecked]:bg-[var(--axis-surface-tertiary)]",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props,
|
|
21
|
+
ref,
|
|
22
|
+
children: /* @__PURE__ */ jsx(
|
|
23
|
+
SwitchPrimitive.Thumb,
|
|
24
|
+
{
|
|
25
|
+
className: cn(
|
|
26
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform",
|
|
27
|
+
"data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
Switch
|
|
37
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/skeleton/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var Skeleton = React.forwardRef(
|
|
9
|
+
({ className, ...props }, ref) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
className: cn(
|
|
15
|
+
"animate-pulse rounded-md bg-[var(--axis-surface-tertiary)]",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
Skeleton.displayName = "Skeleton";
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
Skeleton
|
|
27
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/textarea/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var Textarea = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9
|
+
"textarea",
|
|
10
|
+
{
|
|
11
|
+
className: cn(
|
|
12
|
+
"flex min-h-[80px] w-full rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-primary)] px-3 py-2 text-sm",
|
|
13
|
+
"text-[var(--axis-text-primary)]",
|
|
14
|
+
"ring-offset-[var(--axis-surface-primary)]",
|
|
15
|
+
"placeholder:text-[var(--axis-text-tertiary)]",
|
|
16
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-ring)] focus-visible:ring-offset-2",
|
|
17
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
ref,
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
Textarea.displayName = "Textarea";
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
Textarea
|
|
28
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/popover/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Popover = PopoverPrimitive.Root;
|
|
10
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
11
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
12
|
+
PopoverPrimitive.Content,
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
align,
|
|
16
|
+
sideOffset,
|
|
17
|
+
className: cn(
|
|
18
|
+
"z-50 w-72 rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-primary)] p-4 text-[var(--axis-text-primary)] shadow-md outline-none",
|
|
19
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",
|
|
20
|
+
className
|
|
21
|
+
),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
) }));
|
|
25
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
Popover,
|
|
29
|
+
PopoverTrigger,
|
|
30
|
+
PopoverContent
|
|
31
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/checkbox/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
+
CheckboxPrimitive.Root,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
className: cn(
|
|
14
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-[var(--axis-border-default)]",
|
|
15
|
+
"ring-offset-[var(--axis-surface-primary)]",
|
|
16
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-ring)] focus-visible:ring-offset-2",
|
|
17
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
|
+
"data-[state=checked]:bg-[var(--axis-interactive-primary)] data-[state=checked]:border-[var(--axis-interactive-primary)] data-[state=checked]:text-white",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
...props,
|
|
22
|
+
children: /* @__PURE__ */ jsx(
|
|
23
|
+
CheckboxPrimitive.Indicator,
|
|
24
|
+
{
|
|
25
|
+
className: cn("flex items-center justify-center text-current"),
|
|
26
|
+
children: /* @__PURE__ */ jsx(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
+
width: "12",
|
|
31
|
+
height: "12",
|
|
32
|
+
viewBox: "0 0 24 24",
|
|
33
|
+
fill: "none",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
strokeWidth: "3",
|
|
36
|
+
strokeLinecap: "round",
|
|
37
|
+
strokeLinejoin: "round",
|
|
38
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
Checkbox
|
|
49
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/dialog/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var Dialog = DialogPrimitive.Root;
|
|
10
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
11
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
12
|
+
var DialogClose = DialogPrimitive.Close;
|
|
13
|
+
var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
DialogPrimitive.Overlay,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
className: cn(
|
|
18
|
+
"fixed inset-0 z-50 bg-[var(--axis-dialog-overlay-bg)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
25
|
+
var DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
26
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
DialogPrimitive.Content,
|
|
29
|
+
{
|
|
30
|
+
ref,
|
|
31
|
+
className: cn(
|
|
32
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200",
|
|
33
|
+
"bg-[var(--axis-dialog-content-bg)] border-[var(--axis-dialog-content-border)]",
|
|
34
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
35
|
+
"sm:rounded-lg",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
...props,
|
|
39
|
+
children
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] }));
|
|
43
|
+
DialogContent.displayName = "DialogContent";
|
|
44
|
+
var DialogHeader = ({
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}) => /* @__PURE__ */ jsx(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: cn(
|
|
51
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
52
|
+
className
|
|
53
|
+
),
|
|
54
|
+
...props
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
DialogHeader.displayName = "DialogHeader";
|
|
58
|
+
var DialogFooter = ({
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}) => /* @__PURE__ */ jsx(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: cn(
|
|
65
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
...props
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
DialogFooter.displayName = "DialogFooter";
|
|
72
|
+
var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
73
|
+
DialogPrimitive.Title,
|
|
74
|
+
{
|
|
75
|
+
ref,
|
|
76
|
+
className: cn(
|
|
77
|
+
"text-lg font-semibold leading-none tracking-tight text-[var(--axis-text-primary)]",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
...props
|
|
81
|
+
}
|
|
82
|
+
));
|
|
83
|
+
DialogTitle.displayName = "DialogTitle";
|
|
84
|
+
var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
85
|
+
DialogPrimitive.Description,
|
|
86
|
+
{
|
|
87
|
+
ref,
|
|
88
|
+
className: cn("text-sm text-[var(--axis-text-secondary)]", className),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
));
|
|
92
|
+
DialogDescription.displayName = "DialogDescription";
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
Dialog,
|
|
96
|
+
DialogTrigger,
|
|
97
|
+
DialogPortal,
|
|
98
|
+
DialogClose,
|
|
99
|
+
DialogOverlay,
|
|
100
|
+
DialogContent,
|
|
101
|
+
DialogHeader,
|
|
102
|
+
DialogFooter,
|
|
103
|
+
DialogTitle,
|
|
104
|
+
DialogDescription
|
|
105
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/label/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var labelVariants = cva(
|
|
11
|
+
"text-sm font-medium leading-none text-[var(--axis-text-primary)] peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
12
|
+
);
|
|
13
|
+
var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
LabelPrimitive.Root,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
className: cn(labelVariants(), className),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
Label
|
|
25
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/toggle/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var toggleVariants = cva(
|
|
11
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-[var(--axis-surface-primary)] transition-colors hover:bg-[var(--axis-surface-secondary)] hover:text-[var(--axis-text-secondary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-ring)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-[var(--axis-surface-secondary)] data-[state=on]:text-[var(--axis-text-primary)] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: "bg-transparent",
|
|
16
|
+
outline: "border border-[var(--axis-border-default)] bg-transparent hover:bg-[var(--axis-surface-secondary)] hover:text-[var(--axis-text-primary)]"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: "h-10 px-3 min-w-10",
|
|
20
|
+
sm: "h-9 px-2.5 min-w-9",
|
|
21
|
+
lg: "h-11 px-5 min-w-11"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
size: "default"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
var Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
31
|
+
TogglePrimitive.Root,
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
35
|
+
...props
|
|
36
|
+
}
|
|
37
|
+
));
|
|
38
|
+
Toggle.displayName = "Toggle";
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
toggleVariants,
|
|
42
|
+
Toggle
|
|
43
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-PJO7WJ4G.mjs";
|
|
4
|
+
|
|
5
|
+
// src/slider/index.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
10
|
+
SliderPrimitive.Root,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
className: cn(
|
|
14
|
+
"relative flex w-full touch-none select-none items-center",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-[var(--axis-surface-tertiary)]", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-[var(--axis-interactive-primary)]" }) }),
|
|
20
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-[var(--axis-interactive-primary)] bg-[var(--axis-surface-primary)] ring-offset-[var(--axis-surface-primary)] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-ring)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
Slider
|
|
28
|
+
};
|