@frontify/fondue 12.0.0-beta.137 → 12.0.0-beta.138
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.
- package/dist/components/RichTextEditor/Plugins/AlignPlugin/AlignCenterPlugin/AlignCenterButton.es.js +4 -4
- package/dist/components/RichTextEditor/Plugins/AlignPlugin/AlignCenterPlugin/AlignCenterButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/AlignPlugin/AlignJustifyPlugin/AlignJustifyButton.es.js +4 -4
- package/dist/components/RichTextEditor/Plugins/AlignPlugin/AlignJustifyPlugin/AlignJustifyButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/AlignPlugin/AlignLeftPlugin/AlignLeftButton.es.js +4 -4
- package/dist/components/RichTextEditor/Plugins/AlignPlugin/AlignLeftPlugin/AlignLeftButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/AlignPlugin/AlignRightPlugin/AlignRightButton.es.js +2 -2
- package/dist/components/RichTextEditor/Plugins/AlignPlugin/AlignRightPlugin/AlignRightButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/BoldPlugin/BoldButton.es.js +2 -2
- package/dist/components/RichTextEditor/Plugins/BoldPlugin/BoldButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/ButtonPlugin/components/ButtonButton.es.js +6 -7
- package/dist/components/RichTextEditor/Plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +20 -14
- package/dist/components/RichTextEditor/Plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/index.es.js +4 -4
- package/dist/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/CodePlugin/CodeButton.es.js +2 -2
- package/dist/components/RichTextEditor/Plugins/CodePlugin/CodeButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/ColumnBreakPlugin/ColumnBreakButton/ColumnBreakToolbarButton.es.js +13 -16
- package/dist/components/RichTextEditor/Plugins/ColumnBreakPlugin/ColumnBreakButton/ColumnBreakToolbarButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/ColumnBreakPlugin/ColumnBreakButton/index.es.js +2 -2
- package/dist/components/RichTextEditor/Plugins/ColumnBreakPlugin/ColumnBreakButton/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/EmojiPlugin/EmojiButton.es.js +5 -5
- package/dist/components/RichTextEditor/Plugins/EmojiPlugin/EmojiButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/ItalicPlugin/ItalicButton.es.js +2 -2
- package/dist/components/RichTextEditor/Plugins/ItalicPlugin/ItalicButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/LinkButton.d.ts +1 -1
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/LinkButton.es.js +24 -17
- package/dist/components/RichTextEditor/Plugins/LinkPlugin/LinkButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListButton.es.js +2 -2
- package/dist/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListButton.es.js +4 -4
- package/dist/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/ResetFormattingPlugin/ResetFormattingButton/index.es.js +2 -2
- package/dist/components/RichTextEditor/Plugins/ResetFormattingPlugin/ResetFormattingButton/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/StrikethroughPlugin/StrikethroughButton.es.js +4 -4
- package/dist/components/RichTextEditor/Plugins/StrikethroughPlugin/StrikethroughButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/UnderlinePlugin/UnderlineButton.es.js +2 -2
- package/dist/components/RichTextEditor/Plugins/UnderlinePlugin/UnderlineButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/Plugins/helper.d.ts +1 -1
- package/dist/components/RichTextEditor/Plugins/helper.es.js +7 -7
- package/dist/components/RichTextEditor/Plugins/helper.es.js.map +1 -1
- package/dist/index.cjs.js +27 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.umd.js +24 -24
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/LinkPlugin/LinkButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { getHotkeyByPlatform } from '@components/RichTextEditor/helpers/getHotkeyByPlatform';\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\nimport { IconLink16 } from '@foundation/Icon/Generated';\nimport { LinkToolbarButton } from '@udecode/plate';\nimport React from 'react';\nimport { ButtonWrapper, IconStylingWrapper,
|
|
1
|
+
{"version":3,"file":"LinkButton.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/LinkPlugin/LinkButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { getHotkeyByPlatform } from '@components/RichTextEditor/helpers/getHotkeyByPlatform';\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\nimport { IconLink16 } from '@foundation/Icon/Generated';\nimport { LinkToolbarButton, isRangeInSameBlock, useEventPlateId, usePlateEditorState } from '@udecode/plate';\nimport React from 'react';\nimport { ButtonWrapper, IconStylingWrapper, buttonStyles, getButtonClassNames } from '../helper';\nimport { PluginButtonProps } from '../types';\n\nexport const LinkButton = ({ id, editorId }: PluginButtonProps) => {\n const editor = usePlateEditorState(useEventPlateId(editorId));\n const isEnabled = !!isRangeInSameBlock(editor, {\n at: editor.selection,\n });\n const buttonClassNames = getButtonClassNames(isEnabled);\n\n return (\n <ButtonWrapper id={id}>\n <LinkToolbarButton\n tooltip={getTooltip(\n isEnabled\n ? `Link\\n${getHotkeyByPlatform('Ctrl+K')}`\n : 'Links can only be set for a single text block.',\n )}\n icon={<IconStylingWrapper icon={<IconLink16 />} />}\n classNames={buttonClassNames}\n styles={buttonStyles}\n actionHandler=\"onMouseDown\"\n />\n </ButtonWrapper>\n );\n};\n"],"names":["LinkButton","id","editorId","editor","usePlateEditorState","useEventPlateId","isEnabled","isRangeInSameBlock","buttonClassNames","getButtonClassNames","React","ButtonWrapper","LinkToolbarButton","getTooltip","getHotkeyByPlatform","IconStylingWrapper","IconLink16","buttonStyles"],"mappings":";;;;;;AAUO,MAAMA,IAAa,CAAC,EAAE,IAAAC,GAAI,UAAAC,QAAkC;AAC/D,QAAMC,IAASC,EAAoBC,EAAgBH,CAAQ,CAAC,GACtDI,IAAY,CAAC,CAACC,EAAmBJ,GAAQ;AAAA,IAC3C,IAAIA,EAAO;AAAA,EAAA,CACd,GACKK,IAAmBC,EAAoBH,CAAS;AAGlD,SAAA,gBAAAI,EAAA,cAACC,KAAc,IAAAV,EACX,GAAA,gBAAAS,EAAA;AAAA,IAACE;AAAA,IAAA;AAAA,MACG,SAASC;AAAA,QACLP,IACM;AAAA,EAASQ,EAAoB,QAAQ,MACrC;AAAA,MACV;AAAA,MACA,MAAO,gBAAAJ,EAAA,cAAAK,GAAA,EAAmB,MAAM,gBAAAL,EAAA,cAACM,OAAW,GAAI;AAAA,MAChD,YAAYR;AAAA,MACZ,QAAQS;AAAA,MACR,eAAc;AAAA,IAAA;AAAA,EAAA,CAEtB;AAER;"}
|
package/dist/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListButton.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getTooltip as r } from "../../../helpers/getTooltip.es.js";
|
|
2
2
|
import { ListToolbarButton as n, getPluginType as l } from "@udecode/plate";
|
|
3
3
|
import t from "react";
|
|
4
|
-
import { ButtonWrapper as m, IconStylingWrapper as s,
|
|
4
|
+
import { ButtonWrapper as m, IconStylingWrapper as s, getButtonClassNames as i, buttonStyles as a } from "../../helper.es.js";
|
|
5
5
|
import p from "../../../../../foundation/Icon/Generated/IconListNumbers16.es.js";
|
|
6
6
|
const d = ({ editor: o, id: e }) => /* @__PURE__ */ t.createElement(m, { id: e }, /* @__PURE__ */ t.createElement(
|
|
7
7
|
n,
|
|
@@ -9,7 +9,7 @@ const d = ({ editor: o, id: e }) => /* @__PURE__ */ t.createElement(m, { id: e }
|
|
|
9
9
|
tooltip: r("Ordered list"),
|
|
10
10
|
type: l(o, e),
|
|
11
11
|
icon: /* @__PURE__ */ t.createElement(s, { icon: /* @__PURE__ */ t.createElement(p, null) }),
|
|
12
|
-
classNames: i,
|
|
12
|
+
classNames: i(),
|
|
13
13
|
styles: a,
|
|
14
14
|
actionHandler: "onMouseDown"
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedListButton.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\nimport { IconListNumbers16 } from '@foundation/Icon/Generated';\nimport { ListToolbarButton, getPluginType } from '@udecode/plate';\nimport React from 'react';\nimport { ButtonWrapper, IconStylingWrapper,
|
|
1
|
+
{"version":3,"file":"OrderedListButton.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ListPlugin/OrderedListPlugin/OrderedListButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\nimport { IconListNumbers16 } from '@foundation/Icon/Generated';\nimport { ListToolbarButton, getPluginType } from '@udecode/plate';\nimport React from 'react';\nimport { ButtonWrapper, IconStylingWrapper, buttonStyles, getButtonClassNames } from '../../helper';\nimport { PluginButtonProps } from '../../types';\n\nexport const OrderedListButton = ({ editor, id }: PluginButtonProps) => (\n <ButtonWrapper id={id}>\n <ListToolbarButton\n tooltip={getTooltip('Ordered list')}\n type={getPluginType(editor, id)}\n icon={<IconStylingWrapper icon={<IconListNumbers16 />} />}\n classNames={getButtonClassNames()}\n styles={buttonStyles}\n actionHandler=\"onMouseDown\"\n />\n </ButtonWrapper>\n);\n"],"names":["OrderedListButton","editor","id","React","ButtonWrapper","ListToolbarButton","getTooltip","getPluginType","IconStylingWrapper","IconListNumbers16","getButtonClassNames","buttonStyles"],"mappings":";;;;;AASa,MAAAA,IAAoB,CAAC,EAAE,QAAAC,GAAQ,IAAAC,QACxC,gBAAAC,EAAA,cAACC,KAAc,IAAAF,EACX,GAAA,gBAAAC,EAAA;AAAA,EAACE;AAAA,EAAA;AAAA,IACG,SAASC,EAAW,cAAc;AAAA,IAClC,MAAMC,EAAcN,GAAQC,CAAE;AAAA,IAC9B,MAAO,gBAAAC,EAAA,cAAAK,GAAA,EAAmB,MAAM,gBAAAL,EAAA,cAACM,OAAkB,GAAI;AAAA,IACvD,YAAYC,EAAoB;AAAA,IAChC,QAAQC;AAAA,IACR,eAAc;AAAA,EAAA;AAClB,CACJ;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { ListToolbarButton as r, getPluginType as n } from "@udecode/plate";
|
|
3
|
-
import { ButtonWrapper as l, IconStylingWrapper as m,
|
|
3
|
+
import { ButtonWrapper as l, IconStylingWrapper as m, getButtonClassNames as i, buttonStyles as s } from "../../helper.es.js";
|
|
4
4
|
import { getTooltip as a } from "../../../helpers/getTooltip.es.js";
|
|
5
5
|
import p from "../../../../../foundation/Icon/Generated/IconListBullet16.es.js";
|
|
6
|
-
const
|
|
6
|
+
const y = ({ editor: o, id: e }) => /* @__PURE__ */ t.createElement(l, { id: e }, /* @__PURE__ */ t.createElement(
|
|
7
7
|
r,
|
|
8
8
|
{
|
|
9
9
|
tooltip: a("Bullet list"),
|
|
10
10
|
type: n(o, e),
|
|
11
11
|
icon: /* @__PURE__ */ t.createElement(m, { icon: /* @__PURE__ */ t.createElement(p, null) }),
|
|
12
|
-
classNames: i,
|
|
12
|
+
classNames: i(),
|
|
13
13
|
styles: s,
|
|
14
14
|
actionHandler: "onMouseDown"
|
|
15
15
|
}
|
|
16
16
|
));
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
y as UnorderedListButton
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=UnorderedListButton.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnorderedListButton.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React from 'react';\nimport { ListToolbarButton, getPluginType } from '@udecode/plate';\nimport { IconListBullet16 } from '@foundation/Icon/Generated';\nimport { ButtonWrapper, IconStylingWrapper,
|
|
1
|
+
{"version":3,"file":"UnorderedListButton.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ListPlugin/UnorderedListPlugin/UnorderedListButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React from 'react';\nimport { ListToolbarButton, getPluginType } from '@udecode/plate';\nimport { IconListBullet16 } from '@foundation/Icon/Generated';\nimport { ButtonWrapper, IconStylingWrapper, buttonStyles, getButtonClassNames } from '../../helper';\nimport { PluginButtonProps } from '../../types';\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\n\nexport const UnorderedListButton = ({ editor, id }: PluginButtonProps) => (\n <ButtonWrapper id={id}>\n <ListToolbarButton\n tooltip={getTooltip('Bullet list')}\n type={getPluginType(editor, id)}\n icon={<IconStylingWrapper icon={<IconListBullet16 />} />}\n classNames={getButtonClassNames()}\n styles={buttonStyles}\n actionHandler=\"onMouseDown\"\n />\n </ButtonWrapper>\n);\n"],"names":["UnorderedListButton","editor","id","React","ButtonWrapper","ListToolbarButton","getTooltip","getPluginType","IconStylingWrapper","IconListBullet16","getButtonClassNames","buttonStyles"],"mappings":";;;;;AASa,MAAAA,IAAsB,CAAC,EAAE,QAAAC,GAAQ,IAAAC,QAC1C,gBAAAC,EAAA,cAACC,KAAc,IAAAF,EACX,GAAA,gBAAAC,EAAA;AAAA,EAACE;AAAA,EAAA;AAAA,IACG,SAASC,EAAW,aAAa;AAAA,IACjC,MAAMC,EAAcN,GAAQC,CAAE;AAAA,IAC9B,MAAO,gBAAAC,EAAA,cAAAK,GAAA,EAAmB,MAAM,gBAAAL,EAAA,cAACM,OAAiB,GAAI;AAAA,IACtD,YAAYC,EAAoB;AAAA,IAChC,QAAQC;AAAA,IACR,eAAc;AAAA,EAAA;AAClB,CACJ;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { ResetFormattingToolbarButton as o } from "./ResetFormattingToolbarButton.es.js";
|
|
3
|
-
import { ButtonWrapper as r, IconStylingWrapper as n,
|
|
3
|
+
import { ButtonWrapper as r, IconStylingWrapper as n, getButtonClassNames as m, buttonStyles as a } from "../../helper.es.js";
|
|
4
4
|
import s from "../../../../../foundation/Icon/Generated/IconEraser16.es.js";
|
|
5
5
|
const u = ({ id: e }) => /* @__PURE__ */ t.createElement(r, { id: e }, /* @__PURE__ */ t.createElement(
|
|
6
6
|
o,
|
|
7
7
|
{
|
|
8
8
|
icon: /* @__PURE__ */ t.createElement(n, { icon: /* @__PURE__ */ t.createElement(s, null) }),
|
|
9
|
-
classNames: m,
|
|
9
|
+
classNames: m(),
|
|
10
10
|
styles: a
|
|
11
11
|
}
|
|
12
12
|
));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ResetFormattingPlugin/ResetFormattingButton/index.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React from 'react';\nimport { IconEraser16 } from '@foundation/Icon/Generated';\nimport { ResetFormattingToolbarButton } from './ResetFormattingToolbarButton';\nimport { ButtonWrapper, IconStylingWrapper,
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/ResetFormattingPlugin/ResetFormattingButton/index.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React from 'react';\nimport { IconEraser16 } from '@foundation/Icon/Generated';\nimport { ResetFormattingToolbarButton } from './ResetFormattingToolbarButton';\nimport { ButtonWrapper, IconStylingWrapper, buttonStyles, getButtonClassNames } from '../../helper';\nimport { PluginButtonProps } from '../../types';\n\nexport const ResetFormattingButton = ({ id }: PluginButtonProps) => (\n <ButtonWrapper id={id}>\n <ResetFormattingToolbarButton\n icon={<IconStylingWrapper icon={<IconEraser16 />} />}\n classNames={getButtonClassNames()}\n styles={buttonStyles}\n />\n </ButtonWrapper>\n);\n"],"names":["ResetFormattingButton","id","React","ButtonWrapper","ResetFormattingToolbarButton","IconStylingWrapper","IconEraser16","getButtonClassNames","buttonStyles"],"mappings":";;;;AAQO,MAAMA,IAAwB,CAAC,EAAE,IAAAC,QACpC,gBAAAC,EAAA,cAACC,KAAc,IAAAF,KACX,gBAAAC,EAAA;AAAA,EAACE;AAAA,EAAA;AAAA,IACG,MAAO,gBAAAF,EAAA,cAAAG,GAAA,EAAmB,MAAM,gBAAAH,EAAA,cAACI,OAAa,GAAI;AAAA,IAClD,YAAYC,EAAoB;AAAA,IAChC,QAAQC;AAAA,EAAA;AACZ,CACJ;"}
|
package/dist/components/RichTextEditor/Plugins/StrikethroughPlugin/StrikethroughButton.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { getTooltip as r } from "../../helpers/getTooltip.es.js";
|
|
2
2
|
import { MarkToolbarButton as n, getPluginType as m } from "@udecode/plate";
|
|
3
3
|
import t from "react";
|
|
4
|
-
import { ButtonWrapper as a, IconStylingWrapper as l,
|
|
4
|
+
import { ButtonWrapper as a, IconStylingWrapper as l, getButtonClassNames as i, buttonStyles as p } from "../helper.es.js";
|
|
5
5
|
import c from "../../../../foundation/Icon/Generated/IconTextFormatStrikethrough.es.js";
|
|
6
|
-
const y = ({ editor:
|
|
6
|
+
const y = ({ editor: o, id: e }) => /* @__PURE__ */ t.createElement(a, { id: e }, /* @__PURE__ */ t.createElement(
|
|
7
7
|
n,
|
|
8
8
|
{
|
|
9
9
|
tooltip: r("Strikethrough"),
|
|
10
|
-
type: m(
|
|
10
|
+
type: m(o, e),
|
|
11
11
|
icon: /* @__PURE__ */ t.createElement(l, { icon: /* @__PURE__ */ t.createElement(c, null) }),
|
|
12
|
-
classNames: i,
|
|
12
|
+
classNames: i(),
|
|
13
13
|
styles: p,
|
|
14
14
|
actionHandler: "onMouseDown"
|
|
15
15
|
}
|
package/dist/components/RichTextEditor/Plugins/StrikethroughPlugin/StrikethroughButton.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StrikethroughButton.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/StrikethroughPlugin/StrikethroughButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\nimport { IconTextFormatStrikethrough } from '@foundation/Icon/Generated';\nimport { MarkToolbarButton, getPluginType } from '@udecode/plate';\nimport React from 'react';\nimport { ButtonWrapper, IconStylingWrapper,
|
|
1
|
+
{"version":3,"file":"StrikethroughButton.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/StrikethroughPlugin/StrikethroughButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\nimport { IconTextFormatStrikethrough } from '@foundation/Icon/Generated';\nimport { MarkToolbarButton, getPluginType } from '@udecode/plate';\nimport React from 'react';\nimport { ButtonWrapper, IconStylingWrapper, buttonStyles, getButtonClassNames } from '../helper';\nimport { PluginButtonProps } from '../types';\n\nexport const StrikethroughButton = ({ editor, id }: PluginButtonProps) => (\n <ButtonWrapper id={id}>\n <MarkToolbarButton\n tooltip={getTooltip('Strikethrough')}\n type={getPluginType(editor, id)}\n icon={<IconStylingWrapper icon={<IconTextFormatStrikethrough />} />}\n classNames={getButtonClassNames()}\n styles={buttonStyles}\n actionHandler=\"onMouseDown\"\n />\n </ButtonWrapper>\n);\n"],"names":["StrikethroughButton","editor","id","React","ButtonWrapper","MarkToolbarButton","getTooltip","getPluginType","IconStylingWrapper","IconTextFormatStrikethrough","getButtonClassNames","buttonStyles"],"mappings":";;;;;AASa,MAAAA,IAAsB,CAAC,EAAE,QAAAC,GAAQ,IAAAC,QAC1C,gBAAAC,EAAA,cAACC,KAAc,IAAAF,EACX,GAAA,gBAAAC,EAAA;AAAA,EAACE;AAAA,EAAA;AAAA,IACG,SAASC,EAAW,eAAe;AAAA,IACnC,MAAMC,EAAcN,GAAQC,CAAE;AAAA,IAC9B,MAAO,gBAAAC,EAAA,cAAAK,GAAA,EAAmB,MAAM,gBAAAL,EAAA,cAACM,OAA4B,GAAI;AAAA,IACjE,YAAYC,EAAoB;AAAA,IAChC,QAAQC;AAAA,IACR,eAAc;AAAA,EAAA;AAClB,CACJ;"}
|
|
@@ -2,7 +2,7 @@ import { getHotkeyByPlatform as r } from "../../helpers/getHotkeyByPlatform.es.j
|
|
|
2
2
|
import { getTooltip as n } from "../../helpers/getTooltip.es.js";
|
|
3
3
|
import { MarkToolbarButton as l, getPluginType as m } from "@udecode/plate";
|
|
4
4
|
import t from "react";
|
|
5
|
-
import { ButtonWrapper as a, IconStylingWrapper as i,
|
|
5
|
+
import { ButtonWrapper as a, IconStylingWrapper as i, getButtonClassNames as p, buttonStyles as c } from "../helper.es.js";
|
|
6
6
|
import s from "../../../../foundation/Icon/Generated/IconTextFormatUnderline16.es.js";
|
|
7
7
|
const T = ({ editor: o, id: e }) => /* @__PURE__ */ t.createElement(a, { id: e }, /* @__PURE__ */ t.createElement(
|
|
8
8
|
l,
|
|
@@ -11,7 +11,7 @@ const T = ({ editor: o, id: e }) => /* @__PURE__ */ t.createElement(a, { id: e }
|
|
|
11
11
|
${r("Ctrl+U")}`),
|
|
12
12
|
type: m(o, e),
|
|
13
13
|
icon: /* @__PURE__ */ t.createElement(i, { icon: /* @__PURE__ */ t.createElement(s, null) }),
|
|
14
|
-
classNames: p,
|
|
14
|
+
classNames: p(),
|
|
15
15
|
styles: c,
|
|
16
16
|
actionHandler: "onMouseDown"
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnderlineButton.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/UnderlinePlugin/UnderlineButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { getHotkeyByPlatform } from '@components/RichTextEditor/helpers/getHotkeyByPlatform';\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\nimport { IconTextFormatUnderline16 } from '@foundation/Icon/Generated';\nimport { MarkToolbarButton, getPluginType } from '@udecode/plate';\nimport React from 'react';\nimport { ButtonWrapper, IconStylingWrapper,
|
|
1
|
+
{"version":3,"file":"UnderlineButton.es.js","sources":["../../../../../src/components/RichTextEditor/Plugins/UnderlinePlugin/UnderlineButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { getHotkeyByPlatform } from '@components/RichTextEditor/helpers/getHotkeyByPlatform';\nimport { getTooltip } from '@components/RichTextEditor/helpers/getTooltip';\nimport { IconTextFormatUnderline16 } from '@foundation/Icon/Generated';\nimport { MarkToolbarButton, getPluginType } from '@udecode/plate';\nimport React from 'react';\nimport { ButtonWrapper, IconStylingWrapper, buttonStyles, getButtonClassNames } from '../helper';\nimport { PluginButtonProps } from '../types';\n\nexport const UnderlineButton = ({ editor, id }: PluginButtonProps) => (\n <ButtonWrapper id={id}>\n <MarkToolbarButton\n tooltip={getTooltip(`Underline\\n${getHotkeyByPlatform('Ctrl+U')}`)}\n type={getPluginType(editor, id)}\n icon={<IconStylingWrapper icon={<IconTextFormatUnderline16 />} />}\n classNames={getButtonClassNames()}\n styles={buttonStyles}\n actionHandler=\"onMouseDown\"\n />\n </ButtonWrapper>\n);\n"],"names":["UnderlineButton","editor","id","React","ButtonWrapper","MarkToolbarButton","getTooltip","getHotkeyByPlatform","getPluginType","IconStylingWrapper","IconTextFormatUnderline16","getButtonClassNames","buttonStyles"],"mappings":";;;;;;AAUa,MAAAA,IAAkB,CAAC,EAAE,QAAAC,GAAQ,IAAAC,QACtC,gBAAAC,EAAA,cAACC,KAAc,IAAAF,EACX,GAAA,gBAAAC,EAAA;AAAA,EAACE;AAAA,EAAA;AAAA,IACG,SAASC,EAAW;AAAA,EAAcC,EAAoB,QAAQ,GAAG;AAAA,IACjE,MAAMC,EAAcP,GAAQC,CAAE;AAAA,IAC9B,MAAO,gBAAAC,EAAA,cAAAM,GAAA,EAAmB,MAAM,gBAAAN,EAAA,cAACO,OAA0B,GAAI;AAAA,IAC/D,YAAYC,EAAoB;AAAA,IAChC,QAAQC;AAAA,IACR,eAAc;AAAA,EAAA;AAClB,CACJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ButtonGroupProps, IconStylingWrapperProps } from './types';
|
|
3
3
|
export declare const IconStylingWrapper: ({ icon }: IconStylingWrapperProps) => JSX.Element;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const getButtonClassNames: (isEnabled?: boolean) => {
|
|
5
5
|
root: string;
|
|
6
6
|
active: string;
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import o from "react";
|
|
2
|
-
const
|
|
3
|
-
root: "
|
|
2
|
+
const a = ({ icon: t }) => /* @__PURE__ */ o.createElement("span", { className: "tw-p-2 tw-h-8 tw-justify-center tw-items-center tw-flex" }, t), r = "tw-ml-0.5 !tw-text-text-weak hover:!tw-bg-box-selected hover:!tw-text-box-selected-inverse hover:tw-rounded", n = (t = !0) => ({
|
|
3
|
+
root: t ? r : "!tw-text-text-weak !tw-cursor-not-allowed !tw-opacity-50",
|
|
4
4
|
active: "!tw-bg-box-selected tw-rounded !tw-text-box-selected-inverse"
|
|
5
|
-
},
|
|
5
|
+
}), w = { root: { width: "24px", height: "24px" } }, c = ({ index: t, children: e }) => /* @__PURE__ */ o.createElement("div", { "data-test-id": `toolbar-group-${t}`, className: "tw-flex tw-items-center tw-h-9 tw-p-2" }, e), l = ({ children: t, id: e }) => /* @__PURE__ */ o.createElement("div", { "data-plugin-id": e }, t);
|
|
6
6
|
export {
|
|
7
7
|
c as ButtonGroupWrapper,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
l as ButtonWrapper,
|
|
9
|
+
a as IconStylingWrapper,
|
|
10
|
+
w as buttonStyles,
|
|
11
|
+
n as getButtonClassNames
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=helper.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.es.js","sources":["../../../../src/components/RichTextEditor/Plugins/helper.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { ReactNode } from 'react';\nimport { ButtonGroupProps, IconStylingWrapperProps } from './types';\n\nexport const IconStylingWrapper = ({ icon }: IconStylingWrapperProps) => (\n <span className=\"tw-p-2 tw-h-8 tw-justify-center tw-items-center tw-flex\">{icon}</span>\n);\n\
|
|
1
|
+
{"version":3,"file":"helper.es.js","sources":["../../../../src/components/RichTextEditor/Plugins/helper.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { ReactNode } from 'react';\nimport { ButtonGroupProps, IconStylingWrapperProps } from './types';\n\nexport const IconStylingWrapper = ({ icon }: IconStylingWrapperProps) => (\n <span className=\"tw-p-2 tw-h-8 tw-justify-center tw-items-center tw-flex\">{icon}</span>\n);\n\nconst buttonRootClassNames =\n 'tw-ml-0.5 !tw-text-text-weak hover:!tw-bg-box-selected hover:!tw-text-box-selected-inverse hover:tw-rounded';\n\nexport const getButtonClassNames = (isEnabled = true) => ({\n root: isEnabled ? buttonRootClassNames : '!tw-text-text-weak !tw-cursor-not-allowed !tw-opacity-50',\n active: '!tw-bg-box-selected tw-rounded !tw-text-box-selected-inverse',\n});\nexport const buttonStyles = { root: { width: '24px', height: '24px' } };\n\nexport const ButtonGroupWrapper = ({ index, children }: ButtonGroupProps) => (\n <div data-test-id={`toolbar-group-${index}`} className=\"tw-flex tw-items-center tw-h-9 tw-p-2\">\n {children}\n </div>\n);\n\nexport const ButtonWrapper = ({ children, id }: { children: ReactNode; id: string }) => (\n <div data-plugin-id={id}>{children}</div>\n);\n"],"names":["IconStylingWrapper","icon","React","buttonRootClassNames","getButtonClassNames","isEnabled","buttonStyles","ButtonGroupWrapper","index","children","ButtonWrapper","id"],"mappings":";AAKa,MAAAA,IAAqB,CAAC,EAAE,MAAAC,QAChC,gBAAAC,EAAA,cAAA,QAAA,EAAK,WAAU,0DAAA,GAA2DD,CAAK,GAG9EE,IACF,+GAESC,IAAsB,CAACC,IAAY,QAAU;AAAA,EACtD,MAAMA,IAAYF,IAAuB;AAAA,EACzC,QAAQ;AACZ,IACaG,IAAe,EAAE,MAAM,EAAE,OAAO,QAAQ,QAAQ,SAAS,GAEzDC,IAAqB,CAAC,EAAE,OAAAC,GAAO,UAAAC,EAAS,MAChD,gBAAAP,EAAA,cAAA,OAAA,EAAI,gBAAc,iBAAiBM,KAAS,WAAU,2CAClDC,CACL,GAGSC,IAAgB,CAAC,EAAE,UAAAD,GAAU,IAAAE,QACrC,gBAAAT,EAAA,cAAA,OAAA,EAAI,kBAAgBS,EAAA,GAAKF,CAAS;"}
|