autumn-js 0.0.72 → 0.0.74
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/components.json +2 -2
- package/dist/libraries/backend/better-auth.d.mts +8 -0
- package/dist/libraries/backend/better-auth.d.ts +8 -0
- package/dist/libraries/backend/better-auth.js +20061 -0
- package/dist/libraries/backend/better-auth.mjs +19201 -0
- package/dist/libraries/backend/{chunk-6DZX6EAA.mjs → chunk-XGB3TDIC.mjs} +5 -0
- package/dist/libraries/backend/constants.mjs +1 -1
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/express.mjs +1 -1
- package/dist/libraries/backend/fastify.mjs +1 -1
- package/dist/libraries/backend/hono.mjs +1 -1
- package/dist/libraries/backend/next.mjs +1 -1
- package/dist/libraries/backend/react-router.mjs +1 -1
- package/dist/libraries/backend/{referralTypes-qdpA4XBw.d.ts → referralTypes-CSbCGBim.d.ts} +2 -0
- package/dist/libraries/backend/{referralTypes-C-jpvu6u.d.mts → referralTypes-DiYwS4QY.d.mts} +2 -0
- package/dist/libraries/backend/remix_dep.mjs +1 -1
- package/dist/libraries/backend/routes/backendRouter.mjs +1 -1
- package/dist/libraries/backend/routes/entityRoutes.mjs +1 -1
- package/dist/libraries/backend/routes/genRoutes.mjs +1 -1
- package/dist/libraries/backend/routes/productRoutes.mjs +1 -1
- package/dist/libraries/backend/routes/referralRoutes.mjs +1 -1
- package/dist/libraries/backend/supabase.mjs +1 -1
- package/dist/libraries/backend/tanstack.mjs +1 -1
- package/dist/libraries/backend/utils/backendRes.mjs +1 -1
- package/dist/libraries/backend/utils/logBackendErrors.mjs +1 -1
- package/dist/libraries/backend/utils/secretKeyCheck.mjs +1 -1
- package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
- package/dist/libraries/backend/utils/withAuth.mjs +1 -1
- package/dist/libraries/react/AutumnContext.d.mts +3 -3
- package/dist/libraries/react/AutumnContext.d.ts +3 -3
- package/dist/libraries/react/AutumnContext.js +11 -7
- package/dist/libraries/react/AutumnContext.mjs +7 -7
- package/dist/libraries/react/BaseAutumnProvider.d.mts +3 -3
- package/dist/libraries/react/BaseAutumnProvider.d.ts +3 -3
- package/dist/libraries/react/BaseAutumnProvider.js +5722 -179
- package/dist/libraries/react/BaseAutumnProvider.mjs +21 -12
- package/dist/libraries/react/{ReactAutumnClient-4e3t4WTF.d.mts → ReactAutumnClient-BT7tsOG0.d.mts} +2 -2
- package/dist/libraries/react/{ReactAutumnClient-B-lWmwRW.d.ts → ReactAutumnClient-DfDXFLBI.d.ts} +2 -2
- package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -1
- package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -1
- package/dist/libraries/react/ReactAutumnProvider.js +5729 -182
- package/dist/libraries/react/ReactAutumnProvider.mjs +21 -13
- package/dist/libraries/react/{checkTypes-BDNI_s2B.d.ts → checkTypes-ByzZ-KO2.d.ts} +2 -0
- package/dist/libraries/react/{checkTypes-CyKIOmeF.d.mts → checkTypes-h2Fyyuh0.d.mts} +2 -0
- package/dist/libraries/react/{chunk-4PX3AQKX.mjs → chunk-27OTS3Q5.mjs} +9 -9
- package/dist/libraries/react/{chunk-TBCLSIC2.mjs → chunk-3EYF7OI5.mjs} +1 -1
- package/dist/libraries/react/{chunk-4CGZZYLG.mjs → chunk-4J6OC4ZQ.mjs} +46 -1
- package/dist/libraries/react/chunk-5FZ7IV6P.mjs +2021 -0
- package/dist/libraries/react/{chunk-B7HGBQCO.mjs → chunk-6N2SUOJ6.mjs} +1 -1
- package/dist/libraries/react/{chunk-LS3NB4DU.mjs → chunk-77N4ARHR.mjs} +2 -2
- package/dist/libraries/react/chunk-CMO5LYYU.mjs +241 -0
- package/dist/libraries/react/{chunk-7PRD7RPD.mjs → chunk-D3H6GCJ4.mjs} +2 -2
- package/dist/libraries/react/chunk-FEFGYFXQ.mjs +134 -0
- package/dist/libraries/react/chunk-FPI3PLEL.mjs +218 -0
- package/dist/libraries/react/chunk-KQT5G3HT.mjs +27 -0
- package/dist/libraries/react/chunk-MF3MHICX.mjs +983 -0
- package/dist/libraries/react/{chunk-O4HHXBGR.mjs → chunk-P2O4LZFD.mjs} +30 -30
- package/dist/libraries/react/{chunk-Q7CK32YT.mjs → chunk-PFTFPWFN.mjs} +26 -8
- package/dist/libraries/react/{chunk-CE5BBB5H.mjs → chunk-TLRISML2.mjs} +10 -9
- package/dist/libraries/react/{chunk-4KKWHG2V.mjs → chunk-V5PKOA5A.mjs} +1 -1
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +3 -3
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +3 -3
- package/dist/libraries/react/client/ReactAutumnClient.js +11 -7
- package/dist/libraries/react/client/ReactAutumnClient.mjs +6 -6
- package/dist/libraries/react/client/clientCompMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientCompMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientCusMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientCusMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientEntityMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientEntityMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientEntityMethods.js +9 -6
- package/dist/libraries/react/client/clientEntityMethods.mjs +2 -2
- package/dist/libraries/react/client/clientGenMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientGenMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientGenMethods.js +10 -7
- package/dist/libraries/react/client/clientGenMethods.mjs +2 -2
- package/dist/libraries/react/client/clientProdMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientProdMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientReferralMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientReferralMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientReferralMethods.js +9 -6
- package/dist/libraries/react/client/clientReferralMethods.mjs +2 -2
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +1 -0
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +1 -0
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +2594 -222
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +18 -24
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +1 -1
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +2260 -127
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +6 -4
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +2 -2
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +2 -2
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +3023 -664
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +18 -24
- package/dist/libraries/react/components/ui/button.d.mts +6 -6
- package/dist/libraries/react/components/ui/button.d.ts +6 -6
- package/dist/libraries/react/components/ui/button.js +206 -31
- package/dist/libraries/react/components/ui/button.mjs +3 -2
- package/dist/libraries/react/components/ui/dialog.d.mts +16 -12
- package/dist/libraries/react/components/ui/dialog.d.ts +16 -12
- package/dist/libraries/react/components/ui/dialog.js +2254 -148
- package/dist/libraries/react/components/ui/dialog.mjs +5 -2
- package/dist/libraries/react/components/ui/switch.d.mts +2 -3
- package/dist/libraries/react/components/ui/switch.d.ts +2 -3
- package/dist/libraries/react/components/ui/switch.js +575 -29
- package/dist/libraries/react/components/ui/switch.mjs +5 -2
- package/dist/libraries/react/hooks/useAutumn.d.mts +3 -3
- package/dist/libraries/react/hooks/useAutumn.d.ts +3 -3
- package/dist/libraries/react/hooks/useAutumn.js +5793 -134
- package/dist/libraries/react/hooks/useAutumn.mjs +22 -10
- package/dist/libraries/react/hooks/useAutumnBase.d.mts +3 -3
- package/dist/libraries/react/hooks/useAutumnBase.d.ts +3 -3
- package/dist/libraries/react/hooks/useAutumnBase.js +5789 -130
- package/dist/libraries/react/hooks/useAutumnBase.mjs +22 -9
- package/dist/libraries/react/hooks/useCustomer.d.mts +3 -3
- package/dist/libraries/react/hooks/useCustomer.d.ts +3 -3
- package/dist/libraries/react/hooks/useCustomer.js +5718 -174
- package/dist/libraries/react/hooks/useCustomer.mjs +21 -11
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +3 -3
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +3 -3
- package/dist/libraries/react/hooks/useCustomerBase.js +5726 -174
- package/dist/libraries/react/hooks/useCustomerBase.mjs +21 -10
- package/dist/libraries/react/hooks/useEntity.d.mts +8 -6
- package/dist/libraries/react/hooks/useEntity.d.ts +8 -6
- package/dist/libraries/react/hooks/useEntity.js +5986 -48
- package/dist/libraries/react/hooks/useEntity.mjs +21 -9
- package/dist/libraries/react/hooks/useEntityBase.d.mts +9 -11
- package/dist/libraries/react/hooks/useEntityBase.d.ts +9 -11
- package/dist/libraries/react/hooks/useEntityBase.js +6690 -37
- package/dist/libraries/react/hooks/useEntityBase.mjs +25 -1
- package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.js +36 -14
- package/dist/libraries/react/hooks/usePricingTable.mjs +9 -9
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +3 -3
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +3 -3
- package/dist/libraries/react/hooks/usePricingTableBase.js +36 -14
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +8 -8
- package/dist/libraries/react/hooks/useProductsBase.js +11 -7
- package/dist/libraries/react/hooks/useProductsBase.mjs +7 -7
- package/dist/libraries/react/index.d.ts +9 -7
- package/dist/libraries/react/index.js +3478 -1089
- package/dist/libraries/react/index.mjs +3476 -1087
- package/dist/libraries/react/lib/utils.js +46 -1
- package/dist/libraries/react/lib/utils.mjs +1 -1
- package/dist/libraries/react/{response-ChCmaLBk.d.mts → response-B37tbVeT.d.mts} +1 -1
- package/dist/libraries/react/{response-9K8DyGXf.d.ts → response-CREh0tw3.d.ts} +1 -1
- package/dist/libraries/react/utils/toSnakeCase.d.mts +1 -1
- package/dist/libraries/react/utils/toSnakeCase.d.ts +1 -1
- package/dist/libraries/react/utils/toSnakeCase.js +9 -6
- package/dist/libraries/react/utils/toSnakeCase.mjs +1 -1
- package/dist/next/client/NextAutumnClient.d.mts +2 -2
- package/dist/next/client/NextAutumnClient.d.ts +2 -2
- package/dist/next/client/{checkTypes-BHxu_xEV.d.ts → checkTypes-BVlLFoUT.d.ts} +2 -0
- package/dist/next/client/{checkTypes-CEaWu4S3.d.mts → checkTypes-CGZpuidI.d.mts} +2 -0
- package/dist/next/client/{clientGenTypes-i3cKamAv.d.ts → clientGenTypes-CXkGuJ6W.d.ts} +2 -1
- package/dist/next/client/{clientGenTypes-BRfigzSY.d.mts → clientGenTypes-Dh9BiE0s.d.mts} +2 -1
- package/dist/next/client/hooks/useAutumn.d.mts +3 -3
- package/dist/next/client/hooks/useAutumn.d.ts +3 -3
- package/dist/next/client/hooks/useCustomer.d.mts +2 -2
- package/dist/next/client/hooks/useCustomer.d.ts +2 -2
- package/dist/next/client/hooks/useEntity.d.mts +7 -7
- package/dist/next/client/hooks/useEntity.d.ts +7 -7
- package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
- package/dist/next/index.d.mts +7 -6
- package/dist/next/index.d.ts +7 -6
- package/dist/next/server/cusActions.d.mts +2 -0
- package/dist/next/server/cusActions.d.ts +2 -0
- package/dist/next/server/genActions.d.mts +1 -0
- package/dist/next/server/genActions.d.ts +1 -0
- package/dist/sdk/index.d.mts +2 -0
- package/dist/sdk/index.d.ts +2 -0
- package/dist/styles/global.css +1118 -1024
- package/package.json +11 -12
- package/scripts/sync-registry.ts +79 -191
- package/tailwind.config.ts +96 -0
- package/tsup.config.ts +3 -4
- package/tsup.dev.config.ts +2 -4
- package/dist/libraries/react/chunk-2XYYCR4J.mjs +0 -276
- package/dist/libraries/react/chunk-FHANCAHB.mjs +0 -17
- package/dist/libraries/react/chunk-GTF7A5TG.mjs +0 -76
- package/dist/libraries/react/chunk-NEV76K4V.mjs +0 -552
- package/dist/libraries/react/chunk-QMIIDFRP.mjs +0 -85
- package/dist/libraries/react/chunk-TFGQQAVB.mjs +0 -38
- package/dist/libraries/react/chunk-X3HJKZGO.mjs +0 -58
- package/dist/libraries/react/chunk-ZKHBOCMO.mjs +0 -17
- package/dist/libraries/react/chunk-ZNPQQ2WK.mjs +0 -24
- package/dist/libraries/react/chunk-ZQ6LDLK5.mjs +0 -149
- package/dist/libraries/react/chunk-ZWO4QYXI.mjs +0 -20
- package/dist/libraries/react/chunk-ZXE5MFKL.mjs +0 -45
- package/tailwind.config.js +0 -57
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
"use client";
|
|
3
4
|
import {
|
|
4
5
|
Dialog,
|
|
5
6
|
DialogClose,
|
|
@@ -11,8 +12,10 @@ import {
|
|
|
11
12
|
DialogPortal,
|
|
12
13
|
DialogTitle,
|
|
13
14
|
DialogTrigger
|
|
14
|
-
} from "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
} from "../../chunk-5FZ7IV6P.mjs";
|
|
16
|
+
import "../../chunk-FPI3PLEL.mjs";
|
|
17
|
+
import "../../chunk-FEFGYFXQ.mjs";
|
|
18
|
+
import "../../chunk-4J6OC4ZQ.mjs";
|
|
16
19
|
export {
|
|
17
20
|
Dialog,
|
|
18
21
|
DialogClose,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import * as
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
4
3
|
|
|
5
|
-
declare
|
|
4
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
5
|
|
|
7
6
|
export { Switch };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import * as
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
4
3
|
|
|
5
|
-
declare
|
|
4
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
5
|
|
|
7
6
|
export { Switch };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
"use strict";
|
|
4
|
+
"use client";
|
|
4
5
|
var __create = Object.create;
|
|
5
6
|
var __defProp = Object.defineProperty;
|
|
6
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -32,10 +33,515 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
33
|
// src/libraries/react/components/ui/switch.tsx
|
|
33
34
|
var switch_exports = {};
|
|
34
35
|
__export(switch_exports, {
|
|
35
|
-
Switch: () =>
|
|
36
|
+
Switch: () => Switch2
|
|
36
37
|
});
|
|
37
38
|
module.exports = __toCommonJS(switch_exports);
|
|
38
|
-
var
|
|
39
|
+
var React10 = __toESM(require("react"));
|
|
40
|
+
|
|
41
|
+
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3._uwbsid7oqv3j27entxmzcweyee/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
42
|
+
var React9 = __toESM(require("react"), 1);
|
|
43
|
+
|
|
44
|
+
// ../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
45
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
46
|
+
return function handleEvent(event) {
|
|
47
|
+
originalEventHandler?.(event);
|
|
48
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
49
|
+
return ourEventHandler?.(event);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// ../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
55
|
+
var React = __toESM(require("react"), 1);
|
|
56
|
+
function setRef(ref, value) {
|
|
57
|
+
if (typeof ref === "function") {
|
|
58
|
+
return ref(value);
|
|
59
|
+
} else if (ref !== null && ref !== void 0) {
|
|
60
|
+
ref.current = value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function composeRefs(...refs) {
|
|
64
|
+
return (node) => {
|
|
65
|
+
let hasCleanup = false;
|
|
66
|
+
const cleanups = refs.map((ref) => {
|
|
67
|
+
const cleanup = setRef(ref, node);
|
|
68
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
69
|
+
hasCleanup = true;
|
|
70
|
+
}
|
|
71
|
+
return cleanup;
|
|
72
|
+
});
|
|
73
|
+
if (hasCleanup) {
|
|
74
|
+
return () => {
|
|
75
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
76
|
+
const cleanup = cleanups[i];
|
|
77
|
+
if (typeof cleanup == "function") {
|
|
78
|
+
cleanup();
|
|
79
|
+
} else {
|
|
80
|
+
setRef(refs[i], null);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function useComposedRefs(...refs) {
|
|
88
|
+
return React.useCallback(composeRefs(...refs), refs);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
92
|
+
var React2 = __toESM(require("react"), 1);
|
|
93
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
94
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
95
|
+
let defaultContexts = [];
|
|
96
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
97
|
+
const BaseContext = React2.createContext(defaultContext);
|
|
98
|
+
const index = defaultContexts.length;
|
|
99
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
100
|
+
const Provider = (props) => {
|
|
101
|
+
const { scope, children, ...context } = props;
|
|
102
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
103
|
+
const value = React2.useMemo(() => context, Object.values(context));
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
|
105
|
+
};
|
|
106
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
107
|
+
function useContext2(consumerName, scope) {
|
|
108
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
109
|
+
const context = React2.useContext(Context);
|
|
110
|
+
if (context) return context;
|
|
111
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
112
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
113
|
+
}
|
|
114
|
+
return [Provider, useContext2];
|
|
115
|
+
}
|
|
116
|
+
const createScope = () => {
|
|
117
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
118
|
+
return React2.createContext(defaultContext);
|
|
119
|
+
});
|
|
120
|
+
return function useScope(scope) {
|
|
121
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
122
|
+
return React2.useMemo(
|
|
123
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
124
|
+
[scope, contexts]
|
|
125
|
+
);
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
createScope.scopeName = scopeName;
|
|
129
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
130
|
+
}
|
|
131
|
+
function composeContextScopes(...scopes) {
|
|
132
|
+
const baseScope = scopes[0];
|
|
133
|
+
if (scopes.length === 1) return baseScope;
|
|
134
|
+
const createScope = () => {
|
|
135
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
136
|
+
useScope: createScope2(),
|
|
137
|
+
scopeName: createScope2.scopeName
|
|
138
|
+
}));
|
|
139
|
+
return function useComposedScopes(overrideScopes) {
|
|
140
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
141
|
+
const scopeProps = useScope(overrideScopes);
|
|
142
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
143
|
+
return { ...nextScopes2, ...currentScope };
|
|
144
|
+
}, {});
|
|
145
|
+
return React2.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
createScope.scopeName = baseScope.scopeName;
|
|
149
|
+
return createScope;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
153
|
+
var React4 = __toESM(require("react"), 1);
|
|
154
|
+
|
|
155
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
156
|
+
var React3 = __toESM(require("react"), 1);
|
|
157
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
161
|
+
var React22 = __toESM(require("react"), 1);
|
|
162
|
+
var useInsertionEffect = React4[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
163
|
+
function useControllableState({
|
|
164
|
+
prop,
|
|
165
|
+
defaultProp,
|
|
166
|
+
onChange = () => {
|
|
167
|
+
},
|
|
168
|
+
caller
|
|
169
|
+
}) {
|
|
170
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
171
|
+
defaultProp,
|
|
172
|
+
onChange
|
|
173
|
+
});
|
|
174
|
+
const isControlled = prop !== void 0;
|
|
175
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
176
|
+
if (true) {
|
|
177
|
+
const isControlledRef = React4.useRef(prop !== void 0);
|
|
178
|
+
React4.useEffect(() => {
|
|
179
|
+
const wasControlled = isControlledRef.current;
|
|
180
|
+
if (wasControlled !== isControlled) {
|
|
181
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
182
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
183
|
+
console.warn(
|
|
184
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
isControlledRef.current = isControlled;
|
|
188
|
+
}, [isControlled, caller]);
|
|
189
|
+
}
|
|
190
|
+
const setValue = React4.useCallback(
|
|
191
|
+
(nextValue) => {
|
|
192
|
+
if (isControlled) {
|
|
193
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
194
|
+
if (value2 !== prop) {
|
|
195
|
+
onChangeRef.current?.(value2);
|
|
196
|
+
}
|
|
197
|
+
} else {
|
|
198
|
+
setUncontrolledProp(nextValue);
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
202
|
+
);
|
|
203
|
+
return [value, setValue];
|
|
204
|
+
}
|
|
205
|
+
function useUncontrolledState({
|
|
206
|
+
defaultProp,
|
|
207
|
+
onChange
|
|
208
|
+
}) {
|
|
209
|
+
const [value, setValue] = React4.useState(defaultProp);
|
|
210
|
+
const prevValueRef = React4.useRef(value);
|
|
211
|
+
const onChangeRef = React4.useRef(onChange);
|
|
212
|
+
useInsertionEffect(() => {
|
|
213
|
+
onChangeRef.current = onChange;
|
|
214
|
+
}, [onChange]);
|
|
215
|
+
React4.useEffect(() => {
|
|
216
|
+
if (prevValueRef.current !== value) {
|
|
217
|
+
onChangeRef.current?.(value);
|
|
218
|
+
prevValueRef.current = value;
|
|
219
|
+
}
|
|
220
|
+
}, [value, prevValueRef]);
|
|
221
|
+
return [value, setValue, onChangeRef];
|
|
222
|
+
}
|
|
223
|
+
function isFunction(value) {
|
|
224
|
+
return typeof value === "function";
|
|
225
|
+
}
|
|
226
|
+
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
227
|
+
|
|
228
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
229
|
+
var React5 = __toESM(require("react"), 1);
|
|
230
|
+
function usePrevious(value) {
|
|
231
|
+
const ref = React5.useRef({ value, previous: value });
|
|
232
|
+
return React5.useMemo(() => {
|
|
233
|
+
if (ref.current.value !== value) {
|
|
234
|
+
ref.current.previous = ref.current.value;
|
|
235
|
+
ref.current.value = value;
|
|
236
|
+
}
|
|
237
|
+
return ref.current.previous;
|
|
238
|
+
}, [value]);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
242
|
+
var React6 = __toESM(require("react"), 1);
|
|
243
|
+
function useSize(element) {
|
|
244
|
+
const [size, setSize] = React6.useState(void 0);
|
|
245
|
+
useLayoutEffect2(() => {
|
|
246
|
+
if (element) {
|
|
247
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
248
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
249
|
+
if (!Array.isArray(entries)) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (!entries.length) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const entry = entries[0];
|
|
256
|
+
let width;
|
|
257
|
+
let height;
|
|
258
|
+
if ("borderBoxSize" in entry) {
|
|
259
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
260
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
261
|
+
width = borderSize["inlineSize"];
|
|
262
|
+
height = borderSize["blockSize"];
|
|
263
|
+
} else {
|
|
264
|
+
width = element.offsetWidth;
|
|
265
|
+
height = element.offsetHeight;
|
|
266
|
+
}
|
|
267
|
+
setSize({ width, height });
|
|
268
|
+
});
|
|
269
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
270
|
+
return () => resizeObserver.unobserve(element);
|
|
271
|
+
} else {
|
|
272
|
+
setSize(void 0);
|
|
273
|
+
}
|
|
274
|
+
}, [element]);
|
|
275
|
+
return size;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// ../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18_t6r7cxmbmoheujv3t43yqlikou/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
279
|
+
var React8 = __toESM(require("react"), 1);
|
|
280
|
+
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
281
|
+
|
|
282
|
+
// ../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
283
|
+
var React7 = __toESM(require("react"), 1);
|
|
284
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
285
|
+
// @__NO_SIDE_EFFECTS__
|
|
286
|
+
function createSlot(ownerName) {
|
|
287
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
288
|
+
const Slot2 = React7.forwardRef((props, forwardedRef) => {
|
|
289
|
+
const { children, ...slotProps } = props;
|
|
290
|
+
const childrenArray = React7.Children.toArray(children);
|
|
291
|
+
const slottable = childrenArray.find(isSlottable);
|
|
292
|
+
if (slottable) {
|
|
293
|
+
const newElement = slottable.props.children;
|
|
294
|
+
const newChildren = childrenArray.map((child) => {
|
|
295
|
+
if (child === slottable) {
|
|
296
|
+
if (React7.Children.count(newElement) > 1) return React7.Children.only(null);
|
|
297
|
+
return React7.isValidElement(newElement) ? newElement.props.children : null;
|
|
298
|
+
} else {
|
|
299
|
+
return child;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React7.isValidElement(newElement) ? React7.cloneElement(newElement, void 0, newChildren) : null });
|
|
303
|
+
}
|
|
304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
305
|
+
});
|
|
306
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
307
|
+
return Slot2;
|
|
308
|
+
}
|
|
309
|
+
// @__NO_SIDE_EFFECTS__
|
|
310
|
+
function createSlotClone(ownerName) {
|
|
311
|
+
const SlotClone = React7.forwardRef((props, forwardedRef) => {
|
|
312
|
+
const { children, ...slotProps } = props;
|
|
313
|
+
if (React7.isValidElement(children)) {
|
|
314
|
+
const childrenRef = getElementRef(children);
|
|
315
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
316
|
+
if (children.type !== React7.Fragment) {
|
|
317
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
318
|
+
}
|
|
319
|
+
return React7.cloneElement(children, props2);
|
|
320
|
+
}
|
|
321
|
+
return React7.Children.count(children) > 1 ? React7.Children.only(null) : null;
|
|
322
|
+
});
|
|
323
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
324
|
+
return SlotClone;
|
|
325
|
+
}
|
|
326
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
327
|
+
function isSlottable(child) {
|
|
328
|
+
return React7.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
329
|
+
}
|
|
330
|
+
function mergeProps(slotProps, childProps) {
|
|
331
|
+
const overrideProps = { ...childProps };
|
|
332
|
+
for (const propName in childProps) {
|
|
333
|
+
const slotPropValue = slotProps[propName];
|
|
334
|
+
const childPropValue = childProps[propName];
|
|
335
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
336
|
+
if (isHandler) {
|
|
337
|
+
if (slotPropValue && childPropValue) {
|
|
338
|
+
overrideProps[propName] = (...args) => {
|
|
339
|
+
const result = childPropValue(...args);
|
|
340
|
+
slotPropValue(...args);
|
|
341
|
+
return result;
|
|
342
|
+
};
|
|
343
|
+
} else if (slotPropValue) {
|
|
344
|
+
overrideProps[propName] = slotPropValue;
|
|
345
|
+
}
|
|
346
|
+
} else if (propName === "style") {
|
|
347
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
348
|
+
} else if (propName === "className") {
|
|
349
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
return { ...slotProps, ...overrideProps };
|
|
353
|
+
}
|
|
354
|
+
function getElementRef(element) {
|
|
355
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
356
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
357
|
+
if (mayWarn) {
|
|
358
|
+
return element.ref;
|
|
359
|
+
}
|
|
360
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
361
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
362
|
+
if (mayWarn) {
|
|
363
|
+
return element.props.ref;
|
|
364
|
+
}
|
|
365
|
+
return element.props.ref || element.ref;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// ../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18_t6r7cxmbmoheujv3t43yqlikou/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
369
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
370
|
+
var NODES = [
|
|
371
|
+
"a",
|
|
372
|
+
"button",
|
|
373
|
+
"div",
|
|
374
|
+
"form",
|
|
375
|
+
"h2",
|
|
376
|
+
"h3",
|
|
377
|
+
"img",
|
|
378
|
+
"input",
|
|
379
|
+
"label",
|
|
380
|
+
"li",
|
|
381
|
+
"nav",
|
|
382
|
+
"ol",
|
|
383
|
+
"p",
|
|
384
|
+
"select",
|
|
385
|
+
"span",
|
|
386
|
+
"svg",
|
|
387
|
+
"ul"
|
|
388
|
+
];
|
|
389
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
390
|
+
const Slot = createSlot(`Primitive.${node}`);
|
|
391
|
+
const Node = React8.forwardRef((props, forwardedRef) => {
|
|
392
|
+
const { asChild, ...primitiveProps } = props;
|
|
393
|
+
const Comp = asChild ? Slot : node;
|
|
394
|
+
if (typeof window !== "undefined") {
|
|
395
|
+
window[Symbol.for("radix-ui")] = true;
|
|
396
|
+
}
|
|
397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
398
|
+
});
|
|
399
|
+
Node.displayName = `Primitive.${node}`;
|
|
400
|
+
return { ...primitive, [node]: Node };
|
|
401
|
+
}, {});
|
|
402
|
+
|
|
403
|
+
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3._uwbsid7oqv3j27entxmzcweyee/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
404
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
405
|
+
var SWITCH_NAME = "Switch";
|
|
406
|
+
var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
|
|
407
|
+
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
408
|
+
var Switch = React9.forwardRef(
|
|
409
|
+
(props, forwardedRef) => {
|
|
410
|
+
const {
|
|
411
|
+
__scopeSwitch,
|
|
412
|
+
name,
|
|
413
|
+
checked: checkedProp,
|
|
414
|
+
defaultChecked,
|
|
415
|
+
required,
|
|
416
|
+
disabled,
|
|
417
|
+
value = "on",
|
|
418
|
+
onCheckedChange,
|
|
419
|
+
form,
|
|
420
|
+
...switchProps
|
|
421
|
+
} = props;
|
|
422
|
+
const [button, setButton] = React9.useState(null);
|
|
423
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
424
|
+
const hasConsumerStoppedPropagationRef = React9.useRef(false);
|
|
425
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
426
|
+
const [checked, setChecked] = useControllableState({
|
|
427
|
+
prop: checkedProp,
|
|
428
|
+
defaultProp: defaultChecked ?? false,
|
|
429
|
+
onChange: onCheckedChange,
|
|
430
|
+
caller: SWITCH_NAME
|
|
431
|
+
});
|
|
432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
434
|
+
Primitive.button,
|
|
435
|
+
{
|
|
436
|
+
type: "button",
|
|
437
|
+
role: "switch",
|
|
438
|
+
"aria-checked": checked,
|
|
439
|
+
"aria-required": required,
|
|
440
|
+
"data-state": getState(checked),
|
|
441
|
+
"data-disabled": disabled ? "" : void 0,
|
|
442
|
+
disabled,
|
|
443
|
+
value,
|
|
444
|
+
...switchProps,
|
|
445
|
+
ref: composedRefs,
|
|
446
|
+
onClick: composeEventHandlers(props.onClick, (event) => {
|
|
447
|
+
setChecked((prevChecked) => !prevChecked);
|
|
448
|
+
if (isFormControl) {
|
|
449
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
450
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
451
|
+
}
|
|
452
|
+
})
|
|
453
|
+
}
|
|
454
|
+
),
|
|
455
|
+
isFormControl && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
456
|
+
SwitchBubbleInput,
|
|
457
|
+
{
|
|
458
|
+
control: button,
|
|
459
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
460
|
+
name,
|
|
461
|
+
value,
|
|
462
|
+
checked,
|
|
463
|
+
required,
|
|
464
|
+
disabled,
|
|
465
|
+
form,
|
|
466
|
+
style: { transform: "translateX(-100%)" }
|
|
467
|
+
}
|
|
468
|
+
)
|
|
469
|
+
] });
|
|
470
|
+
}
|
|
471
|
+
);
|
|
472
|
+
Switch.displayName = SWITCH_NAME;
|
|
473
|
+
var THUMB_NAME = "SwitchThumb";
|
|
474
|
+
var SwitchThumb = React9.forwardRef(
|
|
475
|
+
(props, forwardedRef) => {
|
|
476
|
+
const { __scopeSwitch, ...thumbProps } = props;
|
|
477
|
+
const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
|
|
478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
479
|
+
Primitive.span,
|
|
480
|
+
{
|
|
481
|
+
"data-state": getState(context.checked),
|
|
482
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
483
|
+
...thumbProps,
|
|
484
|
+
ref: forwardedRef
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
);
|
|
489
|
+
SwitchThumb.displayName = THUMB_NAME;
|
|
490
|
+
var BUBBLE_INPUT_NAME = "SwitchBubbleInput";
|
|
491
|
+
var SwitchBubbleInput = React9.forwardRef(
|
|
492
|
+
({
|
|
493
|
+
__scopeSwitch,
|
|
494
|
+
control,
|
|
495
|
+
checked,
|
|
496
|
+
bubbles = true,
|
|
497
|
+
...props
|
|
498
|
+
}, forwardedRef) => {
|
|
499
|
+
const ref = React9.useRef(null);
|
|
500
|
+
const composedRefs = useComposedRefs(ref, forwardedRef);
|
|
501
|
+
const prevChecked = usePrevious(checked);
|
|
502
|
+
const controlSize = useSize(control);
|
|
503
|
+
React9.useEffect(() => {
|
|
504
|
+
const input = ref.current;
|
|
505
|
+
if (!input) return;
|
|
506
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
507
|
+
const descriptor = Object.getOwnPropertyDescriptor(
|
|
508
|
+
inputProto,
|
|
509
|
+
"checked"
|
|
510
|
+
);
|
|
511
|
+
const setChecked = descriptor.set;
|
|
512
|
+
if (prevChecked !== checked && setChecked) {
|
|
513
|
+
const event = new Event("click", { bubbles });
|
|
514
|
+
setChecked.call(input, checked);
|
|
515
|
+
input.dispatchEvent(event);
|
|
516
|
+
}
|
|
517
|
+
}, [prevChecked, checked, bubbles]);
|
|
518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
519
|
+
"input",
|
|
520
|
+
{
|
|
521
|
+
type: "checkbox",
|
|
522
|
+
"aria-hidden": true,
|
|
523
|
+
defaultChecked: checked,
|
|
524
|
+
...props,
|
|
525
|
+
tabIndex: -1,
|
|
526
|
+
ref: composedRefs,
|
|
527
|
+
style: {
|
|
528
|
+
...props.style,
|
|
529
|
+
...controlSize,
|
|
530
|
+
position: "absolute",
|
|
531
|
+
pointerEvents: "none",
|
|
532
|
+
opacity: 0,
|
|
533
|
+
margin: 0
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
);
|
|
539
|
+
SwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;
|
|
540
|
+
function getState(checked) {
|
|
541
|
+
return checked ? "checked" : "unchecked";
|
|
542
|
+
}
|
|
543
|
+
var Root = Switch;
|
|
544
|
+
var Thumb = SwitchThumb;
|
|
39
545
|
|
|
40
546
|
// ../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
41
547
|
function r(e) {
|
|
@@ -2510,40 +3016,80 @@ var getDefaultConfig = () => {
|
|
|
2510
3016
|
}
|
|
2511
3017
|
};
|
|
2512
3018
|
};
|
|
2513
|
-
var
|
|
3019
|
+
var mergeConfigs = (baseConfig, {
|
|
3020
|
+
cacheSize,
|
|
3021
|
+
prefix,
|
|
3022
|
+
separator,
|
|
3023
|
+
experimentalParseClassName,
|
|
3024
|
+
extend = {},
|
|
3025
|
+
override = {}
|
|
3026
|
+
}) => {
|
|
3027
|
+
overrideProperty(baseConfig, "cacheSize", cacheSize);
|
|
3028
|
+
overrideProperty(baseConfig, "prefix", prefix);
|
|
3029
|
+
overrideProperty(baseConfig, "separator", separator);
|
|
3030
|
+
overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
|
|
3031
|
+
for (const configKey in override) {
|
|
3032
|
+
overrideConfigProperties(baseConfig[configKey], override[configKey]);
|
|
3033
|
+
}
|
|
3034
|
+
for (const key in extend) {
|
|
3035
|
+
mergeConfigProperties(baseConfig[key], extend[key]);
|
|
3036
|
+
}
|
|
3037
|
+
return baseConfig;
|
|
3038
|
+
};
|
|
3039
|
+
var overrideProperty = (baseObject, overrideKey, overrideValue) => {
|
|
3040
|
+
if (overrideValue !== void 0) {
|
|
3041
|
+
baseObject[overrideKey] = overrideValue;
|
|
3042
|
+
}
|
|
3043
|
+
};
|
|
3044
|
+
var overrideConfigProperties = (baseObject, overrideObject) => {
|
|
3045
|
+
if (overrideObject) {
|
|
3046
|
+
for (const key in overrideObject) {
|
|
3047
|
+
overrideProperty(baseObject, key, overrideObject[key]);
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
};
|
|
3051
|
+
var mergeConfigProperties = (baseObject, mergeObject) => {
|
|
3052
|
+
if (mergeObject) {
|
|
3053
|
+
for (const key in mergeObject) {
|
|
3054
|
+
const mergeValue = mergeObject[key];
|
|
3055
|
+
if (mergeValue !== void 0) {
|
|
3056
|
+
baseObject[key] = (baseObject[key] || []).concat(mergeValue);
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
}
|
|
3060
|
+
};
|
|
3061
|
+
var extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
|
|
2514
3062
|
|
|
2515
3063
|
// src/libraries/react/lib/utils.ts
|
|
3064
|
+
var twMerge = extendTailwindMerge({
|
|
3065
|
+
prefix: "au-"
|
|
3066
|
+
});
|
|
2516
3067
|
function cn(...inputs) {
|
|
2517
3068
|
return twMerge(clsx(inputs));
|
|
2518
3069
|
}
|
|
2519
3070
|
|
|
2520
3071
|
// src/libraries/react/components/ui/switch.tsx
|
|
2521
|
-
var
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
}
|
|
2543
|
-
)
|
|
2544
|
-
}
|
|
2545
|
-
);
|
|
2546
|
-
}
|
|
3072
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
3073
|
+
var Switch2 = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3074
|
+
Root,
|
|
3075
|
+
{
|
|
3076
|
+
className: cn(
|
|
3077
|
+
"au-peer au-inline-flex au-h-5 au-w-9 au-shrink-0 au-cursor-pointer au-items-center au-rounded-full au-border-2 au-border-transparent au-shadow-sm au-transition-colors focus-visible:au-outline-none focus-visible:au-ring-2 focus-visible:au-ring-ring focus-visible:au-ring-offset-2 focus-visible:au-ring-offset-background au-disabled:cursor-not-allowed au-disabled:opacity-50 data-[state=checked]:au-bg-primary data-[state=unchecked]:au-bg-input",
|
|
3078
|
+
className
|
|
3079
|
+
),
|
|
3080
|
+
...props,
|
|
3081
|
+
ref,
|
|
3082
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3083
|
+
Thumb,
|
|
3084
|
+
{
|
|
3085
|
+
className: cn(
|
|
3086
|
+
"au-pointer-events-none au-block au-h-4 au-w-4 au-rounded-full au-bg-background au-shadow-lg au-ring-0 au-transition-transform data-[state=checked]:au-translate-x-4 data-[state=unchecked]:au-translate-x-0"
|
|
3087
|
+
)
|
|
3088
|
+
}
|
|
3089
|
+
)
|
|
3090
|
+
}
|
|
3091
|
+
));
|
|
3092
|
+
Switch2.displayName = Root.displayName;
|
|
2547
3093
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2548
3094
|
0 && (module.exports = {
|
|
2549
3095
|
Switch
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
"use client";
|
|
3
4
|
import {
|
|
4
5
|
Switch
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
} from "../../chunk-CMO5LYYU.mjs";
|
|
7
|
+
import "../../chunk-FPI3PLEL.mjs";
|
|
8
|
+
import "../../chunk-FEFGYFXQ.mjs";
|
|
9
|
+
import "../../chunk-4J6OC4ZQ.mjs";
|
|
7
10
|
export {
|
|
8
11
|
Switch
|
|
9
12
|
};
|