@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
@@ -0,0 +1,8 @@
1
+ 'use client'
2
+ import {
3
+ colors
4
+ } from "../../chunk-IFYV7NUJ.js";
5
+ import "../../chunk-RTMS5TJN.js";
6
+ export {
7
+ colors
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saas-ui/react",
3
- "version": "3.0.0-alpha.6",
3
+ "version": "3.0.0-alpha.8",
4
4
  "description": "Saas UI - The React component library for startups.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -10,6 +10,12 @@
10
10
  "require": "./dist/index.cjs",
11
11
  "import": "./dist/index.js"
12
12
  },
13
+ "./theme/colors": {
14
+ "sui": "./src/theme/tokens/colors.ts",
15
+ "types": "./dist/theme/tokens/colors.d.ts",
16
+ "require": "./dist/theme/tokens/colors.cjs",
17
+ "import": "./dist/theme/tokens/colors.js"
18
+ },
13
19
  "./*": {
14
20
  "sui": "./src/components/*/index.ts",
15
21
  "types": "./dist/components/*/index.d.ts",
@@ -63,11 +69,12 @@
63
69
  "url": "https://storybook.saas-ui.dev"
64
70
  },
65
71
  "dependencies": {
72
+ "@ark-ui/react": "^4.4.4",
66
73
  "@saas-ui/core": "3.0.0-alpha.4",
67
74
  "@saas-ui/hooks": "3.0.0-alpha.4"
68
75
  },
69
76
  "peerDependencies": {
70
- "@chakra-ui/react": "^3.2.1",
77
+ "@chakra-ui/react": "^3.2.2",
71
78
  "@emotion/react": "^11",
72
79
  "react": ">=18",
73
80
  "react-dom": ">=18"
@@ -1 +0,0 @@
1
- 'use client'
@@ -1,87 +0,0 @@
1
- 'use client'
2
- import {
3
- LuEye,
4
- LuEyeOff
5
- } from "./chunk-F3CVOMG5.js";
6
- import {
7
- InputGroup
8
- } from "./chunk-PKI6YH2V.js";
9
-
10
- // src/components/password-input/password-input.tsx
11
- import { forwardRef, useRef } from "react";
12
- import {
13
- IconButton,
14
- Input,
15
- mergeRefs,
16
- useControllableState
17
- } from "@chakra-ui/react";
18
- import { jsx } from "react/jsx-runtime";
19
- var PasswordInput = forwardRef(
20
- function PasswordInput2(props, ref) {
21
- const {
22
- rootProps,
23
- defaultVisible,
24
- visible: visibleProp,
25
- onVisibleChange,
26
- visibilityIcon = { on: /* @__PURE__ */ jsx(LuEye, {}), off: /* @__PURE__ */ jsx(LuEyeOff, {}) },
27
- ...rest
28
- } = props;
29
- const [visible, setVisible] = useControllableState({
30
- value: visibleProp,
31
- defaultValue: defaultVisible || false,
32
- onChange: onVisibleChange
33
- });
34
- const inputRef = useRef(null);
35
- return /* @__PURE__ */ jsx(
36
- InputGroup,
37
- {
38
- width: "full",
39
- endElement: /* @__PURE__ */ jsx(
40
- VisibilityTrigger,
41
- {
42
- disabled: rest.disabled,
43
- onPointerDown: (e) => {
44
- if (rest.disabled) return;
45
- if (e.button !== 0) return;
46
- e.preventDefault();
47
- setVisible(!visible);
48
- },
49
- children: visible ? visibilityIcon.off : visibilityIcon.on
50
- }
51
- ),
52
- ...rootProps,
53
- children: /* @__PURE__ */ jsx(
54
- Input,
55
- {
56
- ...rest,
57
- ref: mergeRefs(ref, inputRef),
58
- type: visible ? "text" : "password"
59
- }
60
- )
61
- }
62
- );
63
- }
64
- );
65
- var VisibilityTrigger = forwardRef(
66
- function VisibilityTrigger2(props, ref) {
67
- return /* @__PURE__ */ jsx(
68
- IconButton,
69
- {
70
- tabIndex: -1,
71
- ref,
72
- me: "-2",
73
- aspectRatio: "square",
74
- size: "sm",
75
- variant: "ghost",
76
- colorPalette: "gray",
77
- height: "calc(100% - {spacing.2})",
78
- "aria-label": "Toggle password visibility",
79
- ...props
80
- }
81
- );
82
- }
83
- );
84
-
85
- export {
86
- PasswordInput
87
- };
@@ -1,45 +0,0 @@
1
- 'use client'
2
-
3
- // ../../node_modules/@ark-ui/react/dist/utils/create-context.js
4
- import { createContext as createContext$1, useContext } from "react";
5
- function getErrorMessage(hook, provider) {
6
- return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
7
- }
8
- function createContext(options = {}) {
9
- const {
10
- name,
11
- strict = true,
12
- hookName = "useContext",
13
- providerName = "Provider",
14
- errorMessage,
15
- defaultValue
16
- } = options;
17
- const Context = createContext$1(defaultValue);
18
- Context.displayName = name;
19
- function useContext$1() {
20
- var _a;
21
- const context = useContext(Context);
22
- if (!context && strict) {
23
- const error = new Error(errorMessage != null ? errorMessage : getErrorMessage(hookName, providerName));
24
- error.name = "ContextError";
25
- (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext$1);
26
- throw error;
27
- }
28
- return context;
29
- }
30
- return [Context.Provider, useContext$1, Context];
31
- }
32
-
33
- // ../../node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js
34
- var [DialogProvider, useDialogContext] = createContext({
35
- name: "DialogContext",
36
- hookName: "useDialogContext",
37
- providerName: "<DialogProvider />"
38
- });
39
-
40
- // ../../node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js
41
- var DialogContext = (props) => props.children(useDialogContext());
42
-
43
- export {
44
- DialogContext
45
- };