@forgedevstack/bear 1.1.1 → 1.1.4
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/ActionIcon/ActionIcon.cjs +1 -0
- package/dist/components/ActionIcon/ActionIcon.const.cjs +1 -0
- package/dist/components/ActionIcon/ActionIcon.const.d.ts +7 -0
- package/dist/components/ActionIcon/ActionIcon.const.js +68 -0
- package/dist/components/ActionIcon/ActionIcon.d.ts +4 -0
- package/dist/components/ActionIcon/ActionIcon.js +42 -0
- package/dist/components/ActionIcon/ActionIcon.types.d.ts +11 -0
- package/dist/components/ActionIcon/index.d.ts +2 -0
- package/dist/components/Affix/Affix.cjs +1 -0
- package/dist/components/Affix/Affix.const.cjs +1 -0
- package/dist/components/Affix/Affix.const.d.ts +6 -0
- package/dist/components/Affix/Affix.const.js +9 -0
- package/dist/components/Affix/Affix.d.ts +4 -0
- package/dist/components/Affix/Affix.js +69 -0
- package/dist/components/Affix/Affix.types.d.ts +10 -0
- package/dist/components/Affix/index.d.ts +2 -0
- package/dist/components/AlertDialog/AlertDialog.cjs +1 -0
- package/dist/components/AlertDialog/AlertDialog.const.cjs +1 -0
- package/dist/components/AlertDialog/AlertDialog.const.d.ts +5 -0
- package/dist/components/AlertDialog/AlertDialog.const.js +8 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +4 -0
- package/dist/components/AlertDialog/AlertDialog.js +107 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +34 -0
- package/dist/components/AlertDialog/index.d.ts +3 -0
- package/dist/components/Anchor/Anchor.cjs +1 -0
- package/dist/components/Anchor/Anchor.const.cjs +1 -0
- package/dist/components/Anchor/Anchor.const.d.ts +9 -0
- package/dist/components/Anchor/Anchor.const.js +11 -0
- package/dist/components/Anchor/Anchor.d.ts +4 -0
- package/dist/components/Anchor/Anchor.js +91 -0
- package/dist/components/Anchor/Anchor.types.d.ts +16 -0
- package/dist/components/Anchor/index.d.ts +2 -0
- package/dist/components/AspectRatio/AspectRatio.cjs +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +3 -0
- package/dist/components/AspectRatio/AspectRatio.js +29 -0
- package/dist/components/AspectRatio/AspectRatio.types.d.ts +9 -0
- package/dist/components/AspectRatio/index.d.ts +2 -0
- package/dist/components/Blockquote/Blockquote.cjs +1 -0
- package/dist/components/Blockquote/Blockquote.const.cjs +1 -0
- package/dist/components/Blockquote/Blockquote.const.d.ts +5 -0
- package/dist/components/Blockquote/Blockquote.const.js +19 -0
- package/dist/components/Blockquote/Blockquote.d.ts +4 -0
- package/dist/components/Blockquote/Blockquote.js +56 -0
- package/dist/components/Blockquote/Blockquote.types.d.ts +9 -0
- package/dist/components/Blockquote/index.d.ts +2 -0
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.constants.cjs +2 -2
- package/dist/components/Button/Button.constants.d.ts +1 -0
- package/dist/components/Button/Button.constants.js +10 -3
- package/dist/components/Button/Button.js +92 -84
- package/dist/components/Button/Button.types.d.ts +2 -0
- package/dist/components/CheckboxCard/CheckboxCard.cjs +1 -0
- package/dist/components/CheckboxCard/CheckboxCard.const.cjs +1 -0
- package/dist/components/CheckboxCard/CheckboxCard.const.d.ts +7 -0
- package/dist/components/CheckboxCard/CheckboxCard.const.js +22 -0
- package/dist/components/CheckboxCard/CheckboxCard.d.ts +5 -0
- package/dist/components/CheckboxCard/CheckboxCard.js +132 -0
- package/dist/components/CheckboxCard/CheckboxCard.types.d.ts +21 -0
- package/dist/components/CheckboxCard/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.const.cjs +1 -0
- package/dist/components/ColorPicker/ColorPicker.const.d.ts +26 -0
- package/dist/components/ColorPicker/ColorPicker.const.js +38 -0
- package/dist/components/ColorPicker/ColorPicker.js +61 -78
- package/dist/components/ColorSwatch/ColorSwatch.cjs +1 -0
- package/dist/components/ColorSwatch/ColorSwatch.const.cjs +1 -0
- package/dist/components/ColorSwatch/ColorSwatch.const.d.ts +16 -0
- package/dist/components/ColorSwatch/ColorSwatch.const.js +19 -0
- package/dist/components/ColorSwatch/ColorSwatch.d.ts +5 -0
- package/dist/components/ColorSwatch/ColorSwatch.js +92 -0
- package/dist/components/ColorSwatch/ColorSwatch.types.d.ts +23 -0
- package/dist/components/ColorSwatch/ColorSwatch.utils.cjs +1 -0
- package/dist/components/ColorSwatch/ColorSwatch.utils.d.ts +6 -0
- package/dist/components/ColorSwatch/ColorSwatch.utils.js +14 -0
- package/dist/components/ColorSwatch/index.d.ts +2 -0
- package/dist/components/ContextMenu/ContextMenu.cjs +1 -0
- package/dist/components/ContextMenu/ContextMenu.const.cjs +1 -0
- package/dist/components/ContextMenu/ContextMenu.const.d.ts +9 -0
- package/dist/components/ContextMenu/ContextMenu.const.js +12 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +4 -0
- package/dist/components/ContextMenu/ContextMenu.js +64 -0
- package/dist/components/ContextMenu/ContextMenu.types.d.ts +23 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.const.cjs +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.const.d.ts +27 -0
- package/dist/components/DateRangePicker/DateRangePicker.const.js +74 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +115 -0
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +26 -0
- package/dist/components/DateRangePicker/DateRangePicker.utils.cjs +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.utils.d.ts +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.utils.js +22 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Descriptions/Descriptions.cjs +1 -0
- package/dist/components/Descriptions/Descriptions.const.cjs +1 -0
- package/dist/components/Descriptions/Descriptions.const.d.ts +24 -0
- package/dist/components/Descriptions/Descriptions.const.js +27 -0
- package/dist/components/Descriptions/Descriptions.d.ts +4 -0
- package/dist/components/Descriptions/Descriptions.js +65 -0
- package/dist/components/Descriptions/Descriptions.types.d.ts +16 -0
- package/dist/components/Descriptions/index.d.ts +2 -0
- package/dist/components/Fieldset/Fieldset.cjs +1 -0
- package/dist/components/Fieldset/Fieldset.const.cjs +1 -0
- package/dist/components/Fieldset/Fieldset.const.d.ts +5 -0
- package/dist/components/Fieldset/Fieldset.const.js +16 -0
- package/dist/components/Fieldset/Fieldset.d.ts +4 -0
- package/dist/components/Fieldset/Fieldset.js +47 -0
- package/dist/components/Fieldset/Fieldset.types.d.ts +10 -0
- package/dist/components/Fieldset/index.d.ts +2 -0
- package/dist/components/FormField/FormField.cjs +1 -0
- package/dist/components/FormField/FormField.const.cjs +1 -0
- package/dist/components/FormField/FormField.const.d.ts +20 -0
- package/dist/components/FormField/FormField.const.js +23 -0
- package/dist/components/FormField/FormField.d.ts +3 -0
- package/dist/components/FormField/FormField.js +127 -0
- package/dist/components/FormField/FormField.types.d.ts +23 -0
- package/dist/components/FormField/index.d.ts +2 -0
- package/dist/components/ImageGallery/ImageGallery.cjs +1 -0
- package/dist/components/ImageGallery/ImageGallery.const.cjs +1 -0
- package/dist/components/ImageGallery/ImageGallery.const.d.ts +13 -0
- package/dist/components/ImageGallery/ImageGallery.const.js +16 -0
- package/dist/components/ImageGallery/ImageGallery.d.ts +4 -0
- package/dist/components/ImageGallery/ImageGallery.js +61 -0
- package/dist/components/ImageGallery/ImageGallery.types.d.ts +22 -0
- package/dist/components/ImageGallery/index.d.ts +2 -0
- package/dist/components/Indicator/Indicator.cjs +1 -0
- package/dist/components/Indicator/Indicator.const.cjs +1 -0
- package/dist/components/Indicator/Indicator.const.d.ts +15 -0
- package/dist/components/Indicator/Indicator.const.js +26 -0
- package/dist/components/Indicator/Indicator.d.ts +4 -0
- package/dist/components/Indicator/Indicator.js +56 -0
- package/dist/components/Indicator/Indicator.types.d.ts +16 -0
- package/dist/components/Indicator/index.d.ts +2 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.cjs +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.const.cjs +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.const.d.ts +7 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.const.js +10 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +4 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.js +51 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.types.d.ts +13 -0
- package/dist/components/InfiniteScroll/index.d.ts +2 -0
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.js +114 -44
- package/dist/components/Input/Input.types.d.ts +20 -0
- package/dist/components/Input/Input.utils.cjs +1 -0
- package/dist/components/Input/Input.utils.d.ts +2 -0
- package/dist/components/Input/Input.utils.js +15 -0
- package/dist/components/Input/components/ClearIcon/ClearIcon.cjs +1 -0
- package/dist/components/Input/components/ClearIcon/ClearIcon.d.ts +7 -0
- package/dist/components/Input/components/ClearIcon/ClearIcon.js +25 -0
- package/dist/components/Input/components/ClearIcon/index.d.ts +1 -0
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/InputGroup/InputGroup.cjs +1 -0
- package/dist/components/InputGroup/InputGroup.d.ts +4 -0
- package/dist/components/InputGroup/InputGroup.js +63 -0
- package/dist/components/InputGroup/InputGroup.types.d.ts +23 -0
- package/dist/components/InputGroup/index.d.ts +2 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.cjs +1 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.const.cjs +1 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.const.d.ts +6 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.const.js +9 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.d.ts +4 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.js +42 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.types.d.ts +11 -0
- package/dist/components/LoadingOverlay/index.d.ts +2 -0
- package/dist/components/NumberFormatter/NumberFormatter.cjs +1 -0
- package/dist/components/NumberFormatter/NumberFormatter.const.cjs +1 -0
- package/dist/components/NumberFormatter/NumberFormatter.const.d.ts +5 -0
- package/dist/components/NumberFormatter/NumberFormatter.const.js +8 -0
- package/dist/components/NumberFormatter/NumberFormatter.d.ts +4 -0
- package/dist/components/NumberFormatter/NumberFormatter.js +53 -0
- package/dist/components/NumberFormatter/NumberFormatter.types.d.ts +20 -0
- package/dist/components/NumberFormatter/NumberFormatter.utils.cjs +1 -0
- package/dist/components/NumberFormatter/NumberFormatter.utils.d.ts +2 -0
- package/dist/components/NumberFormatter/NumberFormatter.utils.js +19 -0
- package/dist/components/NumberFormatter/index.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +3 -0
- package/dist/components/PasswordInput/PasswordInput.js +61 -0
- package/dist/components/PasswordInput/PasswordInput.types.d.ts +18 -0
- package/dist/components/PasswordInput/index.d.ts +2 -0
- package/dist/components/Popconfirm/Popconfirm.cjs +1 -0
- package/dist/components/Popconfirm/Popconfirm.const.cjs +1 -0
- package/dist/components/Popconfirm/Popconfirm.const.d.ts +13 -0
- package/dist/components/Popconfirm/Popconfirm.const.js +20 -0
- package/dist/components/Popconfirm/Popconfirm.d.ts +4 -0
- package/dist/components/Popconfirm/Popconfirm.js +65 -0
- package/dist/components/Popconfirm/Popconfirm.types.d.ts +16 -0
- package/dist/components/Popconfirm/index.d.ts +2 -0
- package/dist/components/RadioCard/RadioCard.cjs +1 -0
- package/dist/components/RadioCard/RadioCard.const.cjs +1 -0
- package/dist/components/RadioCard/RadioCard.const.d.ts +7 -0
- package/dist/components/RadioCard/RadioCard.const.js +22 -0
- package/dist/components/RadioCard/RadioCard.d.ts +5 -0
- package/dist/components/RadioCard/RadioCard.js +111 -0
- package/dist/components/RadioCard/RadioCard.types.d.ts +22 -0
- package/dist/components/RadioCard/index.d.ts +2 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.cjs +1 -1
- package/dist/components/ResizableTextarea/ResizableTextarea.js +90 -54
- package/dist/components/ResizableTextarea/ResizableTextarea.types.d.ts +10 -0
- package/dist/components/Result/Result.cjs +1 -0
- package/dist/components/Result/Result.const.cjs +1 -0
- package/dist/components/Result/Result.const.d.ts +10 -0
- package/dist/components/Result/Result.const.js +20 -0
- package/dist/components/Result/Result.d.ts +4 -0
- package/dist/components/Result/Result.icons.cjs +1 -0
- package/dist/components/Result/Result.icons.d.ts +3 -0
- package/dist/components/Result/Result.icons.js +31 -0
- package/dist/components/Result/Result.js +35 -0
- package/dist/components/Result/Result.types.d.ts +10 -0
- package/dist/components/Result/index.d.ts +2 -0
- package/dist/components/RichEditor/RichEditor.cjs +1 -1
- package/dist/components/RichEditor/RichEditor.js +186 -169
- package/dist/components/RichEditor/RichEditor.types.d.ts +4 -0
- package/dist/components/RingProgress/RingProgress.cjs +1 -0
- package/dist/components/RingProgress/RingProgress.const.cjs +1 -0
- package/dist/components/RingProgress/RingProgress.const.d.ts +4 -0
- package/dist/components/RingProgress/RingProgress.const.js +7 -0
- package/dist/components/RingProgress/RingProgress.d.ts +4 -0
- package/dist/components/RingProgress/RingProgress.js +67 -0
- package/dist/components/RingProgress/RingProgress.types.d.ts +15 -0
- package/dist/components/RingProgress/index.d.ts +2 -0
- package/dist/components/SignPad/SignPad.cjs +1 -1
- package/dist/components/SignPad/SignPad.const.cjs +1 -1
- package/dist/components/SignPad/SignPad.const.js +10 -11
- package/dist/components/SignPad/SignPad.d.ts +4 -6
- package/dist/components/SignPad/SignPad.js +108 -116
- package/dist/components/SignPad/SignPad.types.d.ts +2 -2
- package/dist/components/SplitButton/SplitButton.cjs +1 -0
- package/dist/components/SplitButton/SplitButton.const.cjs +1 -0
- package/dist/components/SplitButton/SplitButton.const.d.ts +25 -0
- package/dist/components/SplitButton/SplitButton.const.js +27 -0
- package/dist/components/SplitButton/SplitButton.d.ts +4 -0
- package/dist/components/SplitButton/SplitButton.js +73 -0
- package/dist/components/SplitButton/SplitButton.types.d.ts +21 -0
- package/dist/components/SplitButton/index.d.ts +2 -0
- package/dist/components/Spoiler/Spoiler.cjs +1 -0
- package/dist/components/Spoiler/Spoiler.const.cjs +1 -0
- package/dist/components/Spoiler/Spoiler.const.d.ts +6 -0
- package/dist/components/Spoiler/Spoiler.const.js +9 -0
- package/dist/components/Spoiler/Spoiler.d.ts +4 -0
- package/dist/components/Spoiler/Spoiler.js +59 -0
- package/dist/components/Spoiler/Spoiler.types.d.ts +10 -0
- package/dist/components/Spoiler/index.d.ts +2 -0
- package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.cjs +1 -1
- package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.js +63 -57
- package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
- package/dist/components/TimePicker/helpers/ClockFaceSvg.d.ts +0 -7
- package/dist/components/TimePicker/helpers/ClockFaceSvg.js +32 -31
- package/dist/components/TreeSelect/TreeSelect.cjs +1 -0
- package/dist/components/TreeSelect/TreeSelect.const.cjs +1 -0
- package/dist/components/TreeSelect/TreeSelect.const.d.ts +19 -0
- package/dist/components/TreeSelect/TreeSelect.const.js +22 -0
- package/dist/components/TreeSelect/TreeSelect.d.ts +4 -0
- package/dist/components/TreeSelect/TreeSelect.js +128 -0
- package/dist/components/TreeSelect/TreeSelect.types.d.ts +25 -0
- package/dist/components/TreeSelect/TreeSelect.utils.cjs +1 -0
- package/dist/components/TreeSelect/TreeSelect.utils.d.ts +5 -0
- package/dist/components/TreeSelect/TreeSelect.utils.js +25 -0
- package/dist/components/TreeSelect/index.d.ts +2 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +54 -0
- package/dist/components/index.js +349 -292
- package/dist/index.cjs +1 -1
- package/dist/index.js +439 -382
- package/dist/postcss/bear-plugin.cjs +86 -0
- package/dist/styles/_alerts.css +14 -0
- package/dist/styles/_base.css +56 -0
- package/dist/styles/_buttons.css +108 -0
- package/dist/styles/_effects.css +90 -0
- package/dist/styles/_marquee.css +25 -0
- package/dist/styles/main.css +5 -0
- package/dist/styles.css +1 -1
- package/dist/types/component.types.d.ts +13 -0
- package/package.json +10 -6
|
@@ -1,173 +1,176 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { getActiveFormats as
|
|
5
|
-
import { RICH_EDITOR_MIN_HEIGHT as
|
|
6
|
-
import { useMediaQuery as
|
|
1
|
+
import { jsxs as S, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as ye, useState as C, useEffect as x, useCallback as d } from "react";
|
|
3
|
+
import { cn as p } from "../../utils/cn.js";
|
|
4
|
+
import { getActiveFormats as Le, queryCommandValue as xe, execCommand as u, insertLink as He, setTextColor as B, setHighlightColor as D, fileToDataUrl as N, insertImage as F } from "./helpers/formatHelpers.js";
|
|
5
|
+
import { RICH_EDITOR_MIN_HEIGHT as Oe, RICH_EDITOR_DEFAULT_TOOLBAR as ke, RICH_EDITOR_CONTENT_STYLES as ze, RICH_EDITOR_BUTTON_CONFIG as M, RICH_EDITOR_MOBILE_TOOLBAR as ve, RICH_EDITOR_TOOLBAR_CLASSES as Ae, RICH_EDITOR_CONTENT_CLASSES as Se, RICH_EDITOR_ROOT_CLASSES as Be, RICH_EDITOR_DIVIDER_CLASSES as De, RICH_EDITOR_HEADING_OPTIONS as Ne, RICH_EDITOR_MOBILE_MORE_ITEMS as Fe, RICH_EDITOR_MOBILE_BREAKPOINT as Me } from "./RichEditor.const.js";
|
|
6
|
+
import { useMediaQuery as we } from "../../hooks/useMediaQuery.js";
|
|
7
7
|
import { ToolbarButton as f } from "./components/ToolbarButton/ToolbarButton.js";
|
|
8
|
-
import { ToolbarDropdown as
|
|
9
|
-
import { ToolbarColorPicker as
|
|
10
|
-
import { ToolbarMore as
|
|
11
|
-
import { TextIcon as
|
|
12
|
-
const
|
|
8
|
+
import { ToolbarDropdown as Ue } from "./components/ToolbarDropdown/ToolbarDropdown.js";
|
|
9
|
+
import { ToolbarColorPicker as w } from "./components/ToolbarColorPicker/ToolbarColorPicker.js";
|
|
10
|
+
import { ToolbarMore as Ve } from "./components/ToolbarMore/ToolbarMore.js";
|
|
11
|
+
import { TextIcon as Pe, InsertLinkIcon as U, InsertPhotoIcon as V, AlignLeftIcon as P, AlignCenterIcon as j, AlignRightIcon as J, AlignJustifyIcon as $, IndentIncreaseIcon as q, IndentDecreaseIcon as G, FormatClearIcon as K, TableIcon as je, CodeIcon as Je, QuoteIcon as $e, ListNumberedIcon as qe, ListBulletIcon as Ge, Heading3Icon as Ke, Heading2Icon as Qe, Heading1Icon as Ye, StrikethroughIcon as We, UnderlineIcon as Xe, ItalicIcon as Ze, BoldIcon as et } from "../Icon/icons/editor.js";
|
|
12
|
+
const tt = 6, gt = (Q) => {
|
|
13
13
|
const {
|
|
14
|
-
value:
|
|
15
|
-
defaultValue:
|
|
16
|
-
onChange:
|
|
17
|
-
placeholder:
|
|
18
|
-
disabled:
|
|
14
|
+
value: I,
|
|
15
|
+
defaultValue: H = "",
|
|
16
|
+
onChange: R,
|
|
17
|
+
placeholder: Y = "Start typing...",
|
|
18
|
+
disabled: r = !1,
|
|
19
19
|
readOnly: o = !1,
|
|
20
|
-
minHeight:
|
|
20
|
+
minHeight: T = Oe,
|
|
21
21
|
maxHeight: m,
|
|
22
|
-
toolbar:
|
|
23
|
-
className:
|
|
24
|
-
testId:
|
|
25
|
-
id:
|
|
26
|
-
allowImagePaste:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
toolbar: W = ke,
|
|
23
|
+
className: X = "",
|
|
24
|
+
testId: Z,
|
|
25
|
+
id: ee,
|
|
26
|
+
allowImagePaste: O = !0,
|
|
27
|
+
showCharCount: _ = !1,
|
|
28
|
+
charCountMax: E,
|
|
29
|
+
...te
|
|
30
|
+
} = Q, l = ye(null), y = we(`(max-width: ${Me}px)`), k = y ? ve : W, [ne, re] = C(/* @__PURE__ */ new Set()), [oe, z] = C("p"), [v, ie] = C(0), [ae, le] = C("#000000"), [se, ce] = C("#fef08a"), [de, ue] = C([]), [fe, ge] = C([]);
|
|
31
|
+
x(() => {
|
|
30
32
|
const e = "bear-rich-editor-styles";
|
|
31
33
|
if (!document.getElementById(e)) {
|
|
32
34
|
const n = document.createElement("style");
|
|
33
|
-
n.id = e, n.textContent =
|
|
35
|
+
n.id = e, n.textContent = ze, document.head.appendChild(n);
|
|
34
36
|
}
|
|
35
|
-
}, []),
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
37
|
+
}, []), x(() => {
|
|
38
|
+
l.current && I !== void 0 && l.current.innerHTML !== I && (l.current.innerHTML = I);
|
|
39
|
+
}, [I]), x(() => {
|
|
40
|
+
l.current && H && !I && (l.current.innerHTML = H);
|
|
39
41
|
}, []);
|
|
40
42
|
const h = d(() => {
|
|
41
|
-
|
|
42
|
-
const e =
|
|
43
|
+
re(Le());
|
|
44
|
+
const e = xe("formatBlock");
|
|
43
45
|
e && z(e.toLowerCase().replace(/[<>]/g, ""));
|
|
44
|
-
}, []),
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
}, []), a = d(() => {
|
|
47
|
+
var e;
|
|
48
|
+
l.current && (R && R(l.current.innerHTML), _ && ie(((e = l.current.textContent) == null ? void 0 : e.length) ?? 0)), h();
|
|
49
|
+
}, [R, h, _]), he = d((e) => {
|
|
47
50
|
var s;
|
|
48
|
-
if (
|
|
49
|
-
(s =
|
|
50
|
-
const n =
|
|
51
|
+
if (r || o) return;
|
|
52
|
+
(s = l.current) == null || s.focus();
|
|
53
|
+
const n = M[e];
|
|
51
54
|
if (!n) return;
|
|
52
55
|
const c = "value" in n ? n.value : void 0;
|
|
53
|
-
c ? u(n.command, c) : u(n.command), h(),
|
|
54
|
-
}, [
|
|
56
|
+
c ? u(n.command, c) : u(n.command), h(), a();
|
|
57
|
+
}, [r, o, h, a]), Ce = d((e) => {
|
|
55
58
|
var n;
|
|
56
|
-
|
|
57
|
-
}, [
|
|
59
|
+
r || o || ((n = l.current) == null || n.focus(), u("formatBlock", e), z(e), a());
|
|
60
|
+
}, [r, o, a]), Ie = d(() => {
|
|
58
61
|
var s;
|
|
59
|
-
if (
|
|
62
|
+
if (r || o) return;
|
|
60
63
|
const e = window.getSelection(), n = e && e.toString().length > 0, c = prompt("Enter URL:", n ? "" : "https://");
|
|
61
|
-
c && ((s =
|
|
62
|
-
}, [
|
|
64
|
+
c && ((s = l.current) == null || s.focus(), He(c), a());
|
|
65
|
+
}, [r, o, a]), b = d((e, n) => {
|
|
63
66
|
if (!e) return;
|
|
64
|
-
(n === "text" ?
|
|
65
|
-
const
|
|
66
|
-
return [e, ...
|
|
67
|
+
(n === "text" ? ue : ge)((s) => {
|
|
68
|
+
const i = s.filter((g) => g !== e);
|
|
69
|
+
return [e, ...i].slice(0, tt);
|
|
67
70
|
});
|
|
68
|
-
}, []),
|
|
71
|
+
}, []), me = d((e) => {
|
|
69
72
|
var n;
|
|
70
|
-
|
|
71
|
-
}, [
|
|
73
|
+
r || o || ((n = l.current) == null || n.focus(), B(e), le(e), b(e, "text"), a());
|
|
74
|
+
}, [r, o, a, b]), pe = d((e) => {
|
|
72
75
|
var n;
|
|
73
|
-
|
|
74
|
-
}, [
|
|
76
|
+
r || o || ((n = l.current) == null || n.focus(), D(e), ce(e), b(e, "highlight"), a());
|
|
77
|
+
}, [r, o, a, b]), be = d((e) => {
|
|
75
78
|
var n;
|
|
76
|
-
|
|
77
|
-
}, [
|
|
79
|
+
r || o || ((n = l.current) == null || n.focus(), B(e), a());
|
|
80
|
+
}, [r, o, a]), Re = d((e) => {
|
|
78
81
|
var n;
|
|
79
|
-
|
|
80
|
-
}, [
|
|
82
|
+
r || o || ((n = l.current) == null || n.focus(), D(e), a());
|
|
83
|
+
}, [r, o, a]), Te = d(async (e) => {
|
|
81
84
|
var c;
|
|
82
|
-
if (!
|
|
85
|
+
if (!O) return;
|
|
83
86
|
const n = (c = e.clipboardData) == null ? void 0 : c.items;
|
|
84
87
|
if (n)
|
|
85
88
|
for (let s = 0; s < n.length; s++) {
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
89
|
+
const i = n[s];
|
|
90
|
+
if (i.type.startsWith("image/")) {
|
|
88
91
|
e.preventDefault();
|
|
89
|
-
const g =
|
|
92
|
+
const g = i.getAsFile();
|
|
90
93
|
if (g) {
|
|
91
|
-
const
|
|
92
|
-
|
|
94
|
+
const L = await N(g);
|
|
95
|
+
F(L), a();
|
|
93
96
|
}
|
|
94
97
|
return;
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
|
-
}, [
|
|
98
|
-
if (
|
|
100
|
+
}, [O, a]), _e = d(() => {
|
|
101
|
+
if (r || o) return;
|
|
99
102
|
const e = document.createElement("input");
|
|
100
103
|
e.type = "file", e.accept = "image/*", e.onchange = async (n) => {
|
|
101
|
-
var s,
|
|
104
|
+
var s, i;
|
|
102
105
|
const c = (s = n.target.files) == null ? void 0 : s[0];
|
|
103
106
|
if (c) {
|
|
104
|
-
const g = await
|
|
105
|
-
(
|
|
107
|
+
const g = await N(c);
|
|
108
|
+
(i = l.current) == null || i.focus(), F(g), a();
|
|
106
109
|
}
|
|
107
110
|
}, e.click();
|
|
108
|
-
}, [
|
|
109
|
-
bold: /* @__PURE__ */ t(
|
|
110
|
-
italic: /* @__PURE__ */ t(
|
|
111
|
-
underline: /* @__PURE__ */ t(
|
|
112
|
-
strikethrough: /* @__PURE__ */ t(
|
|
113
|
-
heading1: /* @__PURE__ */ t(
|
|
114
|
-
heading2: /* @__PURE__ */ t(
|
|
115
|
-
heading3: /* @__PURE__ */ t(
|
|
116
|
-
bulletList: /* @__PURE__ */ t(
|
|
117
|
-
orderedList: /* @__PURE__ */ t(
|
|
118
|
-
blockquote: /* @__PURE__ */ t(
|
|
119
|
-
code: /* @__PURE__ */ t(
|
|
120
|
-
link: /* @__PURE__ */ t(
|
|
121
|
-
alignLeft: /* @__PURE__ */ t(
|
|
122
|
-
alignCenter: /* @__PURE__ */ t(
|
|
123
|
-
alignRight: /* @__PURE__ */ t(
|
|
124
|
-
alignJustify: /* @__PURE__ */ t(
|
|
125
|
-
image: /* @__PURE__ */ t(
|
|
126
|
-
indent: /* @__PURE__ */ t(
|
|
127
|
-
outdent: /* @__PURE__ */ t(
|
|
128
|
-
clearFormat: /* @__PURE__ */ t(
|
|
129
|
-
table: /* @__PURE__ */ t(
|
|
130
|
-
},
|
|
111
|
+
}, [r, o, a]), Ee = {
|
|
112
|
+
bold: /* @__PURE__ */ t(et, { size: 16 }),
|
|
113
|
+
italic: /* @__PURE__ */ t(Ze, { size: 16 }),
|
|
114
|
+
underline: /* @__PURE__ */ t(Xe, { size: 16 }),
|
|
115
|
+
strikethrough: /* @__PURE__ */ t(We, { size: 16 }),
|
|
116
|
+
heading1: /* @__PURE__ */ t(Ye, { size: 16 }),
|
|
117
|
+
heading2: /* @__PURE__ */ t(Qe, { size: 16 }),
|
|
118
|
+
heading3: /* @__PURE__ */ t(Ke, { size: 16 }),
|
|
119
|
+
bulletList: /* @__PURE__ */ t(Ge, { size: 16 }),
|
|
120
|
+
orderedList: /* @__PURE__ */ t(qe, { size: 16 }),
|
|
121
|
+
blockquote: /* @__PURE__ */ t($e, { size: 16 }),
|
|
122
|
+
code: /* @__PURE__ */ t(Je, { size: 16 }),
|
|
123
|
+
link: /* @__PURE__ */ t(U, { size: 16 }),
|
|
124
|
+
alignLeft: /* @__PURE__ */ t(P, { size: 16 }),
|
|
125
|
+
alignCenter: /* @__PURE__ */ t(j, { size: 16 }),
|
|
126
|
+
alignRight: /* @__PURE__ */ t(J, { size: 16 }),
|
|
127
|
+
alignJustify: /* @__PURE__ */ t($, { size: 16 }),
|
|
128
|
+
image: /* @__PURE__ */ t(V, { size: 16 }),
|
|
129
|
+
indent: /* @__PURE__ */ t(q, { size: 16 }),
|
|
130
|
+
outdent: /* @__PURE__ */ t(G, { size: 16 }),
|
|
131
|
+
clearFormat: /* @__PURE__ */ t(K, { size: 16 }),
|
|
132
|
+
table: /* @__PURE__ */ t(je, { size: 16 })
|
|
133
|
+
}, A = (e, n) => {
|
|
131
134
|
if (e === "divider")
|
|
132
|
-
return /* @__PURE__ */ t("div", { className:
|
|
135
|
+
return /* @__PURE__ */ t("div", { className: p("Bear-RichEditor__divider", De) }, `divider-${n}`);
|
|
133
136
|
if (e === "headingDropdown")
|
|
134
137
|
return /* @__PURE__ */ t(
|
|
135
|
-
|
|
138
|
+
Ue,
|
|
136
139
|
{
|
|
137
|
-
options:
|
|
138
|
-
value:
|
|
139
|
-
onChange:
|
|
140
|
+
options: Ne,
|
|
141
|
+
value: oe,
|
|
142
|
+
onChange: Ce,
|
|
140
143
|
title: "Text Style",
|
|
141
|
-
disabled:
|
|
142
|
-
icon: /* @__PURE__ */ t(
|
|
144
|
+
disabled: r || o,
|
|
145
|
+
icon: /* @__PURE__ */ t(Pe, { size: 16 })
|
|
143
146
|
},
|
|
144
147
|
"heading-dropdown"
|
|
145
148
|
);
|
|
146
149
|
if (e === "textColor")
|
|
147
150
|
return /* @__PURE__ */ t(
|
|
148
|
-
|
|
151
|
+
w,
|
|
149
152
|
{
|
|
150
|
-
value:
|
|
151
|
-
onChange:
|
|
153
|
+
value: ae,
|
|
154
|
+
onChange: me,
|
|
152
155
|
title: "Text Color",
|
|
153
|
-
disabled:
|
|
156
|
+
disabled: r || o,
|
|
154
157
|
type: "text",
|
|
155
|
-
recentColors:
|
|
156
|
-
onApplyLast:
|
|
158
|
+
recentColors: de,
|
|
159
|
+
onApplyLast: be
|
|
157
160
|
},
|
|
158
161
|
"text-color"
|
|
159
162
|
);
|
|
160
163
|
if (e === "highlightColor")
|
|
161
164
|
return /* @__PURE__ */ t(
|
|
162
|
-
|
|
165
|
+
w,
|
|
163
166
|
{
|
|
164
|
-
value:
|
|
165
|
-
onChange:
|
|
167
|
+
value: se,
|
|
168
|
+
onChange: pe,
|
|
166
169
|
title: "Highlight Color",
|
|
167
|
-
disabled:
|
|
170
|
+
disabled: r || o,
|
|
168
171
|
type: "highlight",
|
|
169
|
-
recentColors:
|
|
170
|
-
onApplyLast:
|
|
172
|
+
recentColors: fe,
|
|
173
|
+
onApplyLast: Re
|
|
171
174
|
},
|
|
172
175
|
"highlight-color"
|
|
173
176
|
);
|
|
@@ -175,10 +178,10 @@ const We = 6, ct = ($) => {
|
|
|
175
178
|
return /* @__PURE__ */ t(
|
|
176
179
|
f,
|
|
177
180
|
{
|
|
178
|
-
icon: /* @__PURE__ */ t(
|
|
181
|
+
icon: /* @__PURE__ */ t(U, { size: 16 }),
|
|
179
182
|
title: "Insert Link",
|
|
180
|
-
onClick:
|
|
181
|
-
disabled:
|
|
183
|
+
onClick: Ie,
|
|
184
|
+
disabled: r || o
|
|
182
185
|
},
|
|
183
186
|
"link"
|
|
184
187
|
);
|
|
@@ -186,10 +189,10 @@ const We = 6, ct = ($) => {
|
|
|
186
189
|
return /* @__PURE__ */ t(
|
|
187
190
|
f,
|
|
188
191
|
{
|
|
189
|
-
icon: /* @__PURE__ */ t(
|
|
192
|
+
icon: /* @__PURE__ */ t(V, { size: 16 }),
|
|
190
193
|
title: "Insert Image",
|
|
191
|
-
onClick:
|
|
192
|
-
disabled:
|
|
194
|
+
onClick: _e,
|
|
195
|
+
disabled: r || o
|
|
193
196
|
},
|
|
194
197
|
"image"
|
|
195
198
|
);
|
|
@@ -197,13 +200,13 @@ const We = 6, ct = ($) => {
|
|
|
197
200
|
return /* @__PURE__ */ t(
|
|
198
201
|
f,
|
|
199
202
|
{
|
|
200
|
-
icon: /* @__PURE__ */ t(
|
|
203
|
+
icon: /* @__PURE__ */ t(P, { size: 16 }),
|
|
201
204
|
title: "Align Left",
|
|
202
205
|
onClick: () => {
|
|
203
|
-
var
|
|
204
|
-
(
|
|
206
|
+
var i;
|
|
207
|
+
(i = l.current) == null || i.focus(), u("justifyLeft"), a();
|
|
205
208
|
},
|
|
206
|
-
disabled:
|
|
209
|
+
disabled: r || o
|
|
207
210
|
},
|
|
208
211
|
"alignLeft"
|
|
209
212
|
);
|
|
@@ -211,13 +214,13 @@ const We = 6, ct = ($) => {
|
|
|
211
214
|
return /* @__PURE__ */ t(
|
|
212
215
|
f,
|
|
213
216
|
{
|
|
214
|
-
icon: /* @__PURE__ */ t(
|
|
217
|
+
icon: /* @__PURE__ */ t(j, { size: 16 }),
|
|
215
218
|
title: "Align Center",
|
|
216
219
|
onClick: () => {
|
|
217
|
-
var
|
|
218
|
-
(
|
|
220
|
+
var i;
|
|
221
|
+
(i = l.current) == null || i.focus(), u("justifyCenter"), a();
|
|
219
222
|
},
|
|
220
|
-
disabled:
|
|
223
|
+
disabled: r || o
|
|
221
224
|
},
|
|
222
225
|
"alignCenter"
|
|
223
226
|
);
|
|
@@ -225,13 +228,13 @@ const We = 6, ct = ($) => {
|
|
|
225
228
|
return /* @__PURE__ */ t(
|
|
226
229
|
f,
|
|
227
230
|
{
|
|
228
|
-
icon: /* @__PURE__ */ t(
|
|
231
|
+
icon: /* @__PURE__ */ t(J, { size: 16 }),
|
|
229
232
|
title: "Align Right",
|
|
230
233
|
onClick: () => {
|
|
231
|
-
var
|
|
232
|
-
(
|
|
234
|
+
var i;
|
|
235
|
+
(i = l.current) == null || i.focus(), u("justifyRight"), a();
|
|
233
236
|
},
|
|
234
|
-
disabled:
|
|
237
|
+
disabled: r || o
|
|
235
238
|
},
|
|
236
239
|
"alignRight"
|
|
237
240
|
);
|
|
@@ -239,13 +242,13 @@ const We = 6, ct = ($) => {
|
|
|
239
242
|
return /* @__PURE__ */ t(
|
|
240
243
|
f,
|
|
241
244
|
{
|
|
242
|
-
icon: /* @__PURE__ */ t(
|
|
245
|
+
icon: /* @__PURE__ */ t($, { size: 16 }),
|
|
243
246
|
title: "Justify",
|
|
244
247
|
onClick: () => {
|
|
245
|
-
var
|
|
246
|
-
(
|
|
248
|
+
var i;
|
|
249
|
+
(i = l.current) == null || i.focus(), u("justifyFull"), a();
|
|
247
250
|
},
|
|
248
|
-
disabled:
|
|
251
|
+
disabled: r || o
|
|
249
252
|
},
|
|
250
253
|
"alignJustify"
|
|
251
254
|
);
|
|
@@ -253,13 +256,13 @@ const We = 6, ct = ($) => {
|
|
|
253
256
|
return /* @__PURE__ */ t(
|
|
254
257
|
f,
|
|
255
258
|
{
|
|
256
|
-
icon: /* @__PURE__ */ t(
|
|
259
|
+
icon: /* @__PURE__ */ t(q, { size: 16 }),
|
|
257
260
|
title: "Increase Indent",
|
|
258
261
|
onClick: () => {
|
|
259
|
-
var
|
|
260
|
-
(
|
|
262
|
+
var i;
|
|
263
|
+
(i = l.current) == null || i.focus(), u("indent"), a();
|
|
261
264
|
},
|
|
262
|
-
disabled:
|
|
265
|
+
disabled: r || o
|
|
263
266
|
},
|
|
264
267
|
"indent"
|
|
265
268
|
);
|
|
@@ -267,13 +270,13 @@ const We = 6, ct = ($) => {
|
|
|
267
270
|
return /* @__PURE__ */ t(
|
|
268
271
|
f,
|
|
269
272
|
{
|
|
270
|
-
icon: /* @__PURE__ */ t(
|
|
273
|
+
icon: /* @__PURE__ */ t(G, { size: 16 }),
|
|
271
274
|
title: "Decrease Indent",
|
|
272
275
|
onClick: () => {
|
|
273
|
-
var
|
|
274
|
-
(
|
|
276
|
+
var i;
|
|
277
|
+
(i = l.current) == null || i.focus(), u("outdent"), a();
|
|
275
278
|
},
|
|
276
|
-
disabled:
|
|
279
|
+
disabled: r || o
|
|
277
280
|
},
|
|
278
281
|
"outdent"
|
|
279
282
|
);
|
|
@@ -281,18 +284,18 @@ const We = 6, ct = ($) => {
|
|
|
281
284
|
return /* @__PURE__ */ t(
|
|
282
285
|
f,
|
|
283
286
|
{
|
|
284
|
-
icon: /* @__PURE__ */ t(
|
|
287
|
+
icon: /* @__PURE__ */ t(K, { size: 16 }),
|
|
285
288
|
title: "Clear Formatting",
|
|
286
289
|
onClick: () => {
|
|
287
|
-
var
|
|
288
|
-
(
|
|
290
|
+
var i;
|
|
291
|
+
(i = l.current) == null || i.focus(), u("removeFormat"), a();
|
|
289
292
|
},
|
|
290
|
-
disabled:
|
|
293
|
+
disabled: r || o
|
|
291
294
|
},
|
|
292
295
|
"clearFormat"
|
|
293
296
|
);
|
|
294
297
|
if (e === "more")
|
|
295
|
-
return /* @__PURE__ */ t(
|
|
298
|
+
return /* @__PURE__ */ t(Ve, { disabled: r || o, isMobile: y, children: (y ? Fe : [
|
|
296
299
|
"alignLeft",
|
|
297
300
|
"alignCenter",
|
|
298
301
|
"alignRight",
|
|
@@ -302,63 +305,77 @@ const We = 6, ct = ($) => {
|
|
|
302
305
|
"blockquote",
|
|
303
306
|
"code",
|
|
304
307
|
"clearFormat"
|
|
305
|
-
]).map((g,
|
|
306
|
-
const c =
|
|
308
|
+
]).map((g, L) => A(g, L + 1e3)) }, "more");
|
|
309
|
+
const c = M[e], s = Ee[e];
|
|
307
310
|
return !c || !s ? null : /* @__PURE__ */ t(
|
|
308
311
|
f,
|
|
309
312
|
{
|
|
310
313
|
icon: s,
|
|
311
314
|
title: c.title,
|
|
312
|
-
active:
|
|
313
|
-
onClick: () =>
|
|
314
|
-
disabled:
|
|
315
|
+
active: ne.has(e),
|
|
316
|
+
onClick: () => he(e),
|
|
317
|
+
disabled: r || o
|
|
315
318
|
},
|
|
316
319
|
e
|
|
317
320
|
);
|
|
318
321
|
};
|
|
319
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ S(
|
|
320
323
|
"div",
|
|
321
324
|
{
|
|
322
|
-
id:
|
|
323
|
-
"data-testid":
|
|
324
|
-
className:
|
|
325
|
+
id: ee,
|
|
326
|
+
"data-testid": Z,
|
|
327
|
+
className: p(
|
|
325
328
|
"Bear-RichEditor",
|
|
326
|
-
|
|
327
|
-
|
|
329
|
+
Be,
|
|
330
|
+
r && "Bear-RichEditor--disabled",
|
|
328
331
|
o && "Bear-RichEditor--readonly",
|
|
329
|
-
|
|
332
|
+
X
|
|
330
333
|
),
|
|
331
|
-
...
|
|
334
|
+
...te,
|
|
332
335
|
children: [
|
|
333
|
-
|
|
336
|
+
k.length > 0 && /* @__PURE__ */ t("div", { className: p("Bear-RichEditor__toolbar", Ae), children: k.map((e, n) => A(e, n)) }),
|
|
334
337
|
/* @__PURE__ */ t(
|
|
335
338
|
"div",
|
|
336
339
|
{
|
|
337
|
-
ref:
|
|
338
|
-
contentEditable: !
|
|
339
|
-
onInput:
|
|
340
|
+
ref: l,
|
|
341
|
+
contentEditable: !r && !o,
|
|
342
|
+
onInput: a,
|
|
340
343
|
onSelect: h,
|
|
341
344
|
onKeyUp: h,
|
|
342
345
|
onMouseUp: h,
|
|
343
|
-
onPaste:
|
|
344
|
-
"data-placeholder":
|
|
345
|
-
className:
|
|
346
|
+
onPaste: Te,
|
|
347
|
+
"data-placeholder": Y,
|
|
348
|
+
className: p(
|
|
346
349
|
"Bear-RichEditor__content",
|
|
347
|
-
|
|
350
|
+
Se,
|
|
348
351
|
"[&:empty]:before:bear-content-[attr(data-placeholder)] [&:empty]:before:bear-text-gray-400 [&:empty]:before:bear-pointer-events-none",
|
|
349
|
-
|
|
352
|
+
r && "Bear-RichEditor__content--disabled bear-opacity-50 bear-cursor-not-allowed"
|
|
350
353
|
),
|
|
351
354
|
style: {
|
|
352
|
-
minHeight: typeof
|
|
355
|
+
minHeight: typeof T == "number" ? `${T}px` : T,
|
|
353
356
|
maxHeight: m ? typeof m == "number" ? `${m}px` : m : void 0,
|
|
354
357
|
overflowY: m ? "auto" : void 0
|
|
355
358
|
}
|
|
356
359
|
}
|
|
360
|
+
),
|
|
361
|
+
_ && E != null && /* @__PURE__ */ S(
|
|
362
|
+
"div",
|
|
363
|
+
{
|
|
364
|
+
className: p(
|
|
365
|
+
"Bear-RichEditor__char-count bear-text-xs bear-tabular-nums bear-px-3 bear-py-1.5 bear-text-right bear-border-t bear-border-gray-200 dark:bear-border-gray-700",
|
|
366
|
+
v > E ? "bear-text-red-500" : "bear-text-gray-400 dark:bear-text-gray-500"
|
|
367
|
+
),
|
|
368
|
+
children: [
|
|
369
|
+
v,
|
|
370
|
+
"/",
|
|
371
|
+
E
|
|
372
|
+
]
|
|
373
|
+
}
|
|
357
374
|
)
|
|
358
375
|
]
|
|
359
376
|
}
|
|
360
377
|
);
|
|
361
378
|
};
|
|
362
379
|
export {
|
|
363
|
-
|
|
380
|
+
gt as RichEditor
|
|
364
381
|
};
|
|
@@ -24,6 +24,10 @@ export interface RichEditorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'o
|
|
|
24
24
|
id?: string;
|
|
25
25
|
/** Enable image paste support */
|
|
26
26
|
allowImagePaste?: boolean;
|
|
27
|
+
/** Show live character count (plain-text length, HTML tags excluded) */
|
|
28
|
+
showCharCount?: boolean;
|
|
29
|
+
/** Max chars for counter display */
|
|
30
|
+
charCountMax?: number;
|
|
27
31
|
}
|
|
28
32
|
export type ToolbarOption = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'paragraph' | 'headingDropdown' | 'bulletList' | 'orderedList' | 'blockquote' | 'code' | 'link' | 'image' | 'textColor' | 'highlightColor' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'clearFormat' | 'table' | 'divider' | 'more';
|
|
29
33
|
export interface ToolbarButtonProps {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("../../utils/cn.cjs");require("react");const T=require("../Typography/Typography.cjs"),c=require("./RingProgress.const.cjs"),R=({sections:d,size:t=c.DEFAULT_SIZE,thickness:n=c.DEFAULT_THICKNESS,roundCaps:j=!1,label:s,rootColor:o,className:m,testId:x,...p})=>{const l=d.reduce((r,i)=>r+i.value,0),a=(t-n)/2,u=2*Math.PI*a,g=t/2,h=t/2;let y=0;return e.jsxs("div",{className:b.cn(c.ROOT_CLASS,m),"data-testid":x,...p,children:[e.jsxs("svg",{width:t,height:t,className:"bear-rotate-[-90deg]",children:[e.jsx("circle",{cx:g,cy:h,r:a,fill:"none",strokeWidth:n,className:o?void 0:c.TRACK_COLOR,style:o?{stroke:o}:void 0}),l>0&&d.map((r,i)=>{const f=r.value/l*u,v=-y;return y+=f,e.jsxs("g",{children:[e.jsx("circle",{cx:g,cy:h,r:a,fill:"none",strokeWidth:n,stroke:r.color,strokeDasharray:`${f} ${u}`,strokeDashoffset:v,strokeLinecap:j?"round":"butt"}),r.tooltip&&e.jsx("title",{children:r.tooltip})]},i)})]}),s!==void 0&&e.jsx("div",{className:"bear-absolute bear-inset-0 bear-flex bear-items-center bear-justify-center",children:typeof s=="string"?e.jsx(T.Typography,{variant:"body2",color:"secondary",children:s}):s})]})};exports.RingProgress=R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=120,r=12,t="Bear-RingProgress bear-relative bear-inline-flex",S="bear-stroke-gray-200 dark:bear-stroke-zinc-700";exports.DEFAULT_SIZE=e;exports.DEFAULT_THICKNESS=r;exports.ROOT_CLASS=t;exports.TRACK_COLOR=S;
|