@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.
- package/CHANGELOG.md +13 -0
- package/dist/chunk-7VSTNV2B.js +53 -0
- package/dist/{chunk-ZWSZQZ5G.js → chunk-CB52LBJK.js} +1 -3
- package/dist/{chunk-F3CVOMG5.js → chunk-CD2JUFI2.js} +81 -10
- package/dist/{chunk-GEPWRHHH.js → chunk-H6TFEHY4.js} +1 -3
- package/dist/chunk-IFYV7NUJ.js +326 -0
- package/dist/{chunk-VF3BV2BY.js → chunk-JGHXJ3PI.js} +22 -7
- package/dist/chunk-SKXSBAOS.js +35 -0
- package/dist/{chunk-7C3IZBNJ.js → chunk-TT4C5VXB.js} +4 -6
- 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/dialog/index.cjs +19 -58
- package/dist/components/dialog/index.js +1 -2
- package/dist/components/drawer/index.cjs +23 -64
- package/dist/components/drawer/index.js +1 -2
- package/dist/components/loading-overlay/index.cjs +16 -1868
- package/dist/components/loading-overlay/index.js +1 -1
- package/dist/components/menu/index.cjs +165 -179
- package/dist/components/menu/index.d.cts +11 -2
- package/dist/components/menu/index.d.ts +11 -2
- package/dist/components/menu/index.js +4 -2
- package/dist/components/password-input/index.js +1 -2
- package/dist/components/segmented-control/index.cjs +58 -0
- package/dist/components/segmented-control/index.d.cts +13 -1
- package/dist/components/segmented-control/index.d.ts +13 -1
- package/dist/components/segmented-control/index.js +7 -1
- package/dist/index.cjs +1007 -2653
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +278 -393
- 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/package.json +9 -2
- package/dist/chunk-CTOVNZVS.js +0 -1
- package/dist/chunk-QMG6HP7Z.js +0 -87
- package/dist/chunk-VBIVLREP.js +0 -45
- package/dist/chunk-YWJZWB6I.js +0 -1892
- package/dist/components/breadcrumbs/index.js +0 -8
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@saas-ui/react",
|
3
|
-
"version": "3.0.0-alpha.
|
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.
|
77
|
+
"@chakra-ui/react": "^3.2.2",
|
71
78
|
"@emotion/react": "^11",
|
72
79
|
"react": ">=18",
|
73
80
|
"react-dom": ">=18"
|
package/dist/chunk-CTOVNZVS.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
'use client'
|
package/dist/chunk-QMG6HP7Z.js
DELETED
@@ -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
|
-
};
|
package/dist/chunk-VBIVLREP.js
DELETED
@@ -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
|
-
};
|