@frontify/fondue 12.0.0-beta.407 → 12.0.0-beta.408

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.
@@ -14,7 +14,7 @@ function u(i) {
14
14
  style: {
15
15
  zIndex: a.toolbarTooltip
16
16
  },
17
- className: "!tw-bg-text !tw-border !tw-border-line-strong !tw-text-box-neutral-strong-inverse !tw-py-2 !tw-px-3 !tw-rounded !tw-shadow-lg !tw-text-xs",
17
+ className: "tw-bg-text tw-border tw-border-line-strong tw-text-box-neutral-strong-inverse tw-py-2 tw-px-3 tw-rounded tw-shadow-lg tw-text-xs",
18
18
  children: e
19
19
  }
20
20
  ) })
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.es.js","sources":["../../../../../src/components/RichTextEditor/components/Toolbar/Tooltip.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ComponentPropsWithoutRef, ComponentType, ElementRef, ReactNode, forwardRef } from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { zIndexLayers } from '@components/RichTextEditor/helpers/zIndexLayers';\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\nexport const TooltipPortal = TooltipPrimitive.Portal;\nexport const TooltipContent = TooltipPrimitive.Content;\n\nexport function withTooltip<T extends ComponentType<any> | keyof HTMLElementTagNameMap>(Component: T) {\n const WrappedComponent = forwardRef<\n ElementRef<T>,\n ComponentPropsWithoutRef<T> & {\n tooltip?: ReactNode;\n }\n >(({ tooltip, ...props }, ref) => {\n const component = <Component ref={ref} {...(props as any)} />;\n\n if (tooltip) {\n return (\n <TooltipProvider>\n <Tooltip delayDuration={300}>\n <TooltipTrigger asChild>{component}</TooltipTrigger>\n <TooltipPortal>\n <TooltipContent\n style={{\n zIndex: zIndexLayers.toolbarTooltip,\n }}\n className=\"!tw-bg-text !tw-border !tw-border-line-strong !tw-text-box-neutral-strong-inverse !tw-py-2 !tw-px-3 !tw-rounded !tw-shadow-lg !tw-text-xs\"\n >\n {tooltip}\n </TooltipContent>\n </TooltipPortal>\n </Tooltip>\n </TooltipProvider>\n );\n }\n\n return component;\n });\n WrappedComponent.displayName = 'WrappedComponent';\n return WrappedComponent;\n}\n"],"names":["TooltipProvider","TooltipPrimitive","Tooltip","TooltipTrigger","TooltipPortal","TooltipContent","withTooltip","Component","WrappedComponent","forwardRef","tooltip","props","ref","component","jsx","jsxs","zIndexLayers"],"mappings":";;;;AAMO,MAAMA,IAAkBC,EAAiB,UACnCC,IAAUD,EAAiB,MAC3BE,IAAiBF,EAAiB,SAClCG,IAAgBH,EAAiB,QACjCI,IAAiBJ,EAAiB;AAExC,SAASK,EAAwEC,GAAc;AAC5F,QAAAC,IAAmBC,EAKvB,CAAC,EAAE,SAAAC,GAAS,GAAGC,KAASC,MAAQ;AAC9B,UAAMC,IAAY,gBAAAC,EAACP,GAAU,EAAA,KAAAK,GAAW,GAAID,EAAe,CAAA;AAE3D,WAAID,IAEK,gBAAAI,EAAAd,GAAA,EACG,UAAC,gBAAAe,EAAAb,GAAA,EAAQ,eAAe,KACpB,UAAA;AAAA,MAAC,gBAAAY,EAAAX,GAAA,EAAe,SAAO,IAAE,UAAUU,GAAA;AAAA,wBAClCT,GACG,EAAA,UAAA,gBAAAU;AAAA,QAACT;AAAA,QAAA;AAAA,UACG,OAAO;AAAA,YACH,QAAQW,EAAa;AAAA,UACzB;AAAA,UACA,WAAU;AAAA,UAET,UAAAN;AAAA,QAAA;AAAA,MAAA,GAET;AAAA,IAAA,EACJ,CAAA,EACJ,CAAA,IAIDG;AAAA,EAAA,CACV;AACD,SAAAL,EAAiB,cAAc,oBACxBA;AACX;"}
1
+ {"version":3,"file":"Tooltip.es.js","sources":["../../../../../src/components/RichTextEditor/components/Toolbar/Tooltip.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ComponentPropsWithoutRef, ComponentType, ElementRef, ReactNode, forwardRef } from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { zIndexLayers } from '@components/RichTextEditor/helpers/zIndexLayers';\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\nexport const TooltipPortal = TooltipPrimitive.Portal;\nexport const TooltipContent = TooltipPrimitive.Content;\n\nexport function withTooltip<T extends ComponentType<any> | keyof HTMLElementTagNameMap>(Component: T) {\n const WrappedComponent = forwardRef<\n ElementRef<T>,\n ComponentPropsWithoutRef<T> & {\n tooltip?: ReactNode;\n }\n >(({ tooltip, ...props }, ref) => {\n const component = <Component ref={ref} {...(props as any)} />;\n\n if (tooltip) {\n return (\n <TooltipProvider>\n <Tooltip delayDuration={300}>\n <TooltipTrigger asChild>{component}</TooltipTrigger>\n <TooltipPortal>\n <TooltipContent\n style={{\n zIndex: zIndexLayers.toolbarTooltip,\n }}\n className=\"tw-bg-text tw-border tw-border-line-strong tw-text-box-neutral-strong-inverse tw-py-2 tw-px-3 tw-rounded tw-shadow-lg tw-text-xs\"\n >\n {tooltip}\n </TooltipContent>\n </TooltipPortal>\n </Tooltip>\n </TooltipProvider>\n );\n }\n\n return component;\n });\n WrappedComponent.displayName = 'WrappedComponent';\n return WrappedComponent;\n}\n"],"names":["TooltipProvider","TooltipPrimitive","Tooltip","TooltipTrigger","TooltipPortal","TooltipContent","withTooltip","Component","WrappedComponent","forwardRef","tooltip","props","ref","component","jsx","jsxs","zIndexLayers"],"mappings":";;;;AAMO,MAAMA,IAAkBC,EAAiB,UACnCC,IAAUD,EAAiB,MAC3BE,IAAiBF,EAAiB,SAClCG,IAAgBH,EAAiB,QACjCI,IAAiBJ,EAAiB;AAExC,SAASK,EAAwEC,GAAc;AAC5F,QAAAC,IAAmBC,EAKvB,CAAC,EAAE,SAAAC,GAAS,GAAGC,KAASC,MAAQ;AAC9B,UAAMC,IAAY,gBAAAC,EAACP,GAAU,EAAA,KAAAK,GAAW,GAAID,EAAe,CAAA;AAE3D,WAAID,IAEK,gBAAAI,EAAAd,GAAA,EACG,UAAC,gBAAAe,EAAAb,GAAA,EAAQ,eAAe,KACpB,UAAA;AAAA,MAAC,gBAAAY,EAAAX,GAAA,EAAe,SAAO,IAAE,UAAUU,GAAA;AAAA,wBAClCT,GACG,EAAA,UAAA,gBAAAU;AAAA,QAACT;AAAA,QAAA;AAAA,UACG,OAAO;AAAA,YACH,QAAQW,EAAa;AAAA,UACzB;AAAA,UACA,WAAU;AAAA,UAET,UAAAN;AAAA,QAAA;AAAA,MAAA,GAET;AAAA,IAAA,EACJ,CAAA,EACJ,CAAA,IAIDG;AAAA,EAAA,CACV;AACD,SAAAL,EAAiB,cAAc,oBACxBA;AACX;"}