@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/table/index.mjs
CHANGED
|
@@ -1,14 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../utils.mjs";
|
|
4
|
+
const Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
5
|
+
"table",
|
|
6
|
+
{
|
|
7
|
+
ref,
|
|
8
|
+
className: cn(
|
|
9
|
+
"w-full caption-bottom text-sm text-[var(--axis-text-primary)]",
|
|
10
|
+
className
|
|
11
|
+
),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
) }));
|
|
15
|
+
Table.displayName = "Table";
|
|
16
|
+
const TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17
|
+
"thead",
|
|
18
|
+
{
|
|
19
|
+
ref,
|
|
20
|
+
className: cn("[&_tr]:border-b", className),
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
TableHeader.displayName = "TableHeader";
|
|
25
|
+
const TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
26
|
+
"tbody",
|
|
27
|
+
{
|
|
28
|
+
ref,
|
|
29
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
TableBody.displayName = "TableBody";
|
|
34
|
+
const TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
35
|
+
"tfoot",
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
className: cn(
|
|
39
|
+
"border-t bg-[var(--axis-surface-secondary)] font-medium [&>tr]:last:border-b-0",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
...props
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
TableFooter.displayName = "TableFooter";
|
|
46
|
+
const TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
47
|
+
"tr",
|
|
48
|
+
{
|
|
49
|
+
ref,
|
|
50
|
+
className: cn(
|
|
51
|
+
"border-b border-[var(--axis-border-default)] transition-colors",
|
|
52
|
+
"hover:bg-[var(--axis-surface-secondary)]",
|
|
53
|
+
"data-[state=selected]:bg-[var(--axis-surface-tertiary)]",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
));
|
|
59
|
+
TableRow.displayName = "TableRow";
|
|
60
|
+
const TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
61
|
+
"th",
|
|
62
|
+
{
|
|
63
|
+
ref,
|
|
64
|
+
className: cn(
|
|
65
|
+
"h-12 px-4 text-left align-middle font-medium text-[var(--axis-text-secondary)]",
|
|
66
|
+
"[&:has([role=checkbox])]:pr-0",
|
|
67
|
+
className
|
|
68
|
+
),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
));
|
|
72
|
+
TableHead.displayName = "TableHead";
|
|
73
|
+
const TableCell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
74
|
+
"td",
|
|
75
|
+
{
|
|
76
|
+
ref,
|
|
77
|
+
className: cn(
|
|
78
|
+
"p-4 align-middle [&:has([role=checkbox])]:pr-0",
|
|
79
|
+
className
|
|
80
|
+
),
|
|
81
|
+
...props
|
|
82
|
+
}
|
|
83
|
+
));
|
|
84
|
+
TableCell.displayName = "TableCell";
|
|
85
|
+
const TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
86
|
+
"caption",
|
|
87
|
+
{
|
|
88
|
+
ref,
|
|
89
|
+
className: cn(
|
|
90
|
+
"mt-4 text-sm text-[var(--axis-text-secondary)]",
|
|
91
|
+
className
|
|
92
|
+
),
|
|
93
|
+
...props
|
|
94
|
+
}
|
|
95
|
+
));
|
|
96
|
+
TableCaption.displayName = "TableCaption";
|
|
12
97
|
export {
|
|
13
98
|
Table,
|
|
14
99
|
TableBody,
|
package/dist/tabs/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/tabs/index.tsx
|
|
31
29
|
var tabs_exports = {};
|
|
32
30
|
__export(tabs_exports, {
|
|
33
31
|
Tabs: () => Tabs,
|
|
@@ -36,32 +34,16 @@ __export(tabs_exports, {
|
|
|
36
34
|
TabsTrigger: () => TabsTrigger
|
|
37
35
|
});
|
|
38
36
|
module.exports = __toCommonJS(tabs_exports);
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
38
|
var React = __toESM(require("react"));
|
|
40
39
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
45
|
-
var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
|
|
46
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
47
|
-
extend: {
|
|
48
|
-
classGroups: {
|
|
49
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
function cn(...inputs) {
|
|
54
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// src/tabs/index.tsx
|
|
58
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
|
-
var Tabs = TabsPrimitive.Root;
|
|
60
|
-
var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
var import_utils = require("../utils.js");
|
|
41
|
+
const Tabs = TabsPrimitive.Root;
|
|
42
|
+
const TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
43
|
TabsPrimitive.List,
|
|
62
44
|
{
|
|
63
45
|
ref,
|
|
64
|
-
className: cn(
|
|
46
|
+
className: (0, import_utils.cn)(
|
|
65
47
|
"inline-flex h-10 items-center justify-center rounded-md p-1",
|
|
66
48
|
"bg-[var(--axis-surface-secondary)] text-[var(--axis-text-secondary)]",
|
|
67
49
|
className
|
|
@@ -70,11 +52,11 @@ var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
70
52
|
}
|
|
71
53
|
));
|
|
72
54
|
TabsList.displayName = "TabsList";
|
|
73
|
-
|
|
55
|
+
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
56
|
TabsPrimitive.Trigger,
|
|
75
57
|
{
|
|
76
58
|
ref,
|
|
77
|
-
className: cn(
|
|
59
|
+
className: (0, import_utils.cn)(
|
|
78
60
|
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",
|
|
79
61
|
"ring-offset-[var(--axis-surface-default)]",
|
|
80
62
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
|
|
@@ -86,11 +68,11 @@ var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
86
68
|
}
|
|
87
69
|
));
|
|
88
70
|
TabsTrigger.displayName = "TabsTrigger";
|
|
89
|
-
|
|
71
|
+
const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
72
|
TabsPrimitive.Content,
|
|
91
73
|
{
|
|
92
74
|
ref,
|
|
93
|
-
className: cn(
|
|
75
|
+
className: (0, import_utils.cn)(
|
|
94
76
|
"mt-2 ring-offset-[var(--axis-surface-default)]",
|
|
95
77
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
|
|
96
78
|
className
|
package/dist/tabs/index.mjs
CHANGED
|
@@ -1,10 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4
|
+
import { cn } from "../utils.mjs";
|
|
5
|
+
const Tabs = TabsPrimitive.Root;
|
|
6
|
+
const TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
TabsPrimitive.List,
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
className: cn(
|
|
11
|
+
"inline-flex h-10 items-center justify-center rounded-md p-1",
|
|
12
|
+
"bg-[var(--axis-surface-secondary)] text-[var(--axis-text-secondary)]",
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
TabsList.displayName = "TabsList";
|
|
19
|
+
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
20
|
+
TabsPrimitive.Trigger,
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
className: cn(
|
|
24
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",
|
|
25
|
+
"ring-offset-[var(--axis-surface-default)]",
|
|
26
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
|
|
27
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
28
|
+
"data-[state=active]:bg-[var(--axis-surface-default)] data-[state=active]:text-[var(--axis-text-primary)] data-[state=active]:shadow-sm",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
));
|
|
34
|
+
TabsTrigger.displayName = "TabsTrigger";
|
|
35
|
+
const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
36
|
+
TabsPrimitive.Content,
|
|
37
|
+
{
|
|
38
|
+
ref,
|
|
39
|
+
className: cn(
|
|
40
|
+
"mt-2 ring-offset-[var(--axis-surface-default)]",
|
|
41
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
));
|
|
47
|
+
TabsContent.displayName = "TabsContent";
|
|
8
48
|
export {
|
|
9
49
|
Tabs,
|
|
10
50
|
TabsContent,
|
package/dist/textarea/index.js
CHANGED
|
@@ -26,36 +26,18 @@ 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/textarea/index.tsx
|
|
31
29
|
var textarea_exports = {};
|
|
32
30
|
__export(textarea_exports, {
|
|
33
31
|
Textarea: () => Textarea
|
|
34
32
|
});
|
|
35
33
|
module.exports = __toCommonJS(textarea_exports);
|
|
36
|
-
var React = __toESM(require("react"));
|
|
37
|
-
|
|
38
|
-
// src/utils.ts
|
|
39
|
-
var import_clsx = require("clsx");
|
|
40
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
41
|
-
var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
|
|
42
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
43
|
-
extend: {
|
|
44
|
-
classGroups: {
|
|
45
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
function cn(...inputs) {
|
|
50
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// src/textarea/index.tsx
|
|
54
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
55
|
-
var
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("../utils.js");
|
|
37
|
+
const Textarea = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
38
|
"textarea",
|
|
57
39
|
{
|
|
58
|
-
className: cn(
|
|
40
|
+
className: (0, import_utils.cn)(
|
|
59
41
|
"flex min-h-[80px] w-full rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] px-3 py-2 text-sm",
|
|
60
42
|
"text-[var(--axis-text-primary)]",
|
|
61
43
|
"ring-offset-[var(--axis-surface-default)]",
|
package/dist/textarea/index.mjs
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "../
|
|
4
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../utils.mjs";
|
|
4
|
+
const Textarea = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5
|
+
"textarea",
|
|
6
|
+
{
|
|
7
|
+
className: cn(
|
|
8
|
+
"flex min-h-[80px] w-full rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] px-3 py-2 text-sm",
|
|
9
|
+
"text-[var(--axis-text-primary)]",
|
|
10
|
+
"ring-offset-[var(--axis-surface-default)]",
|
|
11
|
+
"placeholder:text-[var(--axis-text-tertiary)]",
|
|
12
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
|
|
13
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
+
className
|
|
15
|
+
),
|
|
16
|
+
ref,
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
));
|
|
20
|
+
Textarea.displayName = "Textarea";
|
|
5
21
|
export {
|
|
6
22
|
Textarea
|
|
7
23
|
};
|
package/dist/toast/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/toast/index.tsx
|
|
31
29
|
var toast_exports = {};
|
|
32
30
|
__export(toast_exports, {
|
|
33
31
|
Toast: () => Toast,
|
|
@@ -39,33 +37,17 @@ __export(toast_exports, {
|
|
|
39
37
|
ToastViewport: () => ToastViewport
|
|
40
38
|
});
|
|
41
39
|
module.exports = __toCommonJS(toast_exports);
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
41
|
var React = __toESM(require("react"));
|
|
43
42
|
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
|
|
44
43
|
var import_class_variance_authority = require("class-variance-authority");
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
49
|
-
var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
|
|
50
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
51
|
-
extend: {
|
|
52
|
-
classGroups: {
|
|
53
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
function cn(...inputs) {
|
|
58
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// src/toast/index.tsx
|
|
62
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
63
|
-
var ToastProvider = ToastPrimitives.Provider;
|
|
64
|
-
var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
|
+
var import_utils = require("../utils.js");
|
|
45
|
+
const ToastProvider = ToastPrimitives.Provider;
|
|
46
|
+
const ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
47
|
ToastPrimitives.Viewport,
|
|
66
48
|
{
|
|
67
49
|
ref,
|
|
68
|
-
className: cn(
|
|
50
|
+
className: (0, import_utils.cn)(
|
|
69
51
|
"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]",
|
|
70
52
|
className
|
|
71
53
|
),
|
|
@@ -73,7 +55,7 @@ var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
73
55
|
}
|
|
74
56
|
));
|
|
75
57
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
76
|
-
|
|
58
|
+
const toastVariants = (0, import_class_variance_authority.cva)(
|
|
77
59
|
"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",
|
|
78
60
|
{
|
|
79
61
|
variants: {
|
|
@@ -89,20 +71,20 @@ var toastVariants = (0, import_class_variance_authority.cva)(
|
|
|
89
71
|
}
|
|
90
72
|
}
|
|
91
73
|
);
|
|
92
|
-
|
|
74
|
+
const Toast = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
75
|
ToastPrimitives.Root,
|
|
94
76
|
{
|
|
95
77
|
ref,
|
|
96
|
-
className: cn(toastVariants({ variant }), className),
|
|
78
|
+
className: (0, import_utils.cn)(toastVariants({ variant }), className),
|
|
97
79
|
...props
|
|
98
80
|
}
|
|
99
81
|
));
|
|
100
82
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
101
|
-
|
|
83
|
+
const ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
84
|
ToastPrimitives.Action,
|
|
103
85
|
{
|
|
104
86
|
ref,
|
|
105
|
-
className: cn(
|
|
87
|
+
className: (0, import_utils.cn)(
|
|
106
88
|
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border px-3 text-sm font-medium transition-colors",
|
|
107
89
|
"border-[var(--axis-border-default)] bg-transparent",
|
|
108
90
|
"hover:bg-[var(--axis-surface-secondary)]",
|
|
@@ -114,11 +96,11 @@ var ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
114
96
|
}
|
|
115
97
|
));
|
|
116
98
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
117
|
-
|
|
99
|
+
const ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
100
|
ToastPrimitives.Close,
|
|
119
101
|
{
|
|
120
102
|
ref,
|
|
121
|
-
className: cn(
|
|
103
|
+
className: (0, import_utils.cn)(
|
|
122
104
|
"absolute right-2 top-2 rounded-md p-1 text-[var(--axis-text-secondary)] opacity-0 transition-opacity",
|
|
123
105
|
"hover:text-[var(--axis-text-primary)]",
|
|
124
106
|
"focus:opacity-100 focus:outline-none focus:ring-2",
|
|
@@ -131,20 +113,20 @@ var ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
131
113
|
}
|
|
132
114
|
));
|
|
133
115
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
134
|
-
|
|
116
|
+
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
135
117
|
ToastPrimitives.Title,
|
|
136
118
|
{
|
|
137
119
|
ref,
|
|
138
|
-
className: cn("text-sm font-semibold", className),
|
|
120
|
+
className: (0, import_utils.cn)("text-sm font-semibold", className),
|
|
139
121
|
...props
|
|
140
122
|
}
|
|
141
123
|
));
|
|
142
124
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
143
|
-
|
|
125
|
+
const ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
144
126
|
ToastPrimitives.Description,
|
|
145
127
|
{
|
|
146
128
|
ref,
|
|
147
|
-
className: cn("text-sm opacity-90", className),
|
|
129
|
+
className: (0, import_utils.cn)("text-sm opacity-90", className),
|
|
148
130
|
...props
|
|
149
131
|
}
|
|
150
132
|
));
|
package/dist/toast/index.mjs
CHANGED
|
@@ -1,13 +1,97 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../utils.mjs";
|
|
6
|
+
const ToastProvider = ToastPrimitives.Provider;
|
|
7
|
+
const ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8
|
+
ToastPrimitives.Viewport,
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
className: cn(
|
|
12
|
+
"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]",
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
19
|
+
const toastVariants = cva(
|
|
20
|
+
"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",
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
default: "border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] text-[var(--axis-text-primary)]",
|
|
25
|
+
success: "border-[var(--axis-border-success)] bg-[var(--axis-surface-success)] text-[var(--axis-text-success)]",
|
|
26
|
+
error: "border-[var(--axis-border-error)] bg-[var(--axis-surface-error)] text-[var(--axis-text-error)]",
|
|
27
|
+
warning: "border-transparent bg-[var(--axis-surface-warning)] text-[var(--axis-text-warning)]"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "default"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
const Toast = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
36
|
+
ToastPrimitives.Root,
|
|
37
|
+
{
|
|
38
|
+
ref,
|
|
39
|
+
className: cn(toastVariants({ variant }), className),
|
|
40
|
+
...props
|
|
41
|
+
}
|
|
42
|
+
));
|
|
43
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
44
|
+
const ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
45
|
+
ToastPrimitives.Action,
|
|
46
|
+
{
|
|
47
|
+
ref,
|
|
48
|
+
className: cn(
|
|
49
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border px-3 text-sm font-medium transition-colors",
|
|
50
|
+
"border-[var(--axis-border-default)] bg-transparent",
|
|
51
|
+
"hover:bg-[var(--axis-surface-secondary)]",
|
|
52
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--axis-border-focus)]",
|
|
53
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
));
|
|
59
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
60
|
+
const ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
61
|
+
ToastPrimitives.Close,
|
|
62
|
+
{
|
|
63
|
+
ref,
|
|
64
|
+
className: cn(
|
|
65
|
+
"absolute right-2 top-2 rounded-md p-1 text-[var(--axis-text-secondary)] opacity-0 transition-opacity",
|
|
66
|
+
"hover:text-[var(--axis-text-primary)]",
|
|
67
|
+
"focus:opacity-100 focus:outline-none focus:ring-2",
|
|
68
|
+
"group-hover:opacity-100",
|
|
69
|
+
className
|
|
70
|
+
),
|
|
71
|
+
"toast-close": "",
|
|
72
|
+
...props,
|
|
73
|
+
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" }) })
|
|
74
|
+
}
|
|
75
|
+
));
|
|
76
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
77
|
+
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
78
|
+
ToastPrimitives.Title,
|
|
79
|
+
{
|
|
80
|
+
ref,
|
|
81
|
+
className: cn("text-sm font-semibold", className),
|
|
82
|
+
...props
|
|
83
|
+
}
|
|
84
|
+
));
|
|
85
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
86
|
+
const ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
87
|
+
ToastPrimitives.Description,
|
|
88
|
+
{
|
|
89
|
+
ref,
|
|
90
|
+
className: cn("text-sm opacity-90", className),
|
|
91
|
+
...props
|
|
92
|
+
}
|
|
93
|
+
));
|
|
94
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
11
95
|
export {
|
|
12
96
|
Toast,
|
|
13
97
|
ToastAction,
|
package/dist/toggle/index.js
CHANGED
|
@@ -26,36 +26,18 @@ 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/toggle/index.tsx
|
|
31
29
|
var toggle_exports = {};
|
|
32
30
|
__export(toggle_exports, {
|
|
33
31
|
Toggle: () => Toggle,
|
|
34
32
|
toggleVariants: () => toggleVariants
|
|
35
33
|
});
|
|
36
34
|
module.exports = __toCommonJS(toggle_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
36
|
var React = __toESM(require("react"));
|
|
38
37
|
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"));
|
|
39
38
|
var import_class_variance_authority = require("class-variance-authority");
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var import_clsx = require("clsx");
|
|
43
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
44
|
-
var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
|
|
45
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
46
|
-
extend: {
|
|
47
|
-
classGroups: {
|
|
48
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
function cn(...inputs) {
|
|
53
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// src/toggle/index.tsx
|
|
57
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
58
|
-
var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
39
|
+
var import_utils = require("../utils.js");
|
|
40
|
+
const toggleVariants = (0, import_class_variance_authority.cva)(
|
|
59
41
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-[var(--axis-surface-default)] 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-border-focus)] 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",
|
|
60
42
|
{
|
|
61
43
|
variants: {
|
|
@@ -75,11 +57,11 @@ var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
|
75
57
|
}
|
|
76
58
|
}
|
|
77
59
|
);
|
|
78
|
-
|
|
60
|
+
const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
61
|
TogglePrimitive.Root,
|
|
80
62
|
{
|
|
81
63
|
ref,
|
|
82
|
-
className: cn(toggleVariants({ variant, size, className })),
|
|
64
|
+
className: (0, import_utils.cn)(toggleVariants({ variant, size, className })),
|
|
83
65
|
...props
|
|
84
66
|
}
|
|
85
67
|
));
|
package/dist/toggle/index.mjs
CHANGED
|
@@ -1,8 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "
|
|
5
|
-
import "../
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../utils.mjs";
|
|
6
|
+
const toggleVariants = cva(
|
|
7
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-[var(--axis-surface-default)] 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-border-focus)] 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",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-transparent",
|
|
12
|
+
outline: "border border-[var(--axis-border-default)] bg-transparent hover:bg-[var(--axis-surface-secondary)] hover:text-[var(--axis-text-primary)]"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
default: "h-10 px-3 min-w-10",
|
|
16
|
+
sm: "h-9 px-2.5 min-w-9",
|
|
17
|
+
lg: "h-11 px-5 min-w-11"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
size: "default"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
27
|
+
TogglePrimitive.Root,
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
));
|
|
34
|
+
Toggle.displayName = "Toggle";
|
|
6
35
|
export {
|
|
7
36
|
Toggle,
|
|
8
37
|
toggleVariants
|