@plasmicpkgs/radix-ui 0.0.21 → 0.0.23

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 { 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\",\n exitTiming = \"ease\",\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\",\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\",\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.box-border {\n box-sizing: border-box;\n}\n\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 box-border 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,E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,OAAQV,MAAO,qBAC3CwC,YAAa,iBAEZoB,GACHe,QAAO9C,GACLnB,KAAM,OACNsC,aAAc,CACZtC,KAAM,OACNkF,OAAQ,CACNC,QAAS,OACTC,MAAO,QACPC,SAAU,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"}
1
+ {"version":3,"file":"radix-ui.cjs.production.min.js","sources":["../src/reg-util.ts","../src/util.tsx","../src/popover.tsx","../src/dialog.tsx","../src/tooltip.tsx","../src/index.tsx"],"sourcesContent":["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 { 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\",\n exitTiming = \"ease\",\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\",\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\",\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.box-border {\n box-sizing: border-box;\n}\n\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 * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport * as React from \"react\";\n\nimport clsx from \"clsx\";\nimport { Registerable, registerComponentHelper } from \"./reg-util\";\nimport {\n Animated,\n BaseStyles,\n overlayProps,\n overlayStates,\n PopoverExtraProps,\n popoverProps,\n prefixClasses,\n splitAnimProps,\n} from \"./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 Core\",\n importPath: \"@plasmicpkgs/radix-ui\",\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 box-border 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 Core\",\n importPath: \"@plasmicpkgs/radix-ui\",\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\",\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\",\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\",\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\",\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\",\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 TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport clsx from \"clsx\";\nimport * as React from \"react\";\nimport { Registerable, registerComponentHelper } from \"./reg-util\";\nimport {\n Animated,\n BaseStyles,\n overlayProps,\n PopoverExtraProps,\n popoverProps,\n prefixClasses,\n splitAnimProps,\n} from \"./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 Core\",\n importPath: \"@plasmicpkgs/radix-ui\",\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":["registerComponentHelper","loader","component","meta","registerComponent","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","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":"m1BAqCgBA,EACdC,EACAC,EACAC,GAEIF,EACFA,EAAOG,kBAAkBF,EAAWC,GAEpCC,EAAkBF,EAAWC,GCvCjC,IAEaE,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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AjB,IAEE0B,GAEHP,GAEHjJ,gBAACoI,yBAUC4F,EAAgBnE,GAC9BvK,EAAwBuK,EAAS+D,EAAS,CACxCnJ,KAAM,yBACNyC,YAAa,eACb4C,WAAY,wBACZC,WAAY,UACZ5F,MAAKqC,KACAO,EAAa,CACdW,gBAAiB,WACjBE,mBAAoB,CAAEvC,KAAM,OAAQV,MAAO,qBAC3CwC,YAAa,iBAEZoB,GACHU,QAAOzC,GACLnB,KAAM,OACNsC,aAAc,CACZtC,KAAM,OACN6E,OAAQ,CACNC,QAAS,OACTC,MAAO,QACPC,SAAU,OACVC,YAAa,MACbC,YAAa,QACbC,YAAa,UACbC,gBAAiB,QACjBC,aAAc,MACdC,UAAW,6BACXC,WAAY,WAEdxK,SAAU,CAAC,kCAET,CACFyH,iBAAiB,QAlC3B+F,EAAQ1G,YAAc,sPCrFM2C,GAC1BD,EAAgBC,GAChBiD,EAAejD,GACfmE,EAAgBnE"}
@@ -1,9 +1,9 @@
1
- import { createElement, Fragment, useId as useId$1, useState, forwardRef } from 'react';
2
1
  import { Root, Trigger, Anchor, Portal, Content } from '@radix-ui/react-popover';
2
+ import { createElement, Fragment, useId as useId$1, useState, forwardRef } from 'react';
3
3
  import clsx from 'clsx';
4
- import { pick, omit } from 'remeda';
5
4
  import registerComponent from '@plasmicapp/host/registerComponent';
6
5
  import '@plasmicapp/host/registerGlobalContext';
6
+ import { pick, omit } from 'remeda';
7
7
  import { Close, Content as Content$1, Root as Root$1, Trigger as Trigger$1, Portal as Portal$1, Title, Description, Overlay } from '@radix-ui/react-dialog';
8
8
  import { cva } from 'class-variance-authority';
9
9
  import { X } from 'lucide-react';
@@ -36,6 +36,14 @@ function _objectWithoutPropertiesLoose(source, excluded) {
36
36
  return target;
37
37
  }
38
38
 
39
+ function registerComponentHelper(loader, component, meta) {
40
+ if (loader) {
41
+ loader.registerComponent(component, meta);
42
+ } else {
43
+ registerComponent(component, meta);
44
+ }
45
+ }
46
+
39
47
  var _React$useId;
40
48
  var DEBUG_SLOWDOWN = 1;
41
49
  var enterAnims = ["fade-in", "zoom-enter", "slide-in-from-top", "slide-in-from-right", "slide-in-from-bottom", "slide-in-from-left"];
@@ -356,14 +364,6 @@ var popoverProps = /*#__PURE__*/_extends({
356
364
  }
357
365
  });
358
366
 
359
- function registerComponentHelper(loader, component, meta) {
360
- if (loader) {
361
- loader.registerComponent(component, meta);
362
- } else {
363
- registerComponent(component, meta);
364
- }
365
- }
366
-
367
367
  var _excluded = ["open", "onOpenChange", "defaultOpen", "modal", "className", "sideOffset", "themeResetClass", "overlay", "slideIn", "trigger", "children"];
368
368
  function Popover(_ref) {
369
369
  var open = _ref.open,
@@ -407,8 +407,8 @@ Popover.displayName = "PlasmicRadixPopover";
407
407
  function registerPopover(PLASMIC) {
408
408
  registerComponentHelper(PLASMIC, Popover, {
409
409
  name: "hostless-radix-popover",
410
- displayName: "Popover",
411
- importPath: "@plasmicpkgs/radix-ui/popover",
410
+ displayName: "Popover Core",
411
+ importPath: "@plasmicpkgs/radix-ui",
412
412
  importName: "Popover",
413
413
  states: overlayStates,
414
414
  props: _extends({}, overlayProps({
@@ -585,8 +585,8 @@ var DialogDescription = Description;
585
585
  function registerDialog(PLASMIC) {
586
586
  registerComponentHelper(PLASMIC, Dialog, {
587
587
  name: "hostless-radix-dialog",
588
- displayName: "Dialog",
589
- importPath: "@plasmicpkgs/radix-ui/dialog",
588
+ displayName: "Dialog Core",
589
+ importPath: "@plasmicpkgs/radix-ui",
590
590
  importName: "Dialog",
591
591
  styleSections: false,
592
592
  defaultStyles: {
@@ -632,7 +632,7 @@ function registerDialog(PLASMIC) {
632
632
  registerComponentHelper(PLASMIC, DialogClose, {
633
633
  name: "hostless-radix-dialog-close",
634
634
  displayName: "Dialog Close",
635
- importPath: "@plasmicpkgs/radix-ui/dialog",
635
+ importPath: "@plasmicpkgs/radix-ui",
636
636
  importName: "DialogClose",
637
637
  parentComponentName: "hostless-radix-dialog",
638
638
  defaultStyles: {
@@ -661,7 +661,7 @@ function registerDialog(PLASMIC) {
661
661
  registerComponentHelper(PLASMIC, SheetContent, {
662
662
  name: "hostless-radix-sheet-content",
663
663
  displayName: "Drawer Content",
664
- importPath: "@plasmicpkgs/radix-ui/dialog",
664
+ importPath: "@plasmicpkgs/radix-ui",
665
665
  importName: "SheetContent",
666
666
  parentComponentName: "hostless-radix-dialog",
667
667
  defaultStyles: _extends({
@@ -713,7 +713,7 @@ function registerDialog(PLASMIC) {
713
713
  registerComponentHelper(PLASMIC, DialogContent, {
714
714
  name: "hostless-radix-dialog-content",
715
715
  displayName: "Dialog Content",
716
- importPath: "@plasmicpkgs/radix-ui/dialog",
716
+ importPath: "@plasmicpkgs/radix-ui",
717
717
  importName: "DialogContent",
718
718
  parentComponentName: "hostless-radix-dialog",
719
719
  defaultStyles: _extends({
@@ -757,7 +757,7 @@ function registerDialog(PLASMIC) {
757
757
  registerComponentHelper(PLASMIC, DialogTitle, {
758
758
  name: "hostless-radix-dialog-title",
759
759
  displayName: "Dialog Title",
760
- importPath: "@plasmicpkgs/radix-ui/dialog",
760
+ importPath: "@plasmicpkgs/radix-ui",
761
761
  importName: "DialogTitle",
762
762
  parentComponentName: "hostless-radix-dialog",
763
763
  props: {
@@ -770,7 +770,7 @@ function registerDialog(PLASMIC) {
770
770
  registerComponentHelper(PLASMIC, DialogDescription, {
771
771
  name: "hostless-radix-dialog-description",
772
772
  displayName: "Dialog Description",
773
- importPath: "@plasmicpkgs/radix-ui/dialog",
773
+ importPath: "@plasmicpkgs/radix-ui",
774
774
  importName: "DialogDescription",
775
775
  parentComponentName: "hostless-radix-dialog",
776
776
  props: {
@@ -824,8 +824,8 @@ Tooltip.displayName = "PlasmicRadixTooltip";
824
824
  function registerTooltip(PLASMIC) {
825
825
  registerComponentHelper(PLASMIC, Tooltip, {
826
826
  name: "hostless-radix-tooltip",
827
- displayName: "Tooltip",
828
- importPath: "@plasmicpkgs/radix-ui/tooltip",
827
+ displayName: "Tooltip Core",
828
+ importPath: "@plasmicpkgs/radix-ui",
829
829
  importName: "Tooltip",
830
830
  props: _extends({}, overlayProps({
831
831
  triggerSlotName: "children",