@frontify/fondue 12.0.0-beta.406 → 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.
@@ -1,50 +1,52 @@
1
- import { jsx as M } from "react/jsx-runtime";
2
- import { Overlay as x } from "../../utilities/dialogs/Overlay.es.js";
3
- import { Z_INDEX_MODAL as N } from "../../utilities/dialogs/constants.es.js";
1
+ import { jsx as x } from "react/jsx-runtime";
2
+ import { Overlay as N } from "../../utilities/dialogs/Overlay.es.js";
3
+ import { Z_INDEX_MODAL as c } from "../../utilities/dialogs/constants.es.js";
4
4
  import { Modality as o } from "../../types/dialog.es.js";
5
- const c = ({
6
- children: r,
7
- open: a,
8
- anchor: t,
9
- enablePortal: d = !0,
10
- maxHeight: i = "auto",
11
- maxWidth: l,
12
- minHeight: s = 200,
13
- minWidth: n = 600,
5
+ const b = ({
6
+ id: r,
7
+ children: a,
8
+ open: t,
9
+ anchor: d,
10
+ enablePortal: i = !0,
11
+ maxHeight: l = "auto",
12
+ maxWidth: s,
13
+ minHeight: n = 200,
14
+ minWidth: u = 600,
14
15
  modality: e = o.Modal,
15
- handleClose: u,
16
- "data-test-id": f = "fondue-dialog",
17
- darkUnderlay: g = !1,
18
- autoHeight: m = !1,
19
- verticalAlignment: p = "centered",
20
- roundedCorners: D = !0
21
- }) => /* @__PURE__ */ M(
22
- x,
16
+ handleClose: f,
17
+ "data-test-id": g = "fondue-dialog",
18
+ darkUnderlay: m = !1,
19
+ autoHeight: p = !1,
20
+ verticalAlignment: D = "centered",
21
+ roundedCorners: M = !0
22
+ }) => /* @__PURE__ */ x(
23
+ N,
23
24
  {
24
- "data-test-id": f,
25
- open: a,
26
- anchor: t,
27
- enablePortal: d,
28
- minWidth: n,
29
- minHeight: s,
30
- maxWidth: l,
31
- maxHeight: i,
25
+ id: r,
26
+ "data-test-id": g,
27
+ open: t,
28
+ anchor: d,
29
+ enablePortal: i,
30
+ minWidth: u,
31
+ minHeight: n,
32
+ maxWidth: s,
33
+ maxHeight: l,
32
34
  modality: e,
33
- handleClose: u,
35
+ handleClose: f,
34
36
  role: e === o.NonModal ? "region" : "dialog",
35
- darkUnderlay: g,
36
- autoHeight: m,
37
- zIndex: N,
37
+ darkUnderlay: m,
38
+ autoHeight: p,
39
+ zIndex: c,
38
40
  isDetached: !0,
39
- verticalAlignment: p,
41
+ verticalAlignment: D,
40
42
  strategy: e === o.NonModal ? "absolute" : "fixed",
41
- roundedCorners: D,
43
+ roundedCorners: M,
42
44
  borderRadius: "large",
43
- children: r
45
+ children: a
44
46
  }
45
47
  );
46
- c.displayName = "FondueDialog";
48
+ b.displayName = "FondueDialog";
47
49
  export {
48
- c as Dialog
50
+ b as Dialog
49
51
  };
50
52
  //# sourceMappingURL=Dialog.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.es.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { BaseDialogProps, Modality, OverlayProps } from '../../types';\nimport { Overlay } from '@utilities/dialogs/Overlay';\nimport { Z_INDEX_MODAL } from '@utilities/dialogs/constants';\nimport { WithRequired } from 'src/types/withRequired';\n\nexport type DialogProps = Omit<\n OverlayProps,\n 'placement' | 'flip' | 'offset' | 'theme' | 'withArrow' | 'arrowCustomColors' | 'shadow' | 'isDialog'\n> &\n Omit<BaseDialogProps, 'width'>;\n\nexport const Dialog = ({\n children,\n open,\n anchor,\n enablePortal = true,\n maxHeight = 'auto',\n maxWidth,\n minHeight = 200,\n minWidth = 600,\n modality = Modality.Modal,\n handleClose,\n 'data-test-id': dataTestId = 'fondue-dialog',\n darkUnderlay = false,\n autoHeight = false,\n verticalAlignment = 'centered',\n roundedCorners = true,\n}: WithRequired<DialogProps, 'handleClose'>) => {\n return (\n <Overlay\n data-test-id={dataTestId}\n open={open}\n anchor={anchor}\n enablePortal={enablePortal}\n minWidth={minWidth}\n minHeight={minHeight}\n maxWidth={maxWidth}\n maxHeight={maxHeight}\n modality={modality}\n handleClose={handleClose}\n role={modality === Modality.NonModal ? 'region' : 'dialog'}\n darkUnderlay={darkUnderlay}\n autoHeight={autoHeight}\n zIndex={Z_INDEX_MODAL}\n isDetached={true}\n verticalAlignment={verticalAlignment}\n strategy={modality === Modality.NonModal ? 'absolute' : 'fixed'}\n roundedCorners={roundedCorners}\n borderRadius=\"large\"\n >\n {children}\n </Overlay>\n );\n};\nDialog.displayName = 'FondueDialog';\n"],"names":["Dialog","children","open","anchor","enablePortal","maxHeight","maxWidth","minHeight","minWidth","modality","Modality","handleClose","dataTestId","darkUnderlay","autoHeight","verticalAlignment","roundedCorners","jsx","Overlay","Z_INDEX_MODAL"],"mappings":";;;;AAaO,MAAMA,IAAS,CAAC;AAAA,EACnB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAWC,EAAS;AAAA,EACpB,aAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,cAAAC,IAAe;AAAA,EACf,YAAAC,IAAa;AAAA,EACb,mBAAAC,IAAoB;AAAA,EACpB,gBAAAC,IAAiB;AACrB,MAEQ,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACG,gBAAcN;AAAA,IACd,MAAAV;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAI;AAAA,IACA,WAAAD;AAAA,IACA,UAAAD;AAAA,IACA,WAAAD;AAAA,IACA,UAAAI;AAAA,IACA,aAAAE;AAAA,IACA,MAAMF,MAAaC,EAAS,WAAW,WAAW;AAAA,IAClD,cAAAG;AAAA,IACA,YAAAC;AAAA,IACA,QAAQK;AAAA,IACR,YAAY;AAAA,IACZ,mBAAAJ;AAAA,IACA,UAAUN,MAAaC,EAAS,WAAW,aAAa;AAAA,IACxD,gBAAAM;AAAA,IACA,cAAa;AAAA,IAEZ,UAAAf;AAAA,EAAA;AAAA;AAIbD,EAAO,cAAc;"}
1
+ {"version":3,"file":"Dialog.es.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { BaseDialogProps, Modality, OverlayProps } from '../../types';\nimport { Overlay } from '@utilities/dialogs/Overlay';\nimport { Z_INDEX_MODAL } from '@utilities/dialogs/constants';\nimport { WithRequired } from 'src/types/withRequired';\n\nexport type DialogProps = Omit<\n OverlayProps,\n 'placement' | 'flip' | 'offset' | 'theme' | 'withArrow' | 'arrowCustomColors' | 'shadow' | 'isDialog'\n> &\n Omit<BaseDialogProps, 'width'>;\n\nexport const Dialog = ({\n id,\n children,\n open,\n anchor,\n enablePortal = true,\n maxHeight = 'auto',\n maxWidth,\n minHeight = 200,\n minWidth = 600,\n modality = Modality.Modal,\n handleClose,\n 'data-test-id': dataTestId = 'fondue-dialog',\n darkUnderlay = false,\n autoHeight = false,\n verticalAlignment = 'centered',\n roundedCorners = true,\n}: WithRequired<DialogProps, 'handleClose'>) => {\n return (\n <Overlay\n id={id}\n data-test-id={dataTestId}\n open={open}\n anchor={anchor}\n enablePortal={enablePortal}\n minWidth={minWidth}\n minHeight={minHeight}\n maxWidth={maxWidth}\n maxHeight={maxHeight}\n modality={modality}\n handleClose={handleClose}\n role={modality === Modality.NonModal ? 'region' : 'dialog'}\n darkUnderlay={darkUnderlay}\n autoHeight={autoHeight}\n zIndex={Z_INDEX_MODAL}\n isDetached={true}\n verticalAlignment={verticalAlignment}\n strategy={modality === Modality.NonModal ? 'absolute' : 'fixed'}\n roundedCorners={roundedCorners}\n borderRadius=\"large\"\n >\n {children}\n </Overlay>\n );\n};\nDialog.displayName = 'FondueDialog';\n"],"names":["Dialog","id","children","open","anchor","enablePortal","maxHeight","maxWidth","minHeight","minWidth","modality","Modality","handleClose","dataTestId","darkUnderlay","autoHeight","verticalAlignment","roundedCorners","jsx","Overlay","Z_INDEX_MODAL"],"mappings":";;;;AAaO,MAAMA,IAAS,CAAC;AAAA,EACnB,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAWC,EAAS;AAAA,EACpB,aAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,cAAAC,IAAe;AAAA,EACf,YAAAC,IAAa;AAAA,EACb,mBAAAC,IAAoB;AAAA,EACpB,gBAAAC,IAAiB;AACrB,MAEQ,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACG,IAAAlB;AAAA,IACA,gBAAcY;AAAA,IACd,MAAAV;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAI;AAAA,IACA,WAAAD;AAAA,IACA,UAAAD;AAAA,IACA,WAAAD;AAAA,IACA,UAAAI;AAAA,IACA,aAAAE;AAAA,IACA,MAAMF,MAAaC,EAAS,WAAW,WAAW;AAAA,IAClD,cAAAG;AAAA,IACA,YAAAC;AAAA,IACA,QAAQK;AAAA,IACR,YAAY;AAAA,IACZ,mBAAAJ;AAAA,IACA,UAAUN,MAAaC,EAAS,WAAW,aAAa;AAAA,IACxD,gBAAAM;AAAA,IACA,cAAa;AAAA,IAEZ,UAAAf;AAAA,EAAA;AAAA;AAIbF,EAAO,cAAc;"}
@@ -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;"}