@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.
Files changed (189) hide show
  1. package/CHANGELOG.md +402 -1
  2. package/dist/chunk-2EUACKRH.js +26 -0
  3. package/dist/chunk-32DD6PHF.js +63 -0
  4. package/dist/chunk-3JZ42NYM.js +100 -0
  5. package/dist/chunk-3MO37LYW.js +326 -0
  6. package/dist/chunk-46ISJZBS.js +119 -0
  7. package/dist/{chunk-VDXTEASE.js → chunk-4TPVIHNO.js} +10 -1
  8. package/dist/chunk-52XM5VXJ.js +9 -0
  9. package/dist/chunk-6ZNR6N2K.js +45 -0
  10. package/dist/chunk-7VSTNV2B.js +53 -0
  11. package/dist/chunk-GRUMUCSL.js +109 -0
  12. package/dist/chunk-GWC5GCMW.js +177 -0
  13. package/dist/chunk-I2RXEKTB.js +38 -0
  14. package/dist/chunk-IEWHAXXU.js +28 -0
  15. package/dist/chunk-INV6RT5B.js +8 -0
  16. package/dist/chunk-IVLUAUU5.js +10 -0
  17. package/dist/chunk-JMYI6YXR.js +1 -0
  18. package/dist/chunk-JO4WJVYO.js +43 -0
  19. package/dist/chunk-K2SPPLAY.js +231 -0
  20. package/dist/chunk-KE5AC3TZ.js +63 -0
  21. package/dist/chunk-KFXNVUEZ.js +102 -0
  22. package/dist/chunk-L356FPLY.js +20 -0
  23. package/dist/chunk-LTVFG6UC.js +54 -0
  24. package/dist/chunk-MLJN6IOJ.js +96 -0
  25. package/dist/chunk-MS2ELLDY.js +26 -0
  26. package/dist/chunk-NGGISORT.js +29 -0
  27. package/dist/chunk-NGSHWY7E.js +27 -0
  28. package/dist/chunk-NSD5HRIP.js +46 -0
  29. package/dist/chunk-Q6SNJJO2.js +63 -0
  30. package/dist/chunk-QSNSWCTM.js +32 -0
  31. package/dist/chunk-RLIAFHVM.js +66 -0
  32. package/dist/chunk-S5J6REMC.js +40 -0
  33. package/dist/chunk-SA3OGTOO.js +23 -0
  34. package/dist/chunk-SKXSBAOS.js +35 -0
  35. package/dist/{components/breadcrumbs/index.js → chunk-TT4C5VXB.js} +6 -7
  36. package/dist/chunk-TZBAM4AD.js +20 -0
  37. package/dist/chunk-U23VDAWJ.js +143 -0
  38. package/dist/chunk-UASXI64E.js +34 -0
  39. package/dist/chunk-VZG7EJ64.js +70 -0
  40. package/dist/chunk-WYLMBMAH.js +22 -0
  41. package/dist/chunk-YHQ5JGCC.js +1 -0
  42. package/dist/chunk-YKSY7UOM.js +20 -0
  43. package/dist/{chunk-FZW2DYK3.js → chunk-YXGJOOMM.js} +1 -1
  44. package/dist/components/app-shell/index.cjs +1 -1
  45. package/dist/components/app-shell/index.d.cts +1 -1
  46. package/dist/components/app-shell/index.d.ts +1 -1
  47. package/dist/components/app-shell/index.js +3 -40
  48. package/dist/components/avatar/index.cjs +69 -0
  49. package/dist/components/avatar/index.d.cts +18 -0
  50. package/dist/components/avatar/index.d.ts +18 -0
  51. package/dist/components/avatar/index.js +11 -0
  52. package/dist/components/badge/index.cjs +31 -0
  53. package/dist/components/badge/index.d.cts +3 -0
  54. package/dist/components/badge/index.d.ts +3 -0
  55. package/dist/components/badge/index.js +8 -0
  56. package/dist/components/{breadcrumbs → breadcrumb}/index.cjs +8 -10
  57. package/dist/components/{breadcrumbs → breadcrumb}/index.d.cts +3 -4
  58. package/dist/components/{breadcrumbs → breadcrumb}/index.d.ts +3 -4
  59. package/dist/components/breadcrumb/index.js +8 -0
  60. package/dist/components/button/index.cjs +8 -26
  61. package/dist/components/button/index.js +3 -40
  62. package/dist/components/card/index.cjs +31 -0
  63. package/dist/components/card/index.d.cts +1 -0
  64. package/dist/components/card/index.d.ts +1 -0
  65. package/dist/components/card/index.js +8 -0
  66. package/dist/components/checkbox/index.js +3 -15
  67. package/dist/components/close-button/index.cjs +8 -0
  68. package/dist/components/close-button/index.js +3 -2
  69. package/dist/components/command/index.cjs +13 -13
  70. package/dist/components/command/index.d.cts +28 -2
  71. package/dist/components/command/index.d.ts +28 -2
  72. package/dist/components/command/index.js +3 -28
  73. package/dist/components/data-list/index.cjs +33 -0
  74. package/dist/components/data-list/index.d.cts +1 -0
  75. package/dist/components/data-list/index.d.ts +1 -0
  76. package/dist/components/data-list/index.js +10 -0
  77. package/dist/components/dialog/index.cjs +51 -90
  78. package/dist/components/dialog/index.d.cts +35 -16
  79. package/dist/components/dialog/index.d.ts +35 -16
  80. package/dist/components/dialog/index.js +7 -69
  81. package/dist/components/drawer/index.cjs +55 -97
  82. package/dist/components/drawer/index.d.cts +34 -18
  83. package/dist/components/drawer/index.d.ts +34 -18
  84. package/dist/components/drawer/index.js +7 -61
  85. package/dist/components/empty-state/index.cjs +50 -0
  86. package/dist/components/empty-state/index.d.cts +11 -0
  87. package/dist/components/empty-state/index.d.ts +11 -0
  88. package/dist/components/empty-state/index.js +8 -0
  89. package/dist/components/file-upload/index.cjs +254 -0
  90. package/dist/components/file-upload/index.d.cts +43 -0
  91. package/dist/components/file-upload/index.d.ts +43 -0
  92. package/dist/components/file-upload/index.js +10 -0
  93. package/dist/components/grid-list/index.cjs +68 -0
  94. package/dist/components/grid-list/index.d.cts +84 -0
  95. package/dist/components/grid-list/index.d.ts +84 -0
  96. package/dist/components/grid-list/index.js +8 -0
  97. package/dist/components/icon-badge/index.cjs +1 -1
  98. package/dist/components/icon-badge/index.d.cts +1 -1
  99. package/dist/components/icon-badge/index.d.ts +1 -1
  100. package/dist/components/icon-badge/index.js +3 -33
  101. package/dist/components/icon-button/index.cjs +67 -0
  102. package/dist/components/icon-button/index.d.cts +9 -0
  103. package/dist/components/icon-button/index.d.ts +9 -0
  104. package/dist/components/icon-button/index.js +9 -0
  105. package/dist/components/icons/index.cjs +10 -0
  106. package/dist/components/icons/index.d.cts +2 -1
  107. package/dist/components/icons/index.d.ts +2 -1
  108. package/dist/components/icons/index.js +3 -1
  109. package/dist/components/link/index.js +3 -14
  110. package/dist/components/loading-overlay/index.cjs +42 -1879
  111. package/dist/components/loading-overlay/index.d.cts +19 -6
  112. package/dist/components/loading-overlay/index.d.ts +19 -6
  113. package/dist/components/loading-overlay/index.js +7 -1874
  114. package/dist/components/menu/index.cjs +239 -0
  115. package/dist/components/menu/index.d.cts +39 -0
  116. package/dist/components/menu/index.d.ts +39 -0
  117. package/dist/components/menu/index.js +11 -0
  118. package/dist/components/navbar/index.cjs +61 -15
  119. package/dist/components/navbar/index.d.cts +12 -9
  120. package/dist/components/navbar/index.d.ts +12 -9
  121. package/dist/components/navbar/index.js +5 -38
  122. package/dist/components/number-input/index.cjs +9 -1
  123. package/dist/components/number-input/index.js +3 -26
  124. package/dist/components/pagination/index.cjs +215 -0
  125. package/dist/components/pagination/index.d.cts +41 -0
  126. package/dist/components/pagination/index.d.ts +41 -0
  127. package/dist/components/pagination/index.js +9 -0
  128. package/dist/components/password-input/index.cjs +2 -2
  129. package/dist/components/password-input/index.js +3 -225
  130. package/dist/components/persona/index.cjs +101 -36
  131. package/dist/components/persona/index.d.cts +131 -5
  132. package/dist/components/persona/index.d.ts +131 -5
  133. package/dist/components/persona/index.js +8 -144
  134. package/dist/components/pin-input/index.js +3 -21
  135. package/dist/components/popover/index.cjs +214 -0
  136. package/dist/components/popover/index.d.cts +37 -0
  137. package/dist/components/popover/index.d.ts +37 -0
  138. package/dist/components/popover/index.js +11 -0
  139. package/dist/components/radio/index.js +4 -16
  140. package/dist/components/search-input/index.cjs +8 -0
  141. package/dist/components/search-input/index.js +4 -114
  142. package/dist/components/segmented-control/index.cjs +60 -0
  143. package/dist/components/segmented-control/index.d.cts +14 -0
  144. package/dist/components/segmented-control/index.d.ts +14 -0
  145. package/dist/components/segmented-control/index.js +8 -0
  146. package/dist/components/select/index.cjs +8 -0
  147. package/dist/components/select/index.js +6 -95
  148. package/dist/components/sidebar/index.cjs +66 -32
  149. package/dist/components/sidebar/index.d.cts +30 -25
  150. package/dist/components/sidebar/index.d.ts +30 -25
  151. package/dist/components/sidebar/index.js +7 -101
  152. package/dist/components/status/index.cjs +45 -0
  153. package/dist/components/status/index.d.cts +17 -0
  154. package/dist/components/status/index.d.ts +17 -0
  155. package/dist/components/status/index.js +8 -0
  156. package/dist/components/steps/index.cjs +17 -10
  157. package/dist/components/steps/index.d.cts +4 -4
  158. package/dist/components/steps/index.d.ts +4 -4
  159. package/dist/components/steps/index.js +6 -67
  160. package/dist/components/switch/index.js +3 -18
  161. package/dist/components/tabs/index.cjs +35 -0
  162. package/dist/components/tabs/index.d.cts +1 -0
  163. package/dist/components/tabs/index.d.ts +1 -0
  164. package/dist/components/tabs/index.js +12 -0
  165. package/dist/components/tag/index.cjs +53 -0
  166. package/dist/components/tag/index.d.cts +12 -0
  167. package/dist/components/tag/index.d.ts +12 -0
  168. package/dist/components/tag/index.js +8 -0
  169. package/dist/components/toaster/index.cjs +204 -0
  170. package/dist/components/toaster/index.d.cts +11 -0
  171. package/dist/components/toaster/index.d.ts +11 -0
  172. package/dist/components/toaster/index.js +12 -0
  173. package/dist/components/tooltip/index.cjs +57 -0
  174. package/dist/components/tooltip/index.d.cts +14 -0
  175. package/dist/components/tooltip/index.d.ts +14 -0
  176. package/dist/components/tooltip/index.js +8 -0
  177. package/dist/index.cjs +8277 -5428
  178. package/dist/index.d.cts +47 -2
  179. package/dist/index.d.ts +47 -2
  180. package/dist/index.js +5416 -4732
  181. package/dist/theme/tokens/colors.cjs +349 -0
  182. package/dist/theme/tokens/colors.d.cts +856 -0
  183. package/dist/theme/tokens/colors.d.ts +856 -0
  184. package/dist/theme/tokens/colors.js +8 -0
  185. package/dist/types-DnFoUudY.d.cts +10 -0
  186. package/dist/types-DnFoUudY.d.ts +10 -0
  187. package/package.json +11 -4
  188. package/dist/chunk-VBIVLREP.js +0 -45
  189. /package/dist/{chunk-KHRLZUV4.js → chunk-O2WVT2BP.js} +0 -0
@@ -1,100 +1,11 @@
1
1
  'use client'
2
2
  import {
3
- CloseButton
4
- } from "../../chunk-FZW2DYK3.js";
5
- import "../../chunk-VDXTEASE.js";
6
- import {
7
- __export
8
- } from "../../chunk-RTMS5TJN.js";
9
-
10
- // src/components/select/namespace.ts
11
- var namespace_exports = {};
12
- __export(namespace_exports, {
13
- Content: () => SelectContent,
14
- Item: () => SelectItem,
15
- ItemGroup: () => SelectItemGroup,
16
- ItemText: () => SelectItemText,
17
- Label: () => SelectLabel,
18
- Root: () => SelectRoot,
19
- Trigger: () => SelectTrigger,
20
- ValueText: () => SelectValueText
21
- });
22
-
23
- // src/components/select/select.tsx
24
- import { forwardRef } from "react";
25
- import { Portal, Select as SelectPrimitive } from "@chakra-ui/react";
26
- import { jsx, jsxs } from "react/jsx-runtime";
27
- var SelectTrigger = forwardRef(
28
- function SelectTrigger2(props, ref) {
29
- const { children, clearable, ...rest } = props;
30
- return /* @__PURE__ */ jsxs(SelectPrimitive.Control, { ...rest, children: [
31
- /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref, children }),
32
- /* @__PURE__ */ jsxs(SelectPrimitive.IndicatorGroup, { children: [
33
- clearable && /* @__PURE__ */ jsx(SelectClearTrigger, {}),
34
- /* @__PURE__ */ jsx(SelectPrimitive.Indicator, {})
35
- ] })
36
- ] });
37
- }
38
- );
39
- var SelectClearTrigger = forwardRef(function SelectClearTrigger2(props, ref) {
40
- return /* @__PURE__ */ jsx(SelectPrimitive.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ jsx(
41
- CloseButton,
42
- {
43
- size: "xs",
44
- variant: "plain",
45
- focusVisibleRing: "inside",
46
- focusRingWidth: "2px",
47
- pointerEvents: "auto"
48
- }
49
- ) });
50
- });
51
- var SelectContent = forwardRef(
52
- function SelectContent2(props, ref) {
53
- const { portalled = true, portalRef, ...rest } = props;
54
- return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(SelectPrimitive.Positioner, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, { ...rest, ref }) }) });
55
- }
56
- );
57
- var SelectItem = forwardRef(
58
- function SelectItem2(props, ref) {
59
- const { item, children, ...rest } = props;
60
- return /* @__PURE__ */ jsxs(SelectPrimitive.Item, { item, ...rest, ref, children: [
61
- children,
62
- /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, {})
63
- ] }, item.value);
64
- }
65
- );
66
- var SelectValueText = forwardRef(function SelectValueText2(props, ref) {
67
- const { children, ...rest } = props;
68
- return /* @__PURE__ */ jsx(SelectPrimitive.ValueText, { ...rest, ref, children: /* @__PURE__ */ jsx(SelectPrimitive.Context, { children: (select) => {
69
- const items = select.selectedItems;
70
- if (items.length === 0) return props.placeholder;
71
- if (children) return children(items);
72
- if (items.length === 1)
73
- return select.collection.stringifyItem(items[0]);
74
- return `${items.length} selected`;
75
- } }) });
76
- });
77
- var SelectRoot = forwardRef(function SelectRoot2(props, ref) {
78
- return /* @__PURE__ */ jsx(
79
- SelectPrimitive.Root,
80
- {
81
- ...props,
82
- ref,
83
- positioning: { sameWidth: true, ...props.positioning }
84
- }
85
- );
86
- });
87
- var SelectItemGroup = forwardRef(
88
- function SelectItemGroup2(props, ref) {
89
- const { children, label, ...rest } = props;
90
- return /* @__PURE__ */ jsxs(SelectPrimitive.ItemGroup, { ...rest, ref, children: [
91
- /* @__PURE__ */ jsx(SelectPrimitive.ItemGroupLabel, { children: label }),
92
- children
93
- ] });
94
- }
95
- );
96
- var SelectLabel = SelectPrimitive.Label;
97
- var SelectItemText = SelectPrimitive.ItemText;
3
+ namespace_exports
4
+ } from "../../chunk-3JZ42NYM.js";
5
+ import "../../chunk-JMYI6YXR.js";
6
+ import "../../chunk-YXGJOOMM.js";
7
+ import "../../chunk-4TPVIHNO.js";
8
+ import "../../chunk-RTMS5TJN.js";
98
9
  export {
99
10
  namespace_exports as Select
100
11
  };
@@ -19,20 +19,21 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
20
 
21
21
  // src/components/sidebar/index.ts
22
- var sidebar_exports = {};
23
- __export(sidebar_exports, {
24
- Sidebar: () => namespace_exports,
25
- useSidebar: () => import_sidebar.useSidebar,
22
+ var sidebar_exports2 = {};
23
+ __export(sidebar_exports2, {
24
+ Sidebar: () => sidebar_exports,
25
+ useSidebar: () => import_sidebar2.useSidebar,
26
26
  useSidebarItemStyles: () => useSidebarItemStyles,
27
27
  useSidebarStyles: () => useSidebarStyles
28
28
  });
29
- module.exports = __toCommonJS(sidebar_exports);
29
+ module.exports = __toCommonJS(sidebar_exports2);
30
30
 
31
- // src/components/sidebar/namespace.ts
32
- var namespace_exports = {};
33
- __export(namespace_exports, {
31
+ // src/components/sidebar/sidebar.tsx
32
+ var sidebar_exports = {};
33
+ __export(sidebar_exports, {
34
34
  Backdrop: () => SidebarBackdrop,
35
35
  Body: () => SidebarBody,
36
+ Context: () => SidebarContext,
36
37
  FlyoutTrigger: () => SidebarFlyoutTrigger,
37
38
  Footer: () => SidebarFooter,
38
39
  Group: () => SidebarGroup,
@@ -42,18 +43,17 @@ __export(namespace_exports, {
42
43
  GroupTitle: () => SidebarGroupTitle,
43
44
  Header: () => SidebarHeader,
44
45
  NavButton: () => SidebarNavButton,
46
+ NavButtonEndElement: () => SidebarNavButtonEndElement,
45
47
  NavItem: () => SidebarNavItem,
46
- NavItemEndElement: () => SidebarNavItemEndElement,
47
48
  Provider: () => SidebarProvider,
48
49
  Root: () => SidebarRoot,
49
50
  Track: () => SidebarTrack,
50
51
  Trigger: () => SidebarTrigger
51
52
  });
53
+ var import_sidebar = require("@saas-ui/core/sidebar");
52
54
 
53
- // src/components/sidebar/sidebar.tsx
55
+ // src/components/sidebar/sidebar.context.ts
54
56
  var import_react = require("@chakra-ui/react");
55
- var import_sidebar = require("@saas-ui/core/sidebar");
56
- var import_jsx_runtime = require("react/jsx-runtime");
57
57
  var {
58
58
  withContext,
59
59
  useRecipeResult,
@@ -61,8 +61,18 @@ var {
61
61
  ClassNamesProvider,
62
62
  useStyles: useSidebarStyles
63
63
  } = (0, import_react.createSlotRecipeContext)({
64
- key: "sidebar"
64
+ key: "suiSidebar"
65
65
  });
66
+ var {
67
+ withProvider: withItemProvider,
68
+ withContext: withItemContext,
69
+ useStyles: useSidebarItemStyles
70
+ } = (0, import_react.createSlotRecipeContext)({
71
+ key: "suiSidebarNavItem"
72
+ });
73
+
74
+ // src/components/sidebar/sidebar.tsx
75
+ var import_jsx_runtime = require("react/jsx-runtime");
66
76
  var SidebarProvider = function SidebarProvider2(props) {
67
77
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar.Sidebar.Provider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RecipeProvider, { ...props, children: props.children }) });
68
78
  };
@@ -78,21 +88,35 @@ var SidebarRoot = withContext(
78
88
  import_sidebar.Sidebar.Root,
79
89
  "root"
80
90
  );
81
- var SidebarTrigger = withContext(import_sidebar.Sidebar.Trigger, "trigger", {
82
- forwardAsChild: true
83
- });
91
+ var SidebarTrigger = withContext(
92
+ import_sidebar.Sidebar.Trigger,
93
+ "trigger",
94
+ {
95
+ forwardAsChild: true
96
+ }
97
+ );
84
98
  var SidebarFlyoutTrigger = withContext(import_sidebar.Sidebar.FlyoutTrigger, "flyoutTrigger", {
85
99
  forwardAsChild: true
86
100
  });
87
- var SidebarBackdrop = withContext(import_sidebar.Sidebar.Backdrop, "backdrop", {
88
- forwardAsChild: true
89
- });
90
- var SidebarHeader = withContext(import_sidebar.Sidebar.Header, "header");
101
+ var SidebarBackdrop = withContext(
102
+ import_sidebar.Sidebar.Backdrop,
103
+ "backdrop",
104
+ {
105
+ forwardAsChild: true
106
+ }
107
+ );
108
+ var SidebarHeader = withContext(
109
+ import_sidebar.Sidebar.Header,
110
+ "header"
111
+ );
91
112
  var SidebarBody = withContext(
92
113
  import_sidebar.Sidebar.Body,
93
114
  "body"
94
115
  );
95
- var SidebarFooter = withContext(import_sidebar.Sidebar.Footer, "footer");
116
+ var SidebarFooter = withContext(
117
+ import_sidebar.Sidebar.Footer,
118
+ "footer"
119
+ );
96
120
  var SidebarTrack = withContext(
97
121
  import_sidebar.Sidebar.Track,
98
122
  "track",
@@ -109,22 +133,32 @@ var SidebarGroup = withContext(
109
133
  }
110
134
  }
111
135
  );
112
- var SidebarGroupHeader = withContext(import_sidebar.Sidebar.GroupHeader, "groupHeader");
136
+ var SidebarGroupHeader = withContext(
137
+ import_sidebar.Sidebar.GroupHeader,
138
+ "groupHeader"
139
+ );
113
140
  var SidebarGroupTitle = withContext(import_sidebar.Sidebar.GroupTitle, "groupTitle");
114
141
  var SidebarGroupEndElement = withContext(import_sidebar.Sidebar.GroupEndElement, "groupEndElement");
115
- var SidebarGroupContent = withContext(import_sidebar.Sidebar.GroupContent, "groupContent");
116
- var {
117
- withProvider: withItemProvider,
118
- withContext: withItemContext,
119
- useStyles: useSidebarItemStyles
120
- } = (0, import_react.createSlotRecipeContext)({
121
- key: "sidebarNavItem"
122
- });
123
- var SidebarNavItem = withItemProvider(import_sidebar.Sidebar.NavItem, "item");
142
+ var SidebarGroupContent = withContext(
143
+ import_sidebar.Sidebar.GroupContent,
144
+ "groupContent"
145
+ );
146
+ var SidebarNavItem = withItemProvider(
147
+ import_sidebar.Sidebar.NavItem,
148
+ "item"
149
+ );
124
150
  var SidebarNavButton = withItemContext(import_sidebar.Sidebar.NavButton, "button", {
125
151
  forwardAsChild: true
126
152
  });
127
- var SidebarNavItemEndElement = withItemContext(import_sidebar.Sidebar.NavItemEndElement, "endElement");
153
+ var SidebarNavButtonEndElement = withItemContext(import_sidebar.Sidebar.NavItemEndElement, "endElement", {
154
+ defaultProps: {
155
+ "data-slot": "endElement"
156
+ }
157
+ });
158
+ var SidebarContext = import_sidebar.Sidebar.Context;
159
+
160
+ // src/components/sidebar/index.ts
161
+ var import_sidebar2 = require("@saas-ui/core/sidebar");
128
162
  // Annotate the CommonJS export names for ESM import in node:
129
163
  0 && (module.exports = {
130
164
  Sidebar,