@axis-ds/ui-react 1.3.0 → 1.5.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 +74 -0
- package/dist/accordion/index.js +9 -27
- package/dist/accordion/index.mjs +58 -7
- package/dist/alert/index.js +9 -27
- package/dist/alert/index.mjs +54 -7
- package/dist/avatar/avatar.d.mts +24 -0
- package/dist/avatar/avatar.d.ts +24 -0
- package/dist/avatar/avatar.js +70 -0
- package/dist/{chunk-OQGMQL2A.mjs → avatar/avatar.mjs} +5 -26
- package/dist/avatar/index.d.mts +5 -26
- package/dist/avatar/index.d.ts +5 -26
- package/dist/avatar/index.js +4 -78
- package/dist/avatar/index.mjs +2 -5
- package/dist/avatar/variants.d.mts +14 -0
- package/dist/avatar/variants.d.ts +14 -0
- package/dist/avatar/variants.js +44 -0
- package/dist/avatar/variants.mjs +20 -0
- package/dist/badge/index.js +5 -23
- package/dist/badge/index.mjs +35 -5
- package/dist/breadcrumb/index.js +15 -33
- package/dist/breadcrumb/index.mjs +118 -10
- package/dist/button/index.js +5 -23
- package/dist/button/index.mjs +44 -5
- package/dist/card/index.js +13 -31
- package/dist/card/index.mjs +58 -9
- package/dist/checkbox/index.js +5 -23
- package/dist/checkbox/index.mjs +41 -4
- package/dist/collapsible/index.js +3 -5
- package/dist/collapsible/index.mjs +4 -5
- package/dist/command/index.d.mts +7 -7
- package/dist/command/index.d.ts +7 -7
- package/dist/command/index.js +16 -33
- package/dist/command/index.mjs +110 -10
- package/dist/dialog/index.js +18 -36
- package/dist/dialog/index.mjs +88 -13
- package/dist/dropdown-menu/index.js +26 -44
- package/dist/dropdown-menu/index.mjs +188 -18
- package/dist/index.d.mts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.js +153 -1907
- package/dist/index.mjs +105 -150
- package/dist/input/index.js +4 -22
- package/dist/input/index.mjs +28 -4
- package/dist/label/index.js +5 -23
- package/dist/label/index.mjs +17 -4
- package/dist/popover/index.js +6 -24
- package/dist/popover/index.mjs +21 -6
- package/dist/progress/index.js +7 -25
- package/dist/progress/index.mjs +71 -6
- package/dist/radio-group/index.js +6 -24
- package/dist/radio-group/index.mjs +40 -5
- package/dist/scroll-area/index.js +6 -24
- package/dist/scroll-area/index.mjs +34 -5
- package/dist/select/index.js +16 -34
- package/dist/select/index.mjs +129 -11
- package/dist/separator/index.js +4 -22
- package/dist/separator/index.mjs +21 -4
- package/dist/sheet/index.js +19 -37
- package/dist/sheet/index.mjs +122 -13
- package/dist/skeleton/index.js +4 -22
- package/dist/skeleton/index.mjs +19 -4
- package/dist/slider/index.js +4 -22
- package/dist/slider/index.mjs +34 -4
- package/dist/switch/index.js +5 -23
- package/dist/switch/index.mjs +29 -4
- package/dist/table/index.js +18 -36
- package/dist/table/index.mjs +96 -11
- package/dist/tabs/index.js +9 -27
- package/dist/tabs/index.mjs +47 -7
- package/dist/textarea/index.js +4 -22
- package/dist/textarea/index.mjs +20 -4
- package/dist/toast/index.js +16 -34
- package/dist/toast/index.mjs +94 -10
- package/dist/toggle/index.js +5 -23
- package/dist/toggle/index.mjs +34 -5
- package/dist/tooltip/index.js +7 -25
- package/dist/tooltip/index.mjs +26 -7
- package/dist/utils.d.mts +9 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +40 -0
- package/dist/{chunk-ZIF4PLK3.mjs → utils.mjs} +2 -4
- package/package.json +8 -6
- package/tailwind.css +10 -0
- package/dist/chunk-22MWNPDF.mjs +0 -44
- package/dist/chunk-2OEPKE4D.mjs +0 -69
- package/dist/chunk-2XNUJNTG.mjs +0 -43
- package/dist/chunk-3N6NG7VT.mjs +0 -11
- package/dist/chunk-4I2F2NLP.mjs +0 -111
- package/dist/chunk-4PT43LON.mjs +0 -31
- package/dist/chunk-5NWFAQBM.mjs +0 -36
- package/dist/chunk-5Z2R3IHJ.mjs +0 -28
- package/dist/chunk-AY4B3RRN.mjs +0 -144
- package/dist/chunk-C5O47K7L.mjs +0 -71
- package/dist/chunk-CNU6645Y.mjs +0 -42
- package/dist/chunk-CY72AGI2.mjs +0 -105
- package/dist/chunk-DRFCNDVQ.mjs +0 -27
- package/dist/chunk-F2WSIT7F.mjs +0 -49
- package/dist/chunk-FZFREHAE.mjs +0 -139
- package/dist/chunk-HKYKDQ6C.mjs +0 -81
- package/dist/chunk-IS7NER3O.mjs +0 -37
- package/dist/chunk-MOBW7BKD.mjs +0 -49
- package/dist/chunk-PJX5UF3Y.mjs +0 -25
- package/dist/chunk-QXQWVRXN.mjs +0 -53
- package/dist/chunk-RFB4IABR.mjs +0 -108
- package/dist/chunk-SO2QSRGV.mjs +0 -58
- package/dist/chunk-TA62Q7YX.mjs +0 -37
- package/dist/chunk-TB33GTWS.mjs +0 -43
- package/dist/chunk-YI5OZRUB.mjs +0 -132
- package/dist/chunk-YZDRNV46.mjs +0 -210
- package/dist/chunk-Z4P43F5J.mjs +0 -65
- package/dist/chunk-Z65ZMFDH.mjs +0 -123
- package/dist/chunk-ZW6GY5PO.mjs +0 -29
package/dist/command/index.mjs
CHANGED
|
@@ -1,13 +1,113 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
5
|
+
import { cn } from "../utils.mjs";
|
|
6
|
+
const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
CommandPrimitive,
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
className: cn(
|
|
11
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-[var(--axis-surface-default)] text-[var(--axis-text-primary)]",
|
|
12
|
+
className
|
|
13
|
+
),
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
Command.displayName = "Command";
|
|
18
|
+
const CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-[var(--axis-border-default)] px-3", children: [
|
|
19
|
+
/* @__PURE__ */ jsxs(
|
|
20
|
+
"svg",
|
|
21
|
+
{
|
|
22
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23
|
+
width: "16",
|
|
24
|
+
height: "16",
|
|
25
|
+
viewBox: "0 0 24 24",
|
|
26
|
+
fill: "none",
|
|
27
|
+
stroke: "currentColor",
|
|
28
|
+
strokeWidth: "2",
|
|
29
|
+
strokeLinecap: "round",
|
|
30
|
+
strokeLinejoin: "round",
|
|
31
|
+
className: "mr-2 h-4 w-4 shrink-0 opacity-50",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
34
|
+
/* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
CommandPrimitive.Input,
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
className: cn(
|
|
43
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none",
|
|
44
|
+
"placeholder:text-[var(--axis-text-tertiary)]",
|
|
45
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
] }));
|
|
52
|
+
CommandInput.displayName = "CommandInput";
|
|
53
|
+
const CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
54
|
+
CommandPrimitive.List,
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
className: cn(
|
|
58
|
+
"max-h-[300px] overflow-y-auto overflow-x-hidden",
|
|
59
|
+
className
|
|
60
|
+
),
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
));
|
|
64
|
+
CommandList.displayName = "CommandList";
|
|
65
|
+
const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
66
|
+
CommandPrimitive.Empty,
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
className: "py-6 text-center text-sm text-[var(--axis-text-secondary)]",
|
|
70
|
+
...props
|
|
71
|
+
}
|
|
72
|
+
));
|
|
73
|
+
CommandEmpty.displayName = "CommandEmpty";
|
|
74
|
+
const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
75
|
+
CommandPrimitive.Group,
|
|
76
|
+
{
|
|
77
|
+
ref,
|
|
78
|
+
className: cn(
|
|
79
|
+
"overflow-hidden p-1 text-[var(--axis-text-primary)]",
|
|
80
|
+
"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-[var(--axis-text-secondary)]",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
));
|
|
86
|
+
CommandGroup.displayName = "CommandGroup";
|
|
87
|
+
const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
88
|
+
CommandPrimitive.Separator,
|
|
89
|
+
{
|
|
90
|
+
ref,
|
|
91
|
+
className: cn("-mx-1 h-px bg-[var(--axis-border-default)]", className),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
));
|
|
95
|
+
CommandSeparator.displayName = "CommandSeparator";
|
|
96
|
+
const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
97
|
+
CommandPrimitive.Item,
|
|
98
|
+
{
|
|
99
|
+
ref,
|
|
100
|
+
className: cn(
|
|
101
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
|
|
102
|
+
"data-[selected=true]:bg-[var(--axis-surface-secondary)] data-[selected=true]:text-[var(--axis-text-primary)]",
|
|
103
|
+
"data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
|
|
104
|
+
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
105
|
+
className
|
|
106
|
+
),
|
|
107
|
+
...props
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
CommandItem.displayName = "CommandItem";
|
|
11
111
|
export {
|
|
12
112
|
Command,
|
|
13
113
|
CommandEmpty,
|
package/dist/dialog/index.js
CHANGED
|
@@ -26,8 +26,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/dialog/index.tsx
|
|
31
29
|
var dialog_exports = {};
|
|
32
30
|
__export(dialog_exports, {
|
|
33
31
|
Dialog: () => Dialog,
|
|
@@ -42,35 +40,19 @@ __export(dialog_exports, {
|
|
|
42
40
|
DialogTrigger: () => DialogTrigger
|
|
43
41
|
});
|
|
44
42
|
module.exports = __toCommonJS(dialog_exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
44
|
var React = __toESM(require("react"));
|
|
46
45
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
extend: {
|
|
54
|
-
classGroups: {
|
|
55
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
function cn(...inputs) {
|
|
60
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// src/dialog/index.tsx
|
|
64
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
65
|
-
var Dialog = DialogPrimitive.Root;
|
|
66
|
-
var DialogTrigger = DialogPrimitive.Trigger;
|
|
67
|
-
var DialogPortal = DialogPrimitive.Portal;
|
|
68
|
-
var DialogClose = DialogPrimitive.Close;
|
|
69
|
-
var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
var import_utils = require("../utils.js");
|
|
47
|
+
const Dialog = DialogPrimitive.Root;
|
|
48
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
49
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
50
|
+
const DialogClose = DialogPrimitive.Close;
|
|
51
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
52
|
DialogPrimitive.Overlay,
|
|
71
53
|
{
|
|
72
54
|
ref,
|
|
73
|
-
className: cn(
|
|
55
|
+
className: (0, import_utils.cn)(
|
|
74
56
|
"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",
|
|
75
57
|
className
|
|
76
58
|
),
|
|
@@ -78,13 +60,13 @@ var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
78
60
|
}
|
|
79
61
|
));
|
|
80
62
|
DialogOverlay.displayName = "DialogOverlay";
|
|
81
|
-
|
|
63
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { children: [
|
|
82
64
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
|
|
83
65
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
66
|
DialogPrimitive.Content,
|
|
85
67
|
{
|
|
86
68
|
ref,
|
|
87
|
-
className: cn(
|
|
69
|
+
className: (0, import_utils.cn)(
|
|
88
70
|
"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-[shadow:var(--axis-shadow-lg)] duration-200",
|
|
89
71
|
"bg-[var(--axis-dialog-content-bg)] border-[var(--axis-dialog-content-border)]",
|
|
90
72
|
"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%]",
|
|
@@ -97,13 +79,13 @@ var DialogContent = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
97
79
|
)
|
|
98
80
|
] }));
|
|
99
81
|
DialogContent.displayName = "DialogContent";
|
|
100
|
-
|
|
82
|
+
const DialogHeader = ({
|
|
101
83
|
className,
|
|
102
84
|
...props
|
|
103
85
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
104
86
|
"div",
|
|
105
87
|
{
|
|
106
|
-
className: cn(
|
|
88
|
+
className: (0, import_utils.cn)(
|
|
107
89
|
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
108
90
|
className
|
|
109
91
|
),
|
|
@@ -111,13 +93,13 @@ var DialogHeader = ({
|
|
|
111
93
|
}
|
|
112
94
|
);
|
|
113
95
|
DialogHeader.displayName = "DialogHeader";
|
|
114
|
-
|
|
96
|
+
const DialogFooter = ({
|
|
115
97
|
className,
|
|
116
98
|
...props
|
|
117
99
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
100
|
"div",
|
|
119
101
|
{
|
|
120
|
-
className: cn(
|
|
102
|
+
className: (0, import_utils.cn)(
|
|
121
103
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
122
104
|
className
|
|
123
105
|
),
|
|
@@ -125,11 +107,11 @@ var DialogFooter = ({
|
|
|
125
107
|
}
|
|
126
108
|
);
|
|
127
109
|
DialogFooter.displayName = "DialogFooter";
|
|
128
|
-
|
|
110
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
111
|
DialogPrimitive.Title,
|
|
130
112
|
{
|
|
131
113
|
ref,
|
|
132
|
-
className: cn(
|
|
114
|
+
className: (0, import_utils.cn)(
|
|
133
115
|
"text-lg font-semibold leading-none tracking-tight text-[var(--axis-text-primary)]",
|
|
134
116
|
className
|
|
135
117
|
),
|
|
@@ -137,11 +119,11 @@ var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
137
119
|
}
|
|
138
120
|
));
|
|
139
121
|
DialogTitle.displayName = "DialogTitle";
|
|
140
|
-
|
|
122
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
123
|
DialogPrimitive.Description,
|
|
142
124
|
{
|
|
143
125
|
ref,
|
|
144
|
-
className: cn("text-sm text-[var(--axis-text-secondary)]", className),
|
|
126
|
+
className: (0, import_utils.cn)("text-sm text-[var(--axis-text-secondary)]", className),
|
|
145
127
|
...props
|
|
146
128
|
}
|
|
147
129
|
));
|
package/dist/dialog/index.mjs
CHANGED
|
@@ -1,16 +1,91 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { cn } from "../utils.mjs";
|
|
5
|
+
const Dialog = DialogPrimitive.Root;
|
|
6
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
7
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
8
|
+
const DialogClose = DialogPrimitive.Close;
|
|
9
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
+
DialogPrimitive.Overlay,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
className: cn(
|
|
14
|
+
"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",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
));
|
|
20
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
21
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
DialogPrimitive.Content,
|
|
25
|
+
{
|
|
26
|
+
ref,
|
|
27
|
+
className: cn(
|
|
28
|
+
"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-[shadow:var(--axis-shadow-lg)] duration-200",
|
|
29
|
+
"bg-[var(--axis-dialog-content-bg)] border-[var(--axis-dialog-content-border)]",
|
|
30
|
+
"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%]",
|
|
31
|
+
"sm:rounded-lg",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
...props,
|
|
35
|
+
children
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] }));
|
|
39
|
+
DialogContent.displayName = "DialogContent";
|
|
40
|
+
const DialogHeader = ({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}) => /* @__PURE__ */ jsx(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: cn(
|
|
47
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
48
|
+
className
|
|
49
|
+
),
|
|
50
|
+
...props
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
DialogHeader.displayName = "DialogHeader";
|
|
54
|
+
const DialogFooter = ({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}) => /* @__PURE__ */ jsx(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: cn(
|
|
61
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
DialogFooter.displayName = "DialogFooter";
|
|
68
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
69
|
+
DialogPrimitive.Title,
|
|
70
|
+
{
|
|
71
|
+
ref,
|
|
72
|
+
className: cn(
|
|
73
|
+
"text-lg font-semibold leading-none tracking-tight text-[var(--axis-text-primary)]",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
));
|
|
79
|
+
DialogTitle.displayName = "DialogTitle";
|
|
80
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
81
|
+
DialogPrimitive.Description,
|
|
82
|
+
{
|
|
83
|
+
ref,
|
|
84
|
+
className: cn("text-sm text-[var(--axis-text-secondary)]", className),
|
|
85
|
+
...props
|
|
86
|
+
}
|
|
87
|
+
));
|
|
88
|
+
DialogDescription.displayName = "DialogDescription";
|
|
14
89
|
export {
|
|
15
90
|
Dialog,
|
|
16
91
|
DialogClose,
|
|
@@ -26,8 +26,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/dropdown-menu/index.tsx
|
|
31
29
|
var dropdown_menu_exports = {};
|
|
32
30
|
__export(dropdown_menu_exports, {
|
|
33
31
|
DropdownMenu: () => DropdownMenu,
|
|
@@ -47,37 +45,21 @@ __export(dropdown_menu_exports, {
|
|
|
47
45
|
DropdownMenuTrigger: () => DropdownMenuTrigger
|
|
48
46
|
});
|
|
49
47
|
module.exports = __toCommonJS(dropdown_menu_exports);
|
|
48
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
50
49
|
var React = __toESM(require("react"));
|
|
51
50
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
function cn(...inputs) {
|
|
65
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// src/dropdown-menu/index.tsx
|
|
69
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
70
|
-
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
71
|
-
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
72
|
-
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
73
|
-
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
74
|
-
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
75
|
-
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
76
|
-
var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
51
|
+
var import_utils = require("../utils.js");
|
|
52
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
53
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
54
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
55
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
56
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
57
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
58
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
77
59
|
DropdownMenuPrimitive.SubTrigger,
|
|
78
60
|
{
|
|
79
61
|
ref,
|
|
80
|
-
className: cn(
|
|
62
|
+
className: (0, import_utils.cn)(
|
|
81
63
|
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none",
|
|
82
64
|
"focus:bg-[var(--axis-surface-secondary)]",
|
|
83
65
|
"data-[state=open]:bg-[var(--axis-surface-secondary)]",
|
|
@@ -108,11 +90,11 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
|
|
|
108
90
|
}
|
|
109
91
|
));
|
|
110
92
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
111
|
-
|
|
93
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
94
|
DropdownMenuPrimitive.SubContent,
|
|
113
95
|
{
|
|
114
96
|
ref,
|
|
115
|
-
className: cn(
|
|
97
|
+
className: (0, import_utils.cn)(
|
|
116
98
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] p-1 text-[var(--axis-text-primary)] shadow-lg",
|
|
117
99
|
"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",
|
|
118
100
|
className
|
|
@@ -121,12 +103,12 @@ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =>
|
|
|
121
103
|
}
|
|
122
104
|
));
|
|
123
105
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
124
|
-
|
|
106
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
107
|
DropdownMenuPrimitive.Content,
|
|
126
108
|
{
|
|
127
109
|
ref,
|
|
128
110
|
sideOffset,
|
|
129
|
-
className: cn(
|
|
111
|
+
className: (0, import_utils.cn)(
|
|
130
112
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] p-1 text-[var(--axis-text-primary)] shadow-md",
|
|
131
113
|
"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",
|
|
132
114
|
className
|
|
@@ -135,11 +117,11 @@ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...prop
|
|
|
135
117
|
}
|
|
136
118
|
) }));
|
|
137
119
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
138
|
-
|
|
120
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
121
|
DropdownMenuPrimitive.Item,
|
|
140
122
|
{
|
|
141
123
|
ref,
|
|
142
|
-
className: cn(
|
|
124
|
+
className: (0, import_utils.cn)(
|
|
143
125
|
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",
|
|
144
126
|
"focus:bg-[var(--axis-surface-secondary)] focus:text-[var(--axis-text-primary)]",
|
|
145
127
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -151,11 +133,11 @@ var DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) =>
|
|
|
151
133
|
}
|
|
152
134
|
));
|
|
153
135
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
154
|
-
|
|
136
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
155
137
|
DropdownMenuPrimitive.CheckboxItem,
|
|
156
138
|
{
|
|
157
139
|
ref,
|
|
158
|
-
className: cn(
|
|
140
|
+
className: (0, import_utils.cn)(
|
|
159
141
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors",
|
|
160
142
|
"focus:bg-[var(--axis-surface-secondary)] focus:text-[var(--axis-text-primary)]",
|
|
161
143
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -184,11 +166,11 @@ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked,
|
|
|
184
166
|
}
|
|
185
167
|
));
|
|
186
168
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
187
|
-
|
|
169
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
188
170
|
DropdownMenuPrimitive.RadioItem,
|
|
189
171
|
{
|
|
190
172
|
ref,
|
|
191
|
-
className: cn(
|
|
173
|
+
className: (0, import_utils.cn)(
|
|
192
174
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors",
|
|
193
175
|
"focus:bg-[var(--axis-surface-secondary)] focus:text-[var(--axis-text-primary)]",
|
|
194
176
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -212,11 +194,11 @@ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props },
|
|
|
212
194
|
}
|
|
213
195
|
));
|
|
214
196
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
215
|
-
|
|
197
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
216
198
|
DropdownMenuPrimitive.Label,
|
|
217
199
|
{
|
|
218
200
|
ref,
|
|
219
|
-
className: cn(
|
|
201
|
+
className: (0, import_utils.cn)(
|
|
220
202
|
"px-2 py-1.5 text-sm font-semibold",
|
|
221
203
|
inset && "pl-8",
|
|
222
204
|
className
|
|
@@ -225,11 +207,11 @@ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
225
207
|
}
|
|
226
208
|
));
|
|
227
209
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
228
|
-
|
|
210
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
229
211
|
DropdownMenuPrimitive.Separator,
|
|
230
212
|
{
|
|
231
213
|
ref,
|
|
232
|
-
className: cn(
|
|
214
|
+
className: (0, import_utils.cn)(
|
|
233
215
|
"-mx-1 my-1 h-px bg-[var(--axis-border-default)]",
|
|
234
216
|
className
|
|
235
217
|
),
|
|
@@ -237,13 +219,13 @@ var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /
|
|
|
237
219
|
}
|
|
238
220
|
));
|
|
239
221
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
240
|
-
|
|
222
|
+
const DropdownMenuShortcut = ({
|
|
241
223
|
className,
|
|
242
224
|
...props
|
|
243
225
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
244
226
|
"span",
|
|
245
227
|
{
|
|
246
|
-
className: cn(
|
|
228
|
+
className: (0, import_utils.cn)(
|
|
247
229
|
"ml-auto text-xs tracking-widest text-[var(--axis-text-tertiary)]",
|
|
248
230
|
className
|
|
249
231
|
),
|