@saas-ui/react 3.0.0-alpha.6 → 3.0.0-alpha.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/chunk-7VSTNV2B.js +53 -0
  3. package/dist/{chunk-ZWSZQZ5G.js → chunk-CB52LBJK.js} +1 -3
  4. package/dist/{chunk-F3CVOMG5.js → chunk-CD2JUFI2.js} +81 -10
  5. package/dist/{chunk-GEPWRHHH.js → chunk-H6TFEHY4.js} +1 -3
  6. package/dist/chunk-IFYV7NUJ.js +326 -0
  7. package/dist/{chunk-VF3BV2BY.js → chunk-JGHXJ3PI.js} +22 -7
  8. package/dist/chunk-SKXSBAOS.js +35 -0
  9. package/dist/{chunk-7C3IZBNJ.js → chunk-TT4C5VXB.js} +4 -6
  10. package/dist/components/{breadcrumbs → breadcrumb}/index.cjs +8 -10
  11. package/dist/components/{breadcrumbs → breadcrumb}/index.d.cts +3 -4
  12. package/dist/components/{breadcrumbs → breadcrumb}/index.d.ts +3 -4
  13. package/dist/components/breadcrumb/index.js +8 -0
  14. package/dist/components/dialog/index.cjs +19 -58
  15. package/dist/components/dialog/index.js +1 -2
  16. package/dist/components/drawer/index.cjs +23 -64
  17. package/dist/components/drawer/index.js +1 -2
  18. package/dist/components/loading-overlay/index.cjs +16 -1868
  19. package/dist/components/loading-overlay/index.js +1 -1
  20. package/dist/components/menu/index.cjs +165 -179
  21. package/dist/components/menu/index.d.cts +11 -2
  22. package/dist/components/menu/index.d.ts +11 -2
  23. package/dist/components/menu/index.js +4 -2
  24. package/dist/components/password-input/index.js +1 -2
  25. package/dist/components/segmented-control/index.cjs +58 -0
  26. package/dist/components/segmented-control/index.d.cts +13 -1
  27. package/dist/components/segmented-control/index.d.ts +13 -1
  28. package/dist/components/segmented-control/index.js +7 -1
  29. package/dist/index.cjs +1007 -2653
  30. package/dist/index.d.cts +2 -1
  31. package/dist/index.d.ts +2 -1
  32. package/dist/index.js +278 -393
  33. package/dist/theme/tokens/colors.cjs +349 -0
  34. package/dist/theme/tokens/colors.d.cts +856 -0
  35. package/dist/theme/tokens/colors.d.ts +856 -0
  36. package/dist/theme/tokens/colors.js +8 -0
  37. package/package.json +9 -2
  38. package/dist/chunk-CTOVNZVS.js +0 -1
  39. package/dist/chunk-QMG6HP7Z.js +0 -87
  40. package/dist/chunk-VBIVLREP.js +0 -45
  41. package/dist/chunk-YWJZWB6I.js +0 -1892
  42. package/dist/components/breadcrumbs/index.js +0 -8
@@ -18,23 +18,21 @@ var __copyProps = (to, from, except, desc) => {
18
18
  };
19
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
20
 
21
- // src/components/breadcrumbs/index.ts
22
- var breadcrumbs_exports = {};
23
- __export(breadcrumbs_exports, {
24
- Breadcrumb: () => namespace_exports
21
+ // src/components/breadcrumb/index.ts
22
+ var breadcrumb_exports2 = {};
23
+ __export(breadcrumb_exports2, {
24
+ Breadcrumb: () => breadcrumb_exports
25
25
  });
26
- module.exports = __toCommonJS(breadcrumbs_exports);
26
+ module.exports = __toCommonJS(breadcrumb_exports2);
27
27
 
28
- // src/components/breadcrumbs/namespace.ts
29
- var namespace_exports = {};
30
- __export(namespace_exports, {
28
+ // src/components/breadcrumb/breadcrumb.tsx
29
+ var breadcrumb_exports = {};
30
+ __export(breadcrumb_exports, {
31
31
  CurrentLink: () => BreadcrumbCurrentLink,
32
32
  Ellipsis: () => BreadcrumbEllipsis,
33
33
  Link: () => BreadcrumbLink,
34
34
  Root: () => BreadcrumbRoot
35
35
  });
36
-
37
- // src/components/breadcrumbs/breadcrumb.tsx
38
36
  var import_react = require("react");
39
37
  var import_react2 = require("@chakra-ui/react");
40
38
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -10,9 +10,8 @@ declare const BreadcrumbLink: react.ForwardRefExoticComponent<Breadcrumb.LinkPro
10
10
  declare const BreadcrumbCurrentLink: react.ForwardRefExoticComponent<Breadcrumb.CurrentLinkProps & react.RefAttributes<HTMLElement>>;
11
11
  declare const BreadcrumbEllipsis: react.ForwardRefExoticComponent<Breadcrumb.EllipsisProps & react.RefAttributes<HTMLElement>>;
12
12
 
13
- type namespace_BreadcrumbRootProps = BreadcrumbRootProps;
14
- declare namespace namespace {
15
- export { type namespace_BreadcrumbRootProps as BreadcrumbRootProps, BreadcrumbCurrentLink as CurrentLink, BreadcrumbEllipsis as Ellipsis, BreadcrumbLink as Link, BreadcrumbRoot as Root };
13
+ declare namespace breadcrumb {
14
+ export { BreadcrumbCurrentLink as CurrentLink, BreadcrumbEllipsis as Ellipsis, BreadcrumbLink as Link, BreadcrumbRoot as Root, type BreadcrumbRootProps as RootProps };
16
15
  }
17
16
 
18
- export { namespace as Breadcrumb };
17
+ export { breadcrumb as Breadcrumb };
@@ -10,9 +10,8 @@ declare const BreadcrumbLink: react.ForwardRefExoticComponent<Breadcrumb.LinkPro
10
10
  declare const BreadcrumbCurrentLink: react.ForwardRefExoticComponent<Breadcrumb.CurrentLinkProps & react.RefAttributes<HTMLElement>>;
11
11
  declare const BreadcrumbEllipsis: react.ForwardRefExoticComponent<Breadcrumb.EllipsisProps & react.RefAttributes<HTMLElement>>;
12
12
 
13
- type namespace_BreadcrumbRootProps = BreadcrumbRootProps;
14
- declare namespace namespace {
15
- export { type namespace_BreadcrumbRootProps as BreadcrumbRootProps, BreadcrumbCurrentLink as CurrentLink, BreadcrumbEllipsis as Ellipsis, BreadcrumbLink as Link, BreadcrumbRoot as Root };
13
+ declare namespace breadcrumb {
14
+ export { BreadcrumbCurrentLink as CurrentLink, BreadcrumbEllipsis as Ellipsis, BreadcrumbLink as Link, BreadcrumbRoot as Root, type BreadcrumbRootProps as RootProps };
16
15
  }
17
16
 
18
- export { namespace as Breadcrumb };
17
+ export { breadcrumb as Breadcrumb };
@@ -0,0 +1,8 @@
1
+ 'use client'
2
+ import {
3
+ breadcrumb_exports
4
+ } from "../../chunk-TT4C5VXB.js";
5
+ import "../../chunk-RTMS5TJN.js";
6
+ export {
7
+ breadcrumb_exports as Breadcrumb
8
+ };
@@ -33,7 +33,7 @@ __export(namespace_exports, {
33
33
  Body: () => DialogBody,
34
34
  CloseTrigger: () => DialogCloseTrigger,
35
35
  Content: () => DialogContent,
36
- Context: () => DialogContext,
36
+ Context: () => import_dialog.DialogContext,
37
37
  Description: () => DialogDescription,
38
38
  Footer: () => DialogFooter,
39
39
  Header: () => DialogHeader,
@@ -43,8 +43,8 @@ __export(namespace_exports, {
43
43
  });
44
44
 
45
45
  // src/components/dialog/dialog.tsx
46
- var import_react5 = require("react");
47
- var import_react6 = require("@chakra-ui/react");
46
+ var import_react4 = require("react");
47
+ var import_react5 = require("@chakra-ui/react");
48
48
 
49
49
  // src/components/close-button/close-button.tsx
50
50
  var import_react2 = require("react");
@@ -158,49 +158,10 @@ var CloseButton = (0, import_react2.forwardRef)(
158
158
  }
159
159
  );
160
160
 
161
- // ../../node_modules/@ark-ui/react/dist/utils/create-context.js
162
- var import_react4 = require("react");
163
- function getErrorMessage(hook, provider) {
164
- return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
165
- }
166
- function createContext(options = {}) {
167
- const {
168
- name,
169
- strict = true,
170
- hookName = "useContext",
171
- providerName = "Provider",
172
- errorMessage,
173
- defaultValue
174
- } = options;
175
- const Context = (0, import_react4.createContext)(defaultValue);
176
- Context.displayName = name;
177
- function useContext$1() {
178
- var _a;
179
- const context = (0, import_react4.useContext)(Context);
180
- if (!context && strict) {
181
- const error = new Error(errorMessage != null ? errorMessage : getErrorMessage(hookName, providerName));
182
- error.name = "ContextError";
183
- (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext$1);
184
- throw error;
185
- }
186
- return context;
187
- }
188
- return [Context.Provider, useContext$1, Context];
189
- }
190
-
191
- // ../../node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js
192
- var [DialogProvider, useDialogContext] = createContext({
193
- name: "DialogContext",
194
- hookName: "useDialogContext",
195
- providerName: "<DialogProvider />"
196
- });
197
-
198
- // ../../node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js
199
- var DialogContext = (props) => props.children(useDialogContext());
200
-
201
161
  // src/components/dialog/dialog.tsx
162
+ var import_dialog = require("@ark-ui/react/dialog");
202
163
  var import_jsx_runtime3 = require("react/jsx-runtime");
203
- var DialogContent = (0, import_react5.forwardRef)(
164
+ var DialogContent = (0, import_react4.forwardRef)(
204
165
  function DialogContent2(props, ref) {
205
166
  const {
206
167
  children,
@@ -209,15 +170,15 @@ var DialogContent = (0, import_react5.forwardRef)(
209
170
  backdrop = true,
210
171
  ...rest
211
172
  } = props;
212
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react6.Portal, { disabled: !portalled, container: portalRef, children: [
213
- backdrop && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Dialog.Backdrop, {}),
214
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Dialog.Content, { ref, ...rest, asChild: false, children }) })
173
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Portal, { disabled: !portalled, container: portalRef, children: [
174
+ backdrop && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Dialog.Backdrop, {}),
175
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Dialog.Content, { ref, ...rest, asChild: false, children }) })
215
176
  ] });
216
177
  }
217
178
  );
218
- var DialogCloseTrigger = (0, import_react5.forwardRef)(function DialogCloseTrigger2(props, ref) {
179
+ var DialogCloseTrigger = (0, import_react4.forwardRef)(function DialogCloseTrigger2(props, ref) {
219
180
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
220
- import_react6.Dialog.CloseTrigger,
181
+ import_react5.Dialog.CloseTrigger,
221
182
  {
222
183
  position: "absolute",
223
184
  top: "2",
@@ -228,15 +189,15 @@ var DialogCloseTrigger = (0, import_react5.forwardRef)(function DialogCloseTrigg
228
189
  }
229
190
  );
230
191
  });
231
- var DialogRoot = import_react6.Dialog.Root;
232
- var DialogFooter = import_react6.Dialog.Footer;
233
- var DialogHeader = import_react6.Dialog.Header;
234
- var DialogBody = import_react6.Dialog.Body;
235
- var DialogBackdrop = import_react6.Dialog.Backdrop;
236
- var DialogTitle = import_react6.Dialog.Title;
237
- var DialogDescription = import_react6.Dialog.Description;
238
- var DialogTrigger = import_react6.Dialog.Trigger;
239
- var DialogActionTrigger = import_react6.Dialog.ActionTrigger;
192
+ var DialogRoot = import_react5.Dialog.Root;
193
+ var DialogFooter = import_react5.Dialog.Footer;
194
+ var DialogHeader = import_react5.Dialog.Header;
195
+ var DialogBody = import_react5.Dialog.Body;
196
+ var DialogBackdrop = import_react5.Dialog.Backdrop;
197
+ var DialogTitle = import_react5.Dialog.Title;
198
+ var DialogDescription = import_react5.Dialog.Description;
199
+ var DialogTrigger = import_react5.Dialog.Trigger;
200
+ var DialogActionTrigger = import_react5.Dialog.ActionTrigger;
240
201
  // Annotate the CommonJS export names for ESM import in node:
241
202
  0 && (module.exports = {
242
203
  Dialog
@@ -1,8 +1,7 @@
1
1
  'use client'
2
2
  import {
3
3
  namespace_exports
4
- } from "../../chunk-ZWSZQZ5G.js";
5
- import "../../chunk-VBIVLREP.js";
4
+ } from "../../chunk-CB52LBJK.js";
6
5
  import "../../chunk-FZW2DYK3.js";
7
6
  import "../../chunk-VDXTEASE.js";
8
7
  import "../../chunk-RTMS5TJN.js";
@@ -43,59 +43,18 @@ __export(namespace_exports, {
43
43
  });
44
44
 
45
45
  // src/components/drawer/drawer.tsx
46
- var import_react5 = require("react");
47
-
48
- // ../../node_modules/@ark-ui/react/dist/utils/create-context.js
49
- var import_react = require("react");
50
- function getErrorMessage(hook, provider) {
51
- return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
52
- }
53
- function createContext(options = {}) {
54
- const {
55
- name,
56
- strict = true,
57
- hookName = "useContext",
58
- providerName = "Provider",
59
- errorMessage,
60
- defaultValue
61
- } = options;
62
- const Context = (0, import_react.createContext)(defaultValue);
63
- Context.displayName = name;
64
- function useContext$1() {
65
- var _a;
66
- const context = (0, import_react.useContext)(Context);
67
- if (!context && strict) {
68
- const error = new Error(errorMessage != null ? errorMessage : getErrorMessage(hookName, providerName));
69
- error.name = "ContextError";
70
- (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext$1);
71
- throw error;
72
- }
73
- return context;
74
- }
75
- return [Context.Provider, useContext$1, Context];
76
- }
77
-
78
- // ../../node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js
79
- var [DialogProvider, useDialogContext] = createContext({
80
- name: "DialogContext",
81
- hookName: "useDialogContext",
82
- providerName: "<DialogProvider />"
83
- });
84
-
85
- // ../../node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js
86
- var DialogContext = (props) => props.children(useDialogContext());
87
-
88
- // src/components/drawer/drawer.tsx
89
- var import_react6 = require("@chakra-ui/react");
46
+ var import_react4 = require("react");
47
+ var import_dialog = require("@ark-ui/react/dialog");
48
+ var import_react5 = require("@chakra-ui/react");
90
49
 
91
50
  // src/components/close-button/close-button.tsx
92
- var import_react3 = require("react");
93
- var import_react4 = require("@chakra-ui/react");
51
+ var import_react2 = require("react");
52
+ var import_react3 = require("@chakra-ui/react");
94
53
 
95
54
  // src/components/icons/create-icon.tsx
96
- var import_react2 = require("@chakra-ui/react");
55
+ var import_react = require("@chakra-ui/react");
97
56
  var createIcon = (props) => {
98
- return (0, import_react2.createIcon)({
57
+ return (0, import_react.createIcon)({
99
58
  viewBox: "0 0 24 24",
100
59
  defaultProps: {
101
60
  fill: "none",
@@ -193,24 +152,24 @@ var CheckIcon = createIcon({
193
152
 
194
153
  // src/components/close-button/close-button.tsx
195
154
  var import_jsx_runtime2 = require("react/jsx-runtime");
196
- var CloseButton = (0, import_react3.forwardRef)(
155
+ var CloseButton = (0, import_react2.forwardRef)(
197
156
  function CloseButton2(props, ref) {
198
157
  var _a;
199
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react4.IconButton, { variant: "ghost", "aria-label": "Close", ref, ...props, children: (_a = props.children) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CloseIcon, {}) });
158
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.IconButton, { variant: "ghost", "aria-label": "Close", ref, ...props, children: (_a = props.children) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CloseIcon, {}) });
200
159
  }
201
160
  );
202
161
 
203
162
  // src/components/drawer/drawer.tsx
204
163
  var import_jsx_runtime3 = require("react/jsx-runtime");
205
- var DrawerContent = (0, import_react5.forwardRef)(
164
+ var DrawerContent = (0, import_react4.forwardRef)(
206
165
  function DrawerContent2(props, ref) {
207
166
  const { children, portalled = true, portalRef, offset, ...rest } = props;
208
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Drawer.Positioner, { padding: offset, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Drawer.Content, { ref, ...rest, asChild: false, children }) }) });
167
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Drawer.Positioner, { padding: offset, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Drawer.Content, { ref, ...rest, asChild: false, children }) }) });
209
168
  }
210
169
  );
211
- var DrawerCloseTrigger = (0, import_react5.forwardRef)(function DrawerCloseTrigger2(props, ref) {
170
+ var DrawerCloseTrigger = (0, import_react4.forwardRef)(function DrawerCloseTrigger2(props, ref) {
212
171
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
213
- import_react6.Drawer.CloseTrigger,
172
+ import_react5.Drawer.CloseTrigger,
214
173
  {
215
174
  position: "absolute",
216
175
  top: "2",
@@ -221,16 +180,16 @@ var DrawerCloseTrigger = (0, import_react5.forwardRef)(function DrawerCloseTrigg
221
180
  }
222
181
  );
223
182
  });
224
- var DrawerTrigger = import_react6.Drawer.Trigger;
225
- var DrawerRoot = import_react6.Drawer.Root;
226
- var DrawerFooter = import_react6.Drawer.Footer;
227
- var DrawerHeader = import_react6.Drawer.Header;
228
- var DrawerBody = import_react6.Drawer.Body;
229
- var DrawerBackdrop = import_react6.Drawer.Backdrop;
230
- var DrawerDescription = import_react6.Drawer.Description;
231
- var DrawerTitle = import_react6.Drawer.Title;
232
- var DrawerActionTrigger = import_react6.Drawer.ActionTrigger;
233
- var DrawerContext = DialogContext;
183
+ var DrawerTrigger = import_react5.Drawer.Trigger;
184
+ var DrawerRoot = import_react5.Drawer.Root;
185
+ var DrawerFooter = import_react5.Drawer.Footer;
186
+ var DrawerHeader = import_react5.Drawer.Header;
187
+ var DrawerBody = import_react5.Drawer.Body;
188
+ var DrawerBackdrop = import_react5.Drawer.Backdrop;
189
+ var DrawerDescription = import_react5.Drawer.Description;
190
+ var DrawerTitle = import_react5.Drawer.Title;
191
+ var DrawerActionTrigger = import_react5.Drawer.ActionTrigger;
192
+ var DrawerContext = import_dialog.DialogContext;
234
193
  // Annotate the CommonJS export names for ESM import in node:
235
194
  0 && (module.exports = {
236
195
  Drawer
@@ -1,8 +1,7 @@
1
1
  'use client'
2
2
  import {
3
3
  namespace_exports
4
- } from "../../chunk-GEPWRHHH.js";
5
- import "../../chunk-VBIVLREP.js";
4
+ } from "../../chunk-H6TFEHY4.js";
6
5
  import "../../chunk-FZW2DYK3.js";
7
6
  import "../../chunk-VDXTEASE.js";
8
7
  import "../../chunk-RTMS5TJN.js";