@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
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  loading_overlay_exports,
4
4
  useLoadingOverlayStyles
5
- } from "../../chunk-YWJZWB6I.js";
5
+ } from "../../chunk-7VSTNV2B.js";
6
6
  import "../../chunk-32JGENDB.js";
7
7
  import "../../chunk-RTMS5TJN.js";
8
8
  export {
@@ -1,10 +1,8 @@
1
1
  'use client'
2
2
  "use strict";
3
- var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
7
  var __export = (target, all) => {
10
8
  for (var name in all)
@@ -18,14 +16,6 @@ var __copyProps = (to, from, except, desc) => {
18
16
  }
19
17
  return to;
20
18
  };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
20
 
31
21
  // src/components/menu/index.ts
@@ -39,8 +29,10 @@ module.exports = __toCommonJS(menu_exports2);
39
29
  var menu_exports = {};
40
30
  __export(menu_exports, {
41
31
  Arrow: () => MenuArrow,
32
+ Button: () => MenuButton,
42
33
  CheckboxItem: () => MenuCheckboxItem,
43
34
  Content: () => MenuContent,
35
+ Context: () => MenuContext,
44
36
  ContextTrigger: () => MenuContextTrigger,
45
37
  Item: () => MenuItem,
46
38
  ItemCommand: () => MenuItemCommand,
@@ -53,210 +45,204 @@ __export(menu_exports, {
53
45
  Trigger: () => MenuTrigger,
54
46
  TriggerItem: () => MenuTriggerItem
55
47
  });
56
- var import_react3 = require("react");
57
- var import_react4 = require("@chakra-ui/react");
48
+ var import_react4 = require("react");
49
+ var import_react5 = require("@chakra-ui/react");
58
50
 
59
- // ../../node_modules/react-icons/lib/iconBase.mjs
60
- var import_react2 = __toESM(require("react"), 1);
61
-
62
- // ../../node_modules/react-icons/lib/iconContext.mjs
63
- var import_react = __toESM(require("react"), 1);
64
- var DefaultContext = {
65
- color: void 0,
66
- size: void 0,
67
- className: void 0,
68
- style: void 0,
69
- attr: void 0
70
- };
71
- var IconContext = import_react.default.createContext && /* @__PURE__ */ import_react.default.createContext(DefaultContext);
72
-
73
- // ../../node_modules/react-icons/lib/iconBase.mjs
74
- var _excluded = ["attr", "size", "title"];
75
- function _objectWithoutProperties(source, excluded) {
76
- if (source == null) return {};
77
- var target = _objectWithoutPropertiesLoose(source, excluded);
78
- var key, i;
79
- if (Object.getOwnPropertySymbols) {
80
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
81
- for (i = 0; i < sourceSymbolKeys.length; i++) {
82
- key = sourceSymbolKeys[i];
83
- if (excluded.indexOf(key) >= 0) continue;
84
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
85
- target[key] = source[key];
86
- }
87
- }
88
- return target;
89
- }
90
- function _objectWithoutPropertiesLoose(source, excluded) {
91
- if (source == null) return {};
92
- var target = {};
93
- for (var key in source) {
94
- if (Object.prototype.hasOwnProperty.call(source, key)) {
95
- if (excluded.indexOf(key) >= 0) continue;
96
- target[key] = source[key];
97
- }
98
- }
99
- return target;
100
- }
101
- function _extends() {
102
- _extends = Object.assign ? Object.assign.bind() : function(target) {
103
- for (var i = 1; i < arguments.length; i++) {
104
- var source = arguments[i];
105
- for (var key in source) {
106
- if (Object.prototype.hasOwnProperty.call(source, key)) {
107
- target[key] = source[key];
108
- }
51
+ // src/components/button/button.tsx
52
+ var import_react = require("react");
53
+ var import_react2 = require("@chakra-ui/react");
54
+ var import_jsx_runtime = require("react/jsx-runtime");
55
+ var Button = (0, import_react.forwardRef)(
56
+ function Button2(props, ref) {
57
+ const {
58
+ loading,
59
+ disabled,
60
+ loadingText,
61
+ children,
62
+ variant = "glass",
63
+ colorPalette = variant === "glass" ? "accent" : "gray",
64
+ ...rest
65
+ } = props;
66
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
+ import_react2.Button,
68
+ {
69
+ colorPalette,
70
+ disabled: loading || disabled,
71
+ variant,
72
+ ref,
73
+ ...rest,
74
+ children: loading && !loadingText ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.AbsoluteCenter, { display: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Spinner, { size: "inherit", color: "inherit" }) }),
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Span, { opacity: 0, children })
77
+ ] }) : loading && loadingText ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Spinner, { size: "inherit", color: "inherit" }),
79
+ loadingText
80
+ ] }) : children
109
81
  }
110
- }
111
- return target;
112
- };
113
- return _extends.apply(this, arguments);
114
- }
115
- function ownKeys(e, r) {
116
- var t = Object.keys(e);
117
- if (Object.getOwnPropertySymbols) {
118
- var o = Object.getOwnPropertySymbols(e);
119
- r && (o = o.filter(function(r2) {
120
- return Object.getOwnPropertyDescriptor(e, r2).enumerable;
121
- })), t.push.apply(t, o);
122
- }
123
- return t;
124
- }
125
- function _objectSpread(e) {
126
- for (var r = 1; r < arguments.length; r++) {
127
- var t = null != arguments[r] ? arguments[r] : {};
128
- r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
129
- _defineProperty(e, r2, t[r2]);
130
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
131
- Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
132
- });
82
+ );
133
83
  }
134
- return e;
135
- }
136
- function _defineProperty(obj, key, value) {
137
- key = _toPropertyKey(key);
138
- if (key in obj) {
139
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
140
- } else {
141
- obj[key] = value;
142
- }
143
- return obj;
144
- }
145
- function _toPropertyKey(t) {
146
- var i = _toPrimitive(t, "string");
147
- return "symbol" == typeof i ? i : i + "";
148
- }
149
- function _toPrimitive(t, r) {
150
- if ("object" != typeof t || !t) return t;
151
- var e = t[Symbol.toPrimitive];
152
- if (void 0 !== e) {
153
- var i = e.call(t, r || "default");
154
- if ("object" != typeof i) return i;
155
- throw new TypeError("@@toPrimitive must return a primitive value.");
156
- }
157
- return ("string" === r ? String : Number)(t);
158
- }
159
- function Tree2Element(tree) {
160
- return tree && tree.map((node, i) => /* @__PURE__ */ import_react2.default.createElement(node.tag, _objectSpread({
161
- key: i
162
- }, node.attr), Tree2Element(node.child)));
163
- }
164
- function GenIcon(data) {
165
- return (props) => /* @__PURE__ */ import_react2.default.createElement(IconBase, _extends({
166
- attr: _objectSpread({}, data.attr)
167
- }, props), Tree2Element(data.child));
168
- }
169
- function IconBase(props) {
170
- var elem = (conf) => {
171
- var {
172
- attr,
173
- size,
174
- title
175
- } = props, svgProps = _objectWithoutProperties(props, _excluded);
176
- var computedSize = size || conf.size || "1em";
177
- var className;
178
- if (conf.className) className = conf.className;
179
- if (props.className) className = (className ? className + " " : "") + props.className;
180
- return /* @__PURE__ */ import_react2.default.createElement("svg", _extends({
84
+ );
85
+
86
+ // src/components/icons/create-icon.tsx
87
+ var import_react3 = require("@chakra-ui/react");
88
+ var createIcon = (props) => {
89
+ return (0, import_react3.createIcon)({
90
+ viewBox: "0 0 24 24",
91
+ defaultProps: {
92
+ fill: "none",
181
93
  stroke: "currentColor",
182
- fill: "currentColor",
183
- strokeWidth: "0"
184
- }, conf.attr, attr, svgProps, {
185
- className,
186
- style: _objectSpread(_objectSpread({
187
- color: props.color || conf.color
188
- }, conf.style), props.style),
189
- height: computedSize,
190
- width: computedSize,
191
- xmlns: "http://www.w3.org/2000/svg"
192
- }), title && /* @__PURE__ */ import_react2.default.createElement("title", null, title), props.children);
193
- };
194
- return IconContext !== void 0 ? /* @__PURE__ */ import_react2.default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
195
- }
94
+ strokeWidth: "2",
95
+ strokeLinecap: "round",
96
+ strokeLinejoin: "round"
97
+ },
98
+ ...props
99
+ });
100
+ };
196
101
 
197
- // ../../node_modules/react-icons/lu/index.mjs
198
- function LuCheck(props) {
199
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "polyline", "attr": { "points": "20 6 9 17 4 12" }, "child": [] }] })(props);
200
- }
201
- function LuChevronRight(props) {
202
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "m9 18 6-6-6-6" }, "child": [] }] })(props);
203
- }
102
+ // src/components/icons/icons.tsx
103
+ var import_jsx_runtime2 = require("react/jsx-runtime");
104
+ var ChevronUpIcon = createIcon({
105
+ displayName: "ChevronUpIcon",
106
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("polyline", { points: "18 15 12 9 6 15" })
107
+ });
108
+ var ChevronDownIcon = createIcon({
109
+ displayName: "ChevronDownIcon",
110
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("polyline", { points: "6 9 12 15 18 9" })
111
+ });
112
+ var ChevronLeftIcon = createIcon({
113
+ displayName: "ChevronLeftIcon",
114
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("polyline", { points: "15 18 9 12 15 6" })
115
+ });
116
+ var ChevronRightIcon = createIcon({
117
+ displayName: "ChevronRightIcon",
118
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("polyline", { points: "9 18 15 12 9 6" })
119
+ });
120
+ var HamburgerIcon = createIcon({
121
+ displayName: "ChevronDownIcon",
122
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { fill: "none", children: [
123
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
125
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
126
+ ] })
127
+ });
128
+ var CloseIcon = createIcon({
129
+ displayName: "CloseIcon",
130
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { children: [
131
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
132
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
133
+ ] })
134
+ });
135
+ var FilterIcon = createIcon({
136
+ displayName: "FilterIcon",
137
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" })
138
+ });
139
+ var CalendarIcon = createIcon({
140
+ displayName: "CalendarIcon",
141
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { children: [
142
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
143
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
144
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
145
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
146
+ ] })
147
+ });
148
+ var PlusIcon = createIcon({
149
+ displayName: "PlusIcon",
150
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { children: [
151
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
152
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
153
+ ] })
154
+ });
155
+ var MinusIcon = createIcon({
156
+ displayName: "MinusIcon",
157
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) })
158
+ });
159
+ var ViewOffIcon = createIcon({
160
+ displayName: "ViewOffIcon",
161
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { children: [
162
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
164
+ ] })
165
+ });
166
+ var ViewIcon = createIcon({
167
+ displayName: "ViewOffIcon",
168
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { children: [
169
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
170
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "3" })
171
+ ] })
172
+ });
173
+ var SearchIcon = createIcon({
174
+ displayName: "SearchIcon",
175
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { children: [
176
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
177
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
178
+ ] })
179
+ });
180
+ var CheckIcon = createIcon({
181
+ displayName: "CheckIcon",
182
+ path: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("polyline", { points: "20 6 9 17 4 12" }) })
183
+ });
204
184
 
205
185
  // src/components/menu/menu.tsx
206
- var import_jsx_runtime = require("react/jsx-runtime");
207
- var MenuContent = (0, import_react3.forwardRef)(
186
+ var import_jsx_runtime3 = require("react/jsx-runtime");
187
+ var MenuContent = (0, import_react4.forwardRef)(
208
188
  function MenuContent2(props, ref) {
209
189
  const { portalled = true, portalRef, ...rest } = props;
210
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Menu.Content, { ref, ...rest }) }) });
190
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Menu.Content, { ref, ...rest }) }) });
211
191
  }
212
192
  );
213
- var MenuArrow = (0, import_react3.forwardRef)(
193
+ var MenuArrow = (0, import_react4.forwardRef)(
214
194
  function MenuArrow2(props, ref) {
215
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Menu.Arrow, { ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Menu.ArrowTip, {}) });
195
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Menu.Arrow, { ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Menu.ArrowTip, {}) });
216
196
  }
217
197
  );
218
- var MenuCheckboxItem = (0, import_react3.forwardRef)(function MenuCheckboxItem2(props, ref) {
219
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react4.Menu.CheckboxItem, { ref, ...props, children: [
220
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Menu.ItemIndicator, { hidden: false, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LuCheck, {}) }),
198
+ var MenuCheckboxItem = (0, import_react4.forwardRef)(function MenuCheckboxItem2(props, ref) {
199
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Menu.CheckboxItem, { ref, ...props, children: [
200
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Menu.ItemIndicator, { hidden: false, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, {}) }),
221
201
  props.children
222
202
  ] });
223
203
  });
224
- var MenuRadioItem = (0, import_react3.forwardRef)(
204
+ var MenuRadioItem = (0, import_react4.forwardRef)(
225
205
  function MenuRadioItem2(props, ref) {
226
206
  const { children, ...rest } = props;
227
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react4.Menu.RadioItem, { ps: "8", ref, ...rest, children: [
228
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.AbsoluteCenter, { axis: "horizontal", left: "4", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Menu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LuCheck, {}) }) }),
229
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Menu.ItemText, { children })
207
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Menu.RadioItem, { ps: "8", ref, ...rest, children: [
208
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.AbsoluteCenter, { axis: "horizontal", left: "4", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Menu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, {}) }) }),
209
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Menu.ItemText, { children })
230
210
  ] });
231
211
  }
232
212
  );
233
- var MenuItemGroup = (0, import_react3.forwardRef)(
213
+ var MenuItemGroup = (0, import_react4.forwardRef)(
234
214
  function MenuItemGroup2(props, ref) {
235
215
  const { title, children, ...rest } = props;
236
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react4.Menu.ItemGroup, { ref, ...rest, children: [
237
- title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.Menu.ItemGroupLabel, { userSelect: "none", children: title }),
216
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Menu.ItemGroup, { ref, ...rest, children: [
217
+ title && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Menu.ItemGroupLabel, { userSelect: "none", children: title }),
238
218
  children
239
219
  ] });
240
220
  }
241
221
  );
242
- var MenuTriggerItem = (0, import_react3.forwardRef)(
222
+ var MenuTriggerItem = (0, import_react4.forwardRef)(
243
223
  function MenuTriggerItem2(props, ref) {
244
224
  const { startIcon, children, ...rest } = props;
245
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react4.Menu.TriggerItem, { ref, ...rest, children: [
225
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Menu.TriggerItem, { ref, ...rest, children: [
246
226
  startIcon,
247
227
  children,
248
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LuChevronRight, {})
228
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChevronRightIcon, {})
249
229
  ] });
250
230
  }
251
231
  );
252
- var MenuRadioItemGroup = import_react4.Menu.RadioItemGroup;
253
- var MenuContextTrigger = import_react4.Menu.ContextTrigger;
254
- var MenuRoot = import_react4.Menu.Root;
255
- var MenuSeparator = import_react4.Menu.Separator;
256
- var MenuItem = import_react4.Menu.Item;
257
- var MenuItemText = import_react4.Menu.ItemText;
258
- var MenuItemCommand = import_react4.Menu.ItemCommand;
259
- var MenuTrigger = import_react4.Menu.Trigger;
232
+ var MenuButton = (0, import_react4.forwardRef)(
233
+ function MenuButton2(props, ref) {
234
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MenuTrigger, { ref, ...props, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, {}) });
235
+ }
236
+ );
237
+ var MenuRadioItemGroup = import_react5.Menu.RadioItemGroup;
238
+ var MenuContextTrigger = import_react5.Menu.ContextTrigger;
239
+ var MenuRoot = import_react5.Menu.Root;
240
+ var MenuSeparator = import_react5.Menu.Separator;
241
+ var MenuContext = import_react5.Menu.Context;
242
+ var MenuItem = import_react5.Menu.Item;
243
+ var MenuItemText = import_react5.Menu.ItemText;
244
+ var MenuItemCommand = import_react5.Menu.ItemCommand;
245
+ var MenuTrigger = import_react5.Menu.Trigger;
260
246
  // Annotate the CommonJS export names for ESM import in node:
261
247
  0 && (module.exports = {
262
248
  Menu
@@ -1,5 +1,6 @@
1
+ import * as _ark_ui_react from '@ark-ui/react';
1
2
  import * as react from 'react';
2
- import { Menu } from '@chakra-ui/react';
3
+ import { Menu, ButtonProps } from '@chakra-ui/react';
3
4
 
4
5
  interface MenuContentProps extends Menu.ContentProps {
5
6
  portalled?: boolean;
@@ -14,17 +15,25 @@ interface MenuTriggerItemProps extends Menu.ItemProps {
14
15
  startIcon?: React.ReactNode;
15
16
  }
16
17
  declare const MenuTriggerItem: react.ForwardRefExoticComponent<MenuTriggerItemProps & react.RefAttributes<HTMLDivElement>>;
18
+ interface MenuButtonProps extends ButtonProps, Menu.TriggerProps {
19
+ }
20
+ declare const MenuButton: react.ForwardRefExoticComponent<MenuButtonProps & react.RefAttributes<HTMLButtonElement>>;
17
21
  declare const MenuRadioItemGroup: react.ForwardRefExoticComponent<Menu.RadioItemGroupProps & react.RefAttributes<HTMLDivElement>>;
18
22
  declare const MenuContextTrigger: react.ForwardRefExoticComponent<Menu.ContextTriggerProps & react.RefAttributes<HTMLElement>>;
19
23
  declare const MenuRoot: react.FC<Menu.RootProps>;
20
24
  declare const MenuSeparator: react.ForwardRefExoticComponent<Menu.SeparatorProps & react.RefAttributes<HTMLDivElement>>;
25
+ declare const MenuContext: (props: _ark_ui_react.MenuContextProps) => react.ReactNode;
21
26
  declare const MenuItem: react.ForwardRefExoticComponent<Menu.ItemProps & react.RefAttributes<HTMLDivElement>>;
22
27
  declare const MenuItemText: react.ForwardRefExoticComponent<Menu.ItemTextProps & react.RefAttributes<HTMLDivElement>>;
23
28
  declare const MenuItemCommand: react.ForwardRefExoticComponent<Menu.CommandProps & react.RefAttributes<HTMLElement>>;
24
29
  declare const MenuTrigger: react.ForwardRefExoticComponent<Menu.TriggerProps & react.RefAttributes<HTMLButtonElement>>;
25
30
 
31
+ type MenuRootProps = Menu.RootProps;
32
+ type MenuTriggerProps = Menu.TriggerProps;
33
+ type MenuItemProps = Menu.ItemProps;
34
+
26
35
  declare namespace menu {
27
- export { MenuArrow as Arrow, MenuCheckboxItem as CheckboxItem, MenuContent as Content, type MenuContentProps as ContentProps, MenuContextTrigger as ContextTrigger, MenuItem as Item, MenuItemCommand as ItemCommand, MenuItemGroup as ItemGroup, MenuItemText as ItemText, MenuRadioItem as RadioItem, MenuRadioItemGroup as RadioItemGroup, MenuRoot as Root, MenuSeparator as Separator, MenuTrigger as Trigger, MenuTriggerItem as TriggerItem, type MenuTriggerItemProps as TriggerItemProps };
36
+ export { MenuArrow as Arrow, MenuButton as Button, type MenuButtonProps as ButtonProps, MenuCheckboxItem as CheckboxItem, MenuContent as Content, type MenuContentProps as ContentProps, MenuContext as Context, MenuContextTrigger as ContextTrigger, MenuItem as Item, MenuItemCommand as ItemCommand, MenuItemGroup as ItemGroup, type MenuItemProps as ItemProps, MenuItemText as ItemText, MenuRadioItem as RadioItem, MenuRadioItemGroup as RadioItemGroup, MenuRoot as Root, type MenuRootProps as RootProps, MenuSeparator as Separator, MenuTrigger as Trigger, MenuTriggerItem as TriggerItem, type MenuTriggerItemProps as TriggerItemProps, type MenuTriggerProps as TriggerProps };
28
37
  }
29
38
 
30
39
  export { menu as Menu };
@@ -1,5 +1,6 @@
1
+ import * as _ark_ui_react from '@ark-ui/react';
1
2
  import * as react from 'react';
2
- import { Menu } from '@chakra-ui/react';
3
+ import { Menu, ButtonProps } from '@chakra-ui/react';
3
4
 
4
5
  interface MenuContentProps extends Menu.ContentProps {
5
6
  portalled?: boolean;
@@ -14,17 +15,25 @@ interface MenuTriggerItemProps extends Menu.ItemProps {
14
15
  startIcon?: React.ReactNode;
15
16
  }
16
17
  declare const MenuTriggerItem: react.ForwardRefExoticComponent<MenuTriggerItemProps & react.RefAttributes<HTMLDivElement>>;
18
+ interface MenuButtonProps extends ButtonProps, Menu.TriggerProps {
19
+ }
20
+ declare const MenuButton: react.ForwardRefExoticComponent<MenuButtonProps & react.RefAttributes<HTMLButtonElement>>;
17
21
  declare const MenuRadioItemGroup: react.ForwardRefExoticComponent<Menu.RadioItemGroupProps & react.RefAttributes<HTMLDivElement>>;
18
22
  declare const MenuContextTrigger: react.ForwardRefExoticComponent<Menu.ContextTriggerProps & react.RefAttributes<HTMLElement>>;
19
23
  declare const MenuRoot: react.FC<Menu.RootProps>;
20
24
  declare const MenuSeparator: react.ForwardRefExoticComponent<Menu.SeparatorProps & react.RefAttributes<HTMLDivElement>>;
25
+ declare const MenuContext: (props: _ark_ui_react.MenuContextProps) => react.ReactNode;
21
26
  declare const MenuItem: react.ForwardRefExoticComponent<Menu.ItemProps & react.RefAttributes<HTMLDivElement>>;
22
27
  declare const MenuItemText: react.ForwardRefExoticComponent<Menu.ItemTextProps & react.RefAttributes<HTMLDivElement>>;
23
28
  declare const MenuItemCommand: react.ForwardRefExoticComponent<Menu.CommandProps & react.RefAttributes<HTMLElement>>;
24
29
  declare const MenuTrigger: react.ForwardRefExoticComponent<Menu.TriggerProps & react.RefAttributes<HTMLButtonElement>>;
25
30
 
31
+ type MenuRootProps = Menu.RootProps;
32
+ type MenuTriggerProps = Menu.TriggerProps;
33
+ type MenuItemProps = Menu.ItemProps;
34
+
26
35
  declare namespace menu {
27
- export { MenuArrow as Arrow, MenuCheckboxItem as CheckboxItem, MenuContent as Content, type MenuContentProps as ContentProps, MenuContextTrigger as ContextTrigger, MenuItem as Item, MenuItemCommand as ItemCommand, MenuItemGroup as ItemGroup, MenuItemText as ItemText, MenuRadioItem as RadioItem, MenuRadioItemGroup as RadioItemGroup, MenuRoot as Root, MenuSeparator as Separator, MenuTrigger as Trigger, MenuTriggerItem as TriggerItem, type MenuTriggerItemProps as TriggerItemProps };
36
+ export { MenuArrow as Arrow, MenuButton as Button, type MenuButtonProps as ButtonProps, MenuCheckboxItem as CheckboxItem, MenuContent as Content, type MenuContentProps as ContentProps, MenuContext as Context, MenuContextTrigger as ContextTrigger, MenuItem as Item, MenuItemCommand as ItemCommand, MenuItemGroup as ItemGroup, type MenuItemProps as ItemProps, MenuItemText as ItemText, MenuRadioItem as RadioItem, MenuRadioItemGroup as RadioItemGroup, MenuRoot as Root, type MenuRootProps as RootProps, MenuSeparator as Separator, MenuTrigger as Trigger, MenuTriggerItem as TriggerItem, type MenuTriggerItemProps as TriggerItemProps, type MenuTriggerProps as TriggerProps };
28
37
  }
29
38
 
30
39
  export { menu as Menu };
@@ -1,8 +1,10 @@
1
1
  'use client'
2
2
  import {
3
3
  menu_exports
4
- } from "../../chunk-VF3BV2BY.js";
5
- import "../../chunk-F3CVOMG5.js";
4
+ } from "../../chunk-JGHXJ3PI.js";
5
+ import "../../chunk-KTLWEUNW.js";
6
+ import "../../chunk-BCNPBZZK.js";
7
+ import "../../chunk-VDXTEASE.js";
6
8
  import "../../chunk-RTMS5TJN.js";
7
9
  export {
8
10
  menu_exports as Menu
@@ -1,8 +1,7 @@
1
1
  'use client'
2
2
  import {
3
3
  PasswordInput
4
- } from "../../chunk-QMG6HP7Z.js";
5
- import "../../chunk-F3CVOMG5.js";
4
+ } from "../../chunk-CD2JUFI2.js";
6
5
  import "../../chunk-PKI6YH2V.js";
7
6
  import "../../chunk-RTMS5TJN.js";
8
7
  export {
@@ -1,2 +1,60 @@
1
1
  'use client'
2
2
  "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/segmented-control/index.ts
22
+ var segmented_control_exports = {};
23
+ __export(segmented_control_exports, {
24
+ SegmentedControl: () => SegmentedControl
25
+ });
26
+ module.exports = __toCommonJS(segmented_control_exports);
27
+
28
+ // src/components/segmented-control/segmented-control.tsx
29
+ var import_react = require("react");
30
+ var import_react2 = require("@chakra-ui/react");
31
+ var import_jsx_runtime = require("react/jsx-runtime");
32
+ function normalize(items) {
33
+ return items.map((item) => {
34
+ if (typeof item === "string") return { value: item, label: item };
35
+ return item;
36
+ });
37
+ }
38
+ var SegmentedControl = (0, import_react.forwardRef)(function SegmentedControl2(props, ref) {
39
+ const { items, ...rest } = props;
40
+ const data = (0, import_react.useMemo)(() => normalize(items), [items]);
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react2.SegmentGroup.Root, { ref, ...rest, children: [
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.Indicator, {}),
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.For, { each: data, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
44
+ import_react2.SegmentGroup.Item,
45
+ {
46
+ value: item.value,
47
+ disabled: item.disabled,
48
+ children: [
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.ItemText, { children: item.label }),
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.ItemHiddenInput, {})
51
+ ]
52
+ },
53
+ item.value
54
+ ) })
55
+ ] });
56
+ });
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ SegmentedControl
60
+ });
@@ -1,2 +1,14 @@
1
+ import * as react from 'react';
2
+ import { SegmentGroup } from '@chakra-ui/react';
1
3
 
2
- export { }
4
+ interface Item {
5
+ value: string;
6
+ label: React.ReactNode;
7
+ disabled?: boolean;
8
+ }
9
+ interface SegmentedControlProps extends SegmentGroup.RootProps {
10
+ items: Array<string | Item>;
11
+ }
12
+ declare const SegmentedControl: react.ForwardRefExoticComponent<SegmentedControlProps & react.RefAttributes<HTMLDivElement>>;
13
+
14
+ export { SegmentedControl, type SegmentedControlProps };
@@ -1,2 +1,14 @@
1
+ import * as react from 'react';
2
+ import { SegmentGroup } from '@chakra-ui/react';
1
3
 
2
- export { }
4
+ interface Item {
5
+ value: string;
6
+ label: React.ReactNode;
7
+ disabled?: boolean;
8
+ }
9
+ interface SegmentedControlProps extends SegmentGroup.RootProps {
10
+ items: Array<string | Item>;
11
+ }
12
+ declare const SegmentedControl: react.ForwardRefExoticComponent<SegmentedControlProps & react.RefAttributes<HTMLDivElement>>;
13
+
14
+ export { SegmentedControl, type SegmentedControlProps };
@@ -1,2 +1,8 @@
1
1
  'use client'
2
- import "../../chunk-CTOVNZVS.js";
2
+ import {
3
+ SegmentedControl
4
+ } from "../../chunk-SKXSBAOS.js";
5
+ import "../../chunk-RTMS5TJN.js";
6
+ export {
7
+ SegmentedControl
8
+ };