@backbay/glia 0.2.0-alpha.6 → 0.2.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audio/index.js +1145 -5
- package/dist/audio/index.js.map +1 -1
- package/dist/components/index.js +3187 -10
- package/dist/components/index.js.map +1 -1
- package/dist/core.js +19714 -12
- package/dist/core.js.map +1 -1
- package/dist/emotion/index.js +1 -1
- package/dist/emotion/index.js.map +1 -1
- package/dist/hooks/index.js +941 -6
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.js +31841 -183
- package/dist/index.js.map +1 -1
- package/dist/primitives/index.js +21111 -57
- package/dist/primitives/index.js.map +1 -1
- package/dist/protocol/index.js +360 -2
- package/dist/protocol/index.js.map +1 -1
- package/dist/speakeasy/index.js +2786 -38
- package/dist/speakeasy/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +1150 -3
- package/dist/theme/index.js.map +1 -1
- package/dist/vision/index.js +370 -2
- package/dist/vision/index.js.map +1 -1
- package/dist/workspace/index.js +16824 -2
- package/dist/workspace/index.js.map +1 -1
- package/package.json +16 -10
- package/dist/AuroraBackground-AP6ZHVFA.js +0 -6
- package/dist/AuroraBackground-AP6ZHVFA.js.map +0 -1
- package/dist/BentoGrid-CDARICNM.js +0 -6
- package/dist/BentoGrid-CDARICNM.js.map +0 -1
- package/dist/CommandPalette-JCWJKRBY.js +0 -6
- package/dist/CommandPalette-JCWJKRBY.js.map +0 -1
- package/dist/Glass-H4X4ZI4P.js +0 -7
- package/dist/Glass-H4X4ZI4P.js.map +0 -1
- package/dist/GlitchText-KLQ57PPY.js +0 -6
- package/dist/GlitchText-KLQ57PPY.js.map +0 -1
- package/dist/GlowButton-VGBPMZO7.js +0 -6
- package/dist/GlowButton-VGBPMZO7.js.map +0 -1
- package/dist/Graph3D-GO7N2EZQ.js +0 -540
- package/dist/Graph3D-GO7N2EZQ.js.map +0 -1
- package/dist/HUDProgressRing-N6C5NAEV.js +0 -6
- package/dist/HUDProgressRing-N6C5NAEV.js.map +0 -1
- package/dist/KPIStat-PBQK27ZB.js +0 -6
- package/dist/KPIStat-PBQK27ZB.js.map +0 -1
- package/dist/NeonToast-W5F7MU3U.js +0 -6
- package/dist/NeonToast-W5F7MU3U.js.map +0 -1
- package/dist/ParticleField-WK6CNHWU.js +0 -51
- package/dist/ParticleField-WK6CNHWU.js.map +0 -1
- package/dist/TextGenerateEffect-EUCEIIUJ.js +0 -6
- package/dist/TextGenerateEffect-EUCEIIUJ.js.map +0 -1
- package/dist/ThreeDCard-VH5I3SSY.js +0 -6
- package/dist/ThreeDCard-VH5I3SSY.js.map +0 -1
- package/dist/TypingAnimation-GIWOHPIX.js +0 -6
- package/dist/TypingAnimation-GIWOHPIX.js.map +0 -1
- package/dist/alert-dialog-QOSYBIIE.js +0 -19
- package/dist/alert-dialog-QOSYBIIE.js.map +0 -1
- package/dist/avatar-N5R37PCU.js +0 -10
- package/dist/avatar-N5R37PCU.js.map +0 -1
- package/dist/badge-GTVIIGPY.js +0 -8
- package/dist/badge-GTVIIGPY.js.map +0 -1
- package/dist/button-D7IMSV2D.js +0 -8
- package/dist/button-D7IMSV2D.js.map +0 -1
- package/dist/chunk-3CMPQOMY.js +0 -69
- package/dist/chunk-3CMPQOMY.js.map +0 -1
- package/dist/chunk-3OQT6IYR.js +0 -41
- package/dist/chunk-3OQT6IYR.js.map +0 -1
- package/dist/chunk-43B2WVLS.js +0 -85
- package/dist/chunk-43B2WVLS.js.map +0 -1
- package/dist/chunk-4SRFO5W3.js +0 -121
- package/dist/chunk-4SRFO5W3.js.map +0 -1
- package/dist/chunk-5IZELOOU.js +0 -362
- package/dist/chunk-5IZELOOU.js.map +0 -1
- package/dist/chunk-6DM4ACSS.js +0 -154
- package/dist/chunk-6DM4ACSS.js.map +0 -1
- package/dist/chunk-6IGT34PC.js +0 -50
- package/dist/chunk-6IGT34PC.js.map +0 -1
- package/dist/chunk-6RKBCJHN.js +0 -194
- package/dist/chunk-6RKBCJHN.js.map +0 -1
- package/dist/chunk-6RX2WGCO.js +0 -108
- package/dist/chunk-6RX2WGCO.js.map +0 -1
- package/dist/chunk-7K4WZM3U.js +0 -189
- package/dist/chunk-7K4WZM3U.js.map +0 -1
- package/dist/chunk-7MDBHJPT.js +0 -407
- package/dist/chunk-7MDBHJPT.js.map +0 -1
- package/dist/chunk-7UQD6ROV.js +0 -9
- package/dist/chunk-7UQD6ROV.js.map +0 -1
- package/dist/chunk-AFNIVLZP.js +0 -1069
- package/dist/chunk-AFNIVLZP.js.map +0 -1
- package/dist/chunk-ANWYRO6A.js +0 -407
- package/dist/chunk-ANWYRO6A.js.map +0 -1
- package/dist/chunk-DIXPOHDO.js +0 -71
- package/dist/chunk-DIXPOHDO.js.map +0 -1
- package/dist/chunk-DWYMKYPI.js +0 -3
- package/dist/chunk-DWYMKYPI.js.map +0 -1
- package/dist/chunk-E3NVDCZG.js +0 -280
- package/dist/chunk-E3NVDCZG.js.map +0 -1
- package/dist/chunk-EBM7YBKL.js +0 -399
- package/dist/chunk-EBM7YBKL.js.map +0 -1
- package/dist/chunk-EPAM7IWW.js +0 -294
- package/dist/chunk-EPAM7IWW.js.map +0 -1
- package/dist/chunk-EXQ7GYRS.js +0 -134
- package/dist/chunk-EXQ7GYRS.js.map +0 -1
- package/dist/chunk-F4QTUZ3C.js +0 -136
- package/dist/chunk-F4QTUZ3C.js.map +0 -1
- package/dist/chunk-FEW533R2.js +0 -105
- package/dist/chunk-FEW533R2.js.map +0 -1
- package/dist/chunk-FFZLJKC7.js +0 -270
- package/dist/chunk-FFZLJKC7.js.map +0 -1
- package/dist/chunk-GEAMOBF7.js +0 -8486
- package/dist/chunk-GEAMOBF7.js.map +0 -1
- package/dist/chunk-GRTRSCTD.js +0 -74
- package/dist/chunk-GRTRSCTD.js.map +0 -1
- package/dist/chunk-IKGYOGLK.js +0 -16
- package/dist/chunk-IKGYOGLK.js.map +0 -1
- package/dist/chunk-IQ7WYWVJ.js +0 -73
- package/dist/chunk-IQ7WYWVJ.js.map +0 -1
- package/dist/chunk-IXIVWQLF.js +0 -543
- package/dist/chunk-IXIVWQLF.js.map +0 -1
- package/dist/chunk-JCJU57RC.js +0 -115
- package/dist/chunk-JCJU57RC.js.map +0 -1
- package/dist/chunk-KORSTBU4.js +0 -117
- package/dist/chunk-KORSTBU4.js.map +0 -1
- package/dist/chunk-KSEZ6UM2.js +0 -235
- package/dist/chunk-KSEZ6UM2.js.map +0 -1
- package/dist/chunk-MHPF7R3O.js +0 -1376
- package/dist/chunk-MHPF7R3O.js.map +0 -1
- package/dist/chunk-MPC5IH7E.js +0 -81
- package/dist/chunk-MPC5IH7E.js.map +0 -1
- package/dist/chunk-MQIU2NYA.js +0 -114
- package/dist/chunk-MQIU2NYA.js.map +0 -1
- package/dist/chunk-NYMBJOGR.js +0 -2192
- package/dist/chunk-NYMBJOGR.js.map +0 -1
- package/dist/chunk-OBZD2M3C.js +0 -169
- package/dist/chunk-OBZD2M3C.js.map +0 -1
- package/dist/chunk-ODM2AG6G.js +0 -176
- package/dist/chunk-ODM2AG6G.js.map +0 -1
- package/dist/chunk-ONDKF5LP.js +0 -53
- package/dist/chunk-ONDKF5LP.js.map +0 -1
- package/dist/chunk-P25YCWQB.js +0 -41
- package/dist/chunk-P25YCWQB.js.map +0 -1
- package/dist/chunk-PFYVNM6H.js +0 -14
- package/dist/chunk-PFYVNM6H.js.map +0 -1
- package/dist/chunk-PWNNSGFL.js +0 -20
- package/dist/chunk-PWNNSGFL.js.map +0 -1
- package/dist/chunk-Q2PGZVOT.js +0 -36
- package/dist/chunk-Q2PGZVOT.js.map +0 -1
- package/dist/chunk-Q2XDMV7U.js +0 -76
- package/dist/chunk-Q2XDMV7U.js.map +0 -1
- package/dist/chunk-QG7FH2FI.js +0 -45
- package/dist/chunk-QG7FH2FI.js.map +0 -1
- package/dist/chunk-R7HUOK2D.js +0 -1914
- package/dist/chunk-R7HUOK2D.js.map +0 -1
- package/dist/chunk-REUYY7G5.js +0 -773
- package/dist/chunk-REUYY7G5.js.map +0 -1
- package/dist/chunk-RHC2Z2HT.js +0 -199
- package/dist/chunk-RHC2Z2HT.js.map +0 -1
- package/dist/chunk-RMCVLIFE.js +0 -23
- package/dist/chunk-RMCVLIFE.js.map +0 -1
- package/dist/chunk-ROZLTXGR.js +0 -234
- package/dist/chunk-ROZLTXGR.js.map +0 -1
- package/dist/chunk-RSS2C2O3.js +0 -17
- package/dist/chunk-RSS2C2O3.js.map +0 -1
- package/dist/chunk-SAGCG5SH.js +0 -355
- package/dist/chunk-SAGCG5SH.js.map +0 -1
- package/dist/chunk-TM6AOUSD.js +0 -40
- package/dist/chunk-TM6AOUSD.js.map +0 -1
- package/dist/chunk-TPK4BYCO.js +0 -970
- package/dist/chunk-TPK4BYCO.js.map +0 -1
- package/dist/chunk-UNQIL4K2.js +0 -34
- package/dist/chunk-UNQIL4K2.js.map +0 -1
- package/dist/chunk-UUG6L75Y.js +0 -47
- package/dist/chunk-UUG6L75Y.js.map +0 -1
- package/dist/chunk-V2SYMV4W.js +0 -114
- package/dist/chunk-V2SYMV4W.js.map +0 -1
- package/dist/chunk-V7EN5CTH.js +0 -130
- package/dist/chunk-V7EN5CTH.js.map +0 -1
- package/dist/chunk-VITKG2HL.js +0 -1125
- package/dist/chunk-VITKG2HL.js.map +0 -1
- package/dist/chunk-VYEWU5LO.js +0 -2631
- package/dist/chunk-VYEWU5LO.js.map +0 -1
- package/dist/chunk-W67QAGSH.js +0 -178
- package/dist/chunk-W67QAGSH.js.map +0 -1
- package/dist/chunk-WWBIN6KV.js +0 -1353
- package/dist/chunk-WWBIN6KV.js.map +0 -1
- package/dist/chunk-X77Z4PFB.js +0 -224
- package/dist/chunk-X77Z4PFB.js.map +0 -1
- package/dist/chunk-X7VG7OTT.js +0 -8
- package/dist/chunk-X7VG7OTT.js.map +0 -1
- package/dist/chunk-XE4K2SGI.js +0 -74
- package/dist/chunk-XE4K2SGI.js.map +0 -1
- package/dist/chunk-YIUG7IJK.js +0 -628
- package/dist/chunk-YIUG7IJK.js.map +0 -1
- package/dist/chunk-YNVN3V4Y.js +0 -13
- package/dist/chunk-YNVN3V4Y.js.map +0 -1
- package/dist/chunk-Z2S54IZX.js +0 -198
- package/dist/chunk-Z2S54IZX.js.map +0 -1
- package/dist/chunk-ZR6AH25Z.js +0 -17
- package/dist/chunk-ZR6AH25Z.js.map +0 -1
- package/dist/dialog-SPM3DTTI.js +0 -17
- package/dist/dialog-SPM3DTTI.js.map +0 -1
- package/dist/dropdown-menu-HMTWKWGK.js +0 -21
- package/dist/dropdown-menu-HMTWKWGK.js.map +0 -1
- package/dist/input-BH4P4S26.js +0 -6
- package/dist/input-BH4P4S26.js.map +0 -1
- package/dist/label-5Z4Q6VER.js +0 -8
- package/dist/label-5Z4Q6VER.js.map +0 -1
- package/dist/popover-IFOUXYLI.js +0 -18
- package/dist/popover-IFOUXYLI.js.map +0 -1
- package/dist/scroll-area-DJXNW6QX.js +0 -14
- package/dist/scroll-area-DJXNW6QX.js.map +0 -1
- package/dist/select-FZ277C3G.js +0 -22
- package/dist/select-FZ277C3G.js.map +0 -1
- package/dist/separator-BTMLN4NB.js +0 -8
- package/dist/separator-BTMLN4NB.js.map +0 -1
- package/dist/skeleton-DXIWBH4W.js +0 -6
- package/dist/skeleton-DXIWBH4W.js.map +0 -1
- package/dist/switch-4MCXIZBY.js +0 -13
- package/dist/switch-4MCXIZBY.js.map +0 -1
- package/dist/tabs-O7AW3APK.js +0 -17
- package/dist/tabs-O7AW3APK.js.map +0 -1
- package/dist/textarea-IB5WAFDO.js +0 -6
- package/dist/textarea-IB5WAFDO.js.map +0 -1
- package/dist/toggle-XVPPG6P4.js +0 -10
- package/dist/toggle-XVPPG6P4.js.map +0 -1
- package/dist/tooltip-JICZTD4F.js +0 -18
- package/dist/tooltip-JICZTD4F.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/primitives/ambient/DustMotesLayer.tsx"],"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AAI,IAAA,CAAK,IAAI,KAAA,EAAO,EAAE,GAAG,EAAE,CAAA;AAErD,IAAA,QAAA,CAAS,aAAA,CAAc,YAAA,EAAc,MAAA,EAAQ,SAAA,EAAW,KAAK,CAAC,CAAA;AAAA,EAChE,CAAA,EAAG,CAAC,MAAA,EAAQ,OAAA,EAAS,UAAU,aAAA,EAAe,SAAA,EAAW,KAAK,CAAC,CAAA;AAG/D,EAAA,IAAI,QAAA,IAAY,KAAA,CAAM,MAAA,KAAW,CAAA,EAAG;AAClC,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,sDAAA,EAAwD,SAAS,CAAA;AAAA,MAC/E,aAAA,EAAY,MAAA;AAAA,MAGZ,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,kBAAA;AAAA,YACV,KAAA,EAAO;AAAA,cACL,YAAY,aAAA,CAAc;AAAA;AAC5B;AAAA,SACF;AAAA,QAGC,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,qBACV,GAAA,CAAC,YAAA,EAAA,EAA2B,IAAA,EAAY,eAAA,EAAiB,KAAA,EAAA,EAAtC,IAAA,CAAK,EAAwC,CACjE,CAAA;AAAA,wBAGD,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,6BAAA;AAAA,YACV,KAAA,EAAO;AAAA,cACL,UAAA,EAAY;AAAA;AAAA;AAAA,cAAA,EAGN,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA;AAAA;AAAA,UAAA;AAAA;AAIjB;AAAA;AACF;AAAA;AAAA,GACF;AAEJ","file":"chunk-F4QTUZ3C.js","sourcesContent":["\"use client\";\n\nimport { cn, prefersReducedMotion } from \"../../lib/utils\";\nimport { useAmbientTokens } from \"../../theme\";\nimport { motion, useReducedMotion } from \"framer-motion\";\nimport * as React from \"react\";\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\ninterface Mote {\n id: number;\n x: number;\n y: number;\n size: number;\n color: string;\n delay: number;\n duration: number;\n driftX: number;\n driftY: number;\n}\n\nexport interface DustMotesLayerProps {\n /** Override particle colors */\n colors?: string[];\n /** Override density (0-1) */\n density?: number;\n /** Override speed multiplier */\n speed?: number;\n /** Override size range [min, max] */\n sizeRange?: [number, number];\n /** Container className */\n className?: string;\n /** Disable animations */\n disabled?: boolean;\n}\n\n// ============================================================================\n// MOTE GENERATION\n// ============================================================================\n\nfunction generateMotes(\n count: number,\n colors: string[],\n sizeRange: [number, number],\n speed: number\n): Mote[] {\n return Array.from({ length: count }, (_, i) => ({\n id: i,\n x: Math.random() * 100,\n y: Math.random() * 100,\n size: sizeRange[0] + Math.random() * (sizeRange[1] - sizeRange[0]),\n color: colors[Math.floor(Math.random() * colors.length)],\n delay: Math.random() * 5,\n duration: (8 + Math.random() * 8) / speed,\n driftX: (Math.random() - 0.5) * 30,\n driftY: -20 - Math.random() * 40, // Upward drift\n }));\n}\n\n// ============================================================================\n// SINGLE MOTE COMPONENT\n// ============================================================================\n\ninterface MoteParticleProps {\n mote: Mote;\n speedMultiplier: number;\n}\n\nconst MoteParticle = React.memo(function MoteParticle({\n mote,\n speedMultiplier,\n}: MoteParticleProps) {\n const reducedMotion = useReducedMotion();\n\n if (reducedMotion) {\n return (\n <div\n className=\"absolute rounded-full\"\n style={{\n left: `${mote.x}%`,\n top: `${mote.y}%`,\n width: mote.size,\n height: mote.size,\n backgroundColor: mote.color,\n opacity: 0.3,\n }}\n />\n );\n }\n\n return (\n <motion.div\n className=\"absolute rounded-full will-change-transform\"\n style={{\n left: `${mote.x}%`,\n top: `${mote.y}%`,\n width: mote.size,\n height: mote.size,\n backgroundColor: mote.color,\n filter: `blur(${mote.size > 4 ? 1 : 0}px)`,\n }}\n initial={{ opacity: 0, scale: 0.5 }}\n animate={{\n opacity: [0, 0.6, 0.4, 0.7, 0],\n scale: [0.5, 1, 0.9, 1.1, 0.8],\n x: [0, mote.driftX * 0.3, mote.driftX * 0.7, mote.driftX],\n y: [0, mote.driftY * 0.3, mote.driftY * 0.7, mote.driftY],\n }}\n transition={{\n duration: mote.duration / speedMultiplier,\n delay: mote.delay,\n repeat: Infinity,\n ease: \"easeInOut\",\n }}\n />\n );\n});\n\n// ============================================================================\n// DUST MOTES LAYER\n// ============================================================================\n\nexport function DustMotesLayer({\n colors: propColors,\n density: propDensity,\n speed: propSpeed,\n sizeRange: propSizeRange,\n className,\n disabled = false,\n}: DustMotesLayerProps) {\n const ambientTokens = useAmbientTokens();\n const reducedMotion = prefersReducedMotion();\n\n // Use props or fall back to theme tokens\n const colors = propColors ?? ambientTokens.particleColors;\n const density = propDensity ?? ambientTokens.particleDensity;\n const speed = propSpeed ?? ambientTokens.particleSpeed;\n const sizeRange = propSizeRange ?? ambientTokens.particleSizeRange;\n\n // Calculate mote count based on viewport and density\n const [motes, setMotes] = React.useState<Mote[]>([]);\n\n React.useEffect(() => {\n if (disabled || reducedMotion) {\n setMotes([]);\n return;\n }\n\n // Base count on viewport, scaled by density\n const viewportArea =\n typeof window !== \"undefined\" ? (window.innerWidth * window.innerHeight) / 10000 : 100;\n const count = Math.floor(viewportArea * density * 2);\n const clampedCount = Math.min(Math.max(count, 15), 80);\n\n setMotes(generateMotes(clampedCount, colors, sizeRange, speed));\n }, [colors, density, disabled, reducedMotion, sizeRange, speed]);\n\n // Don't render if ambient type is not dust-motes\n if (disabled || motes.length === 0) {\n return null;\n }\n\n return (\n <div\n className={cn(\"pointer-events-none absolute inset-0 overflow-hidden\", className)}\n aria-hidden=\"true\"\n >\n {/* Horizon gradient */}\n <div\n className=\"absolute inset-0\"\n style={{\n background: ambientTokens.horizonGradient,\n }}\n />\n\n {/* Floating motes */}\n {motes.map((mote) => (\n <MoteParticle key={mote.id} mote={mote} speedMultiplier={speed} />\n ))}\n\n {/* Soft sunbeam overlay (optional) */}\n <div\n className=\"absolute inset-0 opacity-30\"\n style={{\n background: `\n radial-gradient(\n ellipse 60% 100% at 70% 0%,\n ${colors[0]}15,\n transparent 70%\n )\n `,\n }}\n />\n </div>\n );\n}\n"]}
|
package/dist/chunk-FEW533R2.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { composeRefs } from './chunk-P25YCWQB.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
6
|
-
var use = React[" use ".trim().toString()];
|
|
7
|
-
function isPromiseLike(value) {
|
|
8
|
-
return typeof value === "object" && value !== null && "then" in value;
|
|
9
|
-
}
|
|
10
|
-
function isLazyComponent(element) {
|
|
11
|
-
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
12
|
-
}
|
|
13
|
-
// @__NO_SIDE_EFFECTS__
|
|
14
|
-
function createSlot(ownerName) {
|
|
15
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
16
|
-
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
17
|
-
let { children, ...slotProps } = props;
|
|
18
|
-
if (isLazyComponent(children) && typeof use === "function") {
|
|
19
|
-
children = use(children._payload);
|
|
20
|
-
}
|
|
21
|
-
const childrenArray = React.Children.toArray(children);
|
|
22
|
-
const slottable = childrenArray.find(isSlottable);
|
|
23
|
-
if (slottable) {
|
|
24
|
-
const newElement = slottable.props.children;
|
|
25
|
-
const newChildren = childrenArray.map((child) => {
|
|
26
|
-
if (child === slottable) {
|
|
27
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
28
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
29
|
-
} else {
|
|
30
|
-
return child;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
34
|
-
}
|
|
35
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
36
|
-
});
|
|
37
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
38
|
-
return Slot2;
|
|
39
|
-
}
|
|
40
|
-
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
41
|
-
// @__NO_SIDE_EFFECTS__
|
|
42
|
-
function createSlotClone(ownerName) {
|
|
43
|
-
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
44
|
-
let { children, ...slotProps } = props;
|
|
45
|
-
if (isLazyComponent(children) && typeof use === "function") {
|
|
46
|
-
children = use(children._payload);
|
|
47
|
-
}
|
|
48
|
-
if (React.isValidElement(children)) {
|
|
49
|
-
const childrenRef = getElementRef(children);
|
|
50
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
51
|
-
if (children.type !== React.Fragment) {
|
|
52
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
53
|
-
}
|
|
54
|
-
return React.cloneElement(children, props2);
|
|
55
|
-
}
|
|
56
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
57
|
-
});
|
|
58
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
59
|
-
return SlotClone;
|
|
60
|
-
}
|
|
61
|
-
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
62
|
-
function isSlottable(child) {
|
|
63
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
64
|
-
}
|
|
65
|
-
function mergeProps(slotProps, childProps) {
|
|
66
|
-
const overrideProps = { ...childProps };
|
|
67
|
-
for (const propName in childProps) {
|
|
68
|
-
const slotPropValue = slotProps[propName];
|
|
69
|
-
const childPropValue = childProps[propName];
|
|
70
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
71
|
-
if (isHandler) {
|
|
72
|
-
if (slotPropValue && childPropValue) {
|
|
73
|
-
overrideProps[propName] = (...args) => {
|
|
74
|
-
const result = childPropValue(...args);
|
|
75
|
-
slotPropValue(...args);
|
|
76
|
-
return result;
|
|
77
|
-
};
|
|
78
|
-
} else if (slotPropValue) {
|
|
79
|
-
overrideProps[propName] = slotPropValue;
|
|
80
|
-
}
|
|
81
|
-
} else if (propName === "style") {
|
|
82
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
83
|
-
} else if (propName === "className") {
|
|
84
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return { ...slotProps, ...overrideProps };
|
|
88
|
-
}
|
|
89
|
-
function getElementRef(element) {
|
|
90
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
91
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
92
|
-
if (mayWarn) {
|
|
93
|
-
return element.ref;
|
|
94
|
-
}
|
|
95
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
96
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
97
|
-
if (mayWarn) {
|
|
98
|
-
return element.props.ref;
|
|
99
|
-
}
|
|
100
|
-
return element.props.ref || element.ref;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export { Slot, createSlot };
|
|
104
|
-
//# sourceMappingURL=chunk-FEW533R2.js.map
|
|
105
|
-
//# sourceMappingURL=chunk-FEW533R2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@radix-ui/react-slot/src/slot.tsx"],"names":["Slot","props"],"mappings":";;;;AASA,IAAM,eAAA,mBAAkB,MAAA,CAAO,GAAA,CAAI,YAAY,CAAA;AAY/C,IAA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'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\ndeclare module 'react' {\n interface ReactElement {\n $$typeof?: symbol | string;\n }\n}\n\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\n\ninterface LazyReactElement extends React.ReactElement {\n $$typeof: typeof REACT_LAZY_TYPE;\n _payload: PromiseLike<Exclude<React.ReactNode, PromiseLike<any>>>;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type Usable<T> = PromiseLike<T> | React.Context<T>;\nconst use: typeof React.use | undefined = (React as any)[' use '.trim().toString()];\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\nfunction isPromiseLike(value: unknown): value is PromiseLike<unknown> {\n return typeof value === 'object' && value !== null && 'then' in value;\n}\n\nfunction isLazyComponent(element: React.ReactNode): element is LazyReactElement {\n return (\n element != null &&\n typeof element === 'object' &&\n '$$typeof' in element &&\n element.$$typeof === REACT_LAZY_TYPE &&\n '_payload' in element &&\n isPromiseLike(element._payload)\n );\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === 'function') {\n children = use(children._payload);\n }\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === 'function') {\n children = use(children._payload);\n }\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC<SlottableProps> {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children}</>;\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode,\n): child is React.ReactElement<SlottableProps, typeof Slottable> {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref<unknown> }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref<unknown> }).ref || (element as any).ref;\n}\n\nexport {\n Slot,\n Slottable,\n //\n Slot as Root,\n};\nexport type { SlotProps };\n"]}
|
package/dist/chunk-FFZLJKC7.js
DELETED
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { createDialogScope, Trigger, Overlay, WarningProvider, Content, Title, Description, Close, Root, Portal } from './chunk-EBM7YBKL.js';
|
|
2
|
-
import { createContextScope } from './chunk-MPC5IH7E.js';
|
|
3
|
-
import { composeEventHandlers } from './chunk-EXQ7GYRS.js';
|
|
4
|
-
import { buttonVariants } from './chunk-ONDKF5LP.js';
|
|
5
|
-
import { useComposedRefs } from './chunk-P25YCWQB.js';
|
|
6
|
-
import { cn } from './chunk-6RX2WGCO.js';
|
|
7
|
-
import * as React2 from 'react';
|
|
8
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
-
|
|
10
|
-
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
11
|
-
// @__NO_SIDE_EFFECTS__
|
|
12
|
-
function createSlottable(ownerName) {
|
|
13
|
-
const Slottable2 = ({ children }) => {
|
|
14
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
15
|
-
};
|
|
16
|
-
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
17
|
-
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
18
|
-
return Slottable2;
|
|
19
|
-
}
|
|
20
|
-
var ROOT_NAME = "AlertDialog";
|
|
21
|
-
var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
22
|
-
createDialogScope
|
|
23
|
-
]);
|
|
24
|
-
var useDialogScope = createDialogScope();
|
|
25
|
-
var AlertDialog = (props) => {
|
|
26
|
-
const { __scopeAlertDialog, ...alertDialogProps } = props;
|
|
27
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
28
|
-
return /* @__PURE__ */ jsx(Root, { ...dialogScope, ...alertDialogProps, modal: true });
|
|
29
|
-
};
|
|
30
|
-
AlertDialog.displayName = ROOT_NAME;
|
|
31
|
-
var TRIGGER_NAME = "AlertDialogTrigger";
|
|
32
|
-
var AlertDialogTrigger = React2.forwardRef(
|
|
33
|
-
(props, forwardedRef) => {
|
|
34
|
-
const { __scopeAlertDialog, ...triggerProps } = props;
|
|
35
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
36
|
-
return /* @__PURE__ */ jsx(Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
AlertDialogTrigger.displayName = TRIGGER_NAME;
|
|
40
|
-
var PORTAL_NAME = "AlertDialogPortal";
|
|
41
|
-
var AlertDialogPortal = (props) => {
|
|
42
|
-
const { __scopeAlertDialog, ...portalProps } = props;
|
|
43
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
44
|
-
return /* @__PURE__ */ jsx(Portal, { ...dialogScope, ...portalProps });
|
|
45
|
-
};
|
|
46
|
-
AlertDialogPortal.displayName = PORTAL_NAME;
|
|
47
|
-
var OVERLAY_NAME = "AlertDialogOverlay";
|
|
48
|
-
var AlertDialogOverlay = React2.forwardRef(
|
|
49
|
-
(props, forwardedRef) => {
|
|
50
|
-
const { __scopeAlertDialog, ...overlayProps } = props;
|
|
51
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
52
|
-
return /* @__PURE__ */ jsx(Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
|
56
|
-
var CONTENT_NAME = "AlertDialogContent";
|
|
57
|
-
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
|
|
58
|
-
var Slottable = createSlottable("AlertDialogContent");
|
|
59
|
-
var AlertDialogContent = React2.forwardRef(
|
|
60
|
-
(props, forwardedRef) => {
|
|
61
|
-
const { __scopeAlertDialog, children, ...contentProps } = props;
|
|
62
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
63
|
-
const contentRef = React2.useRef(null);
|
|
64
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
65
|
-
const cancelRef = React2.useRef(null);
|
|
66
|
-
return /* @__PURE__ */ jsx(
|
|
67
|
-
WarningProvider,
|
|
68
|
-
{
|
|
69
|
-
contentName: CONTENT_NAME,
|
|
70
|
-
titleName: TITLE_NAME,
|
|
71
|
-
docsSlug: "alert-dialog",
|
|
72
|
-
children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
|
|
73
|
-
Content,
|
|
74
|
-
{
|
|
75
|
-
role: "alertdialog",
|
|
76
|
-
...dialogScope,
|
|
77
|
-
...contentProps,
|
|
78
|
-
ref: composedRefs,
|
|
79
|
-
onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
|
|
80
|
-
event.preventDefault();
|
|
81
|
-
cancelRef.current?.focus({ preventScroll: true });
|
|
82
|
-
}),
|
|
83
|
-
onPointerDownOutside: (event) => event.preventDefault(),
|
|
84
|
-
onInteractOutside: (event) => event.preventDefault(),
|
|
85
|
-
children: [
|
|
86
|
-
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
87
|
-
/* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
) })
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
AlertDialogContent.displayName = CONTENT_NAME;
|
|
96
|
-
var TITLE_NAME = "AlertDialogTitle";
|
|
97
|
-
var AlertDialogTitle = React2.forwardRef(
|
|
98
|
-
(props, forwardedRef) => {
|
|
99
|
-
const { __scopeAlertDialog, ...titleProps } = props;
|
|
100
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
101
|
-
return /* @__PURE__ */ jsx(Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
AlertDialogTitle.displayName = TITLE_NAME;
|
|
105
|
-
var DESCRIPTION_NAME = "AlertDialogDescription";
|
|
106
|
-
var AlertDialogDescription = React2.forwardRef((props, forwardedRef) => {
|
|
107
|
-
const { __scopeAlertDialog, ...descriptionProps } = props;
|
|
108
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
109
|
-
return /* @__PURE__ */ jsx(Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
|
110
|
-
});
|
|
111
|
-
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
|
112
|
-
var ACTION_NAME = "AlertDialogAction";
|
|
113
|
-
var AlertDialogAction = React2.forwardRef(
|
|
114
|
-
(props, forwardedRef) => {
|
|
115
|
-
const { __scopeAlertDialog, ...actionProps } = props;
|
|
116
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
117
|
-
return /* @__PURE__ */ jsx(Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
AlertDialogAction.displayName = ACTION_NAME;
|
|
121
|
-
var CANCEL_NAME = "AlertDialogCancel";
|
|
122
|
-
var AlertDialogCancel = React2.forwardRef(
|
|
123
|
-
(props, forwardedRef) => {
|
|
124
|
-
const { __scopeAlertDialog, ...cancelProps } = props;
|
|
125
|
-
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
126
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
127
|
-
const ref = useComposedRefs(forwardedRef, cancelRef);
|
|
128
|
-
return /* @__PURE__ */ jsx(Close, { ...dialogScope, ...cancelProps, ref });
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
|
-
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
132
|
-
var DescriptionWarning = ({ contentRef }) => {
|
|
133
|
-
const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
134
|
-
|
|
135
|
-
You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
136
|
-
|
|
137
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
138
|
-
|
|
139
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
140
|
-
React2.useEffect(() => {
|
|
141
|
-
const hasDescription = document.getElementById(
|
|
142
|
-
contentRef.current?.getAttribute("aria-describedby")
|
|
143
|
-
);
|
|
144
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
145
|
-
}, [MESSAGE, contentRef]);
|
|
146
|
-
return null;
|
|
147
|
-
};
|
|
148
|
-
var Root2 = AlertDialog;
|
|
149
|
-
var Trigger2 = AlertDialogTrigger;
|
|
150
|
-
var Portal2 = AlertDialogPortal;
|
|
151
|
-
var Overlay2 = AlertDialogOverlay;
|
|
152
|
-
var Content2 = AlertDialogContent;
|
|
153
|
-
var Action = AlertDialogAction;
|
|
154
|
-
var Cancel = AlertDialogCancel;
|
|
155
|
-
var Title2 = AlertDialogTitle;
|
|
156
|
-
var Description2 = AlertDialogDescription;
|
|
157
|
-
function AlertDialog2({ ...props }) {
|
|
158
|
-
return /* @__PURE__ */ jsx(Root2, { "data-slot": "alert-dialog", ...props });
|
|
159
|
-
}
|
|
160
|
-
function AlertDialogTrigger2({
|
|
161
|
-
...props
|
|
162
|
-
}) {
|
|
163
|
-
return /* @__PURE__ */ jsx(Trigger2, { "data-slot": "alert-dialog-trigger", ...props });
|
|
164
|
-
}
|
|
165
|
-
function AlertDialogPortal2({ ...props }) {
|
|
166
|
-
return /* @__PURE__ */ jsx(Portal2, { "data-slot": "alert-dialog-portal", ...props });
|
|
167
|
-
}
|
|
168
|
-
function AlertDialogOverlay2({
|
|
169
|
-
className,
|
|
170
|
-
...props
|
|
171
|
-
}) {
|
|
172
|
-
return /* @__PURE__ */ jsx(
|
|
173
|
-
Overlay2,
|
|
174
|
-
{
|
|
175
|
-
"data-slot": "alert-dialog-overlay",
|
|
176
|
-
className: cn(
|
|
177
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
178
|
-
className
|
|
179
|
-
),
|
|
180
|
-
...props
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
function AlertDialogContent2({
|
|
185
|
-
className,
|
|
186
|
-
...props
|
|
187
|
-
}) {
|
|
188
|
-
return /* @__PURE__ */ jsxs(AlertDialogPortal2, { children: [
|
|
189
|
-
/* @__PURE__ */ jsx(AlertDialogOverlay2, {}),
|
|
190
|
-
/* @__PURE__ */ jsx(
|
|
191
|
-
Content2,
|
|
192
|
-
{
|
|
193
|
-
"data-slot": "alert-dialog-content",
|
|
194
|
-
className: cn(
|
|
195
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
196
|
-
className
|
|
197
|
-
),
|
|
198
|
-
...props
|
|
199
|
-
}
|
|
200
|
-
)
|
|
201
|
-
] });
|
|
202
|
-
}
|
|
203
|
-
function AlertDialogHeader({ className, ...props }) {
|
|
204
|
-
return /* @__PURE__ */ jsx(
|
|
205
|
-
"div",
|
|
206
|
-
{
|
|
207
|
-
"data-slot": "alert-dialog-header",
|
|
208
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
209
|
-
...props
|
|
210
|
-
}
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
function AlertDialogFooter({ className, ...props }) {
|
|
214
|
-
return /* @__PURE__ */ jsx(
|
|
215
|
-
"div",
|
|
216
|
-
{
|
|
217
|
-
"data-slot": "alert-dialog-footer",
|
|
218
|
-
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
219
|
-
...props
|
|
220
|
-
}
|
|
221
|
-
);
|
|
222
|
-
}
|
|
223
|
-
function AlertDialogTitle2({
|
|
224
|
-
className,
|
|
225
|
-
...props
|
|
226
|
-
}) {
|
|
227
|
-
return /* @__PURE__ */ jsx(
|
|
228
|
-
Title2,
|
|
229
|
-
{
|
|
230
|
-
"data-slot": "alert-dialog-title",
|
|
231
|
-
className: cn("text-lg font-semibold", className),
|
|
232
|
-
...props
|
|
233
|
-
}
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
|
-
function AlertDialogDescription2({
|
|
237
|
-
className,
|
|
238
|
-
...props
|
|
239
|
-
}) {
|
|
240
|
-
return /* @__PURE__ */ jsx(
|
|
241
|
-
Description2,
|
|
242
|
-
{
|
|
243
|
-
"data-slot": "alert-dialog-description",
|
|
244
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
245
|
-
...props
|
|
246
|
-
}
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
function AlertDialogAction2({
|
|
250
|
-
className,
|
|
251
|
-
...props
|
|
252
|
-
}) {
|
|
253
|
-
return /* @__PURE__ */ jsx(Action, { className: cn(buttonVariants(), className), ...props });
|
|
254
|
-
}
|
|
255
|
-
function AlertDialogCancel2({
|
|
256
|
-
className,
|
|
257
|
-
...props
|
|
258
|
-
}) {
|
|
259
|
-
return /* @__PURE__ */ jsx(
|
|
260
|
-
Cancel,
|
|
261
|
-
{
|
|
262
|
-
className: cn(buttonVariants({ variant: "outline" }), className),
|
|
263
|
-
...props
|
|
264
|
-
}
|
|
265
|
-
);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export { AlertDialog2 as AlertDialog, AlertDialogAction2 as AlertDialogAction, AlertDialogCancel2 as AlertDialogCancel, AlertDialogContent2 as AlertDialogContent, AlertDialogDescription2 as AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay2 as AlertDialogOverlay, AlertDialogPortal2 as AlertDialogPortal, AlertDialogTitle2 as AlertDialogTitle, AlertDialogTrigger2 as AlertDialogTrigger };
|
|
269
|
-
//# sourceMappingURL=chunk-FFZLJKC7.js.map
|
|
270
|
-
//# sourceMappingURL=chunk-FFZLJKC7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/src/slot.tsx","../../../node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.tsx","../src/primitives/ui/alert-dialog.tsx"],"names":["Slottable","Fragment","jsx","Root","Trigger","Portal","Overlay","Content","Title","Description","AlertDialog","AlertDialogTrigger","AlertDialogPortal","AlertDialogOverlay","AlertDialogContent","jsxs","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","AlertDialogCancel"],"mappings":";;;;;;;;;AA0FA,IAAM,oBAAA,0BAA8B,iBAAiB,CAAA;;AAUnB,SAAS,gBAAgB,SAAA,EAAmB;AAC5E,EAAA,MAAMA,UAAAA,GAAgC,CAAC,EAAE,QAAA,EAAS,KAAM;AACtD,IAAA,uBAAO,GAAA,CAAAC,QAAAA,EAAA,EAAG,QAAA,EAAS,CAAA;AACrB,EAAA,CAAA;AACAD,EAAAA,UAAAA,CAAU,WAAA,GAAc,GAAG,SAAS,CAAA,UAAA,CAAA;AACpCA,EAAAA,UAAAA,CAAU,SAAA,GAAY,oBAAA;AACtB,EAAA,OAAOA,UAAAA;AACT;AC7FA,IAAM,SAAA,GAAY,aAAA;AAGlB,IAAM,CAAC,wBAAA,EAA0B,sBAAsB,CAAA,GAAI,mBAAmB,SAAA,EAAW;AACvF,EAAA;AACF,CAAC,CAAA;AACD,IAAM,iBAAiB,iBAAA,EAAkB;AAKzC,IAAM,WAAA,GAA0C,CAAC,KAAA,KAAyC;AACxF,EAAA,MAAM,EAAE,kBAAA,EAAoB,GAA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CAAA;AAAA,MAC/C,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAASe,uBAAAA,CAAuB;AAAA,EAC9B,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAkE;AAChE,EAAA,uBACEf,GAAAA;AAAA,IAAsB,YAAA;AAAA,IAArB;AAAA,MACC,WAAA,EAAU,0BAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAASgB,kBAAAA,CAAkB;AAAA,EACzB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA6D;AAC3D,EAAA,uBAAOhB,GAAAA,CAAsB,MAAA,EAArB,EAA4B,SAAA,EAAW,EAAA,CAAG,cAAA,EAAe,EAAG,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAC7F;AAEA,SAASiB,kBAAAA,CAAkB;AAAA,EACzB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA6D;AAC3D,EAAA,uBACEjB,GAAAA;AAAA,IAAsB,MAAA;AAAA,IAArB;AAAA,MACC,SAAA,EAAW,GAAG,cAAA,CAAe,EAAE,SAAS,SAAA,EAAW,GAAG,SAAS,CAAA;AAAA,MAC9D,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-FFZLJKC7.js","sourcesContent":["import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC<SlottableProps> {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children}</>;\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement<SlottableProps, typeof Slottable> {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref<unknown> }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref<unknown> }).ref || (element as any).ref;\n}\n\nexport {\n Slot,\n Slottable,\n //\n Slot as Root,\n};\nexport type { SlotProps };\n","import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { createDialogScope } from '@radix-ui/react-dialog';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createSlottable } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = 'AlertDialog';\n\ntype ScopedProps<P> = P & { __scopeAlertDialog?: Scope };\nconst [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope,\n]);\nconst useDialogScope = createDialogScope();\n\ntype DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;\ninterface AlertDialogProps extends Omit<DialogProps, 'modal'> {}\n\nconst AlertDialog: React.FC<AlertDialogProps> = (props: ScopedProps<AlertDialogProps>) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Root {...dialogScope} {...alertDialogProps} modal={true} />;\n};\n\nAlertDialog.displayName = ROOT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst TRIGGER_NAME = 'AlertDialogTrigger';\n\ntype AlertDialogTriggerElement = React.ComponentRef<typeof DialogPrimitive.Trigger>;\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\ninterface AlertDialogTriggerProps extends DialogTriggerProps {}\n\nconst AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(\n (props: ScopedProps<AlertDialogTriggerProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Trigger {...dialogScope} {...triggerProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'AlertDialogPortal';\n\ntype DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;\ninterface AlertDialogPortalProps extends DialogPortalProps {}\n\nconst AlertDialogPortal: React.FC<AlertDialogPortalProps> = (\n props: ScopedProps<AlertDialogPortalProps>\n) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Portal {...dialogScope} {...portalProps} />;\n};\n\nAlertDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'AlertDialogOverlay';\n\ntype AlertDialogOverlayElement = React.ComponentRef<typeof DialogPrimitive.Overlay>;\ntype DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;\ninterface AlertDialogOverlayProps extends DialogOverlayProps {}\n\nconst AlertDialogOverlay = React.forwardRef<AlertDialogOverlayElement, AlertDialogOverlayProps>(\n (props: ScopedProps<AlertDialogOverlayProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Overlay {...dialogScope} {...overlayProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogOverlay.displayName = OVERLAY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AlertDialogContent';\n\ntype AlertDialogContentContextValue = {\n cancelRef: React.MutableRefObject<AlertDialogCancelElement | null>;\n};\n\nconst [AlertDialogContentProvider, useAlertDialogContentContext] =\n createAlertDialogContext<AlertDialogContentContextValue>(CONTENT_NAME);\n\ntype AlertDialogContentElement = React.ComponentRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\ninterface AlertDialogContentProps\n extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {}\n\nconst Slottable = createSlottable('AlertDialogContent');\n\nconst AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(\n (props: ScopedProps<AlertDialogContentProps>, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef<AlertDialogContentElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef<AlertDialogCancelElement | null>(null);\n\n return (\n <DialogPrimitive.WarningProvider\n contentName={CONTENT_NAME}\n titleName={TITLE_NAME}\n docsSlug=\"alert-dialog\"\n >\n <AlertDialogContentProvider scope={__scopeAlertDialog} cancelRef={cancelRef}>\n <DialogPrimitive.Content\n role=\"alertdialog\"\n {...dialogScope}\n {...contentProps}\n ref={composedRefs}\n onOpenAutoFocus={composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n })}\n onPointerDownOutside={(event) => event.preventDefault()}\n onInteractOutside={(event) => event.preventDefault()}\n >\n {/**\n * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`\n * around everything, otherwise the `DescriptionWarning` would be rendered straight away.\n * This is because we want the accessibility checks to run only once the content is actually\n * open and that behaviour is already encapsulated in `DialogContent`.\n */}\n <Slottable>{children}</Slottable>\n {process.env.NODE_ENV === 'development' && (\n <DescriptionWarning contentRef={contentRef} />\n )}\n </DialogPrimitive.Content>\n </AlertDialogContentProvider>\n </DialogPrimitive.WarningProvider>\n );\n }\n);\n\nAlertDialogContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'AlertDialogTitle';\n\ntype AlertDialogTitleElement = React.ComponentRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\ninterface AlertDialogTitleProps extends DialogTitleProps {}\n\nconst AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(\n (props: ScopedProps<AlertDialogTitleProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Title {...dialogScope} {...titleProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'AlertDialogDescription';\n\ntype AlertDialogDescriptionElement = React.ComponentRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\ninterface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props: ScopedProps<AlertDialogDescriptionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Description {...dialogScope} {...descriptionProps} ref={forwardedRef} />;\n});\n\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'AlertDialogAction';\n\ntype AlertDialogActionElement = React.ComponentRef<typeof DialogPrimitive.Close>;\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogActionProps extends DialogCloseProps {}\n\nconst AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(\n (props: ScopedProps<AlertDialogActionProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return <DialogPrimitive.Close {...dialogScope} {...actionProps} ref={forwardedRef} />;\n }\n);\n\nAlertDialogAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogCancel\n * -----------------------------------------------------------------------------------------------*/\n\nconst CANCEL_NAME = 'AlertDialogCancel';\n\ntype AlertDialogCancelElement = React.ComponentRef<typeof DialogPrimitive.Close>;\ninterface AlertDialogCancelProps extends DialogCloseProps {}\n\nconst AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(\n (props: ScopedProps<AlertDialogCancelProps>, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return <DialogPrimitive.Close {...dialogScope} {...cancelProps} ref={ref} />;\n }\n);\n\nAlertDialogCancel.displayName = CANCEL_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<AlertDialogContentElement | null>;\n};\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute('aria-describedby')!\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n\n return null;\n};\n\nconst Root = AlertDialog;\nconst Trigger = AlertDialogTrigger;\nconst Portal = AlertDialogPortal;\nconst Overlay = AlertDialogOverlay;\nconst Content = AlertDialogContent;\nconst Action = AlertDialogAction;\nconst Cancel = AlertDialogCancel;\nconst Title = AlertDialogTitle;\nconst Description = AlertDialogDescription;\n\nexport {\n createAlertDialogScope,\n //\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogTitle,\n AlertDialogDescription,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Action,\n Cancel,\n Title,\n Description,\n};\nexport type {\n AlertDialogProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogActionProps,\n AlertDialogCancelProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\n\nimport { cn } from \"../../lib/utils\";\nimport { buttonVariants } from \"./button\";\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\"text-lg font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return <AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant: \"outline\" }), className)}\n {...props}\n />\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"]}
|