@saas-ui/react 3.0.0-alpha.7 → 3.0.0-alpha.8
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.
- package/CHANGELOG.md +7 -0
- package/dist/chunk-7VSTNV2B.js +53 -0
- package/dist/{chunk-ZWSZQZ5G.js → chunk-CB52LBJK.js} +1 -3
- package/dist/{chunk-GEPWRHHH.js → chunk-H6TFEHY4.js} +1 -3
- package/dist/{chunk-5T7S5OAM.js → chunk-JGHXJ3PI.js} +2 -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 +2 -0
- package/dist/components/menu/index.d.cts +3 -1
- package/dist/components/menu/index.d.ts +3 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/index.cjs +438 -2315
- package/dist/index.js +24 -24
- package/package.json +3 -2
- package/dist/chunk-VBIVLREP.js +0 -45
- package/dist/chunk-YWJZWB6I.js +0 -1892
package/dist/index.cjs
CHANGED
@@ -66,7 +66,7 @@ __export(src_exports, {
|
|
66
66
|
Switch: () => Switch,
|
67
67
|
Toaster: () => Toaster,
|
68
68
|
Tooltip: () => Tooltip,
|
69
|
-
createSystem: () =>
|
69
|
+
createSystem: () => import_react161.createSystem,
|
70
70
|
defaultConfig: () => defaultConfig,
|
71
71
|
defaultPresenceOptions: () => defaultPresenceOptions,
|
72
72
|
defaultSystem: () => defaultSystem,
|
@@ -379,6 +379,7 @@ var import_react5 = require("@chakra-ui/react");
|
|
379
379
|
var buttonRecipe = (0, import_react5.defineRecipe)({
|
380
380
|
className: "chakra-button",
|
381
381
|
base: {
|
382
|
+
colorPalette: "gray",
|
382
383
|
display: "inline-flex",
|
383
384
|
appearance: "none",
|
384
385
|
alignItems: "center",
|
@@ -8791,15 +8792,15 @@ var defaultConfig = (0, import_react97.mergeConfigs)(import_react97.defaultBaseC
|
|
8791
8792
|
var defaultSystem = (0, import_react97.createSystem)(defaultConfig);
|
8792
8793
|
|
8793
8794
|
// src/index.ts
|
8794
|
-
var
|
8795
|
+
var import_react161 = require("@chakra-ui/react");
|
8795
8796
|
|
8796
8797
|
// src/provider/sui-provider.tsx
|
8797
8798
|
var React = __toESM(require("react"), 1);
|
8798
8799
|
var import_react98 = require("@chakra-ui/react");
|
8799
8800
|
var import_jsx_runtime = require("react/jsx-runtime");
|
8800
8801
|
var SuiContext = React.createContext({});
|
8801
|
-
function SuiProvider(
|
8802
|
-
const { linkComponent, onError, children, ...rest } =
|
8802
|
+
function SuiProvider(props) {
|
8803
|
+
const { linkComponent, onError, children, ...rest } = props;
|
8803
8804
|
const context = React.useMemo(
|
8804
8805
|
() => ({
|
8805
8806
|
linkComponent
|
@@ -8843,9 +8844,9 @@ var AppShellMain = withContext(
|
|
8843
8844
|
{ forwardAsChild: true }
|
8844
8845
|
);
|
8845
8846
|
var AppShell = (0, import_react100.forwardRef)(
|
8846
|
-
(
|
8847
|
-
const { header, sidebar, aside, footer, children, ...rootProps } =
|
8848
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(AppShellRoot, { ref
|
8847
|
+
(props, ref) => {
|
8848
|
+
const { header, sidebar, aside, footer, children, ...rootProps } = props;
|
8849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(AppShellRoot, { ref, ...rootProps, children: [
|
8849
8850
|
header,
|
8850
8851
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(AppShellContent, { children: [
|
8851
8852
|
sidebar,
|
@@ -8863,9 +8864,9 @@ var import_react102 = require("react");
|
|
8863
8864
|
var import_react103 = require("@chakra-ui/react");
|
8864
8865
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
8865
8866
|
var Avatar = (0, import_react102.forwardRef)(
|
8866
|
-
function Avatar2(
|
8867
|
-
const { name, src, srcSet, loading, icon, fallback: fallback2, children, ...rest } =
|
8868
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react103.Avatar.Root, { ref
|
8867
|
+
function Avatar2(props, ref) {
|
8868
|
+
const { name, src, srcSet, loading, icon, fallback: fallback2, children, ...rest } = props;
|
8869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react103.Avatar.Root, { ref, ...rest, children: [
|
8869
8870
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AvatarFallback, { name, icon, children: fallback2 }),
|
8870
8871
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react103.Avatar.Image, { src, srcSet, loading }),
|
8871
8872
|
children
|
@@ -8873,9 +8874,9 @@ var Avatar = (0, import_react102.forwardRef)(
|
|
8873
8874
|
}
|
8874
8875
|
);
|
8875
8876
|
var AvatarFallback = (0, import_react102.forwardRef)(
|
8876
|
-
function AvatarFallback2(
|
8877
|
-
const { name, icon, children, ...rest } =
|
8878
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react103.Avatar.Fallback, { ref
|
8877
|
+
function AvatarFallback2(props, ref) {
|
8878
|
+
const { name, icon, children, ...rest } = props;
|
8879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react103.Avatar.Fallback, { ref, ...rest, children: [
|
8879
8880
|
children,
|
8880
8881
|
name != null && children == null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: getInitials(name) }),
|
8881
8882
|
name == null && children == null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react103.Avatar.Icon, { asChild: !!icon, children: icon })
|
@@ -8889,9 +8890,9 @@ function getInitials(name) {
|
|
8889
8890
|
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0);
|
8890
8891
|
}
|
8891
8892
|
var AvatarGroup = (0, import_react102.forwardRef)(
|
8892
|
-
function AvatarGroup2(
|
8893
|
-
const { size, variant, borderless, ...rest } =
|
8894
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react103.Avatar.PropsProvider, { value: { size, variant, borderless }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react103.Group, { gap: "0", spaceX: "-3", ref
|
8893
|
+
function AvatarGroup2(props, ref) {
|
8894
|
+
const { size, variant, borderless, ...rest } = props;
|
8895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react103.Avatar.PropsProvider, { value: { size, variant, borderless }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react103.Group, { gap: "0", spaceX: "-3", ref, ...rest }) });
|
8895
8896
|
}
|
8896
8897
|
);
|
8897
8898
|
|
@@ -8907,10 +8908,10 @@ var import_react104 = require("react");
|
|
8907
8908
|
var import_react105 = require("@chakra-ui/react");
|
8908
8909
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
8909
8910
|
var BreadcrumbRoot = (0, import_react104.forwardRef)(
|
8910
|
-
function BreadcrumbRoot2(
|
8911
|
-
const { separator = "/", separatorGap, children, ...rest } =
|
8911
|
+
function BreadcrumbRoot2(props, ref) {
|
8912
|
+
const { separator = "/", separatorGap, children, ...rest } = props;
|
8912
8913
|
const validChildren = import_react104.Children.toArray(children).filter(import_react104.isValidElement);
|
8913
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react105.Breadcrumb.Root, { ref
|
8914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react105.Breadcrumb.Root, { ref, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react105.Breadcrumb.List, { gap: separatorGap, children: validChildren.map((child, index) => {
|
8914
8915
|
const last = index === validChildren.length - 1;
|
8915
8916
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react104.Fragment, { children: [
|
8916
8917
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react105.Breadcrumb.Item, { children: child }),
|
@@ -8928,7 +8929,7 @@ var import_react106 = require("react");
|
|
8928
8929
|
var import_react107 = require("@chakra-ui/react");
|
8929
8930
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
8930
8931
|
var Button = (0, import_react106.forwardRef)(
|
8931
|
-
function Button2(
|
8932
|
+
function Button2(props, ref) {
|
8932
8933
|
const {
|
8933
8934
|
loading,
|
8934
8935
|
disabled,
|
@@ -8937,14 +8938,14 @@ var Button = (0, import_react106.forwardRef)(
|
|
8937
8938
|
variant = "glass",
|
8938
8939
|
colorPalette = variant === "glass" ? "accent" : "gray",
|
8939
8940
|
...rest
|
8940
|
-
} =
|
8941
|
+
} = props;
|
8941
8942
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
8942
8943
|
import_react107.Button,
|
8943
8944
|
{
|
8944
8945
|
colorPalette,
|
8945
8946
|
disabled: loading || disabled,
|
8946
8947
|
variant,
|
8947
|
-
ref
|
8948
|
+
ref,
|
8948
8949
|
...rest,
|
8949
8950
|
children: loading && !loadingText ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
8950
8951
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react107.AbsoluteCenter, { display: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react107.Spinner, { size: "inherit", color: "inherit" }) }),
|
@@ -8963,10 +8964,10 @@ var import_react108 = require("react");
|
|
8963
8964
|
var import_react109 = require("@chakra-ui/react");
|
8964
8965
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
8965
8966
|
var Checkbox = (0, import_react108.forwardRef)(
|
8966
|
-
function Checkbox2(
|
8967
|
-
const { icon, children, inputProps, rootRef, ...rest } =
|
8967
|
+
function Checkbox2(props, ref) {
|
8968
|
+
const { icon, children, inputProps, rootRef, ...rest } = props;
|
8968
8969
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react109.Checkbox.Root, { ref: rootRef, ...rest, children: [
|
8969
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react109.Checkbox.HiddenInput, { ref
|
8970
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react109.Checkbox.HiddenInput, { ref, ...inputProps }),
|
8970
8971
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react109.Checkbox.Control, { children: icon || /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react109.Checkbox.Indicator, {}) }),
|
8971
8972
|
children != null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react109.Checkbox.Label, { children })
|
8972
8973
|
] });
|
@@ -8979,7 +8980,7 @@ var import_react112 = require("@chakra-ui/react");
|
|
8979
8980
|
|
8980
8981
|
// src/components/icons/create-icon.tsx
|
8981
8982
|
var import_react110 = require("@chakra-ui/react");
|
8982
|
-
var createIcon = (
|
8983
|
+
var createIcon = (props) => {
|
8983
8984
|
return (0, import_react110.createIcon)({
|
8984
8985
|
viewBox: "0 0 24 24",
|
8985
8986
|
defaultProps: {
|
@@ -8989,7 +8990,7 @@ var createIcon = (props2) => {
|
|
8989
8990
|
strokeLinecap: "round",
|
8990
8991
|
strokeLinejoin: "round"
|
8991
8992
|
},
|
8992
|
-
...
|
8993
|
+
...props
|
8993
8994
|
});
|
8994
8995
|
};
|
8995
8996
|
|
@@ -9079,9 +9080,9 @@ var CheckIcon = createIcon({
|
|
9079
9080
|
// src/components/close-button/close-button.tsx
|
9080
9081
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
9081
9082
|
var CloseButton = (0, import_react111.forwardRef)(
|
9082
|
-
function CloseButton2(
|
9083
|
+
function CloseButton2(props, ref) {
|
9083
9084
|
var _a7;
|
9084
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react112.IconButton, { variant: "ghost", "aria-label": "Close", ref
|
9085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react112.IconButton, { variant: "ghost", "aria-label": "Close", ref, ...props, children: (_a7 = props.children) != null ? _a7 : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CloseIcon, {}) });
|
9085
9086
|
}
|
9086
9087
|
);
|
9087
9088
|
|
@@ -9101,8 +9102,8 @@ var Key = ({ children }) => {
|
|
9101
9102
|
}
|
9102
9103
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react113.Kbd, { children });
|
9103
9104
|
};
|
9104
|
-
var Command = (
|
9105
|
-
const { children, ...rest } =
|
9105
|
+
var Command = (props) => {
|
9106
|
+
const { children, ...rest } = props;
|
9106
9107
|
if (typeof children !== "string") {
|
9107
9108
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children });
|
9108
9109
|
}
|
@@ -9119,7 +9120,7 @@ __export(namespace_exports, {
|
|
9119
9120
|
Body: () => DialogBody,
|
9120
9121
|
CloseTrigger: () => DialogCloseTrigger,
|
9121
9122
|
Content: () => DialogContent,
|
9122
|
-
Context: () => DialogContext,
|
9123
|
+
Context: () => import_dialog2.DialogContext,
|
9123
9124
|
Description: () => DialogDescription,
|
9124
9125
|
Footer: () => DialogFooter,
|
9125
9126
|
Header: () => DialogHeader,
|
@@ -9129,1905 +9130,47 @@ __export(namespace_exports, {
|
|
9129
9130
|
});
|
9130
9131
|
|
9131
9132
|
// src/components/dialog/dialog.tsx
|
9132
|
-
var
|
9133
|
-
var
|
9134
|
-
|
9135
|
-
// ../../node_modules/proxy-compare/dist/index.js
|
9136
|
-
var TRACK_MEMO_SYMBOL = Symbol();
|
9137
|
-
var GET_ORIGINAL_SYMBOL = Symbol();
|
9138
|
-
var AFFECTED_PROPERTY = "a";
|
9139
|
-
var IS_TARGET_COPIED_PROPERTY = "f";
|
9140
|
-
var PROXY_PROPERTY = "p";
|
9141
|
-
var PROXY_CACHE_PROPERTY = "c";
|
9142
|
-
var TARGET_CACHE_PROPERTY = "t";
|
9143
|
-
var NEXT_OBJECT_PROPERTY = "n";
|
9144
|
-
var CHANGED_PROPERTY = "g";
|
9145
|
-
var HAS_KEY_PROPERTY = "h";
|
9146
|
-
var ALL_OWN_KEYS_PROPERTY = "w";
|
9147
|
-
var HAS_OWN_KEY_PROPERTY = "o";
|
9148
|
-
var KEYS_PROPERTY = "k";
|
9149
|
-
var newProxy = (target, handler) => new Proxy(target, handler);
|
9150
|
-
var getProto = Object.getPrototypeOf;
|
9151
|
-
var objectsToTrack = /* @__PURE__ */ new WeakMap();
|
9152
|
-
var isObjectToTrack = (obj) => obj && (objectsToTrack.has(obj) ? objectsToTrack.get(obj) : getProto(obj) === Object.prototype || getProto(obj) === Array.prototype);
|
9153
|
-
var isObject = (x) => typeof x === "object" && x !== null;
|
9154
|
-
var needsToCopyTargetObject = (obj) => Object.values(Object.getOwnPropertyDescriptors(obj)).some((descriptor) => !descriptor.configurable && !descriptor.writable);
|
9155
|
-
var copyTargetObject = (obj) => {
|
9156
|
-
if (Array.isArray(obj)) {
|
9157
|
-
return Array.from(obj);
|
9158
|
-
}
|
9159
|
-
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
9160
|
-
Object.values(descriptors).forEach((desc) => {
|
9161
|
-
desc.configurable = true;
|
9162
|
-
});
|
9163
|
-
return Object.create(getProto(obj), descriptors);
|
9164
|
-
};
|
9165
|
-
var createProxyHandler = (origObj, isTargetCopied) => {
|
9166
|
-
const state = {
|
9167
|
-
[IS_TARGET_COPIED_PROPERTY]: isTargetCopied
|
9168
|
-
};
|
9169
|
-
let trackObject = false;
|
9170
|
-
const recordUsage = (type, key) => {
|
9171
|
-
if (!trackObject) {
|
9172
|
-
let used = state[AFFECTED_PROPERTY].get(origObj);
|
9173
|
-
if (!used) {
|
9174
|
-
used = {};
|
9175
|
-
state[AFFECTED_PROPERTY].set(origObj, used);
|
9176
|
-
}
|
9177
|
-
if (type === ALL_OWN_KEYS_PROPERTY) {
|
9178
|
-
used[ALL_OWN_KEYS_PROPERTY] = true;
|
9179
|
-
} else {
|
9180
|
-
let set2 = used[type];
|
9181
|
-
if (!set2) {
|
9182
|
-
set2 = /* @__PURE__ */ new Set();
|
9183
|
-
used[type] = set2;
|
9184
|
-
}
|
9185
|
-
set2.add(key);
|
9186
|
-
}
|
9187
|
-
}
|
9188
|
-
};
|
9189
|
-
const recordObjectAsUsed = () => {
|
9190
|
-
trackObject = true;
|
9191
|
-
state[AFFECTED_PROPERTY].delete(origObj);
|
9192
|
-
};
|
9193
|
-
const handler = {
|
9194
|
-
get(target, key) {
|
9195
|
-
if (key === GET_ORIGINAL_SYMBOL) {
|
9196
|
-
return origObj;
|
9197
|
-
}
|
9198
|
-
recordUsage(KEYS_PROPERTY, key);
|
9199
|
-
return createProxy(Reflect.get(target, key), state[AFFECTED_PROPERTY], state[PROXY_CACHE_PROPERTY], state[TARGET_CACHE_PROPERTY]);
|
9200
|
-
},
|
9201
|
-
has(target, key) {
|
9202
|
-
if (key === TRACK_MEMO_SYMBOL) {
|
9203
|
-
recordObjectAsUsed();
|
9204
|
-
return true;
|
9205
|
-
}
|
9206
|
-
recordUsage(HAS_KEY_PROPERTY, key);
|
9207
|
-
return Reflect.has(target, key);
|
9208
|
-
},
|
9209
|
-
getOwnPropertyDescriptor(target, key) {
|
9210
|
-
recordUsage(HAS_OWN_KEY_PROPERTY, key);
|
9211
|
-
return Reflect.getOwnPropertyDescriptor(target, key);
|
9212
|
-
},
|
9213
|
-
ownKeys(target) {
|
9214
|
-
recordUsage(ALL_OWN_KEYS_PROPERTY);
|
9215
|
-
return Reflect.ownKeys(target);
|
9216
|
-
}
|
9217
|
-
};
|
9218
|
-
if (isTargetCopied) {
|
9219
|
-
handler.set = handler.deleteProperty = () => false;
|
9220
|
-
}
|
9221
|
-
return [handler, state];
|
9222
|
-
};
|
9223
|
-
var getOriginalObject = (obj) => (
|
9224
|
-
// unwrap proxy
|
9225
|
-
obj[GET_ORIGINAL_SYMBOL] || // otherwise
|
9226
|
-
obj
|
9227
|
-
);
|
9228
|
-
var createProxy = (obj, affected, proxyCache, targetCache2) => {
|
9229
|
-
if (!isObjectToTrack(obj))
|
9230
|
-
return obj;
|
9231
|
-
let targetAndCopied = targetCache2 && targetCache2.get(obj);
|
9232
|
-
if (!targetAndCopied) {
|
9233
|
-
const target2 = getOriginalObject(obj);
|
9234
|
-
if (needsToCopyTargetObject(target2)) {
|
9235
|
-
targetAndCopied = [target2, copyTargetObject(target2)];
|
9236
|
-
} else {
|
9237
|
-
targetAndCopied = [target2];
|
9238
|
-
}
|
9239
|
-
targetCache2 === null || targetCache2 === void 0 ? void 0 : targetCache2.set(obj, targetAndCopied);
|
9240
|
-
}
|
9241
|
-
const [target, copiedTarget] = targetAndCopied;
|
9242
|
-
let handlerAndState = proxyCache && proxyCache.get(target);
|
9243
|
-
if (!handlerAndState || handlerAndState[1][IS_TARGET_COPIED_PROPERTY] !== !!copiedTarget) {
|
9244
|
-
handlerAndState = createProxyHandler(target, !!copiedTarget);
|
9245
|
-
handlerAndState[1][PROXY_PROPERTY] = newProxy(copiedTarget || target, handlerAndState[0]);
|
9246
|
-
if (proxyCache) {
|
9247
|
-
proxyCache.set(target, handlerAndState);
|
9248
|
-
}
|
9249
|
-
}
|
9250
|
-
handlerAndState[1][AFFECTED_PROPERTY] = affected;
|
9251
|
-
handlerAndState[1][PROXY_CACHE_PROPERTY] = proxyCache;
|
9252
|
-
handlerAndState[1][TARGET_CACHE_PROPERTY] = targetCache2;
|
9253
|
-
return handlerAndState[1][PROXY_PROPERTY];
|
9254
|
-
};
|
9255
|
-
var isAllOwnKeysChanged = (prevObj, nextObj) => {
|
9256
|
-
const prevKeys = Reflect.ownKeys(prevObj);
|
9257
|
-
const nextKeys = Reflect.ownKeys(nextObj);
|
9258
|
-
return prevKeys.length !== nextKeys.length || prevKeys.some((k, i) => k !== nextKeys[i]);
|
9259
|
-
};
|
9260
|
-
var isChanged = (prevObj, nextObj, affected, cache, isEqual2 = Object.is) => {
|
9261
|
-
if (isEqual2(prevObj, nextObj)) {
|
9262
|
-
return false;
|
9263
|
-
}
|
9264
|
-
if (!isObject(prevObj) || !isObject(nextObj))
|
9265
|
-
return true;
|
9266
|
-
const used = affected.get(getOriginalObject(prevObj));
|
9267
|
-
if (!used)
|
9268
|
-
return true;
|
9269
|
-
if (cache) {
|
9270
|
-
const hit = cache.get(prevObj);
|
9271
|
-
if (hit && hit[NEXT_OBJECT_PROPERTY] === nextObj) {
|
9272
|
-
return hit[CHANGED_PROPERTY];
|
9273
|
-
}
|
9274
|
-
cache.set(prevObj, {
|
9275
|
-
[NEXT_OBJECT_PROPERTY]: nextObj,
|
9276
|
-
[CHANGED_PROPERTY]: false
|
9277
|
-
});
|
9278
|
-
}
|
9279
|
-
let changed = null;
|
9280
|
-
try {
|
9281
|
-
for (const key of used[HAS_KEY_PROPERTY] || []) {
|
9282
|
-
changed = Reflect.has(prevObj, key) !== Reflect.has(nextObj, key);
|
9283
|
-
if (changed)
|
9284
|
-
return changed;
|
9285
|
-
}
|
9286
|
-
if (used[ALL_OWN_KEYS_PROPERTY] === true) {
|
9287
|
-
changed = isAllOwnKeysChanged(prevObj, nextObj);
|
9288
|
-
if (changed)
|
9289
|
-
return changed;
|
9290
|
-
} else {
|
9291
|
-
for (const key of used[HAS_OWN_KEY_PROPERTY] || []) {
|
9292
|
-
const hasPrev = !!Reflect.getOwnPropertyDescriptor(prevObj, key);
|
9293
|
-
const hasNext = !!Reflect.getOwnPropertyDescriptor(nextObj, key);
|
9294
|
-
changed = hasPrev !== hasNext;
|
9295
|
-
if (changed)
|
9296
|
-
return changed;
|
9297
|
-
}
|
9298
|
-
}
|
9299
|
-
for (const key of used[KEYS_PROPERTY] || []) {
|
9300
|
-
changed = isChanged(prevObj[key], nextObj[key], affected, cache, isEqual2);
|
9301
|
-
if (changed)
|
9302
|
-
return changed;
|
9303
|
-
}
|
9304
|
-
if (changed === null)
|
9305
|
-
changed = true;
|
9306
|
-
return changed;
|
9307
|
-
} finally {
|
9308
|
-
if (cache) {
|
9309
|
-
cache.set(prevObj, {
|
9310
|
-
[NEXT_OBJECT_PROPERTY]: nextObj,
|
9311
|
-
[CHANGED_PROPERTY]: changed
|
9312
|
-
});
|
9313
|
-
}
|
9314
|
-
}
|
9315
|
-
};
|
9316
|
-
var getUntracked = (obj) => {
|
9317
|
-
if (isObjectToTrack(obj)) {
|
9318
|
-
return obj[GET_ORIGINAL_SYMBOL] || null;
|
9319
|
-
}
|
9320
|
-
return null;
|
9321
|
-
};
|
9322
|
-
var markToTrack = (obj, mark = true) => {
|
9323
|
-
objectsToTrack.set(obj, mark);
|
9324
|
-
};
|
9325
|
-
|
9326
|
-
// ../../node_modules/@zag-js/store/dist/index.mjs
|
9327
|
-
function getGlobal() {
|
9328
|
-
if (typeof globalThis !== "undefined") return globalThis;
|
9329
|
-
if (typeof self !== "undefined") return self;
|
9330
|
-
if (typeof window !== "undefined") return window;
|
9331
|
-
if (typeof global !== "undefined") return global;
|
9332
|
-
}
|
9333
|
-
function makeGlobal(key, value) {
|
9334
|
-
const g = getGlobal();
|
9335
|
-
if (!g) return value();
|
9336
|
-
g[key] || (g[key] = value());
|
9337
|
-
return g[key];
|
9338
|
-
}
|
9339
|
-
var isDev = () => process.env.NODE_ENV !== "production";
|
9340
|
-
var isObject2 = (x) => typeof x === "object" && x !== null;
|
9341
|
-
var proxyStateMap = makeGlobal("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap());
|
9342
|
-
var refSet = makeGlobal("__zag__refSet", () => /* @__PURE__ */ new WeakSet());
|
9343
|
-
var isReactElement = (x) => typeof x === "object" && x !== null && "$$typeof" in x;
|
9344
|
-
var isVueElement = (x) => typeof x === "object" && x !== null && "__v_isVNode" in x;
|
9345
|
-
var isDOMElement = (x) => typeof x === "object" && x !== null && "nodeType" in x && typeof x.nodeName === "string";
|
9346
|
-
var isElement = (x) => isReactElement(x) || isVueElement(x) || isDOMElement(x);
|
9347
|
-
var buildProxyFunction = (objectIs = Object.is, newProxy2 = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject2(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !isElement(x) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {
|
9348
|
-
switch (promise.status) {
|
9349
|
-
case "fulfilled":
|
9350
|
-
return promise.value;
|
9351
|
-
case "rejected":
|
9352
|
-
throw promise.reason;
|
9353
|
-
default:
|
9354
|
-
throw promise;
|
9355
|
-
}
|
9356
|
-
}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {
|
9357
|
-
const cache = snapCache.get(target);
|
9358
|
-
if ((cache == null ? void 0 : cache[0]) === version) {
|
9359
|
-
return cache[1];
|
9360
|
-
}
|
9361
|
-
const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));
|
9362
|
-
markToTrack(snap, true);
|
9363
|
-
snapCache.set(target, [version, snap]);
|
9364
|
-
Reflect.ownKeys(target).forEach((key) => {
|
9365
|
-
const value = Reflect.get(target, key);
|
9366
|
-
if (refSet.has(value)) {
|
9367
|
-
markToTrack(value, false);
|
9368
|
-
snap[key] = value;
|
9369
|
-
} else if (value instanceof Promise) {
|
9370
|
-
Object.defineProperty(snap, key, {
|
9371
|
-
get() {
|
9372
|
-
return handlePromise(value);
|
9373
|
-
}
|
9374
|
-
});
|
9375
|
-
} else if (proxyStateMap.has(value)) {
|
9376
|
-
snap[key] = snapshot(value, handlePromise);
|
9377
|
-
} else {
|
9378
|
-
snap[key] = value;
|
9379
|
-
}
|
9380
|
-
});
|
9381
|
-
return Object.freeze(snap);
|
9382
|
-
}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction2 = (initialObject) => {
|
9383
|
-
if (!isObject2(initialObject)) {
|
9384
|
-
throw new Error("object required");
|
9385
|
-
}
|
9386
|
-
const found = proxyCache.get(initialObject);
|
9387
|
-
if (found) {
|
9388
|
-
return found;
|
9389
|
-
}
|
9390
|
-
let version = versionHolder[0];
|
9391
|
-
const listeners = /* @__PURE__ */ new Set();
|
9392
|
-
const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {
|
9393
|
-
if (version !== nextVersion) {
|
9394
|
-
version = nextVersion;
|
9395
|
-
listeners.forEach((listener) => listener(op, nextVersion));
|
9396
|
-
}
|
9397
|
-
};
|
9398
|
-
let checkVersion = versionHolder[1];
|
9399
|
-
const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {
|
9400
|
-
if (checkVersion !== nextCheckVersion && !listeners.size) {
|
9401
|
-
checkVersion = nextCheckVersion;
|
9402
|
-
propProxyStates.forEach(([propProxyState]) => {
|
9403
|
-
const propVersion = propProxyState[1](nextCheckVersion);
|
9404
|
-
if (propVersion > version) {
|
9405
|
-
version = propVersion;
|
9406
|
-
}
|
9407
|
-
});
|
9408
|
-
}
|
9409
|
-
return version;
|
9410
|
-
};
|
9411
|
-
const createPropListener = (prop) => (op, nextVersion) => {
|
9412
|
-
const newOp = [...op];
|
9413
|
-
newOp[1] = [prop, ...newOp[1]];
|
9414
|
-
notifyUpdate(newOp, nextVersion);
|
9415
|
-
};
|
9416
|
-
const propProxyStates = /* @__PURE__ */ new Map();
|
9417
|
-
const addPropListener = (prop, propProxyState) => {
|
9418
|
-
if (isDev() && propProxyStates.has(prop)) {
|
9419
|
-
throw new Error("prop listener already exists");
|
9420
|
-
}
|
9421
|
-
if (listeners.size) {
|
9422
|
-
const remove = propProxyState[3](createPropListener(prop));
|
9423
|
-
propProxyStates.set(prop, [propProxyState, remove]);
|
9424
|
-
} else {
|
9425
|
-
propProxyStates.set(prop, [propProxyState]);
|
9426
|
-
}
|
9427
|
-
};
|
9428
|
-
const removePropListener = (prop) => {
|
9429
|
-
var _a7;
|
9430
|
-
const entry = propProxyStates.get(prop);
|
9431
|
-
if (entry) {
|
9432
|
-
propProxyStates.delete(prop);
|
9433
|
-
(_a7 = entry[1]) == null ? void 0 : _a7.call(entry);
|
9434
|
-
}
|
9435
|
-
};
|
9436
|
-
const addListener = (listener) => {
|
9437
|
-
listeners.add(listener);
|
9438
|
-
if (listeners.size === 1) {
|
9439
|
-
propProxyStates.forEach(([propProxyState, prevRemove], prop) => {
|
9440
|
-
if (isDev() && prevRemove) {
|
9441
|
-
throw new Error("remove already exists");
|
9442
|
-
}
|
9443
|
-
const remove = propProxyState[3](createPropListener(prop));
|
9444
|
-
propProxyStates.set(prop, [propProxyState, remove]);
|
9445
|
-
});
|
9446
|
-
}
|
9447
|
-
const removeListener = () => {
|
9448
|
-
listeners.delete(listener);
|
9449
|
-
if (listeners.size === 0) {
|
9450
|
-
propProxyStates.forEach(([propProxyState, remove], prop) => {
|
9451
|
-
if (remove) {
|
9452
|
-
remove();
|
9453
|
-
propProxyStates.set(prop, [propProxyState]);
|
9454
|
-
}
|
9455
|
-
});
|
9456
|
-
}
|
9457
|
-
};
|
9458
|
-
return removeListener;
|
9459
|
-
};
|
9460
|
-
const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));
|
9461
|
-
const handler = {
|
9462
|
-
deleteProperty(target, prop) {
|
9463
|
-
const prevValue = Reflect.get(target, prop);
|
9464
|
-
removePropListener(prop);
|
9465
|
-
const deleted = Reflect.deleteProperty(target, prop);
|
9466
|
-
if (deleted) {
|
9467
|
-
notifyUpdate(["delete", [prop], prevValue]);
|
9468
|
-
}
|
9469
|
-
return deleted;
|
9470
|
-
},
|
9471
|
-
set(target, prop, value, receiver) {
|
9472
|
-
var _a7;
|
9473
|
-
const hasPrevValue = Reflect.has(target, prop);
|
9474
|
-
const prevValue = Reflect.get(target, prop, receiver);
|
9475
|
-
if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {
|
9476
|
-
return true;
|
9477
|
-
}
|
9478
|
-
removePropListener(prop);
|
9479
|
-
if (isObject2(value)) {
|
9480
|
-
value = getUntracked(value) || value;
|
9481
|
-
}
|
9482
|
-
let nextValue = value;
|
9483
|
-
if ((_a7 = Object.getOwnPropertyDescriptor(target, prop)) == null ? void 0 : _a7.set) ;
|
9484
|
-
else if (value instanceof Promise) {
|
9485
|
-
value.then((v) => {
|
9486
|
-
Object.assign(value, { status: "fulfilled", value: v });
|
9487
|
-
notifyUpdate(["resolve", [prop], v]);
|
9488
|
-
}).catch((e) => {
|
9489
|
-
Object.assign(value, { status: "rejected", reason: e });
|
9490
|
-
notifyUpdate(["reject", [prop], e]);
|
9491
|
-
});
|
9492
|
-
} else {
|
9493
|
-
if (!proxyStateMap.has(value) && canProxy(value)) {
|
9494
|
-
nextValue = proxy(value);
|
9495
|
-
}
|
9496
|
-
const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);
|
9497
|
-
if (childProxyState) {
|
9498
|
-
addPropListener(prop, childProxyState);
|
9499
|
-
}
|
9500
|
-
}
|
9501
|
-
Reflect.set(target, prop, nextValue, receiver);
|
9502
|
-
notifyUpdate(["set", [prop], value, prevValue]);
|
9503
|
-
return true;
|
9504
|
-
}
|
9505
|
-
};
|
9506
|
-
const proxyObject = newProxy2(baseObject, handler);
|
9507
|
-
proxyCache.set(initialObject, proxyObject);
|
9508
|
-
const proxyState = [baseObject, ensureVersion, createSnapshot, addListener];
|
9509
|
-
proxyStateMap.set(proxyObject, proxyState);
|
9510
|
-
Reflect.ownKeys(initialObject).forEach((key) => {
|
9511
|
-
const desc = Object.getOwnPropertyDescriptor(initialObject, key);
|
9512
|
-
if (desc.get || desc.set) {
|
9513
|
-
Object.defineProperty(baseObject, key, desc);
|
9514
|
-
} else {
|
9515
|
-
proxyObject[key] = initialObject[key];
|
9516
|
-
}
|
9517
|
-
});
|
9518
|
-
return proxyObject;
|
9519
|
-
}) => [
|
9520
|
-
// public functions
|
9521
|
-
proxyFunction2,
|
9522
|
-
// shared state
|
9523
|
-
proxyStateMap,
|
9524
|
-
refSet,
|
9525
|
-
// internal things
|
9526
|
-
objectIs,
|
9527
|
-
newProxy2,
|
9528
|
-
canProxy,
|
9529
|
-
defaultHandlePromise,
|
9530
|
-
snapCache,
|
9531
|
-
createSnapshot,
|
9532
|
-
proxyCache,
|
9533
|
-
versionHolder
|
9534
|
-
];
|
9535
|
-
var [proxyFunction] = buildProxyFunction();
|
9536
|
-
function proxy(initialObject = {}) {
|
9537
|
-
return proxyFunction(initialObject);
|
9538
|
-
}
|
9539
|
-
function subscribe(proxyObject, callback, notifyInSync) {
|
9540
|
-
const proxyState = proxyStateMap.get(proxyObject);
|
9541
|
-
if (isDev() && !proxyState) {
|
9542
|
-
console.warn("Please use proxy object");
|
9543
|
-
}
|
9544
|
-
let promise;
|
9545
|
-
const ops = [];
|
9546
|
-
const addListener = proxyState[3];
|
9547
|
-
let isListenerActive = false;
|
9548
|
-
const listener = (op) => {
|
9549
|
-
ops.push(op);
|
9550
|
-
if (notifyInSync) {
|
9551
|
-
callback(ops.splice(0));
|
9552
|
-
return;
|
9553
|
-
}
|
9554
|
-
if (!promise) {
|
9555
|
-
promise = Promise.resolve().then(() => {
|
9556
|
-
promise = void 0;
|
9557
|
-
if (isListenerActive) {
|
9558
|
-
callback(ops.splice(0));
|
9559
|
-
}
|
9560
|
-
});
|
9561
|
-
}
|
9562
|
-
};
|
9563
|
-
const removeListener = addListener(listener);
|
9564
|
-
isListenerActive = true;
|
9565
|
-
return () => {
|
9566
|
-
isListenerActive = false;
|
9567
|
-
removeListener();
|
9568
|
-
};
|
9569
|
-
}
|
9570
|
-
function snapshot(proxyObject, handlePromise) {
|
9571
|
-
const proxyState = proxyStateMap.get(proxyObject);
|
9572
|
-
if (isDev() && !proxyState) {
|
9573
|
-
console.warn("Please use proxy object");
|
9574
|
-
}
|
9575
|
-
const [target, ensureVersion, createSnapshot] = proxyState;
|
9576
|
-
return createSnapshot(target, ensureVersion(), handlePromise);
|
9577
|
-
}
|
9578
|
-
function ref(obj) {
|
9579
|
-
refSet.add(obj);
|
9580
|
-
return obj;
|
9581
|
-
}
|
9582
|
-
function proxyWithComputed(initialObject, computedFns) {
|
9583
|
-
const keys = Object.keys(computedFns);
|
9584
|
-
keys.forEach((key) => {
|
9585
|
-
if (Object.getOwnPropertyDescriptor(initialObject, key)) {
|
9586
|
-
throw new Error("object property already defined");
|
9587
|
-
}
|
9588
|
-
const computedFn = computedFns[key];
|
9589
|
-
const { get, set: set2 } = typeof computedFn === "function" ? { get: computedFn } : computedFn;
|
9590
|
-
const desc = {};
|
9591
|
-
desc.get = () => get(snapshot(proxyObject));
|
9592
|
-
if (set2) {
|
9593
|
-
desc.set = (newValue) => set2(proxyObject, newValue);
|
9594
|
-
}
|
9595
|
-
Object.defineProperty(initialObject, key, desc);
|
9596
|
-
});
|
9597
|
-
const proxyObject = proxy(initialObject);
|
9598
|
-
return proxyObject;
|
9599
|
-
}
|
9600
|
-
|
9601
|
-
// ../../node_modules/@zag-js/utils/dist/index.mjs
|
9602
|
-
function clear(v) {
|
9603
|
-
while (v.length > 0) v.pop();
|
9604
|
-
return v;
|
9605
|
-
}
|
9606
|
-
var runIfFn = (v, ...a) => {
|
9607
|
-
const res = typeof v === "function" ? v(...a) : v;
|
9608
|
-
return res != null ? res : void 0;
|
9609
|
-
};
|
9610
|
-
var cast = (v) => v;
|
9611
|
-
var noop = () => {
|
9612
|
-
};
|
9613
|
-
var callAll = (...fns) => (...a) => {
|
9614
|
-
fns.forEach(function(fn) {
|
9615
|
-
fn == null ? void 0 : fn(...a);
|
9616
|
-
});
|
9617
|
-
};
|
9618
|
-
var uuid = /* @__PURE__ */ (() => {
|
9619
|
-
let id = 0;
|
9620
|
-
return () => {
|
9621
|
-
id++;
|
9622
|
-
return id.toString(36);
|
9623
|
-
};
|
9624
|
-
})();
|
9625
|
-
var isDev2 = () => process.env.NODE_ENV !== "production";
|
9626
|
-
var isArray = (v) => Array.isArray(v);
|
9627
|
-
var isObjectLike = (v) => v != null && typeof v === "object";
|
9628
|
-
var isObject3 = (v) => isObjectLike(v) && !isArray(v);
|
9629
|
-
var isNumber = (v) => typeof v === "number" && !Number.isNaN(v);
|
9630
|
-
var isString = (v) => typeof v === "string";
|
9631
|
-
var isFunction = (v) => typeof v === "function";
|
9632
|
-
var hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
|
9633
|
-
var baseGetTag = (v) => Object.prototype.toString.call(v);
|
9634
|
-
var fnToString = Function.prototype.toString;
|
9635
|
-
var objectCtorString = fnToString.call(Object);
|
9636
|
-
var isPlainObject = (v) => {
|
9637
|
-
if (!isObjectLike(v) || baseGetTag(v) != "[object Object]") return false;
|
9638
|
-
const proto = Object.getPrototypeOf(v);
|
9639
|
-
if (proto === null) return true;
|
9640
|
-
const Ctor = hasProp(proto, "constructor") && proto.constructor;
|
9641
|
-
return typeof Ctor == "function" && Ctor instanceof Ctor && fnToString.call(Ctor) == objectCtorString;
|
9642
|
-
};
|
9643
|
-
function compact(obj) {
|
9644
|
-
if (!isPlainObject2(obj) || obj === void 0) {
|
9645
|
-
return obj;
|
9646
|
-
}
|
9647
|
-
const keys = Reflect.ownKeys(obj).filter((key) => typeof key === "string");
|
9648
|
-
const filtered = {};
|
9649
|
-
for (const key of keys) {
|
9650
|
-
const value = obj[key];
|
9651
|
-
if (value !== void 0) {
|
9652
|
-
filtered[key] = compact(value);
|
9653
|
-
}
|
9654
|
-
}
|
9655
|
-
return filtered;
|
9656
|
-
}
|
9657
|
-
var isPlainObject2 = (value) => {
|
9658
|
-
return value && typeof value === "object" && value.constructor === Object;
|
9659
|
-
};
|
9660
|
-
function warn(...a) {
|
9661
|
-
const m = a.length === 1 ? a[0] : a[1];
|
9662
|
-
const c = a.length === 2 ? a[0] : true;
|
9663
|
-
if (c && process.env.NODE_ENV !== "production") {
|
9664
|
-
console.warn(m);
|
9665
|
-
}
|
9666
|
-
}
|
9667
|
-
function invariant(...a) {
|
9668
|
-
const m = a.length === 1 ? a[0] : a[1];
|
9669
|
-
const c = a.length === 2 ? a[0] : true;
|
9670
|
-
if (c && process.env.NODE_ENV !== "production") {
|
9671
|
-
throw new Error(m);
|
9672
|
-
}
|
9673
|
-
}
|
9674
|
-
|
9675
|
-
// ../../node_modules/klona/full/index.mjs
|
9676
|
-
function set(obj, key, val) {
|
9677
|
-
if (typeof val.value === "object") val.value = klona(val.value);
|
9678
|
-
if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === "__proto__") {
|
9679
|
-
Object.defineProperty(obj, key, val);
|
9680
|
-
} else obj[key] = val.value;
|
9681
|
-
}
|
9682
|
-
function klona(x) {
|
9683
|
-
if (typeof x !== "object") return x;
|
9684
|
-
var i = 0, k, list, tmp, str = Object.prototype.toString.call(x);
|
9685
|
-
if (str === "[object Object]") {
|
9686
|
-
tmp = Object.create(x.__proto__ || null);
|
9687
|
-
} else if (str === "[object Array]") {
|
9688
|
-
tmp = Array(x.length);
|
9689
|
-
} else if (str === "[object Set]") {
|
9690
|
-
tmp = /* @__PURE__ */ new Set();
|
9691
|
-
x.forEach(function(val) {
|
9692
|
-
tmp.add(klona(val));
|
9693
|
-
});
|
9694
|
-
} else if (str === "[object Map]") {
|
9695
|
-
tmp = /* @__PURE__ */ new Map();
|
9696
|
-
x.forEach(function(val, key) {
|
9697
|
-
tmp.set(klona(key), klona(val));
|
9698
|
-
});
|
9699
|
-
} else if (str === "[object Date]") {
|
9700
|
-
tmp = /* @__PURE__ */ new Date(+x);
|
9701
|
-
} else if (str === "[object RegExp]") {
|
9702
|
-
tmp = new RegExp(x.source, x.flags);
|
9703
|
-
} else if (str === "[object DataView]") {
|
9704
|
-
tmp = new x.constructor(klona(x.buffer));
|
9705
|
-
} else if (str === "[object ArrayBuffer]") {
|
9706
|
-
tmp = x.slice(0);
|
9707
|
-
} else if (str.slice(-6) === "Array]") {
|
9708
|
-
tmp = new x.constructor(x);
|
9709
|
-
}
|
9710
|
-
if (tmp) {
|
9711
|
-
for (list = Object.getOwnPropertySymbols(x); i < list.length; i++) {
|
9712
|
-
set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));
|
9713
|
-
}
|
9714
|
-
for (i = 0, list = Object.getOwnPropertyNames(x); i < list.length; i++) {
|
9715
|
-
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k]) continue;
|
9716
|
-
set(tmp, k, Object.getOwnPropertyDescriptor(x, k));
|
9717
|
-
}
|
9718
|
-
}
|
9719
|
-
return tmp || x;
|
9720
|
-
}
|
9721
|
-
|
9722
|
-
// ../../node_modules/@zag-js/core/dist/index.mjs
|
9723
|
-
var __defProp2 = Object.defineProperty;
|
9724
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
9725
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
9726
|
-
function deepMerge(source, ...objects) {
|
9727
|
-
for (const obj of objects) {
|
9728
|
-
const target = compact(obj);
|
9729
|
-
for (const key in target) {
|
9730
|
-
if (isPlainObject(obj[key])) {
|
9731
|
-
if (!source[key]) {
|
9732
|
-
source[key] = {};
|
9733
|
-
}
|
9734
|
-
deepMerge(source[key], obj[key]);
|
9735
|
-
} else {
|
9736
|
-
source[key] = obj[key];
|
9737
|
-
}
|
9738
|
-
}
|
9739
|
-
}
|
9740
|
-
return source;
|
9741
|
-
}
|
9742
|
-
function structuredClone(v) {
|
9743
|
-
return klona(v);
|
9744
|
-
}
|
9745
|
-
function toEvent(event) {
|
9746
|
-
const obj = isString(event) ? { type: event } : event;
|
9747
|
-
return obj;
|
9748
|
-
}
|
9749
|
-
function toArray(value) {
|
9750
|
-
if (!value) return [];
|
9751
|
-
return isArray(value) ? value.slice() : [value];
|
9752
|
-
}
|
9753
|
-
function isGuardHelper(value) {
|
9754
|
-
return isObject3(value) && value.predicate != null;
|
9755
|
-
}
|
9756
|
-
var Truthy = () => true;
|
9757
|
-
function determineGuardFn(guard, guardMap) {
|
9758
|
-
guard = guard != null ? guard : Truthy;
|
9759
|
-
return (context, event, meta) => {
|
9760
|
-
if (isString(guard)) {
|
9761
|
-
const value = guardMap[guard];
|
9762
|
-
return isFunction(value) ? value(context, event, meta) : value;
|
9763
|
-
}
|
9764
|
-
if (isGuardHelper(guard)) {
|
9765
|
-
return guard.predicate(guardMap)(context, event, meta);
|
9766
|
-
}
|
9767
|
-
return guard == null ? void 0 : guard(context, event, meta);
|
9768
|
-
};
|
9769
|
-
}
|
9770
|
-
function determineActionsFn(values, guardMap) {
|
9771
|
-
return (context, event, meta) => {
|
9772
|
-
if (isGuardHelper(values)) {
|
9773
|
-
return values.predicate(guardMap)(context, event, meta);
|
9774
|
-
}
|
9775
|
-
return values;
|
9776
|
-
};
|
9777
|
-
}
|
9778
|
-
function createProxy2(config) {
|
9779
|
-
var _a7, _b6, _c5, _d5, _e5;
|
9780
|
-
const computedContext = (_a7 = config.computed) != null ? _a7 : cast({});
|
9781
|
-
const initialContext = (_b6 = config.context) != null ? _b6 : cast({});
|
9782
|
-
const initialTags = config.initial ? (_d5 = (_c5 = config.states) == null ? void 0 : _c5[config.initial]) == null ? void 0 : _d5.tags : [];
|
9783
|
-
const state = proxy({
|
9784
|
-
value: (_e5 = config.initial) != null ? _e5 : "",
|
9785
|
-
previousValue: "",
|
9786
|
-
event: cast({}),
|
9787
|
-
previousEvent: cast({}),
|
9788
|
-
context: proxyWithComputed(initialContext, computedContext),
|
9789
|
-
done: false,
|
9790
|
-
tags: initialTags != null ? initialTags : [],
|
9791
|
-
hasTag(tag) {
|
9792
|
-
return this.tags.includes(tag);
|
9793
|
-
},
|
9794
|
-
matches(...value) {
|
9795
|
-
return value.includes(this.value);
|
9796
|
-
},
|
9797
|
-
can(event) {
|
9798
|
-
return cast(this).nextEvents.includes(event);
|
9799
|
-
},
|
9800
|
-
get nextEvents() {
|
9801
|
-
var _a8, _b7, _c6, _d6;
|
9802
|
-
const stateEvents = (_c6 = (_b7 = (_a8 = config.states) == null ? void 0 : _a8[this.value]) == null ? void 0 : _b7["on"]) != null ? _c6 : {};
|
9803
|
-
const globalEvents = (_d6 = config == null ? void 0 : config.on) != null ? _d6 : {};
|
9804
|
-
return Object.keys({ ...stateEvents, ...globalEvents });
|
9805
|
-
},
|
9806
|
-
get changed() {
|
9807
|
-
if (this.event.value === "machine.init" || !this.previousValue) return false;
|
9808
|
-
return this.value !== this.previousValue;
|
9809
|
-
}
|
9810
|
-
});
|
9811
|
-
return cast(state);
|
9812
|
-
}
|
9813
|
-
function determineDelayFn(delay, delaysMap) {
|
9814
|
-
return (context, event) => {
|
9815
|
-
if (isNumber(delay)) return delay;
|
9816
|
-
if (isFunction(delay)) {
|
9817
|
-
return delay(context, event);
|
9818
|
-
}
|
9819
|
-
if (isString(delay)) {
|
9820
|
-
const value = Number.parseFloat(delay);
|
9821
|
-
if (!Number.isNaN(value)) {
|
9822
|
-
return value;
|
9823
|
-
}
|
9824
|
-
if (delaysMap) {
|
9825
|
-
const valueOrFn = delaysMap == null ? void 0 : delaysMap[delay];
|
9826
|
-
invariant(
|
9827
|
-
valueOrFn == null,
|
9828
|
-
`[@zag-js/core > determine-delay] Cannot determine delay for \`${delay}\`. It doesn't exist in \`options.delays\``
|
9829
|
-
);
|
9830
|
-
return isFunction(valueOrFn) ? valueOrFn(context, event) : valueOrFn;
|
9831
|
-
}
|
9832
|
-
}
|
9833
|
-
};
|
9834
|
-
}
|
9835
|
-
function toTarget(target) {
|
9836
|
-
return isString(target) ? { target } : target;
|
9837
|
-
}
|
9838
|
-
function determineTransitionFn(transitions, guardMap) {
|
9839
|
-
return (context, event, meta) => {
|
9840
|
-
return toArray(transitions).map(toTarget).find((transition) => {
|
9841
|
-
var _a7;
|
9842
|
-
const determineGuard = determineGuardFn(transition.guard, guardMap);
|
9843
|
-
const guard = determineGuard(context, event, meta);
|
9844
|
-
return (_a7 = guard != null ? guard : transition.target) != null ? _a7 : transition.actions;
|
9845
|
-
});
|
9846
|
-
};
|
9847
|
-
}
|
9848
|
-
var Machine = class {
|
9849
|
-
// Let's get started!
|
9850
|
-
constructor(config, options) {
|
9851
|
-
var _a7, _b6, _c5, _d5, _e5, _f5, _g5, _h3, _i3, _j3, _k3;
|
9852
|
-
__publicField(
|
9853
|
-
this,
|
9854
|
-
"status",
|
9855
|
-
"Not Started"
|
9856
|
-
/* NotStarted */
|
9857
|
-
);
|
9858
|
-
__publicField(this, "state");
|
9859
|
-
__publicField(this, "initialState");
|
9860
|
-
__publicField(this, "initialContext");
|
9861
|
-
__publicField(this, "id");
|
9862
|
-
__publicField(
|
9863
|
-
this,
|
9864
|
-
"type",
|
9865
|
-
"machine"
|
9866
|
-
/* Machine */
|
9867
|
-
);
|
9868
|
-
__publicField(this, "activityEvents", /* @__PURE__ */ new Map());
|
9869
|
-
__publicField(this, "delayedEvents", /* @__PURE__ */ new Map());
|
9870
|
-
__publicField(this, "stateListeners", /* @__PURE__ */ new Set());
|
9871
|
-
__publicField(this, "doneListeners", /* @__PURE__ */ new Set());
|
9872
|
-
__publicField(this, "contextWatchers", /* @__PURE__ */ new Set());
|
9873
|
-
__publicField(this, "removeStateListener", noop);
|
9874
|
-
__publicField(this, "parent");
|
9875
|
-
__publicField(this, "children", /* @__PURE__ */ new Map());
|
9876
|
-
__publicField(this, "guardMap");
|
9877
|
-
__publicField(this, "actionMap");
|
9878
|
-
__publicField(this, "delayMap");
|
9879
|
-
__publicField(this, "activityMap");
|
9880
|
-
__publicField(this, "sync");
|
9881
|
-
__publicField(this, "options");
|
9882
|
-
__publicField(this, "config");
|
9883
|
-
__publicField(this, "_created", () => {
|
9884
|
-
var _a8;
|
9885
|
-
const event = toEvent(
|
9886
|
-
"machine.created"
|
9887
|
-
/* Created */
|
9888
|
-
);
|
9889
|
-
this.executeActions((_a8 = this.config) == null ? void 0 : _a8.created, event);
|
9890
|
-
});
|
9891
|
-
__publicField(this, "start", (init) => {
|
9892
|
-
this.state.value = "";
|
9893
|
-
this.state.tags = [];
|
9894
|
-
if (this.status === "Running") {
|
9895
|
-
return this;
|
9896
|
-
}
|
9897
|
-
this.status = "Running";
|
9898
|
-
this.removeStateListener = subscribe(
|
9899
|
-
this.state,
|
9900
|
-
() => {
|
9901
|
-
this.stateListeners.forEach((listener) => {
|
9902
|
-
listener(this.stateSnapshot);
|
9903
|
-
});
|
9904
|
-
},
|
9905
|
-
this.sync
|
9906
|
-
);
|
9907
|
-
this.setupContextWatchers();
|
9908
|
-
this.executeActivities(
|
9909
|
-
toEvent(
|
9910
|
-
"machine.start"
|
9911
|
-
/* Start */
|
9912
|
-
),
|
9913
|
-
toArray(this.config.activities),
|
9914
|
-
"machine.start"
|
9915
|
-
/* Start */
|
9916
|
-
);
|
9917
|
-
this.executeActions(this.config.entry, toEvent(
|
9918
|
-
"machine.start"
|
9919
|
-
/* Start */
|
9920
|
-
));
|
9921
|
-
const event = toEvent(
|
9922
|
-
"machine.init"
|
9923
|
-
/* Init */
|
9924
|
-
);
|
9925
|
-
const target = isObject3(init) ? init.value : init;
|
9926
|
-
const context = isObject3(init) ? init.context : void 0;
|
9927
|
-
if (context) {
|
9928
|
-
this.setContext(context);
|
9929
|
-
}
|
9930
|
-
const transition = {
|
9931
|
-
target: target != null ? target : this.config.initial
|
9932
|
-
};
|
9933
|
-
const next = this.getNextStateInfo(transition, event);
|
9934
|
-
this.initialState = next;
|
9935
|
-
this.performStateChangeEffects(this.state.value, next, event);
|
9936
|
-
return this;
|
9937
|
-
});
|
9938
|
-
__publicField(this, "setupContextWatchers", () => {
|
9939
|
-
const { watch } = this.config;
|
9940
|
-
if (!watch) return;
|
9941
|
-
let prev = snapshot(this.state.context);
|
9942
|
-
const cleanup = subscribe(this.state.context, () => {
|
9943
|
-
var _a8, _b7;
|
9944
|
-
const next = snapshot(this.state.context);
|
9945
|
-
for (const [key, fn] of Object.entries(watch)) {
|
9946
|
-
const isEqual2 = (_b7 = (_a8 = this.options.compareFns) == null ? void 0 : _a8[key]) != null ? _b7 : Object.is;
|
9947
|
-
if (isEqual2(prev[key], next[key])) continue;
|
9948
|
-
this.executeActions(fn, this.state.event);
|
9949
|
-
}
|
9950
|
-
prev = next;
|
9951
|
-
});
|
9952
|
-
this.contextWatchers.add(cleanup);
|
9953
|
-
});
|
9954
|
-
__publicField(this, "stop", () => {
|
9955
|
-
if (this.status === "Stopped") return;
|
9956
|
-
this.performExitEffects(this.state.value, toEvent(
|
9957
|
-
"machine.stop"
|
9958
|
-
/* Stop */
|
9959
|
-
));
|
9960
|
-
this.executeActions(this.config.exit, toEvent(
|
9961
|
-
"machine.stop"
|
9962
|
-
/* Stop */
|
9963
|
-
));
|
9964
|
-
this.setState("");
|
9965
|
-
this.setEvent(
|
9966
|
-
"machine.stop"
|
9967
|
-
/* Stop */
|
9968
|
-
);
|
9969
|
-
this.stopStateListeners();
|
9970
|
-
this.stopChildren();
|
9971
|
-
this.stopActivities();
|
9972
|
-
this.stopDelayedEvents();
|
9973
|
-
this.stopContextWatchers();
|
9974
|
-
this.status = "Stopped";
|
9975
|
-
return this;
|
9976
|
-
});
|
9977
|
-
__publicField(this, "stopStateListeners", () => {
|
9978
|
-
this.removeStateListener();
|
9979
|
-
this.stateListeners.clear();
|
9980
|
-
});
|
9981
|
-
__publicField(this, "stopContextWatchers", () => {
|
9982
|
-
this.contextWatchers.forEach((fn) => fn());
|
9983
|
-
this.contextWatchers.clear();
|
9984
|
-
});
|
9985
|
-
__publicField(this, "stopDelayedEvents", () => {
|
9986
|
-
this.delayedEvents.forEach((state) => {
|
9987
|
-
state.forEach((stop) => stop());
|
9988
|
-
});
|
9989
|
-
this.delayedEvents.clear();
|
9990
|
-
});
|
9991
|
-
__publicField(this, "stopActivities", (state) => {
|
9992
|
-
var _a8, _b7;
|
9993
|
-
if (state) {
|
9994
|
-
(_a8 = this.activityEvents.get(state)) == null ? void 0 : _a8.forEach((stop) => stop());
|
9995
|
-
(_b7 = this.activityEvents.get(state)) == null ? void 0 : _b7.clear();
|
9996
|
-
this.activityEvents.delete(state);
|
9997
|
-
} else {
|
9998
|
-
this.activityEvents.forEach((state2) => {
|
9999
|
-
state2.forEach((stop) => stop());
|
10000
|
-
state2.clear();
|
10001
|
-
});
|
10002
|
-
this.activityEvents.clear();
|
10003
|
-
}
|
10004
|
-
});
|
10005
|
-
__publicField(this, "sendChild", (evt, to) => {
|
10006
|
-
const event = toEvent(evt);
|
10007
|
-
const id = runIfFn(to, this.contextSnapshot);
|
10008
|
-
const child = this.children.get(id);
|
10009
|
-
if (!child) {
|
10010
|
-
invariant(`[@zag-js/core] Cannot send '${event.type}' event to unknown child`);
|
10011
|
-
}
|
10012
|
-
child.send(event);
|
10013
|
-
});
|
10014
|
-
__publicField(this, "stopChild", (id) => {
|
10015
|
-
if (!this.children.has(id)) {
|
10016
|
-
invariant(`[@zag-js/core > stop-child] Cannot stop unknown child ${id}`);
|
10017
|
-
}
|
10018
|
-
this.children.get(id).stop();
|
10019
|
-
this.children.delete(id);
|
10020
|
-
});
|
10021
|
-
__publicField(this, "removeChild", (id) => {
|
10022
|
-
this.children.delete(id);
|
10023
|
-
});
|
10024
|
-
__publicField(this, "stopChildren", () => {
|
10025
|
-
this.children.forEach((child) => child.stop());
|
10026
|
-
this.children.clear();
|
10027
|
-
});
|
10028
|
-
__publicField(this, "setParent", (parent) => {
|
10029
|
-
this.parent = parent;
|
10030
|
-
});
|
10031
|
-
__publicField(this, "spawn", (src, id) => {
|
10032
|
-
const actor = runIfFn(src);
|
10033
|
-
if (id) actor.id = id;
|
10034
|
-
actor.type = "machine.actor";
|
10035
|
-
actor.setParent(this);
|
10036
|
-
this.children.set(actor.id, cast(actor));
|
10037
|
-
actor.onDone(() => {
|
10038
|
-
this.removeChild(actor.id);
|
10039
|
-
}).start();
|
10040
|
-
return cast(ref(actor));
|
10041
|
-
});
|
10042
|
-
__publicField(this, "stopActivity", (key) => {
|
10043
|
-
var _a8;
|
10044
|
-
if (!this.state.value) return;
|
10045
|
-
const cleanups = this.activityEvents.get(this.state.value);
|
10046
|
-
(_a8 = cleanups == null ? void 0 : cleanups.get(key)) == null ? void 0 : _a8();
|
10047
|
-
cleanups == null ? void 0 : cleanups.delete(key);
|
10048
|
-
});
|
10049
|
-
__publicField(this, "addActivityCleanup", (state, key, cleanup) => {
|
10050
|
-
var _a8;
|
10051
|
-
if (!state) return;
|
10052
|
-
if (!this.activityEvents.has(state)) {
|
10053
|
-
this.activityEvents.set(state, /* @__PURE__ */ new Map([[key, cleanup]]));
|
10054
|
-
} else {
|
10055
|
-
(_a8 = this.activityEvents.get(state)) == null ? void 0 : _a8.set(key, cleanup);
|
10056
|
-
}
|
10057
|
-
});
|
10058
|
-
__publicField(this, "setState", (target) => {
|
10059
|
-
this.state.previousValue = this.state.value;
|
10060
|
-
this.state.value = target;
|
10061
|
-
const stateNode = this.getStateNode(target);
|
10062
|
-
if (target == null) {
|
10063
|
-
clear(this.state.tags);
|
10064
|
-
} else {
|
10065
|
-
this.state.tags = toArray(stateNode == null ? void 0 : stateNode.tags);
|
10066
|
-
}
|
10067
|
-
});
|
10068
|
-
__publicField(this, "setContext", (context) => {
|
10069
|
-
if (!context) return;
|
10070
|
-
deepMerge(this.state.context, compact(context));
|
10071
|
-
});
|
10072
|
-
__publicField(this, "setOptions", (options2) => {
|
10073
|
-
const opts = compact(options2);
|
10074
|
-
this.actionMap = { ...this.actionMap, ...opts.actions };
|
10075
|
-
this.delayMap = { ...this.delayMap, ...opts.delays };
|
10076
|
-
this.activityMap = { ...this.activityMap, ...opts.activities };
|
10077
|
-
this.guardMap = { ...this.guardMap, ...opts.guards };
|
10078
|
-
});
|
10079
|
-
__publicField(this, "getStateNode", (state) => {
|
10080
|
-
var _a8;
|
10081
|
-
if (!state) return;
|
10082
|
-
return (_a8 = this.config.states) == null ? void 0 : _a8[state];
|
10083
|
-
});
|
10084
|
-
__publicField(this, "getNextStateInfo", (transitions, event) => {
|
10085
|
-
var _a8;
|
10086
|
-
const transition = this.determineTransition(transitions, event);
|
10087
|
-
const isTargetless = !(transition == null ? void 0 : transition.target);
|
10088
|
-
const target = (_a8 = transition == null ? void 0 : transition.target) != null ? _a8 : this.state.value;
|
10089
|
-
const changed = this.state.value !== target;
|
10090
|
-
const stateNode = this.getStateNode(target);
|
10091
|
-
const reenter = !isTargetless && !changed && !(transition == null ? void 0 : transition.internal);
|
10092
|
-
const info = {
|
10093
|
-
reenter,
|
10094
|
-
transition,
|
10095
|
-
stateNode,
|
10096
|
-
target,
|
10097
|
-
changed
|
10098
|
-
};
|
10099
|
-
this.log("NextState:", `[${event.type}]`, this.state.value, "---->", info.target);
|
10100
|
-
return info;
|
10101
|
-
});
|
10102
|
-
__publicField(this, "getAfterActions", (transition, delay) => {
|
10103
|
-
let id;
|
10104
|
-
const current = this.state.value;
|
10105
|
-
return {
|
10106
|
-
entry: () => {
|
10107
|
-
id = globalThis.setTimeout(() => {
|
10108
|
-
const next = this.getNextStateInfo(transition, this.state.event);
|
10109
|
-
this.performStateChangeEffects(current, next, this.state.event);
|
10110
|
-
}, delay);
|
10111
|
-
},
|
10112
|
-
exit: () => {
|
10113
|
-
globalThis.clearTimeout(id);
|
10114
|
-
}
|
10115
|
-
};
|
10116
|
-
});
|
10117
|
-
__publicField(this, "getDelayedEventActions", (state) => {
|
10118
|
-
const stateNode = this.getStateNode(state);
|
10119
|
-
const event = this.state.event;
|
10120
|
-
if (!stateNode || !stateNode.after) return;
|
10121
|
-
const entries = [];
|
10122
|
-
const exits = [];
|
10123
|
-
if (isArray(stateNode.after)) {
|
10124
|
-
const transition = this.determineTransition(stateNode.after, event);
|
10125
|
-
if (!transition) return;
|
10126
|
-
if (!hasProp(transition, "delay")) {
|
10127
|
-
throw new Error(`[@zag-js/core > after] Delay is required for after transition: ${JSON.stringify(transition)}`);
|
10128
|
-
}
|
10129
|
-
const determineDelay = determineDelayFn(transition.delay, this.delayMap);
|
10130
|
-
const __delay = determineDelay(this.contextSnapshot, event);
|
10131
|
-
const actions = this.getAfterActions(transition, __delay);
|
10132
|
-
entries.push(actions.entry);
|
10133
|
-
exits.push(actions.exit);
|
10134
|
-
return { entries, exits };
|
10135
|
-
}
|
10136
|
-
if (isObject3(stateNode.after)) {
|
10137
|
-
for (const delay in stateNode.after) {
|
10138
|
-
const transition = stateNode.after[delay];
|
10139
|
-
const determineDelay = determineDelayFn(delay, this.delayMap);
|
10140
|
-
const __delay = determineDelay(this.contextSnapshot, event);
|
10141
|
-
const actions = this.getAfterActions(transition, __delay);
|
10142
|
-
entries.push(actions.entry);
|
10143
|
-
exits.push(actions.exit);
|
10144
|
-
}
|
10145
|
-
}
|
10146
|
-
return { entries, exits };
|
10147
|
-
});
|
10148
|
-
__publicField(this, "executeActions", (actions, event) => {
|
10149
|
-
var _a8;
|
10150
|
-
const pickedActions = determineActionsFn(actions, this.guardMap)(this.contextSnapshot, event, this.guardMeta);
|
10151
|
-
for (const action of toArray(pickedActions)) {
|
10152
|
-
const fn = isString(action) ? (_a8 = this.actionMap) == null ? void 0 : _a8[action] : action;
|
10153
|
-
warn(
|
10154
|
-
isString(action) && !fn,
|
10155
|
-
`[@zag-js/core > execute-actions] No implementation found for action: \`${action}\``
|
10156
|
-
);
|
10157
|
-
fn == null ? void 0 : fn(this.state.context, event, this.meta);
|
10158
|
-
}
|
10159
|
-
});
|
10160
|
-
__publicField(this, "executeActivities", (event, activities, state) => {
|
10161
|
-
var _a8;
|
10162
|
-
for (const activity of activities) {
|
10163
|
-
const fn = isString(activity) ? (_a8 = this.activityMap) == null ? void 0 : _a8[activity] : activity;
|
10164
|
-
if (!fn) {
|
10165
|
-
warn(`[@zag-js/core > execute-activity] No implementation found for activity: \`${activity}\``);
|
10166
|
-
continue;
|
10167
|
-
}
|
10168
|
-
const cleanup = fn(this.state.context, event, this.meta);
|
10169
|
-
if (cleanup) {
|
10170
|
-
const key = isString(activity) ? activity : activity.name || uuid();
|
10171
|
-
this.addActivityCleanup(state != null ? state : this.state.value, key, cleanup);
|
10172
|
-
}
|
10173
|
-
}
|
10174
|
-
});
|
10175
|
-
__publicField(this, "createEveryActivities", (every, callbackfn) => {
|
10176
|
-
if (!every) return;
|
10177
|
-
if (isArray(every)) {
|
10178
|
-
const picked = toArray(every).find((transition) => {
|
10179
|
-
const delayOrFn = transition.delay;
|
10180
|
-
const determineDelay2 = determineDelayFn(delayOrFn, this.delayMap);
|
10181
|
-
const delay2 = determineDelay2(this.contextSnapshot, this.state.event);
|
10182
|
-
const determineGuard = determineGuardFn(transition.guard, this.guardMap);
|
10183
|
-
const guard = determineGuard(this.contextSnapshot, this.state.event, this.guardMeta);
|
10184
|
-
return guard != null ? guard : delay2 != null;
|
10185
|
-
});
|
10186
|
-
if (!picked) return;
|
10187
|
-
const determineDelay = determineDelayFn(picked.delay, this.delayMap);
|
10188
|
-
const delay = determineDelay(this.contextSnapshot, this.state.event);
|
10189
|
-
const activity = () => {
|
10190
|
-
const id = globalThis.setInterval(() => {
|
10191
|
-
this.executeActions(picked.actions, this.state.event);
|
10192
|
-
}, delay);
|
10193
|
-
return () => {
|
10194
|
-
globalThis.clearInterval(id);
|
10195
|
-
};
|
10196
|
-
};
|
10197
|
-
callbackfn(activity);
|
10198
|
-
} else {
|
10199
|
-
for (const interval in every) {
|
10200
|
-
const actions = every == null ? void 0 : every[interval];
|
10201
|
-
const determineDelay = determineDelayFn(interval, this.delayMap);
|
10202
|
-
const delay = determineDelay(this.contextSnapshot, this.state.event);
|
10203
|
-
const activity = () => {
|
10204
|
-
const id = globalThis.setInterval(() => {
|
10205
|
-
this.executeActions(actions, this.state.event);
|
10206
|
-
}, delay);
|
10207
|
-
return () => {
|
10208
|
-
globalThis.clearInterval(id);
|
10209
|
-
};
|
10210
|
-
};
|
10211
|
-
callbackfn(activity);
|
10212
|
-
}
|
10213
|
-
}
|
10214
|
-
});
|
10215
|
-
__publicField(this, "setEvent", (event) => {
|
10216
|
-
this.state.previousEvent = this.state.event;
|
10217
|
-
this.state.event = ref(toEvent(event));
|
10218
|
-
});
|
10219
|
-
__publicField(this, "performExitEffects", (current, event) => {
|
10220
|
-
const currentState = this.state.value;
|
10221
|
-
if (currentState === "") return;
|
10222
|
-
const stateNode = current ? this.getStateNode(current) : void 0;
|
10223
|
-
this.stopActivities(currentState);
|
10224
|
-
const _exit = determineActionsFn(stateNode == null ? void 0 : stateNode.exit, this.guardMap)(this.contextSnapshot, event, this.guardMeta);
|
10225
|
-
const exitActions = toArray(_exit);
|
10226
|
-
const afterExitActions = this.delayedEvents.get(currentState);
|
10227
|
-
if (afterExitActions) {
|
10228
|
-
exitActions.push(...afterExitActions);
|
10229
|
-
}
|
10230
|
-
this.executeActions(exitActions, event);
|
10231
|
-
this.delayedEvents.delete(currentState);
|
10232
|
-
});
|
10233
|
-
__publicField(this, "performEntryEffects", (next, event) => {
|
10234
|
-
const stateNode = this.getStateNode(next);
|
10235
|
-
const activities = toArray(stateNode == null ? void 0 : stateNode.activities);
|
10236
|
-
this.createEveryActivities(stateNode == null ? void 0 : stateNode.every, (activity) => {
|
10237
|
-
activities.unshift(activity);
|
10238
|
-
});
|
10239
|
-
if (activities.length > 0) {
|
10240
|
-
this.executeActivities(event, activities);
|
10241
|
-
}
|
10242
|
-
const pickedActions = determineActionsFn(stateNode == null ? void 0 : stateNode.entry, this.guardMap)(
|
10243
|
-
this.contextSnapshot,
|
10244
|
-
event,
|
10245
|
-
this.guardMeta
|
10246
|
-
);
|
10247
|
-
const entryActions = toArray(pickedActions);
|
10248
|
-
const afterActions = this.getDelayedEventActions(next);
|
10249
|
-
if ((stateNode == null ? void 0 : stateNode.after) && afterActions) {
|
10250
|
-
this.delayedEvents.set(next, afterActions == null ? void 0 : afterActions.exits);
|
10251
|
-
entryActions.push(...afterActions.entries);
|
10252
|
-
}
|
10253
|
-
this.executeActions(entryActions, event);
|
10254
|
-
if ((stateNode == null ? void 0 : stateNode.type) === "final") {
|
10255
|
-
this.state.done = true;
|
10256
|
-
this.doneListeners.forEach((listener) => {
|
10257
|
-
listener(this.stateSnapshot);
|
10258
|
-
});
|
10259
|
-
this.stop();
|
10260
|
-
}
|
10261
|
-
});
|
10262
|
-
__publicField(this, "performTransitionEffects", (transitions, event) => {
|
10263
|
-
const transition = this.determineTransition(transitions, event);
|
10264
|
-
this.executeActions(transition == null ? void 0 : transition.actions, event);
|
10265
|
-
});
|
10266
|
-
__publicField(this, "performStateChangeEffects", (current, next, event) => {
|
10267
|
-
this.setEvent(event);
|
10268
|
-
const changed = next.changed || next.reenter;
|
10269
|
-
if (changed) {
|
10270
|
-
this.performExitEffects(current, event);
|
10271
|
-
}
|
10272
|
-
this.performTransitionEffects(next.transition, event);
|
10273
|
-
this.setState(next.target);
|
10274
|
-
if (changed) {
|
10275
|
-
this.performEntryEffects(next.target, event);
|
10276
|
-
}
|
10277
|
-
});
|
10278
|
-
__publicField(this, "determineTransition", (transition, event) => {
|
10279
|
-
const fn = determineTransitionFn(transition, this.guardMap);
|
10280
|
-
return fn == null ? void 0 : fn(this.contextSnapshot, event, this.guardMeta);
|
10281
|
-
});
|
10282
|
-
__publicField(this, "sendParent", (evt) => {
|
10283
|
-
var _a8;
|
10284
|
-
if (!this.parent) {
|
10285
|
-
invariant("[@zag-js/core > send-parent] Cannot send event to an unknown parent");
|
10286
|
-
}
|
10287
|
-
const event = toEvent(evt);
|
10288
|
-
(_a8 = this.parent) == null ? void 0 : _a8.send(event);
|
10289
|
-
});
|
10290
|
-
__publicField(this, "log", (...args) => {
|
10291
|
-
if (isDev2() && this.options.debug) {
|
10292
|
-
console.log(...args);
|
10293
|
-
}
|
10294
|
-
});
|
10295
|
-
__publicField(this, "send", (evt) => {
|
10296
|
-
const event = toEvent(evt);
|
10297
|
-
this.transition(this.state.value, event);
|
10298
|
-
});
|
10299
|
-
__publicField(this, "transition", (state, evt) => {
|
10300
|
-
var _a8, _b7, _c6;
|
10301
|
-
const stateNode = isString(state) ? this.getStateNode(state) : state == null ? void 0 : state.stateNode;
|
10302
|
-
const event = toEvent(evt);
|
10303
|
-
if (!stateNode && !this.config.on) {
|
10304
|
-
const msg = this.status === "Stopped" ? "[@zag-js/core > transition] Cannot transition a stopped machine" : `[@zag-js/core > transition] State does not have a definition for \`state\`: ${state}, \`event\`: ${event.type}`;
|
10305
|
-
warn(msg);
|
10306
|
-
return;
|
10307
|
-
}
|
10308
|
-
const transitions = (
|
10309
|
-
// @ts-expect-error - Fix this
|
10310
|
-
(_c6 = (_a8 = stateNode == null ? void 0 : stateNode.on) == null ? void 0 : _a8[event.type]) != null ? _c6 : (_b7 = this.config.on) == null ? void 0 : _b7[event.type]
|
10311
|
-
);
|
10312
|
-
const next = this.getNextStateInfo(transitions, event);
|
10313
|
-
this.performStateChangeEffects(this.state.value, next, event);
|
10314
|
-
return next.stateNode;
|
10315
|
-
});
|
10316
|
-
__publicField(this, "subscribe", (listener) => {
|
10317
|
-
this.stateListeners.add(listener);
|
10318
|
-
if (this.status === "Running") {
|
10319
|
-
listener(this.stateSnapshot);
|
10320
|
-
}
|
10321
|
-
return () => {
|
10322
|
-
this.stateListeners.delete(listener);
|
10323
|
-
};
|
10324
|
-
});
|
10325
|
-
__publicField(this, "onDone", (listener) => {
|
10326
|
-
this.doneListeners.add(listener);
|
10327
|
-
return this;
|
10328
|
-
});
|
10329
|
-
__publicField(this, "onTransition", (listener) => {
|
10330
|
-
this.stateListeners.add(listener);
|
10331
|
-
if (this.status === "Running") {
|
10332
|
-
listener(this.stateSnapshot);
|
10333
|
-
}
|
10334
|
-
return this;
|
10335
|
-
});
|
10336
|
-
this.config = structuredClone(config);
|
10337
|
-
this.options = structuredClone(options != null ? options : {});
|
10338
|
-
this.id = (_a7 = this.config.id) != null ? _a7 : `machine-${uuid()}`;
|
10339
|
-
this.guardMap = (_c5 = (_b6 = this.options) == null ? void 0 : _b6.guards) != null ? _c5 : {};
|
10340
|
-
this.actionMap = (_e5 = (_d5 = this.options) == null ? void 0 : _d5.actions) != null ? _e5 : {};
|
10341
|
-
this.delayMap = (_g5 = (_f5 = this.options) == null ? void 0 : _f5.delays) != null ? _g5 : {};
|
10342
|
-
this.activityMap = (_i3 = (_h3 = this.options) == null ? void 0 : _h3.activities) != null ? _i3 : {};
|
10343
|
-
this.sync = (_k3 = (_j3 = this.options) == null ? void 0 : _j3.sync) != null ? _k3 : false;
|
10344
|
-
this.state = createProxy2(this.config);
|
10345
|
-
this.initialContext = snapshot(this.state.context);
|
10346
|
-
}
|
10347
|
-
// immutable state value
|
10348
|
-
get stateSnapshot() {
|
10349
|
-
return cast(snapshot(this.state));
|
10350
|
-
}
|
10351
|
-
getState() {
|
10352
|
-
return this.stateSnapshot;
|
10353
|
-
}
|
10354
|
-
// immutable context value
|
10355
|
-
get contextSnapshot() {
|
10356
|
-
return this.stateSnapshot.context;
|
10357
|
-
}
|
10358
|
-
/**
|
10359
|
-
* A reference to the instance methods of the machine.
|
10360
|
-
* Useful when spawning child machines and managing the communication between them.
|
10361
|
-
*/
|
10362
|
-
get self() {
|
10363
|
-
const self2 = this;
|
10364
|
-
return {
|
10365
|
-
id: this.id,
|
10366
|
-
send: this.send.bind(this),
|
10367
|
-
sendParent: this.sendParent.bind(this),
|
10368
|
-
sendChild: this.sendChild.bind(this),
|
10369
|
-
stop: this.stop.bind(this),
|
10370
|
-
stopChild: this.stopChild.bind(this),
|
10371
|
-
spawn: this.spawn.bind(this),
|
10372
|
-
stopActivity: this.stopActivity.bind(this),
|
10373
|
-
get state() {
|
10374
|
-
return self2.stateSnapshot;
|
10375
|
-
},
|
10376
|
-
get initialContext() {
|
10377
|
-
return self2.initialContext;
|
10378
|
-
},
|
10379
|
-
get initialState() {
|
10380
|
-
var _a7, _b6;
|
10381
|
-
return (_b6 = (_a7 = self2.initialState) == null ? void 0 : _a7.target) != null ? _b6 : "";
|
10382
|
-
}
|
10383
|
-
};
|
10384
|
-
}
|
10385
|
-
get meta() {
|
10386
|
-
var _a7, _b6;
|
10387
|
-
return {
|
10388
|
-
state: this.stateSnapshot,
|
10389
|
-
guards: this.guardMap,
|
10390
|
-
send: this.send.bind(this),
|
10391
|
-
self: this.self,
|
10392
|
-
initialContext: this.initialContext,
|
10393
|
-
initialState: (_b6 = (_a7 = this.initialState) == null ? void 0 : _a7.target) != null ? _b6 : "",
|
10394
|
-
getState: () => this.stateSnapshot,
|
10395
|
-
getAction: (key) => this.actionMap[key],
|
10396
|
-
getGuard: (key) => this.guardMap[key]
|
10397
|
-
};
|
10398
|
-
}
|
10399
|
-
get guardMeta() {
|
10400
|
-
return {
|
10401
|
-
state: this.stateSnapshot
|
10402
|
-
};
|
10403
|
-
}
|
10404
|
-
get [Symbol.toStringTag]() {
|
10405
|
-
return "Machine";
|
10406
|
-
}
|
10407
|
-
getHydrationState() {
|
10408
|
-
const state = this.getState();
|
10409
|
-
return {
|
10410
|
-
value: state.value,
|
10411
|
-
tags: state.tags
|
10412
|
-
};
|
10413
|
-
}
|
10414
|
-
};
|
10415
|
-
var createMachine = (config, options) => new Machine(config, options);
|
10416
|
-
var clsx = (...args) => args.map((str) => {
|
10417
|
-
var _a7;
|
10418
|
-
return (_a7 = str == null ? void 0 : str.trim) == null ? void 0 : _a7.call(str);
|
10419
|
-
}).filter(Boolean).join(" ");
|
10420
|
-
var CSS_REGEX = /((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;
|
10421
|
-
var serialize = (style) => {
|
10422
|
-
const res = {};
|
10423
|
-
let match;
|
10424
|
-
while (match = CSS_REGEX.exec(style)) {
|
10425
|
-
res[match[1]] = match[2];
|
10426
|
-
}
|
10427
|
-
return res;
|
10428
|
-
};
|
10429
|
-
var css = (a, b) => {
|
10430
|
-
if (isString(a)) {
|
10431
|
-
if (isString(b)) return `${a};${b}`;
|
10432
|
-
a = serialize(a);
|
10433
|
-
} else if (isString(b)) {
|
10434
|
-
b = serialize(b);
|
10435
|
-
}
|
10436
|
-
return Object.assign({}, a != null ? a : {}, b != null ? b : {});
|
10437
|
-
};
|
10438
|
-
function mergeProps(...args) {
|
10439
|
-
let result = {};
|
10440
|
-
for (let props2 of args) {
|
10441
|
-
for (let key in result) {
|
10442
|
-
if (key.startsWith("on") && typeof result[key] === "function" && typeof props2[key] === "function") {
|
10443
|
-
result[key] = callAll(props2[key], result[key]);
|
10444
|
-
continue;
|
10445
|
-
}
|
10446
|
-
if (key === "className" || key === "class") {
|
10447
|
-
result[key] = clsx(result[key], props2[key]);
|
10448
|
-
continue;
|
10449
|
-
}
|
10450
|
-
if (key === "style") {
|
10451
|
-
result[key] = css(result[key], props2[key]);
|
10452
|
-
continue;
|
10453
|
-
}
|
10454
|
-
result[key] = props2[key] !== void 0 ? props2[key] : result[key];
|
10455
|
-
}
|
10456
|
-
for (let key in props2) {
|
10457
|
-
if (result[key] === void 0) {
|
10458
|
-
result[key] = props2[key];
|
10459
|
-
}
|
10460
|
-
}
|
10461
|
-
}
|
10462
|
-
return result;
|
10463
|
-
}
|
10464
|
-
|
10465
|
-
// ../../node_modules/@zag-js/types/dist/index.mjs
|
10466
|
-
function createNormalizer(fn) {
|
10467
|
-
return new Proxy({}, {
|
10468
|
-
get() {
|
10469
|
-
return fn;
|
10470
|
-
}
|
10471
|
-
});
|
10472
|
-
}
|
10473
|
-
var createProps = () => (props2) => Array.from(new Set(props2));
|
10474
|
-
|
10475
|
-
// ../../node_modules/@zag-js/react/dist/index.mjs
|
10476
|
-
var import_react115 = __toESM(require("react"), 1);
|
10477
|
-
var import_react_dom = require("react-dom");
|
9133
|
+
var import_react115 = require("react");
|
9134
|
+
var import_react116 = require("@chakra-ui/react");
|
9135
|
+
var import_dialog2 = require("@ark-ui/react/dialog");
|
10478
9136
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
10479
|
-
var
|
10480
|
-
|
10481
|
-
var isArrayEqual = (a, b) => {
|
10482
|
-
if (a.length !== b.length) return false;
|
10483
|
-
for (let i = 0; i < a.length; i++) {
|
10484
|
-
if (!isEqual(a[i], b[i])) return false;
|
10485
|
-
}
|
10486
|
-
return true;
|
10487
|
-
};
|
10488
|
-
var isEqual = (a, b) => {
|
10489
|
-
if (Object.is(a, b)) return true;
|
10490
|
-
if (a == null && b != null || a != null && b == null) return false;
|
10491
|
-
if (typeof (a == null ? void 0 : a.isEqual) === "function" && typeof (b == null ? void 0 : b.isEqual) === "function") {
|
10492
|
-
return a.isEqual(b);
|
10493
|
-
}
|
10494
|
-
if (typeof a === "function" && typeof b === "function") {
|
10495
|
-
return a.toString() === b.toString();
|
10496
|
-
}
|
10497
|
-
if (isArrayLike(a) && isArrayLike(b)) {
|
10498
|
-
return isArrayEqual(Array.from(a), Array.from(b));
|
10499
|
-
}
|
10500
|
-
if (!(typeof a === "object") || !(typeof b === "object")) return false;
|
10501
|
-
const keys = Object.keys(b != null ? b : /* @__PURE__ */ Object.create(null));
|
10502
|
-
const length = keys.length;
|
10503
|
-
for (let i = 0; i < length; i++) {
|
10504
|
-
const hasKey = Reflect.has(a, keys[i]);
|
10505
|
-
if (!hasKey) return false;
|
10506
|
-
}
|
10507
|
-
for (let i = 0; i < length; i++) {
|
10508
|
-
const key = keys[i];
|
10509
|
-
if (!isEqual(a[key], b[key])) return false;
|
10510
|
-
}
|
10511
|
-
return true;
|
10512
|
-
};
|
10513
|
-
var isDev3 = () => process.env.NODE_ENV !== "production";
|
10514
|
-
var fnToString2 = Function.prototype.toString;
|
10515
|
-
fnToString2.call(Object);
|
10516
|
-
function compact2(obj) {
|
10517
|
-
if (!isPlainObject3(obj) || obj === void 0) {
|
10518
|
-
return obj;
|
10519
|
-
}
|
10520
|
-
const keys = Reflect.ownKeys(obj).filter((key) => typeof key === "string");
|
10521
|
-
const filtered = {};
|
10522
|
-
for (const key of keys) {
|
10523
|
-
const value = obj[key];
|
10524
|
-
if (value !== void 0) {
|
10525
|
-
filtered[key] = compact2(value);
|
10526
|
-
}
|
10527
|
-
}
|
10528
|
-
return filtered;
|
10529
|
-
}
|
10530
|
-
var isPlainObject3 = (value) => {
|
10531
|
-
return value && typeof value === "object" && value.constructor === Object;
|
10532
|
-
};
|
10533
|
-
function useUpdateEffect(callback, deps) {
|
10534
|
-
const render = (0, import_react115.useRef)(false);
|
10535
|
-
const effect = (0, import_react115.useRef)(false);
|
10536
|
-
(0, import_react115.useEffect)(() => {
|
10537
|
-
const mounted = render.current;
|
10538
|
-
const run = mounted && effect.current;
|
10539
|
-
if (run) {
|
10540
|
-
return callback();
|
10541
|
-
}
|
10542
|
-
effect.current = true;
|
10543
|
-
}, deps);
|
10544
|
-
(0, import_react115.useEffect)(() => {
|
10545
|
-
render.current = true;
|
10546
|
-
return () => {
|
10547
|
-
render.current = false;
|
10548
|
-
};
|
10549
|
-
}, []);
|
10550
|
-
}
|
10551
|
-
var { use } = import_react115.default;
|
10552
|
-
var targetCache = makeGlobal("__zag__targetCache", () => /* @__PURE__ */ new WeakMap());
|
10553
|
-
function useSnapshot(service, options) {
|
10554
|
-
const { actions, context, sync: notifyInSync } = options != null ? options : {};
|
10555
|
-
const lastSnapshot = (0, import_react115.useRef)();
|
10556
|
-
const lastAffected = (0, import_react115.useRef)();
|
10557
|
-
const currSnapshot = (0, import_react115.useSyncExternalStore)(
|
10558
|
-
(0, import_react115.useCallback)((callback) => subscribe(service.state, callback, notifyInSync), [notifyInSync]),
|
10559
|
-
() => {
|
10560
|
-
const nextSnapshot = snapshot(service.state, use);
|
10561
|
-
try {
|
10562
|
-
if (lastSnapshot.current && lastAffected.current && !isChanged(lastSnapshot.current, nextSnapshot, lastAffected.current, /* @__PURE__ */ new WeakMap())) {
|
10563
|
-
return lastSnapshot.current;
|
10564
|
-
}
|
10565
|
-
} catch {
|
10566
|
-
}
|
10567
|
-
return nextSnapshot;
|
10568
|
-
},
|
10569
|
-
() => snapshot(service.state, use)
|
10570
|
-
);
|
10571
|
-
service.setOptions({ actions });
|
10572
|
-
const ctx = (0, import_react115.useMemo)(() => compact2(context != null ? context : {}), [context]);
|
10573
|
-
useUpdateEffect(() => {
|
10574
|
-
var _a7;
|
10575
|
-
const entries = Object.entries(ctx);
|
10576
|
-
const previousCtx = (_a7 = service.contextSnapshot) != null ? _a7 : {};
|
10577
|
-
const equality = entries.map(([key, value]) => ({
|
10578
|
-
key,
|
10579
|
-
curr: value,
|
10580
|
-
prev: previousCtx[key],
|
10581
|
-
equal: isEqual(previousCtx[key], value)
|
10582
|
-
}));
|
10583
|
-
const allEqual = equality.every(({ equal }) => equal);
|
10584
|
-
if (!allEqual) {
|
10585
|
-
service.setContext(ctx);
|
10586
|
-
}
|
10587
|
-
}, [ctx]);
|
10588
|
-
const currAffected = /* @__PURE__ */ new WeakMap();
|
10589
|
-
(0, import_react115.useEffect)(() => {
|
10590
|
-
lastSnapshot.current = currSnapshot;
|
10591
|
-
lastAffected.current = currAffected;
|
10592
|
-
});
|
10593
|
-
const proxyCache = (0, import_react115.useMemo)(() => /* @__PURE__ */ new WeakMap(), []);
|
10594
|
-
return createProxy(currSnapshot, currAffected, proxyCache, targetCache);
|
10595
|
-
}
|
10596
|
-
function useConstant(fn) {
|
10597
|
-
const ref2 = (0, import_react115.useRef)();
|
10598
|
-
if (!ref2.current) ref2.current = { v: fn() };
|
10599
|
-
return ref2.current.v;
|
10600
|
-
}
|
10601
|
-
var useSafeLayoutEffect = typeof document !== "undefined" ? import_react115.useLayoutEffect : import_react115.useEffect;
|
10602
|
-
function useService(machine2, options) {
|
10603
|
-
const { state: hydratedState, context } = options != null ? options : {};
|
10604
|
-
const service = useConstant(() => {
|
10605
|
-
const instance = typeof machine2 === "function" ? machine2() : machine2;
|
10606
|
-
if (context) instance.setContext(context);
|
10607
|
-
instance._created();
|
10608
|
-
return instance;
|
10609
|
-
});
|
10610
|
-
const snapshotRef = (0, import_react115.useRef)();
|
10611
|
-
useSafeLayoutEffect(() => {
|
10612
|
-
const stateInit = hydratedState != null ? hydratedState : snapshotRef.current;
|
10613
|
-
service.start(stateInit);
|
10614
|
-
return () => {
|
10615
|
-
if (isDev3()) {
|
10616
|
-
snapshotRef.current = service.getHydrationState();
|
10617
|
-
}
|
10618
|
-
service.stop();
|
10619
|
-
};
|
10620
|
-
}, []);
|
10621
|
-
return service;
|
10622
|
-
}
|
10623
|
-
function useMachine(machine2, options) {
|
10624
|
-
const service = useService(machine2, options);
|
10625
|
-
const state = useSnapshot(service, options);
|
10626
|
-
return [state, service.send, service];
|
10627
|
-
}
|
10628
|
-
|
10629
|
-
// ../../node_modules/@ark-ui/react/dist/utils/compose-refs.js
|
10630
|
-
function setRef(ref2, value) {
|
10631
|
-
if (typeof ref2 === "function") {
|
10632
|
-
ref2(value);
|
10633
|
-
} else if (ref2 !== null && ref2 !== void 0) {
|
10634
|
-
ref2.current = value;
|
10635
|
-
}
|
10636
|
-
}
|
10637
|
-
function composeRefs(...refs) {
|
10638
|
-
return (node) => {
|
10639
|
-
for (const ref2 of refs) {
|
10640
|
-
setRef(ref2, node);
|
10641
|
-
}
|
10642
|
-
};
|
10643
|
-
}
|
10644
|
-
|
10645
|
-
// ../../node_modules/@ark-ui/react/dist/utils/create-context.js
|
10646
|
-
var import_react116 = require("react");
|
10647
|
-
function getErrorMessage(hook, provider) {
|
10648
|
-
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
10649
|
-
}
|
10650
|
-
function createContext2(options = {}) {
|
10651
|
-
const {
|
10652
|
-
name,
|
10653
|
-
strict = true,
|
10654
|
-
hookName = "useContext",
|
10655
|
-
providerName = "Provider",
|
10656
|
-
errorMessage,
|
10657
|
-
defaultValue
|
10658
|
-
} = options;
|
10659
|
-
const Context = (0, import_react116.createContext)(defaultValue);
|
10660
|
-
Context.displayName = name;
|
10661
|
-
function useContext$1() {
|
10662
|
-
var _a7;
|
10663
|
-
const context = (0, import_react116.useContext)(Context);
|
10664
|
-
if (!context && strict) {
|
10665
|
-
const error = new Error(errorMessage != null ? errorMessage : getErrorMessage(hookName, providerName));
|
10666
|
-
error.name = "ContextError";
|
10667
|
-
(_a7 = Error.captureStackTrace) == null ? void 0 : _a7.call(Error, error, useContext$1);
|
10668
|
-
throw error;
|
10669
|
-
}
|
10670
|
-
return context;
|
10671
|
-
}
|
10672
|
-
return [Context.Provider, useContext$1, Context];
|
10673
|
-
}
|
10674
|
-
|
10675
|
-
// ../../node_modules/@ark-ui/react/dist/utils/create-split-props.js
|
10676
|
-
var createSplitProps = () => (props2, keys) => keys.reduce(
|
10677
|
-
(previousValue, currentValue) => {
|
10678
|
-
const [target, source] = previousValue;
|
10679
|
-
const key = currentValue;
|
10680
|
-
if (source[key] !== void 0) {
|
10681
|
-
target[key] = source[key];
|
10682
|
-
}
|
10683
|
-
delete source[key];
|
10684
|
-
return [target, source];
|
10685
|
-
},
|
10686
|
-
[{}, { ...props2 }]
|
10687
|
-
);
|
10688
|
-
|
10689
|
-
// ../../node_modules/@ark-ui/react/dist/components/factory.js
|
10690
|
-
var import_react117 = require("react");
|
10691
|
-
function getRef(element) {
|
10692
|
-
var _a7, _b6;
|
10693
|
-
let getter = (_a7 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a7.get;
|
10694
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
10695
|
-
if (mayWarn) {
|
10696
|
-
return element.ref;
|
10697
|
-
}
|
10698
|
-
getter = (_b6 = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b6.get;
|
10699
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
10700
|
-
if (mayWarn) {
|
10701
|
-
return element.props.ref;
|
10702
|
-
}
|
10703
|
-
return element.props.ref || element.ref;
|
10704
|
-
}
|
10705
|
-
var withAsChild = (Component) => {
|
10706
|
-
const Comp = (0, import_react117.memo)(
|
10707
|
-
(0, import_react117.forwardRef)((props2, ref2) => {
|
10708
|
-
const { asChild, children, ...restProps } = props2;
|
10709
|
-
if (!asChild) {
|
10710
|
-
return (0, import_react117.createElement)(Component, { ...restProps, ref: ref2 }, children);
|
10711
|
-
}
|
10712
|
-
const onlyChild = import_react117.Children.only(children);
|
10713
|
-
if (!(0, import_react117.isValidElement)(onlyChild)) {
|
10714
|
-
return null;
|
10715
|
-
}
|
10716
|
-
const childRef = getRef(onlyChild);
|
10717
|
-
return (0, import_react117.cloneElement)(onlyChild, {
|
10718
|
-
...mergeProps(restProps, onlyChild.props),
|
10719
|
-
ref: ref2 ? composeRefs(ref2, childRef) : childRef
|
10720
|
-
});
|
10721
|
-
})
|
10722
|
-
);
|
10723
|
-
Comp.displayName = Component.displayName || Component.name;
|
10724
|
-
return Comp;
|
10725
|
-
};
|
10726
|
-
var jsxFactory = () => {
|
10727
|
-
const cache = /* @__PURE__ */ new Map();
|
10728
|
-
return new Proxy(withAsChild, {
|
10729
|
-
apply(_target, _thisArg, argArray) {
|
10730
|
-
return withAsChild(argArray[0]);
|
10731
|
-
},
|
10732
|
-
get(_, element) {
|
10733
|
-
const asElement = element;
|
10734
|
-
if (!cache.has(asElement)) {
|
10735
|
-
cache.set(asElement, withAsChild(asElement));
|
10736
|
-
}
|
10737
|
-
return cache.get(asElement);
|
10738
|
-
}
|
10739
|
-
});
|
10740
|
-
};
|
10741
|
-
var ark = jsxFactory();
|
10742
|
-
|
10743
|
-
// ../../node_modules/@zag-js/presence/dist/index.mjs
|
10744
|
-
function connect(state, send, _normalize) {
|
10745
|
-
const present = state.matches("mounted", "unmountSuspended");
|
10746
|
-
return {
|
10747
|
-
skip: !state.context.initial && present,
|
10748
|
-
present,
|
10749
|
-
setNode(node) {
|
10750
|
-
if (!node) return;
|
10751
|
-
send({ type: "NODE.SET", node });
|
10752
|
-
},
|
10753
|
-
unmount() {
|
10754
|
-
send({ type: "UNMOUNT" });
|
10755
|
-
}
|
10756
|
-
};
|
10757
|
-
}
|
10758
|
-
function machine(ctx) {
|
10759
|
-
return createMachine(
|
10760
|
-
{
|
10761
|
-
initial: ctx.present ? "mounted" : "unmounted",
|
10762
|
-
context: {
|
10763
|
-
node: null,
|
10764
|
-
styles: null,
|
10765
|
-
unmountAnimationName: null,
|
10766
|
-
prevAnimationName: null,
|
10767
|
-
present: false,
|
10768
|
-
initial: false,
|
10769
|
-
...ctx
|
10770
|
-
},
|
10771
|
-
exit: ["clearInitial"],
|
10772
|
-
watch: {
|
10773
|
-
present: ["setInitial", "syncPresence"]
|
10774
|
-
},
|
10775
|
-
on: {
|
10776
|
-
"NODE.SET": {
|
10777
|
-
actions: ["setNode", "setStyles"]
|
10778
|
-
}
|
10779
|
-
},
|
10780
|
-
states: {
|
10781
|
-
mounted: {
|
10782
|
-
on: {
|
10783
|
-
UNMOUNT: {
|
10784
|
-
target: "unmounted",
|
10785
|
-
actions: ["invokeOnExitComplete"]
|
10786
|
-
},
|
10787
|
-
"UNMOUNT.SUSPEND": "unmountSuspended"
|
10788
|
-
}
|
10789
|
-
},
|
10790
|
-
unmountSuspended: {
|
10791
|
-
activities: ["trackAnimationEvents"],
|
10792
|
-
after: {
|
10793
|
-
// Fallback to timeout to ensure we exit this state even if the `animationend` event
|
10794
|
-
// did not get trigger
|
10795
|
-
ANIMATION_DURATION: {
|
10796
|
-
target: "unmounted",
|
10797
|
-
actions: ["invokeOnExitComplete"]
|
10798
|
-
}
|
10799
|
-
},
|
10800
|
-
on: {
|
10801
|
-
MOUNT: {
|
10802
|
-
target: "mounted",
|
10803
|
-
actions: ["setPrevAnimationName"]
|
10804
|
-
},
|
10805
|
-
UNMOUNT: {
|
10806
|
-
target: "unmounted",
|
10807
|
-
actions: ["invokeOnExitComplete"]
|
10808
|
-
}
|
10809
|
-
}
|
10810
|
-
},
|
10811
|
-
unmounted: {
|
10812
|
-
entry: ["clearPrevAnimationName"],
|
10813
|
-
on: {
|
10814
|
-
MOUNT: {
|
10815
|
-
target: "mounted",
|
10816
|
-
actions: ["setPrevAnimationName"]
|
10817
|
-
}
|
10818
|
-
}
|
10819
|
-
}
|
10820
|
-
}
|
10821
|
-
},
|
10822
|
-
{
|
10823
|
-
delays: {
|
10824
|
-
ANIMATION_DURATION(ctx2) {
|
10825
|
-
var _a7, _b6;
|
10826
|
-
return parseMs((_a7 = ctx2.styles) == null ? void 0 : _a7.animationDuration) + parseMs((_b6 = ctx2.styles) == null ? void 0 : _b6.animationDelay) + ANIMATION_TIMEOUT_MARGIN;
|
10827
|
-
}
|
10828
|
-
},
|
10829
|
-
actions: {
|
10830
|
-
setInitial(ctx2) {
|
10831
|
-
ctx2.initial = true;
|
10832
|
-
},
|
10833
|
-
clearInitial(ctx2) {
|
10834
|
-
ctx2.initial = false;
|
10835
|
-
},
|
10836
|
-
invokeOnExitComplete(ctx2) {
|
10837
|
-
var _a7;
|
10838
|
-
(_a7 = ctx2.onExitComplete) == null ? void 0 : _a7.call(ctx2);
|
10839
|
-
},
|
10840
|
-
setNode(ctx2, evt) {
|
10841
|
-
ctx2.node = ref(evt.node);
|
10842
|
-
},
|
10843
|
-
setStyles(ctx2, evt) {
|
10844
|
-
const win = evt.node.ownerDocument.defaultView || window;
|
10845
|
-
ctx2.styles = ref(win.getComputedStyle(evt.node));
|
10846
|
-
},
|
10847
|
-
syncPresence(ctx2, _evt, { send }) {
|
10848
|
-
var _a7;
|
10849
|
-
if (ctx2.present) {
|
10850
|
-
send({ type: "MOUNT", src: "presence.changed" });
|
10851
|
-
return;
|
10852
|
-
}
|
10853
|
-
if (!ctx2.present && ((_a7 = ctx2.node) == null ? void 0 : _a7.ownerDocument.visibilityState) === "hidden") {
|
10854
|
-
send({ type: "UNMOUNT", src: "visibilitychange" });
|
10855
|
-
return;
|
10856
|
-
}
|
10857
|
-
const animationName = getAnimationName(ctx2.styles);
|
10858
|
-
const exec = ctx2.immediate ? queueMicrotask : requestAnimationFrame;
|
10859
|
-
exec(() => {
|
10860
|
-
var _a8, _b6;
|
10861
|
-
ctx2.unmountAnimationName = animationName;
|
10862
|
-
if (animationName === "none" || animationName === ctx2.prevAnimationName || ((_a8 = ctx2.styles) == null ? void 0 : _a8.display) === "none" || ((_b6 = ctx2.styles) == null ? void 0 : _b6.animationDuration) === "0s") {
|
10863
|
-
send({ type: "UNMOUNT", src: "presence.changed" });
|
10864
|
-
} else {
|
10865
|
-
send({ type: "UNMOUNT.SUSPEND" });
|
10866
|
-
}
|
10867
|
-
});
|
10868
|
-
},
|
10869
|
-
setPrevAnimationName(ctx2) {
|
10870
|
-
const exec = ctx2.immediate ? queueMicrotask : requestAnimationFrame;
|
10871
|
-
exec(() => {
|
10872
|
-
ctx2.prevAnimationName = getAnimationName(ctx2.styles);
|
10873
|
-
});
|
10874
|
-
},
|
10875
|
-
clearPrevAnimationName(ctx2) {
|
10876
|
-
ctx2.prevAnimationName = null;
|
10877
|
-
}
|
10878
|
-
},
|
10879
|
-
activities: {
|
10880
|
-
trackAnimationEvents(ctx2, _evt, { send }) {
|
10881
|
-
const node = ctx2.node;
|
10882
|
-
if (!node) return;
|
10883
|
-
const onStart = (event) => {
|
10884
|
-
var _a7, _b6, _c5;
|
10885
|
-
const target = (_c5 = (_b6 = (_a7 = event.composedPath) == null ? void 0 : _a7.call(event)) == null ? void 0 : _b6[0]) != null ? _c5 : event.target;
|
10886
|
-
if (target === node) {
|
10887
|
-
ctx2.prevAnimationName = getAnimationName(ctx2.styles);
|
10888
|
-
}
|
10889
|
-
};
|
10890
|
-
const onEnd = (event) => {
|
10891
|
-
var _a7, _b6, _c5;
|
10892
|
-
const animationName = getAnimationName(ctx2.styles);
|
10893
|
-
const target = (_c5 = (_b6 = (_a7 = event.composedPath) == null ? void 0 : _a7.call(event)) == null ? void 0 : _b6[0]) != null ? _c5 : event.target;
|
10894
|
-
if (target === node && animationName === ctx2.unmountAnimationName) {
|
10895
|
-
send({ type: "UNMOUNT", src: "animationend" });
|
10896
|
-
}
|
10897
|
-
};
|
10898
|
-
node.addEventListener("animationstart", onStart);
|
10899
|
-
node.addEventListener("animationcancel", onEnd);
|
10900
|
-
node.addEventListener("animationend", onEnd);
|
10901
|
-
return () => {
|
10902
|
-
node.removeEventListener("animationstart", onStart);
|
10903
|
-
node.removeEventListener("animationcancel", onEnd);
|
10904
|
-
node.removeEventListener("animationend", onEnd);
|
10905
|
-
};
|
10906
|
-
}
|
10907
|
-
}
|
10908
|
-
}
|
10909
|
-
);
|
10910
|
-
}
|
10911
|
-
function getAnimationName(styles) {
|
10912
|
-
return (styles == null ? void 0 : styles.animationName) || "none";
|
10913
|
-
}
|
10914
|
-
function parseMs(value) {
|
10915
|
-
return parseFloat(value || "0") * 1e3;
|
10916
|
-
}
|
10917
|
-
var ANIMATION_TIMEOUT_MARGIN = 16.667;
|
10918
|
-
var props = createProps()(["onExitComplete", "present", "immediate"]);
|
10919
|
-
|
10920
|
-
// ../../node_modules/@ark-ui/react/dist/components/presence/use-presence.js
|
10921
|
-
var import_react120 = require("react");
|
10922
|
-
|
10923
|
-
// ../../node_modules/@ark-ui/react/dist/utils/use-event.js
|
10924
|
-
var import_react118 = require("react");
|
10925
|
-
function useEvent(callback, opts = {}) {
|
10926
|
-
const { sync = false } = opts;
|
10927
|
-
const callbackRef = useLatestRef(callback);
|
10928
|
-
return (0, import_react118.useCallback)(
|
10929
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
10930
|
-
(...args) => {
|
10931
|
-
var _a7;
|
10932
|
-
if (sync) return queueMicrotask(() => {
|
10933
|
-
var _a8;
|
10934
|
-
return (_a8 = callbackRef.current) == null ? void 0 : _a8.call(callbackRef, ...args);
|
10935
|
-
});
|
10936
|
-
return (_a7 = callbackRef.current) == null ? void 0 : _a7.call(callbackRef, ...args);
|
10937
|
-
},
|
10938
|
-
[sync, callbackRef]
|
10939
|
-
);
|
10940
|
-
}
|
10941
|
-
function useLatestRef(value) {
|
10942
|
-
const ref2 = (0, import_react118.useRef)(value);
|
10943
|
-
ref2.current = value;
|
10944
|
-
return ref2;
|
10945
|
-
}
|
10946
|
-
|
10947
|
-
// ../../node_modules/@ark-ui/react/dist/components/presence/use-presence.js
|
10948
|
-
var usePresence = (props2) => {
|
10949
|
-
const { lazyMount, unmountOnExit, ...rest } = props2;
|
10950
|
-
const wasEverPresent = (0, import_react120.useRef)(false);
|
10951
|
-
const context = {
|
10952
|
-
...rest,
|
10953
|
-
onExitComplete: useEvent(props2.onExitComplete)
|
10954
|
-
};
|
10955
|
-
const [state, send] = useMachine(machine(context), { context });
|
10956
|
-
const api = connect(state, send, normalizeProps);
|
10957
|
-
if (api.present) {
|
10958
|
-
wasEverPresent.current = true;
|
10959
|
-
}
|
10960
|
-
const unmounted = !api.present && !wasEverPresent.current && lazyMount || unmountOnExit && !api.present && wasEverPresent.current;
|
10961
|
-
const getPresenceProps = () => ({
|
10962
|
-
"data-state": props2.present ? "open" : "closed",
|
10963
|
-
hidden: !api.present
|
10964
|
-
});
|
10965
|
-
return {
|
10966
|
-
ref: api.setNode,
|
10967
|
-
getPresenceProps,
|
10968
|
-
present: api.present,
|
10969
|
-
unmounted
|
10970
|
-
};
|
10971
|
-
};
|
10972
|
-
|
10973
|
-
// ../../node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js
|
10974
|
-
var [DialogProvider, useDialogContext] = createContext2({
|
10975
|
-
name: "DialogContext",
|
10976
|
-
hookName: "useDialogContext",
|
10977
|
-
providerName: "<DialogProvider />"
|
10978
|
-
});
|
10979
|
-
|
10980
|
-
// ../../node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js
|
10981
|
-
var DialogContext = (props2) => props2.children(useDialogContext());
|
10982
|
-
|
10983
|
-
// ../../node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js
|
10984
|
-
var splitPresenceProps = (props2) => createSplitProps()(props2, [
|
10985
|
-
"immediate",
|
10986
|
-
"lazyMount",
|
10987
|
-
"onExitComplete",
|
10988
|
-
"present",
|
10989
|
-
"unmountOnExit"
|
10990
|
-
]);
|
10991
|
-
|
10992
|
-
// src/components/dialog/dialog.tsx
|
10993
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
10994
|
-
var DialogContent = (0, import_react121.forwardRef)(
|
10995
|
-
function DialogContent2(props2, ref2) {
|
9137
|
+
var DialogContent = (0, import_react115.forwardRef)(
|
9138
|
+
function DialogContent2(props, ref) {
|
10996
9139
|
const {
|
10997
9140
|
children,
|
10998
9141
|
portalled = true,
|
10999
9142
|
portalRef,
|
11000
9143
|
backdrop = true,
|
11001
9144
|
...rest
|
11002
|
-
} =
|
11003
|
-
return /* @__PURE__ */ (0,
|
11004
|
-
backdrop && /* @__PURE__ */ (0,
|
11005
|
-
/* @__PURE__ */ (0,
|
9145
|
+
} = props;
|
9146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react116.Portal, { disabled: !portalled, container: portalRef, children: [
|
9147
|
+
backdrop && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react116.Dialog.Backdrop, {}),
|
9148
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react116.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react116.Dialog.Content, { ref, ...rest, asChild: false, children }) })
|
11006
9149
|
] });
|
11007
9150
|
}
|
11008
9151
|
);
|
11009
|
-
var DialogCloseTrigger = (0,
|
11010
|
-
return /* @__PURE__ */ (0,
|
11011
|
-
|
9152
|
+
var DialogCloseTrigger = (0, import_react115.forwardRef)(function DialogCloseTrigger2(props, ref) {
|
9153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
9154
|
+
import_react116.Dialog.CloseTrigger,
|
11012
9155
|
{
|
11013
9156
|
position: "absolute",
|
11014
9157
|
top: "2",
|
11015
9158
|
insetEnd: "2",
|
11016
|
-
...
|
9159
|
+
...props,
|
11017
9160
|
asChild: true,
|
11018
|
-
children: /* @__PURE__ */ (0,
|
9161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseButton, { size: "sm", ref, children: props.children })
|
11019
9162
|
}
|
11020
9163
|
);
|
11021
9164
|
});
|
11022
|
-
var DialogRoot =
|
11023
|
-
var DialogFooter =
|
11024
|
-
var DialogHeader =
|
11025
|
-
var DialogBody =
|
11026
|
-
var DialogBackdrop =
|
11027
|
-
var DialogTitle =
|
11028
|
-
var DialogDescription =
|
11029
|
-
var DialogTrigger =
|
11030
|
-
var DialogActionTrigger =
|
9165
|
+
var DialogRoot = import_react116.Dialog.Root;
|
9166
|
+
var DialogFooter = import_react116.Dialog.Footer;
|
9167
|
+
var DialogHeader = import_react116.Dialog.Header;
|
9168
|
+
var DialogBody = import_react116.Dialog.Body;
|
9169
|
+
var DialogBackdrop = import_react116.Dialog.Backdrop;
|
9170
|
+
var DialogTitle = import_react116.Dialog.Title;
|
9171
|
+
var DialogDescription = import_react116.Dialog.Description;
|
9172
|
+
var DialogTrigger = import_react116.Dialog.Trigger;
|
9173
|
+
var DialogActionTrigger = import_react116.Dialog.ActionTrigger;
|
11031
9174
|
|
11032
9175
|
// src/components/drawer/namespace.ts
|
11033
9176
|
var namespace_exports2 = {};
|
@@ -11047,52 +9190,53 @@ __export(namespace_exports2, {
|
|
11047
9190
|
});
|
11048
9191
|
|
11049
9192
|
// src/components/drawer/drawer.tsx
|
11050
|
-
var
|
11051
|
-
var
|
11052
|
-
var
|
11053
|
-
var
|
11054
|
-
|
11055
|
-
|
11056
|
-
|
9193
|
+
var import_react117 = require("react");
|
9194
|
+
var import_dialog4 = require("@ark-ui/react/dialog");
|
9195
|
+
var import_react118 = require("@chakra-ui/react");
|
9196
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
9197
|
+
var DrawerContent = (0, import_react117.forwardRef)(
|
9198
|
+
function DrawerContent2(props, ref) {
|
9199
|
+
const { children, portalled = true, portalRef, offset, ...rest } = props;
|
9200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react118.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react118.Drawer.Positioner, { padding: offset, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react118.Drawer.Content, { ref, ...rest, asChild: false, children }) }) });
|
11057
9201
|
}
|
11058
9202
|
);
|
11059
|
-
var DrawerCloseTrigger = (0,
|
11060
|
-
return /* @__PURE__ */ (0,
|
11061
|
-
|
9203
|
+
var DrawerCloseTrigger = (0, import_react117.forwardRef)(function DrawerCloseTrigger2(props, ref) {
|
9204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
9205
|
+
import_react118.Drawer.CloseTrigger,
|
11062
9206
|
{
|
11063
9207
|
position: "absolute",
|
11064
9208
|
top: "2",
|
11065
9209
|
insetEnd: "2",
|
11066
|
-
...
|
9210
|
+
...props,
|
11067
9211
|
asChild: true,
|
11068
|
-
children: /* @__PURE__ */ (0,
|
9212
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CloseButton, { size: "sm", ref })
|
11069
9213
|
}
|
11070
9214
|
);
|
11071
9215
|
});
|
11072
|
-
var DrawerTrigger =
|
11073
|
-
var DrawerRoot =
|
11074
|
-
var DrawerFooter =
|
11075
|
-
var DrawerHeader =
|
11076
|
-
var DrawerBody =
|
11077
|
-
var DrawerBackdrop =
|
11078
|
-
var DrawerDescription =
|
11079
|
-
var DrawerTitle =
|
11080
|
-
var DrawerActionTrigger =
|
11081
|
-
var DrawerContext = DialogContext;
|
9216
|
+
var DrawerTrigger = import_react118.Drawer.Trigger;
|
9217
|
+
var DrawerRoot = import_react118.Drawer.Root;
|
9218
|
+
var DrawerFooter = import_react118.Drawer.Footer;
|
9219
|
+
var DrawerHeader = import_react118.Drawer.Header;
|
9220
|
+
var DrawerBody = import_react118.Drawer.Body;
|
9221
|
+
var DrawerBackdrop = import_react118.Drawer.Backdrop;
|
9222
|
+
var DrawerDescription = import_react118.Drawer.Description;
|
9223
|
+
var DrawerTitle = import_react118.Drawer.Title;
|
9224
|
+
var DrawerActionTrigger = import_react118.Drawer.ActionTrigger;
|
9225
|
+
var DrawerContext = import_dialog4.DialogContext;
|
11082
9226
|
|
11083
9227
|
// src/components/empty-state/empty-state.tsx
|
11084
|
-
var
|
11085
|
-
var
|
11086
|
-
var
|
11087
|
-
var EmptyState = (0,
|
11088
|
-
function EmptyState2(
|
11089
|
-
const { title, description, icon, children, ...rest } =
|
11090
|
-
return /* @__PURE__ */ (0,
|
11091
|
-
icon && /* @__PURE__ */ (0,
|
11092
|
-
description ? /* @__PURE__ */ (0,
|
11093
|
-
/* @__PURE__ */ (0,
|
11094
|
-
/* @__PURE__ */ (0,
|
11095
|
-
] }) : /* @__PURE__ */ (0,
|
9228
|
+
var import_react119 = require("@chakra-ui/react");
|
9229
|
+
var import_react120 = require("react");
|
9230
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
9231
|
+
var EmptyState = (0, import_react120.forwardRef)(
|
9232
|
+
function EmptyState2(props, ref) {
|
9233
|
+
const { title, description, icon, children, ...rest } = props;
|
9234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react119.EmptyState.Root, { ref, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react119.EmptyState.Content, { children: [
|
9235
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react119.EmptyState.Indicator, { children: icon }),
|
9236
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react119.VStack, { textAlign: "center", children: [
|
9237
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react119.EmptyState.Title, { children: title }),
|
9238
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react119.EmptyState.Description, { children: description })
|
9239
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react119.EmptyState.Title, { children: title }),
|
11096
9240
|
children
|
11097
9241
|
] }) });
|
11098
9242
|
}
|
@@ -11109,12 +9253,12 @@ __export(grid_list_exports, {
|
|
11109
9253
|
var import_grid_list = require("@saas-ui/core/grid-list");
|
11110
9254
|
|
11111
9255
|
// src/components/grid-list/grid-list.context.ts
|
11112
|
-
var
|
9256
|
+
var import_react121 = require("@chakra-ui/react");
|
11113
9257
|
var {
|
11114
9258
|
withProvider: withProvider2,
|
11115
9259
|
withContext: withContext3,
|
11116
9260
|
useStyles: useGridListStyles
|
11117
|
-
} = (0,
|
9261
|
+
} = (0, import_react121.createSlotRecipeContext)({
|
11118
9262
|
key: "suiGridList"
|
11119
9263
|
});
|
11120
9264
|
|
@@ -11138,28 +9282,28 @@ var GridListCell = withContext3(
|
|
11138
9282
|
|
11139
9283
|
// src/components/icon-badge/icon-badge.tsx
|
11140
9284
|
var React2 = __toESM(require("react"), 1);
|
11141
|
-
var
|
11142
|
-
var
|
11143
|
-
var
|
11144
|
-
var
|
9285
|
+
var import_react122 = require("react");
|
9286
|
+
var import_react123 = require("@chakra-ui/react");
|
9287
|
+
var import_utils7 = require("@saas-ui/core/utils");
|
9288
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
11145
9289
|
var IconBadge = React2.forwardRef(
|
11146
|
-
(
|
11147
|
-
const { icon, children, ...rest } =
|
11148
|
-
const recipe = (0,
|
9290
|
+
(props, ref) => {
|
9291
|
+
const { icon, children, ...rest } = props;
|
9292
|
+
const recipe = (0, import_react123.useRecipe)({ key: "suiIconBadge", recipe: props.recipe });
|
11149
9293
|
const [variantProps, localProps] = recipe.splitVariantProps(rest);
|
11150
9294
|
const styles = recipe(variantProps);
|
11151
9295
|
const element = icon || children;
|
11152
|
-
const _children = (0,
|
9296
|
+
const _children = (0, import_react122.isValidElement)(element) ? (0, import_react122.cloneElement)(element, {
|
11153
9297
|
"aria-hidden": true,
|
11154
9298
|
focusable: false
|
11155
9299
|
}) : null;
|
11156
|
-
return /* @__PURE__ */ (0,
|
11157
|
-
|
9300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
9301
|
+
import_react123.chakra.div,
|
11158
9302
|
{
|
11159
|
-
ref
|
9303
|
+
ref,
|
11160
9304
|
...localProps,
|
11161
|
-
css: [styles,
|
11162
|
-
className: (0,
|
9305
|
+
css: [styles, props.css],
|
9306
|
+
className: (0, import_utils7.cx)(recipe.className, props.className),
|
11163
9307
|
children: _children
|
11164
9308
|
}
|
11165
9309
|
);
|
@@ -11167,11 +9311,11 @@ var IconBadge = React2.forwardRef(
|
|
11167
9311
|
);
|
11168
9312
|
|
11169
9313
|
// src/components/input-group/input-group.tsx
|
11170
|
-
var
|
11171
|
-
var
|
11172
|
-
var
|
11173
|
-
var InputGroup = (0,
|
11174
|
-
function InputGroup2(
|
9314
|
+
var import_react124 = require("react");
|
9315
|
+
var import_react125 = require("@chakra-ui/react");
|
9316
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
9317
|
+
var InputGroup = (0, import_react124.forwardRef)(
|
9318
|
+
function InputGroup2(props, ref) {
|
11175
9319
|
const {
|
11176
9320
|
startElement,
|
11177
9321
|
startElementProps,
|
@@ -11179,27 +9323,27 @@ var InputGroup = (0, import_react130.forwardRef)(
|
|
11179
9323
|
endElementProps,
|
11180
9324
|
children,
|
11181
9325
|
...rest
|
11182
|
-
} =
|
11183
|
-
return /* @__PURE__ */ (0,
|
11184
|
-
startElement && /* @__PURE__ */ (0,
|
11185
|
-
(0,
|
9326
|
+
} = props;
|
9327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react125.Group, { ref, display: "flex", ...rest, children: [
|
9328
|
+
startElement && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react125.InputElement, { pointerEvents: "none", ...startElementProps, children: startElement }),
|
9329
|
+
(0, import_react124.isValidElement)(children) && (0, import_react124.cloneElement)(children, {
|
11186
9330
|
...startElement && { ps: "calc(var(--input-height) - 6px)" },
|
11187
9331
|
...endElement && { pe: "calc(var(--input-height) - 6px)" },
|
11188
9332
|
...children.props
|
11189
9333
|
}),
|
11190
|
-
endElement && /* @__PURE__ */ (0,
|
9334
|
+
endElement && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react125.InputElement, { placement: "end", ...endElementProps, children: endElement })
|
11191
9335
|
] });
|
11192
9336
|
}
|
11193
9337
|
);
|
11194
9338
|
|
11195
9339
|
// src/components/link/link.tsx
|
11196
|
-
var
|
11197
|
-
var
|
11198
|
-
var
|
11199
|
-
var Link =
|
11200
|
-
(
|
9340
|
+
var import_react126 = __toESM(require("react"), 1);
|
9341
|
+
var import_react127 = require("@chakra-ui/react");
|
9342
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
9343
|
+
var Link = import_react126.default.forwardRef(
|
9344
|
+
(props, ref) => {
|
11201
9345
|
const LinkComponent = useLink();
|
11202
|
-
return /* @__PURE__ */ (0,
|
9346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react127.Link, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(LinkComponent, { ref, ...props }) });
|
11203
9347
|
}
|
11204
9348
|
);
|
11205
9349
|
Link.displayName = "Link";
|
@@ -11211,62 +9355,39 @@ __export(loading_overlay_exports, {
|
|
11211
9355
|
Spinner: () => LoadingOverlaySpinner,
|
11212
9356
|
Text: () => LoadingOverlayText
|
11213
9357
|
});
|
11214
|
-
|
11215
|
-
|
11216
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
11217
|
-
var import_react134 = require("react");
|
11218
|
-
var Presence = (0, import_react134.forwardRef)((props2, ref2) => {
|
11219
|
-
const [presenceProps, localProps] = splitPresenceProps(props2);
|
11220
|
-
const presence = usePresence(presenceProps);
|
11221
|
-
if (presence.unmounted) {
|
11222
|
-
return null;
|
11223
|
-
}
|
11224
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
11225
|
-
ark.div,
|
11226
|
-
{
|
11227
|
-
...localProps,
|
11228
|
-
...presence.getPresenceProps(),
|
11229
|
-
"data-scope": "presence",
|
11230
|
-
"data-part": "root",
|
11231
|
-
ref: composeRefs(presence.ref, ref2)
|
11232
|
-
}
|
11233
|
-
);
|
11234
|
-
});
|
11235
|
-
Presence.displayName = "Presence";
|
11236
|
-
|
11237
|
-
// src/components/loading-overlay/loading-overlay.tsx
|
11238
|
-
var import_react138 = require("@chakra-ui/react");
|
9358
|
+
var import_presence = require("@ark-ui/react/presence");
|
9359
|
+
var import_react131 = require("@chakra-ui/react");
|
11239
9360
|
|
11240
9361
|
// src/components/spinner/spinner.tsx
|
11241
|
-
var
|
11242
|
-
var
|
11243
|
-
var
|
11244
|
-
var Spinner2 = (0,
|
11245
|
-
function Spinner3(
|
11246
|
-
const { loading, children, ...rest } =
|
9362
|
+
var import_react128 = require("react");
|
9363
|
+
var import_react129 = require("@chakra-ui/react");
|
9364
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
9365
|
+
var Spinner2 = (0, import_react128.forwardRef)(
|
9366
|
+
function Spinner3(props, ref) {
|
9367
|
+
const { loading, children, ...rest } = props;
|
11247
9368
|
if (loading === false) {
|
11248
|
-
return /* @__PURE__ */ (0,
|
9369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children });
|
11249
9370
|
}
|
11250
|
-
return /* @__PURE__ */ (0,
|
9371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react129.Spinner, { ref, ...rest });
|
11251
9372
|
}
|
11252
9373
|
);
|
11253
9374
|
|
11254
9375
|
// src/components/loading-overlay/loading-overlay.context.ts
|
11255
|
-
var
|
9376
|
+
var import_react130 = require("@chakra-ui/react");
|
11256
9377
|
var {
|
11257
9378
|
useStyles: useLoadingOverlayStyles,
|
11258
9379
|
withContext: withContext4,
|
11259
9380
|
withProvider: withProvider3
|
11260
|
-
} = (0,
|
9381
|
+
} = (0, import_react130.createSlotRecipeContext)({
|
11261
9382
|
key: "suiLoadingOverlay"
|
11262
9383
|
});
|
11263
9384
|
|
11264
9385
|
// src/components/loading-overlay/loading-overlay.tsx
|
11265
|
-
var
|
11266
|
-
var LoadingOverlay = (
|
11267
|
-
const { children, loading = true, ...rest } =
|
11268
|
-
const [presenceProps, rootProps] = splitPresenceProps(rest);
|
11269
|
-
return /* @__PURE__ */ (0,
|
9386
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
9387
|
+
var LoadingOverlay = (props) => {
|
9388
|
+
const { children, loading = true, ...rest } = props;
|
9389
|
+
const [presenceProps, rootProps] = (0, import_presence.splitPresenceProps)(rest);
|
9390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_presence.Presence, { present: loading, ...presenceProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react131.chakra.div, { ...rootProps, children }) });
|
11270
9391
|
};
|
11271
9392
|
var LoadingOverlayRoot = withProvider3(
|
11272
9393
|
LoadingOverlay,
|
@@ -11291,12 +9412,12 @@ __export(navbar_exports, {
|
|
11291
9412
|
var import_navbar = require("@saas-ui/core/navbar");
|
11292
9413
|
|
11293
9414
|
// src/components/navbar/navbar.context.ts
|
11294
|
-
var
|
9415
|
+
var import_react132 = require("@chakra-ui/react");
|
11295
9416
|
var {
|
11296
9417
|
withProvider: withProvider4,
|
11297
9418
|
withContext: withContext5,
|
11298
9419
|
useStyles: useNavbarStyles
|
11299
|
-
} = (0,
|
9420
|
+
} = (0, import_react132.createSlotRecipeContext)({
|
11300
9421
|
key: "suiNavbar"
|
11301
9422
|
});
|
11302
9423
|
|
@@ -11323,11 +9444,11 @@ var NavbarLink = withContext5(
|
|
11323
9444
|
);
|
11324
9445
|
|
11325
9446
|
// src/components/number-input/number-input.tsx
|
11326
|
-
var
|
11327
|
-
var
|
11328
|
-
var
|
11329
|
-
var NumberInput = (0,
|
11330
|
-
function NumberInput2(
|
9447
|
+
var import_react133 = require("react");
|
9448
|
+
var import_react134 = require("@chakra-ui/react");
|
9449
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
9450
|
+
var NumberInput = (0, import_react133.forwardRef)(
|
9451
|
+
function NumberInput2(props, ref) {
|
11331
9452
|
const {
|
11332
9453
|
hideControls,
|
11333
9454
|
startElement,
|
@@ -11335,12 +9456,12 @@ var NumberInput = (0, import_react140.forwardRef)(
|
|
11335
9456
|
inputProps,
|
11336
9457
|
rootRef,
|
11337
9458
|
...rest
|
11338
|
-
} =
|
11339
|
-
return /* @__PURE__ */ (0,
|
11340
|
-
/* @__PURE__ */ (0,
|
11341
|
-
!hideControls && !endElement ? /* @__PURE__ */ (0,
|
11342
|
-
/* @__PURE__ */ (0,
|
11343
|
-
/* @__PURE__ */ (0,
|
9459
|
+
} = props;
|
9460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react134.NumberInput.Root, { ref: rootRef, ...rest, children: [
|
9461
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(InputGroup, { startElement, endElement, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react134.NumberInput.Input, { ref, ...inputProps }) }),
|
9462
|
+
!hideControls && !endElement ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react134.NumberInput.Control, { children: [
|
9463
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react134.NumberInput.IncrementTrigger, {}),
|
9464
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react134.NumberInput.DecrementTrigger, {})
|
11344
9465
|
] }) : null
|
11345
9466
|
] });
|
11346
9467
|
}
|
@@ -11353,6 +9474,7 @@ __export(menu_exports, {
|
|
11353
9474
|
Button: () => MenuButton,
|
11354
9475
|
CheckboxItem: () => MenuCheckboxItem,
|
11355
9476
|
Content: () => MenuContent,
|
9477
|
+
Context: () => MenuContext,
|
11356
9478
|
ContextTrigger: () => MenuContextTrigger,
|
11357
9479
|
Item: () => MenuItem,
|
11358
9480
|
ItemCommand: () => MenuItemCommand,
|
@@ -11365,77 +9487,78 @@ __export(menu_exports, {
|
|
11365
9487
|
Trigger: () => MenuTrigger,
|
11366
9488
|
TriggerItem: () => MenuTriggerItem
|
11367
9489
|
});
|
11368
|
-
var
|
11369
|
-
var
|
11370
|
-
var
|
11371
|
-
var MenuContent = (0,
|
11372
|
-
function MenuContent2(
|
11373
|
-
const { portalled = true, portalRef, ...rest } =
|
11374
|
-
return /* @__PURE__ */ (0,
|
9490
|
+
var import_react135 = require("react");
|
9491
|
+
var import_react136 = require("@chakra-ui/react");
|
9492
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
9493
|
+
var MenuContent = (0, import_react135.forwardRef)(
|
9494
|
+
function MenuContent2(props, ref) {
|
9495
|
+
const { portalled = true, portalRef, ...rest } = props;
|
9496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Menu.Content, { ref, ...rest }) }) });
|
11375
9497
|
}
|
11376
9498
|
);
|
11377
|
-
var MenuArrow = (0,
|
11378
|
-
function MenuArrow2(
|
11379
|
-
return /* @__PURE__ */ (0,
|
9499
|
+
var MenuArrow = (0, import_react135.forwardRef)(
|
9500
|
+
function MenuArrow2(props, ref) {
|
9501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Menu.Arrow, { ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Menu.ArrowTip, {}) });
|
11380
9502
|
}
|
11381
9503
|
);
|
11382
|
-
var MenuCheckboxItem = (0,
|
11383
|
-
return /* @__PURE__ */ (0,
|
11384
|
-
/* @__PURE__ */ (0,
|
11385
|
-
|
9504
|
+
var MenuCheckboxItem = (0, import_react135.forwardRef)(function MenuCheckboxItem2(props, ref) {
|
9505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react136.Menu.CheckboxItem, { ref, ...props, children: [
|
9506
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Menu.ItemIndicator, { hidden: false, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CheckIcon, {}) }),
|
9507
|
+
props.children
|
11386
9508
|
] });
|
11387
9509
|
});
|
11388
|
-
var MenuRadioItem = (0,
|
11389
|
-
function MenuRadioItem2(
|
11390
|
-
const { children, ...rest } =
|
11391
|
-
return /* @__PURE__ */ (0,
|
11392
|
-
/* @__PURE__ */ (0,
|
11393
|
-
/* @__PURE__ */ (0,
|
9510
|
+
var MenuRadioItem = (0, import_react135.forwardRef)(
|
9511
|
+
function MenuRadioItem2(props, ref) {
|
9512
|
+
const { children, ...rest } = props;
|
9513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react136.Menu.RadioItem, { ps: "8", ref, ...rest, children: [
|
9514
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.AbsoluteCenter, { axis: "horizontal", left: "4", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Menu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CheckIcon, {}) }) }),
|
9515
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Menu.ItemText, { children })
|
11394
9516
|
] });
|
11395
9517
|
}
|
11396
9518
|
);
|
11397
|
-
var MenuItemGroup = (0,
|
11398
|
-
function MenuItemGroup2(
|
11399
|
-
const { title, children, ...rest } =
|
11400
|
-
return /* @__PURE__ */ (0,
|
11401
|
-
title && /* @__PURE__ */ (0,
|
9519
|
+
var MenuItemGroup = (0, import_react135.forwardRef)(
|
9520
|
+
function MenuItemGroup2(props, ref) {
|
9521
|
+
const { title, children, ...rest } = props;
|
9522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react136.Menu.ItemGroup, { ref, ...rest, children: [
|
9523
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react136.Menu.ItemGroupLabel, { userSelect: "none", children: title }),
|
11402
9524
|
children
|
11403
9525
|
] });
|
11404
9526
|
}
|
11405
9527
|
);
|
11406
|
-
var MenuTriggerItem = (0,
|
11407
|
-
function MenuTriggerItem2(
|
11408
|
-
const { startIcon, children, ...rest } =
|
11409
|
-
return /* @__PURE__ */ (0,
|
9528
|
+
var MenuTriggerItem = (0, import_react135.forwardRef)(
|
9529
|
+
function MenuTriggerItem2(props, ref) {
|
9530
|
+
const { startIcon, children, ...rest } = props;
|
9531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react136.Menu.TriggerItem, { ref, ...rest, children: [
|
11410
9532
|
startIcon,
|
11411
9533
|
children,
|
11412
|
-
/* @__PURE__ */ (0,
|
9534
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChevronRightIcon, {})
|
11413
9535
|
] });
|
11414
9536
|
}
|
11415
9537
|
);
|
11416
|
-
var MenuButton = (0,
|
11417
|
-
function MenuButton2(
|
11418
|
-
return /* @__PURE__ */ (0,
|
9538
|
+
var MenuButton = (0, import_react135.forwardRef)(
|
9539
|
+
function MenuButton2(props, ref) {
|
9540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MenuTrigger, { ref, ...props, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, {}) });
|
11419
9541
|
}
|
11420
9542
|
);
|
11421
|
-
var MenuRadioItemGroup =
|
11422
|
-
var MenuContextTrigger =
|
11423
|
-
var MenuRoot =
|
11424
|
-
var MenuSeparator =
|
11425
|
-
var
|
11426
|
-
var
|
11427
|
-
var
|
11428
|
-
var
|
9543
|
+
var MenuRadioItemGroup = import_react136.Menu.RadioItemGroup;
|
9544
|
+
var MenuContextTrigger = import_react136.Menu.ContextTrigger;
|
9545
|
+
var MenuRoot = import_react136.Menu.Root;
|
9546
|
+
var MenuSeparator = import_react136.Menu.Separator;
|
9547
|
+
var MenuContext = import_react136.Menu.Context;
|
9548
|
+
var MenuItem = import_react136.Menu.Item;
|
9549
|
+
var MenuItemText = import_react136.Menu.ItemText;
|
9550
|
+
var MenuItemCommand = import_react136.Menu.ItemCommand;
|
9551
|
+
var MenuTrigger = import_react136.Menu.Trigger;
|
11429
9552
|
|
11430
9553
|
// src/components/password-input/password-input.tsx
|
11431
|
-
var
|
11432
|
-
var
|
9554
|
+
var import_react139 = require("react");
|
9555
|
+
var import_react140 = require("@chakra-ui/react");
|
11433
9556
|
|
11434
9557
|
// ../../node_modules/react-icons/lib/iconBase.mjs
|
11435
|
-
var
|
9558
|
+
var import_react138 = __toESM(require("react"), 1);
|
11436
9559
|
|
11437
9560
|
// ../../node_modules/react-icons/lib/iconContext.mjs
|
11438
|
-
var
|
9561
|
+
var import_react137 = __toESM(require("react"), 1);
|
11439
9562
|
var DefaultContext = {
|
11440
9563
|
color: void 0,
|
11441
9564
|
size: void 0,
|
@@ -11443,7 +9566,7 @@ var DefaultContext = {
|
|
11443
9566
|
style: void 0,
|
11444
9567
|
attr: void 0
|
11445
9568
|
};
|
11446
|
-
var IconContext =
|
9569
|
+
var IconContext = import_react137.default.createContext && /* @__PURE__ */ import_react137.default.createContext(DefaultContext);
|
11447
9570
|
|
11448
9571
|
// ../../node_modules/react-icons/lib/iconBase.mjs
|
11449
9572
|
var _excluded = ["attr", "size", "title"];
|
@@ -11532,74 +9655,74 @@ function _toPrimitive(t, r) {
|
|
11532
9655
|
return ("string" === r ? String : Number)(t);
|
11533
9656
|
}
|
11534
9657
|
function Tree2Element(tree) {
|
11535
|
-
return tree && tree.map((node, i) => /* @__PURE__ */
|
9658
|
+
return tree && tree.map((node, i) => /* @__PURE__ */ import_react138.default.createElement(node.tag, _objectSpread({
|
11536
9659
|
key: i
|
11537
9660
|
}, node.attr), Tree2Element(node.child)));
|
11538
9661
|
}
|
11539
9662
|
function GenIcon(data) {
|
11540
|
-
return (
|
9663
|
+
return (props) => /* @__PURE__ */ import_react138.default.createElement(IconBase, _extends({
|
11541
9664
|
attr: _objectSpread({}, data.attr)
|
11542
|
-
},
|
9665
|
+
}, props), Tree2Element(data.child));
|
11543
9666
|
}
|
11544
|
-
function IconBase(
|
9667
|
+
function IconBase(props) {
|
11545
9668
|
var elem = (conf) => {
|
11546
9669
|
var {
|
11547
9670
|
attr,
|
11548
9671
|
size,
|
11549
9672
|
title
|
11550
|
-
} =
|
9673
|
+
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
11551
9674
|
var computedSize = size || conf.size || "1em";
|
11552
9675
|
var className;
|
11553
9676
|
if (conf.className) className = conf.className;
|
11554
|
-
if (
|
11555
|
-
return /* @__PURE__ */
|
9677
|
+
if (props.className) className = (className ? className + " " : "") + props.className;
|
9678
|
+
return /* @__PURE__ */ import_react138.default.createElement("svg", _extends({
|
11556
9679
|
stroke: "currentColor",
|
11557
9680
|
fill: "currentColor",
|
11558
9681
|
strokeWidth: "0"
|
11559
9682
|
}, conf.attr, attr, svgProps, {
|
11560
9683
|
className,
|
11561
9684
|
style: _objectSpread(_objectSpread({
|
11562
|
-
color:
|
11563
|
-
}, conf.style),
|
9685
|
+
color: props.color || conf.color
|
9686
|
+
}, conf.style), props.style),
|
11564
9687
|
height: computedSize,
|
11565
9688
|
width: computedSize,
|
11566
9689
|
xmlns: "http://www.w3.org/2000/svg"
|
11567
|
-
}), title && /* @__PURE__ */
|
9690
|
+
}), title && /* @__PURE__ */ import_react138.default.createElement("title", null, title), props.children);
|
11568
9691
|
};
|
11569
|
-
return IconContext !== void 0 ? /* @__PURE__ */
|
9692
|
+
return IconContext !== void 0 ? /* @__PURE__ */ import_react138.default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
11570
9693
|
}
|
11571
9694
|
|
11572
9695
|
// ../../node_modules/react-icons/lu/index.mjs
|
11573
|
-
function LuEyeOff(
|
11574
|
-
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.88 9.88a3 3 0 1 0 4.24 4.24" }, "child": [] }, { "tag": "path", "attr": { "d": "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }, "child": [] }, { "tag": "path", "attr": { "d": "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }, "child": [] }, { "tag": "line", "attr": { "x1": "2", "x2": "22", "y1": "2", "y2": "22" }, "child": [] }] })(
|
9696
|
+
function LuEyeOff(props) {
|
9697
|
+
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.88 9.88a3 3 0 1 0 4.24 4.24" }, "child": [] }, { "tag": "path", "attr": { "d": "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }, "child": [] }, { "tag": "path", "attr": { "d": "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }, "child": [] }, { "tag": "line", "attr": { "x1": "2", "x2": "22", "y1": "2", "y2": "22" }, "child": [] }] })(props);
|
11575
9698
|
}
|
11576
|
-
function LuEye(
|
11577
|
-
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": "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }, "child": [] }, { "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "3" }, "child": [] }] })(
|
9699
|
+
function LuEye(props) {
|
9700
|
+
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": "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }, "child": [] }, { "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "3" }, "child": [] }] })(props);
|
11578
9701
|
}
|
11579
9702
|
|
11580
9703
|
// src/components/password-input/password-input.tsx
|
11581
|
-
var
|
11582
|
-
var PasswordInput = (0,
|
11583
|
-
function PasswordInput2(
|
9704
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
9705
|
+
var PasswordInput = (0, import_react139.forwardRef)(
|
9706
|
+
function PasswordInput2(props, ref) {
|
11584
9707
|
const {
|
11585
9708
|
rootProps,
|
11586
9709
|
defaultVisible,
|
11587
9710
|
visible: visibleProp,
|
11588
9711
|
onVisibleChange,
|
11589
|
-
visibilityIcon = { on: /* @__PURE__ */ (0,
|
9712
|
+
visibilityIcon = { on: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LuEye, {}), off: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LuEyeOff, {}) },
|
11590
9713
|
...rest
|
11591
|
-
} =
|
11592
|
-
const [visible, setVisible] = (0,
|
9714
|
+
} = props;
|
9715
|
+
const [visible, setVisible] = (0, import_react140.useControllableState)({
|
11593
9716
|
value: visibleProp,
|
11594
9717
|
defaultValue: defaultVisible || false,
|
11595
9718
|
onChange: onVisibleChange
|
11596
9719
|
});
|
11597
|
-
const inputRef = (0,
|
11598
|
-
return /* @__PURE__ */ (0,
|
9720
|
+
const inputRef = (0, import_react139.useRef)(null);
|
9721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
11599
9722
|
InputGroup,
|
11600
9723
|
{
|
11601
9724
|
width: "full",
|
11602
|
-
endElement: /* @__PURE__ */ (0,
|
9725
|
+
endElement: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
11603
9726
|
VisibilityTrigger,
|
11604
9727
|
{
|
11605
9728
|
disabled: rest.disabled,
|
@@ -11613,11 +9736,11 @@ var PasswordInput = (0, import_react146.forwardRef)(
|
|
11613
9736
|
}
|
11614
9737
|
),
|
11615
9738
|
...rootProps,
|
11616
|
-
children: /* @__PURE__ */ (0,
|
11617
|
-
|
9739
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
9740
|
+
import_react140.Input,
|
11618
9741
|
{
|
11619
9742
|
...rest,
|
11620
|
-
ref: (0,
|
9743
|
+
ref: (0, import_react140.mergeRefs)(ref, inputRef),
|
11621
9744
|
type: visible ? "text" : "password"
|
11622
9745
|
}
|
11623
9746
|
)
|
@@ -11625,13 +9748,13 @@ var PasswordInput = (0, import_react146.forwardRef)(
|
|
11625
9748
|
);
|
11626
9749
|
}
|
11627
9750
|
);
|
11628
|
-
var VisibilityTrigger = (0,
|
11629
|
-
function VisibilityTrigger2(
|
11630
|
-
return /* @__PURE__ */ (0,
|
11631
|
-
|
9751
|
+
var VisibilityTrigger = (0, import_react139.forwardRef)(
|
9752
|
+
function VisibilityTrigger2(props, ref) {
|
9753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
9754
|
+
import_react140.IconButton,
|
11632
9755
|
{
|
11633
9756
|
tabIndex: -1,
|
11634
|
-
ref
|
9757
|
+
ref,
|
11635
9758
|
me: "-2",
|
11636
9759
|
aspectRatio: "square",
|
11637
9760
|
size: "sm",
|
@@ -11639,7 +9762,7 @@ var VisibilityTrigger = (0, import_react146.forwardRef)(
|
|
11639
9762
|
colorPalette: "gray",
|
11640
9763
|
height: "calc(100% - {spacing.2})",
|
11641
9764
|
"aria-label": "Toggle password visibility",
|
11642
|
-
...
|
9765
|
+
...props
|
11643
9766
|
}
|
11644
9767
|
);
|
11645
9768
|
}
|
@@ -11649,31 +9772,31 @@ var VisibilityTrigger = (0, import_react146.forwardRef)(
|
|
11649
9772
|
var React7 = __toESM(require("react"), 1);
|
11650
9773
|
|
11651
9774
|
// src/components/persona/persona-primitive.tsx
|
11652
|
-
var
|
11653
|
-
var
|
11654
|
-
var
|
9775
|
+
var import_react142 = require("react");
|
9776
|
+
var import_react143 = require("@chakra-ui/react");
|
9777
|
+
var import_utils8 = require("@saas-ui/core/utils");
|
11655
9778
|
|
11656
9779
|
// src/components/persona/persona.context.ts
|
11657
|
-
var
|
9780
|
+
var import_react141 = require("@chakra-ui/react");
|
11658
9781
|
var {
|
11659
9782
|
useStyles: usePersonaStyles,
|
11660
9783
|
withProvider: withProvider5,
|
11661
9784
|
withContext: withContext6
|
11662
|
-
} = (0,
|
9785
|
+
} = (0, import_react141.createSlotRecipeContext)({
|
11663
9786
|
key: "suiPersona"
|
11664
9787
|
});
|
11665
9788
|
|
11666
9789
|
// src/components/persona/persona-primitive.tsx
|
11667
|
-
var
|
9790
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
11668
9791
|
var PersonaRoot = withProvider5(
|
11669
|
-
(0,
|
11670
|
-
const { outOfOffice, presence, ...rest } =
|
11671
|
-
return /* @__PURE__ */ (0,
|
11672
|
-
|
9792
|
+
(0, import_react142.forwardRef)((props, ref) => {
|
9793
|
+
const { outOfOffice, presence, ...rest } = props;
|
9794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
9795
|
+
import_react143.chakra.div,
|
11673
9796
|
{
|
11674
|
-
ref
|
9797
|
+
ref,
|
11675
9798
|
...rest,
|
11676
|
-
"data-out-of-office": (0,
|
9799
|
+
"data-out-of-office": (0, import_utils8.dataAttr)(outOfOffice),
|
11677
9800
|
"data-presence": presence,
|
11678
9801
|
css: [
|
11679
9802
|
presence ? {
|
@@ -11686,8 +9809,8 @@ var PersonaRoot = withProvider5(
|
|
11686
9809
|
}),
|
11687
9810
|
"root"
|
11688
9811
|
);
|
11689
|
-
var PersonaAvatar = (0,
|
11690
|
-
(
|
9812
|
+
var PersonaAvatar = (0, import_react142.forwardRef)(
|
9813
|
+
(props, ref) => {
|
11691
9814
|
const {
|
11692
9815
|
name,
|
11693
9816
|
getInitials: getInitials2 = (name2) => name2 == null ? void 0 : name2[0],
|
@@ -11698,11 +9821,11 @@ var PersonaAvatar = (0, import_react149.forwardRef)(
|
|
11698
9821
|
srcSet,
|
11699
9822
|
children,
|
11700
9823
|
...rest
|
11701
|
-
} =
|
11702
|
-
return /* @__PURE__ */ (0,
|
11703
|
-
/* @__PURE__ */ (0,
|
11704
|
-
/* @__PURE__ */ (0,
|
11705
|
-
|
9824
|
+
} = props;
|
9825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react143.Avatar.Root, { ref, ...rest, children: [
|
9826
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react143.Avatar.Fallback, { children: getInitials2(name) }),
|
9827
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
9828
|
+
import_react143.Avatar.Image,
|
11706
9829
|
{
|
11707
9830
|
src,
|
11708
9831
|
srcSet,
|
@@ -11734,9 +9857,9 @@ var PersonaTertiaryLabel = withContext6(
|
|
11734
9857
|
);
|
11735
9858
|
|
11736
9859
|
// src/components/persona/persona.tsx
|
11737
|
-
var
|
9860
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
11738
9861
|
var Persona = React7.forwardRef(
|
11739
|
-
(
|
9862
|
+
(props, ref) => {
|
11740
9863
|
const {
|
11741
9864
|
name,
|
11742
9865
|
presence,
|
@@ -11756,16 +9879,16 @@ var Persona = React7.forwardRef(
|
|
11756
9879
|
src,
|
11757
9880
|
srcSet,
|
11758
9881
|
...rest
|
11759
|
-
} =
|
11760
|
-
return /* @__PURE__ */ (0,
|
9882
|
+
} = props;
|
9883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
11761
9884
|
PersonaRoot,
|
11762
9885
|
{
|
11763
|
-
ref
|
9886
|
+
ref,
|
11764
9887
|
outOfOffice: isOutOfOffice,
|
11765
9888
|
presence,
|
11766
9889
|
...rest,
|
11767
9890
|
children: [
|
11768
|
-
/* @__PURE__ */ (0,
|
9891
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
11769
9892
|
PersonaAvatar,
|
11770
9893
|
{
|
11771
9894
|
name,
|
@@ -11776,13 +9899,13 @@ var Persona = React7.forwardRef(
|
|
11776
9899
|
onError,
|
11777
9900
|
src,
|
11778
9901
|
srcSet,
|
11779
|
-
children: /* @__PURE__ */ (0,
|
9902
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PersonaPresenceBadge, { children: presenceIcon })
|
11780
9903
|
}
|
11781
9904
|
),
|
11782
|
-
!hideDetails && /* @__PURE__ */ (0,
|
11783
|
-
/* @__PURE__ */ (0,
|
11784
|
-
secondaryLabel && /* @__PURE__ */ (0,
|
11785
|
-
tertiaryLabel && /* @__PURE__ */ (0,
|
9905
|
+
!hideDetails && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(PersonaDetails, { children: [
|
9906
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PersonaLabel, { children: label || name }),
|
9907
|
+
secondaryLabel && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PersonaSecondaryLabel, { children: secondaryLabel }),
|
9908
|
+
tertiaryLabel && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PersonaTertiaryLabel, { children: tertiaryLabel }),
|
11786
9909
|
children
|
11787
9910
|
] })
|
11788
9911
|
]
|
@@ -11791,8 +9914,8 @@ var Persona = React7.forwardRef(
|
|
11791
9914
|
}
|
11792
9915
|
);
|
11793
9916
|
Persona.displayName = "Persona";
|
11794
|
-
var PersonaAvatar2 = React7.forwardRef(function PersonaAvatar3(
|
11795
|
-
return /* @__PURE__ */ (0,
|
9917
|
+
var PersonaAvatar2 = React7.forwardRef(function PersonaAvatar3(props, ref) {
|
9918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Persona, { ref, ...props, hideDetails: true });
|
11796
9919
|
});
|
11797
9920
|
|
11798
9921
|
// src/components/persona/presence.ts
|
@@ -11820,11 +9943,11 @@ var defaultPresenceOptions = {
|
|
11820
9943
|
};
|
11821
9944
|
|
11822
9945
|
// src/components/pin-input/pin-input.tsx
|
11823
|
-
var
|
11824
|
-
var
|
11825
|
-
var
|
11826
|
-
var PinInput = (0,
|
11827
|
-
function PinInput2(
|
9946
|
+
var import_react144 = require("react");
|
9947
|
+
var import_react145 = require("@chakra-ui/react");
|
9948
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
9949
|
+
var PinInput = (0, import_react144.forwardRef)(
|
9950
|
+
function PinInput2(props, ref) {
|
11828
9951
|
const {
|
11829
9952
|
pinLength = 4,
|
11830
9953
|
inputProps,
|
@@ -11832,37 +9955,37 @@ var PinInput = (0, import_react151.forwardRef)(
|
|
11832
9955
|
attached,
|
11833
9956
|
gap = attached ? 0 : 2,
|
11834
9957
|
...rest
|
11835
|
-
} =
|
11836
|
-
return /* @__PURE__ */ (0,
|
11837
|
-
/* @__PURE__ */ (0,
|
11838
|
-
/* @__PURE__ */ (0,
|
9958
|
+
} = props;
|
9959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react145.PinInput.Root, { ref: rootRef, ...rest, children: [
|
9960
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react145.PinInput.HiddenInput, { ref, ...inputProps }),
|
9961
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react145.PinInput.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react145.Group, { attached, gap, children: Array.from({ length: pinLength }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react145.PinInput.Input, { index }, index)) }) })
|
11839
9962
|
] });
|
11840
9963
|
}
|
11841
9964
|
);
|
11842
9965
|
|
11843
9966
|
// src/components/radio/radio.tsx
|
11844
|
-
var
|
11845
|
-
var
|
11846
|
-
var
|
11847
|
-
var Radio = (0,
|
11848
|
-
function Radio2(
|
11849
|
-
const { children, inputProps, rootRef, ...rest } =
|
11850
|
-
return /* @__PURE__ */ (0,
|
11851
|
-
/* @__PURE__ */ (0,
|
11852
|
-
/* @__PURE__ */ (0,
|
11853
|
-
children && /* @__PURE__ */ (0,
|
9967
|
+
var import_react146 = require("react");
|
9968
|
+
var import_react147 = require("@chakra-ui/react");
|
9969
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
9970
|
+
var Radio = (0, import_react146.forwardRef)(
|
9971
|
+
function Radio2(props, ref) {
|
9972
|
+
const { children, inputProps, rootRef, ...rest } = props;
|
9973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react147.RadioGroup.Item, { ref: rootRef, ...rest, children: [
|
9974
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react147.RadioGroup.ItemHiddenInput, { ref, ...inputProps }),
|
9975
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react147.RadioGroup.ItemIndicator, {}),
|
9976
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react147.RadioGroup.ItemText, { children })
|
11854
9977
|
] });
|
11855
9978
|
}
|
11856
9979
|
);
|
11857
|
-
var RadioGroup =
|
9980
|
+
var RadioGroup = import_react147.RadioGroup.Root;
|
11858
9981
|
|
11859
9982
|
// src/components/search-input/search-input.tsx
|
11860
|
-
var
|
11861
|
-
var
|
11862
|
-
var
|
11863
|
-
var
|
11864
|
-
var SearchInput = (0,
|
11865
|
-
(
|
9983
|
+
var import_react148 = __toESM(require("react"), 1);
|
9984
|
+
var import_react149 = require("@chakra-ui/react");
|
9985
|
+
var import_utils9 = require("@saas-ui/core/utils");
|
9986
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
9987
|
+
var SearchInput = (0, import_react148.forwardRef)(
|
9988
|
+
(props, ref) => {
|
11866
9989
|
const {
|
11867
9990
|
placeholder = "Search",
|
11868
9991
|
value: valueProp,
|
@@ -11870,7 +9993,7 @@ var SearchInput = (0, import_react155.forwardRef)(
|
|
11870
9993
|
size,
|
11871
9994
|
variant,
|
11872
9995
|
width = "full",
|
11873
|
-
icon = /* @__PURE__ */ (0,
|
9996
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SearchIcon, {}),
|
11874
9997
|
resetIcon,
|
11875
9998
|
endElement: endElementProp,
|
11876
9999
|
onChange: onChangeProp,
|
@@ -11878,19 +10001,19 @@ var SearchInput = (0, import_react155.forwardRef)(
|
|
11878
10001
|
onKeyDown: onKeyDownProp,
|
11879
10002
|
disabled,
|
11880
10003
|
...inputProps
|
11881
|
-
} =
|
11882
|
-
const inputRef =
|
11883
|
-
const [value, setValue] = (0,
|
10004
|
+
} = props;
|
10005
|
+
const inputRef = import_react148.default.useRef(null);
|
10006
|
+
const [value, setValue] = (0, import_react149.useControllableState)({
|
11884
10007
|
value: valueProp,
|
11885
10008
|
defaultValue: defaultValueProp
|
11886
10009
|
});
|
11887
|
-
const onChange =
|
10010
|
+
const onChange = import_react148.default.useCallback(
|
11888
10011
|
(e) => {
|
11889
10012
|
setValue(e.target.value);
|
11890
10013
|
},
|
11891
10014
|
[setValue]
|
11892
10015
|
);
|
11893
|
-
const onKeyDown =
|
10016
|
+
const onKeyDown = import_react148.default.useCallback(
|
11894
10017
|
(event) => {
|
11895
10018
|
if (event.key === "Escape") {
|
11896
10019
|
setValue("");
|
@@ -11905,11 +10028,11 @@ var SearchInput = (0, import_react155.forwardRef)(
|
|
11905
10028
|
onResetProp == null ? void 0 : onResetProp();
|
11906
10029
|
(_a7 = inputRef.current) == null ? void 0 : _a7.focus();
|
11907
10030
|
};
|
11908
|
-
const showReset = value && !
|
11909
|
-
const endElement = showReset ? /* @__PURE__ */ (0,
|
11910
|
-
return /* @__PURE__ */ (0,
|
11911
|
-
/* @__PURE__ */ (0,
|
11912
|
-
|
10031
|
+
const showReset = value && !props.disabled;
|
10032
|
+
const endElement = showReset ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SearchInputResetButton, { size, children: resetIcon }) : endElementProp;
|
10033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react149.Group, { width, children: [
|
10034
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
10035
|
+
import_react149.InputElement,
|
11913
10036
|
{
|
11914
10037
|
placement: "start",
|
11915
10038
|
px: "0",
|
@@ -11918,8 +10041,8 @@ var SearchInput = (0, import_react155.forwardRef)(
|
|
11918
10041
|
children: icon
|
11919
10042
|
}
|
11920
10043
|
),
|
11921
|
-
/* @__PURE__ */ (0,
|
11922
|
-
|
10044
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
10045
|
+
import_react149.Input,
|
11923
10046
|
{
|
11924
10047
|
type: "text",
|
11925
10048
|
placeholder,
|
@@ -11927,25 +10050,25 @@ var SearchInput = (0, import_react155.forwardRef)(
|
|
11927
10050
|
size,
|
11928
10051
|
value,
|
11929
10052
|
disabled,
|
11930
|
-
ref: (0,
|
11931
|
-
onChange: (0,
|
11932
|
-
onKeyDown: (0,
|
10053
|
+
ref: (0, import_react149.mergeRefs)(ref, inputRef),
|
10054
|
+
onChange: (0, import_utils9.callAll)(onChange, onChangeProp),
|
10055
|
+
onKeyDown: (0, import_utils9.callAll)(onKeyDown, onKeyDownProp),
|
11933
10056
|
ps: "calc(var(--input-height) - var(--input-height) / 10)",
|
11934
10057
|
pe: "calc(var(--input-height) - var(--input-height) / 10)",
|
11935
10058
|
...inputProps
|
11936
10059
|
}
|
11937
10060
|
),
|
11938
|
-
/* @__PURE__ */ (0,
|
10061
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react149.InputElement, { placement: "end", children: endElement })
|
11939
10062
|
] });
|
11940
10063
|
}
|
11941
10064
|
);
|
11942
|
-
var SearchInputResetButton = (0,
|
11943
|
-
(
|
11944
|
-
const { children = /* @__PURE__ */ (0,
|
11945
|
-
return /* @__PURE__ */ (0,
|
11946
|
-
|
10065
|
+
var SearchInputResetButton = (0, import_react148.forwardRef)(
|
10066
|
+
(props, ref) => {
|
10067
|
+
const { children = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CloseIcon, {}), ...rest } = props;
|
10068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
10069
|
+
import_react149.IconButton,
|
11947
10070
|
{
|
11948
|
-
ref
|
10071
|
+
ref,
|
11949
10072
|
variant: "ghost",
|
11950
10073
|
"aria-label": "Reset search",
|
11951
10074
|
me: "-2",
|
@@ -11973,23 +10096,23 @@ __export(namespace_exports3, {
|
|
11973
10096
|
});
|
11974
10097
|
|
11975
10098
|
// src/components/select/select.tsx
|
11976
|
-
var
|
11977
|
-
var
|
11978
|
-
var
|
11979
|
-
var SelectTrigger = (0,
|
11980
|
-
function SelectTrigger2(
|
11981
|
-
const { children, clearable, ...rest } =
|
11982
|
-
return /* @__PURE__ */ (0,
|
11983
|
-
/* @__PURE__ */ (0,
|
11984
|
-
/* @__PURE__ */ (0,
|
11985
|
-
clearable && /* @__PURE__ */ (0,
|
11986
|
-
/* @__PURE__ */ (0,
|
10099
|
+
var import_react150 = require("react");
|
10100
|
+
var import_react151 = require("@chakra-ui/react");
|
10101
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
10102
|
+
var SelectTrigger = (0, import_react150.forwardRef)(
|
10103
|
+
function SelectTrigger2(props, ref) {
|
10104
|
+
const { children, clearable, ...rest } = props;
|
10105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react151.Select.Control, { ...rest, children: [
|
10106
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.Trigger, { ref, children }),
|
10107
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react151.Select.IndicatorGroup, { children: [
|
10108
|
+
clearable && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectClearTrigger, {}),
|
10109
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.Indicator, {})
|
11987
10110
|
] })
|
11988
10111
|
] });
|
11989
10112
|
}
|
11990
10113
|
);
|
11991
|
-
var SelectClearTrigger = (0,
|
11992
|
-
return /* @__PURE__ */ (0,
|
10114
|
+
var SelectClearTrigger = (0, import_react150.forwardRef)(function SelectClearTrigger2(props, ref) {
|
10115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
11993
10116
|
CloseButton,
|
11994
10117
|
{
|
11995
10118
|
size: "xs",
|
@@ -12000,77 +10123,77 @@ var SelectClearTrigger = (0, import_react157.forwardRef)(function SelectClearTri
|
|
12000
10123
|
}
|
12001
10124
|
) });
|
12002
10125
|
});
|
12003
|
-
var SelectContent = (0,
|
12004
|
-
function SelectContent2(
|
12005
|
-
const { portalled = true, portalRef, ...rest } =
|
12006
|
-
return /* @__PURE__ */ (0,
|
10126
|
+
var SelectContent = (0, import_react150.forwardRef)(
|
10127
|
+
function SelectContent2(props, ref) {
|
10128
|
+
const { portalled = true, portalRef, ...rest } = props;
|
10129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.Content, { ...rest, ref }) }) });
|
12007
10130
|
}
|
12008
10131
|
);
|
12009
|
-
var SelectItem = (0,
|
12010
|
-
function SelectItem2(
|
12011
|
-
const { item, children, ...rest } =
|
12012
|
-
return /* @__PURE__ */ (0,
|
10132
|
+
var SelectItem = (0, import_react150.forwardRef)(
|
10133
|
+
function SelectItem2(props, ref) {
|
10134
|
+
const { item, children, ...rest } = props;
|
10135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react151.Select.Item, { item, ...rest, ref, children: [
|
12013
10136
|
children,
|
12014
|
-
/* @__PURE__ */ (0,
|
10137
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.ItemIndicator, {})
|
12015
10138
|
] }, item.value);
|
12016
10139
|
}
|
12017
10140
|
);
|
12018
|
-
var SelectValueText = (0,
|
12019
|
-
const { children, ...rest } =
|
12020
|
-
return /* @__PURE__ */ (0,
|
10141
|
+
var SelectValueText = (0, import_react150.forwardRef)(function SelectValueText2(props, ref) {
|
10142
|
+
const { children, ...rest } = props;
|
10143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.ValueText, { ...rest, ref, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.Context, { children: (select) => {
|
12021
10144
|
const items = select.selectedItems;
|
12022
|
-
if (items.length === 0) return
|
10145
|
+
if (items.length === 0) return props.placeholder;
|
12023
10146
|
if (children) return children(items);
|
12024
10147
|
if (items.length === 1)
|
12025
10148
|
return select.collection.stringifyItem(items[0]);
|
12026
10149
|
return `${items.length} selected`;
|
12027
10150
|
} }) });
|
12028
10151
|
});
|
12029
|
-
var SelectRoot = (0,
|
12030
|
-
return /* @__PURE__ */ (0,
|
12031
|
-
|
10152
|
+
var SelectRoot = (0, import_react150.forwardRef)(function SelectRoot2(props, ref) {
|
10153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
10154
|
+
import_react151.Select.Root,
|
12032
10155
|
{
|
12033
|
-
...
|
12034
|
-
ref
|
12035
|
-
positioning: { sameWidth: true, ...
|
10156
|
+
...props,
|
10157
|
+
ref,
|
10158
|
+
positioning: { sameWidth: true, ...props.positioning }
|
12036
10159
|
}
|
12037
10160
|
);
|
12038
10161
|
});
|
12039
|
-
var SelectItemGroup = (0,
|
12040
|
-
function SelectItemGroup2(
|
12041
|
-
const { children, label, ...rest } =
|
12042
|
-
return /* @__PURE__ */ (0,
|
12043
|
-
/* @__PURE__ */ (0,
|
10162
|
+
var SelectItemGroup = (0, import_react150.forwardRef)(
|
10163
|
+
function SelectItemGroup2(props, ref) {
|
10164
|
+
const { children, label, ...rest } = props;
|
10165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react151.Select.ItemGroup, { ...rest, ref, children: [
|
10166
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react151.Select.ItemGroupLabel, { children: label }),
|
12044
10167
|
children
|
12045
10168
|
] });
|
12046
10169
|
}
|
12047
10170
|
);
|
12048
|
-
var SelectLabel =
|
12049
|
-
var SelectItemText =
|
10171
|
+
var SelectLabel = import_react151.Select.Label;
|
10172
|
+
var SelectItemText = import_react151.Select.ItemText;
|
12050
10173
|
|
12051
10174
|
// src/components/segmented-control/segmented-control.tsx
|
12052
|
-
var
|
12053
|
-
var
|
12054
|
-
var
|
10175
|
+
var import_react152 = require("react");
|
10176
|
+
var import_react153 = require("@chakra-ui/react");
|
10177
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
12055
10178
|
function normalize(items) {
|
12056
10179
|
return items.map((item) => {
|
12057
10180
|
if (typeof item === "string") return { value: item, label: item };
|
12058
10181
|
return item;
|
12059
10182
|
});
|
12060
10183
|
}
|
12061
|
-
var SegmentedControl = (0,
|
12062
|
-
const { items, ...rest } =
|
12063
|
-
const data = (0,
|
12064
|
-
return /* @__PURE__ */ (0,
|
12065
|
-
/* @__PURE__ */ (0,
|
12066
|
-
/* @__PURE__ */ (0,
|
12067
|
-
|
10184
|
+
var SegmentedControl = (0, import_react152.forwardRef)(function SegmentedControl2(props, ref) {
|
10185
|
+
const { items, ...rest } = props;
|
10186
|
+
const data = (0, import_react152.useMemo)(() => normalize(items), [items]);
|
10187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react153.SegmentGroup.Root, { ref, ...rest, children: [
|
10188
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react153.SegmentGroup.Indicator, {}),
|
10189
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react153.For, { each: data, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
10190
|
+
import_react153.SegmentGroup.Item,
|
12068
10191
|
{
|
12069
10192
|
value: item.value,
|
12070
10193
|
disabled: item.disabled,
|
12071
10194
|
children: [
|
12072
|
-
/* @__PURE__ */ (0,
|
12073
|
-
/* @__PURE__ */ (0,
|
10195
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react153.SegmentGroup.ItemText, { children: item.label }),
|
10196
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react153.SegmentGroup.ItemHiddenInput, {})
|
12074
10197
|
]
|
12075
10198
|
},
|
12076
10199
|
item.value
|
@@ -12102,36 +10225,36 @@ __export(sidebar_exports, {
|
|
12102
10225
|
var import_sidebar = require("@saas-ui/core/sidebar");
|
12103
10226
|
|
12104
10227
|
// src/components/sidebar/sidebar.context.ts
|
12105
|
-
var
|
10228
|
+
var import_react154 = require("@chakra-ui/react");
|
12106
10229
|
var {
|
12107
10230
|
withContext: withContext7,
|
12108
10231
|
useRecipeResult,
|
12109
10232
|
StylesProvider,
|
12110
10233
|
ClassNamesProvider,
|
12111
10234
|
useStyles: useSidebarStyles
|
12112
|
-
} = (0,
|
10235
|
+
} = (0, import_react154.createSlotRecipeContext)({
|
12113
10236
|
key: "suiSidebar"
|
12114
10237
|
});
|
12115
10238
|
var {
|
12116
10239
|
withProvider: withItemProvider,
|
12117
10240
|
withContext: withItemContext,
|
12118
10241
|
useStyles: useSidebarItemStyles
|
12119
|
-
} = (0,
|
10242
|
+
} = (0, import_react154.createSlotRecipeContext)({
|
12120
10243
|
key: "suiSidebarNavItem"
|
12121
10244
|
});
|
12122
10245
|
|
12123
10246
|
// src/components/sidebar/sidebar.tsx
|
12124
|
-
var
|
12125
|
-
var SidebarProvider = function SidebarProvider2(
|
12126
|
-
return /* @__PURE__ */ (0,
|
10247
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
10248
|
+
var SidebarProvider = function SidebarProvider2(props) {
|
10249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_sidebar.Sidebar.Provider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RecipeProvider, { ...props, children: props.children }) });
|
12127
10250
|
};
|
12128
|
-
function RecipeProvider(
|
10251
|
+
function RecipeProvider(props) {
|
12129
10252
|
const { mode } = (0, import_sidebar.useSidebar)();
|
12130
10253
|
const { styles, classNames } = useRecipeResult({
|
12131
|
-
...
|
10254
|
+
...props,
|
12132
10255
|
mode
|
12133
10256
|
});
|
12134
|
-
return /* @__PURE__ */ (0,
|
10257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StylesProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ClassNamesProvider, { value: classNames, children: props.children }) });
|
12135
10258
|
}
|
12136
10259
|
var SidebarRoot = withContext7(
|
12137
10260
|
import_sidebar.Sidebar.Root,
|
@@ -12205,23 +10328,23 @@ var SidebarNavItemEndElement = withItemContext(import_sidebar.Sidebar.NavItemEnd
|
|
12205
10328
|
var import_sidebar2 = require("@saas-ui/core/sidebar");
|
12206
10329
|
|
12207
10330
|
// src/components/toaster/toaster.tsx
|
12208
|
-
var
|
12209
|
-
var
|
12210
|
-
var toast = (0,
|
10331
|
+
var import_react155 = require("@chakra-ui/react");
|
10332
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
10333
|
+
var toast = (0, import_react155.createToaster)({
|
12211
10334
|
placement: "bottom-end",
|
12212
10335
|
pauseOnPageIdle: true
|
12213
10336
|
});
|
12214
10337
|
var Toaster = () => {
|
12215
|
-
return /* @__PURE__ */ (0,
|
10338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.Toaster, { toaster: toast, insetInline: { mdDown: "4" }, children: (toast2) => {
|
12216
10339
|
var _a7;
|
12217
|
-
return /* @__PURE__ */ (0,
|
12218
|
-
toast2.type === "loading" ? /* @__PURE__ */ (0,
|
12219
|
-
/* @__PURE__ */ (0,
|
12220
|
-
toast2.title && /* @__PURE__ */ (0,
|
12221
|
-
toast2.description && /* @__PURE__ */ (0,
|
10340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react155.Toast.Root, { width: { md: "sm" }, children: [
|
10341
|
+
toast2.type === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.Spinner, { size: "sm", color: "colorPalette.solid" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.Toast.Indicator, {}),
|
10342
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react155.Stack, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
10343
|
+
toast2.title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.Toast.Title, { children: toast2.title }),
|
10344
|
+
toast2.description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.Toast.Description, { children: toast2.description })
|
12222
10345
|
] }),
|
12223
|
-
toast2.action && /* @__PURE__ */ (0,
|
12224
|
-
((_a7 = toast2.meta) == null ? void 0 : _a7.closable) && /* @__PURE__ */ (0,
|
10346
|
+
toast2.action && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.Toast.ActionTrigger, { children: toast2.action.label }),
|
10347
|
+
((_a7 = toast2.meta) == null ? void 0 : _a7.closable) && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.Toast.CloseTrigger, {})
|
12225
10348
|
] });
|
12226
10349
|
} }) });
|
12227
10350
|
};
|
@@ -12238,76 +10361,76 @@ __export(steps_exports, {
|
|
12238
10361
|
PrevTrigger: () => StepsPrevTrigger,
|
12239
10362
|
Root: () => StepsRoot
|
12240
10363
|
});
|
12241
|
-
var
|
12242
|
-
var
|
12243
|
-
var StepsItem = (
|
12244
|
-
const { title, description, completedIcon, icon, ...rest } =
|
12245
|
-
return /* @__PURE__ */ (0,
|
12246
|
-
/* @__PURE__ */ (0,
|
12247
|
-
/* @__PURE__ */ (0,
|
12248
|
-
|
10364
|
+
var import_react156 = require("@chakra-ui/react");
|
10365
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
10366
|
+
var StepsItem = (props) => {
|
10367
|
+
const { title, description, completedIcon, icon, ...rest } = props;
|
10368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react156.Steps.Item, { ...rest, children: [
|
10369
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react156.Steps.Trigger, { children: [
|
10370
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
10371
|
+
import_react156.Steps.Status,
|
12249
10372
|
{
|
12250
|
-
complete: completedIcon || /* @__PURE__ */ (0,
|
12251
|
-
incomplete: icon || /* @__PURE__ */ (0,
|
10373
|
+
complete: completedIcon || /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CheckIcon, {}),
|
10374
|
+
incomplete: icon || /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Number, {})
|
12252
10375
|
}
|
12253
10376
|
) }),
|
12254
|
-
/* @__PURE__ */ (0,
|
10377
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(StepInfo, { title, description })
|
12255
10378
|
] }),
|
12256
|
-
/* @__PURE__ */ (0,
|
10379
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Separator, {})
|
12257
10380
|
] });
|
12258
10381
|
};
|
12259
|
-
var StepInfo = (
|
12260
|
-
const { title, description } =
|
10382
|
+
var StepInfo = (props) => {
|
10383
|
+
const { title, description } = props;
|
12261
10384
|
if (title && description) {
|
12262
|
-
return /* @__PURE__ */ (0,
|
12263
|
-
/* @__PURE__ */ (0,
|
12264
|
-
/* @__PURE__ */ (0,
|
10385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react156.Box, { children: [
|
10386
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Title, { children: title }),
|
10387
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Description, { children: description })
|
12265
10388
|
] });
|
12266
10389
|
}
|
12267
|
-
return /* @__PURE__ */ (0,
|
12268
|
-
title && /* @__PURE__ */ (0,
|
12269
|
-
description && /* @__PURE__ */ (0,
|
10390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
10391
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Title, { children: title }),
|
10392
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Description, { children: description })
|
12270
10393
|
] });
|
12271
10394
|
};
|
12272
|
-
var StepsIndicator = (
|
12273
|
-
const { icon = /* @__PURE__ */ (0,
|
12274
|
-
return /* @__PURE__ */ (0,
|
10395
|
+
var StepsIndicator = (props) => {
|
10396
|
+
const { icon = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Number, {}), completedIcon } = props;
|
10397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.Status, { complete: completedIcon, incomplete: icon }) });
|
12275
10398
|
};
|
12276
|
-
var StepsList =
|
12277
|
-
var StepsRoot =
|
12278
|
-
var StepsContent =
|
12279
|
-
var StepsCompletedContent =
|
12280
|
-
var StepsNextTrigger = (
|
12281
|
-
return /* @__PURE__ */ (0,
|
10399
|
+
var StepsList = import_react156.Steps.List;
|
10400
|
+
var StepsRoot = import_react156.Steps.Root;
|
10401
|
+
var StepsContent = import_react156.Steps.Content;
|
10402
|
+
var StepsCompletedContent = import_react156.Steps.CompletedContent;
|
10403
|
+
var StepsNextTrigger = (props) => {
|
10404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.NextTrigger, { ...props });
|
12282
10405
|
};
|
12283
|
-
var StepsPrevTrigger = (
|
12284
|
-
return /* @__PURE__ */ (0,
|
10406
|
+
var StepsPrevTrigger = (props) => {
|
10407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react156.Steps.PrevTrigger, { ...props });
|
12285
10408
|
};
|
12286
10409
|
|
12287
10410
|
// src/components/switch/switch.tsx
|
12288
|
-
var
|
12289
|
-
var
|
12290
|
-
var
|
12291
|
-
var Switch = (0,
|
12292
|
-
function Switch2(
|
12293
|
-
const { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } =
|
12294
|
-
return /* @__PURE__ */ (0,
|
12295
|
-
/* @__PURE__ */ (0,
|
12296
|
-
/* @__PURE__ */ (0,
|
12297
|
-
/* @__PURE__ */ (0,
|
12298
|
-
trackLabel && /* @__PURE__ */ (0,
|
10411
|
+
var import_react157 = require("@chakra-ui/react");
|
10412
|
+
var import_react158 = require("react");
|
10413
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
10414
|
+
var Switch = (0, import_react158.forwardRef)(
|
10415
|
+
function Switch2(props, ref) {
|
10416
|
+
const { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } = props;
|
10417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react157.Switch.Root, { ref: rootRef, ...rest, children: [
|
10418
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Switch.HiddenInput, { ref, ...inputProps }),
|
10419
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react157.Switch.Control, { children: [
|
10420
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Switch.Thumb, { children: thumbLabel && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Switch.ThumbIndicator, { fallback: thumbLabel == null ? void 0 : thumbLabel.off, children: thumbLabel == null ? void 0 : thumbLabel.on }) }),
|
10421
|
+
trackLabel && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Switch.Indicator, { fallback: trackLabel.off, children: trackLabel.on })
|
12299
10422
|
] }),
|
12300
|
-
children != null && /* @__PURE__ */ (0,
|
10423
|
+
children != null && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Switch.Label, { children })
|
12301
10424
|
] });
|
12302
10425
|
}
|
12303
10426
|
);
|
12304
10427
|
|
12305
10428
|
// src/components/tooltip/tooltip.tsx
|
12306
|
-
var
|
12307
|
-
var
|
12308
|
-
var
|
12309
|
-
var Tooltip = (0,
|
12310
|
-
function Tooltip2(
|
10429
|
+
var import_react159 = require("react");
|
10430
|
+
var import_react160 = require("@chakra-ui/react");
|
10431
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
10432
|
+
var Tooltip = (0, import_react159.forwardRef)(
|
10433
|
+
function Tooltip2(props, ref) {
|
12311
10434
|
const {
|
12312
10435
|
showArrow,
|
12313
10436
|
children,
|
@@ -12317,12 +10440,12 @@ var Tooltip = (0, import_react166.forwardRef)(
|
|
12317
10440
|
contentProps,
|
12318
10441
|
portalRef,
|
12319
10442
|
...rest
|
12320
|
-
} =
|
10443
|
+
} = props;
|
12321
10444
|
if (disabled) return children;
|
12322
|
-
return /* @__PURE__ */ (0,
|
12323
|
-
/* @__PURE__ */ (0,
|
12324
|
-
/* @__PURE__ */ (0,
|
12325
|
-
showArrow && /* @__PURE__ */ (0,
|
10445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react160.Tooltip.Root, { ...rest, children: [
|
10446
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react160.Tooltip.Trigger, { asChild: true, children }),
|
10447
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react160.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react160.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react160.Tooltip.Content, { ref, ...contentProps, children: [
|
10448
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react160.Tooltip.Arrow, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react160.Tooltip.ArrowTip, {}) }),
|
12326
10449
|
content
|
12327
10450
|
] }) }) })
|
12328
10451
|
] });
|