@plasmicpkgs/radix-ui 0.0.17 → 0.0.20

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.
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ui.cjs.production.min.js","sources":["../src/util.tsx","../src/reg-util.ts","../src/popover.tsx","../src/dialog.tsx","../src/tooltip.tsx","../src/index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactElement, ReactNode, useState } from \"react\";\nimport { omit, pick } from \"remeda\";\nimport { CodeComponentMeta } from \"@plasmicapp/host\";\nimport { DialogProps } from \"@radix-ui/react-dialog\";\n\nconst DEBUG_SLOWDOWN = 1;\n\nexport const enterAnims = [\n \"fade-in\",\n \"zoom-enter\",\n \"slide-in-from-top\",\n \"slide-in-from-right\",\n \"slide-in-from-bottom\",\n \"slide-in-from-left\",\n] as const;\nexport type EnterAnim = typeof enterAnims[number];\nexport const exitAnims = [\n \"fade-out\",\n \"zoom-exit\",\n \"slide-out-to-top\",\n \"slide-out-to-right\",\n \"slide-out-to-bottom\",\n \"slide-out-to-left\",\n] as const;\nexport type ExitAnim = typeof exitAnims[number];\nexport type AnimName = EnterAnim | ExitAnim;\n\n// https://github.com/reactwg/react-18/discussions/111#discussioncomment-1517837\nlet id = 0;\nexport const useId = (React as any).useId ?? (() => useState(() => \"\" + id++));\n\n/** Allow attaching pseudoclasses and other CSS selectors to this unique component instance */\nexport const StyleWrapper = ({\n children,\n cssStr,\n}: {\n children: (dynClass: string | undefined) => ReactElement;\n cssStr: string;\n}) => {\n const dynClass = \"pd__\" + useId().replace(/:/g, \"\");\n return (\n <>\n {children(dynClass)}\n <style>{dynClass ? cssStr.replace(/&/g, `.${dynClass}`) : \"\"}</style>\n </>\n );\n};\nexport type AnimatedProps = {\n enterAnimations?: EnterAnim[];\n exitAnimations?: ExitAnim[];\n enterDuration?: number;\n exitDuration?: number;\n enterOpacity?: number;\n exitOpacity?: number;\n enterScale?: number;\n exitScale?: number;\n enterTranslateX?: string;\n exitTranslateX?: string;\n enterTranslateY?: string;\n exitTranslateY?: string;\n enterTiming?: string;\n exitTiming?: string;\n enterDelay?: number;\n exitDelay?: number;\n};\nexport const Animated = ({\n children,\n enterAnimations = [\"fade-in\"],\n exitAnimations = [\"fade-out\"],\n enterDuration = 0.15 * DEBUG_SLOWDOWN,\n exitDuration = 0.15 * DEBUG_SLOWDOWN,\n enterOpacity = 0,\n exitOpacity = 0,\n enterScale = 0.95,\n exitScale = 0.95,\n enterTranslateX = \"100%\",\n exitTranslateX = \"100%\",\n enterTranslateY = \"100%\",\n exitTranslateY = \"100%\",\n enterTiming = \"ease-out\",\n exitTiming = \"ease-out\",\n enterDelay = 0,\n exitDelay = 0,\n}: AnimatedProps & {\n children: (dynClass: string | undefined) => ReactElement;\n}) => {\n const pct = (x: number | string) =>\n typeof x === \"number\" || x?.match(/.*\\d$/) ? x + \"%\" : x;\n const neg = (x: string) => (x.startsWith(\"-\") ? x : \"-\" + x);\n const animations: Record<AnimName, string> = {\n \"fade-in\": `--tw-enter-opacity: ${enterOpacity};`,\n \"fade-out\": `--tw-exit-opacity: ${exitOpacity};`,\n \"slide-in-from-top\": `--tw-enter-translate-y: ${neg(\n pct(enterTranslateY)\n )};`,\n \"slide-out-to-top\": `--tw-exit-translate-y: ${neg(pct(exitTranslateY))};`,\n \"slide-in-from-right\": `--tw-enter-translate-x: ${pct(enterTranslateX)};`,\n \"slide-out-to-right\": `--tw-exit-translate-x: ${pct(exitTranslateX)};`,\n \"slide-in-from-bottom\": `--tw-enter-translate-y: ${pct(enterTranslateY)};`,\n \"slide-out-to-bottom\": `--tw-exit-translate-y: ${pct(exitTranslateY)};`,\n \"slide-in-from-left\": `--tw-enter-translate-x: ${neg(\n pct(enterTranslateX)\n )};`,\n \"slide-out-to-left\": `--tw-exit-translate-x: ${neg(pct(exitTranslateX))};`,\n \"zoom-enter\": `--tw-enter-scale: ${enterScale};`,\n \"zoom-exit\": `--tw-exit-scale: ${exitScale};`,\n };\n return (\n <StyleWrapper\n cssStr={`\n &&[data-state=closed] {\n animation-duration: ${exitDuration}s;\n animation-timing-function: ${exitTiming};\n animation-delay: ${exitDelay};\n ${exitAnimations\n .map((exitAnimation) => animations[exitAnimation] ?? \"\")\n .join(\" \")}\n }\n &&,\n &&[data-state=open] {\n animation-duration: ${enterDuration}s;\n animation-timing-function: ${enterTiming};\n animation-delay: ${enterDelay};\n ${enterAnimations\n .map((enterAnimation) => animations[enterAnimation] ?? \"\")\n .join(\" \")}\n }\n `}\n >\n {children}\n </StyleWrapper>\n );\n};\n\nexport function splitAnimProps<T extends AnimatedProps>(\n props: T\n): [AnimatedProps, Omit<T, keyof AnimatedProps>] {\n const keys = [\n \"enterAnimations\",\n \"exitAnimations\",\n \"enterDuration\",\n \"exitDuration\",\n \"enterTranslateX\",\n \"exitTranslateX\",\n \"enterTranslateY\",\n \"exitTranslateY\",\n \"enterTiming\",\n \"exitTiming\",\n \"enterDelay\",\n \"exitDelay\",\n \"enterScale\",\n \"exitScale\",\n \"enterOpacity\",\n \"exitOpacity\",\n ] as const;\n const a = pick(props, keys);\n const b = omit(props, keys);\n return [a, b];\n}\n\nfunction mungeNames(names: readonly AnimName[]) {\n return names.map((name) => ({\n label: name.replace(/-/g, \" \"),\n value: name,\n }));\n}\n\nexport const animPropTypes = ({\n defaultEnterAnimations,\n defaultExitAnimations,\n}: {\n defaultEnterAnimations?: (ps: any) => EnterAnim[];\n defaultExitAnimations?: (ps: any) => ExitAnim[];\n // Need to work around the typescript v3 or v4 used in root public-packages via tsdx\n}): any => {\n const getEnterAnimations = (ps: any) =>\n ps.enterAnimations ?? defaultEnterAnimations;\n const getExitAnimations = (ps: any) =>\n ps.exitAnimations ?? defaultExitAnimations;\n const props: CodeComponentMeta<AnimatedProps>[\"props\"] = {\n enterAnimations: {\n type: \"choice\",\n options: mungeNames(enterAnims),\n multiSelect: true,\n defaultValueHint: defaultEnterAnimations ?? [\"fade-in\"],\n },\n exitAnimations: {\n type: \"choice\",\n options: mungeNames(exitAnims),\n multiSelect: true,\n defaultValueHint: defaultExitAnimations ?? [\"fade-out\"],\n },\n enterDuration: { type: \"number\", defaultValueHint: 0.15 },\n exitDuration: { type: \"number\", defaultValueHint: 0.15 },\n enterTranslateX: {\n type: \"string\",\n defaultValueHint: \"100%\",\n hidden: (ps) =>\n !getEnterAnimations(ps)?.includes(\"slide-in-from-right\") &&\n !getEnterAnimations(ps)?.includes(\"slide-in-from-left\"),\n },\n exitTranslateX: {\n type: \"string\",\n defaultValueHint: \"100%\",\n hidden: (ps) =>\n !getExitAnimations(ps)?.includes(\"slide-out-to-right\") &&\n !getExitAnimations(ps)?.includes(\"slide-out-to-left\"),\n },\n enterTranslateY: {\n type: \"string\",\n defaultValueHint: \"100%\",\n hidden: (ps) =>\n !getEnterAnimations(ps)?.includes(\"slide-in-from-bottom\") &&\n !getEnterAnimations(ps)?.includes(\"slide-in-from-top\"),\n },\n exitTranslateY: {\n type: \"string\",\n defaultValueHint: \"100%\",\n hidden: (ps) =>\n !getExitAnimations(ps)?.includes(\"slide-out-to-bottom\") &&\n !getExitAnimations(ps)?.includes(\"slide-out-to-top\"),\n },\n enterOpacity: {\n type: \"number\",\n defaultValueHint: 0,\n hidden: (ps) => !getEnterAnimations(ps)?.includes(\"fade-in\"),\n },\n exitOpacity: {\n type: \"number\",\n defaultValueHint: 0,\n hidden: (ps) => !getExitAnimations(ps)?.includes(\"fade-out\"),\n },\n enterScale: {\n type: \"number\",\n defaultValueHint: 0.95,\n hidden: (ps) => !getEnterAnimations(ps)?.includes(\"zoom-enter\"),\n },\n exitScale: {\n type: \"number\",\n defaultValueHint: 0.95,\n hidden: (ps) => !getExitAnimations(ps)?.includes(\"zoom-exit\"),\n },\n enterDelay: { type: \"number\", advanced: true, defaultValueHint: 0 },\n exitDelay: { type: \"number\", advanced: true, defaultValueHint: 0 },\n enterTiming: {\n type: \"string\",\n advanced: true,\n defaultValueHint: \"ease-out\",\n ...({\n suggestions: [\"linear\", \"ease\", \"ease-in\", \"ease-out\", \"ease-in-out\"],\n } as any),\n },\n exitTiming: {\n type: \"string\",\n advanced: true,\n defaultValueHint: \"ease-out\",\n ...({\n suggestions: [\"linear\", \"ease\", \"ease-in\", \"ease-out\", \"ease-in-out\"],\n } as any),\n },\n };\n return props;\n};\n\nexport const overlayStates = {\n open: {\n type: \"writable\",\n valueProp: \"open\",\n onChangeProp: \"onOpenChange\",\n variableType: \"boolean\",\n },\n} as const;\n\nexport const overlayProps = ({\n defaultSlotContent,\n triggerSlotName,\n openDisplay,\n}: {\n defaultSlotContent: any;\n triggerSlotName: string;\n openDisplay?: string;\n // Need to work around the typescript v3 or v4 used in root public-packages via tsdx\n}): any => {\n const props: CodeComponentMeta<DialogProps>[\"props\"] = {\n open: {\n type: \"boolean\",\n displayName: openDisplay,\n editOnly: true,\n uncontrolledProp: \"defaultOpen\",\n },\n modal: {\n type: \"boolean\",\n advanced: true,\n description:\n \"Disable interaction with outside elements. Only popover content will be visible to screen readers.\",\n },\n onOpenChange: {\n type: \"eventHandler\",\n argTypes: [\n {\n type: \"boolean\",\n name: \"open\",\n },\n ],\n },\n [triggerSlotName]: {\n type: \"slot\",\n defaultValue: [defaultSlotContent],\n ...({\n mergeWithParent: true,\n } as any),\n },\n themeResetClass: { type: \"themeResetClass\" },\n };\n return props;\n};\n\nexport function prefixClasses(x: string) {\n return x\n .trim()\n .split(/\\s+/g)\n .map((part) => `pl__${part}`)\n .join(\" \");\n}\n\n// Be careful formatting this!\n// Note that these are magically prepended with pl__\nconst prefixedBaseStyles = `\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n}\n.h-full {\n height: 100%;\n}\n.z-50 { z-index: 50; }\n.fixed { position: fixed; }\n.inset-0 { top: 0; left: 0; right: 0; bottom: 0; }\n.bottom-0 {\n bottom: 0px;\n}\n.left-0 {\n left: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.right-4 {\n right: 1rem;\n}\n.top-4 {\n top: 1rem;\n}\n.h-4 { height: 1rem; }\n.w-4 { width: 1rem; }\n.outline-none { outline: none; }\n\n@keyframes plsmc-enter {\n\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n\n@keyframes plsmc-exit {\n\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n.animate-in,\n.data-\\\\[state\\\\=open\\\\]\\\\:animate-in[data-state=open] {\n animation-name: plsmc-enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n.animate-out,\n.data-\\\\[state\\\\=closed\\\\]\\\\:animate-out[data-state=closed] {\n animation-name: plsmc-exit;\n animation-duration: 150ms;\n --tw-exit-opacity: initial;\n --tw-exit-scale: initial;\n --tw-exit-rotate: initial;\n --tw-exit-translate-x: initial;\n --tw-exit-translate-y: initial;\n}\n.data-\\\\[side\\\\=bottom\\\\]\\\\:slide-in-from-top-2[data-side=bottom] {\n --tw-enter-translate-y: -0.5rem;\n}\n\n.data-\\\\[side\\\\=left\\\\]\\\\:slide-in-from-right-2[data-side=left] {\n --tw-enter-translate-x: 0.5rem;\n}\n\n.data-\\\\[side\\\\=right\\\\]\\\\:slide-in-from-left-2[data-side=right] {\n --tw-enter-translate-x: -0.5rem;\n}\n\n.data-\\\\[side\\\\=top\\\\]\\\\:slide-in-from-bottom-2[data-side=top] {\n --tw-enter-translate-y: 0.5rem;\n}\n\n`.replace(/\\n\\./g, \".pl__\");\n\nexport function BaseStyles() {\n // return <style>{prefixedBaseStyles}</style>;\n return <style dangerouslySetInnerHTML={{ __html: prefixedBaseStyles }} />;\n}\n\nexport const popoverProps = {\n side: {\n type: \"choice\",\n options: [\"top\", \"bottom\", \"left\", \"right\"] as string[],\n defaultValueHint: \"bottom\",\n },\n sideOffset: {\n type: \"number\",\n defaultValueHint: 4,\n advanced: true,\n },\n align: {\n type: \"choice\",\n options: [\"center\", \"start\", \"end\"] as string[],\n defaultValueHint: \"center\",\n },\n alignOffset: {\n type: \"number\",\n defaultValueHint: 0,\n advanced: true,\n },\n ...animPropTypes({\n defaultEnterAnimations: () => [\"fade-in\", \"zoom-enter\"],\n defaultExitAnimations: () => [\"fade-out\", \"zoom-exit\"],\n }),\n slideIn: {\n type: \"boolean\",\n defaultValueHint: true,\n description:\n \"Add additional subtle slide-in animation on reveal, which can depend on where the tooltip is dynamically placed.\",\n },\n} as const;\nexport type PopoverExtraProps = AnimatedProps & {\n themeResetClass?: string;\n overlay?: ReactNode;\n slideIn?: boolean;\n};\n","import React from \"react\";\nimport {\n ComponentMeta,\n default as registerComponent,\n} from \"@plasmicapp/host/registerComponent\";\nimport {\n default as registerGlobalContext,\n GlobalContextMeta,\n} from \"@plasmicapp/host/registerGlobalContext\";\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n};\n\nexport function makeRegisterComponent<T extends React.ComponentType<any>>(\n component: T,\n meta: ComponentMeta<React.ComponentProps<T>>\n) {\n return function (loader?: Registerable) {\n registerComponentHelper(loader, component, meta);\n };\n}\n\nexport function makeRegisterGlobalContext<T extends React.ComponentType<any>>(\n component: T,\n meta: GlobalContextMeta<React.ComponentProps<T>>\n) {\n return function (loader?: Registerable) {\n if (loader) {\n loader.registerGlobalContext(component, meta);\n } else {\n registerGlobalContext(component, meta);\n }\n };\n}\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: ComponentMeta<React.ComponentProps<T>>\n) {\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n}\n","import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport clsx from \"clsx\";\nimport {\n Animated,\n BaseStyles,\n overlayProps,\n overlayStates,\n PopoverExtraProps,\n popoverProps,\n prefixClasses,\n splitAnimProps,\n} from \"./util\";\nimport { Registerable, registerComponentHelper } from \"./reg-util\";\n\nexport function Popover({\n // root\n open,\n onOpenChange,\n defaultOpen,\n modal,\n\n // content\n className,\n sideOffset = 4,\n themeResetClass,\n overlay,\n slideIn = true,\n\n // trigger/anchor\n trigger = true,\n children,\n\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content> &\n PopoverPrimitive.PopoverProps &\n PopoverExtraProps & {\n trigger?: boolean;\n }) {\n const [animProps, rest] = splitAnimProps(props);\n return (\n <Animated\n enterAnimations={[\"fade-in\", \"zoom-enter\"]}\n exitAnimations={[\"fade-out\", \"zoom-exit\"]}\n {...animProps}\n >\n {(dynClass) => (\n <PopoverPrimitive.Root\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n modal={modal}\n >\n {trigger ? (\n <PopoverPrimitive.Trigger asChild>\n {children}\n </PopoverPrimitive.Trigger>\n ) : (\n <PopoverPrimitive.Anchor asChild>\n {children}\n </PopoverPrimitive.Anchor>\n )}\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n className={clsx(\n prefixClasses(\n \"outline-none data-[state=open]:animate-in data-[state=closed]:animate-out\"\n ),\n slideIn\n ? prefixClasses(\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\"\n )\n : \"\",\n dynClass ? dynClass : \"\",\n className,\n themeResetClass\n )}\n sideOffset={sideOffset}\n {...rest}\n >\n {overlay}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n <BaseStyles />\n </PopoverPrimitive.Root>\n )}\n </Animated>\n );\n}\nPopover.displayName = \"PlasmicRadixPopover\";\n\nexport function registerPopover(PLASMIC?: Registerable) {\n registerComponentHelper(PLASMIC, Popover, {\n name: \"hostless-radix-popover\",\n displayName: \"Popover\",\n importPath: \"@plasmicpkgs/radix-ui/popover\",\n importName: \"Popover\",\n states: overlayStates,\n props: {\n ...overlayProps({\n triggerSlotName: \"children\",\n defaultSlotContent: {\n type: \"default-component\",\n kind: \"button\",\n props: {\n children: { type: \"text\", value: `Show popover` },\n },\n },\n }),\n trigger: {\n type: \"boolean\",\n displayName: \"Trigger on click\",\n defaultValueHint: true,\n advanced: true,\n },\n ...popoverProps,\n overlay: {\n type: \"slot\",\n defaultValue: {\n type: \"vbox\",\n styles: {\n padding: \"16px\",\n width: \"300px\",\n maxWidth: \"100%\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"#E2E8F0\",\n backgroundColor: \"white\",\n borderRadius: \"8px\",\n boxShadow: \"0px 4px 16px 0px #00000033\",\n alignItems: \"stretch\",\n },\n children: [\"Here is the popover content.\"],\n },\n ...({\n mergeWithParent: true,\n } as any),\n },\n },\n });\n}\n","import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport { cva } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport clsx from \"clsx\";\n\nimport {\n Animated,\n AnimatedProps,\n animPropTypes,\n BaseStyles,\n EnterAnim,\n ExitAnim,\n overlayProps,\n overlayStates,\n prefixClasses,\n splitAnimProps,\n} from \"./util\";\nimport { Side } from \"@radix-ui/react-popper\";\nimport { Registerable, registerComponentHelper } from \"./reg-util\";\n\nexport const DialogClose = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Close>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>\n>((props) => (\n <DialogPrimitive.Close {...props} asChild>\n <div className={props.className}>\n {props.children ?? <X className={prefixClasses(\"h-4 w-4\")} />}\n <span className={prefixClasses(\"sr-only\")}>Close</span>\n </div>\n </DialogPrimitive.Close>\n));\nDialogClose.displayName = \"PlasmicRadixDialogClose\";\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & AnimatedProps\n>(({ className, ...props }, ref) => {\n return (\n <Animated {...props}>\n {(dynClass) => (\n <DialogPrimitive.Overlay\n className={clsx(\n [\n \"fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n ].map(prefixClasses),\n dynClass ? dynClass : \"\",\n className\n )}\n {...props}\n ref={ref}\n />\n )}\n </Animated>\n );\n});\nDialogOverlay.displayName = \"PlasmicOverlay\";\n\nexport const DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n { themeResetClass?: string } & React.ComponentPropsWithoutRef<\n typeof DialogPrimitive.Content\n > &\n AnimatedProps\n>(({ className, themeResetClass, ...props }, ref) => {\n const [animProps, rest] = splitAnimProps(props);\n\n return (\n <Animated\n {...animProps}\n enterAnimations={animProps.enterAnimations ?? [\"zoom-enter\", \"fade-in\"]}\n exitAnimations={animProps.exitAnimations ?? [\"zoom-exit\", \"fade-out\"]}\n >\n {(dynClass) => (\n <DialogPrimitive.Content\n {...rest}\n className={clsx(\n prefixClasses(\n \"fixed z-50 outline-none relative data-[state=open]:animate-in data-[state=closed]:animate-out\"\n ),\n dynClass ? dynClass : \"\",\n themeResetClass,\n className\n )}\n ref={ref}\n />\n )}\n </Animated>\n );\n});\nDialogContent.displayName = \"PlasmicRadixDialogContent\";\n\nfunction getDefaultSheetAnims(side: Side = \"right\") {\n return (\n {\n right: [\"slide-in-from-right\", \"slide-out-to-right\"],\n bottom: [\"slide-in-from-bottom\", \"slide-out-to-bottom\"],\n left: [\"slide-in-from-left\", \"slide-out-to-left\"],\n top: [\"slide-in-from-top\", \"slide-out-to-top\"],\n } as Record<Side, [EnterAnim, ExitAnim]>\n )[side];\n}\n\nexport const SheetContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> &\n AnimatedProps & { themeResetClass?: string } & VariantProps<\n typeof sheetVariants\n >\n>(({ className, themeResetClass, side = \"right\", ...props }, ref) => {\n const [defaultEnterAnimation, defaultExitAnimation] = getDefaultSheetAnims(\n side ?? \"right\"\n );\n return (\n <Animated\n {...props}\n enterAnimations={props.enterAnimations ?? [defaultEnterAnimation]}\n exitAnimations={props.exitAnimations ?? [defaultExitAnimation]}\n >\n {(dynClass) => (\n <DialogPrimitive.Content\n className={clsx(\n sheetVariants({ side }),\n dynClass ? dynClass : \"\",\n className\n )}\n {...props}\n ref={ref}\n />\n )}\n </Animated>\n );\n});\nSheetContent.displayName = \"PlasmicRadixSheetContent\";\n\nexport const sheetVariants = cva(\n prefixClasses(\n \"fixed z-50 outline-none relative data-[state=open]:animate-in data-[state=closed]:animate-out\"\n ),\n {\n variants: {\n side: {\n top: prefixClasses(\"inset-x-0 top-0\"),\n bottom: prefixClasses(\"inset-x-0 bottom-0\"),\n left: prefixClasses(\"inset-y-0 left-0 h-full\"),\n right: prefixClasses(\"inset-y-0 right-0 h-full\"),\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n }\n);\n\nexport const Dialog = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Root> & AnimatedProps,\n DialogPrimitive.DialogProps &\n DialogPrimitive.DialogOverlayProps & {\n overlayClassName?: string;\n themeResetClass?: string;\n noContain?: boolean;\n triggerSlot?: React.ReactNode;\n }\n>(\n (\n {\n open,\n onOpenChange,\n modal,\n themeResetClass,\n children,\n noContain,\n defaultOpen,\n triggerSlot,\n overlayClassName,\n ...props\n },\n ref\n ) => (\n <DialogPrimitive.Root\n open={open}\n modal={modal}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n <DialogPrimitive.Trigger asChild>{triggerSlot}</DialogPrimitive.Trigger>\n <DialogPrimitive.Portal>\n {/*\n The main benefit of containing by default is that users can apply layout to position the dialog content easily, e.g. centered on the screen.\n\n But still need noContain for Sheets, since they slide in/out, and you don't want them fading in/out just because the overlay is fading out.\n\n Cannot wrap in any extra divs or exit animations won't work!\n */}\n {noContain ? (\n <>\n <DialogOverlay\n ref={ref}\n {...props}\n className={clsx(overlayClassName, themeResetClass)}\n />\n {children}\n </>\n ) : (\n <DialogOverlay\n ref={ref}\n {...props}\n className={clsx(overlayClassName, themeResetClass)}\n >\n {children}\n </DialogOverlay>\n )}\n </DialogPrimitive.Portal>\n {/*Must be outside the portal or exit animation doesn't work*/}\n <BaseStyles />\n </DialogPrimitive.Root>\n )\n);\n\nDialog.displayName = \"PlasmicRadixDialog\";\n\nexport const DialogTitle = DialogPrimitive.Title;\n\nexport const DialogDescription = DialogPrimitive.Description;\n\nexport function registerDialog(PLASMIC?: Registerable) {\n registerComponentHelper(PLASMIC, Dialog, {\n name: \"hostless-radix-dialog\",\n displayName: \"Dialog\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"Dialog\",\n styleSections: false,\n defaultStyles: {\n // Note: unable to set position styles since Plasmic coerces to auto layout\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backdropFilter: \"blur(10px)\",\n background: \"rgba(255,255,255,0.8)\",\n },\n props: {\n ...overlayProps({\n defaultSlotContent: {\n type: \"default-component\",\n kind: \"button\",\n props: {\n children: { type: \"text\", value: `Show dialog` },\n },\n },\n triggerSlotName: \"triggerSlot\",\n }),\n overlayClassName: {\n type: \"class\",\n },\n noContain: {\n type: \"boolean\",\n advanced: true,\n description:\n \"Place the dialog content over the overlay instead of inside the overlay. Useful for separating their animations, but you also won't be able to conveniently set layout on the overlay as a parent.\",\n },\n children: {\n type: \"slot\",\n allowedComponents: [\n \"hostless-radix-sheet-content\",\n \"hostless-radix-dialog-content\",\n ],\n defaultValue: {\n type: \"component\",\n name: \"hostless-radix-dialog-content\",\n },\n },\n },\n states: overlayStates,\n });\n registerComponentHelper(PLASMIC, DialogClose, {\n name: \"hostless-radix-dialog-close\",\n displayName: \"Dialog Close\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"DialogClose\",\n parentComponentName: \"hostless-radix-dialog\",\n defaultStyles: {\n position: \"absolute\",\n top: \"16px\",\n right: \"16px\",\n opacity: \"0.7\",\n borderRadius: \"999px\",\n },\n props: {\n children: {\n type: \"slot\",\n hidePlaceholder: true,\n },\n },\n });\n const dialogStyles = {\n width: \"400px\",\n maxWidth: \"100%\",\n background: \"rgb(255,255,255)\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"#E2E8F0\",\n boxShadow: \"0px 4px 16px 0px #00000033\",\n };\n registerComponentHelper(PLASMIC, SheetContent, {\n name: \"hostless-radix-sheet-content\",\n displayName: \"Drawer Content\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"SheetContent\",\n parentComponentName: \"hostless-radix-dialog\",\n defaultStyles: {\n // Positions can sometimes take effect since these can be implicitly inserted as children of other default content, thus escaping Plasmic's layout coersion.\n position: \"fixed\",\n top: 0,\n right: 0,\n bottom: 0,\n padding: \"16px\",\n ...dialogStyles,\n },\n props: {\n side: {\n type: \"choice\",\n options: [\"right\", \"bottom\", \"left\", \"top\"],\n defaultValueHint: \"right\",\n },\n themeResetClass: { type: \"themeResetClass\" },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"vbox\",\n styles: {\n alignItems: \"stretch\",\n gap: \"8px\",\n },\n children: [\n {\n type: \"component\",\n name: \"hostless-radix-dialog-title\",\n },\n {\n type: \"component\",\n name: \"hostless-radix-dialog-description\",\n },\n ],\n },\n {\n type: \"component\",\n name: \"hostless-radix-dialog-close\",\n },\n ],\n },\n ...animPropTypes({\n defaultEnterAnimations: (ps) => [getDefaultSheetAnims(ps.side)[0]],\n defaultExitAnimations: (ps) => [getDefaultSheetAnims(ps.side)[1]],\n }),\n },\n });\n registerComponentHelper(PLASMIC, DialogContent, {\n name: \"hostless-radix-dialog-content\",\n displayName: \"Dialog Content\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"DialogContent\",\n parentComponentName: \"hostless-radix-dialog\",\n defaultStyles: {\n // No need for position here, just relying on layout container parent.\n padding: \"24px\",\n borderRadius: \"8px\",\n ...dialogStyles,\n },\n props: {\n themeResetClass: { type: \"themeResetClass\" },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"vbox\",\n styles: {\n alignItems: \"stretch\",\n gap: \"8px\",\n },\n children: [\n {\n type: \"component\",\n name: \"hostless-radix-dialog-title\",\n },\n {\n type: \"component\",\n name: \"hostless-radix-dialog-description\",\n },\n ],\n },\n {\n type: \"component\",\n name: \"hostless-radix-dialog-close\",\n },\n ],\n },\n ...animPropTypes({\n defaultEnterAnimations: () => [\"zoom-enter\", \"fade-in\"],\n defaultExitAnimations: () => [\"zoom-exit\", \"fade-out\"],\n }),\n },\n });\n registerComponentHelper(PLASMIC, DialogTitle, {\n name: \"hostless-radix-dialog-title\",\n displayName: \"Dialog Title\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"DialogTitle\",\n parentComponentName: \"hostless-radix-dialog\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: \"Sheet title\",\n },\n },\n });\n registerComponentHelper(PLASMIC, DialogDescription, {\n name: \"hostless-radix-dialog-description\",\n displayName: \"Dialog Description\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"DialogDescription\",\n parentComponentName: \"hostless-radix-dialog\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: \"Sheet description\",\n },\n },\n });\n}\n","import * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport clsx from \"clsx\";\nimport {\n Animated,\n BaseStyles,\n overlayProps,\n PopoverExtraProps,\n popoverProps,\n prefixClasses,\n splitAnimProps,\n} from \"./util\";\nimport { Registerable, registerComponentHelper } from \"./reg-util\";\n\nexport const Tooltip = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> &\n TooltipPrimitive.TooltipProps &\n PopoverExtraProps\n>(\n (\n {\n // content & custom\n className,\n sideOffset = 4,\n themeResetClass,\n slideIn = true,\n overlay,\n\n // root\n delayDuration,\n disableHoverableContent,\n open,\n onOpenChange,\n defaultOpen,\n\n // trigger/anchor\n children,\n\n ...props\n },\n ref\n ) => {\n const [animProps, rest] = splitAnimProps(props);\n return (\n <Animated\n enterAnimations={[\"fade-in\", \"zoom-enter\"]}\n exitAnimations={[\"fade-out\", \"zoom-exit\"]}\n {...animProps}\n >\n {(dynClass) => (\n <TooltipPrimitive.Provider>\n <TooltipPrimitive.Root\n {...{\n delayDuration,\n disableHoverableContent,\n open,\n onOpenChange,\n defaultOpen,\n }}\n >\n <TooltipPrimitive.Trigger asChild>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={clsx(\n prefixClasses(\"animate-in data-[state=closed]:animate-out\"),\n slideIn\n ? prefixClasses(\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\"\n )\n : \"\",\n dynClass ? dynClass : \"\",\n className,\n themeResetClass\n )}\n {...rest}\n >\n {overlay}\n </TooltipPrimitive.Content>\n <BaseStyles />\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n )}\n </Animated>\n );\n }\n);\nTooltip.displayName = \"PlasmicRadixTooltip\";\n\nexport function registerTooltip(PLASMIC?: Registerable) {\n registerComponentHelper(PLASMIC, Tooltip, {\n name: \"hostless-radix-tooltip\",\n displayName: \"Tooltip\",\n importPath: \"@plasmicpkgs/radix-ui/tooltip\",\n importName: \"Tooltip\",\n props: {\n ...overlayProps({\n triggerSlotName: \"children\",\n defaultSlotContent: { type: \"text\", value: \"I have a tooltip.\" },\n openDisplay: \"Preview open\",\n }),\n ...popoverProps,\n overlay: {\n type: \"slot\",\n defaultValue: {\n type: \"vbox\",\n styles: {\n padding: \"16px\",\n width: \"300px\",\n maxWidth: \"100%\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"#E2E8F0\",\n backgroundColor: \"white\",\n borderRadius: \"8px\",\n boxShadow: \"0px 4px 16px 0px #00000033\",\n alignItems: \"stretch\",\n },\n children: [\"Here is the tooltip content.\"],\n },\n ...({\n mergeWithParent: true,\n } as any),\n },\n },\n });\n}\n","import { Registerable } from \"./reg-util\";\nimport { registerPopover } from \"./popover\";\nimport { registerDialog } from \"./dialog\";\nimport { registerTooltip } from \"./tooltip\";\n\nexport function registerAll(PLASMIC?: Registerable) {\n registerPopover(PLASMIC);\n registerDialog(PLASMIC);\n registerTooltip(PLASMIC);\n}\n\nexport * from \"./dialog\";\nexport * from \"./popover\";\nexport * from \"./tooltip\";\nexport { popoverProps } from \"./util\";\nexport { PopoverExtraProps } from \"./util\";\n"],"names":["enterAnims","exitAnims","id","useId","_React$useId","React","useState","StyleWrapper","_ref","children","cssStr","dynClass","replace","Animated","_ref2","_ref2$enterAnimations","enterAnimations","_ref2$exitAnimations","exitAnimations","_ref2$enterDuration","enterDuration","_ref2$exitDuration","exitDuration","_ref2$enterOpacity","enterOpacity","_ref2$exitOpacity","exitOpacity","_ref2$enterScale","enterScale","_ref2$exitScale","exitScale","_ref2$enterTranslateX","enterTranslateX","_ref2$exitTranslateX","exitTranslateX","_ref2$enterTranslateY","enterTranslateY","_ref2$exitTranslateY","exitTranslateY","_ref2$enterTiming","enterTiming","_ref2$exitTiming","exitTiming","_ref2$enterDelay","enterDelay","_ref2$exitDelay","exitDelay","pct","x","match","neg","startsWith","animations","fade-in","fade-out","slide-in-from-top","slide-out-to-top","slide-in-from-right","slide-out-to-right","slide-in-from-bottom","slide-out-to-bottom","slide-in-from-left","slide-out-to-left","zoom-enter","zoom-exit","map","exitAnimation","_animations$exitAnima","join","enterAnimation","_animations$enterAnim","splitAnimProps","props","keys","pick","omit","mungeNames","names","name","label","value","animPropTypes","_ref3","defaultEnterAnimations","defaultExitAnimations","getEnterAnimations","ps","_ps$enterAnimations","getExitAnimations","_ps$exitAnimations","type","options","multiSelect","defaultValueHint","hidden","_getEnterAnimations","_getEnterAnimations2","includes","_getExitAnimations","_getExitAnimations2","_getEnterAnimations3","_getEnterAnimations4","_getExitAnimations3","_getExitAnimations4","_getEnterAnimations5","_getExitAnimations5","_getEnterAnimations6","_getExitAnimations6","advanced","_extends","suggestions","overlayStates","open","valueProp","onChangeProp","variableType","overlayProps","_ref4","_props","displayName","openDisplay","editOnly","uncontrolledProp","modal","description","onOpenChange","argTypes","triggerSlotName","defaultValue","defaultSlotContent","mergeWithParent","themeResetClass","prefixClasses","trim","split","part","prefixedBaseStyles","BaseStyles","dangerouslySetInnerHTML","__html","popoverProps","side","sideOffset","align","alignOffset","slideIn","registerComponentHelper","loader","component","meta","registerComponent","Popover","defaultOpen","className","_ref$sideOffset","overlay","_ref$slideIn","_ref$trigger","trigger","_splitAnimProps","_objectWithoutPropertiesLoose","_excluded","rest","PopoverPrimitive","asChild","clsx","registerPopover","PLASMIC","importPath","importName","states","kind","styles","padding","width","maxWidth","borderWidth","borderStyle","borderColor","backgroundColor","borderRadius","boxShadow","alignItems","DialogClose","_props$children","DialogPrimitive","X","DialogOverlay","ref","DialogContent","_excluded2","animProps","_animProps$enterAnima","_animProps$exitAnimat","getDefaultSheetAnims","right","bottom","left","top","SheetContent","_ref3$side","_excluded3","_getDefaultSheetAnims","_props$enterAnimation","_props$exitAnimations","sheetVariants","cva","variants","defaultVariants","Dialog","noContain","triggerSlot","overlayClassName","_excluded4","DialogTitle","DialogDescription","registerDialog","styleSections","defaultStyles","display","justifyContent","backdropFilter","background","allowedComponents","parentComponentName","position","opacity","hidePlaceholder","dialogStyles","gap","Tooltip","delayDuration","disableHoverableContent","TooltipPrimitive","registerTooltip"],"mappings":"00BAMA,IAEaA,EAAa,CACxB,UACA,aACA,oBACA,sBACA,uBACA,sBAGWC,EAAY,CACvB,WACA,YACA,mBACA,qBACA,sBACA,qBAMEC,EAAK,EACIC,SAAKC,EAAIC,SAAmBD,EAAK,WAAA,OAAME,YAAS,WAAA,MAAM,GAAKJ,QAG3DK,EAAe,SAAHC,OACvBC,EAAQD,EAARC,SACAC,EAAMF,EAANE,OAKMC,EAAW,OAASR,IAAQS,QAAQ,KAAM,IAChD,OACEP,gCACGI,EAASE,GACVN,6BAAQM,EAAWD,EAAOE,QAAQ,SAAUD,GAAc,MAsBnDE,EAAW,SAAHC,OACnBL,EAAQK,EAARL,SAAQM,EAAAD,EACRE,gBAAAA,WAAeD,EAAG,CAAC,WAAUA,EAAAE,EAAAH,EAC7BI,eAAAA,WAAcD,EAAG,CAAC,YAAWA,EAAAE,EAAAL,EAC7BM,cAAAA,WAAaD,EAAG,IAAqBA,EAAAE,EAAAP,EACrCQ,aAAAA,WAAYD,EAAG,IAAqBA,EAAAE,EAAAT,EACpCU,aAAgBC,EAAAX,EAChBY,YAAeC,EAAAb,EACfc,WAAAA,WAAUD,EAAG,IAAIA,EAAAE,EAAAf,EACjBgB,UAAAA,WAASD,EAAG,IAAIA,EAAAE,EAAAjB,EAChBkB,gBAAAA,WAAeD,EAAG,OAAMA,EAAAE,EAAAnB,EACxBoB,eAAAA,WAAcD,EAAG,OAAMA,EAAAE,EAAArB,EACvBsB,gBAAAA,WAAeD,EAAG,OAAMA,EAAAE,EAAAvB,EACxBwB,eAAAA,WAAcD,EAAG,OAAMA,EAAAE,EAAAzB,EACvB0B,YAAAA,WAAWD,EAAG,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EAAgBnE"}
1
+ {"version":3,"file":"radix-ui.cjs.production.min.js","sources":["../src/util.tsx","../src/reg-util.ts","../src/popover.tsx","../src/dialog.tsx","../src/tooltip.tsx","../src/index.tsx"],"sourcesContent":["import { CodeComponentMeta } from \"@plasmicapp/host\";\nimport { DialogProps } from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\nimport { ReactElement, ReactNode, useState } from \"react\";\nimport { omit, pick } from \"remeda\";\n\nconst DEBUG_SLOWDOWN = 1;\n\nexport const enterAnims = [\n \"fade-in\",\n \"zoom-enter\",\n \"slide-in-from-top\",\n \"slide-in-from-right\",\n \"slide-in-from-bottom\",\n \"slide-in-from-left\",\n] as const;\nexport type EnterAnim = (typeof enterAnims)[number];\nexport const exitAnims = [\n \"fade-out\",\n \"zoom-exit\",\n \"slide-out-to-top\",\n \"slide-out-to-right\",\n \"slide-out-to-bottom\",\n \"slide-out-to-left\",\n] as const;\nexport type ExitAnim = (typeof exitAnims)[number];\nexport type AnimName = EnterAnim | ExitAnim;\n\n// https://github.com/reactwg/react-18/discussions/111#discussioncomment-1517837\nlet id = 0;\nexport const useId = (React as any).useId ?? (() => useState(() => \"\" + id++));\n\n/** Allow attaching pseudoclasses and other CSS selectors to this unique component instance */\nexport const StyleWrapper = ({\n children,\n cssStr,\n}: {\n children: (dynClass: string | undefined) => ReactElement;\n cssStr: string;\n}) => {\n const dynClass = \"pd__\" + useId().replace(/:/g, \"\");\n return (\n <>\n {children(dynClass)}\n <style>{dynClass ? cssStr.replace(/&/g, `.${dynClass}`) : \"\"}</style>\n </>\n );\n};\nexport type AnimatedProps = {\n enterAnimations?: EnterAnim[];\n exitAnimations?: ExitAnim[];\n enterDuration?: number;\n exitDuration?: number;\n enterOpacity?: number;\n exitOpacity?: number;\n enterScale?: number;\n exitScale?: number;\n enterTranslateX?: string;\n exitTranslateX?: string;\n enterTranslateY?: string;\n exitTranslateY?: string;\n enterTiming?: string;\n exitTiming?: string;\n enterDelay?: number;\n exitDelay?: number;\n};\nexport const Animated = ({\n children,\n enterAnimations = [\"fade-in\"],\n exitAnimations = [\"fade-out\"],\n enterDuration = 0.15 * DEBUG_SLOWDOWN,\n exitDuration = 0.15 * DEBUG_SLOWDOWN,\n enterOpacity = 0,\n exitOpacity = 0,\n enterScale = 0.95,\n exitScale = 0.95,\n enterTranslateX = \"100%\",\n exitTranslateX = \"100%\",\n enterTranslateY = \"100%\",\n exitTranslateY = \"100%\",\n enterTiming = \"ease-out\",\n exitTiming = \"ease-out\",\n enterDelay = 0,\n exitDelay = 0,\n}: AnimatedProps & {\n children: (dynClass: string | undefined) => ReactElement;\n}) => {\n const pct = (x: number | string) =>\n typeof x === \"number\" || x?.match(/.*\\d$/) ? x + \"%\" : x;\n const neg = (x: string) => (x.startsWith(\"-\") ? x : \"-\" + x);\n const animations: Record<AnimName, string> = {\n \"fade-in\": `--tw-enter-opacity: ${enterOpacity};`,\n \"fade-out\": `--tw-exit-opacity: ${exitOpacity};`,\n \"slide-in-from-top\": `--tw-enter-translate-y: ${neg(\n pct(enterTranslateY)\n )};`,\n \"slide-out-to-top\": `--tw-exit-translate-y: ${neg(pct(exitTranslateY))};`,\n \"slide-in-from-right\": `--tw-enter-translate-x: ${pct(enterTranslateX)};`,\n \"slide-out-to-right\": `--tw-exit-translate-x: ${pct(exitTranslateX)};`,\n \"slide-in-from-bottom\": `--tw-enter-translate-y: ${pct(enterTranslateY)};`,\n \"slide-out-to-bottom\": `--tw-exit-translate-y: ${pct(exitTranslateY)};`,\n \"slide-in-from-left\": `--tw-enter-translate-x: ${neg(\n pct(enterTranslateX)\n )};`,\n \"slide-out-to-left\": `--tw-exit-translate-x: ${neg(pct(exitTranslateX))};`,\n \"zoom-enter\": `--tw-enter-scale: ${enterScale};`,\n \"zoom-exit\": `--tw-exit-scale: ${exitScale};`,\n };\n return (\n <StyleWrapper\n cssStr={`\n &&[data-state=closed] {\n animation-duration: ${exitDuration}s;\n animation-timing-function: ${exitTiming};\n animation-delay: ${exitDelay};\n ${exitAnimations\n .map((exitAnimation) => animations[exitAnimation] ?? \"\")\n .join(\" \")}\n }\n &&,\n &&[data-state=open] {\n animation-duration: ${enterDuration}s;\n animation-timing-function: ${enterTiming};\n animation-delay: ${enterDelay};\n ${enterAnimations\n .map((enterAnimation) => animations[enterAnimation] ?? \"\")\n .join(\" \")}\n }\n `}\n >\n {children}\n </StyleWrapper>\n );\n};\n\nexport function splitAnimProps<T extends AnimatedProps>(\n props: T\n): [AnimatedProps, Omit<T, keyof AnimatedProps>] {\n const keys = [\n \"enterAnimations\",\n \"exitAnimations\",\n \"enterDuration\",\n \"exitDuration\",\n \"enterTranslateX\",\n \"exitTranslateX\",\n \"enterTranslateY\",\n \"exitTranslateY\",\n \"enterTiming\",\n \"exitTiming\",\n \"enterDelay\",\n \"exitDelay\",\n \"enterScale\",\n \"exitScale\",\n \"enterOpacity\",\n \"exitOpacity\",\n ] as const;\n const a = pick(props, keys);\n const b = omit(props, keys);\n return [a, b];\n}\n\nfunction mungeNames(names: readonly AnimName[]) {\n return names.map((name) => ({\n label: name.replace(/-/g, \" \"),\n value: name,\n }));\n}\n\nexport const animPropTypes = ({\n defaultEnterAnimations,\n defaultExitAnimations,\n}: {\n defaultEnterAnimations?: (ps: any) => EnterAnim[];\n defaultExitAnimations?: (ps: any) => ExitAnim[];\n // Need to work around the typescript v3 or v4 used in root public-packages via tsdx\n}): any => {\n const getEnterAnimations = (ps: any) =>\n ps.enterAnimations ?? defaultEnterAnimations?.(ps);\n const getExitAnimations = (ps: any) =>\n ps.exitAnimations ?? defaultExitAnimations?.(ps);\n const props: CodeComponentMeta<AnimatedProps>[\"props\"] = {\n enterAnimations: {\n type: \"choice\",\n options: mungeNames(enterAnims),\n multiSelect: true,\n defaultValueHint: defaultEnterAnimations ?? [\"fade-in\"],\n },\n exitAnimations: {\n type: \"choice\",\n options: mungeNames(exitAnims),\n multiSelect: true,\n defaultValueHint: defaultExitAnimations ?? [\"fade-out\"],\n },\n enterDuration: { type: \"number\", defaultValueHint: 0.15 },\n exitDuration: { type: \"number\", defaultValueHint: 0.15 },\n enterTranslateX: {\n type: \"string\",\n defaultValueHint: \"100%\",\n hidden: (ps) =>\n !getEnterAnimations(ps)?.includes(\"slide-in-from-right\") &&\n !getEnterAnimations(ps)?.includes(\"slide-in-from-left\"),\n },\n exitTranslateX: {\n type: \"string\",\n advanced: true,\n defaultValueHint: \"100%\",\n hidden: (ps) =>\n !getExitAnimations(ps)?.includes(\"slide-out-to-right\") &&\n !getExitAnimations(ps)?.includes(\"slide-out-to-left\"),\n },\n enterTranslateY: {\n type: \"string\",\n advanced: true,\n defaultValueHint: \"100%\",\n hidden: (ps) =>\n !getEnterAnimations(ps)?.includes(\"slide-in-from-bottom\") &&\n !getEnterAnimations(ps)?.includes(\"slide-in-from-top\"),\n },\n exitTranslateY: {\n type: \"string\",\n advanced: true,\n defaultValueHint: \"100%\",\n hidden: (ps) =>\n !getExitAnimations(ps)?.includes(\"slide-out-to-bottom\") &&\n !getExitAnimations(ps)?.includes(\"slide-out-to-top\"),\n },\n enterOpacity: {\n type: \"number\",\n advanced: true,\n defaultValueHint: 0,\n hidden: (ps) => !getEnterAnimations(ps)?.includes(\"fade-in\"),\n },\n exitOpacity: {\n type: \"number\",\n advanced: true,\n defaultValueHint: 0,\n hidden: (ps) => !getExitAnimations(ps)?.includes(\"fade-out\"),\n },\n enterScale: {\n type: \"number\",\n advanced: true,\n defaultValueHint: 0.95,\n hidden: (ps) => !getEnterAnimations(ps)?.includes(\"zoom-enter\"),\n },\n exitScale: {\n type: \"number\",\n advanced: true,\n defaultValueHint: 0.95,\n hidden: (ps) => !getExitAnimations(ps)?.includes(\"zoom-exit\"),\n },\n enterDelay: { type: \"number\", advanced: true, defaultValueHint: 0 },\n exitDelay: { type: \"number\", advanced: true, defaultValueHint: 0 },\n enterTiming: {\n type: \"string\",\n advanced: true,\n defaultValueHint: \"ease-out\",\n ...({\n suggestions: [\"linear\", \"ease\", \"ease-in\", \"ease-out\", \"ease-in-out\"],\n } as any),\n },\n exitTiming: {\n type: \"string\",\n advanced: true,\n defaultValueHint: \"ease-out\",\n ...({\n suggestions: [\"linear\", \"ease\", \"ease-in\", \"ease-out\", \"ease-in-out\"],\n } as any),\n },\n };\n return props;\n};\n\nexport const overlayStates = {\n open: {\n type: \"writable\",\n valueProp: \"open\",\n onChangeProp: \"onOpenChange\",\n variableType: \"boolean\",\n },\n} as const;\n\nexport const overlayProps = ({\n defaultSlotContent,\n triggerSlotName,\n openDisplay,\n}: {\n defaultSlotContent: any;\n triggerSlotName: string;\n openDisplay?: string;\n // Need to work around the typescript v3 or v4 used in root public-packages via tsdx\n}): any => {\n const props: CodeComponentMeta<DialogProps>[\"props\"] = {\n open: {\n type: \"boolean\",\n displayName: openDisplay,\n editOnly: true,\n uncontrolledProp: \"defaultOpen\",\n },\n modal: {\n type: \"boolean\",\n advanced: true,\n description:\n \"Disable interaction with outside elements. Only popover content will be visible to screen readers.\",\n },\n onOpenChange: {\n type: \"eventHandler\",\n argTypes: [\n {\n type: \"boolean\",\n name: \"open\",\n },\n ],\n },\n [triggerSlotName]: {\n type: \"slot\",\n defaultValue: [defaultSlotContent],\n ...({\n mergeWithParent: true,\n } as any),\n },\n themeResetClass: { type: \"themeResetClass\" },\n };\n return props;\n};\n\nexport function prefixClasses(x: string) {\n return x\n .trim()\n .split(/\\s+/g)\n .map((part) => `pl__${part}`)\n .join(\" \");\n}\n\n// Be careful formatting this!\n// Note that these are magically prepended with pl__\nconst prefixedBaseStyles = `\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n}\n.h-full {\n height: 100%;\n}\n.z-50 { z-index: 50; }\n.fixed { position: fixed; }\n.inset-0 { top: 0; left: 0; right: 0; bottom: 0; }\n.bottom-0 {\n bottom: 0px;\n}\n.left-0 {\n left: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.right-4 {\n right: 1rem;\n}\n.top-4 {\n top: 1rem;\n}\n.h-4 { height: 1rem; }\n.w-4 { width: 1rem; }\n.outline-none { outline: none; }\n\n@keyframes plsmc-enter {\n\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n\n@keyframes plsmc-exit {\n\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n.animate-in,\n.data-\\\\[state\\\\=open\\\\]\\\\:animate-in[data-state=open] {\n animation-name: plsmc-enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n.animate-out,\n.data-\\\\[state\\\\=closed\\\\]\\\\:animate-out[data-state=closed] {\n animation-name: plsmc-exit;\n animation-duration: 150ms;\n --tw-exit-opacity: initial;\n --tw-exit-scale: initial;\n --tw-exit-rotate: initial;\n --tw-exit-translate-x: initial;\n --tw-exit-translate-y: initial;\n}\n.data-\\\\[side\\\\=bottom\\\\]\\\\:slide-in-from-top-2[data-side=bottom] {\n --tw-enter-translate-y: -0.5rem;\n}\n\n.data-\\\\[side\\\\=left\\\\]\\\\:slide-in-from-right-2[data-side=left] {\n --tw-enter-translate-x: 0.5rem;\n}\n\n.data-\\\\[side\\\\=right\\\\]\\\\:slide-in-from-left-2[data-side=right] {\n --tw-enter-translate-x: -0.5rem;\n}\n\n.data-\\\\[side\\\\=top\\\\]\\\\:slide-in-from-bottom-2[data-side=top] {\n --tw-enter-translate-y: 0.5rem;\n}\n\n`.replace(/\\n\\./g, \".pl__\");\n\nexport function BaseStyles() {\n // return <style>{prefixedBaseStyles}</style>;\n return <style dangerouslySetInnerHTML={{ __html: prefixedBaseStyles }} />;\n}\n\nexport const popoverProps = {\n side: {\n type: \"choice\",\n options: [\"top\", \"bottom\", \"left\", \"right\"] as string[],\n defaultValueHint: \"bottom\",\n },\n sideOffset: {\n type: \"number\",\n defaultValueHint: 4,\n advanced: true,\n },\n align: {\n type: \"choice\",\n options: [\"center\", \"start\", \"end\"] as string[],\n defaultValueHint: \"center\",\n },\n alignOffset: {\n type: \"number\",\n defaultValueHint: 0,\n advanced: true,\n },\n ...animPropTypes({\n defaultEnterAnimations: () => [\"fade-in\", \"zoom-enter\"],\n defaultExitAnimations: () => [\"fade-out\", \"zoom-exit\"],\n }),\n slideIn: {\n type: \"boolean\",\n defaultValueHint: true,\n description:\n \"Add additional subtle slide-in animation on reveal, which can depend on where the tooltip is dynamically placed.\",\n },\n} as const;\nexport type PopoverExtraProps = AnimatedProps & {\n themeResetClass?: string;\n overlay?: ReactNode;\n slideIn?: boolean;\n};\n","import React from \"react\";\nimport {\n ComponentMeta,\n default as registerComponent,\n} from \"@plasmicapp/host/registerComponent\";\nimport {\n default as registerGlobalContext,\n GlobalContextMeta,\n} from \"@plasmicapp/host/registerGlobalContext\";\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n registerGlobalContext: typeof registerGlobalContext;\n};\n\nexport function makeRegisterComponent<T extends React.ComponentType<any>>(\n component: T,\n meta: ComponentMeta<React.ComponentProps<T>>\n) {\n return function (loader?: Registerable) {\n registerComponentHelper(loader, component, meta);\n };\n}\n\nexport function makeRegisterGlobalContext<T extends React.ComponentType<any>>(\n component: T,\n meta: GlobalContextMeta<React.ComponentProps<T>>\n) {\n return function (loader?: Registerable) {\n if (loader) {\n loader.registerGlobalContext(component, meta);\n } else {\n registerGlobalContext(component, meta);\n }\n };\n}\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: ComponentMeta<React.ComponentProps<T>>\n) {\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n}\n","import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport clsx from \"clsx\";\nimport {\n Animated,\n BaseStyles,\n overlayProps,\n overlayStates,\n PopoverExtraProps,\n popoverProps,\n prefixClasses,\n splitAnimProps,\n} from \"./util\";\nimport { Registerable, registerComponentHelper } from \"./reg-util\";\n\nexport function Popover({\n // root\n open,\n onOpenChange,\n defaultOpen,\n modal,\n\n // content\n className,\n sideOffset = 4,\n themeResetClass,\n overlay,\n slideIn = true,\n\n // trigger/anchor\n trigger = true,\n children,\n\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content> &\n PopoverPrimitive.PopoverProps &\n PopoverExtraProps & {\n trigger?: boolean;\n }) {\n const [animProps, rest] = splitAnimProps(props);\n return (\n <Animated\n enterAnimations={[\"fade-in\", \"zoom-enter\"]}\n exitAnimations={[\"fade-out\", \"zoom-exit\"]}\n {...animProps}\n >\n {(dynClass) => (\n <PopoverPrimitive.Root\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n modal={modal}\n >\n {trigger ? (\n <PopoverPrimitive.Trigger asChild>\n {children}\n </PopoverPrimitive.Trigger>\n ) : (\n <PopoverPrimitive.Anchor asChild>\n {children}\n </PopoverPrimitive.Anchor>\n )}\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n className={clsx(\n prefixClasses(\n \"outline-none data-[state=open]:animate-in data-[state=closed]:animate-out\"\n ),\n slideIn\n ? prefixClasses(\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\"\n )\n : \"\",\n dynClass ? dynClass : \"\",\n className,\n themeResetClass\n )}\n sideOffset={sideOffset}\n {...rest}\n >\n {overlay}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n <BaseStyles />\n </PopoverPrimitive.Root>\n )}\n </Animated>\n );\n}\nPopover.displayName = \"PlasmicRadixPopover\";\n\nexport function registerPopover(PLASMIC?: Registerable) {\n registerComponentHelper(PLASMIC, Popover, {\n name: \"hostless-radix-popover\",\n displayName: \"Popover\",\n importPath: \"@plasmicpkgs/radix-ui/popover\",\n importName: \"Popover\",\n states: overlayStates,\n props: {\n ...overlayProps({\n triggerSlotName: \"children\",\n defaultSlotContent: {\n type: \"default-component\",\n kind: \"button\",\n props: {\n children: { type: \"text\", value: `Show popover` },\n },\n },\n }),\n trigger: {\n type: \"boolean\",\n displayName: \"Trigger on click\",\n defaultValueHint: true,\n advanced: true,\n },\n ...popoverProps,\n overlay: {\n type: \"slot\",\n defaultValue: {\n type: \"vbox\",\n styles: {\n padding: \"16px\",\n width: \"300px\",\n maxWidth: \"100%\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"#E2E8F0\",\n backgroundColor: \"white\",\n borderRadius: \"8px\",\n boxShadow: \"0px 4px 16px 0px #00000033\",\n alignItems: \"stretch\",\n },\n children: [\"Here is the popover content.\"],\n },\n ...({\n mergeWithParent: true,\n } as any),\n },\n },\n });\n}\n","import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport { cva } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport clsx from \"clsx\";\n\nimport { Side } from \"@radix-ui/react-popper\";\nimport { Registerable, registerComponentHelper } from \"./reg-util\";\nimport {\n Animated,\n AnimatedProps,\n animPropTypes,\n BaseStyles,\n EnterAnim,\n ExitAnim,\n overlayProps,\n overlayStates,\n prefixClasses,\n splitAnimProps,\n} from \"./util\";\n\nexport const DialogClose = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Close>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>\n>((props) => (\n <DialogPrimitive.Close {...props} asChild>\n <div className={props.className}>\n {props.children ?? <X className={prefixClasses(\"h-4 w-4\")} />}\n <span className={prefixClasses(\"sr-only\")}>Close</span>\n </div>\n </DialogPrimitive.Close>\n));\nDialogClose.displayName = \"PlasmicRadixDialogClose\";\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & AnimatedProps\n>(({ className, ...props }, ref) => {\n return (\n <Animated {...props}>\n {(dynClass) => (\n <DialogPrimitive.Overlay\n className={clsx(\n [\n \"fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n ].map(prefixClasses),\n dynClass ? dynClass : \"\",\n className\n )}\n {...props}\n ref={ref}\n />\n )}\n </Animated>\n );\n});\nDialogOverlay.displayName = \"PlasmicOverlay\";\n\nexport const DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n { themeResetClass?: string } & React.ComponentPropsWithoutRef<\n typeof DialogPrimitive.Content\n > &\n AnimatedProps\n>(({ className, themeResetClass, ...props }, ref) => {\n const [animProps, rest] = splitAnimProps(props);\n\n return (\n <Animated\n {...animProps}\n enterAnimations={animProps.enterAnimations ?? [\"zoom-enter\", \"fade-in\"]}\n exitAnimations={animProps.exitAnimations ?? [\"zoom-exit\", \"fade-out\"]}\n >\n {(dynClass) => (\n <DialogPrimitive.Content\n {...rest}\n className={clsx(\n prefixClasses(\n \"fixed z-50 outline-none relative data-[state=open]:animate-in data-[state=closed]:animate-out\"\n ),\n dynClass ? dynClass : \"\",\n themeResetClass,\n className\n )}\n ref={ref}\n />\n )}\n </Animated>\n );\n});\nDialogContent.displayName = \"PlasmicRadixDialogContent\";\n\nfunction getDefaultSheetAnims(side: Side = \"right\") {\n return (\n {\n right: [\"slide-in-from-right\", \"slide-out-to-right\"],\n bottom: [\"slide-in-from-bottom\", \"slide-out-to-bottom\"],\n left: [\"slide-in-from-left\", \"slide-out-to-left\"],\n top: [\"slide-in-from-top\", \"slide-out-to-top\"],\n } as Record<Side, [EnterAnim, ExitAnim]>\n )[side];\n}\n\nexport const SheetContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> &\n AnimatedProps & { themeResetClass?: string } & VariantProps<\n typeof sheetVariants\n >\n>(({ className, themeResetClass, side = \"right\", ...props }, ref) => {\n const [defaultEnterAnimation, defaultExitAnimation] = getDefaultSheetAnims(\n side ?? \"right\"\n );\n return (\n <Animated\n {...props}\n enterAnimations={props.enterAnimations ?? [defaultEnterAnimation]}\n exitAnimations={props.exitAnimations ?? [defaultExitAnimation]}\n >\n {(dynClass) => (\n <DialogPrimitive.Content\n className={clsx(\n sheetVariants({ side }),\n dynClass ? dynClass : \"\",\n className\n )}\n {...props}\n ref={ref}\n />\n )}\n </Animated>\n );\n});\nSheetContent.displayName = \"PlasmicRadixSheetContent\";\n\nexport const sheetVariants = cva(\n prefixClasses(\n \"fixed z-50 outline-none relative data-[state=open]:animate-in data-[state=closed]:animate-out\"\n ),\n {\n variants: {\n side: {\n top: prefixClasses(\"inset-x-0 top-0\"),\n bottom: prefixClasses(\"inset-x-0 bottom-0\"),\n left: prefixClasses(\"inset-y-0 left-0 h-full\"),\n right: prefixClasses(\"inset-y-0 right-0 h-full\"),\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n }\n);\n\nexport const Dialog = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Root> & AnimatedProps,\n DialogPrimitive.DialogProps &\n DialogPrimitive.DialogOverlayProps & {\n overlayClassName?: string;\n themeResetClass?: string;\n noContain?: boolean;\n triggerSlot?: React.ReactNode;\n }\n>(\n (\n {\n open,\n onOpenChange,\n modal,\n themeResetClass,\n children,\n noContain,\n defaultOpen,\n triggerSlot,\n overlayClassName,\n ...props\n },\n ref\n ) => (\n <DialogPrimitive.Root\n open={open}\n modal={modal}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n <DialogPrimitive.Trigger asChild>{triggerSlot}</DialogPrimitive.Trigger>\n {/*\n The main benefit of containing by default is that users can apply layout to position the dialog content easily, e.g. centered on the screen.\n\n But still need noContain for Sheets, since they slide in/out, and you don't want them fading in/out just because the overlay is fading out.\n\n ALSO, Portal needs to know the exit animation state, and to do this it needs DialogOverlay and the content (children) to both be immediate children - they can't be inside a React.Fragment, and of course cannot wrap in any extra divs!\n */}\n {noContain ? (\n <>\n <DialogPrimitive.Portal>\n <DialogOverlay\n ref={ref}\n {...props}\n className={clsx(overlayClassName, themeResetClass)}\n />\n {children}\n </DialogPrimitive.Portal>\n </>\n ) : (\n <DialogPrimitive.Portal>\n <DialogOverlay\n ref={ref}\n {...props}\n className={clsx(overlayClassName, themeResetClass)}\n >\n {children}\n </DialogOverlay>\n </DialogPrimitive.Portal>\n )}\n {/*Must be outside the portal or exit animation doesn't work*/}\n <BaseStyles />\n </DialogPrimitive.Root>\n )\n);\n\nDialog.displayName = \"PlasmicRadixDialog\";\n\nexport const DialogTitle = DialogPrimitive.Title;\n\nexport const DialogDescription = DialogPrimitive.Description;\n\nexport function registerDialog(PLASMIC?: Registerable) {\n registerComponentHelper(PLASMIC, Dialog, {\n name: \"hostless-radix-dialog\",\n displayName: \"Dialog\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"Dialog\",\n styleSections: false,\n defaultStyles: {\n // Note: unable to set position styles since Plasmic coerces to auto layout\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backdropFilter: \"blur(10px)\",\n background: \"rgba(255,255,255,0.8)\",\n },\n props: {\n ...overlayProps({\n defaultSlotContent: {\n type: \"default-component\",\n kind: \"button\",\n props: {\n children: { type: \"text\", value: `Show dialog` },\n },\n },\n triggerSlotName: \"triggerSlot\",\n }),\n overlayClassName: {\n type: \"class\",\n },\n noContain: {\n type: \"boolean\",\n advanced: true,\n description:\n \"Place the dialog content over the overlay instead of inside the overlay. Useful for separating their animations, but you also won't be able to conveniently set layout on the overlay as a parent.\",\n },\n children: {\n type: \"slot\",\n allowedComponents: [\n \"hostless-radix-sheet-content\",\n \"hostless-radix-dialog-content\",\n ],\n defaultValue: {\n type: \"component\",\n name: \"hostless-radix-dialog-content\",\n },\n },\n },\n states: overlayStates,\n });\n registerComponentHelper(PLASMIC, DialogClose, {\n name: \"hostless-radix-dialog-close\",\n displayName: \"Dialog Close\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"DialogClose\",\n parentComponentName: \"hostless-radix-dialog\",\n defaultStyles: {\n position: \"absolute\",\n top: \"16px\",\n right: \"16px\",\n opacity: \"0.7\",\n borderRadius: \"999px\",\n },\n props: {\n children: {\n type: \"slot\",\n hidePlaceholder: true,\n },\n },\n });\n const dialogStyles = {\n width: \"400px\",\n maxWidth: \"100%\",\n background: \"rgb(255,255,255)\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"#E2E8F0\",\n boxShadow: \"0px 4px 16px 0px #00000033\",\n };\n registerComponentHelper(PLASMIC, SheetContent, {\n name: \"hostless-radix-sheet-content\",\n displayName: \"Drawer Content\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"SheetContent\",\n parentComponentName: \"hostless-radix-dialog\",\n defaultStyles: {\n // Positions can sometimes take effect since these can be implicitly inserted as children of other default content, thus escaping Plasmic's layout coersion.\n position: \"fixed\",\n top: 0,\n right: 0,\n bottom: 0,\n padding: \"16px\",\n ...dialogStyles,\n },\n props: {\n side: {\n type: \"choice\",\n options: [\"right\", \"bottom\", \"left\", \"top\"],\n defaultValueHint: \"right\",\n },\n themeResetClass: { type: \"themeResetClass\" },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"vbox\",\n styles: {\n alignItems: \"stretch\",\n gap: \"8px\",\n },\n children: [\n {\n type: \"component\",\n name: \"hostless-radix-dialog-title\",\n },\n {\n type: \"component\",\n name: \"hostless-radix-dialog-description\",\n },\n ],\n },\n {\n type: \"component\",\n name: \"hostless-radix-dialog-close\",\n },\n ],\n },\n ...animPropTypes({\n defaultEnterAnimations: (ps) => [getDefaultSheetAnims(ps.side)[0]],\n defaultExitAnimations: (ps) => [getDefaultSheetAnims(ps.side)[1]],\n }),\n },\n });\n registerComponentHelper(PLASMIC, DialogContent, {\n name: \"hostless-radix-dialog-content\",\n displayName: \"Dialog Content\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"DialogContent\",\n parentComponentName: \"hostless-radix-dialog\",\n defaultStyles: {\n // No need for position here, just relying on layout container parent.\n padding: \"24px\",\n borderRadius: \"8px\",\n ...dialogStyles,\n },\n props: {\n themeResetClass: { type: \"themeResetClass\" },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"vbox\",\n styles: {\n alignItems: \"stretch\",\n gap: \"8px\",\n },\n children: [\n {\n type: \"component\",\n name: \"hostless-radix-dialog-title\",\n },\n {\n type: \"component\",\n name: \"hostless-radix-dialog-description\",\n },\n ],\n },\n {\n type: \"component\",\n name: \"hostless-radix-dialog-close\",\n },\n ],\n },\n ...animPropTypes({\n defaultEnterAnimations: () => [\"zoom-enter\", \"fade-in\"],\n defaultExitAnimations: () => [\"zoom-exit\", \"fade-out\"],\n }),\n },\n });\n registerComponentHelper(PLASMIC, DialogTitle, {\n name: \"hostless-radix-dialog-title\",\n displayName: \"Dialog Title\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"DialogTitle\",\n parentComponentName: \"hostless-radix-dialog\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: \"Sheet title\",\n },\n },\n });\n registerComponentHelper(PLASMIC, DialogDescription, {\n name: \"hostless-radix-dialog-description\",\n displayName: \"Dialog Description\",\n importPath: \"@plasmicpkgs/radix-ui/dialog\",\n importName: \"DialogDescription\",\n parentComponentName: \"hostless-radix-dialog\",\n props: {\n children: {\n type: \"slot\",\n defaultValue: \"Sheet description\",\n },\n },\n });\n}\n","import * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport clsx from \"clsx\";\nimport {\n Animated,\n BaseStyles,\n overlayProps,\n PopoverExtraProps,\n popoverProps,\n prefixClasses,\n splitAnimProps,\n} from \"./util\";\nimport { Registerable, registerComponentHelper } from \"./reg-util\";\n\nexport const Tooltip = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> &\n TooltipPrimitive.TooltipProps &\n PopoverExtraProps\n>(\n (\n {\n // content & custom\n className,\n sideOffset = 4,\n themeResetClass,\n slideIn = true,\n overlay,\n\n // root\n delayDuration,\n disableHoverableContent,\n open,\n onOpenChange,\n defaultOpen,\n\n // trigger/anchor\n children,\n\n ...props\n },\n ref\n ) => {\n const [animProps, rest] = splitAnimProps(props);\n return (\n <Animated\n enterAnimations={[\"fade-in\", \"zoom-enter\"]}\n exitAnimations={[\"fade-out\", \"zoom-exit\"]}\n {...animProps}\n >\n {(dynClass) => (\n <TooltipPrimitive.Provider>\n <TooltipPrimitive.Root\n {...{\n delayDuration,\n disableHoverableContent,\n open,\n onOpenChange,\n defaultOpen,\n }}\n >\n <TooltipPrimitive.Trigger asChild>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={clsx(\n prefixClasses(\"animate-in data-[state=closed]:animate-out\"),\n slideIn\n ? prefixClasses(\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\"\n )\n : \"\",\n dynClass ? dynClass : \"\",\n className,\n themeResetClass\n )}\n {...rest}\n >\n {overlay}\n </TooltipPrimitive.Content>\n <BaseStyles />\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n )}\n </Animated>\n );\n }\n);\nTooltip.displayName = \"PlasmicRadixTooltip\";\n\nexport function registerTooltip(PLASMIC?: Registerable) {\n registerComponentHelper(PLASMIC, Tooltip, {\n name: \"hostless-radix-tooltip\",\n displayName: \"Tooltip\",\n importPath: \"@plasmicpkgs/radix-ui/tooltip\",\n importName: \"Tooltip\",\n props: {\n ...overlayProps({\n triggerSlotName: \"children\",\n defaultSlotContent: { type: \"text\", value: \"I have a tooltip.\" },\n openDisplay: \"Preview open\",\n }),\n ...popoverProps,\n overlay: {\n type: \"slot\",\n defaultValue: {\n type: \"vbox\",\n styles: {\n padding: \"16px\",\n width: \"300px\",\n maxWidth: \"100%\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"#E2E8F0\",\n backgroundColor: \"white\",\n borderRadius: \"8px\",\n boxShadow: \"0px 4px 16px 0px #00000033\",\n alignItems: \"stretch\",\n },\n children: [\"Here is the tooltip content.\"],\n },\n ...({\n mergeWithParent: true,\n } as any),\n },\n },\n });\n}\n","import { Registerable } from \"./reg-util\";\nimport { registerPopover } from \"./popover\";\nimport { registerDialog } from \"./dialog\";\nimport { registerTooltip } from \"./tooltip\";\n\nexport function registerAll(PLASMIC?: Registerable) {\n registerPopover(PLASMIC);\n registerDialog(PLASMIC);\n registerTooltip(PLASMIC);\n}\n\nexport * from \"./dialog\";\nexport * from \"./popover\";\nexport * from \"./tooltip\";\nexport { popoverProps } from \"./util\";\nexport { PopoverExtraProps } from \"./util\";\n"],"names":["enterAnims","exitAnims","id","useId","_React$useId","React","useState","StyleWrapper","_ref","children","cssStr","dynClass","replace","Animated","_ref2","_ref2$enterAnimations","enterAnimations","_ref2$exitAnimations","exitAnimations","_ref2$enterDuration","enterDuration","_ref2$exitDuration","exitDuration","_ref2$enterOpacity","enterOpacity","_ref2$exitOpacity","exitOpacity","_ref2$enterScale","enterScale","_ref2$exitScale","exitScale","_ref2$enterTranslateX","enterTranslateX","_ref2$exitTranslateX","exitTranslateX","_ref2$enterTranslateY","enterTranslateY","_ref2$exitTranslateY","exitTranslateY","_ref2$enterTiming","enterTiming","_ref2$exitTiming","exitTiming","_ref2$enterDelay","enterDelay","_ref2$exitDelay","exitDelay","pct","x","match","neg","startsWith","animations","fade-in","fade-out","slide-in-from-top","slide-out-to-top","slide-in-from-right","slide-out-to-right","slide-in-from-bottom","slide-out-to-bottom","slide-in-from-left","slide-out-to-left","zoom-enter","zoom-exit","map","exitAnimation","_animations$exitAnima","join","enterAnimation","_animations$enterAnim","splitAnimProps","props","keys","pick","omit","mungeNames","names","name","label","value","animPropTypes","_ref3","defaultEnterAnimations","defaultExitAnimations","getEnterAnimations","ps","_ps$enterAnimations","getExitAnimations","_ps$exitAnimations","type","options","multiSelect","defaultValueHint","hidden","_getEnterAnimations","_getEnterAnimations2","includes","advanced","_getExitAnimations","_getExitAnimations2","_getEnterAnimations3","_getEnterAnimations4","_getExitAnimations3","_getExitAnimations4","_getEnterAnimations5","_getExitAnimations5","_getEnterAnimations6","_getExitAnimations6","_extends","suggestions","overlayStates","open","valueProp","onChangeProp","variableType","overlayProps","_ref4","_props","displayName","openDisplay","editOnly","uncontrolledProp","modal","description","onOpenChange","argTypes","triggerSlotName","defaultValue","defaultSlotContent","mergeWithParent","themeResetClass","prefixClasses","trim","split","part","prefixedBaseStyles","BaseStyles","dangerouslySetInnerHTML","__html","popoverProps","side","sideOffset","align","alignOffset","slideIn","registerComponentHelper","loader","component","meta","registerComponent","Popover","defaultOpen","className","_ref$sideOffset","overlay","_ref$slideIn","_ref$trigger","trigger","_splitAnimProps","_objectWithoutPropertiesLoose","_excluded","rest","PopoverPrimitive","asChild","clsx","registerPopover","PLASMIC","importPath","importName","states","kind","styles","padding","width","maxWidth","borderWidth","borderStyle","borderColor","backgroundColor","borderRadius","boxShadow","alignItems","DialogClose","_props$children","DialogPrimitive","X","DialogOverlay","ref","DialogContent","_excluded2","animProps","_animProps$enterAnima","_animProps$exitAnimat","getDefaultSheetAnims","right","bottom","left","top","SheetContent","_ref3$side","_excluded3","_getDefaultSheetAnims","_props$enterAnimation","_props$exitAnimations","sheetVariants","cva","variants","defaultVariants","Dialog","noContain","triggerSlot","overlayClassName","_excluded4","DialogTitle","DialogDescription","registerDialog","styleSections","defaultStyles","display","justifyContent","backdropFilter","background","allowedComponents","parentComponentName","position","opacity","hidePlaceholder","dialogStyles","gap","Tooltip","delayDuration","disableHoverableContent","TooltipPrimitive","registerTooltip"],"mappings":"00BAMA,IAEaA,EAAa,CACxB,UACA,aACA,oBACA,sBACA,uBACA,sBAGWC,EAAY,CACvB,WACA,YACA,mBACA,qBACA,sBACA,qBAMEC,EAAK,EACIC,SAAKC,EAAIC,SAAmBD,EAAK,WAAA,OAAME,YAAS,WAAA,MAAM,GAAKJ,QAG3DK,EAAe,SAAHC,OACvBC,EAAQD,EAARC,SACAC,EAAMF,EAANE,OAKMC,EAAW,OAASR,IAAQS,QAAQ,KAAM,IAChD,OACEP,gCACGI,EAASE,GACVN,6BAAQM,EAAWD,EAAOE,QAAQ,SAAUD,GAAc,MAsBnDE,EAAW,SAAHC,OACnBL,EAAQK,EAARL,SAAQM,EAAAD,EACRE,gBAAAA,WAAeD,EAAG,CAAC,WAAUA,EAAAE,EAAAH,EAC7BI,eAAAA,WAAcD,EAAG,CAAC,YAAWA,EAAAE,EAAAL,EAC7BM,cAAAA,WAAaD,EAAG,IAAqBA,EAAAE,EAAAP,EACrCQ,aAAAA,WAAYD,EAAG,IAAqBA,EAAAE,EAAAT,EACpCU,aAAgBC,EAAAX,EAChBY,YAAeC,EAAAb,EACfc,WAAAA,WAAUD,EAAG,IAAIA,EAAAE,EAAAf,EACjBgB,UAAAA,WAASD,EAAG,IAAIA,EAAAE,EAAAjB,EAChBkB,gBAAAA,WAAeD,EAAG,OAAMA,EAAAE,EAAAnB,EACxBoB,eAAAA,WAAcD,EAAG,OAAMA,EAAAE,EAAArB,EACvBsB,gBAAAA,WAAeD,EAAG,OAAMA,EAAAE,EAAAvB,EACxBwB,eAA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,OACVC,YAAa,MACbC,YAAa,QACbC,YAAa,UACbC,gBAAiB,QACjBC,aAAc,MACdC,UAAW,6BACXC,WAAY,WAEd7K,SAAU,CAAC,kCAET,CACFyH,iBAAiB,QAlC3BoG,EAAQ/G,YAAc,sPCrFMgD,GAC1BD,EAAgBC,GAChBiD,EAAejD,GACfmE,EAAgBnE"}
@@ -137,11 +137,11 @@ var animPropTypes = function animPropTypes(_ref3) {
137
137
  defaultExitAnimations = _ref3.defaultExitAnimations;
138
138
  var getEnterAnimations = function getEnterAnimations(ps) {
139
139
  var _ps$enterAnimations;
140
- return (_ps$enterAnimations = ps.enterAnimations) != null ? _ps$enterAnimations : defaultEnterAnimations;
140
+ return (_ps$enterAnimations = ps.enterAnimations) != null ? _ps$enterAnimations : defaultEnterAnimations == null ? void 0 : defaultEnterAnimations(ps);
141
141
  };
142
142
  var getExitAnimations = function getExitAnimations(ps) {
143
143
  var _ps$exitAnimations;
144
- return (_ps$exitAnimations = ps.exitAnimations) != null ? _ps$exitAnimations : defaultExitAnimations;
144
+ return (_ps$exitAnimations = ps.exitAnimations) != null ? _ps$exitAnimations : defaultExitAnimations == null ? void 0 : defaultExitAnimations(ps);
145
145
  };
146
146
  var props = {
147
147
  enterAnimations: {
@@ -174,6 +174,7 @@ var animPropTypes = function animPropTypes(_ref3) {
174
174
  },
175
175
  exitTranslateX: {
176
176
  type: "string",
177
+ advanced: true,
177
178
  defaultValueHint: "100%",
178
179
  hidden: function hidden(ps) {
179
180
  var _getExitAnimations, _getExitAnimations2;
@@ -182,6 +183,7 @@ var animPropTypes = function animPropTypes(_ref3) {
182
183
  },
183
184
  enterTranslateY: {
184
185
  type: "string",
186
+ advanced: true,
185
187
  defaultValueHint: "100%",
186
188
  hidden: function hidden(ps) {
187
189
  var _getEnterAnimations3, _getEnterAnimations4;
@@ -190,6 +192,7 @@ var animPropTypes = function animPropTypes(_ref3) {
190
192
  },
191
193
  exitTranslateY: {
192
194
  type: "string",
195
+ advanced: true,
193
196
  defaultValueHint: "100%",
194
197
  hidden: function hidden(ps) {
195
198
  var _getExitAnimations3, _getExitAnimations4;
@@ -198,6 +201,7 @@ var animPropTypes = function animPropTypes(_ref3) {
198
201
  },
199
202
  enterOpacity: {
200
203
  type: "number",
204
+ advanced: true,
201
205
  defaultValueHint: 0,
202
206
  hidden: function hidden(ps) {
203
207
  var _getEnterAnimations5;
@@ -206,6 +210,7 @@ var animPropTypes = function animPropTypes(_ref3) {
206
210
  },
207
211
  exitOpacity: {
208
212
  type: "number",
213
+ advanced: true,
209
214
  defaultValueHint: 0,
210
215
  hidden: function hidden(ps) {
211
216
  var _getExitAnimations5;
@@ -214,6 +219,7 @@ var animPropTypes = function animPropTypes(_ref3) {
214
219
  },
215
220
  enterScale: {
216
221
  type: "number",
222
+ advanced: true,
217
223
  defaultValueHint: 0.95,
218
224
  hidden: function hidden(ps) {
219
225
  var _getEnterAnimations6;
@@ -222,6 +228,7 @@ var animPropTypes = function animPropTypes(_ref3) {
222
228
  },
223
229
  exitScale: {
224
230
  type: "number",
231
+ advanced: true,
225
232
  defaultValueHint: 0.95,
226
233
  hidden: function hidden(ps) {
227
234
  var _getExitAnimations6;
@@ -562,11 +569,11 @@ var Dialog = /*#__PURE__*/forwardRef(function (_ref4, ref) {
562
569
  defaultOpen: defaultOpen
563
570
  }, createElement(Trigger$1, {
564
571
  asChild: true
565
- }, triggerSlot), createElement(Portal$1, null, noContain ? createElement(Fragment, null, createElement(DialogOverlay, Object.assign({
572
+ }, triggerSlot), noContain ? createElement(Fragment, null, createElement(Portal$1, null, createElement(DialogOverlay, Object.assign({
566
573
  ref: ref
567
574
  }, props, {
568
575
  className: clsx(overlayClassName, themeResetClass)
569
- })), children) : createElement(DialogOverlay, Object.assign({
576
+ })), children)) : createElement(Portal$1, null, createElement(DialogOverlay, Object.assign({
570
577
  ref: ref
571
578
  }, props, {
572
579
  className: clsx(overlayClassName, themeResetClass)