autumn-js 0.0.113 → 0.0.114-beta.2
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 +18 -18
- package/dist/libraries/backend/better-auth.d.ts +18 -18
- package/dist/libraries/backend/better-auth.js +5 -16
- package/dist/libraries/backend/better-auth.mjs +14 -11
- package/dist/libraries/backend/{chunk-EUAZMSHG.mjs → chunk-6Q2ITB2J.mjs} +6 -2
- package/dist/libraries/backend/{chunk-C342MVRJ.mjs → chunk-EJOHQRIY.mjs} +5 -1
- package/dist/libraries/backend/{chunk-BNRLG2NJ.mjs → chunk-ES5GSXMO.mjs} +51 -2
- package/dist/libraries/backend/{chunk-45WVZY23.mjs → chunk-I4AT5QDU.mjs} +10 -6
- package/dist/libraries/backend/{chunk-NBQSYUOH.mjs → chunk-JBMNONDP.mjs} +6 -2
- package/dist/libraries/backend/{chunk-6DZX6EAA.mjs → chunk-MZDBMPP4.mjs} +14 -1
- package/dist/libraries/backend/{chunk-UNZHJTEY.mjs → chunk-O4CGURPC.mjs} +5 -0
- package/dist/libraries/backend/{chunk-KSG3E4Q2.mjs → chunk-V47ADUWV.mjs} +5 -0
- package/dist/libraries/backend/{chunk-74THWZUU.mjs → chunk-W3UTLGLL.mjs} +11 -7
- package/dist/libraries/backend/{chunk-B5EK655Y.mjs → chunk-WVOOJ47K.mjs} +6 -2
- package/dist/libraries/backend/{chunk-ZHA3DHVC.mjs → chunk-YIQFOU5D.mjs} +7 -2
- package/dist/libraries/backend/constants.mjs +2 -2
- package/dist/libraries/backend/convex.js +5 -16
- package/dist/libraries/backend/convex.mjs +14 -11
- package/dist/libraries/backend/elysia.js +5 -16
- package/dist/libraries/backend/elysia.mjs +15 -11
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/express.js +5 -16
- package/dist/libraries/backend/express.mjs +14 -11
- package/dist/libraries/backend/fastify.js +5 -16
- package/dist/libraries/backend/fastify.mjs +14 -11
- package/dist/libraries/backend/hono.js +5 -16
- package/dist/libraries/backend/hono.mjs +14 -11
- package/dist/libraries/backend/next.js +217 -101
- package/dist/libraries/backend/next.mjs +156 -107
- package/dist/libraries/backend/react-router.js +5 -16
- package/dist/libraries/backend/react-router.mjs +14 -11
- package/dist/libraries/backend/remix_dep.js +5 -16
- package/dist/libraries/backend/remix_dep.mjs +13 -10
- package/dist/libraries/backend/routes/backendRouter.js +5 -16
- package/dist/libraries/backend/routes/backendRouter.mjs +10 -10
- package/dist/libraries/backend/routes/basePath.mjs +6 -0
- package/dist/libraries/backend/routes/entityRoutes.js +5 -16
- package/dist/libraries/backend/routes/entityRoutes.mjs +6 -6
- package/dist/libraries/backend/routes/genRoutes.js +5 -16
- package/dist/libraries/backend/routes/genRoutes.mjs +6 -6
- package/dist/libraries/backend/routes/productRoutes.js +5 -16
- package/dist/libraries/backend/routes/productRoutes.mjs +6 -6
- package/dist/libraries/backend/routes/referralRoutes.js +5 -16
- package/dist/libraries/backend/routes/referralRoutes.mjs +6 -6
- package/dist/libraries/backend/schemas/zod.mjs +4 -1
- package/dist/libraries/backend/supabase.js +5 -16
- package/dist/libraries/backend/supabase.mjs +14 -11
- package/dist/libraries/backend/tanstack.js +85 -16
- package/dist/libraries/backend/tanstack.mjs +25 -11
- package/dist/libraries/backend/utils/AuthFunction.mjs +6 -0
- package/dist/libraries/backend/utils/backendRes.js +5 -16
- package/dist/libraries/backend/utils/backendRes.mjs +4 -4
- package/dist/libraries/backend/utils/logBackendErrors.js +5 -16
- package/dist/libraries/backend/utils/logBackendErrors.mjs +5 -2
- package/dist/libraries/backend/utils/secretKeyCheck.mjs +2 -2
- package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
- package/dist/libraries/backend/utils/withAuth.js +5 -16
- package/dist/libraries/backend/utils/withAuth.mjs +5 -5
- package/dist/libraries/react/AutumnContext.d.mts +6 -6
- package/dist/libraries/react/AutumnContext.d.ts +6 -6
- package/dist/libraries/react/AutumnContext.js +5 -16
- package/dist/libraries/react/AutumnContext.mjs +5 -5
- package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.js +5 -6
- package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
- package/dist/libraries/react/{ReactAutumnClient-BNcDsxYe.d.ts → ReactAutumnClient-CDfo8hZ4.d.ts} +17 -17
- package/dist/libraries/react/{ReactAutumnClient-Bm0Y_zzP.d.mts → ReactAutumnClient-c3yiqDyr.d.mts} +17 -17
- package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.js +5 -6
- package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
- package/dist/libraries/react/{attachTypes-BQzswBtK.d.mts → attachTypes--vy7a8ko.d.mts} +7 -7
- package/dist/libraries/react/{attachTypes-DIsESO5Y.d.ts → attachTypes-BUrxxKCh.d.ts} +7 -7
- package/dist/libraries/react/{chunk-GUZH4TKK.mjs → chunk-3JORYFTY.mjs} +5 -6
- package/dist/libraries/react/{chunk-DDYSMKLY.mjs → chunk-3UNBBJY5.mjs} +1 -1
- package/dist/libraries/react/{chunk-HDMOJP3E.mjs → chunk-4Q7BDIOS.mjs} +1 -1
- package/dist/libraries/react/{chunk-DGBYTZLQ.mjs → chunk-5PA5P2UE.mjs} +2 -2
- package/dist/libraries/react/{chunk-4X4TKILZ.mjs → chunk-62QDB3KQ.mjs} +3 -3
- package/dist/libraries/react/{chunk-3C7OO2N3.mjs → chunk-6R3O2T4H.mjs} +1 -1
- package/dist/libraries/react/{chunk-JP6WLDHX.mjs → chunk-CV4TKYAC.mjs} +2 -2
- package/dist/libraries/react/{chunk-QMOLXJIH.mjs → chunk-CZVP6BZG.mjs} +3 -3
- package/dist/libraries/react/{chunk-QEKHWOGC.mjs → chunk-E2H5MYIO.mjs} +1 -1
- package/dist/libraries/react/{chunk-TX3X2LDE.mjs → chunk-FEISQQNM.mjs} +92 -649
- package/dist/libraries/react/chunk-FJWZPMWU.mjs +448 -0
- package/dist/libraries/react/{chunk-F324RNGU.mjs → chunk-FOXUAY7Y.mjs} +7 -7
- package/dist/libraries/react/{chunk-CYFC6BOH.mjs → chunk-HBVLIBOE.mjs} +3 -3
- package/dist/libraries/react/chunk-I2A7PK2L.mjs +151 -0
- package/dist/libraries/react/chunk-JGDTNJTR.mjs +584 -0
- package/dist/libraries/react/chunk-KUS3X33V.mjs +46 -0
- package/dist/libraries/react/chunk-OTZ65PCT.mjs +2520 -0
- package/dist/libraries/react/{chunk-EGPEAPRK.mjs → chunk-PEYCQWHI.mjs} +2 -2
- package/dist/libraries/react/{chunk-4NIALZY6.mjs → chunk-PNTVQMRO.mjs} +32 -31
- package/dist/libraries/react/{chunk-RL47UQK4.mjs → chunk-RGAEIODW.mjs} +1 -1
- package/dist/libraries/react/{chunk-PLGLCII4.mjs → chunk-YDRULJZE.mjs} +2 -2
- package/dist/libraries/react/{chunk-PRFT4OKG.mjs → chunk-YEG5KJEI.mjs} +1 -1
- package/dist/libraries/react/{chunk-6EZVNJHQ.mjs → chunk-YWQTQ72B.mjs} +15 -50
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.js +5 -16
- package/dist/libraries/react/client/ReactAutumnClient.mjs +4 -4
- package/dist/libraries/react/client/clientCompMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientCompMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientCusMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientCusMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientGenMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientGenMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientProdMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientProdMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -6
- package/dist/libraries/react/client/types/clientAttachTypes.d.mts +18 -18
- package/dist/libraries/react/client/types/clientAttachTypes.d.ts +18 -18
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.js +5 -16
- package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +2 -2
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +2 -2
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +6486 -3517
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +30 -27
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +2 -2
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +2 -2
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +3131 -169
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +30 -27
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +5895 -2928
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +30 -27
- package/dist/libraries/react/components/ui/accordion.js +984 -26
- package/dist/libraries/react/components/ui/accordion.mjs +4 -1
- package/dist/libraries/react/components/ui/dialog.mjs +4 -2
- package/dist/libraries/react/components/ui/popover.js +4282 -24
- package/dist/libraries/react/components/ui/popover.mjs +6 -1
- package/dist/libraries/react/components/ui/switch.mjs +3 -2
- package/dist/libraries/react/{cusTypes-CwLJs1D1.d.ts → cusTypes-B_vSLMNd.d.ts} +7 -7
- package/dist/libraries/react/{cusTypes-CI8GNjww.d.mts → cusTypes-D1pgp32k.d.mts} +7 -7
- package/dist/libraries/react/{entTypes-Kh8o7OKO.d.mts → entTypes-Bw3nZ-hB.d.mts} +1 -1
- package/dist/libraries/react/{entTypes-ByG7ZqG-.d.ts → entTypes-DQXsozw-.d.ts} +1 -1
- package/dist/libraries/react/{genTypes-BjDGPkYi.d.mts → genTypes-C-CUGCpC.d.mts} +5 -5
- package/dist/libraries/react/{genTypes-CtkYtnSx.d.ts → genTypes-CaRSTLgV.d.ts} +5 -5
- package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/handleCheck.js +5 -16
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +5 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +3 -3
- package/dist/libraries/react/hooks/useAnalytics.d.mts +2 -2
- package/dist/libraries/react/hooks/useAnalytics.d.ts +2 -2
- package/dist/libraries/react/hooks/useAnalytics.js +5 -6
- package/dist/libraries/react/hooks/useAnalytics.mjs +6 -6
- package/dist/libraries/react/hooks/useCustomer.d.mts +6 -6
- package/dist/libraries/react/hooks/useCustomer.d.ts +6 -6
- package/dist/libraries/react/hooks/useCustomer.js +5 -6
- package/dist/libraries/react/hooks/useCustomer.mjs +10 -10
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.js +5 -6
- package/dist/libraries/react/hooks/useCustomerBase.mjs +9 -9
- package/dist/libraries/react/hooks/useEntity.d.mts +4 -4
- package/dist/libraries/react/hooks/useEntity.d.ts +4 -4
- package/dist/libraries/react/hooks/useEntity.js +5 -6
- package/dist/libraries/react/hooks/useEntity.mjs +10 -10
- package/dist/libraries/react/hooks/useEntityBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.js +5 -6
- package/dist/libraries/react/hooks/useEntityBase.mjs +9 -9
- package/dist/libraries/react/hooks/usePaywall.d.mts +1 -1
- package/dist/libraries/react/hooks/usePaywall.d.ts +1 -1
- package/dist/libraries/react/hooks/usePaywall.js +5 -6
- package/dist/libraries/react/hooks/usePaywall.mjs +6 -6
- package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.js +5 -6
- package/dist/libraries/react/hooks/usePricingTable.mjs +7 -7
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.js +5 -6
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -2
- package/dist/libraries/react/hooks/useProductsBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useProductsBase.d.ts +6 -6
- package/dist/libraries/react/index.js +5906 -2939
- package/dist/libraries/react/index.mjs +5863 -2896
- package/dist/next/client/NextAutumnClient.d.mts +18 -18
- package/dist/next/client/NextAutumnClient.d.ts +18 -18
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/next/client/{attachTypes-CACw68CG.d.ts → attachTypes-DPYjShM5.d.ts} +7 -7
- package/dist/next/client/{attachTypes-DFz8xggN.d.mts → attachTypes-mELcg_uC.d.mts} +7 -7
- package/dist/next/client/{clientAttachTypes-Chgx4uq1.d.ts → clientAttachTypes-B4i2ri-1.d.ts} +27 -27
- package/dist/next/client/{clientAttachTypes-CsHcLMla.d.mts → clientAttachTypes-EGitteWV.d.mts} +27 -27
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-CfOlwucH.d.mts → cusTypes-CRJanGZd.d.mts} +5 -5
- package/dist/next/client/{cusTypes-C9G9xqQj.d.ts → cusTypes-Dn0ETI7G.d.ts} +5 -5
- package/dist/next/client/{entTypes-_335WLpv.d.ts → entTypes-Caov3CJ9.d.ts} +1 -1
- package/dist/next/client/{entTypes-BF3ut9It.d.mts → entTypes-Qyo2WYGP.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +5 -5
- package/dist/next/client/hooks/useAutumn.d.ts +5 -5
- package/dist/next/client/hooks/useCustomer.d.mts +5 -5
- package/dist/next/client/hooks/useCustomer.d.ts +5 -5
- package/dist/next/client/hooks/useEntity.d.mts +7 -7
- package/dist/next/client/hooks/useEntity.d.ts +7 -7
- package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
- package/dist/next/client/types.d.mts +3 -3
- package/dist/next/client/types.d.ts +3 -3
- package/dist/next/server/auth/withNextAuth.d.mts +1 -1
- package/dist/next/server/auth/withNextAuth.d.ts +1 -1
- package/dist/next/server/componentActions.d.mts +1 -1
- package/dist/next/server/componentActions.d.ts +1 -1
- package/dist/next/server/cusActions.d.mts +15 -15
- package/dist/next/server/cusActions.d.ts +15 -15
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.js +7 -10
- package/dist/sdk/index.mjs +7 -6
- package/dist/utils/{chunk-V7R5DCYR.mjs → chunk-WNUBT3GZ.mjs} +5 -6
- package/dist/utils/encryptUtils.js +5 -6
- package/dist/utils/encryptUtils.mjs +1 -1
- package/dist/utils/logger.js +5 -16
- package/dist/utils/logger.mjs +1 -1
- package/package.json +7 -13
- package/tsup.config.ts +31 -0
- package/dist/libraries/react/chunk-JGRLRPKG.mjs +0 -56
- package/dist/libraries/react/chunk-UM3ZQPMU.mjs +0 -34
- package/dist/libraries/backend/{referralTypes-COVVwj-1.d.mts → referralTypes-CHRdXdZi.d.mts} +35 -35
- package/dist/libraries/backend/{referralTypes-qMay-K9l.d.ts → referralTypes-KN1bdpbB.d.ts} +35 -35
- package/dist/libraries/react/{chunk-KWNH6C27.mjs → chunk-7TYAAD2T.mjs} +11 -11
- package/dist/libraries/react/{prodTypes-Y1CLtmfa.d.mts → prodTypes-DWMxMrWG.d.mts} +2 -2
- package/dist/libraries/react/{prodTypes-Y1CLtmfa.d.ts → prodTypes-DWMxMrWG.d.ts} +2 -2
- package/dist/next/client/{prodTypes-CYd9Q1Rw.d.mts → prodTypes-si707oHg.d.mts} +4 -4
- package/dist/next/client/{prodTypes-CYd9Q1Rw.d.ts → prodTypes-si707oHg.d.ts} +4 -4
- package/dist/next/server/{cusTypes-PcPWkSme.d.mts → cusTypes-wfx--BDG.d.mts} +4 -4
- package/dist/next/server/{cusTypes-PcPWkSme.d.ts → cusTypes-wfx--BDG.d.ts} +4 -4
|
@@ -1,61 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
X
|
|
5
|
-
} from "./chunk-QJPZFEVW.mjs";
|
|
6
3
|
import {
|
|
7
4
|
Primitive,
|
|
8
5
|
composeEventHandlers,
|
|
9
|
-
createContext2,
|
|
10
|
-
createContextScope,
|
|
11
6
|
dispatchDiscreteCustomEvent,
|
|
12
|
-
useControllableState,
|
|
13
7
|
useLayoutEffect2
|
|
14
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7TYAAD2T.mjs";
|
|
15
9
|
import {
|
|
16
|
-
createSlot,
|
|
17
10
|
useComposedRefs
|
|
18
11
|
} from "./chunk-RPEGNKJH.mjs";
|
|
19
|
-
import {
|
|
20
|
-
cn
|
|
21
|
-
} from "./chunk-4J6OC4ZQ.mjs";
|
|
22
|
-
|
|
23
|
-
// src/libraries/react/components/ui/dialog.tsx
|
|
24
|
-
import * as React17 from "react";
|
|
25
|
-
|
|
26
|
-
// ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1._xkx6efnpqhhb4lkirxfs4qofci/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
27
|
-
import * as React16 from "react";
|
|
28
|
-
|
|
29
|
-
// ../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
30
|
-
import * as React from "react";
|
|
31
|
-
var useReactId = React[" useId ".trim().toString()] || (() => void 0);
|
|
32
|
-
var count = 0;
|
|
33
|
-
function useId(deterministicId) {
|
|
34
|
-
const [id, setId] = React.useState(useReactId());
|
|
35
|
-
useLayoutEffect2(() => {
|
|
36
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
37
|
-
}, [deterministicId]);
|
|
38
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
39
|
-
}
|
|
40
12
|
|
|
41
13
|
// ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.6_@types+react@19.1.8__@types+_ya5augm4xgo65hmrlxfyu743vi/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
42
|
-
import * as
|
|
14
|
+
import * as React3 from "react";
|
|
43
15
|
|
|
44
16
|
// ../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
45
|
-
import * as
|
|
17
|
+
import * as React from "react";
|
|
46
18
|
function useCallbackRef(callback) {
|
|
47
|
-
const callbackRef =
|
|
48
|
-
|
|
19
|
+
const callbackRef = React.useRef(callback);
|
|
20
|
+
React.useEffect(() => {
|
|
49
21
|
callbackRef.current = callback;
|
|
50
22
|
});
|
|
51
|
-
return
|
|
23
|
+
return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
52
24
|
}
|
|
53
25
|
|
|
54
26
|
// ../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
55
|
-
import * as
|
|
27
|
+
import * as React2 from "react";
|
|
56
28
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
57
29
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
58
|
-
|
|
30
|
+
React2.useEffect(() => {
|
|
59
31
|
const handleKeyDown = (event) => {
|
|
60
32
|
if (event.key === "Escape") {
|
|
61
33
|
onEscapeKeyDown(event);
|
|
@@ -73,12 +45,12 @@ var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
|
73
45
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
74
46
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
75
47
|
var originalBodyPointerEvents;
|
|
76
|
-
var DismissableLayerContext =
|
|
48
|
+
var DismissableLayerContext = React3.createContext({
|
|
77
49
|
layers: /* @__PURE__ */ new Set(),
|
|
78
50
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
79
51
|
branches: /* @__PURE__ */ new Set()
|
|
80
52
|
});
|
|
81
|
-
var DismissableLayer =
|
|
53
|
+
var DismissableLayer = React3.forwardRef(
|
|
82
54
|
(props, forwardedRef) => {
|
|
83
55
|
const {
|
|
84
56
|
disableOutsidePointerEvents = false,
|
|
@@ -89,10 +61,10 @@ var DismissableLayer = React4.forwardRef(
|
|
|
89
61
|
onDismiss,
|
|
90
62
|
...layerProps
|
|
91
63
|
} = props;
|
|
92
|
-
const context =
|
|
93
|
-
const [node, setNode] =
|
|
64
|
+
const context = React3.useContext(DismissableLayerContext);
|
|
65
|
+
const [node, setNode] = React3.useState(null);
|
|
94
66
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
95
|
-
const [, force] =
|
|
67
|
+
const [, force] = React3.useState({});
|
|
96
68
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
97
69
|
const layers = Array.from(context.layers);
|
|
98
70
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -125,7 +97,7 @@ var DismissableLayer = React4.forwardRef(
|
|
|
125
97
|
onDismiss();
|
|
126
98
|
}
|
|
127
99
|
}, ownerDocument);
|
|
128
|
-
|
|
100
|
+
React3.useEffect(() => {
|
|
129
101
|
if (!node) return;
|
|
130
102
|
if (disableOutsidePointerEvents) {
|
|
131
103
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -142,7 +114,7 @@ var DismissableLayer = React4.forwardRef(
|
|
|
142
114
|
}
|
|
143
115
|
};
|
|
144
116
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
145
|
-
|
|
117
|
+
React3.useEffect(() => {
|
|
146
118
|
return () => {
|
|
147
119
|
if (!node) return;
|
|
148
120
|
context.layers.delete(node);
|
|
@@ -150,7 +122,7 @@ var DismissableLayer = React4.forwardRef(
|
|
|
150
122
|
dispatchUpdate();
|
|
151
123
|
};
|
|
152
124
|
}, [node, context]);
|
|
153
|
-
|
|
125
|
+
React3.useEffect(() => {
|
|
154
126
|
const handleUpdate = () => force({});
|
|
155
127
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
156
128
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
@@ -176,11 +148,11 @@ var DismissableLayer = React4.forwardRef(
|
|
|
176
148
|
);
|
|
177
149
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
178
150
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
179
|
-
var DismissableLayerBranch =
|
|
180
|
-
const context =
|
|
181
|
-
const ref =
|
|
151
|
+
var DismissableLayerBranch = React3.forwardRef((props, forwardedRef) => {
|
|
152
|
+
const context = React3.useContext(DismissableLayerContext);
|
|
153
|
+
const ref = React3.useRef(null);
|
|
182
154
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
183
|
-
|
|
155
|
+
React3.useEffect(() => {
|
|
184
156
|
const node = ref.current;
|
|
185
157
|
if (node) {
|
|
186
158
|
context.branches.add(node);
|
|
@@ -194,10 +166,10 @@ var DismissableLayerBranch = React4.forwardRef((props, forwardedRef) => {
|
|
|
194
166
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
195
167
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
196
168
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
197
|
-
const isPointerInsideReactTreeRef =
|
|
198
|
-
const handleClickRef =
|
|
169
|
+
const isPointerInsideReactTreeRef = React3.useRef(false);
|
|
170
|
+
const handleClickRef = React3.useRef(() => {
|
|
199
171
|
});
|
|
200
|
-
|
|
172
|
+
React3.useEffect(() => {
|
|
201
173
|
const handlePointerDown = (event) => {
|
|
202
174
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
203
175
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -238,8 +210,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
238
210
|
}
|
|
239
211
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
240
212
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
241
|
-
const isFocusInsideReactTreeRef =
|
|
242
|
-
|
|
213
|
+
const isFocusInsideReactTreeRef = React3.useRef(false);
|
|
214
|
+
React3.useEffect(() => {
|
|
243
215
|
const handleFocus = (event) => {
|
|
244
216
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
245
217
|
const eventDetail = { originalEvent: event };
|
|
@@ -272,13 +244,13 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
272
244
|
}
|
|
273
245
|
|
|
274
246
|
// ../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@1_7liqdxmess7vaws2bkjw22mwva/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
275
|
-
import * as
|
|
247
|
+
import * as React4 from "react";
|
|
276
248
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
277
249
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
278
250
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
279
251
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
280
252
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
281
|
-
var FocusScope =
|
|
253
|
+
var FocusScope = React4.forwardRef((props, forwardedRef) => {
|
|
282
254
|
const {
|
|
283
255
|
loop = false,
|
|
284
256
|
trapped = false,
|
|
@@ -286,12 +258,12 @@ var FocusScope = React5.forwardRef((props, forwardedRef) => {
|
|
|
286
258
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
287
259
|
...scopeProps
|
|
288
260
|
} = props;
|
|
289
|
-
const [container, setContainer] =
|
|
261
|
+
const [container, setContainer] = React4.useState(null);
|
|
290
262
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
291
263
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
292
|
-
const lastFocusedElementRef =
|
|
264
|
+
const lastFocusedElementRef = React4.useRef(null);
|
|
293
265
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
294
|
-
const focusScope =
|
|
266
|
+
const focusScope = React4.useRef({
|
|
295
267
|
paused: false,
|
|
296
268
|
pause() {
|
|
297
269
|
this.paused = true;
|
|
@@ -300,7 +272,7 @@ var FocusScope = React5.forwardRef((props, forwardedRef) => {
|
|
|
300
272
|
this.paused = false;
|
|
301
273
|
}
|
|
302
274
|
}).current;
|
|
303
|
-
|
|
275
|
+
React4.useEffect(() => {
|
|
304
276
|
if (trapped) {
|
|
305
277
|
let handleFocusIn2 = function(event) {
|
|
306
278
|
if (focusScope.paused || !container) return;
|
|
@@ -336,7 +308,7 @@ var FocusScope = React5.forwardRef((props, forwardedRef) => {
|
|
|
336
308
|
};
|
|
337
309
|
}
|
|
338
310
|
}, [trapped, container, focusScope.paused]);
|
|
339
|
-
|
|
311
|
+
React4.useEffect(() => {
|
|
340
312
|
if (container) {
|
|
341
313
|
focusScopesStack.add(focusScope);
|
|
342
314
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -367,7 +339,7 @@ var FocusScope = React5.forwardRef((props, forwardedRef) => {
|
|
|
367
339
|
};
|
|
368
340
|
}
|
|
369
341
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
370
|
-
const handleKeyDown =
|
|
342
|
+
const handleKeyDown = React4.useCallback(
|
|
371
343
|
(event) => {
|
|
372
344
|
if (!loop && !trapped) return;
|
|
373
345
|
if (focusScope.paused) return;
|
|
@@ -476,159 +448,33 @@ function removeLinks(items) {
|
|
|
476
448
|
}
|
|
477
449
|
|
|
478
450
|
// ../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1.8_5jmzxxd65wsdfod4yurl7mkae4/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
479
|
-
import * as
|
|
451
|
+
import * as React5 from "react";
|
|
480
452
|
import ReactDOM from "react-dom";
|
|
481
453
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
482
454
|
var PORTAL_NAME = "Portal";
|
|
483
|
-
var Portal =
|
|
455
|
+
var Portal = React5.forwardRef((props, forwardedRef) => {
|
|
484
456
|
const { container: containerProp, ...portalProps } = props;
|
|
485
|
-
const [mounted, setMounted] =
|
|
457
|
+
const [mounted, setMounted] = React5.useState(false);
|
|
486
458
|
useLayoutEffect2(() => setMounted(true), []);
|
|
487
459
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
488
460
|
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx3(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
489
461
|
});
|
|
490
462
|
Portal.displayName = PORTAL_NAME;
|
|
491
463
|
|
|
492
|
-
// ../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1_2lguv7jzxii6s3eigxktbpwkji/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
493
|
-
import * as React22 from "react";
|
|
494
|
-
import * as React7 from "react";
|
|
495
|
-
function useStateMachine(initialState, machine) {
|
|
496
|
-
return React7.useReducer((state, event) => {
|
|
497
|
-
const nextState = machine[state][event];
|
|
498
|
-
return nextState ?? state;
|
|
499
|
-
}, initialState);
|
|
500
|
-
}
|
|
501
|
-
var Presence = (props) => {
|
|
502
|
-
const { present, children } = props;
|
|
503
|
-
const presence = usePresence(present);
|
|
504
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React22.Children.only(children);
|
|
505
|
-
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
|
506
|
-
const forceMount = typeof children === "function";
|
|
507
|
-
return forceMount || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
|
|
508
|
-
};
|
|
509
|
-
Presence.displayName = "Presence";
|
|
510
|
-
function usePresence(present) {
|
|
511
|
-
const [node, setNode] = React22.useState();
|
|
512
|
-
const stylesRef = React22.useRef(null);
|
|
513
|
-
const prevPresentRef = React22.useRef(present);
|
|
514
|
-
const prevAnimationNameRef = React22.useRef("none");
|
|
515
|
-
const initialState = present ? "mounted" : "unmounted";
|
|
516
|
-
const [state, send] = useStateMachine(initialState, {
|
|
517
|
-
mounted: {
|
|
518
|
-
UNMOUNT: "unmounted",
|
|
519
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
520
|
-
},
|
|
521
|
-
unmountSuspended: {
|
|
522
|
-
MOUNT: "mounted",
|
|
523
|
-
ANIMATION_END: "unmounted"
|
|
524
|
-
},
|
|
525
|
-
unmounted: {
|
|
526
|
-
MOUNT: "mounted"
|
|
527
|
-
}
|
|
528
|
-
});
|
|
529
|
-
React22.useEffect(() => {
|
|
530
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
531
|
-
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
532
|
-
}, [state]);
|
|
533
|
-
useLayoutEffect2(() => {
|
|
534
|
-
const styles = stylesRef.current;
|
|
535
|
-
const wasPresent = prevPresentRef.current;
|
|
536
|
-
const hasPresentChanged = wasPresent !== present;
|
|
537
|
-
if (hasPresentChanged) {
|
|
538
|
-
const prevAnimationName = prevAnimationNameRef.current;
|
|
539
|
-
const currentAnimationName = getAnimationName(styles);
|
|
540
|
-
if (present) {
|
|
541
|
-
send("MOUNT");
|
|
542
|
-
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
543
|
-
send("UNMOUNT");
|
|
544
|
-
} else {
|
|
545
|
-
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
546
|
-
if (wasPresent && isAnimating) {
|
|
547
|
-
send("ANIMATION_OUT");
|
|
548
|
-
} else {
|
|
549
|
-
send("UNMOUNT");
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
prevPresentRef.current = present;
|
|
553
|
-
}
|
|
554
|
-
}, [present, send]);
|
|
555
|
-
useLayoutEffect2(() => {
|
|
556
|
-
if (node) {
|
|
557
|
-
let timeoutId;
|
|
558
|
-
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
559
|
-
const handleAnimationEnd = (event) => {
|
|
560
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
561
|
-
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
562
|
-
if (event.target === node && isCurrentAnimation) {
|
|
563
|
-
send("ANIMATION_END");
|
|
564
|
-
if (!prevPresentRef.current) {
|
|
565
|
-
const currentFillMode = node.style.animationFillMode;
|
|
566
|
-
node.style.animationFillMode = "forwards";
|
|
567
|
-
timeoutId = ownerWindow.setTimeout(() => {
|
|
568
|
-
if (node.style.animationFillMode === "forwards") {
|
|
569
|
-
node.style.animationFillMode = currentFillMode;
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
|
-
const handleAnimationStart = (event) => {
|
|
576
|
-
if (event.target === node) {
|
|
577
|
-
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
578
|
-
}
|
|
579
|
-
};
|
|
580
|
-
node.addEventListener("animationstart", handleAnimationStart);
|
|
581
|
-
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
582
|
-
node.addEventListener("animationend", handleAnimationEnd);
|
|
583
|
-
return () => {
|
|
584
|
-
ownerWindow.clearTimeout(timeoutId);
|
|
585
|
-
node.removeEventListener("animationstart", handleAnimationStart);
|
|
586
|
-
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
587
|
-
node.removeEventListener("animationend", handleAnimationEnd);
|
|
588
|
-
};
|
|
589
|
-
} else {
|
|
590
|
-
send("ANIMATION_END");
|
|
591
|
-
}
|
|
592
|
-
}, [node, send]);
|
|
593
|
-
return {
|
|
594
|
-
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
595
|
-
ref: React22.useCallback((node2) => {
|
|
596
|
-
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
597
|
-
setNode(node2);
|
|
598
|
-
}, [])
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
function getAnimationName(styles) {
|
|
602
|
-
return styles?.animationName || "none";
|
|
603
|
-
}
|
|
604
|
-
function getElementRef(element) {
|
|
605
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
606
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
607
|
-
if (mayWarn) {
|
|
608
|
-
return element.ref;
|
|
609
|
-
}
|
|
610
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
611
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
612
|
-
if (mayWarn) {
|
|
613
|
-
return element.props.ref;
|
|
614
|
-
}
|
|
615
|
-
return element.props.ref || element.ref;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
464
|
// ../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
619
|
-
import * as
|
|
620
|
-
var
|
|
465
|
+
import * as React6 from "react";
|
|
466
|
+
var count = 0;
|
|
621
467
|
function useFocusGuards() {
|
|
622
|
-
|
|
468
|
+
React6.useEffect(() => {
|
|
623
469
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
624
470
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
625
471
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
626
|
-
|
|
472
|
+
count++;
|
|
627
473
|
return () => {
|
|
628
|
-
if (
|
|
474
|
+
if (count === 1) {
|
|
629
475
|
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
630
476
|
}
|
|
631
|
-
|
|
477
|
+
count--;
|
|
632
478
|
};
|
|
633
479
|
}, []);
|
|
634
480
|
}
|
|
@@ -676,10 +522,10 @@ function __spreadArray(to, from, pack) {
|
|
|
676
522
|
}
|
|
677
523
|
|
|
678
524
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
679
|
-
import * as
|
|
525
|
+
import * as React13 from "react";
|
|
680
526
|
|
|
681
527
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
682
|
-
import * as
|
|
528
|
+
import * as React9 from "react";
|
|
683
529
|
|
|
684
530
|
// ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
685
531
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
@@ -698,9 +544,9 @@ function assignRef(ref, value) {
|
|
|
698
544
|
}
|
|
699
545
|
|
|
700
546
|
// ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.8_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
701
|
-
import { useState as
|
|
547
|
+
import { useState as useState4 } from "react";
|
|
702
548
|
function useCallbackRef2(initialValue, callback) {
|
|
703
|
-
var ref =
|
|
549
|
+
var ref = useState4(function() {
|
|
704
550
|
return {
|
|
705
551
|
// value
|
|
706
552
|
value: initialValue,
|
|
@@ -726,8 +572,8 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
726
572
|
}
|
|
727
573
|
|
|
728
574
|
// ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.8_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
729
|
-
import * as
|
|
730
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
575
|
+
import * as React7 from "react";
|
|
576
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React7.useLayoutEffect : React7.useEffect;
|
|
731
577
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
732
578
|
function useMergeRefs(refs, defaultValue) {
|
|
733
579
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -844,7 +690,7 @@ function createSidecarMedium(options) {
|
|
|
844
690
|
}
|
|
845
691
|
|
|
846
692
|
// ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.8_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js
|
|
847
|
-
import * as
|
|
693
|
+
import * as React8 from "react";
|
|
848
694
|
var SideCar = function(_a) {
|
|
849
695
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
850
696
|
if (!sideCar) {
|
|
@@ -854,7 +700,7 @@ var SideCar = function(_a) {
|
|
|
854
700
|
if (!Target) {
|
|
855
701
|
throw new Error("Sidecar medium not found");
|
|
856
702
|
}
|
|
857
|
-
return
|
|
703
|
+
return React8.createElement(Target, __assign({}, rest));
|
|
858
704
|
};
|
|
859
705
|
SideCar.isSideCarExport = true;
|
|
860
706
|
function exportSidecar(medium, exported) {
|
|
@@ -869,9 +715,9 @@ var effectCar = createSidecarMedium();
|
|
|
869
715
|
var nothing = function() {
|
|
870
716
|
return;
|
|
871
717
|
};
|
|
872
|
-
var RemoveScroll =
|
|
873
|
-
var ref =
|
|
874
|
-
var _a =
|
|
718
|
+
var RemoveScroll = React9.forwardRef(function(props, parentRef) {
|
|
719
|
+
var ref = React9.useRef(null);
|
|
720
|
+
var _a = React9.useState({
|
|
875
721
|
onScrollCapture: nothing,
|
|
876
722
|
onWheelCapture: nothing,
|
|
877
723
|
onTouchMoveCapture: nothing
|
|
@@ -880,11 +726,11 @@ var RemoveScroll = React11.forwardRef(function(props, parentRef) {
|
|
|
880
726
|
var SideCar2 = sideCar;
|
|
881
727
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
882
728
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
883
|
-
return
|
|
884
|
-
|
|
729
|
+
return React9.createElement(
|
|
730
|
+
React9.Fragment,
|
|
885
731
|
null,
|
|
886
|
-
enabled &&
|
|
887
|
-
forwardProps ?
|
|
732
|
+
enabled && React9.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
733
|
+
forwardProps ? React9.cloneElement(React9.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React9.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
888
734
|
);
|
|
889
735
|
});
|
|
890
736
|
RemoveScroll.defaultProps = {
|
|
@@ -898,13 +744,13 @@ RemoveScroll.classNames = {
|
|
|
898
744
|
};
|
|
899
745
|
|
|
900
746
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
901
|
-
import * as
|
|
747
|
+
import * as React12 from "react";
|
|
902
748
|
|
|
903
749
|
// ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
904
|
-
import * as
|
|
750
|
+
import * as React11 from "react";
|
|
905
751
|
|
|
906
752
|
// ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.8_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
907
|
-
import * as
|
|
753
|
+
import * as React10 from "react";
|
|
908
754
|
|
|
909
755
|
// ../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
910
756
|
var currentNonce;
|
|
@@ -968,7 +814,7 @@ var stylesheetSingleton = function() {
|
|
|
968
814
|
var styleHookSingleton = function() {
|
|
969
815
|
var sheet = stylesheetSingleton();
|
|
970
816
|
return function(styles, isDynamic) {
|
|
971
|
-
|
|
817
|
+
React10.useEffect(function() {
|
|
972
818
|
sheet.add(styles);
|
|
973
819
|
return function() {
|
|
974
820
|
sheet.remove();
|
|
@@ -1042,7 +888,7 @@ var getCurrentUseCounter = function() {
|
|
|
1042
888
|
return isFinite(counter) ? counter : 0;
|
|
1043
889
|
};
|
|
1044
890
|
var useLockAttribute = function() {
|
|
1045
|
-
|
|
891
|
+
React11.useEffect(function() {
|
|
1046
892
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
1047
893
|
return function() {
|
|
1048
894
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -1057,10 +903,10 @@ var useLockAttribute = function() {
|
|
|
1057
903
|
var RemoveScrollBar = function(_a) {
|
|
1058
904
|
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
1059
905
|
useLockAttribute();
|
|
1060
|
-
var gap =
|
|
906
|
+
var gap = React11.useMemo(function() {
|
|
1061
907
|
return getGapWidth(gapMode);
|
|
1062
908
|
}, [gapMode]);
|
|
1063
|
-
return
|
|
909
|
+
return React11.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
1064
910
|
};
|
|
1065
911
|
|
|
1066
912
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -1201,16 +1047,16 @@ var generateStyle = function(id) {
|
|
|
1201
1047
|
var idCounter = 0;
|
|
1202
1048
|
var lockStack = [];
|
|
1203
1049
|
function RemoveScrollSideCar(props) {
|
|
1204
|
-
var shouldPreventQueue =
|
|
1205
|
-
var touchStartRef =
|
|
1206
|
-
var activeAxis =
|
|
1207
|
-
var id =
|
|
1208
|
-
var Style2 =
|
|
1209
|
-
var lastProps =
|
|
1210
|
-
|
|
1050
|
+
var shouldPreventQueue = React12.useRef([]);
|
|
1051
|
+
var touchStartRef = React12.useRef([0, 0]);
|
|
1052
|
+
var activeAxis = React12.useRef();
|
|
1053
|
+
var id = React12.useState(idCounter++)[0];
|
|
1054
|
+
var Style2 = React12.useState(styleSingleton)[0];
|
|
1055
|
+
var lastProps = React12.useRef(props);
|
|
1056
|
+
React12.useEffect(function() {
|
|
1211
1057
|
lastProps.current = props;
|
|
1212
1058
|
}, [props]);
|
|
1213
|
-
|
|
1059
|
+
React12.useEffect(function() {
|
|
1214
1060
|
if (props.inert) {
|
|
1215
1061
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
1216
1062
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -1226,7 +1072,7 @@ function RemoveScrollSideCar(props) {
|
|
|
1226
1072
|
}
|
|
1227
1073
|
return;
|
|
1228
1074
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
1229
|
-
var shouldCancelEvent =
|
|
1075
|
+
var shouldCancelEvent = React12.useCallback(function(event, parent) {
|
|
1230
1076
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
1231
1077
|
return !lastProps.current.allowPinchZoom;
|
|
1232
1078
|
}
|
|
@@ -1262,7 +1108,7 @@ function RemoveScrollSideCar(props) {
|
|
|
1262
1108
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
1263
1109
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
1264
1110
|
}, []);
|
|
1265
|
-
var shouldPrevent =
|
|
1111
|
+
var shouldPrevent = React12.useCallback(function(_event) {
|
|
1266
1112
|
var event = _event;
|
|
1267
1113
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
1268
1114
|
return;
|
|
@@ -1289,7 +1135,7 @@ function RemoveScrollSideCar(props) {
|
|
|
1289
1135
|
}
|
|
1290
1136
|
}
|
|
1291
1137
|
}, []);
|
|
1292
|
-
var shouldCancel =
|
|
1138
|
+
var shouldCancel = React12.useCallback(function(name, delta, target, should) {
|
|
1293
1139
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
1294
1140
|
shouldPreventQueue.current.push(event);
|
|
1295
1141
|
setTimeout(function() {
|
|
@@ -1298,17 +1144,17 @@ function RemoveScrollSideCar(props) {
|
|
|
1298
1144
|
});
|
|
1299
1145
|
}, 1);
|
|
1300
1146
|
}, []);
|
|
1301
|
-
var scrollTouchStart =
|
|
1147
|
+
var scrollTouchStart = React12.useCallback(function(event) {
|
|
1302
1148
|
touchStartRef.current = getTouchXY(event);
|
|
1303
1149
|
activeAxis.current = void 0;
|
|
1304
1150
|
}, []);
|
|
1305
|
-
var scrollWheel =
|
|
1151
|
+
var scrollWheel = React12.useCallback(function(event) {
|
|
1306
1152
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1307
1153
|
}, []);
|
|
1308
|
-
var scrollTouchMove =
|
|
1154
|
+
var scrollTouchMove = React12.useCallback(function(event) {
|
|
1309
1155
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1310
1156
|
}, []);
|
|
1311
|
-
|
|
1157
|
+
React12.useEffect(function() {
|
|
1312
1158
|
lockStack.push(Style2);
|
|
1313
1159
|
props.setCallbacks({
|
|
1314
1160
|
onScrollCapture: scrollWheel,
|
|
@@ -1328,11 +1174,11 @@ function RemoveScrollSideCar(props) {
|
|
|
1328
1174
|
};
|
|
1329
1175
|
}, []);
|
|
1330
1176
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
1331
|
-
return
|
|
1332
|
-
|
|
1177
|
+
return React12.createElement(
|
|
1178
|
+
React12.Fragment,
|
|
1333
1179
|
null,
|
|
1334
|
-
inert ?
|
|
1335
|
-
removeScrollBar ?
|
|
1180
|
+
inert ? React12.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
1181
|
+
removeScrollBar ? React12.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
1336
1182
|
);
|
|
1337
1183
|
}
|
|
1338
1184
|
function getOutermostShadowParent(node) {
|
|
@@ -1351,8 +1197,8 @@ function getOutermostShadowParent(node) {
|
|
|
1351
1197
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
1352
1198
|
|
|
1353
1199
|
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
1354
|
-
var ReactRemoveScroll =
|
|
1355
|
-
return
|
|
1200
|
+
var ReactRemoveScroll = React13.forwardRef(function(props, ref) {
|
|
1201
|
+
return React13.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
1356
1202
|
});
|
|
1357
1203
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
1358
1204
|
var Combination_default = ReactRemoveScroll;
|
|
@@ -1478,415 +1324,12 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
1478
1324
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
1479
1325
|
};
|
|
1480
1326
|
|
|
1481
|
-
// ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1._xkx6efnpqhhb4lkirxfs4qofci/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
1482
|
-
import { Fragment as Fragment3, jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
1483
|
-
var DIALOG_NAME = "Dialog";
|
|
1484
|
-
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
1485
|
-
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
1486
|
-
var Dialog = (props) => {
|
|
1487
|
-
const {
|
|
1488
|
-
__scopeDialog,
|
|
1489
|
-
children,
|
|
1490
|
-
open: openProp,
|
|
1491
|
-
defaultOpen,
|
|
1492
|
-
onOpenChange,
|
|
1493
|
-
modal = true
|
|
1494
|
-
} = props;
|
|
1495
|
-
const triggerRef = React16.useRef(null);
|
|
1496
|
-
const contentRef = React16.useRef(null);
|
|
1497
|
-
const [open, setOpen] = useControllableState({
|
|
1498
|
-
prop: openProp,
|
|
1499
|
-
defaultProp: defaultOpen ?? false,
|
|
1500
|
-
onChange: onOpenChange,
|
|
1501
|
-
caller: DIALOG_NAME
|
|
1502
|
-
});
|
|
1503
|
-
return /* @__PURE__ */ jsx4(
|
|
1504
|
-
DialogProvider,
|
|
1505
|
-
{
|
|
1506
|
-
scope: __scopeDialog,
|
|
1507
|
-
triggerRef,
|
|
1508
|
-
contentRef,
|
|
1509
|
-
contentId: useId(),
|
|
1510
|
-
titleId: useId(),
|
|
1511
|
-
descriptionId: useId(),
|
|
1512
|
-
open,
|
|
1513
|
-
onOpenChange: setOpen,
|
|
1514
|
-
onOpenToggle: React16.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
1515
|
-
modal,
|
|
1516
|
-
children
|
|
1517
|
-
}
|
|
1518
|
-
);
|
|
1519
|
-
};
|
|
1520
|
-
Dialog.displayName = DIALOG_NAME;
|
|
1521
|
-
var TRIGGER_NAME = "DialogTrigger";
|
|
1522
|
-
var DialogTrigger = React16.forwardRef(
|
|
1523
|
-
(props, forwardedRef) => {
|
|
1524
|
-
const { __scopeDialog, ...triggerProps } = props;
|
|
1525
|
-
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
1526
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
1527
|
-
return /* @__PURE__ */ jsx4(
|
|
1528
|
-
Primitive.button,
|
|
1529
|
-
{
|
|
1530
|
-
type: "button",
|
|
1531
|
-
"aria-haspopup": "dialog",
|
|
1532
|
-
"aria-expanded": context.open,
|
|
1533
|
-
"aria-controls": context.contentId,
|
|
1534
|
-
"data-state": getState(context.open),
|
|
1535
|
-
...triggerProps,
|
|
1536
|
-
ref: composedTriggerRef,
|
|
1537
|
-
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
1538
|
-
}
|
|
1539
|
-
);
|
|
1540
|
-
}
|
|
1541
|
-
);
|
|
1542
|
-
DialogTrigger.displayName = TRIGGER_NAME;
|
|
1543
|
-
var PORTAL_NAME2 = "DialogPortal";
|
|
1544
|
-
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
1545
|
-
forceMount: void 0
|
|
1546
|
-
});
|
|
1547
|
-
var DialogPortal = (props) => {
|
|
1548
|
-
const { __scopeDialog, forceMount, children, container } = props;
|
|
1549
|
-
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
1550
|
-
return /* @__PURE__ */ jsx4(PortalProvider, { scope: __scopeDialog, forceMount, children: React16.Children.map(children, (child) => /* @__PURE__ */ jsx4(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx4(Portal, { asChild: true, container, children: child }) })) });
|
|
1551
|
-
};
|
|
1552
|
-
DialogPortal.displayName = PORTAL_NAME2;
|
|
1553
|
-
var OVERLAY_NAME = "DialogOverlay";
|
|
1554
|
-
var DialogOverlay = React16.forwardRef(
|
|
1555
|
-
(props, forwardedRef) => {
|
|
1556
|
-
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
1557
|
-
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
1558
|
-
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
1559
|
-
return context.modal ? /* @__PURE__ */ jsx4(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx4(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
1560
|
-
}
|
|
1561
|
-
);
|
|
1562
|
-
DialogOverlay.displayName = OVERLAY_NAME;
|
|
1563
|
-
var Slot = createSlot("DialogOverlay.RemoveScroll");
|
|
1564
|
-
var DialogOverlayImpl = React16.forwardRef(
|
|
1565
|
-
(props, forwardedRef) => {
|
|
1566
|
-
const { __scopeDialog, ...overlayProps } = props;
|
|
1567
|
-
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
1568
|
-
return (
|
|
1569
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1570
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
1571
|
-
/* @__PURE__ */ jsx4(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx4(
|
|
1572
|
-
Primitive.div,
|
|
1573
|
-
{
|
|
1574
|
-
"data-state": getState(context.open),
|
|
1575
|
-
...overlayProps,
|
|
1576
|
-
ref: forwardedRef,
|
|
1577
|
-
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
1578
|
-
}
|
|
1579
|
-
) })
|
|
1580
|
-
);
|
|
1581
|
-
}
|
|
1582
|
-
);
|
|
1583
|
-
var CONTENT_NAME = "DialogContent";
|
|
1584
|
-
var DialogContent = React16.forwardRef(
|
|
1585
|
-
(props, forwardedRef) => {
|
|
1586
|
-
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
1587
|
-
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
1588
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
1589
|
-
return /* @__PURE__ */ jsx4(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx4(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx4(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
1590
|
-
}
|
|
1591
|
-
);
|
|
1592
|
-
DialogContent.displayName = CONTENT_NAME;
|
|
1593
|
-
var DialogContentModal = React16.forwardRef(
|
|
1594
|
-
(props, forwardedRef) => {
|
|
1595
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
1596
|
-
const contentRef = React16.useRef(null);
|
|
1597
|
-
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
1598
|
-
React16.useEffect(() => {
|
|
1599
|
-
const content = contentRef.current;
|
|
1600
|
-
if (content) return hideOthers(content);
|
|
1601
|
-
}, []);
|
|
1602
|
-
return /* @__PURE__ */ jsx4(
|
|
1603
|
-
DialogContentImpl,
|
|
1604
|
-
{
|
|
1605
|
-
...props,
|
|
1606
|
-
ref: composedRefs,
|
|
1607
|
-
trapFocus: context.open,
|
|
1608
|
-
disableOutsidePointerEvents: true,
|
|
1609
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
1610
|
-
event.preventDefault();
|
|
1611
|
-
context.triggerRef.current?.focus();
|
|
1612
|
-
}),
|
|
1613
|
-
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
1614
|
-
const originalEvent = event.detail.originalEvent;
|
|
1615
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
1616
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
1617
|
-
if (isRightClick) event.preventDefault();
|
|
1618
|
-
}),
|
|
1619
|
-
onFocusOutside: composeEventHandlers(
|
|
1620
|
-
props.onFocusOutside,
|
|
1621
|
-
(event) => event.preventDefault()
|
|
1622
|
-
)
|
|
1623
|
-
}
|
|
1624
|
-
);
|
|
1625
|
-
}
|
|
1626
|
-
);
|
|
1627
|
-
var DialogContentNonModal = React16.forwardRef(
|
|
1628
|
-
(props, forwardedRef) => {
|
|
1629
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
1630
|
-
const hasInteractedOutsideRef = React16.useRef(false);
|
|
1631
|
-
const hasPointerDownOutsideRef = React16.useRef(false);
|
|
1632
|
-
return /* @__PURE__ */ jsx4(
|
|
1633
|
-
DialogContentImpl,
|
|
1634
|
-
{
|
|
1635
|
-
...props,
|
|
1636
|
-
ref: forwardedRef,
|
|
1637
|
-
trapFocus: false,
|
|
1638
|
-
disableOutsidePointerEvents: false,
|
|
1639
|
-
onCloseAutoFocus: (event) => {
|
|
1640
|
-
props.onCloseAutoFocus?.(event);
|
|
1641
|
-
if (!event.defaultPrevented) {
|
|
1642
|
-
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
1643
|
-
event.preventDefault();
|
|
1644
|
-
}
|
|
1645
|
-
hasInteractedOutsideRef.current = false;
|
|
1646
|
-
hasPointerDownOutsideRef.current = false;
|
|
1647
|
-
},
|
|
1648
|
-
onInteractOutside: (event) => {
|
|
1649
|
-
props.onInteractOutside?.(event);
|
|
1650
|
-
if (!event.defaultPrevented) {
|
|
1651
|
-
hasInteractedOutsideRef.current = true;
|
|
1652
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
1653
|
-
hasPointerDownOutsideRef.current = true;
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
const target = event.target;
|
|
1657
|
-
const targetIsTrigger = context.triggerRef.current?.contains(target);
|
|
1658
|
-
if (targetIsTrigger) event.preventDefault();
|
|
1659
|
-
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
1660
|
-
event.preventDefault();
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
);
|
|
1665
|
-
}
|
|
1666
|
-
);
|
|
1667
|
-
var DialogContentImpl = React16.forwardRef(
|
|
1668
|
-
(props, forwardedRef) => {
|
|
1669
|
-
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
|
1670
|
-
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
1671
|
-
const contentRef = React16.useRef(null);
|
|
1672
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
1673
|
-
useFocusGuards();
|
|
1674
|
-
return /* @__PURE__ */ jsxs(Fragment3, { children: [
|
|
1675
|
-
/* @__PURE__ */ jsx4(
|
|
1676
|
-
FocusScope,
|
|
1677
|
-
{
|
|
1678
|
-
asChild: true,
|
|
1679
|
-
loop: true,
|
|
1680
|
-
trapped: trapFocus,
|
|
1681
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
1682
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
1683
|
-
children: /* @__PURE__ */ jsx4(
|
|
1684
|
-
DismissableLayer,
|
|
1685
|
-
{
|
|
1686
|
-
role: "dialog",
|
|
1687
|
-
id: context.contentId,
|
|
1688
|
-
"aria-describedby": context.descriptionId,
|
|
1689
|
-
"aria-labelledby": context.titleId,
|
|
1690
|
-
"data-state": getState(context.open),
|
|
1691
|
-
...contentProps,
|
|
1692
|
-
ref: composedRefs,
|
|
1693
|
-
onDismiss: () => context.onOpenChange(false)
|
|
1694
|
-
}
|
|
1695
|
-
)
|
|
1696
|
-
}
|
|
1697
|
-
),
|
|
1698
|
-
/* @__PURE__ */ jsxs(Fragment3, { children: [
|
|
1699
|
-
/* @__PURE__ */ jsx4(TitleWarning, { titleId: context.titleId }),
|
|
1700
|
-
/* @__PURE__ */ jsx4(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
1701
|
-
] })
|
|
1702
|
-
] });
|
|
1703
|
-
}
|
|
1704
|
-
);
|
|
1705
|
-
var TITLE_NAME = "DialogTitle";
|
|
1706
|
-
var DialogTitle = React16.forwardRef(
|
|
1707
|
-
(props, forwardedRef) => {
|
|
1708
|
-
const { __scopeDialog, ...titleProps } = props;
|
|
1709
|
-
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
1710
|
-
return /* @__PURE__ */ jsx4(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
1711
|
-
}
|
|
1712
|
-
);
|
|
1713
|
-
DialogTitle.displayName = TITLE_NAME;
|
|
1714
|
-
var DESCRIPTION_NAME = "DialogDescription";
|
|
1715
|
-
var DialogDescription = React16.forwardRef(
|
|
1716
|
-
(props, forwardedRef) => {
|
|
1717
|
-
const { __scopeDialog, ...descriptionProps } = props;
|
|
1718
|
-
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
1719
|
-
return /* @__PURE__ */ jsx4(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
1720
|
-
}
|
|
1721
|
-
);
|
|
1722
|
-
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
1723
|
-
var CLOSE_NAME = "DialogClose";
|
|
1724
|
-
var DialogClose = React16.forwardRef(
|
|
1725
|
-
(props, forwardedRef) => {
|
|
1726
|
-
const { __scopeDialog, ...closeProps } = props;
|
|
1727
|
-
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
1728
|
-
return /* @__PURE__ */ jsx4(
|
|
1729
|
-
Primitive.button,
|
|
1730
|
-
{
|
|
1731
|
-
type: "button",
|
|
1732
|
-
...closeProps,
|
|
1733
|
-
ref: forwardedRef,
|
|
1734
|
-
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
1735
|
-
}
|
|
1736
|
-
);
|
|
1737
|
-
}
|
|
1738
|
-
);
|
|
1739
|
-
DialogClose.displayName = CLOSE_NAME;
|
|
1740
|
-
function getState(open) {
|
|
1741
|
-
return open ? "open" : "closed";
|
|
1742
|
-
}
|
|
1743
|
-
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
1744
|
-
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
1745
|
-
contentName: CONTENT_NAME,
|
|
1746
|
-
titleName: TITLE_NAME,
|
|
1747
|
-
docsSlug: "dialog"
|
|
1748
|
-
});
|
|
1749
|
-
var TitleWarning = ({ titleId }) => {
|
|
1750
|
-
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
1751
|
-
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
1752
|
-
|
|
1753
|
-
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1754
|
-
|
|
1755
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
1756
|
-
React16.useEffect(() => {
|
|
1757
|
-
if (titleId) {
|
|
1758
|
-
const hasTitle = document.getElementById(titleId);
|
|
1759
|
-
if (!hasTitle) console.error(MESSAGE);
|
|
1760
|
-
}
|
|
1761
|
-
}, [MESSAGE, titleId]);
|
|
1762
|
-
return null;
|
|
1763
|
-
};
|
|
1764
|
-
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
1765
|
-
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
1766
|
-
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
1767
|
-
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
1768
|
-
React16.useEffect(() => {
|
|
1769
|
-
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
|
1770
|
-
if (descriptionId && describedById) {
|
|
1771
|
-
const hasDescription = document.getElementById(descriptionId);
|
|
1772
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
1773
|
-
}
|
|
1774
|
-
}, [MESSAGE, contentRef, descriptionId]);
|
|
1775
|
-
return null;
|
|
1776
|
-
};
|
|
1777
|
-
var Root = Dialog;
|
|
1778
|
-
var Trigger = DialogTrigger;
|
|
1779
|
-
var Portal2 = DialogPortal;
|
|
1780
|
-
var Overlay = DialogOverlay;
|
|
1781
|
-
var Content = DialogContent;
|
|
1782
|
-
var Title = DialogTitle;
|
|
1783
|
-
var Description = DialogDescription;
|
|
1784
|
-
var Close = DialogClose;
|
|
1785
|
-
|
|
1786
|
-
// src/libraries/react/components/ui/dialog.tsx
|
|
1787
|
-
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1788
|
-
var Dialog2 = Root;
|
|
1789
|
-
var DialogTrigger2 = Trigger;
|
|
1790
|
-
var DialogPortal2 = ({
|
|
1791
|
-
children,
|
|
1792
|
-
...props
|
|
1793
|
-
}) => {
|
|
1794
|
-
return /* @__PURE__ */ jsx5(Portal2, { ...props, children: /* @__PURE__ */ jsx5("div", { className: "au-root", children }) });
|
|
1795
|
-
};
|
|
1796
|
-
var DialogClose2 = Close;
|
|
1797
|
-
var DialogOverlay2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
1798
|
-
Overlay,
|
|
1799
|
-
{
|
|
1800
|
-
ref,
|
|
1801
|
-
className: cn(
|
|
1802
|
-
"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",
|
|
1803
|
-
className
|
|
1804
|
-
),
|
|
1805
|
-
...props
|
|
1806
|
-
}
|
|
1807
|
-
));
|
|
1808
|
-
DialogOverlay2.displayName = Overlay.displayName;
|
|
1809
|
-
var DialogContent2 = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs2(DialogPortal2, { children: [
|
|
1810
|
-
/* @__PURE__ */ jsx5(DialogOverlay2, {}),
|
|
1811
|
-
/* @__PURE__ */ jsxs2(
|
|
1812
|
-
Content,
|
|
1813
|
-
{
|
|
1814
|
-
ref,
|
|
1815
|
-
className: cn(
|
|
1816
|
-
`au-fixed au-left-[50%] au-top-[50%] au-z-50 au-grid au-w-full au-max-w-lg au-translate-x-[-50%] au-translate-y-[-50%] au-gap-4 au-border au-bg-background au-p-6 au-shadow-lg au-duration-200 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 data-[state=closed]:au-zoom-out-95 data-[state=open]:au-zoom-in-95 data-[state=closed]:au-slide-out-to-left-1/2 data-[state=closed]:au-slide-out-to-top-[48%] data-[state=open]:au-slide-in-from-left-1/2 data-[state=open]:au-slide-in-from-top-[48%] sm:au-rounded-lg`,
|
|
1817
|
-
className
|
|
1818
|
-
),
|
|
1819
|
-
...props,
|
|
1820
|
-
children: [
|
|
1821
|
-
children,
|
|
1822
|
-
/* @__PURE__ */ jsxs2(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: [
|
|
1823
|
-
/* @__PURE__ */ jsx5(X, { className: "au-h-4 au-w-4" }),
|
|
1824
|
-
/* @__PURE__ */ jsx5("span", { className: "au-sr-only", children: "Close" })
|
|
1825
|
-
] })
|
|
1826
|
-
]
|
|
1827
|
-
}
|
|
1828
|
-
)
|
|
1829
|
-
] }));
|
|
1830
|
-
DialogContent2.displayName = Content.displayName;
|
|
1831
|
-
var DialogHeader = ({
|
|
1832
|
-
className,
|
|
1833
|
-
...props
|
|
1834
|
-
}) => /* @__PURE__ */ jsx5(
|
|
1835
|
-
"div",
|
|
1836
|
-
{
|
|
1837
|
-
className: cn(
|
|
1838
|
-
"au-flex au-flex-col au-space-y-1.5 au-text-center sm:au-text-left",
|
|
1839
|
-
className
|
|
1840
|
-
),
|
|
1841
|
-
...props
|
|
1842
|
-
}
|
|
1843
|
-
);
|
|
1844
|
-
DialogHeader.displayName = "DialogHeader";
|
|
1845
|
-
var DialogFooter = ({
|
|
1846
|
-
className,
|
|
1847
|
-
...props
|
|
1848
|
-
}) => /* @__PURE__ */ jsx5(
|
|
1849
|
-
"div",
|
|
1850
|
-
{
|
|
1851
|
-
className: cn(
|
|
1852
|
-
"au-flex au-flex-col-reverse sm:au-flex-row sm:au-justify-end sm:au-space-x-2",
|
|
1853
|
-
className
|
|
1854
|
-
),
|
|
1855
|
-
...props
|
|
1856
|
-
}
|
|
1857
|
-
);
|
|
1858
|
-
DialogFooter.displayName = "DialogFooter";
|
|
1859
|
-
var DialogTitle2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
1860
|
-
Title,
|
|
1861
|
-
{
|
|
1862
|
-
ref,
|
|
1863
|
-
className: cn(
|
|
1864
|
-
"au-text-lg au-font-semibold au-leading-none au-tracking-tight",
|
|
1865
|
-
className
|
|
1866
|
-
),
|
|
1867
|
-
...props
|
|
1868
|
-
}
|
|
1869
|
-
));
|
|
1870
|
-
DialogTitle2.displayName = Title.displayName;
|
|
1871
|
-
var DialogDescription2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
1872
|
-
Description,
|
|
1873
|
-
{
|
|
1874
|
-
ref,
|
|
1875
|
-
className: cn("au-text-sm au-text-muted-foreground", className),
|
|
1876
|
-
...props
|
|
1877
|
-
}
|
|
1878
|
-
));
|
|
1879
|
-
DialogDescription2.displayName = Description.displayName;
|
|
1880
|
-
|
|
1881
1327
|
export {
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
DialogFooter,
|
|
1890
|
-
DialogTitle2 as DialogTitle,
|
|
1891
|
-
DialogDescription2 as DialogDescription
|
|
1328
|
+
useCallbackRef,
|
|
1329
|
+
DismissableLayer,
|
|
1330
|
+
FocusScope,
|
|
1331
|
+
Portal,
|
|
1332
|
+
useFocusGuards,
|
|
1333
|
+
Combination_default,
|
|
1334
|
+
hideOthers
|
|
1892
1335
|
};
|