@frontify/fondue 12.2.9 → 12.2.11

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,28 +1,35 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { AnimatePresence as p, motion as s } from "framer-motion";
3
- const n = ({
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { AnimatePresence as n, motion as s } from "framer-motion";
3
+ const p = ({
4
4
  children: e,
5
- isOpen: i = !1,
6
- preventInitialAnimation: t = !1,
7
- animateOpacity: o = !0,
5
+ isOpen: a = !1,
6
+ preventInitialAnimation: o = !1,
7
+ animateOpacity: t = !0,
8
8
  "data-test-id": l = "collapsible-wrap"
9
- }) => /* @__PURE__ */ a(p, { initial: t ? !1 : void 0, children: i && e && /* @__PURE__ */ a(
9
+ }) => /* @__PURE__ */ i(n, { initial: o ? !1 : void 0, children: a && e && /* @__PURE__ */ i(
10
10
  s.div,
11
11
  {
12
12
  initial: "collapsed",
13
13
  animate: "open",
14
14
  exit: "collapsed",
15
15
  variants: {
16
- open: { height: "auto", overflow: "hidden", opacity: 1 },
17
- collapsed: { height: 0, overflow: "hidden", opacity: o ? 0 : 1 }
16
+ open: {
17
+ height: "auto",
18
+ overflow: "hidden",
19
+ opacity: 1,
20
+ transitionEnd: {
21
+ overflow: "visible"
22
+ }
23
+ },
24
+ collapsed: { height: 0, overflow: "hidden", opacity: t ? 0 : 1 }
18
25
  },
19
26
  transition: { type: "tween" },
20
27
  "data-test-id": l,
21
28
  children: e
22
29
  }
23
30
  ) });
24
- n.displayName = "FondueCollapsibleWrap";
31
+ p.displayName = "FondueCollapsibleWrap";
25
32
  export {
26
- n as CollapsibleWrap
33
+ p as CollapsibleWrap
27
34
  };
28
35
  //# sourceMappingURL=CollapsibleWrap.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleWrap.es.js","sources":["../../../src/components/CollapsibleWrap/CollapsibleWrap.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { type ReactElement } from 'react';\n\nimport { type CollapsibleWrapProps } from './types';\n\nexport const CollapsibleWrap = ({\n children,\n isOpen = false,\n preventInitialAnimation = false,\n animateOpacity = true,\n 'data-test-id': dataTestId = 'collapsible-wrap',\n}: CollapsibleWrapProps): ReactElement => (\n <AnimatePresence initial={preventInitialAnimation ? false : undefined}>\n {isOpen && children && (\n <motion.div\n initial={'collapsed'}\n animate={'open'}\n exit={'collapsed'}\n variants={{\n open: { height: 'auto', overflow: 'hidden', opacity: 1 },\n collapsed: { height: 0, overflow: 'hidden', opacity: animateOpacity ? 0 : 1 },\n }}\n transition={{ type: 'tween' }}\n data-test-id={dataTestId}\n >\n {children}\n </motion.div>\n )}\n </AnimatePresence>\n);\nCollapsibleWrap.displayName = 'FondueCollapsibleWrap';\n"],"names":["CollapsibleWrap","children","isOpen","preventInitialAnimation","animateOpacity","dataTestId","AnimatePresence","jsx","motion"],"mappings":";;AAOO,MAAMA,IAAkB,CAAC;AAAA,EAC5B,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,yBAAAC,IAA0B;AAAA,EAC1B,gBAAAC,IAAiB;AAAA,EACjB,gBAAgBC,IAAa;AACjC,wBACKC,GAAgB,EAAA,SAASH,IAA0B,KAAQ,QACvD,eAAUF,KACP,gBAAAM;AAAA,EAACC,EAAO;AAAA,EAAP;AAAA,IACG,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,MACN,MAAM,EAAE,QAAQ,QAAQ,UAAU,UAAU,SAAS,EAAE;AAAA,MACvD,WAAW,EAAE,QAAQ,GAAG,UAAU,UAAU,SAASJ,IAAiB,IAAI,EAAE;AAAA,IAChF;AAAA,IACA,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,gBAAcC;AAAA,IAEb,UAAAJ;AAAA,EAAA;AACL,GAER;AAEJD,EAAgB,cAAc;"}
1
+ {"version":3,"file":"CollapsibleWrap.es.js","sources":["../../../src/components/CollapsibleWrap/CollapsibleWrap.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { type ReactElement } from 'react';\n\nimport { type CollapsibleWrapProps } from './types';\n\nexport const CollapsibleWrap = ({\n children,\n isOpen = false,\n preventInitialAnimation = false,\n animateOpacity = true,\n 'data-test-id': dataTestId = 'collapsible-wrap',\n}: CollapsibleWrapProps): ReactElement => (\n <AnimatePresence initial={preventInitialAnimation ? false : undefined}>\n {isOpen && children && (\n <motion.div\n initial={'collapsed'}\n animate={'open'}\n exit={'collapsed'}\n variants={{\n open: {\n height: 'auto',\n overflow: 'hidden',\n opacity: 1,\n transitionEnd: {\n overflow: 'visible',\n },\n },\n collapsed: { height: 0, overflow: 'hidden', opacity: animateOpacity ? 0 : 1 },\n }}\n transition={{ type: 'tween' }}\n data-test-id={dataTestId}\n >\n {children}\n </motion.div>\n )}\n </AnimatePresence>\n);\nCollapsibleWrap.displayName = 'FondueCollapsibleWrap';\n"],"names":["CollapsibleWrap","children","isOpen","preventInitialAnimation","animateOpacity","dataTestId","AnimatePresence","jsx","motion"],"mappings":";;AAOO,MAAMA,IAAkB,CAAC;AAAA,EAC5B,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,yBAAAC,IAA0B;AAAA,EAC1B,gBAAAC,IAAiB;AAAA,EACjB,gBAAgBC,IAAa;AACjC,wBACKC,GAAgB,EAAA,SAASH,IAA0B,KAAQ,QACvD,eAAUF,KACP,gBAAAM;AAAA,EAACC,EAAO;AAAA,EAAP;AAAA,IACG,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,MACN,MAAM;AAAA,QACF,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,SAAS;AAAA,QACT,eAAe;AAAA,UACX,UAAU;AAAA,QACd;AAAA,MACJ;AAAA,MACA,WAAW,EAAE,QAAQ,GAAG,UAAU,UAAU,SAASJ,IAAiB,IAAI,EAAE;AAAA,IAChF;AAAA,IACA,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,gBAAcC;AAAA,IAEb,UAAAJ;AAAA,EAAA;AACL,GAER;AAEJD,EAAgB,cAAc;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { useEditorRef as c } from "@udecode/plate-core";
3
- import { ELEMENT_OL as l, ELEMENT_LI as p } from "@udecode/plate-list";
3
+ import { ELEMENT_OL as p, ELEMENT_LI as l } from "@udecode/plate-list";
4
4
  import { getNodeAncestors as i } from "@udecode/slate";
5
5
  import { findNodePath as m } from "@udecode/slate-react";
6
6
  import { MarkupElement as u } from "../../MarkupElement.es.js";
@@ -13,24 +13,24 @@ const a = [
13
13
  if (!e)
14
14
  return 0;
15
15
  const r = i(t, e);
16
- return Array.from(r).filter((n) => n[0].type === p).length;
17
- }, d = (t) => `tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px] [&>li>p]:before:tw-pr-1 [&>li>p]:before:tw-tabular-nums ${a[t % 3]}`, E = { counterReset: "count" }, L = ({
16
+ return Array.from(r).filter((n) => n[0].type === l).length;
17
+ }, d = (t) => `tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px] [&>li>p]:before:tw-whitespace-nowrap [&>li>p]:before:tw-pr-1 [&>li>p]:before:tw-tabular-nums ${a[t % 3]}`, w = { counterReset: "count" }, E = ({
18
18
  attributes: t,
19
19
  children: o,
20
20
  element: e
21
21
  }) => {
22
22
  const r = c(), n = f(r, e);
23
- return /* @__PURE__ */ s("ol", { className: d(n), ...t, style: E, children: o });
23
+ return /* @__PURE__ */ s("ol", { className: d(n), ...t, style: w, children: o });
24
24
  };
25
- class M extends u {
26
- constructor(o = l, e = L) {
25
+ class h extends u {
26
+ constructor(o = p, e = E) {
27
27
  super(o, e);
28
28
  }
29
29
  }
30
30
  export {
31
- E as OL_STYLES,
32
- M as OrderedListMarkupElement,
33
- L as OrderedListMarkupElementNode,
31
+ w as OL_STYLES,
32
+ h as OrderedListMarkupElement,
33
+ E as OrderedListMarkupElementNode,
34
34
  d as getOrderedListClasses
35
35
  };
36
36
  //# sourceMappingURL=OrderedListMarkupElement.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrderedListMarkupElement.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListMarkupElement.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type PlateEditor, type PlateRenderLeafProps, useEditorRef } from '@udecode/plate-core';\nimport { ELEMENT_LI, ELEMENT_OL } from '@udecode/plate-list';\nimport { type TElement, getNodeAncestors } from '@udecode/slate';\nimport { findNodePath } from '@udecode/slate-react';\n\nimport { MarkupElement } from '../../MarkupElement';\n\nconst LIST_TYPES = [\n \"[&>li>p]:before:tw-content-[counter(count,decimal)_'._']\",\n \"[&>li>p]:before:tw-content-[counter(count,_lower-alpha)_'._']\",\n \"[&>li>p]:before:tw-content-[counter(count,lower-roman)_'._']\",\n];\n\nconst getNestingLevel = (editor: PlateEditor, element: TElement) => {\n const path = findNodePath(editor, element);\n if (!path) {\n return 0;\n }\n\n const nodeAncestors = getNodeAncestors(editor, path);\n return Array.from(nodeAncestors).filter((node) => node[0].type === ELEMENT_LI).length;\n};\n\nexport const getOrderedListClasses = (nestingLevel: number) =>\n `tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px] [&>li>p]:before:tw-pr-1 [&>li>p]:before:tw-tabular-nums ${\n LIST_TYPES[nestingLevel % 3]\n }`;\nexport const OL_STYLES = { counterReset: 'count' };\n\nexport const OrderedListMarkupElementNode: (props: PlateRenderLeafProps & { element: TElement }) => JSX.Element = ({\n attributes,\n children,\n element,\n}) => {\n const editor = useEditorRef();\n const nestingLevel = getNestingLevel(editor, element);\n\n return (\n <ol className={getOrderedListClasses(nestingLevel)} {...attributes} style={OL_STYLES}>\n {children}\n </ol>\n );\n};\n\nexport class OrderedListMarkupElement extends MarkupElement {\n constructor(\n id = ELEMENT_OL,\n node: (props: PlateRenderLeafProps & { element: TElement }) => JSX.Element = OrderedListMarkupElementNode,\n ) {\n super(id, node);\n }\n}\n"],"names":["LIST_TYPES","getNestingLevel","editor","element","path","findNodePath","nodeAncestors","getNodeAncestors","node","ELEMENT_LI","getOrderedListClasses","nestingLevel","OL_STYLES","OrderedListMarkupElementNode","attributes","children","useEditorRef","jsx","OrderedListMarkupElement","MarkupElement","id","ELEMENT_OL"],"mappings":";;;;;;AASA,MAAMA,IAAa;AAAA,EACf;AAAA,EACA;AAAA,EACA;AACJ,GAEMC,IAAkB,CAACC,GAAqBC,MAAsB;AAC1D,QAAAC,IAAOC,EAAaH,GAAQC,CAAO;AACzC,MAAI,CAACC;AACM,WAAA;AAGL,QAAAE,IAAgBC,EAAiBL,GAAQE,CAAI;AACnD,SAAO,MAAM,KAAKE,CAAa,EAAE,OAAO,CAACE,MAASA,EAAK,CAAC,EAAE,SAASC,CAAU,EAAE;AACnF,GAEaC,IAAwB,CAACC,MAClC,+GACIX,EAAWW,IAAe,CAAC,CAC/B,IACSC,IAAY,EAAE,cAAc,QAAQ,GAEpCC,IAAqG,CAAC;AAAA,EAC/G,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAZ;AACJ,MAAM;AACF,QAAMD,IAASc,KACTL,IAAeV,EAAgBC,GAAQC,CAAO;AAGhD,SAAA,gBAAAc,EAAC,MAAG,EAAA,WAAWP,EAAsBC,CAAY,GAAI,GAAGG,GAAY,OAAOF,GACtE,UAAAG,EACL,CAAA;AAER;AAEO,MAAMG,UAAiCC,EAAc;AAAA,EACxD,YACIC,IAAKC,GACLb,IAA6EK,GAC/E;AACE,UAAMO,GAAIZ,CAAI;AAAA,EAClB;AACJ;"}
1
+ {"version":3,"file":"OrderedListMarkupElement.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListMarkupElement.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type PlateEditor, type PlateRenderLeafProps, useEditorRef } from '@udecode/plate-core';\nimport { ELEMENT_LI, ELEMENT_OL } from '@udecode/plate-list';\nimport { type TElement, getNodeAncestors } from '@udecode/slate';\nimport { findNodePath } from '@udecode/slate-react';\n\nimport { MarkupElement } from '../../MarkupElement';\n\nconst LIST_TYPES = [\n \"[&>li>p]:before:tw-content-[counter(count,decimal)_'._']\",\n \"[&>li>p]:before:tw-content-[counter(count,_lower-alpha)_'._']\",\n \"[&>li>p]:before:tw-content-[counter(count,lower-roman)_'._']\",\n];\n\nconst getNestingLevel = (editor: PlateEditor, element: TElement) => {\n const path = findNodePath(editor, element);\n if (!path) {\n return 0;\n }\n\n const nodeAncestors = getNodeAncestors(editor, path);\n return Array.from(nodeAncestors).filter((node) => node[0].type === ELEMENT_LI).length;\n};\n\nexport const getOrderedListClasses = (nestingLevel: number) =>\n `tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px] [&>li>p]:before:tw-whitespace-nowrap [&>li>p]:before:tw-pr-1 [&>li>p]:before:tw-tabular-nums ${\n LIST_TYPES[nestingLevel % 3]\n }`;\nexport const OL_STYLES = { counterReset: 'count' };\n\nexport const OrderedListMarkupElementNode: (props: PlateRenderLeafProps & { element: TElement }) => JSX.Element = ({\n attributes,\n children,\n element,\n}) => {\n const editor = useEditorRef();\n const nestingLevel = getNestingLevel(editor, element);\n\n return (\n <ol className={getOrderedListClasses(nestingLevel)} {...attributes} style={OL_STYLES}>\n {children}\n </ol>\n );\n};\n\nexport class OrderedListMarkupElement extends MarkupElement {\n constructor(\n id = ELEMENT_OL,\n node: (props: PlateRenderLeafProps & { element: TElement }) => JSX.Element = OrderedListMarkupElementNode,\n ) {\n super(id, node);\n }\n}\n"],"names":["LIST_TYPES","getNestingLevel","editor","element","path","findNodePath","nodeAncestors","getNodeAncestors","node","ELEMENT_LI","getOrderedListClasses","nestingLevel","OL_STYLES","OrderedListMarkupElementNode","attributes","children","useEditorRef","jsx","OrderedListMarkupElement","MarkupElement","id","ELEMENT_OL"],"mappings":";;;;;;AASA,MAAMA,IAAa;AAAA,EACf;AAAA,EACA;AAAA,EACA;AACJ,GAEMC,IAAkB,CAACC,GAAqBC,MAAsB;AAC1D,QAAAC,IAAOC,EAAaH,GAAQC,CAAO;AACzC,MAAI,CAACC;AACM,WAAA;AAGL,QAAAE,IAAgBC,EAAiBL,GAAQE,CAAI;AACnD,SAAO,MAAM,KAAKE,CAAa,EAAE,OAAO,CAACE,MAASA,EAAK,CAAC,EAAE,SAASC,CAAU,EAAE;AACnF,GAEaC,IAAwB,CAACC,MAClC,oJACIX,EAAWW,IAAe,CAAC,CAC/B,IACSC,IAAY,EAAE,cAAc,QAAQ,GAEpCC,IAAqG,CAAC;AAAA,EAC/G,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAZ;AACJ,MAAM;AACF,QAAMD,IAASc,KACTL,IAAeV,EAAgBC,GAAQC,CAAO;AAGhD,SAAA,gBAAAc,EAAC,MAAG,EAAA,WAAWP,EAAsBC,CAAY,GAAI,GAAGG,GAAY,OAAOF,GACtE,UAAAG,EACL,CAAA;AAER;AAEO,MAAMG,UAAiCC,EAAc;AAAA,EACxD,YACIC,IAAKC,GACLb,IAA6EK,GAC/E;AACE,UAAMO,GAAIZ,CAAI;AAAA,EAClB;AACJ;"}
@@ -1,15 +1,15 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { ELEMENT_UL as p } from "@udecode/plate-list";
3
3
  import { MarkupElement as n } from "../../MarkupElement.es.js";
4
- const s = "[&>li>p]:before:tw-content-['•'] [&>li>p]:before:tw-px-2 tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px]", m = ({ attributes: e, children: t }) => /* @__PURE__ */ o("ul", { className: s, ...e, children: t });
5
- class x extends n {
6
- constructor(t = p, r = m) {
7
- super(t, r);
4
+ const s = "[&>li>p]:before:tw-content-['•'] [&>li>p]:before:tw-whitespace-nowrap [&>li>p]:before:tw-px-2 tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px]", l = ({ attributes: t, children: e }) => /* @__PURE__ */ o("ul", { className: s, ...t, children: e });
5
+ class a extends n {
6
+ constructor(e = p, r = l) {
7
+ super(e, r);
8
8
  }
9
9
  }
10
10
  export {
11
11
  s as UL_CLASSES,
12
- x as UnorderedListMarkupElement,
13
- m as UnorderedListMarkupElementNode
12
+ a as UnorderedListMarkupElement,
13
+ l as UnorderedListMarkupElementNode
14
14
  };
15
15
  //# sourceMappingURL=UnorderedListMarkupElement.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnorderedListMarkupElement.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListMarkupElement.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type PlateRenderLeafProps } from '@udecode/plate-core';\nimport { ELEMENT_UL } from '@udecode/plate-list';\n\nimport { MarkupElement } from '../../MarkupElement';\n\nexport const UL_CLASSES =\n \"[&>li>p]:before:tw-content-['•'] [&>li>p]:before:tw-px-2 tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px]\";\n\nexport const UnorderedListMarkupElementNode = ({ attributes, children }: PlateRenderLeafProps) => (\n <ul className={UL_CLASSES} {...attributes}>\n {children}\n </ul>\n);\n\nexport class UnorderedListMarkupElement extends MarkupElement {\n constructor(id = ELEMENT_UL, node: (props: PlateRenderLeafProps) => JSX.Element = UnorderedListMarkupElementNode) {\n super(id, node);\n }\n}\n"],"names":["UL_CLASSES","UnorderedListMarkupElementNode","attributes","children","jsx","UnorderedListMarkupElement","MarkupElement","id","ELEMENT_UL","node"],"mappings":";;;AAOO,MAAMA,IACT,gHAESC,IAAiC,CAAC,EAAE,YAAAC,GAAY,UAAAC,EAAS,MACjE,gBAAAC,EAAA,MAAA,EAAG,WAAWJ,GAAa,GAAGE,GAC1B,UAAAC,EACL,CAAA;AAGG,MAAME,UAAmCC,EAAc;AAAA,EAC1D,YAAYC,IAAKC,GAAYC,IAAqDR,GAAgC;AAC9G,UAAMM,GAAIE,CAAI;AAAA,EAClB;AACJ;"}
1
+ {"version":3,"file":"UnorderedListMarkupElement.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListMarkupElement.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type PlateRenderLeafProps } from '@udecode/plate-core';\nimport { ELEMENT_UL } from '@udecode/plate-list';\n\nimport { MarkupElement } from '../../MarkupElement';\n\nexport const UL_CLASSES =\n \"[&>li>p]:before:tw-content-['•'] [&>li>p]:before:tw-whitespace-nowrap [&>li>p]:before:tw-px-2 tw-list-none tw-pl-[10px] tw-mb-[10px] tw-ml-[15px]\";\n\nexport const UnorderedListMarkupElementNode = ({ attributes, children }: PlateRenderLeafProps) => (\n <ul className={UL_CLASSES} {...attributes}>\n {children}\n </ul>\n);\n\nexport class UnorderedListMarkupElement extends MarkupElement {\n constructor(id = ELEMENT_UL, node: (props: PlateRenderLeafProps) => JSX.Element = UnorderedListMarkupElementNode) {\n super(id, node);\n }\n}\n"],"names":["UL_CLASSES","UnorderedListMarkupElementNode","attributes","children","jsx","UnorderedListMarkupElement","MarkupElement","id","ELEMENT_UL","node"],"mappings":";;;AAOO,MAAMA,IACT,qJAESC,IAAiC,CAAC,EAAE,YAAAC,GAAY,UAAAC,EAAS,MACjE,gBAAAC,EAAA,MAAA,EAAG,WAAWJ,GAAa,GAAGE,GAC1B,UAAAC,EACL,CAAA;AAGG,MAAME,UAAmCC,EAAc;AAAA,EAC1D,YAAYC,IAAKC,GAAYC,IAAqDR,GAAgC;AAC9G,UAAMM,GAAIE,CAAI;AAAA,EAClB;AACJ;"}