@saas-ui/react 3.0.0-alpha.3 → 3.0.0-alpha.30
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 +402 -1
- package/dist/chunk-2EUACKRH.js +26 -0
- package/dist/chunk-32DD6PHF.js +63 -0
- package/dist/chunk-3JZ42NYM.js +100 -0
- package/dist/chunk-3MO37LYW.js +326 -0
- package/dist/chunk-46ISJZBS.js +119 -0
- package/dist/{chunk-VDXTEASE.js → chunk-4TPVIHNO.js} +10 -1
- package/dist/chunk-52XM5VXJ.js +9 -0
- package/dist/chunk-6ZNR6N2K.js +45 -0
- package/dist/chunk-7VSTNV2B.js +53 -0
- package/dist/chunk-GRUMUCSL.js +109 -0
- package/dist/chunk-GWC5GCMW.js +177 -0
- package/dist/chunk-I2RXEKTB.js +38 -0
- package/dist/chunk-IEWHAXXU.js +28 -0
- package/dist/chunk-INV6RT5B.js +8 -0
- package/dist/chunk-IVLUAUU5.js +10 -0
- package/dist/chunk-JMYI6YXR.js +1 -0
- package/dist/chunk-JO4WJVYO.js +43 -0
- package/dist/chunk-K2SPPLAY.js +231 -0
- package/dist/chunk-KE5AC3TZ.js +63 -0
- package/dist/chunk-KFXNVUEZ.js +102 -0
- package/dist/chunk-L356FPLY.js +20 -0
- package/dist/chunk-LTVFG6UC.js +54 -0
- package/dist/chunk-MLJN6IOJ.js +96 -0
- package/dist/chunk-MS2ELLDY.js +26 -0
- package/dist/chunk-NGGISORT.js +29 -0
- package/dist/chunk-NGSHWY7E.js +27 -0
- package/dist/chunk-NSD5HRIP.js +46 -0
- package/dist/chunk-Q6SNJJO2.js +63 -0
- package/dist/chunk-QSNSWCTM.js +32 -0
- package/dist/chunk-RLIAFHVM.js +66 -0
- package/dist/chunk-S5J6REMC.js +40 -0
- package/dist/chunk-SA3OGTOO.js +23 -0
- package/dist/chunk-SKXSBAOS.js +35 -0
- package/dist/{components/breadcrumbs/index.js → chunk-TT4C5VXB.js} +6 -7
- package/dist/chunk-TZBAM4AD.js +20 -0
- package/dist/chunk-U23VDAWJ.js +143 -0
- package/dist/chunk-UASXI64E.js +34 -0
- package/dist/chunk-VZG7EJ64.js +70 -0
- package/dist/chunk-WYLMBMAH.js +22 -0
- package/dist/chunk-YHQ5JGCC.js +1 -0
- package/dist/chunk-YKSY7UOM.js +20 -0
- package/dist/{chunk-FZW2DYK3.js → chunk-YXGJOOMM.js} +1 -1
- package/dist/components/app-shell/index.cjs +1 -1
- package/dist/components/app-shell/index.d.cts +1 -1
- package/dist/components/app-shell/index.d.ts +1 -1
- package/dist/components/app-shell/index.js +3 -40
- package/dist/components/avatar/index.cjs +69 -0
- package/dist/components/avatar/index.d.cts +18 -0
- package/dist/components/avatar/index.d.ts +18 -0
- package/dist/components/avatar/index.js +11 -0
- package/dist/components/badge/index.cjs +31 -0
- package/dist/components/badge/index.d.cts +3 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +8 -0
- package/dist/components/{breadcrumbs → breadcrumb}/index.cjs +8 -10
- package/dist/components/{breadcrumbs → breadcrumb}/index.d.cts +3 -4
- package/dist/components/{breadcrumbs → breadcrumb}/index.d.ts +3 -4
- package/dist/components/breadcrumb/index.js +8 -0
- package/dist/components/button/index.cjs +8 -26
- package/dist/components/button/index.js +3 -40
- package/dist/components/card/index.cjs +31 -0
- package/dist/components/card/index.d.cts +1 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.js +8 -0
- package/dist/components/checkbox/index.js +3 -15
- package/dist/components/close-button/index.cjs +8 -0
- package/dist/components/close-button/index.js +3 -2
- package/dist/components/command/index.cjs +13 -13
- package/dist/components/command/index.d.cts +28 -2
- package/dist/components/command/index.d.ts +28 -2
- package/dist/components/command/index.js +3 -28
- 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 +51 -90
- package/dist/components/dialog/index.d.cts +35 -16
- package/dist/components/dialog/index.d.ts +35 -16
- package/dist/components/dialog/index.js +7 -69
- package/dist/components/drawer/index.cjs +55 -97
- package/dist/components/drawer/index.d.cts +34 -18
- package/dist/components/drawer/index.d.ts +34 -18
- package/dist/components/drawer/index.js +7 -61
- package/dist/components/empty-state/index.cjs +50 -0
- package/dist/components/empty-state/index.d.cts +11 -0
- package/dist/components/empty-state/index.d.ts +11 -0
- package/dist/components/empty-state/index.js +8 -0
- 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.cjs +68 -0
- package/dist/components/grid-list/index.d.cts +84 -0
- package/dist/components/grid-list/index.d.ts +84 -0
- package/dist/components/grid-list/index.js +8 -0
- package/dist/components/icon-badge/index.cjs +1 -1
- package/dist/components/icon-badge/index.d.cts +1 -1
- package/dist/components/icon-badge/index.d.ts +1 -1
- package/dist/components/icon-badge/index.js +3 -33
- package/dist/components/icon-button/index.cjs +67 -0
- package/dist/components/icon-button/index.d.cts +9 -0
- package/dist/components/icon-button/index.d.ts +9 -0
- package/dist/components/icon-button/index.js +9 -0
- package/dist/components/icons/index.cjs +10 -0
- package/dist/components/icons/index.d.cts +2 -1
- package/dist/components/icons/index.d.ts +2 -1
- package/dist/components/icons/index.js +3 -1
- package/dist/components/link/index.js +3 -14
- package/dist/components/loading-overlay/index.cjs +42 -1879
- package/dist/components/loading-overlay/index.d.cts +19 -6
- package/dist/components/loading-overlay/index.d.ts +19 -6
- package/dist/components/loading-overlay/index.js +7 -1874
- package/dist/components/menu/index.cjs +239 -0
- package/dist/components/menu/index.d.cts +39 -0
- package/dist/components/menu/index.d.ts +39 -0
- package/dist/components/menu/index.js +11 -0
- package/dist/components/navbar/index.cjs +61 -15
- package/dist/components/navbar/index.d.cts +12 -9
- package/dist/components/navbar/index.d.ts +12 -9
- package/dist/components/navbar/index.js +5 -38
- package/dist/components/number-input/index.cjs +9 -1
- package/dist/components/number-input/index.js +3 -26
- package/dist/components/pagination/index.cjs +215 -0
- package/dist/components/pagination/index.d.cts +41 -0
- package/dist/components/pagination/index.d.ts +41 -0
- package/dist/components/pagination/index.js +9 -0
- package/dist/components/password-input/index.cjs +2 -2
- package/dist/components/password-input/index.js +3 -225
- package/dist/components/persona/index.cjs +101 -36
- package/dist/components/persona/index.d.cts +131 -5
- package/dist/components/persona/index.d.ts +131 -5
- package/dist/components/persona/index.js +8 -144
- package/dist/components/pin-input/index.js +3 -21
- 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/radio/index.js +4 -16
- package/dist/components/search-input/index.cjs +8 -0
- package/dist/components/search-input/index.js +4 -114
- package/dist/components/segmented-control/index.cjs +60 -0
- package/dist/components/segmented-control/index.d.cts +14 -0
- package/dist/components/segmented-control/index.d.ts +14 -0
- package/dist/components/segmented-control/index.js +8 -0
- package/dist/components/select/index.cjs +8 -0
- package/dist/components/select/index.js +6 -95
- package/dist/components/sidebar/index.cjs +66 -32
- package/dist/components/sidebar/index.d.cts +30 -25
- package/dist/components/sidebar/index.d.ts +30 -25
- package/dist/components/sidebar/index.js +7 -101
- package/dist/components/status/index.cjs +45 -0
- package/dist/components/status/index.d.cts +17 -0
- package/dist/components/status/index.d.ts +17 -0
- package/dist/components/status/index.js +8 -0
- package/dist/components/steps/index.cjs +17 -10
- package/dist/components/steps/index.d.cts +4 -4
- package/dist/components/steps/index.d.ts +4 -4
- package/dist/components/steps/index.js +6 -67
- package/dist/components/switch/index.js +3 -18
- 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/tag/index.cjs +53 -0
- package/dist/components/tag/index.d.cts +12 -0
- package/dist/components/tag/index.d.ts +12 -0
- package/dist/components/tag/index.js +8 -0
- package/dist/components/toaster/index.cjs +204 -0
- package/dist/components/toaster/index.d.cts +11 -0
- package/dist/components/toaster/index.d.ts +11 -0
- package/dist/components/toaster/index.js +12 -0
- package/dist/components/tooltip/index.cjs +57 -0
- package/dist/components/tooltip/index.d.cts +14 -0
- package/dist/components/tooltip/index.d.ts +14 -0
- package/dist/components/tooltip/index.js +8 -0
- package/dist/index.cjs +8277 -5428
- package/dist/index.d.cts +47 -2
- package/dist/index.d.ts +47 -2
- package/dist/index.js +5416 -4732
- package/dist/theme/tokens/colors.cjs +349 -0
- package/dist/theme/tokens/colors.d.cts +856 -0
- package/dist/theme/tokens/colors.d.ts +856 -0
- package/dist/theme/tokens/colors.js +8 -0
- package/dist/types-DnFoUudY.d.cts +10 -0
- package/dist/types-DnFoUudY.d.ts +10 -0
- package/package.json +11 -4
- package/dist/chunk-VBIVLREP.js +0 -45
- /package/dist/{chunk-KHRLZUV4.js → chunk-O2WVT2BP.js} +0 -0
@@ -0,0 +1,102 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
CheckIcon,
|
4
|
+
ChevronRightIcon
|
5
|
+
} from "./chunk-4TPVIHNO.js";
|
6
|
+
import {
|
7
|
+
Button
|
8
|
+
} from "./chunk-NGSHWY7E.js";
|
9
|
+
import {
|
10
|
+
__export
|
11
|
+
} from "./chunk-RTMS5TJN.js";
|
12
|
+
|
13
|
+
// src/components/menu/menu.tsx
|
14
|
+
var menu_exports = {};
|
15
|
+
__export(menu_exports, {
|
16
|
+
Arrow: () => MenuArrow,
|
17
|
+
Button: () => MenuButton,
|
18
|
+
CheckboxItem: () => MenuCheckboxItem,
|
19
|
+
Content: () => MenuContent,
|
20
|
+
Context: () => MenuContext,
|
21
|
+
ContextTrigger: () => MenuContextTrigger,
|
22
|
+
Item: () => MenuItem,
|
23
|
+
ItemCommand: () => MenuItemCommand,
|
24
|
+
ItemGroup: () => MenuItemGroup,
|
25
|
+
ItemText: () => MenuItemText,
|
26
|
+
RadioItem: () => MenuRadioItem,
|
27
|
+
RadioItemGroup: () => MenuRadioItemGroup,
|
28
|
+
Root: () => MenuRoot,
|
29
|
+
Separator: () => MenuSeparator,
|
30
|
+
Trigger: () => MenuTrigger,
|
31
|
+
TriggerItem: () => MenuTriggerItem
|
32
|
+
});
|
33
|
+
import { forwardRef } from "react";
|
34
|
+
import {
|
35
|
+
AbsoluteCenter,
|
36
|
+
Menu as ChakraMenu,
|
37
|
+
Portal
|
38
|
+
} from "@chakra-ui/react";
|
39
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
40
|
+
var MenuContent = forwardRef(
|
41
|
+
function MenuContent2(props, ref) {
|
42
|
+
const { portalled = true, portalRef, ...rest } = props;
|
43
|
+
return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(ChakraMenu.Positioner, { children: /* @__PURE__ */ jsx(ChakraMenu.Content, { ref, ...rest }) }) });
|
44
|
+
}
|
45
|
+
);
|
46
|
+
var MenuArrow = forwardRef(
|
47
|
+
function MenuArrow2(props, ref) {
|
48
|
+
return /* @__PURE__ */ jsx(ChakraMenu.Arrow, { ref, ...props, children: /* @__PURE__ */ jsx(ChakraMenu.ArrowTip, {}) });
|
49
|
+
}
|
50
|
+
);
|
51
|
+
var MenuCheckboxItem = forwardRef(function MenuCheckboxItem2(props, ref) {
|
52
|
+
return /* @__PURE__ */ jsxs(ChakraMenu.CheckboxItem, { ref, ...props, children: [
|
53
|
+
/* @__PURE__ */ jsx(ChakraMenu.ItemIndicator, { hidden: false, children: /* @__PURE__ */ jsx(CheckIcon, {}) }),
|
54
|
+
props.children
|
55
|
+
] });
|
56
|
+
});
|
57
|
+
var MenuRadioItem = forwardRef(
|
58
|
+
function MenuRadioItem2(props, ref) {
|
59
|
+
const { children, ...rest } = props;
|
60
|
+
return /* @__PURE__ */ jsxs(ChakraMenu.RadioItem, { ps: "8", ref, ...rest, children: [
|
61
|
+
/* @__PURE__ */ jsx(AbsoluteCenter, { axis: "horizontal", left: "4", asChild: true, children: /* @__PURE__ */ jsx(ChakraMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) }) }),
|
62
|
+
/* @__PURE__ */ jsx(ChakraMenu.ItemText, { children })
|
63
|
+
] });
|
64
|
+
}
|
65
|
+
);
|
66
|
+
var MenuItemGroup = forwardRef(
|
67
|
+
function MenuItemGroup2(props, ref) {
|
68
|
+
const { title, children, ...rest } = props;
|
69
|
+
return /* @__PURE__ */ jsxs(ChakraMenu.ItemGroup, { ref, ...rest, children: [
|
70
|
+
title && /* @__PURE__ */ jsx(ChakraMenu.ItemGroupLabel, { userSelect: "none", children: title }),
|
71
|
+
children
|
72
|
+
] });
|
73
|
+
}
|
74
|
+
);
|
75
|
+
var MenuTriggerItem = forwardRef(
|
76
|
+
function MenuTriggerItem2(props, ref) {
|
77
|
+
const { startIcon, children, ...rest } = props;
|
78
|
+
return /* @__PURE__ */ jsxs(ChakraMenu.TriggerItem, { ref, ...rest, children: [
|
79
|
+
startIcon,
|
80
|
+
children,
|
81
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
82
|
+
] });
|
83
|
+
}
|
84
|
+
);
|
85
|
+
var MenuButton = forwardRef(
|
86
|
+
function MenuButton2(props, ref) {
|
87
|
+
return /* @__PURE__ */ jsx(MenuTrigger, { ref, asChild: true, children: /* @__PURE__ */ jsx(Button, { ...props }) });
|
88
|
+
}
|
89
|
+
);
|
90
|
+
var MenuRadioItemGroup = ChakraMenu.RadioItemGroup;
|
91
|
+
var MenuContextTrigger = ChakraMenu.ContextTrigger;
|
92
|
+
var MenuRoot = ChakraMenu.Root;
|
93
|
+
var MenuSeparator = ChakraMenu.Separator;
|
94
|
+
var MenuContext = ChakraMenu.Context;
|
95
|
+
var MenuItem = ChakraMenu.Item;
|
96
|
+
var MenuItemText = ChakraMenu.ItemText;
|
97
|
+
var MenuItemCommand = ChakraMenu.ItemCommand;
|
98
|
+
var MenuTrigger = ChakraMenu.Trigger;
|
99
|
+
|
100
|
+
export {
|
101
|
+
menu_exports
|
102
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/checkbox/checkbox.tsx
|
4
|
+
import { forwardRef } from "react";
|
5
|
+
import { Checkbox as ChakraCheckbox } from "@chakra-ui/react";
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
7
|
+
var Checkbox = forwardRef(
|
8
|
+
function Checkbox2(props, ref) {
|
9
|
+
const { icon, children, inputProps, rootRef, ...rest } = props;
|
10
|
+
return /* @__PURE__ */ jsxs(ChakraCheckbox.Root, { ref: rootRef, ...rest, children: [
|
11
|
+
/* @__PURE__ */ jsx(ChakraCheckbox.HiddenInput, { ref, ...inputProps }),
|
12
|
+
/* @__PURE__ */ jsx(ChakraCheckbox.Control, { children: icon || /* @__PURE__ */ jsx(ChakraCheckbox.Indicator, {}) }),
|
13
|
+
children != null && /* @__PURE__ */ jsx(ChakraCheckbox.Label, { children })
|
14
|
+
] });
|
15
|
+
}
|
16
|
+
);
|
17
|
+
|
18
|
+
export {
|
19
|
+
Checkbox
|
20
|
+
};
|
@@ -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, { ...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,96 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
ChevronLeftIcon,
|
4
|
+
ChevronRightIcon,
|
5
|
+
EllipsisIcon
|
6
|
+
} from "./chunk-4TPVIHNO.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-RTMS5TJN.js";
|
10
|
+
|
11
|
+
// src/components/pagination/pagination.tsx
|
12
|
+
var pagination_exports = {};
|
13
|
+
__export(pagination_exports, {
|
14
|
+
Context: () => Context,
|
15
|
+
Ellipsis: () => Ellipsis,
|
16
|
+
Item: () => Item,
|
17
|
+
Items: () => Items,
|
18
|
+
NextButton: () => NextButton,
|
19
|
+
NextTrigger: () => NextTrigger,
|
20
|
+
PageText: () => PageText,
|
21
|
+
PrevButton: () => PrevButton,
|
22
|
+
PrevTrigger: () => PrevTrigger,
|
23
|
+
Root: () => Root
|
24
|
+
});
|
25
|
+
import { forwardRef, useMemo } from "react";
|
26
|
+
import {
|
27
|
+
Button,
|
28
|
+
Pagination as ChakraPagination,
|
29
|
+
IconButton,
|
30
|
+
Text,
|
31
|
+
createContext,
|
32
|
+
usePaginationContext
|
33
|
+
} from "@chakra-ui/react";
|
34
|
+
import { jsx } from "react/jsx-runtime";
|
35
|
+
var [RootPropsProvider, useRootProps] = createContext({
|
36
|
+
name: "RootPropsProvider"
|
37
|
+
});
|
38
|
+
var variantMap = {
|
39
|
+
outline: { default: "ghost", ellipsis: "plain", current: "outline" },
|
40
|
+
solid: { default: "outline", ellipsis: "outline", current: "solid" },
|
41
|
+
subtle: { default: "ghost", ellipsis: "plain", current: "subtle" }
|
42
|
+
};
|
43
|
+
var Root = forwardRef(
|
44
|
+
function PaginationRoot(props, ref) {
|
45
|
+
const { size = "sm", variant = "outline", ...rest } = props;
|
46
|
+
return /* @__PURE__ */ jsx(RootPropsProvider, { value: { size, variantMap: variantMap[variant] }, children: /* @__PURE__ */ jsx(ChakraPagination.Root, { ref, type: "button", ...rest }) });
|
47
|
+
}
|
48
|
+
);
|
49
|
+
var Ellipsis = forwardRef(function PaginationEllipsis(props, ref) {
|
50
|
+
var _a;
|
51
|
+
const { size, variantMap: variantMap2 } = useRootProps();
|
52
|
+
return /* @__PURE__ */ jsx(ChakraPagination.Ellipsis, { ref, ...props, asChild: true, children: /* @__PURE__ */ jsx(Button, { as: "span", variant: variantMap2.ellipsis, size, children: (_a = props.children) != null ? _a : /* @__PURE__ */ jsx(EllipsisIcon, {}) }) });
|
53
|
+
});
|
54
|
+
var Item = forwardRef(
|
55
|
+
function PaginationItem(props, ref) {
|
56
|
+
const { page } = usePaginationContext();
|
57
|
+
const { size, variantMap: variantMap2 } = useRootProps();
|
58
|
+
const current = page === props.value;
|
59
|
+
const variant = current ? variantMap2.current : variantMap2.default;
|
60
|
+
return /* @__PURE__ */ jsx(ChakraPagination.Item, { ref, ...props, asChild: true, children: /* @__PURE__ */ jsx(Button, { variant, size, children: props.value }) });
|
61
|
+
}
|
62
|
+
);
|
63
|
+
var PrevButton = forwardRef(function PaginationPrevTrigger(props, ref) {
|
64
|
+
var _a;
|
65
|
+
const { size, variantMap: variantMap2 } = useRootProps();
|
66
|
+
return /* @__PURE__ */ jsx(ChakraPagination.PrevTrigger, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx(IconButton, { variant: variantMap2.default, size, children: (_a = props.children) != null ? _a : /* @__PURE__ */ jsx(ChevronLeftIcon, {}) }) });
|
67
|
+
});
|
68
|
+
var NextButton = forwardRef(function PaginationNextTrigger(props, ref) {
|
69
|
+
var _a;
|
70
|
+
const { size, variantMap: variantMap2 } = useRootProps();
|
71
|
+
return /* @__PURE__ */ jsx(ChakraPagination.NextTrigger, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx(IconButton, { variant: variantMap2.default, size, children: (_a = props.children) != null ? _a : /* @__PURE__ */ jsx(ChevronRightIcon, {}) }) });
|
72
|
+
});
|
73
|
+
var Items = (props) => {
|
74
|
+
return /* @__PURE__ */ jsx(ChakraPagination.Context, { children: ({ pages }) => pages.map((page, index) => {
|
75
|
+
return page.type === "ellipsis" ? /* @__PURE__ */ jsx(Ellipsis, { index, ...props }, index) : /* @__PURE__ */ jsx(Item, { type: "page", value: page.value, ...props }, index);
|
76
|
+
}) });
|
77
|
+
};
|
78
|
+
var PageText = forwardRef(
|
79
|
+
function PaginationPageText(props, ref) {
|
80
|
+
const { format = "compact", ...rest } = props;
|
81
|
+
const { page, pages, pageRange, count } = usePaginationContext();
|
82
|
+
const content = useMemo(() => {
|
83
|
+
if (format === "short") return `${page} / ${pages.length}`;
|
84
|
+
if (format === "compact") return `${page} of ${pages.length}`;
|
85
|
+
return `${pageRange.start + 1} - ${pageRange.end} of ${count}`;
|
86
|
+
}, [format, page, pages.length, pageRange, count]);
|
87
|
+
return /* @__PURE__ */ jsx(Text, { fontWeight: "medium", ref, ...rest, children: content });
|
88
|
+
}
|
89
|
+
);
|
90
|
+
var PrevTrigger = ChakraPagination.PrevTrigger;
|
91
|
+
var NextTrigger = ChakraPagination.NextTrigger;
|
92
|
+
var Context = ChakraPagination.Context;
|
93
|
+
|
94
|
+
export {
|
95
|
+
pagination_exports
|
96
|
+
};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
Button
|
4
|
+
} from "./chunk-NGSHWY7E.js";
|
5
|
+
|
6
|
+
// src/components/icon-button/icon-button.tsx
|
7
|
+
import { forwardRef } from "react";
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
9
|
+
var IconButton = forwardRef(
|
10
|
+
function IconButton2(props, ref) {
|
11
|
+
return /* @__PURE__ */ jsx(
|
12
|
+
Button,
|
13
|
+
{
|
14
|
+
px: "0",
|
15
|
+
py: "0",
|
16
|
+
_icon: { fontSize: "1.2em" },
|
17
|
+
ref,
|
18
|
+
...props
|
19
|
+
}
|
20
|
+
);
|
21
|
+
}
|
22
|
+
);
|
23
|
+
|
24
|
+
export {
|
25
|
+
IconButton
|
26
|
+
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/empty-state/empty-state.tsx
|
4
|
+
import { forwardRef } from "react";
|
5
|
+
import {
|
6
|
+
Box,
|
7
|
+
EmptyState as ChakraEmptyState,
|
8
|
+
useEmptyStateStyles
|
9
|
+
} from "@chakra-ui/react";
|
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
|
+
};
|
15
|
+
var EmptyState = forwardRef(
|
16
|
+
function EmptyState2(props, ref) {
|
17
|
+
const { title, description, icon, children, ...rest } = props;
|
18
|
+
return /* @__PURE__ */ jsx(ChakraEmptyState.Root, { ref, ...rest, children: /* @__PURE__ */ jsxs(ChakraEmptyState.Content, { children: [
|
19
|
+
icon && /* @__PURE__ */ jsx(ChakraEmptyState.Indicator, { children: icon }),
|
20
|
+
/* @__PURE__ */ jsx(ChakraEmptyState.Title, { children: title }),
|
21
|
+
description ? /* @__PURE__ */ jsx(ChakraEmptyState.Description, { children: description }) : null,
|
22
|
+
/* @__PURE__ */ jsx(EmptyStateActions, { children })
|
23
|
+
] }) });
|
24
|
+
}
|
25
|
+
);
|
26
|
+
|
27
|
+
export {
|
28
|
+
EmptyState
|
29
|
+
};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/button/button.tsx
|
4
|
+
import { forwardRef } from "react";
|
5
|
+
import {
|
6
|
+
AbsoluteCenter,
|
7
|
+
Button as ButtonPrimitive,
|
8
|
+
Span,
|
9
|
+
Spinner
|
10
|
+
} from "@chakra-ui/react";
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
12
|
+
var Button = forwardRef(
|
13
|
+
function Button2(props, ref) {
|
14
|
+
const { loading, disabled, loadingText, children, ...rest } = props;
|
15
|
+
return /* @__PURE__ */ jsx(ButtonPrimitive, { disabled: loading || disabled, ref, ...rest, children: loading && !loadingText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
16
|
+
/* @__PURE__ */ jsx(AbsoluteCenter, { display: "inline-flex", children: /* @__PURE__ */ jsx(Spinner, { size: "inherit", color: "inherit" }) }),
|
17
|
+
/* @__PURE__ */ jsx(Span, { opacity: 0, children })
|
18
|
+
] }) : loading && loadingText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
19
|
+
/* @__PURE__ */ jsx(Spinner, { size: "inherit", color: "inherit" }),
|
20
|
+
loadingText
|
21
|
+
] }) : children });
|
22
|
+
}
|
23
|
+
);
|
24
|
+
|
25
|
+
export {
|
26
|
+
Button
|
27
|
+
};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
__export
|
4
|
+
} from "./chunk-RTMS5TJN.js";
|
5
|
+
|
6
|
+
// src/components/grid-list/grid-list.tsx
|
7
|
+
var grid_list_exports = {};
|
8
|
+
__export(grid_list_exports, {
|
9
|
+
Cell: () => GridListCell,
|
10
|
+
Header: () => GridListHeader,
|
11
|
+
Item: () => GridListItem,
|
12
|
+
Root: () => GridListRoot
|
13
|
+
});
|
14
|
+
import { GridList } from "@saas-ui/core/grid-list";
|
15
|
+
|
16
|
+
// src/components/grid-list/grid-list.context.ts
|
17
|
+
import { createSlotRecipeContext } from "@chakra-ui/react";
|
18
|
+
var {
|
19
|
+
withProvider,
|
20
|
+
withContext,
|
21
|
+
useStyles: useGridListStyles
|
22
|
+
} = createSlotRecipeContext({
|
23
|
+
key: "suiGridList"
|
24
|
+
});
|
25
|
+
|
26
|
+
// src/components/grid-list/grid-list.tsx
|
27
|
+
var GridListRoot = withProvider(
|
28
|
+
GridList.Root,
|
29
|
+
"root"
|
30
|
+
);
|
31
|
+
var GridListItem = withContext(
|
32
|
+
GridList.Item,
|
33
|
+
"item"
|
34
|
+
);
|
35
|
+
var GridListHeader = withContext(
|
36
|
+
GridList.Header,
|
37
|
+
"header"
|
38
|
+
);
|
39
|
+
var GridListCell = withContext(
|
40
|
+
GridList.Cell,
|
41
|
+
"cell"
|
42
|
+
);
|
43
|
+
|
44
|
+
export {
|
45
|
+
grid_list_exports
|
46
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
useLink
|
4
|
+
} from "./chunk-O2WVT2BP.js";
|
5
|
+
import {
|
6
|
+
__export
|
7
|
+
} from "./chunk-RTMS5TJN.js";
|
8
|
+
|
9
|
+
// src/components/navbar/navbar.tsx
|
10
|
+
var navbar_exports = {};
|
11
|
+
__export(navbar_exports, {
|
12
|
+
Brand: () => NavbarBrand,
|
13
|
+
Content: () => NavbarContent,
|
14
|
+
Item: () => NavbarItem,
|
15
|
+
Link: () => NavbarLink,
|
16
|
+
Root: () => NavbarRoot
|
17
|
+
});
|
18
|
+
import { forwardRef } from "react";
|
19
|
+
import { Navbar } from "@saas-ui/core/navbar";
|
20
|
+
|
21
|
+
// src/components/navbar/navbar.context.ts
|
22
|
+
import { createSlotRecipeContext } from "@chakra-ui/react";
|
23
|
+
var {
|
24
|
+
withProvider,
|
25
|
+
withContext,
|
26
|
+
useStyles: useNavbarStyles
|
27
|
+
} = createSlotRecipeContext({
|
28
|
+
key: "suiNavbar"
|
29
|
+
});
|
30
|
+
|
31
|
+
// src/components/navbar/navbar.tsx
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
33
|
+
var NavbarRoot = withProvider(
|
34
|
+
Navbar.Root,
|
35
|
+
"root"
|
36
|
+
);
|
37
|
+
var NavbarBrand = withContext(
|
38
|
+
Navbar.Brand,
|
39
|
+
"brand"
|
40
|
+
);
|
41
|
+
var NavbarContent = withContext(
|
42
|
+
Navbar.Content,
|
43
|
+
"content"
|
44
|
+
);
|
45
|
+
var NavbarItem = withContext(
|
46
|
+
Navbar.Item,
|
47
|
+
"item"
|
48
|
+
);
|
49
|
+
var NavbarLink = withContext(
|
50
|
+
forwardRef((props, ref) => {
|
51
|
+
const Link = useLink();
|
52
|
+
const { active, ...rest } = props;
|
53
|
+
return /* @__PURE__ */ jsx(Navbar.Link, { asChild: true, ...rest, ref, children: /* @__PURE__ */ jsx(Link, { "data-active": active ? "" : void 0, ...props }) });
|
54
|
+
}),
|
55
|
+
"link",
|
56
|
+
{
|
57
|
+
forwardAsChild: true
|
58
|
+
}
|
59
|
+
);
|
60
|
+
|
61
|
+
export {
|
62
|
+
navbar_exports
|
63
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/tooltip/tooltip.tsx
|
4
|
+
import { forwardRef } from "react";
|
5
|
+
import { Tooltip as ChakraTooltip, Portal } from "@chakra-ui/react";
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
7
|
+
var Tooltip = forwardRef(
|
8
|
+
function Tooltip2(props, ref) {
|
9
|
+
const {
|
10
|
+
showArrow,
|
11
|
+
children,
|
12
|
+
disabled,
|
13
|
+
portalled,
|
14
|
+
content,
|
15
|
+
contentProps,
|
16
|
+
portalRef,
|
17
|
+
...rest
|
18
|
+
} = props;
|
19
|
+
if (disabled) return children;
|
20
|
+
return /* @__PURE__ */ jsxs(ChakraTooltip.Root, { ...rest, children: [
|
21
|
+
/* @__PURE__ */ jsx(ChakraTooltip.Trigger, { asChild: true, children }),
|
22
|
+
/* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(ChakraTooltip.Positioner, { children: /* @__PURE__ */ jsxs(ChakraTooltip.Content, { ref, ...contentProps, children: [
|
23
|
+
showArrow && /* @__PURE__ */ jsx(ChakraTooltip.Arrow, { children: /* @__PURE__ */ jsx(ChakraTooltip.ArrowTip, {}) }),
|
24
|
+
content
|
25
|
+
] }) }) })
|
26
|
+
] });
|
27
|
+
}
|
28
|
+
);
|
29
|
+
|
30
|
+
export {
|
31
|
+
Tooltip
|
32
|
+
};
|
@@ -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,40 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
InputGroup
|
4
|
+
} from "./chunk-PKI6YH2V.js";
|
5
|
+
|
6
|
+
// src/components/number-input/number-input.tsx
|
7
|
+
import { forwardRef } from "react";
|
8
|
+
import { NumberInput as ChakraNumberInput } from "@chakra-ui/react";
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
10
|
+
var NumberInput = forwardRef(
|
11
|
+
function NumberInput2(props, ref) {
|
12
|
+
const {
|
13
|
+
hideControls,
|
14
|
+
startElement,
|
15
|
+
endElement,
|
16
|
+
inputProps,
|
17
|
+
rootRef,
|
18
|
+
...rest
|
19
|
+
} = props;
|
20
|
+
return /* @__PURE__ */ jsxs(ChakraNumberInput.Root, { ref: rootRef, ...rest, children: [
|
21
|
+
/* @__PURE__ */ jsx(
|
22
|
+
InputGroup,
|
23
|
+
{
|
24
|
+
startElement,
|
25
|
+
endElement,
|
26
|
+
width: "full",
|
27
|
+
children: /* @__PURE__ */ jsx(ChakraNumberInput.Input, { ref, ...inputProps })
|
28
|
+
}
|
29
|
+
),
|
30
|
+
!hideControls && !endElement ? /* @__PURE__ */ jsxs(ChakraNumberInput.Control, { children: [
|
31
|
+
/* @__PURE__ */ jsx(ChakraNumberInput.IncrementTrigger, {}),
|
32
|
+
/* @__PURE__ */ jsx(ChakraNumberInput.DecrementTrigger, {})
|
33
|
+
] }) : null
|
34
|
+
] });
|
35
|
+
}
|
36
|
+
);
|
37
|
+
|
38
|
+
export {
|
39
|
+
NumberInput
|
40
|
+
};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/switch/switch.tsx
|
4
|
+
import { Switch as ChakraSwitch } from "@chakra-ui/react";
|
5
|
+
import { forwardRef } from "react";
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
7
|
+
var Switch = forwardRef(
|
8
|
+
function Switch2(props, ref) {
|
9
|
+
const { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } = props;
|
10
|
+
return /* @__PURE__ */ jsxs(ChakraSwitch.Root, { ref: rootRef, ...rest, children: [
|
11
|
+
/* @__PURE__ */ jsx(ChakraSwitch.HiddenInput, { ref, ...inputProps }),
|
12
|
+
/* @__PURE__ */ jsxs(ChakraSwitch.Control, { children: [
|
13
|
+
/* @__PURE__ */ jsx(ChakraSwitch.Thumb, { children: thumbLabel && /* @__PURE__ */ jsx(ChakraSwitch.ThumbIndicator, { fallback: thumbLabel == null ? void 0 : thumbLabel.off, children: thumbLabel == null ? void 0 : thumbLabel.on }) }),
|
14
|
+
trackLabel && /* @__PURE__ */ jsx(ChakraSwitch.Indicator, { fallback: trackLabel.off, children: trackLabel.on })
|
15
|
+
] }),
|
16
|
+
children != null && /* @__PURE__ */ jsx(ChakraSwitch.Label, { children })
|
17
|
+
] });
|
18
|
+
}
|
19
|
+
);
|
20
|
+
|
21
|
+
export {
|
22
|
+
Switch
|
23
|
+
};
|
@@ -0,0 +1,35 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/segmented-control/segmented-control.tsx
|
4
|
+
import { forwardRef, useMemo } from "react";
|
5
|
+
import { For, SegmentGroup } from "@chakra-ui/react";
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
7
|
+
function normalize(items) {
|
8
|
+
return items.map((item) => {
|
9
|
+
if (typeof item === "string") return { value: item, label: item };
|
10
|
+
return item;
|
11
|
+
});
|
12
|
+
}
|
13
|
+
var SegmentedControl = forwardRef(function SegmentedControl2(props, ref) {
|
14
|
+
const { items, ...rest } = props;
|
15
|
+
const data = useMemo(() => normalize(items), [items]);
|
16
|
+
return /* @__PURE__ */ jsxs(SegmentGroup.Root, { ref, ...rest, children: [
|
17
|
+
/* @__PURE__ */ jsx(SegmentGroup.Indicator, {}),
|
18
|
+
/* @__PURE__ */ jsx(For, { each: data, children: (item) => /* @__PURE__ */ jsxs(
|
19
|
+
SegmentGroup.Item,
|
20
|
+
{
|
21
|
+
value: item.value,
|
22
|
+
disabled: item.disabled,
|
23
|
+
children: [
|
24
|
+
/* @__PURE__ */ jsx(SegmentGroup.ItemText, { children: item.label }),
|
25
|
+
/* @__PURE__ */ jsx(SegmentGroup.ItemHiddenInput, {})
|
26
|
+
]
|
27
|
+
},
|
28
|
+
item.value
|
29
|
+
) })
|
30
|
+
] });
|
31
|
+
});
|
32
|
+
|
33
|
+
export {
|
34
|
+
SegmentedControl
|
35
|
+
};
|