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

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{chunk-VF3BV2BY.js → chunk-5T7S5OAM.js} +20 -7
  3. package/dist/{chunk-F3CVOMG5.js → chunk-CD2JUFI2.js} +81 -10
  4. package/dist/chunk-IFYV7NUJ.js +326 -0
  5. package/dist/chunk-SKXSBAOS.js +35 -0
  6. package/dist/{chunk-7C3IZBNJ.js → chunk-TT4C5VXB.js} +4 -6
  7. package/dist/components/{breadcrumbs → breadcrumb}/index.cjs +8 -10
  8. package/dist/components/{breadcrumbs → breadcrumb}/index.d.cts +3 -4
  9. package/dist/components/{breadcrumbs → breadcrumb}/index.d.ts +3 -4
  10. package/dist/components/breadcrumb/index.js +8 -0
  11. package/dist/components/menu/index.cjs +163 -179
  12. package/dist/components/menu/index.d.cts +9 -2
  13. package/dist/components/menu/index.d.ts +9 -2
  14. package/dist/components/menu/index.js +4 -2
  15. package/dist/components/password-input/index.js +1 -2
  16. package/dist/components/segmented-control/index.cjs +58 -0
  17. package/dist/components/segmented-control/index.d.cts +13 -1
  18. package/dist/components/segmented-control/index.d.ts +13 -1
  19. package/dist/components/segmented-control/index.js +7 -1
  20. package/dist/index.cjs +693 -462
  21. package/dist/index.d.cts +2 -1
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +288 -403
  24. package/dist/theme/tokens/colors.cjs +349 -0
  25. package/dist/theme/tokens/colors.d.cts +856 -0
  26. package/dist/theme/tokens/colors.d.ts +856 -0
  27. package/dist/theme/tokens/colors.js +8 -0
  28. package/package.json +7 -1
  29. package/dist/chunk-CTOVNZVS.js +0 -1
  30. package/dist/chunk-QMG6HP7Z.js +0 -87
  31. 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.7",
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",
@@ -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,8 +0,0 @@
1
- 'use client'
2
- import {
3
- namespace_exports
4
- } from "../../chunk-7C3IZBNJ.js";
5
- import "../../chunk-RTMS5TJN.js";
6
- export {
7
- namespace_exports as Breadcrumb
8
- };