@saas-ui/react 3.0.0-alpha.23 → 3.0.0-alpha.25
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/CHANGELOG.md +23 -0
- package/dist/{chunk-BU7QENBQ.js → chunk-3JZ42NYM.js} +1 -1
- package/dist/chunk-52XM5VXJ.js +9 -0
- package/dist/chunk-6MMPBMKN.js +54 -0
- package/dist/chunk-CZVNG73V.js +63 -0
- package/dist/chunk-GRUMUCSL.js +109 -0
- package/dist/chunk-IVLUAUU5.js +10 -0
- package/dist/chunk-JMYI6YXR.js +1 -0
- package/dist/{chunk-CD2JUFI2.js → chunk-K2SPPLAY.js} +2 -2
- package/dist/chunk-KE5AC3TZ.js +63 -0
- package/dist/{chunk-FJFNGSPL.js → chunk-NGGISORT.js} +12 -6
- package/dist/chunk-RLIAFHVM.js +66 -0
- package/dist/components/badge/index.d.cts +2 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/close-button/index.js +2 -1
- package/dist/components/data-list/index.cjs +33 -0
- package/dist/components/data-list/index.d.cts +1 -0
- package/dist/components/data-list/index.d.ts +1 -0
- package/dist/components/data-list/index.js +10 -0
- package/dist/components/dialog/index.cjs +35 -35
- package/dist/components/dialog/index.d.cts +35 -17
- package/dist/components/dialog/index.d.ts +35 -17
- package/dist/components/dialog/index.js +5 -4
- package/dist/components/drawer/index.cjs +34 -36
- package/dist/components/drawer/index.d.cts +33 -18
- package/dist/components/drawer/index.d.ts +33 -18
- package/dist/components/drawer/index.js +5 -4
- package/dist/components/empty-state/index.cjs +12 -10
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-upload/index.cjs +254 -0
- package/dist/components/file-upload/index.d.cts +43 -0
- package/dist/components/file-upload/index.d.ts +43 -0
- package/dist/components/file-upload/index.js +10 -0
- package/dist/components/grid-list/index.d.cts +1 -1
- package/dist/components/grid-list/index.d.ts +1 -1
- package/dist/components/navbar/index.d.cts +3 -3
- package/dist/components/navbar/index.d.ts +3 -3
- package/dist/components/password-input/index.cjs +2 -2
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/persona/index.d.cts +4 -9
- package/dist/components/persona/index.d.ts +4 -9
- package/dist/components/popover/index.cjs +214 -0
- package/dist/components/popover/index.d.cts +37 -0
- package/dist/components/popover/index.d.ts +37 -0
- package/dist/components/popover/index.js +11 -0
- package/dist/components/select/index.js +3 -2
- package/dist/components/sidebar/index.d.cts +11 -11
- package/dist/components/sidebar/index.d.ts +11 -11
- package/dist/components/tabs/index.cjs +35 -0
- package/dist/components/tabs/index.d.cts +1 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/index.js +12 -0
- package/dist/components/toaster/index.cjs +161 -11
- package/dist/components/toaster/index.d.cts +6 -5
- package/dist/components/toaster/index.d.ts +6 -5
- package/dist/components/toaster/index.js +3 -1
- package/dist/index.cjs +2253 -1968
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1531 -1415
- package/package.json +2 -2
- package/dist/chunk-EQ7Q6HRE.js +0 -63
- package/dist/chunk-HELHPHIQ.js +0 -35
- package/dist/chunk-VJ4NCA6R.js +0 -56
- /package/dist/{chunk-BKYGKH3L.js → chunk-YXGJOOMM.js} +0 -0
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
# @saas-ui/react
|
2
2
|
|
3
|
+
## 3.0.0-alpha.25
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 8d8ffaa: Translucency and backdrop effect of overlay elements can now be configured
|
8
|
+
- 8d8ffaa: Added FileUpload component
|
9
|
+
- 8d8ffaa: Added Popover component
|
10
|
+
- 8d8ffaa: Added semantic tokens and scales for control, panel and indicator
|
11
|
+
|
12
|
+
### Patch Changes
|
13
|
+
|
14
|
+
- 8d8ffaa: Added ghost variant to tabs recipe
|
15
|
+
|
16
|
+
## 3.0.0-alpha.24
|
17
|
+
|
18
|
+
### Minor Changes
|
19
|
+
|
20
|
+
- ac2d80d: Improved toaster styles and allow setting global defaults
|
21
|
+
|
22
|
+
### Patch Changes
|
23
|
+
|
24
|
+
- 9d47676: Improved tabs recipe, new pills variant and xs size
|
25
|
+
|
3
26
|
## 3.0.0-alpha.23
|
4
27
|
|
5
28
|
### Patch Changes
|
@@ -0,0 +1,54 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
CloseButton
|
4
|
+
} from "./chunk-YXGJOOMM.js";
|
5
|
+
import {
|
6
|
+
__export
|
7
|
+
} from "./chunk-RTMS5TJN.js";
|
8
|
+
|
9
|
+
// src/components/drawer/drawer.tsx
|
10
|
+
var drawer_exports = {};
|
11
|
+
__export(drawer_exports, {
|
12
|
+
ActionTrigger: () => ActionTrigger,
|
13
|
+
Backdrop: () => Backdrop,
|
14
|
+
Body: () => Body,
|
15
|
+
CloseButton: () => CloseButton2,
|
16
|
+
CloseTrigger: () => CloseTrigger,
|
17
|
+
Content: () => Content,
|
18
|
+
Context: () => Context,
|
19
|
+
Description: () => Description,
|
20
|
+
Footer: () => Footer,
|
21
|
+
Header: () => Header,
|
22
|
+
Root: () => Root,
|
23
|
+
Title: () => Title,
|
24
|
+
Trigger: () => Trigger
|
25
|
+
});
|
26
|
+
import { forwardRef } from "react";
|
27
|
+
import { DialogContext } from "@ark-ui/react/dialog";
|
28
|
+
import { Drawer as ChakraDrawer, Portal } from "@chakra-ui/react";
|
29
|
+
import { jsx } from "react/jsx-runtime";
|
30
|
+
var Content = forwardRef(
|
31
|
+
function DrawerContent(props, ref) {
|
32
|
+
const { children, portalled = true, portalRef, offset, ...rest } = props;
|
33
|
+
return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(ChakraDrawer.Positioner, { padding: offset, children: /* @__PURE__ */ jsx(ChakraDrawer.Content, { ref, ...rest, asChild: false, children }) }) });
|
34
|
+
}
|
35
|
+
);
|
36
|
+
var CloseButton2 = forwardRef(function DrawerCloseTrigger(props, ref) {
|
37
|
+
const { children, ...rest } = props;
|
38
|
+
return /* @__PURE__ */ jsx(ChakraDrawer.CloseTrigger, { position: "absolute", ...rest, asChild: true, children: /* @__PURE__ */ jsx(CloseButton, { size: "sm", ref, children }) });
|
39
|
+
});
|
40
|
+
var CloseTrigger = ChakraDrawer.CloseTrigger;
|
41
|
+
var Trigger = ChakraDrawer.Trigger;
|
42
|
+
var Root = ChakraDrawer.Root;
|
43
|
+
var Footer = ChakraDrawer.Footer;
|
44
|
+
var Header = ChakraDrawer.Header;
|
45
|
+
var Body = ChakraDrawer.Body;
|
46
|
+
var Backdrop = ChakraDrawer.Backdrop;
|
47
|
+
var Description = ChakraDrawer.Description;
|
48
|
+
var Title = ChakraDrawer.Title;
|
49
|
+
var ActionTrigger = ChakraDrawer.ActionTrigger;
|
50
|
+
var Context = DialogContext;
|
51
|
+
|
52
|
+
export {
|
53
|
+
drawer_exports
|
54
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
CloseButton
|
4
|
+
} from "./chunk-YXGJOOMM.js";
|
5
|
+
import {
|
6
|
+
__export
|
7
|
+
} from "./chunk-RTMS5TJN.js";
|
8
|
+
|
9
|
+
// src/components/dialog/dialog.tsx
|
10
|
+
var dialog_exports = {};
|
11
|
+
__export(dialog_exports, {
|
12
|
+
ActionTrigger: () => ActionTrigger,
|
13
|
+
Backdrop: () => Backdrop,
|
14
|
+
Body: () => Body,
|
15
|
+
CloseButton: () => CloseButton2,
|
16
|
+
CloseTrigger: () => CloseTrigger,
|
17
|
+
Content: () => Content,
|
18
|
+
Context: () => Context,
|
19
|
+
Description: () => Description,
|
20
|
+
DialogContext: () => DialogContext,
|
21
|
+
Footer: () => Footer,
|
22
|
+
Header: () => Header,
|
23
|
+
Root: () => Root,
|
24
|
+
Title: () => Title,
|
25
|
+
Trigger: () => Trigger
|
26
|
+
});
|
27
|
+
import { forwardRef } from "react";
|
28
|
+
import { Dialog as ChakraDialog, Portal } from "@chakra-ui/react";
|
29
|
+
import { DialogContext } from "@ark-ui/react/dialog";
|
30
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
31
|
+
var Content = forwardRef(
|
32
|
+
function DialogContent(props, ref) {
|
33
|
+
const {
|
34
|
+
children,
|
35
|
+
portalled = true,
|
36
|
+
portalRef,
|
37
|
+
backdrop = true,
|
38
|
+
...rest
|
39
|
+
} = props;
|
40
|
+
return /* @__PURE__ */ jsxs(Portal, { disabled: !portalled, container: portalRef, children: [
|
41
|
+
backdrop && /* @__PURE__ */ jsx(ChakraDialog.Backdrop, {}),
|
42
|
+
/* @__PURE__ */ jsx(ChakraDialog.Positioner, { children: /* @__PURE__ */ jsx(ChakraDialog.Content, { ref, ...rest, asChild: false, children }) })
|
43
|
+
] });
|
44
|
+
}
|
45
|
+
);
|
46
|
+
var CloseButton2 = forwardRef(function DialogCloseTrigger(props, ref) {
|
47
|
+
return /* @__PURE__ */ jsx(ChakraDialog.CloseTrigger, { position: "absolute", ...props, asChild: true, children: /* @__PURE__ */ jsx(CloseButton, { size: "sm", ref, children: props.children }) });
|
48
|
+
});
|
49
|
+
var CloseTrigger = ChakraDialog.CloseTrigger;
|
50
|
+
var Root = ChakraDialog.Root;
|
51
|
+
var Context = ChakraDialog.Context;
|
52
|
+
var Footer = ChakraDialog.Footer;
|
53
|
+
var Header = ChakraDialog.Header;
|
54
|
+
var Body = ChakraDialog.Body;
|
55
|
+
var Backdrop = ChakraDialog.Backdrop;
|
56
|
+
var Title = ChakraDialog.Title;
|
57
|
+
var Description = ChakraDialog.Description;
|
58
|
+
var Trigger = ChakraDialog.Trigger;
|
59
|
+
var ActionTrigger = ChakraDialog.ActionTrigger;
|
60
|
+
|
61
|
+
export {
|
62
|
+
dialog_exports
|
63
|
+
};
|
@@ -0,0 +1,109 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
CloseButton
|
4
|
+
} from "./chunk-YXGJOOMM.js";
|
5
|
+
import {
|
6
|
+
__export
|
7
|
+
} from "./chunk-RTMS5TJN.js";
|
8
|
+
|
9
|
+
// src/components/file-upload/file-upload.tsx
|
10
|
+
var file_upload_exports = {};
|
11
|
+
__export(file_upload_exports, {
|
12
|
+
ClearTrigger: () => ClearTrigger,
|
13
|
+
Dropzone: () => Dropzone,
|
14
|
+
Input: () => Input,
|
15
|
+
Label: () => Label,
|
16
|
+
List: () => List,
|
17
|
+
Root: () => Root,
|
18
|
+
Trigger: () => Trigger
|
19
|
+
});
|
20
|
+
import * as React from "react";
|
21
|
+
import {
|
22
|
+
Button,
|
23
|
+
FileUpload as ChakraFileUpload,
|
24
|
+
Span,
|
25
|
+
useFileUploadContext,
|
26
|
+
useRecipe
|
27
|
+
} from "@chakra-ui/react";
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
29
|
+
var Root = React.forwardRef(
|
30
|
+
function FileUploadRoot(props, ref) {
|
31
|
+
const { children, inputProps, ...rest } = props;
|
32
|
+
return /* @__PURE__ */ jsxs(ChakraFileUpload.Root, { ...rest, children: [
|
33
|
+
/* @__PURE__ */ jsx(ChakraFileUpload.HiddenInput, { ref, ...inputProps }),
|
34
|
+
children
|
35
|
+
] });
|
36
|
+
}
|
37
|
+
);
|
38
|
+
var Dropzone = React.forwardRef(
|
39
|
+
function FileUploadDropzone(props, ref) {
|
40
|
+
const { children, ...rest } = props;
|
41
|
+
return /* @__PURE__ */ jsx(ChakraFileUpload.Dropzone, { ref, ...rest, children: /* @__PURE__ */ jsx(ChakraFileUpload.DropzoneContent, { children }) });
|
42
|
+
}
|
43
|
+
);
|
44
|
+
var Item = React.forwardRef(
|
45
|
+
function FileUploadItem(props, ref) {
|
46
|
+
const { file, showSize, icon, clearable } = props;
|
47
|
+
return /* @__PURE__ */ jsxs(ChakraFileUpload.Item, { file, ref, children: [
|
48
|
+
/* @__PURE__ */ jsx(ChakraFileUpload.ItemPreview, { children: icon }),
|
49
|
+
showSize ? /* @__PURE__ */ jsxs(ChakraFileUpload.ItemContent, { children: [
|
50
|
+
/* @__PURE__ */ jsx(ChakraFileUpload.ItemName, {}),
|
51
|
+
/* @__PURE__ */ jsx(ChakraFileUpload.ItemSizeText, {})
|
52
|
+
] }) : /* @__PURE__ */ jsx(ChakraFileUpload.ItemName, { flex: "1" }),
|
53
|
+
clearable && /* @__PURE__ */ jsx(ChakraFileUpload.ItemDeleteTrigger, { asChild: true, children: /* @__PURE__ */ jsx(CloseButton, { size: "xs" }) })
|
54
|
+
] });
|
55
|
+
}
|
56
|
+
);
|
57
|
+
var List = React.forwardRef(
|
58
|
+
function FileUploadList(props, ref) {
|
59
|
+
const { showSize, clearable, files, ...rest } = props;
|
60
|
+
const fileUpload = useFileUploadContext();
|
61
|
+
const acceptedFiles = files != null ? files : fileUpload.acceptedFiles;
|
62
|
+
if (acceptedFiles.length === 0) return null;
|
63
|
+
return /* @__PURE__ */ jsx(ChakraFileUpload.ItemGroup, { ref, ...rest, children: acceptedFiles.map((file) => /* @__PURE__ */ jsx(
|
64
|
+
Item,
|
65
|
+
{
|
66
|
+
file,
|
67
|
+
showSize,
|
68
|
+
clearable
|
69
|
+
},
|
70
|
+
file.name
|
71
|
+
)) });
|
72
|
+
}
|
73
|
+
);
|
74
|
+
var Input = React.forwardRef(
|
75
|
+
function FileInput(props, ref) {
|
76
|
+
const inputRecipe = useRecipe({ key: "input" });
|
77
|
+
const [recipeProps, restProps] = inputRecipe.splitVariantProps(props);
|
78
|
+
const { placeholder = "Select file(s)", ...rest } = restProps;
|
79
|
+
return /* @__PURE__ */ jsx(ChakraFileUpload.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
80
|
+
Button,
|
81
|
+
{
|
82
|
+
unstyled: true,
|
83
|
+
py: "0",
|
84
|
+
ref,
|
85
|
+
...rest,
|
86
|
+
css: [inputRecipe(recipeProps), props.css],
|
87
|
+
children: /* @__PURE__ */ jsx(ChakraFileUpload.Context, { children: ({ acceptedFiles }) => {
|
88
|
+
if (acceptedFiles.length === 1) {
|
89
|
+
return /* @__PURE__ */ jsx("span", { children: acceptedFiles[0].name });
|
90
|
+
}
|
91
|
+
if (acceptedFiles.length > 1) {
|
92
|
+
return /* @__PURE__ */ jsxs("span", { children: [
|
93
|
+
acceptedFiles.length,
|
94
|
+
" files"
|
95
|
+
] });
|
96
|
+
}
|
97
|
+
return /* @__PURE__ */ jsx(Span, { color: "fg.subtle", children: placeholder });
|
98
|
+
} })
|
99
|
+
}
|
100
|
+
) });
|
101
|
+
}
|
102
|
+
);
|
103
|
+
var Label = ChakraFileUpload.Label;
|
104
|
+
var ClearTrigger = ChakraFileUpload.ClearTrigger;
|
105
|
+
var Trigger = ChakraFileUpload.Trigger;
|
106
|
+
|
107
|
+
export {
|
108
|
+
file_upload_exports
|
109
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
'use client'
|
@@ -152,10 +152,10 @@ function IconBase(props) {
|
|
152
152
|
|
153
153
|
// ../../node_modules/react-icons/lu/index.mjs
|
154
154
|
function LuEyeOff(props) {
|
155
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "
|
155
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }, "child": [] }, { "tag": "path", "attr": { "d": "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, "child": [] }, { "tag": "path", "attr": { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }, "child": [] }, { "tag": "path", "attr": { "d": "m2 2 20 20" }, "child": [] }] })(props);
|
156
156
|
}
|
157
157
|
function LuEye(props) {
|
158
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M2
|
158
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }, "child": [] }, { "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "3" }, "child": [] }] })(props);
|
159
159
|
}
|
160
160
|
|
161
161
|
// src/components/password-input/password-input.tsx
|
@@ -0,0 +1,63 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
CloseButton
|
4
|
+
} from "./chunk-YXGJOOMM.js";
|
5
|
+
import {
|
6
|
+
__export
|
7
|
+
} from "./chunk-RTMS5TJN.js";
|
8
|
+
|
9
|
+
// src/components/popover/popover.tsx
|
10
|
+
var popover_exports = {};
|
11
|
+
__export(popover_exports, {
|
12
|
+
Arrow: () => Arrow,
|
13
|
+
Body: () => Body,
|
14
|
+
CloseButton: () => CloseButton2,
|
15
|
+
CloseTrigger: () => CloseTrigger,
|
16
|
+
Content: () => Content,
|
17
|
+
Description: () => Description,
|
18
|
+
Footer: () => Footer,
|
19
|
+
Header: () => Header,
|
20
|
+
Root: () => Root,
|
21
|
+
Title: () => Title,
|
22
|
+
Trigger: () => Trigger
|
23
|
+
});
|
24
|
+
import * as React from "react";
|
25
|
+
import { Popover as ChakraPopover, Portal } from "@chakra-ui/react";
|
26
|
+
import { jsx } from "react/jsx-runtime";
|
27
|
+
var Content = React.forwardRef(
|
28
|
+
function PopoverContent(props, ref) {
|
29
|
+
const { portalled = true, portalRef, ...rest } = props;
|
30
|
+
return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(ChakraPopover.Positioner, { children: /* @__PURE__ */ jsx(ChakraPopover.Content, { ref, ...rest }) }) });
|
31
|
+
}
|
32
|
+
);
|
33
|
+
var Arrow = React.forwardRef(
|
34
|
+
function PopoverArrow(props, ref) {
|
35
|
+
return /* @__PURE__ */ jsx(ChakraPopover.Arrow, { ...props, ref, children: /* @__PURE__ */ jsx(ChakraPopover.ArrowTip, {}) });
|
36
|
+
}
|
37
|
+
);
|
38
|
+
var CloseButton2 = React.forwardRef(function PopoverCloseTrigger(props, ref) {
|
39
|
+
return /* @__PURE__ */ jsx(
|
40
|
+
ChakraPopover.CloseTrigger,
|
41
|
+
{
|
42
|
+
position: "absolute",
|
43
|
+
top: "1",
|
44
|
+
insetEnd: "1",
|
45
|
+
...props,
|
46
|
+
asChild: true,
|
47
|
+
ref,
|
48
|
+
children: /* @__PURE__ */ jsx(CloseButton, { size: "sm" })
|
49
|
+
}
|
50
|
+
);
|
51
|
+
});
|
52
|
+
var CloseTrigger = ChakraPopover.CloseTrigger;
|
53
|
+
var Title = ChakraPopover.Title;
|
54
|
+
var Description = ChakraPopover.Description;
|
55
|
+
var Footer = ChakraPopover.Footer;
|
56
|
+
var Header = ChakraPopover.Header;
|
57
|
+
var Root = ChakraPopover.Root;
|
58
|
+
var Body = ChakraPopover.Body;
|
59
|
+
var Trigger = ChakraPopover.Trigger;
|
60
|
+
|
61
|
+
export {
|
62
|
+
popover_exports
|
63
|
+
};
|
@@ -1,19 +1,25 @@
|
|
1
1
|
'use client'
|
2
2
|
|
3
3
|
// src/components/empty-state/empty-state.tsx
|
4
|
-
import { EmptyState as ChakraEmptyState, VStack } from "@chakra-ui/react";
|
5
4
|
import { forwardRef } from "react";
|
5
|
+
import {
|
6
|
+
Box,
|
7
|
+
EmptyState as ChakraEmptyState,
|
8
|
+
useEmptyStateStyles
|
9
|
+
} from "@chakra-ui/react";
|
6
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
11
|
+
var EmptyStateActions = (props) => {
|
12
|
+
const { actions } = useEmptyStateStyles();
|
13
|
+
return /* @__PURE__ */ jsx(Box, { ...props, css: [actions, props.css] });
|
14
|
+
};
|
7
15
|
var EmptyState = forwardRef(
|
8
16
|
function EmptyState2(props, ref) {
|
9
17
|
const { title, description, icon, children, ...rest } = props;
|
10
18
|
return /* @__PURE__ */ jsx(ChakraEmptyState.Root, { ref, ...rest, children: /* @__PURE__ */ jsxs(ChakraEmptyState.Content, { children: [
|
11
19
|
icon && /* @__PURE__ */ jsx(ChakraEmptyState.Indicator, { children: icon }),
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
] }) : /* @__PURE__ */ jsx(ChakraEmptyState.Title, { children: title }),
|
16
|
-
children
|
20
|
+
/* @__PURE__ */ jsx(ChakraEmptyState.Title, { children: title }),
|
21
|
+
description ? /* @__PURE__ */ jsx(ChakraEmptyState.Description, { children: description }) : null,
|
22
|
+
/* @__PURE__ */ jsx(EmptyStateActions, { children })
|
17
23
|
] }) });
|
18
24
|
}
|
19
25
|
);
|
@@ -0,0 +1,66 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
CloseButton
|
4
|
+
} from "./chunk-YXGJOOMM.js";
|
5
|
+
|
6
|
+
// src/components/toaster/toaster.tsx
|
7
|
+
import { useCallback, useMemo, useState } from "react";
|
8
|
+
import {
|
9
|
+
Toaster as ChakraToaster,
|
10
|
+
Portal,
|
11
|
+
Spinner,
|
12
|
+
Stack,
|
13
|
+
Toast,
|
14
|
+
createToaster
|
15
|
+
} from "@chakra-ui/react";
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
17
|
+
var defaultOptions = {
|
18
|
+
placement: "bottom-end",
|
19
|
+
pauseOnPageIdle: true
|
20
|
+
};
|
21
|
+
var toast = createToaster(defaultOptions);
|
22
|
+
var Toaster = (props) => {
|
23
|
+
const { closable: defaultClosable = true, ...options } = props || {};
|
24
|
+
const toaster = useMemo(() => {
|
25
|
+
toast = createToaster({
|
26
|
+
...defaultOptions,
|
27
|
+
...options
|
28
|
+
});
|
29
|
+
return toast;
|
30
|
+
}, [options]);
|
31
|
+
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(ChakraToaster, { toaster, insetInline: { mdDown: "4" }, children: (toast2) => {
|
32
|
+
var _a;
|
33
|
+
const closable = ((_a = toast2.meta) == null ? void 0 : _a.closable) === false ? false : defaultClosable && toast2.type !== "loading";
|
34
|
+
return /* @__PURE__ */ jsxs(ToastRoot, { children: [
|
35
|
+
toast2.type === "loading" ? /* @__PURE__ */ jsx(Spinner, { size: "sm", color: "colorPalette.solid", mt: "0.5" }) : /* @__PURE__ */ jsx(Toast.Indicator, {}),
|
36
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
37
|
+
toast2.title && /* @__PURE__ */ jsx(Toast.Title, { children: toast2.title }),
|
38
|
+
toast2.description && /* @__PURE__ */ jsx(Toast.Description, { children: toast2.description }),
|
39
|
+
toast2.action && /* @__PURE__ */ jsx(Toast.ActionTrigger, { children: toast2.action.label })
|
40
|
+
] }),
|
41
|
+
closable !== false && /* @__PURE__ */ jsx(Toast.CloseTrigger, { children: /* @__PURE__ */ jsx(CloseButton, { size: "xs" }) })
|
42
|
+
] });
|
43
|
+
} }) });
|
44
|
+
};
|
45
|
+
function ToastRoot(props) {
|
46
|
+
const [rect, setRect] = useState();
|
47
|
+
const rectCallbackRef = useCallback((el) => {
|
48
|
+
setRect(el == null ? void 0 : el.getBoundingClientRect());
|
49
|
+
}, []);
|
50
|
+
return /* @__PURE__ */ jsx(
|
51
|
+
Toast.Root,
|
52
|
+
{
|
53
|
+
ref: rectCallbackRef,
|
54
|
+
width: { md: "sm" },
|
55
|
+
css: {
|
56
|
+
"--toast-height": `${rect == null ? void 0 : rect.height}px`
|
57
|
+
},
|
58
|
+
children: props.children
|
59
|
+
}
|
60
|
+
);
|
61
|
+
}
|
62
|
+
|
63
|
+
export {
|
64
|
+
toast,
|
65
|
+
Toaster
|
66
|
+
};
|
@@ -0,0 +1,33 @@
|
|
1
|
+
'use client'
|
2
|
+
"use strict";
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
|
+
|
21
|
+
// src/components/data-list/index.ts
|
22
|
+
var data_list_exports = {};
|
23
|
+
__export(data_list_exports, {
|
24
|
+
DataList: () => import_data_list.DataList,
|
25
|
+
useDataListStyles: () => import_data_list.useDataListStyles
|
26
|
+
});
|
27
|
+
module.exports = __toCommonJS(data_list_exports);
|
28
|
+
var import_data_list = require("@chakra-ui/react/data-list");
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
30
|
+
0 && (module.exports = {
|
31
|
+
DataList,
|
32
|
+
useDataListStyles
|
33
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export { DataList, useDataListStyles } from '@chakra-ui/react/data-list';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { DataList, useDataListStyles } from '@chakra-ui/react/data-list';
|
@@ -19,31 +19,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
20
|
|
21
21
|
// src/components/dialog/index.ts
|
22
|
-
var
|
23
|
-
__export(
|
24
|
-
Dialog: () =>
|
25
|
-
});
|
26
|
-
module.exports = __toCommonJS(dialog_exports);
|
27
|
-
|
28
|
-
// src/components/dialog/namespace.ts
|
29
|
-
var namespace_exports = {};
|
30
|
-
__export(namespace_exports, {
|
31
|
-
ActionTrigger: () => DialogActionTrigger,
|
32
|
-
Backdrop: () => DialogBackdrop,
|
33
|
-
Body: () => DialogBody,
|
34
|
-
CloseButton: () => DialogCloseButton,
|
35
|
-
CloseTrigger: () => DialogCloseTrigger2,
|
36
|
-
Content: () => DialogContent,
|
37
|
-
Context: () => import_dialog.DialogContext,
|
38
|
-
Description: () => DialogDescription,
|
39
|
-
Footer: () => DialogFooter,
|
40
|
-
Header: () => DialogHeader,
|
41
|
-
Root: () => DialogRoot,
|
42
|
-
Title: () => DialogTitle,
|
43
|
-
Trigger: () => DialogTrigger
|
22
|
+
var dialog_exports2 = {};
|
23
|
+
__export(dialog_exports2, {
|
24
|
+
Dialog: () => dialog_exports
|
44
25
|
});
|
26
|
+
module.exports = __toCommonJS(dialog_exports2);
|
45
27
|
|
46
28
|
// src/components/dialog/dialog.tsx
|
29
|
+
var dialog_exports = {};
|
30
|
+
__export(dialog_exports, {
|
31
|
+
ActionTrigger: () => ActionTrigger,
|
32
|
+
Backdrop: () => Backdrop,
|
33
|
+
Body: () => Body,
|
34
|
+
CloseButton: () => CloseButton3,
|
35
|
+
CloseTrigger: () => CloseTrigger,
|
36
|
+
Content: () => Content,
|
37
|
+
Context: () => Context,
|
38
|
+
Description: () => Description,
|
39
|
+
DialogContext: () => import_dialog.DialogContext,
|
40
|
+
Footer: () => Footer,
|
41
|
+
Header: () => Header,
|
42
|
+
Root: () => Root,
|
43
|
+
Title: () => Title,
|
44
|
+
Trigger: () => Trigger
|
45
|
+
});
|
47
46
|
var import_react4 = require("react");
|
48
47
|
var import_react5 = require("@chakra-ui/react");
|
49
48
|
|
@@ -170,8 +169,8 @@ var CloseButton = (0, import_react2.forwardRef)(
|
|
170
169
|
// src/components/dialog/dialog.tsx
|
171
170
|
var import_dialog = require("@ark-ui/react/dialog");
|
172
171
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
173
|
-
var
|
174
|
-
function
|
172
|
+
var Content = (0, import_react4.forwardRef)(
|
173
|
+
function DialogContent(props, ref) {
|
175
174
|
const {
|
176
175
|
children,
|
177
176
|
portalled = true,
|
@@ -185,19 +184,20 @@ var DialogContent = (0, import_react4.forwardRef)(
|
|
185
184
|
] });
|
186
185
|
}
|
187
186
|
);
|
188
|
-
var
|
187
|
+
var CloseButton3 = (0, import_react4.forwardRef)(function DialogCloseTrigger(props, ref) {
|
189
188
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Dialog.CloseTrigger, { position: "absolute", ...props, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CloseButton, { size: "sm", ref, children: props.children }) });
|
190
189
|
});
|
191
|
-
var
|
192
|
-
var
|
193
|
-
var
|
194
|
-
var
|
195
|
-
var
|
196
|
-
var
|
197
|
-
var
|
198
|
-
var
|
199
|
-
var
|
200
|
-
var
|
190
|
+
var CloseTrigger = import_react5.Dialog.CloseTrigger;
|
191
|
+
var Root = import_react5.Dialog.Root;
|
192
|
+
var Context = import_react5.Dialog.Context;
|
193
|
+
var Footer = import_react5.Dialog.Footer;
|
194
|
+
var Header = import_react5.Dialog.Header;
|
195
|
+
var Body = import_react5.Dialog.Body;
|
196
|
+
var Backdrop = import_react5.Dialog.Backdrop;
|
197
|
+
var Title = import_react5.Dialog.Title;
|
198
|
+
var Description = import_react5.Dialog.Description;
|
199
|
+
var Trigger = import_react5.Dialog.Trigger;
|
200
|
+
var ActionTrigger = import_react5.Dialog.ActionTrigger;
|
201
201
|
// Annotate the CommonJS export names for ESM import in node:
|
202
202
|
0 && (module.exports = {
|
203
203
|
Dialog
|