autumn-js 0.1.39 → 0.1.41-beta.0
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/dist/libraries/backend/better-auth.d.mts +2 -1
- package/dist/libraries/backend/better-auth.d.ts +2 -1
- package/dist/libraries/react/AutumnContext.mjs +4 -4
- package/dist/libraries/react/BaseAutumnProvider.mjs +6 -6
- package/dist/libraries/react/ReactAutumnProvider.mjs +7 -7
- package/dist/libraries/react/{chunk-MHAXHLX4.mjs → chunk-2LS46JI3.mjs} +7 -7
- package/dist/libraries/react/{chunk-HSSN3DVD.mjs → chunk-35JJUJGK.mjs} +1 -1
- package/dist/libraries/react/{chunk-EUDPGYST.mjs → chunk-3VPXKYJ3.mjs} +3 -3
- package/dist/libraries/react/{chunk-2LZIBRD4.mjs → chunk-5RG2M33M.mjs} +4 -4
- package/dist/libraries/react/{chunk-4KLTPVNG.mjs → chunk-5SVQ3PPG.mjs} +6 -6
- package/dist/libraries/react/{chunk-P2R2JPDF.mjs → chunk-7K7ME43L.mjs} +1 -1
- package/dist/libraries/react/{chunk-2GEDBGON.mjs → chunk-7NRUXGKJ.mjs} +12 -12
- package/dist/libraries/react/{chunk-QX2NP5QY.mjs → chunk-BFQ772QL.mjs} +452 -449
- package/dist/libraries/react/{chunk-WRKSH6S6.mjs → chunk-DIDEEVJB.mjs} +2 -2
- package/dist/libraries/react/{chunk-74O4DLZY.mjs → chunk-DTAJR247.mjs} +1 -1
- package/dist/libraries/react/{chunk-733BYSMJ.mjs → chunk-HEKBPI6U.mjs} +2 -2
- package/dist/libraries/react/{chunk-YSD4K25G.mjs → chunk-IZEOJCTN.mjs} +1 -1
- package/dist/libraries/react/{chunk-4QVAJKUF.mjs → chunk-KAQC7WDQ.mjs} +5 -5
- package/dist/libraries/react/{chunk-J4VVJBJY.mjs → chunk-P2SWE4OD.mjs} +1 -1
- package/dist/libraries/react/{chunk-QEWVBDWJ.mjs → chunk-Q7N6ARDI.mjs} +1 -1
- package/dist/libraries/react/{chunk-I274Z7T2.mjs → chunk-SFI5BHCB.mjs} +11 -11
- package/dist/libraries/react/{chunk-WL6GWGY5.mjs → chunk-XHXYZVYG.mjs} +1 -1
- package/dist/libraries/react/{chunk-5TLRC3ED.mjs → chunk-Z5BMY5OQ.mjs} +18 -18
- package/dist/libraries/react/{chunk-NZC2FJEG.mjs → chunk-ZQPCEJFK.mjs} +1 -1
- package/dist/libraries/react/client/ReactAutumnClient.mjs +3 -3
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.css +6 -67
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +4908 -4905
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +25 -25
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.css +6 -67
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +114 -114
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +25 -25
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.css +6 -67
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +564 -561
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +25 -25
- package/dist/libraries/react/components/ui/accordion.js +8 -8
- package/dist/libraries/react/components/ui/accordion.mjs +3 -3
- package/dist/libraries/react/components/ui/dialog.js +9 -9
- package/dist/libraries/react/components/ui/dialog.mjs +4 -4
- package/dist/libraries/react/components/ui/popover.js +12 -12
- package/dist/libraries/react/components/ui/popover.mjs +5 -5
- package/dist/libraries/react/components/ui/switch.js +4 -4
- package/dist/libraries/react/components/ui/switch.mjs +3 -3
- package/dist/libraries/react/hooks/useAnalytics.mjs +5 -5
- package/dist/libraries/react/hooks/useCustomer.mjs +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.mjs +5 -5
- package/dist/libraries/react/hooks/useEntity.mjs +6 -6
- package/dist/libraries/react/hooks/useEntityBase.mjs +5 -5
- package/dist/libraries/react/hooks/usePaywall.mjs +5 -5
- package/dist/libraries/react/hooks/usePricingTable.mjs +5 -5
- package/dist/libraries/react/index.js +565 -562
- package/dist/libraries/react/index.mjs +565 -562
- package/dist/styles/global.css +6 -67
- package/package.json +1 -1
- package/tsup.config.ts +193 -186
- package/dist/libraries/react/{chunk-VKSWZMFC.mjs → chunk-TLAWG4JC.mjs} +8 -8
|
@@ -1958,7 +1958,7 @@ var import_swr4 = __toESM(require("swr"));
|
|
|
1958
1958
|
// src/libraries/react/hooks/usePaywall.tsx
|
|
1959
1959
|
var import_swr5 = __toESM(require("swr"));
|
|
1960
1960
|
|
|
1961
|
-
// ../node_modules/.pnpm/@radix-ui+react-accordion@1.2.11_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
1961
|
+
// ../node_modules/.pnpm/@radix-ui+react-accordion@1.2.11_@types+react-dom@19.1.9_@types+react@19.1.10__@types+r_88fa064b3d5df5119586fe1472472636/node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
1962
1962
|
var import_react8 = __toESM(require("react"), 1);
|
|
1963
1963
|
|
|
1964
1964
|
// ../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.10_react@19.1.1/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
@@ -2038,7 +2038,7 @@ function composeContextScopes(...scopes) {
|
|
|
2038
2038
|
return createScope;
|
|
2039
2039
|
}
|
|
2040
2040
|
|
|
2041
|
-
// ../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
2041
|
+
// ../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+r_3ab2260c45a0fb08d9b684c67f0bf7c1/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
2042
2042
|
var import_react6 = __toESM(require("react"), 1);
|
|
2043
2043
|
|
|
2044
2044
|
// ../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.10_react@19.1.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
@@ -2165,7 +2165,7 @@ function getElementRef(element) {
|
|
|
2165
2165
|
return element.props.ref || element.ref;
|
|
2166
2166
|
}
|
|
2167
2167
|
|
|
2168
|
-
// ../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
2168
|
+
// ../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+r_3ab2260c45a0fb08d9b684c67f0bf7c1/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
2169
2169
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2170
2170
|
var import_react7 = __toESM(require("react"), 1);
|
|
2171
2171
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
@@ -2318,7 +2318,7 @@ function isFunction(value) {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
2320
2320
|
|
|
2321
|
-
// ../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
2321
|
+
// ../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.9_@types+react@19.1.10__@types+re_9e605969fe68801bc6e8d3b546a2a7e1/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
2322
2322
|
var React8 = __toESM(require("react"), 1);
|
|
2323
2323
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
2324
2324
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
@@ -2358,10 +2358,10 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
2358
2358
|
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
2359
2359
|
}
|
|
2360
2360
|
|
|
2361
|
-
// ../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.11_@types+react-dom@19.1.9_@types+react@19.1.10__@
|
|
2361
|
+
// ../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.11_@types+react-dom@19.1.9_@types+react@19.1.10__@types_0079639e5b639016d4e27453774cf95e/node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
2362
2362
|
var React11 = __toESM(require("react"), 1);
|
|
2363
2363
|
|
|
2364
|
-
// ../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
2364
|
+
// ../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.9_@types+react@19.1.10__@types+rea_7d38616061dbf89127c9b19685065376/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
2365
2365
|
var React24 = __toESM(require("react"), 1);
|
|
2366
2366
|
var React9 = __toESM(require("react"), 1);
|
|
2367
2367
|
function useStateMachine(initialState, machine) {
|
|
@@ -2499,7 +2499,7 @@ function useId(deterministicId) {
|
|
|
2499
2499
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
2500
2500
|
}
|
|
2501
2501
|
|
|
2502
|
-
// ../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.11_@types+react-dom@19.1.9_@types+react@19.1.10__@
|
|
2502
|
+
// ../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.11_@types+react-dom@19.1.9_@types+react@19.1.10__@types_0079639e5b639016d4e27453774cf95e/node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
2503
2503
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2504
2504
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
2505
2505
|
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
@@ -2643,7 +2643,7 @@ function useDirection(localDir) {
|
|
|
2643
2643
|
return localDir || globalDir || "ltr";
|
|
2644
2644
|
}
|
|
2645
2645
|
|
|
2646
|
-
// ../node_modules/.pnpm/@radix-ui+react-accordion@1.2.11_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
2646
|
+
// ../node_modules/.pnpm/@radix-ui+react-accordion@1.2.11_@types+react-dom@19.1.9_@types+react@19.1.10__@types+r_88fa064b3d5df5119586fe1472472636/node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
2647
2647
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2648
2648
|
var ACCORDION_NAME = "Accordion";
|
|
2649
2649
|
var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
|
|
@@ -2937,9 +2937,116 @@ var Header = AccordionHeader;
|
|
|
2937
2937
|
var Trigger2 = AccordionTrigger;
|
|
2938
2938
|
var Content2 = AccordionContent;
|
|
2939
2939
|
|
|
2940
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
2941
|
+
var import_react10 = require("react");
|
|
2942
|
+
|
|
2943
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
2944
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2945
|
+
var toCamelCase = (string) => string.replace(
|
|
2946
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2947
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
2948
|
+
);
|
|
2949
|
+
var toPascalCase = (string) => {
|
|
2950
|
+
const camelCase = toCamelCase(string);
|
|
2951
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
2952
|
+
};
|
|
2953
|
+
var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
|
|
2954
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
|
|
2955
|
+
}).join(" ").trim();
|
|
2956
|
+
var hasA11yProp = (props) => {
|
|
2957
|
+
for (const prop in props) {
|
|
2958
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
2959
|
+
return true;
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
2965
|
+
var import_react9 = require("react");
|
|
2966
|
+
|
|
2967
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
2968
|
+
var defaultAttributes = {
|
|
2969
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2970
|
+
width: 24,
|
|
2971
|
+
height: 24,
|
|
2972
|
+
viewBox: "0 0 24 24",
|
|
2973
|
+
fill: "none",
|
|
2974
|
+
stroke: "currentColor",
|
|
2975
|
+
strokeWidth: 2,
|
|
2976
|
+
strokeLinecap: "round",
|
|
2977
|
+
strokeLinejoin: "round"
|
|
2978
|
+
};
|
|
2979
|
+
|
|
2980
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
2981
|
+
var Icon = (0, import_react9.forwardRef)(
|
|
2982
|
+
({
|
|
2983
|
+
color = "currentColor",
|
|
2984
|
+
size: size4 = 24,
|
|
2985
|
+
strokeWidth = 2,
|
|
2986
|
+
absoluteStrokeWidth,
|
|
2987
|
+
className = "",
|
|
2988
|
+
children,
|
|
2989
|
+
iconNode,
|
|
2990
|
+
...rest
|
|
2991
|
+
}, ref) => (0, import_react9.createElement)(
|
|
2992
|
+
"svg",
|
|
2993
|
+
{
|
|
2994
|
+
ref,
|
|
2995
|
+
...defaultAttributes,
|
|
2996
|
+
width: size4,
|
|
2997
|
+
height: size4,
|
|
2998
|
+
stroke: color,
|
|
2999
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
|
|
3000
|
+
className: mergeClasses("lucide", className),
|
|
3001
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
3002
|
+
...rest
|
|
3003
|
+
},
|
|
3004
|
+
[
|
|
3005
|
+
...iconNode.map(([tag, attrs]) => (0, import_react9.createElement)(tag, attrs)),
|
|
3006
|
+
...Array.isArray(children) ? children : [children]
|
|
3007
|
+
]
|
|
3008
|
+
)
|
|
3009
|
+
);
|
|
3010
|
+
|
|
3011
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
3012
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
3013
|
+
const Component = (0, import_react10.forwardRef)(
|
|
3014
|
+
({ className, ...props }, ref) => (0, import_react10.createElement)(Icon, {
|
|
3015
|
+
ref,
|
|
3016
|
+
iconNode,
|
|
3017
|
+
className: mergeClasses(
|
|
3018
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
3019
|
+
`lucide-${iconName}`,
|
|
3020
|
+
className
|
|
3021
|
+
),
|
|
3022
|
+
...props
|
|
3023
|
+
})
|
|
3024
|
+
);
|
|
3025
|
+
Component.displayName = toPascalCase(iconName);
|
|
3026
|
+
return Component;
|
|
3027
|
+
};
|
|
3028
|
+
|
|
3029
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
3030
|
+
var __iconNode = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
3031
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode);
|
|
3032
|
+
|
|
3033
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js
|
|
3034
|
+
var __iconNode2 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
3035
|
+
var LoaderCircle = createLucideIcon("loader-circle", __iconNode2);
|
|
3036
|
+
|
|
3037
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/x.js
|
|
3038
|
+
var __iconNode3 = [
|
|
3039
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3040
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3041
|
+
];
|
|
3042
|
+
var X = createLucideIcon("x", __iconNode3);
|
|
3043
|
+
|
|
2940
3044
|
// src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx
|
|
2941
3045
|
var import_react13 = require("react");
|
|
2942
3046
|
|
|
3047
|
+
// src/libraries/react/components/ui/accordion.tsx
|
|
3048
|
+
var React14 = __toESM(require("react"));
|
|
3049
|
+
|
|
2943
3050
|
// ../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2944
3051
|
function r(e) {
|
|
2945
3052
|
var t, f, n = "";
|
|
@@ -5465,8 +5572,47 @@ function cn(...inputs) {
|
|
|
5465
5572
|
return twMerge(clsx(inputs));
|
|
5466
5573
|
}
|
|
5467
5574
|
|
|
5575
|
+
// src/libraries/react/components/ui/accordion.tsx
|
|
5576
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
5577
|
+
var Accordion2 = Root2;
|
|
5578
|
+
var AccordionItem2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
5579
|
+
Item,
|
|
5580
|
+
{
|
|
5581
|
+
ref,
|
|
5582
|
+
className: cn("au-border-b", className),
|
|
5583
|
+
...props
|
|
5584
|
+
}
|
|
5585
|
+
));
|
|
5586
|
+
AccordionItem2.displayName = "AccordionItem";
|
|
5587
|
+
var AccordionTrigger2 = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Header, { className: "au-flex", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
5588
|
+
Trigger2,
|
|
5589
|
+
{
|
|
5590
|
+
ref,
|
|
5591
|
+
className: cn(
|
|
5592
|
+
"au-flex au-flex-1 au-items-center au-justify-between au-py-4 au-text-sm au-font-medium au-transition-all hover:au-underline au-text-left [&[data-state=open]>svg]:au-rotate-180",
|
|
5593
|
+
className
|
|
5594
|
+
),
|
|
5595
|
+
...props,
|
|
5596
|
+
children: [
|
|
5597
|
+
children,
|
|
5598
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronDown, { className: "au-h-4 au-w-4 au-shrink-0 au-text-muted-foreground au-transition-transform au-duration-200" })
|
|
5599
|
+
]
|
|
5600
|
+
}
|
|
5601
|
+
) }));
|
|
5602
|
+
AccordionTrigger2.displayName = Trigger2.displayName;
|
|
5603
|
+
var AccordionContent2 = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
5604
|
+
Content2,
|
|
5605
|
+
{
|
|
5606
|
+
ref,
|
|
5607
|
+
className: "au-overflow-hidden au-text-sm data-[state=closed]:au-animate-accordion-up data-[state=open]:au-animate-accordion-down",
|
|
5608
|
+
...props,
|
|
5609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: cn("au-pb-4 au-pt-0", className), children })
|
|
5610
|
+
}
|
|
5611
|
+
));
|
|
5612
|
+
AccordionContent2.displayName = Content2.displayName;
|
|
5613
|
+
|
|
5468
5614
|
// src/libraries/react/components/ui/button.tsx
|
|
5469
|
-
var
|
|
5615
|
+
var React15 = __toESM(require("react"));
|
|
5470
5616
|
|
|
5471
5617
|
// ../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
5472
5618
|
var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
@@ -5511,7 +5657,7 @@ var cva = (base, config) => (props) => {
|
|
|
5511
5657
|
};
|
|
5512
5658
|
|
|
5513
5659
|
// src/libraries/react/components/ui/button.tsx
|
|
5514
|
-
var
|
|
5660
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
5515
5661
|
var buttonVariants = cva(
|
|
5516
5662
|
"au-inline-flex au-items-center au-justify-center au-gap-2 au-whitespace-nowrap au-rounded-md au-text-sm au-font-medium au-transition-colors focus-visible:au-outline-none focus-visible:au-ring-1 focus-visible:au-ring-ring disabled:au-pointer-events-none disabled:au-opacity-50 [&_svg]:au-pointer-events-none [&_svg]:au-size-4 [&_svg]:au-shrink-0",
|
|
5517
5663
|
{
|
|
@@ -5537,10 +5683,10 @@ var buttonVariants = cva(
|
|
|
5537
5683
|
}
|
|
5538
5684
|
}
|
|
5539
5685
|
);
|
|
5540
|
-
var Button =
|
|
5686
|
+
var Button = React15.forwardRef(
|
|
5541
5687
|
({ className, variant, size: size4, asChild = false, ...props }, ref) => {
|
|
5542
5688
|
const Comp = asChild ? Slot : "button";
|
|
5543
|
-
return /* @__PURE__ */ (0,
|
|
5689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
5544
5690
|
Comp,
|
|
5545
5691
|
{
|
|
5546
5692
|
className: cn(buttonVariants({ variant, size: size4 }), className),
|
|
@@ -5553,29 +5699,29 @@ var Button = React14.forwardRef(
|
|
|
5553
5699
|
Button.displayName = "Button";
|
|
5554
5700
|
|
|
5555
5701
|
// src/libraries/react/components/ui/dialog.tsx
|
|
5556
|
-
var
|
|
5702
|
+
var React33 = __toESM(require("react"));
|
|
5557
5703
|
|
|
5558
|
-
// ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
5559
|
-
var
|
|
5704
|
+
// ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.9_@types+react@19.1.10__@types+reac_d887111acb876d7a867028e90c6aec01/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
5705
|
+
var React32 = __toESM(require("react"), 1);
|
|
5560
5706
|
|
|
5561
|
-
// ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.9_@types+react@19.1.
|
|
5562
|
-
var
|
|
5707
|
+
// ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.9_@types+react@19.1.10___11bc29965763a1c4e1c62b1db84ce73c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
5708
|
+
var React18 = __toESM(require("react"), 1);
|
|
5563
5709
|
|
|
5564
5710
|
// ../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.10_react@19.1.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
5565
|
-
var
|
|
5711
|
+
var React16 = __toESM(require("react"), 1);
|
|
5566
5712
|
function useCallbackRef(callback) {
|
|
5567
|
-
const callbackRef =
|
|
5568
|
-
|
|
5713
|
+
const callbackRef = React16.useRef(callback);
|
|
5714
|
+
React16.useEffect(() => {
|
|
5569
5715
|
callbackRef.current = callback;
|
|
5570
5716
|
});
|
|
5571
|
-
return
|
|
5717
|
+
return React16.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
5572
5718
|
}
|
|
5573
5719
|
|
|
5574
5720
|
// ../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.10_react@19.1.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
5575
|
-
var
|
|
5721
|
+
var React17 = __toESM(require("react"), 1);
|
|
5576
5722
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
5577
5723
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
5578
|
-
|
|
5724
|
+
React17.useEffect(() => {
|
|
5579
5725
|
const handleKeyDown = (event) => {
|
|
5580
5726
|
if (event.key === "Escape") {
|
|
5581
5727
|
onEscapeKeyDown(event);
|
|
@@ -5586,19 +5732,19 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
5586
5732
|
}, [onEscapeKeyDown, ownerDocument]);
|
|
5587
5733
|
}
|
|
5588
5734
|
|
|
5589
|
-
// ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.9_@types+react@19.1.
|
|
5590
|
-
var
|
|
5735
|
+
// ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.9_@types+react@19.1.10___11bc29965763a1c4e1c62b1db84ce73c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
5736
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
5591
5737
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
5592
5738
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
5593
5739
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
5594
5740
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
5595
5741
|
var originalBodyPointerEvents;
|
|
5596
|
-
var DismissableLayerContext =
|
|
5742
|
+
var DismissableLayerContext = React18.createContext({
|
|
5597
5743
|
layers: /* @__PURE__ */ new Set(),
|
|
5598
5744
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
5599
5745
|
branches: /* @__PURE__ */ new Set()
|
|
5600
5746
|
});
|
|
5601
|
-
var DismissableLayer =
|
|
5747
|
+
var DismissableLayer = React18.forwardRef(
|
|
5602
5748
|
(props, forwardedRef) => {
|
|
5603
5749
|
const {
|
|
5604
5750
|
disableOutsidePointerEvents = false,
|
|
@@ -5609,10 +5755,10 @@ var DismissableLayer = React17.forwardRef(
|
|
|
5609
5755
|
onDismiss,
|
|
5610
5756
|
...layerProps
|
|
5611
5757
|
} = props;
|
|
5612
|
-
const context =
|
|
5613
|
-
const [node, setNode] =
|
|
5758
|
+
const context = React18.useContext(DismissableLayerContext);
|
|
5759
|
+
const [node, setNode] = React18.useState(null);
|
|
5614
5760
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
5615
|
-
const [, force] =
|
|
5761
|
+
const [, force] = React18.useState({});
|
|
5616
5762
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
5617
5763
|
const layers = Array.from(context.layers);
|
|
5618
5764
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -5645,7 +5791,7 @@ var DismissableLayer = React17.forwardRef(
|
|
|
5645
5791
|
onDismiss();
|
|
5646
5792
|
}
|
|
5647
5793
|
}, ownerDocument);
|
|
5648
|
-
|
|
5794
|
+
React18.useEffect(() => {
|
|
5649
5795
|
if (!node) return;
|
|
5650
5796
|
if (disableOutsidePointerEvents) {
|
|
5651
5797
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -5662,7 +5808,7 @@ var DismissableLayer = React17.forwardRef(
|
|
|
5662
5808
|
}
|
|
5663
5809
|
};
|
|
5664
5810
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
5665
|
-
|
|
5811
|
+
React18.useEffect(() => {
|
|
5666
5812
|
return () => {
|
|
5667
5813
|
if (!node) return;
|
|
5668
5814
|
context.layers.delete(node);
|
|
@@ -5670,12 +5816,12 @@ var DismissableLayer = React17.forwardRef(
|
|
|
5670
5816
|
dispatchUpdate();
|
|
5671
5817
|
};
|
|
5672
5818
|
}, [node, context]);
|
|
5673
|
-
|
|
5819
|
+
React18.useEffect(() => {
|
|
5674
5820
|
const handleUpdate = () => force({});
|
|
5675
5821
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
5676
5822
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
5677
5823
|
}, []);
|
|
5678
|
-
return /* @__PURE__ */ (0,
|
|
5824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
5679
5825
|
Primitive.div,
|
|
5680
5826
|
{
|
|
5681
5827
|
...layerProps,
|
|
@@ -5696,11 +5842,11 @@ var DismissableLayer = React17.forwardRef(
|
|
|
5696
5842
|
);
|
|
5697
5843
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
5698
5844
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
5699
|
-
var DismissableLayerBranch =
|
|
5700
|
-
const context =
|
|
5701
|
-
const ref =
|
|
5845
|
+
var DismissableLayerBranch = React18.forwardRef((props, forwardedRef) => {
|
|
5846
|
+
const context = React18.useContext(DismissableLayerContext);
|
|
5847
|
+
const ref = React18.useRef(null);
|
|
5702
5848
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
5703
|
-
|
|
5849
|
+
React18.useEffect(() => {
|
|
5704
5850
|
const node = ref.current;
|
|
5705
5851
|
if (node) {
|
|
5706
5852
|
context.branches.add(node);
|
|
@@ -5709,15 +5855,15 @@ var DismissableLayerBranch = React17.forwardRef((props, forwardedRef) => {
|
|
|
5709
5855
|
};
|
|
5710
5856
|
}
|
|
5711
5857
|
}, [context.branches]);
|
|
5712
|
-
return /* @__PURE__ */ (0,
|
|
5858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive.div, { ...props, ref: composedRefs });
|
|
5713
5859
|
});
|
|
5714
5860
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
5715
5861
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
5716
5862
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
5717
|
-
const isPointerInsideReactTreeRef =
|
|
5718
|
-
const handleClickRef =
|
|
5863
|
+
const isPointerInsideReactTreeRef = React18.useRef(false);
|
|
5864
|
+
const handleClickRef = React18.useRef(() => {
|
|
5719
5865
|
});
|
|
5720
|
-
|
|
5866
|
+
React18.useEffect(() => {
|
|
5721
5867
|
const handlePointerDown = (event) => {
|
|
5722
5868
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
5723
5869
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -5758,8 +5904,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
5758
5904
|
}
|
|
5759
5905
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
5760
5906
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
5761
|
-
const isFocusInsideReactTreeRef =
|
|
5762
|
-
|
|
5907
|
+
const isFocusInsideReactTreeRef = React18.useRef(false);
|
|
5908
|
+
React18.useEffect(() => {
|
|
5763
5909
|
const handleFocus = (event) => {
|
|
5764
5910
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
5765
5911
|
const eventDetail = { originalEvent: event };
|
|
@@ -5791,14 +5937,14 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
5791
5937
|
}
|
|
5792
5938
|
}
|
|
5793
5939
|
|
|
5794
|
-
// ../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
5795
|
-
var
|
|
5796
|
-
var
|
|
5940
|
+
// ../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+_8d26458fa87217734ef1cdbf2fc03180/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
5941
|
+
var React19 = __toESM(require("react"), 1);
|
|
5942
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
5797
5943
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
5798
5944
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
5799
5945
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
5800
5946
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
5801
|
-
var FocusScope =
|
|
5947
|
+
var FocusScope = React19.forwardRef((props, forwardedRef) => {
|
|
5802
5948
|
const {
|
|
5803
5949
|
loop = false,
|
|
5804
5950
|
trapped = false,
|
|
@@ -5806,12 +5952,12 @@ var FocusScope = React18.forwardRef((props, forwardedRef) => {
|
|
|
5806
5952
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
5807
5953
|
...scopeProps
|
|
5808
5954
|
} = props;
|
|
5809
|
-
const [container, setContainer] =
|
|
5955
|
+
const [container, setContainer] = React19.useState(null);
|
|
5810
5956
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
5811
5957
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
5812
|
-
const lastFocusedElementRef =
|
|
5958
|
+
const lastFocusedElementRef = React19.useRef(null);
|
|
5813
5959
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
5814
|
-
const focusScope =
|
|
5960
|
+
const focusScope = React19.useRef({
|
|
5815
5961
|
paused: false,
|
|
5816
5962
|
pause() {
|
|
5817
5963
|
this.paused = true;
|
|
@@ -5820,7 +5966,7 @@ var FocusScope = React18.forwardRef((props, forwardedRef) => {
|
|
|
5820
5966
|
this.paused = false;
|
|
5821
5967
|
}
|
|
5822
5968
|
}).current;
|
|
5823
|
-
|
|
5969
|
+
React19.useEffect(() => {
|
|
5824
5970
|
if (trapped) {
|
|
5825
5971
|
let handleFocusIn2 = function(event) {
|
|
5826
5972
|
if (focusScope.paused || !container) return;
|
|
@@ -5856,7 +6002,7 @@ var FocusScope = React18.forwardRef((props, forwardedRef) => {
|
|
|
5856
6002
|
};
|
|
5857
6003
|
}
|
|
5858
6004
|
}, [trapped, container, focusScope.paused]);
|
|
5859
|
-
|
|
6005
|
+
React19.useEffect(() => {
|
|
5860
6006
|
if (container) {
|
|
5861
6007
|
focusScopesStack.add(focusScope);
|
|
5862
6008
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -5887,7 +6033,7 @@ var FocusScope = React18.forwardRef((props, forwardedRef) => {
|
|
|
5887
6033
|
};
|
|
5888
6034
|
}
|
|
5889
6035
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
5890
|
-
const handleKeyDown =
|
|
6036
|
+
const handleKeyDown = React19.useCallback(
|
|
5891
6037
|
(event) => {
|
|
5892
6038
|
if (!loop && !trapped) return;
|
|
5893
6039
|
if (focusScope.paused) return;
|
|
@@ -5912,7 +6058,7 @@ var FocusScope = React18.forwardRef((props, forwardedRef) => {
|
|
|
5912
6058
|
},
|
|
5913
6059
|
[loop, trapped, focusScope.paused]
|
|
5914
6060
|
);
|
|
5915
|
-
return /* @__PURE__ */ (0,
|
|
6061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
5916
6062
|
});
|
|
5917
6063
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
5918
6064
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -5995,25 +6141,25 @@ function removeLinks(items) {
|
|
|
5995
6141
|
return items.filter((item) => item.tagName !== "A");
|
|
5996
6142
|
}
|
|
5997
6143
|
|
|
5998
|
-
// ../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
5999
|
-
var
|
|
6144
|
+
// ../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.9_@types+react@19.1.10__@types+react_3ad4e24272ef2d06e19c6ad65924b811/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
6145
|
+
var React20 = __toESM(require("react"), 1);
|
|
6000
6146
|
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
6001
|
-
var
|
|
6147
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
6002
6148
|
var PORTAL_NAME = "Portal";
|
|
6003
|
-
var Portal =
|
|
6149
|
+
var Portal = React20.forwardRef((props, forwardedRef) => {
|
|
6004
6150
|
const { container: containerProp, ...portalProps } = props;
|
|
6005
|
-
const [mounted, setMounted] =
|
|
6151
|
+
const [mounted, setMounted] = React20.useState(false);
|
|
6006
6152
|
useLayoutEffect2(() => setMounted(true), []);
|
|
6007
6153
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
6008
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0,
|
|
6154
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
6009
6155
|
});
|
|
6010
6156
|
Portal.displayName = PORTAL_NAME;
|
|
6011
6157
|
|
|
6012
6158
|
// ../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@19.1.10_react@19.1.1/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
6013
|
-
var
|
|
6159
|
+
var React21 = __toESM(require("react"), 1);
|
|
6014
6160
|
var count2 = 0;
|
|
6015
6161
|
function useFocusGuards() {
|
|
6016
|
-
|
|
6162
|
+
React21.useEffect(() => {
|
|
6017
6163
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
6018
6164
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
6019
6165
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -6070,10 +6216,10 @@ function __spreadArray(to, from, pack) {
|
|
|
6070
6216
|
}
|
|
6071
6217
|
|
|
6072
6218
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.10_react@19.1.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
6073
|
-
var
|
|
6219
|
+
var React31 = __toESM(require("react"));
|
|
6074
6220
|
|
|
6075
6221
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.10_react@19.1.1/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
6076
|
-
var
|
|
6222
|
+
var React27 = __toESM(require("react"));
|
|
6077
6223
|
|
|
6078
6224
|
// ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.10_react@19.1.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
6079
6225
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
@@ -6092,9 +6238,9 @@ function assignRef(ref, value) {
|
|
|
6092
6238
|
}
|
|
6093
6239
|
|
|
6094
6240
|
// ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.10_react@19.1.1/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
6095
|
-
var
|
|
6241
|
+
var import_react11 = require("react");
|
|
6096
6242
|
function useCallbackRef2(initialValue, callback) {
|
|
6097
|
-
var ref = (0,
|
|
6243
|
+
var ref = (0, import_react11.useState)(function() {
|
|
6098
6244
|
return {
|
|
6099
6245
|
// value
|
|
6100
6246
|
value: initialValue,
|
|
@@ -6120,8 +6266,8 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
6120
6266
|
}
|
|
6121
6267
|
|
|
6122
6268
|
// ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.10_react@19.1.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
6123
|
-
var
|
|
6124
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
6269
|
+
var React25 = __toESM(require("react"));
|
|
6270
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React25.useLayoutEffect : React25.useEffect;
|
|
6125
6271
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
6126
6272
|
function useMergeRefs(refs, defaultValue) {
|
|
6127
6273
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -6238,7 +6384,7 @@ function createSidecarMedium(options) {
|
|
|
6238
6384
|
}
|
|
6239
6385
|
|
|
6240
6386
|
// ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.10_react@19.1.1/node_modules/use-sidecar/dist/es2015/exports.js
|
|
6241
|
-
var
|
|
6387
|
+
var React26 = __toESM(require("react"));
|
|
6242
6388
|
var SideCar = function(_a) {
|
|
6243
6389
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
6244
6390
|
if (!sideCar) {
|
|
@@ -6248,7 +6394,7 @@ var SideCar = function(_a) {
|
|
|
6248
6394
|
if (!Target) {
|
|
6249
6395
|
throw new Error("Sidecar medium not found");
|
|
6250
6396
|
}
|
|
6251
|
-
return
|
|
6397
|
+
return React26.createElement(Target, __assign({}, rest));
|
|
6252
6398
|
};
|
|
6253
6399
|
SideCar.isSideCarExport = true;
|
|
6254
6400
|
function exportSidecar(medium, exported) {
|
|
@@ -6263,9 +6409,9 @@ var effectCar = createSidecarMedium();
|
|
|
6263
6409
|
var nothing = function() {
|
|
6264
6410
|
return;
|
|
6265
6411
|
};
|
|
6266
|
-
var RemoveScroll =
|
|
6267
|
-
var ref =
|
|
6268
|
-
var _a =
|
|
6412
|
+
var RemoveScroll = React27.forwardRef(function(props, parentRef) {
|
|
6413
|
+
var ref = React27.useRef(null);
|
|
6414
|
+
var _a = React27.useState({
|
|
6269
6415
|
onScrollCapture: nothing,
|
|
6270
6416
|
onWheelCapture: nothing,
|
|
6271
6417
|
onTouchMoveCapture: nothing
|
|
@@ -6274,11 +6420,11 @@ var RemoveScroll = React26.forwardRef(function(props, parentRef) {
|
|
|
6274
6420
|
var SideCar2 = sideCar;
|
|
6275
6421
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
6276
6422
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
6277
|
-
return
|
|
6278
|
-
|
|
6423
|
+
return React27.createElement(
|
|
6424
|
+
React27.Fragment,
|
|
6279
6425
|
null,
|
|
6280
|
-
enabled &&
|
|
6281
|
-
forwardProps ?
|
|
6426
|
+
enabled && React27.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
6427
|
+
forwardProps ? React27.cloneElement(React27.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React27.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
6282
6428
|
);
|
|
6283
6429
|
});
|
|
6284
6430
|
RemoveScroll.defaultProps = {
|
|
@@ -6292,13 +6438,13 @@ RemoveScroll.classNames = {
|
|
|
6292
6438
|
};
|
|
6293
6439
|
|
|
6294
6440
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.10_react@19.1.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
6295
|
-
var
|
|
6441
|
+
var React30 = __toESM(require("react"));
|
|
6296
6442
|
|
|
6297
6443
|
// ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.10_react@19.1.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
6298
|
-
var
|
|
6444
|
+
var React29 = __toESM(require("react"));
|
|
6299
6445
|
|
|
6300
6446
|
// ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.10_react@19.1.1/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
6301
|
-
var
|
|
6447
|
+
var React28 = __toESM(require("react"));
|
|
6302
6448
|
|
|
6303
6449
|
// ../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
6304
6450
|
var currentNonce;
|
|
@@ -6362,7 +6508,7 @@ var stylesheetSingleton = function() {
|
|
|
6362
6508
|
var styleHookSingleton = function() {
|
|
6363
6509
|
var sheet = stylesheetSingleton();
|
|
6364
6510
|
return function(styles, isDynamic) {
|
|
6365
|
-
|
|
6511
|
+
React28.useEffect(function() {
|
|
6366
6512
|
sheet.add(styles);
|
|
6367
6513
|
return function() {
|
|
6368
6514
|
sheet.remove();
|
|
@@ -6436,7 +6582,7 @@ var getCurrentUseCounter = function() {
|
|
|
6436
6582
|
return isFinite(counter) ? counter : 0;
|
|
6437
6583
|
};
|
|
6438
6584
|
var useLockAttribute = function() {
|
|
6439
|
-
|
|
6585
|
+
React29.useEffect(function() {
|
|
6440
6586
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
6441
6587
|
return function() {
|
|
6442
6588
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -6451,10 +6597,10 @@ var useLockAttribute = function() {
|
|
|
6451
6597
|
var RemoveScrollBar = function(_a) {
|
|
6452
6598
|
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
6453
6599
|
useLockAttribute();
|
|
6454
|
-
var gap =
|
|
6600
|
+
var gap = React29.useMemo(function() {
|
|
6455
6601
|
return getGapWidth(gapMode);
|
|
6456
6602
|
}, [gapMode]);
|
|
6457
|
-
return
|
|
6603
|
+
return React29.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
6458
6604
|
};
|
|
6459
6605
|
|
|
6460
6606
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.10_react@19.1.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -6595,16 +6741,16 @@ var generateStyle = function(id) {
|
|
|
6595
6741
|
var idCounter = 0;
|
|
6596
6742
|
var lockStack = [];
|
|
6597
6743
|
function RemoveScrollSideCar(props) {
|
|
6598
|
-
var shouldPreventQueue =
|
|
6599
|
-
var touchStartRef =
|
|
6600
|
-
var activeAxis =
|
|
6601
|
-
var id =
|
|
6602
|
-
var Style2 =
|
|
6603
|
-
var lastProps =
|
|
6604
|
-
|
|
6744
|
+
var shouldPreventQueue = React30.useRef([]);
|
|
6745
|
+
var touchStartRef = React30.useRef([0, 0]);
|
|
6746
|
+
var activeAxis = React30.useRef();
|
|
6747
|
+
var id = React30.useState(idCounter++)[0];
|
|
6748
|
+
var Style2 = React30.useState(styleSingleton)[0];
|
|
6749
|
+
var lastProps = React30.useRef(props);
|
|
6750
|
+
React30.useEffect(function() {
|
|
6605
6751
|
lastProps.current = props;
|
|
6606
6752
|
}, [props]);
|
|
6607
|
-
|
|
6753
|
+
React30.useEffect(function() {
|
|
6608
6754
|
if (props.inert) {
|
|
6609
6755
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
6610
6756
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -6620,7 +6766,7 @@ function RemoveScrollSideCar(props) {
|
|
|
6620
6766
|
}
|
|
6621
6767
|
return;
|
|
6622
6768
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
6623
|
-
var shouldCancelEvent =
|
|
6769
|
+
var shouldCancelEvent = React30.useCallback(function(event, parent) {
|
|
6624
6770
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
6625
6771
|
return !lastProps.current.allowPinchZoom;
|
|
6626
6772
|
}
|
|
@@ -6656,7 +6802,7 @@ function RemoveScrollSideCar(props) {
|
|
|
6656
6802
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
6657
6803
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
6658
6804
|
}, []);
|
|
6659
|
-
var shouldPrevent =
|
|
6805
|
+
var shouldPrevent = React30.useCallback(function(_event) {
|
|
6660
6806
|
var event = _event;
|
|
6661
6807
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
6662
6808
|
return;
|
|
@@ -6683,7 +6829,7 @@ function RemoveScrollSideCar(props) {
|
|
|
6683
6829
|
}
|
|
6684
6830
|
}
|
|
6685
6831
|
}, []);
|
|
6686
|
-
var shouldCancel =
|
|
6832
|
+
var shouldCancel = React30.useCallback(function(name, delta, target, should) {
|
|
6687
6833
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
6688
6834
|
shouldPreventQueue.current.push(event);
|
|
6689
6835
|
setTimeout(function() {
|
|
@@ -6692,17 +6838,17 @@ function RemoveScrollSideCar(props) {
|
|
|
6692
6838
|
});
|
|
6693
6839
|
}, 1);
|
|
6694
6840
|
}, []);
|
|
6695
|
-
var scrollTouchStart =
|
|
6841
|
+
var scrollTouchStart = React30.useCallback(function(event) {
|
|
6696
6842
|
touchStartRef.current = getTouchXY(event);
|
|
6697
6843
|
activeAxis.current = void 0;
|
|
6698
6844
|
}, []);
|
|
6699
|
-
var scrollWheel =
|
|
6845
|
+
var scrollWheel = React30.useCallback(function(event) {
|
|
6700
6846
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
6701
6847
|
}, []);
|
|
6702
|
-
var scrollTouchMove =
|
|
6848
|
+
var scrollTouchMove = React30.useCallback(function(event) {
|
|
6703
6849
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
6704
6850
|
}, []);
|
|
6705
|
-
|
|
6851
|
+
React30.useEffect(function() {
|
|
6706
6852
|
lockStack.push(Style2);
|
|
6707
6853
|
props.setCallbacks({
|
|
6708
6854
|
onScrollCapture: scrollWheel,
|
|
@@ -6722,11 +6868,11 @@ function RemoveScrollSideCar(props) {
|
|
|
6722
6868
|
};
|
|
6723
6869
|
}, []);
|
|
6724
6870
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
6725
|
-
return
|
|
6726
|
-
|
|
6871
|
+
return React30.createElement(
|
|
6872
|
+
React30.Fragment,
|
|
6727
6873
|
null,
|
|
6728
|
-
inert ?
|
|
6729
|
-
removeScrollBar ?
|
|
6874
|
+
inert ? React30.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
6875
|
+
removeScrollBar ? React30.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
6730
6876
|
);
|
|
6731
6877
|
}
|
|
6732
6878
|
function getOutermostShadowParent(node) {
|
|
@@ -6745,8 +6891,8 @@ function getOutermostShadowParent(node) {
|
|
|
6745
6891
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
6746
6892
|
|
|
6747
6893
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.10_react@19.1.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
6748
|
-
var ReactRemoveScroll =
|
|
6749
|
-
return
|
|
6894
|
+
var ReactRemoveScroll = React31.forwardRef(function(props, ref) {
|
|
6895
|
+
return React31.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
6750
6896
|
});
|
|
6751
6897
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
6752
6898
|
var Combination_default = ReactRemoveScroll;
|
|
@@ -6872,8 +7018,8 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
6872
7018
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
6873
7019
|
};
|
|
6874
7020
|
|
|
6875
|
-
// ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
6876
|
-
var
|
|
7021
|
+
// ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.9_@types+react@19.1.10__@types+reac_d887111acb876d7a867028e90c6aec01/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
7022
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
6877
7023
|
var DIALOG_NAME = "Dialog";
|
|
6878
7024
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
6879
7025
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -6886,15 +7032,15 @@ var Dialog = (props) => {
|
|
|
6886
7032
|
onOpenChange,
|
|
6887
7033
|
modal = true
|
|
6888
7034
|
} = props;
|
|
6889
|
-
const triggerRef =
|
|
6890
|
-
const contentRef =
|
|
7035
|
+
const triggerRef = React32.useRef(null);
|
|
7036
|
+
const contentRef = React32.useRef(null);
|
|
6891
7037
|
const [open, setOpen] = useControllableState({
|
|
6892
7038
|
prop: openProp,
|
|
6893
7039
|
defaultProp: defaultOpen ?? false,
|
|
6894
7040
|
onChange: onOpenChange,
|
|
6895
7041
|
caller: DIALOG_NAME
|
|
6896
7042
|
});
|
|
6897
|
-
return /* @__PURE__ */ (0,
|
|
7043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6898
7044
|
DialogProvider,
|
|
6899
7045
|
{
|
|
6900
7046
|
scope: __scopeDialog,
|
|
@@ -6905,7 +7051,7 @@ var Dialog = (props) => {
|
|
|
6905
7051
|
descriptionId: useId(),
|
|
6906
7052
|
open,
|
|
6907
7053
|
onOpenChange: setOpen,
|
|
6908
|
-
onOpenToggle:
|
|
7054
|
+
onOpenToggle: React32.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
6909
7055
|
modal,
|
|
6910
7056
|
children
|
|
6911
7057
|
}
|
|
@@ -6913,12 +7059,12 @@ var Dialog = (props) => {
|
|
|
6913
7059
|
};
|
|
6914
7060
|
Dialog.displayName = DIALOG_NAME;
|
|
6915
7061
|
var TRIGGER_NAME3 = "DialogTrigger";
|
|
6916
|
-
var DialogTrigger =
|
|
7062
|
+
var DialogTrigger = React32.forwardRef(
|
|
6917
7063
|
(props, forwardedRef) => {
|
|
6918
7064
|
const { __scopeDialog, ...triggerProps } = props;
|
|
6919
7065
|
const context = useDialogContext(TRIGGER_NAME3, __scopeDialog);
|
|
6920
7066
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
6921
|
-
return /* @__PURE__ */ (0,
|
|
7067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6922
7068
|
Primitive.button,
|
|
6923
7069
|
{
|
|
6924
7070
|
type: "button",
|
|
@@ -6941,28 +7087,28 @@ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
|
6941
7087
|
var DialogPortal = (props) => {
|
|
6942
7088
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
6943
7089
|
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
6944
|
-
return /* @__PURE__ */ (0,
|
|
7090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React32.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
|
6945
7091
|
};
|
|
6946
7092
|
DialogPortal.displayName = PORTAL_NAME2;
|
|
6947
7093
|
var OVERLAY_NAME = "DialogOverlay";
|
|
6948
|
-
var DialogOverlay =
|
|
7094
|
+
var DialogOverlay = React32.forwardRef(
|
|
6949
7095
|
(props, forwardedRef) => {
|
|
6950
7096
|
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
6951
7097
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
6952
7098
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
6953
|
-
return context.modal ? /* @__PURE__ */ (0,
|
|
7099
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
6954
7100
|
}
|
|
6955
7101
|
);
|
|
6956
7102
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
6957
7103
|
var Slot2 = createSlot("DialogOverlay.RemoveScroll");
|
|
6958
|
-
var DialogOverlayImpl =
|
|
7104
|
+
var DialogOverlayImpl = React32.forwardRef(
|
|
6959
7105
|
(props, forwardedRef) => {
|
|
6960
7106
|
const { __scopeDialog, ...overlayProps } = props;
|
|
6961
7107
|
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
6962
7108
|
return (
|
|
6963
7109
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
6964
7110
|
// ie. when `Overlay` and `Content` are siblings
|
|
6965
|
-
/* @__PURE__ */ (0,
|
|
7111
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6966
7112
|
Primitive.div,
|
|
6967
7113
|
{
|
|
6968
7114
|
"data-state": getState3(context.open),
|
|
@@ -6975,25 +7121,25 @@ var DialogOverlayImpl = React31.forwardRef(
|
|
|
6975
7121
|
}
|
|
6976
7122
|
);
|
|
6977
7123
|
var CONTENT_NAME3 = "DialogContent";
|
|
6978
|
-
var DialogContent =
|
|
7124
|
+
var DialogContent = React32.forwardRef(
|
|
6979
7125
|
(props, forwardedRef) => {
|
|
6980
7126
|
const portalContext = usePortalContext(CONTENT_NAME3, props.__scopeDialog);
|
|
6981
7127
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
6982
7128
|
const context = useDialogContext(CONTENT_NAME3, props.__scopeDialog);
|
|
6983
|
-
return /* @__PURE__ */ (0,
|
|
7129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
6984
7130
|
}
|
|
6985
7131
|
);
|
|
6986
7132
|
DialogContent.displayName = CONTENT_NAME3;
|
|
6987
|
-
var DialogContentModal =
|
|
7133
|
+
var DialogContentModal = React32.forwardRef(
|
|
6988
7134
|
(props, forwardedRef) => {
|
|
6989
7135
|
const context = useDialogContext(CONTENT_NAME3, props.__scopeDialog);
|
|
6990
|
-
const contentRef =
|
|
7136
|
+
const contentRef = React32.useRef(null);
|
|
6991
7137
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
6992
|
-
|
|
7138
|
+
React32.useEffect(() => {
|
|
6993
7139
|
const content = contentRef.current;
|
|
6994
7140
|
if (content) return hideOthers(content);
|
|
6995
7141
|
}, []);
|
|
6996
|
-
return /* @__PURE__ */ (0,
|
|
7142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6997
7143
|
DialogContentImpl,
|
|
6998
7144
|
{
|
|
6999
7145
|
...props,
|
|
@@ -7018,12 +7164,12 @@ var DialogContentModal = React31.forwardRef(
|
|
|
7018
7164
|
);
|
|
7019
7165
|
}
|
|
7020
7166
|
);
|
|
7021
|
-
var DialogContentNonModal =
|
|
7167
|
+
var DialogContentNonModal = React32.forwardRef(
|
|
7022
7168
|
(props, forwardedRef) => {
|
|
7023
7169
|
const context = useDialogContext(CONTENT_NAME3, props.__scopeDialog);
|
|
7024
|
-
const hasInteractedOutsideRef =
|
|
7025
|
-
const hasPointerDownOutsideRef =
|
|
7026
|
-
return /* @__PURE__ */ (0,
|
|
7170
|
+
const hasInteractedOutsideRef = React32.useRef(false);
|
|
7171
|
+
const hasPointerDownOutsideRef = React32.useRef(false);
|
|
7172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
7027
7173
|
DialogContentImpl,
|
|
7028
7174
|
{
|
|
7029
7175
|
...props,
|
|
@@ -7058,15 +7204,15 @@ var DialogContentNonModal = React31.forwardRef(
|
|
|
7058
7204
|
);
|
|
7059
7205
|
}
|
|
7060
7206
|
);
|
|
7061
|
-
var DialogContentImpl =
|
|
7207
|
+
var DialogContentImpl = React32.forwardRef(
|
|
7062
7208
|
(props, forwardedRef) => {
|
|
7063
7209
|
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
|
7064
7210
|
const context = useDialogContext(CONTENT_NAME3, __scopeDialog);
|
|
7065
|
-
const contentRef =
|
|
7211
|
+
const contentRef = React32.useRef(null);
|
|
7066
7212
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
7067
7213
|
useFocusGuards();
|
|
7068
|
-
return /* @__PURE__ */ (0,
|
|
7069
|
-
/* @__PURE__ */ (0,
|
|
7214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
7215
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
7070
7216
|
FocusScope,
|
|
7071
7217
|
{
|
|
7072
7218
|
asChild: true,
|
|
@@ -7074,7 +7220,7 @@ var DialogContentImpl = React31.forwardRef(
|
|
|
7074
7220
|
trapped: trapFocus,
|
|
7075
7221
|
onMountAutoFocus: onOpenAutoFocus,
|
|
7076
7222
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
7077
|
-
children: /* @__PURE__ */ (0,
|
|
7223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
7078
7224
|
DismissableLayer,
|
|
7079
7225
|
{
|
|
7080
7226
|
role: "dialog",
|
|
@@ -7089,37 +7235,37 @@ var DialogContentImpl = React31.forwardRef(
|
|
|
7089
7235
|
)
|
|
7090
7236
|
}
|
|
7091
7237
|
),
|
|
7092
|
-
/* @__PURE__ */ (0,
|
|
7093
|
-
/* @__PURE__ */ (0,
|
|
7094
|
-
/* @__PURE__ */ (0,
|
|
7238
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
7239
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
7240
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
7095
7241
|
] })
|
|
7096
7242
|
] });
|
|
7097
7243
|
}
|
|
7098
7244
|
);
|
|
7099
7245
|
var TITLE_NAME = "DialogTitle";
|
|
7100
|
-
var DialogTitle =
|
|
7246
|
+
var DialogTitle = React32.forwardRef(
|
|
7101
7247
|
(props, forwardedRef) => {
|
|
7102
7248
|
const { __scopeDialog, ...titleProps } = props;
|
|
7103
7249
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
7104
|
-
return /* @__PURE__ */ (0,
|
|
7250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
7105
7251
|
}
|
|
7106
7252
|
);
|
|
7107
7253
|
DialogTitle.displayName = TITLE_NAME;
|
|
7108
7254
|
var DESCRIPTION_NAME = "DialogDescription";
|
|
7109
|
-
var DialogDescription =
|
|
7255
|
+
var DialogDescription = React32.forwardRef(
|
|
7110
7256
|
(props, forwardedRef) => {
|
|
7111
7257
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
7112
7258
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
7113
|
-
return /* @__PURE__ */ (0,
|
|
7259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
7114
7260
|
}
|
|
7115
7261
|
);
|
|
7116
7262
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
7117
7263
|
var CLOSE_NAME = "DialogClose";
|
|
7118
|
-
var DialogClose =
|
|
7264
|
+
var DialogClose = React32.forwardRef(
|
|
7119
7265
|
(props, forwardedRef) => {
|
|
7120
7266
|
const { __scopeDialog, ...closeProps } = props;
|
|
7121
7267
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
7122
|
-
return /* @__PURE__ */ (0,
|
|
7268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
7123
7269
|
Primitive.button,
|
|
7124
7270
|
{
|
|
7125
7271
|
type: "button",
|
|
@@ -7147,7 +7293,7 @@ var TitleWarning = ({ titleId }) => {
|
|
|
7147
7293
|
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
7148
7294
|
|
|
7149
7295
|
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
7150
|
-
|
|
7296
|
+
React32.useEffect(() => {
|
|
7151
7297
|
if (titleId) {
|
|
7152
7298
|
const hasTitle = document.getElementById(titleId);
|
|
7153
7299
|
if (!hasTitle) console.error(MESSAGE);
|
|
@@ -7159,7 +7305,7 @@ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
|
7159
7305
|
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
7160
7306
|
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
7161
7307
|
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
7162
|
-
|
|
7308
|
+
React32.useEffect(() => {
|
|
7163
7309
|
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
|
7164
7310
|
if (descriptionId && describedById) {
|
|
7165
7311
|
const hasDescription = document.getElementById(descriptionId);
|
|
@@ -7176,135 +7322,31 @@ var Title = DialogTitle;
|
|
|
7176
7322
|
var Description = DialogDescription;
|
|
7177
7323
|
var Close = DialogClose;
|
|
7178
7324
|
|
|
7179
|
-
//
|
|
7180
|
-
var
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
(
|
|
7187
|
-
);
|
|
7188
|
-
var toPascalCase = (string) => {
|
|
7189
|
-
const camelCase = toCamelCase(string);
|
|
7190
|
-
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
7325
|
+
// src/libraries/react/components/ui/dialog.tsx
|
|
7326
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
7327
|
+
var Dialog2 = Root3;
|
|
7328
|
+
var DialogPortal2 = ({
|
|
7329
|
+
children,
|
|
7330
|
+
...props
|
|
7331
|
+
}) => {
|
|
7332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Portal2, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "au-root", children }) });
|
|
7191
7333
|
};
|
|
7192
|
-
var
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7334
|
+
var DialogOverlay2 = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
7335
|
+
Overlay,
|
|
7336
|
+
{
|
|
7337
|
+
ref,
|
|
7338
|
+
className: cn(
|
|
7339
|
+
"au-fixed au-inset-0 au-z-50 data-[state=open]:au-animate-in data-[state=closed]:au-animate-out data-[state=closed]:au-fade-out-0 data-[state=open]:au-fade-in-0 au-backdrop-blur-sm au-bg-black/40",
|
|
7340
|
+
className
|
|
7341
|
+
),
|
|
7342
|
+
...props
|
|
7200
7343
|
}
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
var defaultAttributes = {
|
|
7208
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7209
|
-
width: 24,
|
|
7210
|
-
height: 24,
|
|
7211
|
-
viewBox: "0 0 24 24",
|
|
7212
|
-
fill: "none",
|
|
7213
|
-
stroke: "currentColor",
|
|
7214
|
-
strokeWidth: 2,
|
|
7215
|
-
strokeLinecap: "round",
|
|
7216
|
-
strokeLinejoin: "round"
|
|
7217
|
-
};
|
|
7218
|
-
|
|
7219
|
-
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
7220
|
-
var Icon = (0, import_react10.forwardRef)(
|
|
7221
|
-
({
|
|
7222
|
-
color = "currentColor",
|
|
7223
|
-
size: size4 = 24,
|
|
7224
|
-
strokeWidth = 2,
|
|
7225
|
-
absoluteStrokeWidth,
|
|
7226
|
-
className = "",
|
|
7227
|
-
children,
|
|
7228
|
-
iconNode,
|
|
7229
|
-
...rest
|
|
7230
|
-
}, ref) => (0, import_react10.createElement)(
|
|
7231
|
-
"svg",
|
|
7232
|
-
{
|
|
7233
|
-
ref,
|
|
7234
|
-
...defaultAttributes,
|
|
7235
|
-
width: size4,
|
|
7236
|
-
height: size4,
|
|
7237
|
-
stroke: color,
|
|
7238
|
-
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
|
|
7239
|
-
className: mergeClasses("lucide", className),
|
|
7240
|
-
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
7241
|
-
...rest
|
|
7242
|
-
},
|
|
7243
|
-
[
|
|
7244
|
-
...iconNode.map(([tag, attrs]) => (0, import_react10.createElement)(tag, attrs)),
|
|
7245
|
-
...Array.isArray(children) ? children : [children]
|
|
7246
|
-
]
|
|
7247
|
-
)
|
|
7248
|
-
);
|
|
7249
|
-
|
|
7250
|
-
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
7251
|
-
var createLucideIcon = (iconName, iconNode) => {
|
|
7252
|
-
const Component = (0, import_react11.forwardRef)(
|
|
7253
|
-
({ className, ...props }, ref) => (0, import_react11.createElement)(Icon, {
|
|
7254
|
-
ref,
|
|
7255
|
-
iconNode,
|
|
7256
|
-
className: mergeClasses(
|
|
7257
|
-
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
7258
|
-
`lucide-${iconName}`,
|
|
7259
|
-
className
|
|
7260
|
-
),
|
|
7261
|
-
...props
|
|
7262
|
-
})
|
|
7263
|
-
);
|
|
7264
|
-
Component.displayName = toPascalCase(iconName);
|
|
7265
|
-
return Component;
|
|
7266
|
-
};
|
|
7267
|
-
|
|
7268
|
-
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
7269
|
-
var __iconNode = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
7270
|
-
var ChevronDown = createLucideIcon("chevron-down", __iconNode);
|
|
7271
|
-
|
|
7272
|
-
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js
|
|
7273
|
-
var __iconNode2 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
7274
|
-
var LoaderCircle = createLucideIcon("loader-circle", __iconNode2);
|
|
7275
|
-
|
|
7276
|
-
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/x.js
|
|
7277
|
-
var __iconNode3 = [
|
|
7278
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
7279
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
7280
|
-
];
|
|
7281
|
-
var X = createLucideIcon("x", __iconNode3);
|
|
7282
|
-
|
|
7283
|
-
// src/libraries/react/components/ui/dialog.tsx
|
|
7284
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
7285
|
-
var Dialog2 = Root3;
|
|
7286
|
-
var DialogPortal2 = ({
|
|
7287
|
-
children,
|
|
7288
|
-
...props
|
|
7289
|
-
}) => {
|
|
7290
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Portal2, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "au-root", children }) });
|
|
7291
|
-
};
|
|
7292
|
-
var DialogOverlay2 = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
7293
|
-
Overlay,
|
|
7294
|
-
{
|
|
7295
|
-
ref,
|
|
7296
|
-
className: cn(
|
|
7297
|
-
"au-fixed au-inset-0 au-z-50 data-[state=open]:au-animate-in data-[state=closed]:au-animate-out data-[state=closed]:au-fade-out-0 data-[state=open]:au-fade-in-0 au-backdrop-blur-sm au-bg-black/40",
|
|
7298
|
-
className
|
|
7299
|
-
),
|
|
7300
|
-
...props
|
|
7301
|
-
}
|
|
7302
|
-
));
|
|
7303
|
-
DialogOverlay2.displayName = Overlay.displayName;
|
|
7304
|
-
var DialogContent2 = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DialogPortal2, { children: [
|
|
7305
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DialogOverlay2, {}),
|
|
7306
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
7307
|
-
Content3,
|
|
7344
|
+
));
|
|
7345
|
+
DialogOverlay2.displayName = Overlay.displayName;
|
|
7346
|
+
var DialogContent2 = React33.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DialogPortal2, { children: [
|
|
7347
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogOverlay2, {}),
|
|
7348
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
7349
|
+
Content3,
|
|
7308
7350
|
{
|
|
7309
7351
|
ref,
|
|
7310
7352
|
className: cn(
|
|
@@ -7314,9 +7356,9 @@ var DialogContent2 = React32.forwardRef(({ className, children, ...props }, ref)
|
|
|
7314
7356
|
...props,
|
|
7315
7357
|
children: [
|
|
7316
7358
|
children,
|
|
7317
|
-
/* @__PURE__ */ (0,
|
|
7318
|
-
/* @__PURE__ */ (0,
|
|
7319
|
-
/* @__PURE__ */ (0,
|
|
7359
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Close, { className: "au-absolute au-right-4 au-top-4 au-rounded-sm au-opacity-70 au-ring-offset-background au-transition-opacity hover:au-opacity-100 focus:au-outline-none focus:au-ring-2 focus:au-ring-ring focus:au-ring-offset-2 disabled:au-pointer-events-none data-[state=open]:au-bg-accent data-[state=open]:au-text-muted-foreground", children: [
|
|
7360
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(X, { className: "au-h-4 au-w-4" }),
|
|
7361
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "au-sr-only", children: "Close" })
|
|
7320
7362
|
] })
|
|
7321
7363
|
]
|
|
7322
7364
|
}
|
|
@@ -7326,7 +7368,7 @@ DialogContent2.displayName = Content3.displayName;
|
|
|
7326
7368
|
var DialogHeader = ({
|
|
7327
7369
|
className,
|
|
7328
7370
|
...props
|
|
7329
|
-
}) => /* @__PURE__ */ (0,
|
|
7371
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
7330
7372
|
"div",
|
|
7331
7373
|
{
|
|
7332
7374
|
className: cn(
|
|
@@ -7340,7 +7382,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
7340
7382
|
var DialogFooter = ({
|
|
7341
7383
|
className,
|
|
7342
7384
|
...props
|
|
7343
|
-
}) => /* @__PURE__ */ (0,
|
|
7385
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
7344
7386
|
"div",
|
|
7345
7387
|
{
|
|
7346
7388
|
className: cn(
|
|
@@ -7351,7 +7393,7 @@ var DialogFooter = ({
|
|
|
7351
7393
|
}
|
|
7352
7394
|
);
|
|
7353
7395
|
DialogFooter.displayName = "DialogFooter";
|
|
7354
|
-
var DialogTitle2 =
|
|
7396
|
+
var DialogTitle2 = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
7355
7397
|
Title,
|
|
7356
7398
|
{
|
|
7357
7399
|
ref,
|
|
@@ -7363,7 +7405,7 @@ var DialogTitle2 = React32.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
7363
7405
|
}
|
|
7364
7406
|
));
|
|
7365
7407
|
DialogTitle2.displayName = Title.displayName;
|
|
7366
|
-
var DialogDescription2 =
|
|
7408
|
+
var DialogDescription2 = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
7367
7409
|
Description,
|
|
7368
7410
|
{
|
|
7369
7411
|
ref,
|
|
@@ -7373,206 +7415,35 @@ var DialogDescription2 = React32.forwardRef(({ className, ...props }, ref) => /*
|
|
|
7373
7415
|
));
|
|
7374
7416
|
DialogDescription2.displayName = Description.displayName;
|
|
7375
7417
|
|
|
7376
|
-
// src/libraries/react/components/
|
|
7377
|
-
var
|
|
7378
|
-
var getCheckoutContent = (checkoutResult) => {
|
|
7379
|
-
const { product, current_product, next_cycle } = checkoutResult;
|
|
7380
|
-
const { is_one_off, is_free, has_trial, updateable } = product.properties;
|
|
7381
|
-
const scenario = product.scenario;
|
|
7382
|
-
const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() : void 0;
|
|
7383
|
-
const productName = product.name;
|
|
7384
|
-
if (is_one_off) {
|
|
7385
|
-
return {
|
|
7386
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7387
|
-
"Purchase ",
|
|
7388
|
-
productName
|
|
7389
|
-
] }),
|
|
7390
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7391
|
-
"By clicking confirm, you will purchase ",
|
|
7392
|
-
productName,
|
|
7393
|
-
" and your card will be charged immediately."
|
|
7394
|
-
] })
|
|
7395
|
-
};
|
|
7396
|
-
}
|
|
7397
|
-
if (scenario == "active" && updateable) {
|
|
7398
|
-
if (updateable) {
|
|
7399
|
-
return {
|
|
7400
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Update Plan" }),
|
|
7401
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Update your prepaid quantity. You'll be charged or credited the prorated difference based on your current billing cycle." })
|
|
7402
|
-
};
|
|
7403
|
-
}
|
|
7404
|
-
}
|
|
7405
|
-
if (has_trial) {
|
|
7406
|
-
return {
|
|
7407
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7408
|
-
"Start trial for ",
|
|
7409
|
-
productName
|
|
7410
|
-
] }),
|
|
7411
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7412
|
-
"By clicking confirm, you will start a free trial of ",
|
|
7413
|
-
productName,
|
|
7414
|
-
" ",
|
|
7415
|
-
"which ends on ",
|
|
7416
|
-
nextCycleAtStr,
|
|
7417
|
-
"."
|
|
7418
|
-
] })
|
|
7419
|
-
};
|
|
7420
|
-
}
|
|
7421
|
-
switch (scenario) {
|
|
7422
|
-
case "scheduled":
|
|
7423
|
-
return {
|
|
7424
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7425
|
-
productName,
|
|
7426
|
-
" product already scheduled"
|
|
7427
|
-
] }),
|
|
7428
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7429
|
-
"You are currently on product ",
|
|
7430
|
-
current_product.name,
|
|
7431
|
-
" and are scheduled to start ",
|
|
7432
|
-
productName,
|
|
7433
|
-
" on ",
|
|
7434
|
-
nextCycleAtStr,
|
|
7435
|
-
"."
|
|
7436
|
-
] })
|
|
7437
|
-
};
|
|
7438
|
-
case "active":
|
|
7439
|
-
return {
|
|
7440
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Product already active" }),
|
|
7441
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "You are already subscribed to this product." })
|
|
7442
|
-
};
|
|
7443
|
-
case "new":
|
|
7444
|
-
if (is_free) {
|
|
7445
|
-
return {
|
|
7446
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7447
|
-
"Enable ",
|
|
7448
|
-
productName
|
|
7449
|
-
] }),
|
|
7450
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7451
|
-
"By clicking confirm, ",
|
|
7452
|
-
productName,
|
|
7453
|
-
" will be enabled immediately."
|
|
7454
|
-
] })
|
|
7455
|
-
};
|
|
7456
|
-
}
|
|
7457
|
-
return {
|
|
7458
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7459
|
-
"Subscribe to ",
|
|
7460
|
-
productName
|
|
7461
|
-
] }),
|
|
7462
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7463
|
-
"By clicking confirm, you will be subscribed to ",
|
|
7464
|
-
productName,
|
|
7465
|
-
" and your card will be charged immediately."
|
|
7466
|
-
] })
|
|
7467
|
-
};
|
|
7468
|
-
case "renew":
|
|
7469
|
-
return {
|
|
7470
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Renew" }),
|
|
7471
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7472
|
-
"By clicking confirm, you will renew your subscription to",
|
|
7473
|
-
" ",
|
|
7474
|
-
productName,
|
|
7475
|
-
"."
|
|
7476
|
-
] })
|
|
7477
|
-
};
|
|
7478
|
-
case "upgrade":
|
|
7479
|
-
return {
|
|
7480
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7481
|
-
"Upgrade to ",
|
|
7482
|
-
productName
|
|
7483
|
-
] }),
|
|
7484
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7485
|
-
"By clicking confirm, you will upgrade to ",
|
|
7486
|
-
productName,
|
|
7487
|
-
" and your payment method will be charged immediately."
|
|
7488
|
-
] })
|
|
7489
|
-
};
|
|
7490
|
-
case "downgrade":
|
|
7491
|
-
return {
|
|
7492
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7493
|
-
"Downgrade to ",
|
|
7494
|
-
productName
|
|
7495
|
-
] }),
|
|
7496
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7497
|
-
"By clicking confirm, your current subscription to",
|
|
7498
|
-
" ",
|
|
7499
|
-
current_product.name,
|
|
7500
|
-
" will be cancelled and a new subscription to",
|
|
7501
|
-
" ",
|
|
7502
|
-
productName,
|
|
7503
|
-
" will begin on ",
|
|
7504
|
-
nextCycleAtStr,
|
|
7505
|
-
"."
|
|
7506
|
-
] })
|
|
7507
|
-
};
|
|
7508
|
-
case "cancel":
|
|
7509
|
-
return {
|
|
7510
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Cancel" }),
|
|
7511
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { children: [
|
|
7512
|
-
"By clicking confirm, your subscription to ",
|
|
7513
|
-
current_product.name,
|
|
7514
|
-
" ",
|
|
7515
|
-
"will end on ",
|
|
7516
|
-
nextCycleAtStr,
|
|
7517
|
-
"."
|
|
7518
|
-
] })
|
|
7519
|
-
};
|
|
7520
|
-
default:
|
|
7521
|
-
return {
|
|
7522
|
-
title: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "Change Subscription" }),
|
|
7523
|
-
message: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "You are about to change your subscription." })
|
|
7524
|
-
};
|
|
7525
|
-
}
|
|
7526
|
-
};
|
|
7527
|
-
|
|
7528
|
-
// src/libraries/react/components/ui/accordion.tsx
|
|
7529
|
-
var React33 = __toESM(require("react"));
|
|
7418
|
+
// src/libraries/react/components/ui/input.tsx
|
|
7419
|
+
var React34 = __toESM(require("react"));
|
|
7530
7420
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
7531
|
-
var
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
className: cn(
|
|
7546
|
-
"au-flex au-flex-1 au-items-center au-justify-between au-py-4 au-text-sm au-font-medium au-transition-all hover:au-underline au-text-left [&[data-state=open]>svg]:au-rotate-180",
|
|
7547
|
-
className
|
|
7548
|
-
),
|
|
7549
|
-
...props,
|
|
7550
|
-
children: [
|
|
7551
|
-
children,
|
|
7552
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDown, { className: "au-h-4 au-w-4 au-shrink-0 au-text-muted-foreground au-transition-transform au-duration-200" })
|
|
7553
|
-
]
|
|
7554
|
-
}
|
|
7555
|
-
) }));
|
|
7556
|
-
AccordionTrigger2.displayName = Trigger2.displayName;
|
|
7557
|
-
var AccordionContent2 = React33.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7558
|
-
Content2,
|
|
7559
|
-
{
|
|
7560
|
-
ref,
|
|
7561
|
-
className: "au-overflow-hidden au-text-sm data-[state=closed]:au-animate-accordion-up data-[state=open]:au-animate-accordion-down",
|
|
7562
|
-
...props,
|
|
7563
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cn("au-pb-4 au-pt-0", className), children })
|
|
7421
|
+
var Input = React34.forwardRef(
|
|
7422
|
+
({ className, type, onClick, ...props }, ref) => {
|
|
7423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
7424
|
+
"input",
|
|
7425
|
+
{
|
|
7426
|
+
type,
|
|
7427
|
+
className: cn(
|
|
7428
|
+
"file:au-text-foreground placeholder:au-text-muted-foreground selection:au-bg-primary selection:au-text-primary-foreground dark:au-bg-input/30 au-border-input au-flex au-h-9 au-w-full au-min-w-0 au-rounded-md au-border au-bg-transparent au-px-3 au-py-1 au-text-base au-shadow-xs au-transition-[color,box-shadow] au-outline-none file:au-inline-flex file:au-h-7 file:au-border-0 file:au-bg-transparent file:au-text-sm file:au-font-medium disabled:au-pointer-events-none disabled:au-cursor-not-allowed disabled:au-opacity-50 md:au-text-sm focus-visible:au-border-ring focus-visible:au-ring-ring/50 focus-visible:au-ring-[3px] aria-invalid:au-ring-destructive/20 dark:aria-invalid:au-ring-destructive/40 aria-invalid:au-border-destructive",
|
|
7429
|
+
className
|
|
7430
|
+
),
|
|
7431
|
+
ref,
|
|
7432
|
+
...props
|
|
7433
|
+
}
|
|
7434
|
+
);
|
|
7564
7435
|
}
|
|
7565
|
-
)
|
|
7566
|
-
|
|
7436
|
+
);
|
|
7437
|
+
Input.displayName = "Input";
|
|
7567
7438
|
|
|
7568
7439
|
// src/libraries/react/components/ui/popover.tsx
|
|
7569
|
-
var
|
|
7440
|
+
var React40 = __toESM(require("react"));
|
|
7570
7441
|
|
|
7571
|
-
// ../node_modules/.pnpm/@radix-ui+react-popover@1.1.14_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
7572
|
-
var
|
|
7442
|
+
// ../node_modules/.pnpm/@radix-ui+react-popover@1.1.14_@types+react-dom@19.1.9_@types+react@19.1.10__@types+rea_361550b787f32d6b9c5c274e470f0ceb/node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
7443
|
+
var React39 = __toESM(require("react"), 1);
|
|
7573
7444
|
|
|
7574
|
-
// ../node_modules/.pnpm/@radix-ui+react-popper@1.2.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
7575
|
-
var
|
|
7445
|
+
// ../node_modules/.pnpm/@radix-ui+react-popper@1.2.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+react_007ca49c252d46f49cdfb52a53a7b784/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
7446
|
+
var React38 = __toESM(require("react"), 1);
|
|
7576
7447
|
|
|
7577
7448
|
// ../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
7578
7449
|
var sides = ["top", "right", "bottom", "left"];
|
|
@@ -9173,7 +9044,7 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
9173
9044
|
};
|
|
9174
9045
|
|
|
9175
9046
|
// ../node_modules/.pnpm/@floating-ui+react-dom@2.1.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
9176
|
-
var
|
|
9047
|
+
var React35 = __toESM(require("react"), 1);
|
|
9177
9048
|
var import_react12 = require("react");
|
|
9178
9049
|
var ReactDOM3 = __toESM(require("react-dom"), 1);
|
|
9179
9050
|
var isClient = typeof document !== "undefined";
|
|
@@ -9239,7 +9110,7 @@ function roundByDPR(element, value) {
|
|
|
9239
9110
|
return Math.round(value * dpr) / dpr;
|
|
9240
9111
|
}
|
|
9241
9112
|
function useLatestRef(value) {
|
|
9242
|
-
const ref =
|
|
9113
|
+
const ref = React35.useRef(value);
|
|
9243
9114
|
index(() => {
|
|
9244
9115
|
ref.current = value;
|
|
9245
9116
|
});
|
|
@@ -9262,7 +9133,7 @@ function useFloating(options) {
|
|
|
9262
9133
|
whileElementsMounted,
|
|
9263
9134
|
open
|
|
9264
9135
|
} = options;
|
|
9265
|
-
const [data, setData] =
|
|
9136
|
+
const [data, setData] = React35.useState({
|
|
9266
9137
|
x: 0,
|
|
9267
9138
|
y: 0,
|
|
9268
9139
|
strategy,
|
|
@@ -9270,19 +9141,19 @@ function useFloating(options) {
|
|
|
9270
9141
|
middlewareData: {},
|
|
9271
9142
|
isPositioned: false
|
|
9272
9143
|
});
|
|
9273
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
9144
|
+
const [latestMiddleware, setLatestMiddleware] = React35.useState(middleware);
|
|
9274
9145
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
9275
9146
|
setLatestMiddleware(middleware);
|
|
9276
9147
|
}
|
|
9277
|
-
const [_reference, _setReference] =
|
|
9278
|
-
const [_floating, _setFloating] =
|
|
9279
|
-
const setReference =
|
|
9148
|
+
const [_reference, _setReference] = React35.useState(null);
|
|
9149
|
+
const [_floating, _setFloating] = React35.useState(null);
|
|
9150
|
+
const setReference = React35.useCallback((node) => {
|
|
9280
9151
|
if (node !== referenceRef.current) {
|
|
9281
9152
|
referenceRef.current = node;
|
|
9282
9153
|
_setReference(node);
|
|
9283
9154
|
}
|
|
9284
9155
|
}, []);
|
|
9285
|
-
const setFloating =
|
|
9156
|
+
const setFloating = React35.useCallback((node) => {
|
|
9286
9157
|
if (node !== floatingRef.current) {
|
|
9287
9158
|
floatingRef.current = node;
|
|
9288
9159
|
_setFloating(node);
|
|
@@ -9290,14 +9161,14 @@ function useFloating(options) {
|
|
|
9290
9161
|
}, []);
|
|
9291
9162
|
const referenceEl = externalReference || _reference;
|
|
9292
9163
|
const floatingEl = externalFloating || _floating;
|
|
9293
|
-
const referenceRef =
|
|
9294
|
-
const floatingRef =
|
|
9295
|
-
const dataRef =
|
|
9164
|
+
const referenceRef = React35.useRef(null);
|
|
9165
|
+
const floatingRef = React35.useRef(null);
|
|
9166
|
+
const dataRef = React35.useRef(data);
|
|
9296
9167
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
9297
9168
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
9298
9169
|
const platformRef = useLatestRef(platform2);
|
|
9299
9170
|
const openRef = useLatestRef(open);
|
|
9300
|
-
const update =
|
|
9171
|
+
const update = React35.useCallback(() => {
|
|
9301
9172
|
if (!referenceRef.current || !floatingRef.current) {
|
|
9302
9173
|
return;
|
|
9303
9174
|
}
|
|
@@ -9335,7 +9206,7 @@ function useFloating(options) {
|
|
|
9335
9206
|
}));
|
|
9336
9207
|
}
|
|
9337
9208
|
}, [open]);
|
|
9338
|
-
const isMountedRef =
|
|
9209
|
+
const isMountedRef = React35.useRef(false);
|
|
9339
9210
|
index(() => {
|
|
9340
9211
|
isMountedRef.current = true;
|
|
9341
9212
|
return () => {
|
|
@@ -9352,17 +9223,17 @@ function useFloating(options) {
|
|
|
9352
9223
|
update();
|
|
9353
9224
|
}
|
|
9354
9225
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
9355
|
-
const refs =
|
|
9226
|
+
const refs = React35.useMemo(() => ({
|
|
9356
9227
|
reference: referenceRef,
|
|
9357
9228
|
floating: floatingRef,
|
|
9358
9229
|
setReference,
|
|
9359
9230
|
setFloating
|
|
9360
9231
|
}), [setReference, setFloating]);
|
|
9361
|
-
const elements =
|
|
9232
|
+
const elements = React35.useMemo(() => ({
|
|
9362
9233
|
reference: referenceEl,
|
|
9363
9234
|
floating: floatingEl
|
|
9364
9235
|
}), [referenceEl, floatingEl]);
|
|
9365
|
-
const floatingStyles =
|
|
9236
|
+
const floatingStyles = React35.useMemo(() => {
|
|
9366
9237
|
const initialStyles = {
|
|
9367
9238
|
position: strategy,
|
|
9368
9239
|
left: 0,
|
|
@@ -9388,7 +9259,7 @@ function useFloating(options) {
|
|
|
9388
9259
|
top: y
|
|
9389
9260
|
};
|
|
9390
9261
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
9391
|
-
return
|
|
9262
|
+
return React35.useMemo(() => ({
|
|
9392
9263
|
...data,
|
|
9393
9264
|
update,
|
|
9394
9265
|
refs,
|
|
@@ -9456,11 +9327,11 @@ var arrow3 = (options, deps) => ({
|
|
|
9456
9327
|
options: [options, deps]
|
|
9457
9328
|
});
|
|
9458
9329
|
|
|
9459
|
-
// ../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+react@
|
|
9460
|
-
var
|
|
9330
|
+
// ../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+react@_873eb9e252518815ce061a1d819bef8f/node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
9331
|
+
var React36 = __toESM(require("react"), 1);
|
|
9461
9332
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
9462
9333
|
var NAME = "Arrow";
|
|
9463
|
-
var Arrow =
|
|
9334
|
+
var Arrow = React36.forwardRef((props, forwardedRef) => {
|
|
9464
9335
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
9465
9336
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
9466
9337
|
Primitive.svg,
|
|
@@ -9479,9 +9350,9 @@ Arrow.displayName = NAME;
|
|
|
9479
9350
|
var Root4 = Arrow;
|
|
9480
9351
|
|
|
9481
9352
|
// ../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.10_react@19.1.1/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
9482
|
-
var
|
|
9353
|
+
var React37 = __toESM(require("react"), 1);
|
|
9483
9354
|
function useSize(element) {
|
|
9484
|
-
const [size4, setSize] =
|
|
9355
|
+
const [size4, setSize] = React37.useState(void 0);
|
|
9485
9356
|
useLayoutEffect2(() => {
|
|
9486
9357
|
if (element) {
|
|
9487
9358
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -9515,25 +9386,25 @@ function useSize(element) {
|
|
|
9515
9386
|
return size4;
|
|
9516
9387
|
}
|
|
9517
9388
|
|
|
9518
|
-
// ../node_modules/.pnpm/@radix-ui+react-popper@1.2.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
9389
|
+
// ../node_modules/.pnpm/@radix-ui+react-popper@1.2.7_@types+react-dom@19.1.9_@types+react@19.1.10__@types+react_007ca49c252d46f49cdfb52a53a7b784/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
9519
9390
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
9520
9391
|
var POPPER_NAME = "Popper";
|
|
9521
9392
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
9522
9393
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
9523
9394
|
var Popper = (props) => {
|
|
9524
9395
|
const { __scopePopper, children } = props;
|
|
9525
|
-
const [anchor, setAnchor] =
|
|
9396
|
+
const [anchor, setAnchor] = React38.useState(null);
|
|
9526
9397
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
9527
9398
|
};
|
|
9528
9399
|
Popper.displayName = POPPER_NAME;
|
|
9529
9400
|
var ANCHOR_NAME = "PopperAnchor";
|
|
9530
|
-
var PopperAnchor =
|
|
9401
|
+
var PopperAnchor = React38.forwardRef(
|
|
9531
9402
|
(props, forwardedRef) => {
|
|
9532
9403
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
9533
9404
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
9534
|
-
const ref =
|
|
9405
|
+
const ref = React38.useRef(null);
|
|
9535
9406
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
9536
|
-
|
|
9407
|
+
React38.useEffect(() => {
|
|
9537
9408
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
9538
9409
|
});
|
|
9539
9410
|
return virtualRef ? null : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -9542,7 +9413,7 @@ var PopperAnchor = React37.forwardRef(
|
|
|
9542
9413
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
9543
9414
|
var CONTENT_NAME4 = "PopperContent";
|
|
9544
9415
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME4);
|
|
9545
|
-
var PopperContent =
|
|
9416
|
+
var PopperContent = React38.forwardRef(
|
|
9546
9417
|
(props, forwardedRef) => {
|
|
9547
9418
|
const {
|
|
9548
9419
|
__scopePopper,
|
|
@@ -9561,9 +9432,9 @@ var PopperContent = React37.forwardRef(
|
|
|
9561
9432
|
...contentProps
|
|
9562
9433
|
} = props;
|
|
9563
9434
|
const context = usePopperContext(CONTENT_NAME4, __scopePopper);
|
|
9564
|
-
const [content, setContent] =
|
|
9435
|
+
const [content, setContent] = React38.useState(null);
|
|
9565
9436
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
9566
|
-
const [arrow4, setArrow] =
|
|
9437
|
+
const [arrow4, setArrow] = React38.useState(null);
|
|
9567
9438
|
const arrowSize = useSize(arrow4);
|
|
9568
9439
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
9569
9440
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -9625,7 +9496,7 @@ var PopperContent = React37.forwardRef(
|
|
|
9625
9496
|
const arrowX = middlewareData.arrow?.x;
|
|
9626
9497
|
const arrowY = middlewareData.arrow?.y;
|
|
9627
9498
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
9628
|
-
const [contentZIndex, setContentZIndex] =
|
|
9499
|
+
const [contentZIndex, setContentZIndex] = React38.useState();
|
|
9629
9500
|
useLayoutEffect2(() => {
|
|
9630
9501
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
9631
9502
|
}, [content]);
|
|
@@ -9691,7 +9562,7 @@ var OPPOSITE_SIDE = {
|
|
|
9691
9562
|
bottom: "top",
|
|
9692
9563
|
left: "right"
|
|
9693
9564
|
};
|
|
9694
|
-
var PopperArrow =
|
|
9565
|
+
var PopperArrow = React38.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
9695
9566
|
const { __scopePopper, ...arrowProps } = props;
|
|
9696
9567
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
9697
9568
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -9782,7 +9653,7 @@ var Anchor = PopperAnchor;
|
|
|
9782
9653
|
var Content4 = PopperContent;
|
|
9783
9654
|
var Arrow2 = PopperArrow;
|
|
9784
9655
|
|
|
9785
|
-
// ../node_modules/.pnpm/@radix-ui+react-popover@1.1.14_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
9656
|
+
// ../node_modules/.pnpm/@radix-ui+react-popover@1.1.14_@types+react-dom@19.1.9_@types+react@19.1.10__@types+rea_361550b787f32d6b9c5c274e470f0ceb/node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
9786
9657
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
9787
9658
|
var POPOVER_NAME = "Popover";
|
|
9788
9659
|
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
@@ -9800,8 +9671,8 @@ var Popover = (props) => {
|
|
|
9800
9671
|
modal = false
|
|
9801
9672
|
} = props;
|
|
9802
9673
|
const popperScope = usePopperScope(__scopePopover);
|
|
9803
|
-
const triggerRef =
|
|
9804
|
-
const [hasCustomAnchor, setHasCustomAnchor] =
|
|
9674
|
+
const triggerRef = React39.useRef(null);
|
|
9675
|
+
const [hasCustomAnchor, setHasCustomAnchor] = React39.useState(false);
|
|
9805
9676
|
const [open, setOpen] = useControllableState({
|
|
9806
9677
|
prop: openProp,
|
|
9807
9678
|
defaultProp: defaultOpen ?? false,
|
|
@@ -9816,10 +9687,10 @@ var Popover = (props) => {
|
|
|
9816
9687
|
triggerRef,
|
|
9817
9688
|
open,
|
|
9818
9689
|
onOpenChange: setOpen,
|
|
9819
|
-
onOpenToggle:
|
|
9690
|
+
onOpenToggle: React39.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
9820
9691
|
hasCustomAnchor,
|
|
9821
|
-
onCustomAnchorAdd:
|
|
9822
|
-
onCustomAnchorRemove:
|
|
9692
|
+
onCustomAnchorAdd: React39.useCallback(() => setHasCustomAnchor(true), []),
|
|
9693
|
+
onCustomAnchorRemove: React39.useCallback(() => setHasCustomAnchor(false), []),
|
|
9823
9694
|
modal,
|
|
9824
9695
|
children
|
|
9825
9696
|
}
|
|
@@ -9827,13 +9698,13 @@ var Popover = (props) => {
|
|
|
9827
9698
|
};
|
|
9828
9699
|
Popover.displayName = POPOVER_NAME;
|
|
9829
9700
|
var ANCHOR_NAME2 = "PopoverAnchor";
|
|
9830
|
-
var PopoverAnchor =
|
|
9701
|
+
var PopoverAnchor = React39.forwardRef(
|
|
9831
9702
|
(props, forwardedRef) => {
|
|
9832
9703
|
const { __scopePopover, ...anchorProps } = props;
|
|
9833
9704
|
const context = usePopoverContext(ANCHOR_NAME2, __scopePopover);
|
|
9834
9705
|
const popperScope = usePopperScope(__scopePopover);
|
|
9835
9706
|
const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
|
9836
|
-
|
|
9707
|
+
React39.useEffect(() => {
|
|
9837
9708
|
onCustomAnchorAdd();
|
|
9838
9709
|
return () => onCustomAnchorRemove();
|
|
9839
9710
|
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
@@ -9842,7 +9713,7 @@ var PopoverAnchor = React38.forwardRef(
|
|
|
9842
9713
|
);
|
|
9843
9714
|
PopoverAnchor.displayName = ANCHOR_NAME2;
|
|
9844
9715
|
var TRIGGER_NAME4 = "PopoverTrigger";
|
|
9845
|
-
var PopoverTrigger =
|
|
9716
|
+
var PopoverTrigger = React39.forwardRef(
|
|
9846
9717
|
(props, forwardedRef) => {
|
|
9847
9718
|
const { __scopePopover, ...triggerProps } = props;
|
|
9848
9719
|
const context = usePopoverContext(TRIGGER_NAME4, __scopePopover);
|
|
@@ -9876,7 +9747,7 @@ var PopoverPortal = (props) => {
|
|
|
9876
9747
|
};
|
|
9877
9748
|
PopoverPortal.displayName = PORTAL_NAME3;
|
|
9878
9749
|
var CONTENT_NAME5 = "PopoverContent";
|
|
9879
|
-
var PopoverContent =
|
|
9750
|
+
var PopoverContent = React39.forwardRef(
|
|
9880
9751
|
(props, forwardedRef) => {
|
|
9881
9752
|
const portalContext = usePortalContext2(CONTENT_NAME5, props.__scopePopover);
|
|
9882
9753
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
@@ -9886,13 +9757,13 @@ var PopoverContent = React38.forwardRef(
|
|
|
9886
9757
|
);
|
|
9887
9758
|
PopoverContent.displayName = CONTENT_NAME5;
|
|
9888
9759
|
var Slot3 = createSlot("PopoverContent.RemoveScroll");
|
|
9889
|
-
var PopoverContentModal =
|
|
9760
|
+
var PopoverContentModal = React39.forwardRef(
|
|
9890
9761
|
(props, forwardedRef) => {
|
|
9891
9762
|
const context = usePopoverContext(CONTENT_NAME5, props.__scopePopover);
|
|
9892
|
-
const contentRef =
|
|
9763
|
+
const contentRef = React39.useRef(null);
|
|
9893
9764
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
9894
|
-
const isRightClickOutsideRef =
|
|
9895
|
-
|
|
9765
|
+
const isRightClickOutsideRef = React39.useRef(false);
|
|
9766
|
+
React39.useEffect(() => {
|
|
9896
9767
|
const content = contentRef.current;
|
|
9897
9768
|
if (content) return hideOthers(content);
|
|
9898
9769
|
}, []);
|
|
@@ -9926,11 +9797,11 @@ var PopoverContentModal = React38.forwardRef(
|
|
|
9926
9797
|
) });
|
|
9927
9798
|
}
|
|
9928
9799
|
);
|
|
9929
|
-
var PopoverContentNonModal =
|
|
9800
|
+
var PopoverContentNonModal = React39.forwardRef(
|
|
9930
9801
|
(props, forwardedRef) => {
|
|
9931
9802
|
const context = usePopoverContext(CONTENT_NAME5, props.__scopePopover);
|
|
9932
|
-
const hasInteractedOutsideRef =
|
|
9933
|
-
const hasPointerDownOutsideRef =
|
|
9803
|
+
const hasInteractedOutsideRef = React39.useRef(false);
|
|
9804
|
+
const hasPointerDownOutsideRef = React39.useRef(false);
|
|
9934
9805
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
9935
9806
|
PopoverContentImpl,
|
|
9936
9807
|
{
|
|
@@ -9966,7 +9837,7 @@ var PopoverContentNonModal = React38.forwardRef(
|
|
|
9966
9837
|
);
|
|
9967
9838
|
}
|
|
9968
9839
|
);
|
|
9969
|
-
var PopoverContentImpl =
|
|
9840
|
+
var PopoverContentImpl = React39.forwardRef(
|
|
9970
9841
|
(props, forwardedRef) => {
|
|
9971
9842
|
const {
|
|
9972
9843
|
__scopePopover,
|
|
@@ -10030,7 +9901,7 @@ var PopoverContentImpl = React38.forwardRef(
|
|
|
10030
9901
|
}
|
|
10031
9902
|
);
|
|
10032
9903
|
var CLOSE_NAME2 = "PopoverClose";
|
|
10033
|
-
var PopoverClose =
|
|
9904
|
+
var PopoverClose = React39.forwardRef(
|
|
10034
9905
|
(props, forwardedRef) => {
|
|
10035
9906
|
const { __scopePopover, ...closeProps } = props;
|
|
10036
9907
|
const context = usePopoverContext(CLOSE_NAME2, __scopePopover);
|
|
@@ -10047,7 +9918,7 @@ var PopoverClose = React38.forwardRef(
|
|
|
10047
9918
|
);
|
|
10048
9919
|
PopoverClose.displayName = CLOSE_NAME2;
|
|
10049
9920
|
var ARROW_NAME2 = "PopoverArrow";
|
|
10050
|
-
var PopoverArrow =
|
|
9921
|
+
var PopoverArrow = React39.forwardRef(
|
|
10051
9922
|
(props, forwardedRef) => {
|
|
10052
9923
|
const { __scopePopover, ...arrowProps } = props;
|
|
10053
9924
|
const popperScope = usePopperScope(__scopePopover);
|
|
@@ -10066,7 +9937,7 @@ var Content22 = PopoverContent;
|
|
|
10066
9937
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
10067
9938
|
var Popover2 = Root23;
|
|
10068
9939
|
var PopoverTrigger2 = Trigger4;
|
|
10069
|
-
var PopoverContent2 =
|
|
9940
|
+
var PopoverContent2 = React40.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
10070
9941
|
Content22,
|
|
10071
9942
|
{
|
|
10072
9943
|
ref,
|
|
@@ -10081,26 +9952,157 @@ var PopoverContent2 = React39.forwardRef(({ className, align = "center", sideOff
|
|
|
10081
9952
|
));
|
|
10082
9953
|
PopoverContent2.displayName = Content22.displayName;
|
|
10083
9954
|
|
|
10084
|
-
// src/libraries/react/components/
|
|
10085
|
-
var React40 = __toESM(require("react"));
|
|
9955
|
+
// src/libraries/react/components/checkout-dialog/lib/checkout-content.tsx
|
|
10086
9956
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
10087
|
-
var
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
9957
|
+
var getCheckoutContent = (checkoutResult) => {
|
|
9958
|
+
const { product, current_product, next_cycle } = checkoutResult;
|
|
9959
|
+
const { is_one_off, is_free, has_trial, updateable } = product.properties;
|
|
9960
|
+
const scenario = product.scenario;
|
|
9961
|
+
const nextCycleAtStr = next_cycle ? new Date(next_cycle.starts_at).toLocaleDateString() : void 0;
|
|
9962
|
+
const productName = product.name;
|
|
9963
|
+
if (is_one_off) {
|
|
9964
|
+
return {
|
|
9965
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
9966
|
+
"Purchase ",
|
|
9967
|
+
productName
|
|
9968
|
+
] }),
|
|
9969
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
9970
|
+
"By clicking confirm, you will purchase ",
|
|
9971
|
+
productName,
|
|
9972
|
+
" and your card will be charged immediately."
|
|
9973
|
+
] })
|
|
9974
|
+
};
|
|
9975
|
+
}
|
|
9976
|
+
if (scenario == "active" && updateable) {
|
|
9977
|
+
if (updateable) {
|
|
9978
|
+
return {
|
|
9979
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Update Plan" }),
|
|
9980
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Update your prepaid quantity. You'll be charged or credited the prorated difference based on your current billing cycle." })
|
|
9981
|
+
};
|
|
9982
|
+
}
|
|
9983
|
+
}
|
|
9984
|
+
if (has_trial) {
|
|
9985
|
+
return {
|
|
9986
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
9987
|
+
"Start trial for ",
|
|
9988
|
+
productName
|
|
9989
|
+
] }),
|
|
9990
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
9991
|
+
"By clicking confirm, you will start a free trial of ",
|
|
9992
|
+
productName,
|
|
9993
|
+
" ",
|
|
9994
|
+
"which ends on ",
|
|
9995
|
+
nextCycleAtStr,
|
|
9996
|
+
"."
|
|
9997
|
+
] })
|
|
9998
|
+
};
|
|
9999
|
+
}
|
|
10000
|
+
switch (scenario) {
|
|
10001
|
+
case "scheduled":
|
|
10002
|
+
return {
|
|
10003
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10004
|
+
productName,
|
|
10005
|
+
" product already scheduled"
|
|
10006
|
+
] }),
|
|
10007
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10008
|
+
"You are currently on product ",
|
|
10009
|
+
current_product.name,
|
|
10010
|
+
" and are scheduled to start ",
|
|
10011
|
+
productName,
|
|
10012
|
+
" on ",
|
|
10013
|
+
nextCycleAtStr,
|
|
10014
|
+
"."
|
|
10015
|
+
] })
|
|
10016
|
+
};
|
|
10017
|
+
case "active":
|
|
10018
|
+
return {
|
|
10019
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Product already active" }),
|
|
10020
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "You are already subscribed to this product." })
|
|
10021
|
+
};
|
|
10022
|
+
case "new":
|
|
10023
|
+
if (is_free) {
|
|
10024
|
+
return {
|
|
10025
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10026
|
+
"Enable ",
|
|
10027
|
+
productName
|
|
10028
|
+
] }),
|
|
10029
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10030
|
+
"By clicking confirm, ",
|
|
10031
|
+
productName,
|
|
10032
|
+
" will be enabled immediately."
|
|
10033
|
+
] })
|
|
10034
|
+
};
|
|
10099
10035
|
}
|
|
10100
|
-
|
|
10036
|
+
return {
|
|
10037
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10038
|
+
"Subscribe to ",
|
|
10039
|
+
productName
|
|
10040
|
+
] }),
|
|
10041
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10042
|
+
"By clicking confirm, you will be subscribed to ",
|
|
10043
|
+
productName,
|
|
10044
|
+
" and your card will be charged immediately."
|
|
10045
|
+
] })
|
|
10046
|
+
};
|
|
10047
|
+
case "renew":
|
|
10048
|
+
return {
|
|
10049
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Renew" }),
|
|
10050
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10051
|
+
"By clicking confirm, you will renew your subscription to",
|
|
10052
|
+
" ",
|
|
10053
|
+
productName,
|
|
10054
|
+
"."
|
|
10055
|
+
] })
|
|
10056
|
+
};
|
|
10057
|
+
case "upgrade":
|
|
10058
|
+
return {
|
|
10059
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10060
|
+
"Upgrade to ",
|
|
10061
|
+
productName
|
|
10062
|
+
] }),
|
|
10063
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10064
|
+
"By clicking confirm, you will upgrade to ",
|
|
10065
|
+
productName,
|
|
10066
|
+
" and your payment method will be charged immediately."
|
|
10067
|
+
] })
|
|
10068
|
+
};
|
|
10069
|
+
case "downgrade":
|
|
10070
|
+
return {
|
|
10071
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10072
|
+
"Downgrade to ",
|
|
10073
|
+
productName
|
|
10074
|
+
] }),
|
|
10075
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10076
|
+
"By clicking confirm, your current subscription to",
|
|
10077
|
+
" ",
|
|
10078
|
+
current_product.name,
|
|
10079
|
+
" will be cancelled and a new subscription to",
|
|
10080
|
+
" ",
|
|
10081
|
+
productName,
|
|
10082
|
+
" will begin on ",
|
|
10083
|
+
nextCycleAtStr,
|
|
10084
|
+
"."
|
|
10085
|
+
] })
|
|
10086
|
+
};
|
|
10087
|
+
case "cancel":
|
|
10088
|
+
return {
|
|
10089
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Cancel" }),
|
|
10090
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { children: [
|
|
10091
|
+
"By clicking confirm, your subscription to ",
|
|
10092
|
+
current_product.name,
|
|
10093
|
+
" ",
|
|
10094
|
+
"will end on ",
|
|
10095
|
+
nextCycleAtStr,
|
|
10096
|
+
"."
|
|
10097
|
+
] })
|
|
10098
|
+
};
|
|
10099
|
+
default:
|
|
10100
|
+
return {
|
|
10101
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "Change Subscription" }),
|
|
10102
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { children: "You are about to change your subscription." })
|
|
10103
|
+
};
|
|
10101
10104
|
}
|
|
10102
|
-
|
|
10103
|
-
Input.displayName = "Input";
|
|
10105
|
+
};
|
|
10104
10106
|
|
|
10105
10107
|
// src/libraries/react/components/checkout-dialog/checkout-dialog-synced.tsx
|
|
10106
10108
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
@@ -10261,7 +10263,7 @@ function CheckoutLines({ checkoutResult }) {
|
|
|
10261
10263
|
}
|
|
10262
10264
|
)
|
|
10263
10265
|
] }) }),
|
|
10264
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(AccordionContent2, { className: "au-mt-2 au-mb-0 au-pb-2 au-flex au-flex-col au-gap-2", children: checkoutResult?.lines.filter((line) => line.amount
|
|
10266
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(AccordionContent2, { className: "au-mt-2 au-mb-0 au-pb-2 au-flex au-flex-col au-gap-2", children: checkoutResult?.lines.filter((line) => line.amount !== 0).map((line, index2) => {
|
|
10265
10267
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "au-flex au-justify-between", children: [
|
|
10266
10268
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "au-text-muted-foreground", children: line.description }),
|
|
10267
10269
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "au-text-muted-foreground", children: new Intl.NumberFormat("en-US", {
|
|
@@ -10343,13 +10345,14 @@ var PrepaidItem = ({
|
|
|
10343
10345
|
{
|
|
10344
10346
|
className: cn(
|
|
10345
10347
|
"au-text-muted-foreground au-text-xs au-px-1 au-py-0.5 au-rounded-md au-flex au-items-center au-gap-1 au-bg-accent/80 au-shrink-0",
|
|
10346
|
-
disableSelection !== true && "hover:au-bg-accent hover:au-text-foreground"
|
|
10348
|
+
disableSelection !== true && "hover:au-bg-accent hover:au-text-foreground",
|
|
10349
|
+
disableSelection && "au-pointer-events-none au-opacity-80 au-cursor-not-allowed"
|
|
10347
10350
|
),
|
|
10348
10351
|
disabled: disableSelection,
|
|
10349
10352
|
children: [
|
|
10350
10353
|
"Qty: ",
|
|
10351
10354
|
quantity,
|
|
10352
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChevronDown, { size: 12 })
|
|
10355
|
+
!disableSelection && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChevronDown, { size: 12 })
|
|
10353
10356
|
]
|
|
10354
10357
|
}
|
|
10355
10358
|
),
|
|
@@ -10412,16 +10415,16 @@ var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
|
10412
10415
|
var import_react15 = require("react");
|
|
10413
10416
|
|
|
10414
10417
|
// src/libraries/react/components/ui/switch.tsx
|
|
10415
|
-
var
|
|
10418
|
+
var React43 = __toESM(require("react"));
|
|
10416
10419
|
|
|
10417
|
-
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
10418
|
-
var
|
|
10420
|
+
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.9_@types+react@19.1.10__@types+react_d116794fd29880b88b610a986963c8dd/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
10421
|
+
var React42 = __toESM(require("react"), 1);
|
|
10419
10422
|
|
|
10420
10423
|
// ../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.10_react@19.1.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
10421
|
-
var
|
|
10424
|
+
var React41 = __toESM(require("react"), 1);
|
|
10422
10425
|
function usePrevious(value) {
|
|
10423
|
-
const ref =
|
|
10424
|
-
return
|
|
10426
|
+
const ref = React41.useRef({ value, previous: value });
|
|
10427
|
+
return React41.useMemo(() => {
|
|
10425
10428
|
if (ref.current.value !== value) {
|
|
10426
10429
|
ref.current.previous = ref.current.value;
|
|
10427
10430
|
ref.current.value = value;
|
|
@@ -10430,12 +10433,12 @@ function usePrevious(value) {
|
|
|
10430
10433
|
}, [value]);
|
|
10431
10434
|
}
|
|
10432
10435
|
|
|
10433
|
-
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.9_@types+react@19.1.10__@types+
|
|
10436
|
+
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.9_@types+react@19.1.10__@types+react_d116794fd29880b88b610a986963c8dd/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
10434
10437
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
10435
10438
|
var SWITCH_NAME = "Switch";
|
|
10436
10439
|
var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
|
|
10437
10440
|
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
10438
|
-
var Switch =
|
|
10441
|
+
var Switch = React42.forwardRef(
|
|
10439
10442
|
(props, forwardedRef) => {
|
|
10440
10443
|
const {
|
|
10441
10444
|
__scopeSwitch,
|
|
@@ -10449,9 +10452,9 @@ var Switch = React43.forwardRef(
|
|
|
10449
10452
|
form,
|
|
10450
10453
|
...switchProps
|
|
10451
10454
|
} = props;
|
|
10452
|
-
const [button, setButton] =
|
|
10455
|
+
const [button, setButton] = React42.useState(null);
|
|
10453
10456
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
10454
|
-
const hasConsumerStoppedPropagationRef =
|
|
10457
|
+
const hasConsumerStoppedPropagationRef = React42.useRef(false);
|
|
10455
10458
|
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
10456
10459
|
const [checked, setChecked] = useControllableState({
|
|
10457
10460
|
prop: checkedProp,
|
|
@@ -10501,7 +10504,7 @@ var Switch = React43.forwardRef(
|
|
|
10501
10504
|
);
|
|
10502
10505
|
Switch.displayName = SWITCH_NAME;
|
|
10503
10506
|
var THUMB_NAME = "SwitchThumb";
|
|
10504
|
-
var SwitchThumb =
|
|
10507
|
+
var SwitchThumb = React42.forwardRef(
|
|
10505
10508
|
(props, forwardedRef) => {
|
|
10506
10509
|
const { __scopeSwitch, ...thumbProps } = props;
|
|
10507
10510
|
const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
|
|
@@ -10518,7 +10521,7 @@ var SwitchThumb = React43.forwardRef(
|
|
|
10518
10521
|
);
|
|
10519
10522
|
SwitchThumb.displayName = THUMB_NAME;
|
|
10520
10523
|
var BUBBLE_INPUT_NAME = "SwitchBubbleInput";
|
|
10521
|
-
var SwitchBubbleInput =
|
|
10524
|
+
var SwitchBubbleInput = React42.forwardRef(
|
|
10522
10525
|
({
|
|
10523
10526
|
__scopeSwitch,
|
|
10524
10527
|
control,
|
|
@@ -10526,11 +10529,11 @@ var SwitchBubbleInput = React43.forwardRef(
|
|
|
10526
10529
|
bubbles = true,
|
|
10527
10530
|
...props
|
|
10528
10531
|
}, forwardedRef) => {
|
|
10529
|
-
const ref =
|
|
10532
|
+
const ref = React42.useRef(null);
|
|
10530
10533
|
const composedRefs = useComposedRefs(ref, forwardedRef);
|
|
10531
10534
|
const prevChecked = usePrevious(checked);
|
|
10532
10535
|
const controlSize = useSize(control);
|
|
10533
|
-
|
|
10536
|
+
React42.useEffect(() => {
|
|
10534
10537
|
const input = ref.current;
|
|
10535
10538
|
if (!input) return;
|
|
10536
10539
|
const inputProto = window.HTMLInputElement.prototype;
|
|
@@ -10575,7 +10578,7 @@ var Thumb = SwitchThumb;
|
|
|
10575
10578
|
|
|
10576
10579
|
// src/libraries/react/components/ui/switch.tsx
|
|
10577
10580
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
10578
|
-
var Switch2 =
|
|
10581
|
+
var Switch2 = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
10579
10582
|
Root5,
|
|
10580
10583
|
{
|
|
10581
10584
|
className: cn(
|