@forgedevstack/bear 1.0.3 → 1.0.4-alpha
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/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.const.cjs +1 -0
- package/dist/components/Accordion/Accordion.const.d.ts +10 -0
- package/dist/components/Accordion/Accordion.const.js +8 -0
- package/dist/components/Accordion/Accordion.d.ts +1 -0
- package/dist/components/Accordion/Accordion.js +49 -44
- package/dist/components/Accordion/Accordion.types.d.ts +2 -0
- package/dist/components/Accordion/index.d.ts +3 -2
- package/dist/components/ActivityItem/ActivityItem.cjs +1 -0
- package/dist/components/ActivityItem/ActivityItem.d.ts +7 -0
- package/dist/components/ActivityItem/ActivityItem.js +44 -0
- package/dist/components/ActivityItem/ActivityItem.types.d.ts +17 -0
- package/dist/components/ActivityItem/index.d.ts +2 -0
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.const.cjs +1 -0
- package/dist/components/Alert/Alert.const.d.ts +14 -0
- package/dist/components/Alert/Alert.const.js +27 -0
- package/dist/components/Alert/Alert.js +54 -63
- package/dist/components/Alert/Alert.types.d.ts +3 -1
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.const.cjs +1 -0
- package/dist/components/Avatar/Avatar.const.d.ts +28 -0
- package/dist/components/Avatar/Avatar.const.js +28 -0
- package/dist/components/Avatar/Avatar.js +49 -60
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.js +24 -22
- package/dist/components/BearLogo/EmberLogo.cjs +17 -0
- package/dist/components/BearLogo/EmberLogo.js +91 -0
- package/dist/components/BearLogo/index.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.const.cjs +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.const.d.ts +16 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.const.js +19 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +49 -34
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +8 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.constants.cjs +1 -1
- package/dist/components/Button/Button.constants.d.ts +2 -2
- package/dist/components/Button/Button.constants.js +2 -2
- package/dist/components/Button/Button.js +41 -46
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.helpers.cjs +1 -0
- package/dist/components/Calendar/Calendar.helpers.d.ts +10 -0
- package/dist/components/Calendar/Calendar.helpers.js +9 -0
- package/dist/components/Calendar/Calendar.js +112 -115
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.const.cjs +1 -0
- package/dist/components/Card/Card.const.d.ts +13 -0
- package/dist/components/Card/Card.const.js +32 -0
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Card/Card.js +101 -105
- package/dist/components/Card/index.d.ts +3 -2
- package/dist/components/Chart/Chart.cjs +1 -0
- package/dist/components/Chart/Chart.const.d.ts +15 -0
- package/dist/components/Chart/Chart.d.ts +18 -0
- package/dist/components/Chart/Chart.js +225 -0
- package/dist/components/Chart/Chart.types.d.ts +51 -0
- package/dist/components/Chart/Chart.utils.d.ts +31 -0
- package/dist/components/Chart/index.d.ts +2 -0
- package/dist/components/CodeBlock/CodeBlock.cjs +2 -2
- package/dist/components/CodeBlock/CodeBlock.js +65 -52
- package/dist/components/CodeBlock/CodeBlock.types.d.ts +12 -1
- package/dist/components/Editable/Editable.cjs +1 -1
- package/dist/components/Editable/Editable.js +115 -115
- package/dist/components/Gauge/Gauge.cjs +1 -0
- package/dist/components/Gauge/Gauge.d.ts +3 -0
- package/dist/components/Gauge/Gauge.js +92 -0
- package/dist/components/Gauge/Gauge.types.d.ts +27 -0
- package/dist/components/Gauge/index.d.ts +2 -0
- package/dist/components/Icon/icons/editor.cjs +1 -1
- package/dist/components/Icon/icons/editor.d.ts +1 -0
- package/dist/components/Icon/icons/editor.js +66 -61
- package/dist/components/Icon/icons/misc.cjs +1 -1
- package/dist/components/Icon/icons/misc.d.ts +13 -0
- package/dist/components/Icon/icons/misc.js +157 -88
- package/dist/components/Icon/index.d.ts +22 -0
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.js +36 -35
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.const.cjs +1 -0
- package/dist/components/Modal/Modal.const.d.ts +10 -0
- package/dist/components/Modal/Modal.const.js +17 -0
- package/dist/components/Modal/Modal.d.ts +11 -0
- package/dist/components/Modal/Modal.js +80 -77
- package/dist/components/Modal/Modal.types.d.ts +6 -1
- package/dist/components/Modal/index.d.ts +3 -2
- package/dist/components/Rating/Rating.cjs +1 -1
- package/dist/components/Rating/Rating.const.cjs +1 -0
- package/dist/components/Rating/Rating.const.d.ts +14 -0
- package/dist/components/Rating/Rating.const.js +22 -0
- package/dist/components/Rating/Rating.d.ts +5 -10
- package/dist/components/Rating/Rating.js +135 -93
- package/dist/components/Rating/Rating.types.d.ts +27 -25
- package/dist/components/Rating/index.d.ts +2 -2
- package/dist/components/RichEditor/RichEditor.cjs +1 -10
- package/dist/components/RichEditor/RichEditor.const.cjs +141 -0
- package/dist/components/RichEditor/RichEditor.const.d.ts +137 -0
- package/dist/components/RichEditor/RichEditor.const.js +279 -0
- package/dist/components/RichEditor/RichEditor.d.ts +14 -0
- package/dist/components/RichEditor/RichEditor.js +341 -129
- package/dist/components/RichEditor/RichEditor.types.d.ts +38 -1
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.d.ts +4 -0
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.js +25 -0
- package/dist/components/RichEditor/components/ToolbarButton/index.d.ts +1 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.d.ts +4 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +126 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/index.d.ts +1 -0
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.d.ts +4 -0
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.js +57 -0
- package/dist/components/RichEditor/components/ToolbarDropdown/index.d.ts +1 -0
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.d.ts +7 -0
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.js +45 -0
- package/dist/components/RichEditor/components/ToolbarMore/index.d.ts +2 -0
- package/dist/components/RichEditor/components/index.d.ts +4 -0
- package/dist/components/RichEditor/helpers/formatHelpers.cjs +1 -0
- package/dist/components/RichEditor/helpers/formatHelpers.d.ts +57 -0
- package/dist/components/RichEditor/helpers/formatHelpers.js +26 -0
- package/dist/components/RichEditor/helpers/index.d.ts +1 -0
- package/dist/components/RichEditor/index.d.ts +4 -2
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.const.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.const.d.ts +16 -0
- package/dist/components/Sidebar/Sidebar.const.js +22 -0
- package/dist/components/Sidebar/Sidebar.d.ts +14 -2
- package/dist/components/Sidebar/Sidebar.js +50 -138
- package/dist/components/Sidebar/Sidebar.types.d.ts +7 -3
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.cjs +1 -0
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.d.ts +4 -0
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.js +45 -0
- package/dist/components/Sidebar/components/SidebarGroup/index.d.ts +2 -0
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.cjs +1 -0
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.d.ts +4 -0
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.js +66 -0
- package/dist/components/Sidebar/components/SidebarItem/index.d.ts +2 -0
- package/dist/components/Sidebar/components/index.d.ts +2 -0
- package/dist/components/Sidebar/index.d.ts +5 -2
- package/dist/components/SignPad/SignPad.cjs +1 -0
- package/dist/components/SignPad/SignPad.const.cjs +1 -0
- package/dist/components/SignPad/SignPad.const.d.ts +19 -0
- package/dist/components/SignPad/SignPad.const.js +20 -0
- package/dist/components/SignPad/SignPad.d.ts +17 -0
- package/dist/components/SignPad/SignPad.js +161 -0
- package/dist/components/SignPad/SignPad.types.d.ts +37 -0
- package/dist/components/SignPad/index.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.const.cjs +36 -0
- package/dist/components/Skeleton/Skeleton.const.d.ts +12 -0
- package/dist/components/Skeleton/Skeleton.const.js +58 -0
- package/dist/components/Skeleton/Skeleton.d.ts +15 -24
- package/dist/components/Skeleton/Skeleton.js +132 -103
- package/dist/components/Skeleton/Skeleton.types.d.ts +18 -8
- package/dist/components/Skeleton/index.d.ts +2 -2
- package/dist/components/Sparkline/Sparkline.cjs +1 -0
- package/dist/components/Sparkline/Sparkline.const.cjs +1 -0
- package/dist/components/Sparkline/Sparkline.const.d.ts +16 -0
- package/dist/components/Sparkline/Sparkline.const.js +16 -0
- package/dist/components/Sparkline/Sparkline.d.ts +3 -0
- package/dist/components/Sparkline/Sparkline.js +80 -0
- package/dist/components/Sparkline/Sparkline.types.d.ts +19 -0
- package/dist/components/Sparkline/Sparkline.utils.cjs +1 -0
- package/dist/components/Sparkline/Sparkline.utils.d.ts +27 -0
- package/dist/components/Sparkline/Sparkline.utils.js +30 -0
- package/dist/components/Sparkline/index.d.ts +5 -0
- package/dist/components/SpeedDial/SpeedDial.cjs +12 -1
- package/dist/components/SpeedDial/SpeedDial.const.cjs +1 -0
- package/dist/components/SpeedDial/SpeedDial.const.d.ts +22 -0
- package/dist/components/SpeedDial/SpeedDial.const.js +26 -0
- package/dist/components/SpeedDial/SpeedDial.d.ts +5 -7
- package/dist/components/SpeedDial/SpeedDial.js +154 -144
- package/dist/components/SpeedDial/SpeedDial.types.d.ts +26 -29
- package/dist/components/SpeedDial/index.d.ts +1 -1
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.js +17 -15
- package/dist/components/StatCard/StatCard.cjs +1 -0
- package/dist/components/StatCard/StatCard.d.ts +7 -0
- package/dist/components/StatCard/StatCard.js +36 -0
- package/dist/components/StatCard/StatCard.types.d.ts +13 -0
- package/dist/components/StatCard/index.d.ts +2 -0
- package/dist/components/Stepper/Stepper.cjs +1 -1
- package/dist/components/Stepper/Stepper.const.cjs +1 -0
- package/dist/components/Stepper/Stepper.const.d.ts +29 -0
- package/dist/components/Stepper/Stepper.const.js +46 -0
- package/dist/components/Stepper/Stepper.d.ts +10 -3
- package/dist/components/Stepper/Stepper.js +143 -92
- package/dist/components/Stepper/Stepper.types.d.ts +63 -13
- package/dist/components/Stepper/index.d.ts +2 -2
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.js +74 -47
- package/dist/components/Switch/Switch.types.d.ts +11 -1
- package/dist/components/Tabs/Tabs.cjs +1 -1
- package/dist/components/Tabs/Tabs.js +33 -29
- package/dist/components/TimePicker/TimePicker.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.constants.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.constants.d.ts +14 -0
- package/dist/components/TimePicker/TimePicker.constants.js +18 -4
- package/dist/components/TimePicker/TimePicker.js +92 -91
- package/dist/components/Timeline/Timeline.cjs +1 -1
- package/dist/components/Timeline/Timeline.const.cjs +1 -0
- package/dist/components/Timeline/Timeline.const.d.ts +40 -0
- package/dist/components/Timeline/Timeline.const.js +58 -0
- package/dist/components/Timeline/Timeline.d.ts +16 -2
- package/dist/components/Timeline/Timeline.js +131 -63
- package/dist/components/Timeline/Timeline.types.d.ts +30 -11
- package/dist/components/Timeline/index.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.js +37 -35
- package/dist/components/Typography/Typography.cjs +1 -1
- package/dist/components/Typography/Typography.js +38 -36
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +17 -5
- package/dist/components/index.js +216 -195
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +24 -0
- package/dist/hooks/index.js +42 -14
- package/dist/hooks/useBounce/index.d.ts +2 -0
- package/dist/hooks/useBounce/useBounce.cjs +1 -0
- package/dist/hooks/useBounce/useBounce.d.ts +2 -0
- package/dist/hooks/useBounce/useBounce.js +36 -0
- package/dist/hooks/useBounce/useBounce.types.d.ts +27 -0
- package/dist/hooks/useClickOutside/index.d.ts +2 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +22 -0
- package/dist/hooks/useClickOutside/useClickOutside.types.d.ts +10 -0
- package/dist/hooks/useClipboard/index.d.ts +2 -0
- package/dist/hooks/useClipboard/useClipboard.cjs +1 -0
- package/dist/hooks/useClipboard/useClipboard.d.ts +15 -0
- package/dist/hooks/useClipboard/useClipboard.js +22 -0
- package/dist/hooks/useClipboard/useClipboard.types.d.ts +20 -0
- package/dist/hooks/useDebounce/index.d.ts +2 -0
- package/dist/hooks/useDebounce/useDebounce.cjs +1 -0
- package/dist/hooks/useDebounce/useDebounce.d.ts +32 -0
- package/dist/hooks/useDebounce/useDebounce.js +39 -0
- package/dist/hooks/useDebounce/useDebounce.types.d.ts +20 -0
- package/dist/hooks/useFloat/index.d.ts +2 -0
- package/dist/hooks/useFloat/useFloat.cjs +1 -0
- package/dist/hooks/useFloat/useFloat.d.ts +2 -0
- package/dist/hooks/useFloat/useFloat.js +37 -0
- package/dist/hooks/useFloat/useFloat.types.d.ts +25 -0
- package/dist/hooks/useIntersectionObserver/index.d.ts +2 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.cjs +1 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +25 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.js +39 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.types.d.ts +22 -0
- package/dist/hooks/useKeyPress/index.d.ts +2 -0
- package/dist/hooks/useKeyPress/useKeyPress.cjs +1 -0
- package/dist/hooks/useKeyPress/useKeyPress.d.ts +22 -0
- package/dist/hooks/useKeyPress/useKeyPress.js +39 -0
- package/dist/hooks/useKeyPress/useKeyPress.types.d.ts +19 -0
- package/dist/hooks/useLocalStorage/index.d.ts +2 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.cjs +1 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.d.ts +11 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.js +47 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.types.d.ts +16 -0
- package/dist/hooks/useMediaQuery/index.d.ts +3 -0
- package/dist/hooks/useMediaQuery/useMediaQuery.d.ts +12 -0
- package/dist/hooks/useMediaQuery/useMediaQuery.types.d.ts +21 -0
- package/dist/hooks/useParallax/index.d.ts +2 -0
- package/dist/hooks/useParallax/useParallax.cjs +1 -0
- package/dist/hooks/useParallax/useParallax.d.ts +2 -0
- package/dist/hooks/useParallax/useParallax.js +36 -0
- package/dist/hooks/useParallax/useParallax.types.d.ts +19 -0
- package/dist/hooks/usePulse/index.d.ts +2 -0
- package/dist/hooks/usePulse/usePulse.cjs +1 -0
- package/dist/hooks/usePulse/usePulse.d.ts +2 -0
- package/dist/hooks/usePulse/usePulse.js +38 -0
- package/dist/hooks/usePulse/usePulse.types.d.ts +29 -0
- package/dist/hooks/useShake/index.d.ts +2 -0
- package/dist/hooks/useShake/useShake.cjs +1 -0
- package/dist/hooks/useShake/useShake.d.ts +2 -0
- package/dist/hooks/useShake/useShake.js +14 -0
- package/dist/hooks/useShake/useShake.types.d.ts +19 -0
- package/dist/hooks/useSlide/index.d.ts +2 -0
- package/dist/hooks/useSlide/useSlide.cjs +1 -0
- package/dist/hooks/useSlide/useSlide.d.ts +2 -0
- package/dist/hooks/useSlide/useSlide.js +68 -0
- package/dist/hooks/useSlide/useSlide.types.d.ts +36 -0
- package/dist/hooks/useThrottle/index.d.ts +2 -0
- package/dist/hooks/useThrottle/useThrottle.cjs +1 -0
- package/dist/hooks/useThrottle/useThrottle.d.ts +26 -0
- package/dist/hooks/useThrottle/useThrottle.js +44 -0
- package/dist/hooks/useThrottle/useThrottle.types.d.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +273 -224
- package/dist/styles.css +1 -1
- package/package.json +16 -23
- package/dist/components/RichEditor/RichEditor.icons.cjs +0 -1
- package/dist/components/RichEditor/RichEditor.icons.d.ts +0 -16
- package/dist/components/RichEditor/RichEditor.icons.js +0 -62
- package/dist/components/RichEditor/RichEditor.utils.cjs +0 -1
- package/dist/components/RichEditor/RichEditor.utils.d.ts +0 -3
- package/dist/components/RichEditor/RichEditor.utils.js +0 -22
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const a = 150, o = [
|
|
3
|
+
"headingDropdown",
|
|
4
|
+
"divider",
|
|
5
|
+
"bold",
|
|
6
|
+
"italic",
|
|
7
|
+
"underline",
|
|
8
|
+
"strikethrough",
|
|
9
|
+
"divider",
|
|
10
|
+
"textColor",
|
|
11
|
+
"highlightColor",
|
|
12
|
+
"divider",
|
|
13
|
+
"alignLeft",
|
|
14
|
+
"alignCenter",
|
|
15
|
+
"alignRight",
|
|
16
|
+
"alignJustify",
|
|
17
|
+
"divider",
|
|
18
|
+
"bulletList",
|
|
19
|
+
"orderedList",
|
|
20
|
+
"divider",
|
|
21
|
+
"indent",
|
|
22
|
+
"outdent",
|
|
23
|
+
"divider",
|
|
24
|
+
"blockquote",
|
|
25
|
+
"code",
|
|
26
|
+
"link",
|
|
27
|
+
"image",
|
|
28
|
+
"divider",
|
|
29
|
+
"clearFormat"
|
|
30
|
+
], r = "Bear-RichEditor rounded-lg border border-gray-200 dark:border-zinc-700 overflow-hidden bg-white dark:bg-zinc-900 shadow-sm", i = "flex flex-wrap items-center gap-0.5 p-2 border-b border-gray-200 dark:border-zinc-700 bg-gray-50 dark:bg-zinc-800", n = "p-4 outline-none max-w-none text-gray-900 dark:text-gray-100 bg-white dark:bg-zinc-900 min-h-[100px]", d = "w-px h-5 bg-gray-300 dark:bg-zinc-600 mx-1", l = "p-1.5 rounded transition-colors", c = "bg-pink-500 text-white", m = "text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-zinc-700", g = "opacity-50 cursor-not-allowed", s = [
|
|
31
|
+
{ value: "p", label: "Paragraph", preview: /* @__PURE__ */ e("span", { className: "bear-text-sm bear-font-normal", children: "Normal text" }) },
|
|
32
|
+
{ value: "h1", label: "Heading 1", preview: /* @__PURE__ */ e("span", { className: "bear-text-2xl bear-font-bold", children: "Heading 1" }) },
|
|
33
|
+
{ value: "h2", label: "Heading 2", preview: /* @__PURE__ */ e("span", { className: "bear-text-xl bear-font-bold", children: "Heading 2" }) },
|
|
34
|
+
{ value: "h3", label: "Heading 3", preview: /* @__PURE__ */ e("span", { className: "bear-text-lg bear-font-semibold", children: "Heading 3" }) },
|
|
35
|
+
{ value: "h4", label: "Heading 4", preview: /* @__PURE__ */ e("span", { className: "bear-text-base bear-font-semibold", children: "Heading 4" }) },
|
|
36
|
+
{ value: "h5", label: "Heading 5", preview: /* @__PURE__ */ e("span", { className: "bear-text-sm bear-font-semibold", children: "Heading 5" }) },
|
|
37
|
+
{ value: "h6", label: "Heading 6", preview: /* @__PURE__ */ e("span", { className: "bear-text-xs bear-font-semibold bear-uppercase", children: "Heading 6" }) }
|
|
38
|
+
], h = {
|
|
39
|
+
bold: { title: "Bold (Ctrl+B)", command: "bold" },
|
|
40
|
+
italic: { title: "Italic (Ctrl+I)", command: "italic" },
|
|
41
|
+
underline: { title: "Underline (Ctrl+U)", command: "underline" },
|
|
42
|
+
strikethrough: { title: "Strikethrough", command: "strikeThrough" },
|
|
43
|
+
heading1: { title: "Heading 1", command: "formatBlock", value: "h1" },
|
|
44
|
+
heading2: { title: "Heading 2", command: "formatBlock", value: "h2" },
|
|
45
|
+
heading3: { title: "Heading 3", command: "formatBlock", value: "h3" },
|
|
46
|
+
heading4: { title: "Heading 4", command: "formatBlock", value: "h4" },
|
|
47
|
+
heading5: { title: "Heading 5", command: "formatBlock", value: "h5" },
|
|
48
|
+
heading6: { title: "Heading 6", command: "formatBlock", value: "h6" },
|
|
49
|
+
paragraph: { title: "Paragraph", command: "formatBlock", value: "p" },
|
|
50
|
+
bulletList: { title: "Bullet List", command: "insertUnorderedList" },
|
|
51
|
+
orderedList: { title: "Numbered List", command: "insertOrderedList" },
|
|
52
|
+
blockquote: { title: "Quote", command: "formatBlock", value: "blockquote" },
|
|
53
|
+
code: { title: "Code Block", command: "formatBlock", value: "pre" },
|
|
54
|
+
link: { title: "Insert Link", command: "createLink" },
|
|
55
|
+
image: { title: "Insert Image", command: "insertImage" },
|
|
56
|
+
textColor: { title: "Text Color", command: "foreColor" },
|
|
57
|
+
highlightColor: { title: "Highlight Color", command: "hiliteColor" },
|
|
58
|
+
alignLeft: { title: "Align Left", command: "justifyLeft" },
|
|
59
|
+
alignCenter: { title: "Align Center", command: "justifyCenter" },
|
|
60
|
+
alignRight: { title: "Align Right", command: "justifyRight" },
|
|
61
|
+
alignJustify: { title: "Justify", command: "justifyFull" },
|
|
62
|
+
indent: { title: "Increase Indent", command: "indent" },
|
|
63
|
+
outdent: { title: "Decrease Indent", command: "outdent" },
|
|
64
|
+
clearFormat: { title: "Clear Formatting", command: "removeFormat" },
|
|
65
|
+
table: { title: "Insert Table", command: "insertTable" }
|
|
66
|
+
}, b = [
|
|
67
|
+
// Row 1: Grayscale
|
|
68
|
+
"#000000",
|
|
69
|
+
"#374151",
|
|
70
|
+
"#6b7280",
|
|
71
|
+
"#9ca3af",
|
|
72
|
+
"#d1d5db",
|
|
73
|
+
"#ffffff",
|
|
74
|
+
// Row 2: Reds
|
|
75
|
+
"#991b1b",
|
|
76
|
+
"#dc2626",
|
|
77
|
+
"#ef4444",
|
|
78
|
+
"#f87171",
|
|
79
|
+
"#fca5a5",
|
|
80
|
+
"#fee2e2",
|
|
81
|
+
// Row 3: Oranges
|
|
82
|
+
"#9a3412",
|
|
83
|
+
"#ea580c",
|
|
84
|
+
"#f97316",
|
|
85
|
+
"#fb923c",
|
|
86
|
+
"#fdba74",
|
|
87
|
+
"#fed7aa",
|
|
88
|
+
// Row 4: Yellows
|
|
89
|
+
"#854d0e",
|
|
90
|
+
"#ca8a04",
|
|
91
|
+
"#eab308",
|
|
92
|
+
"#facc15",
|
|
93
|
+
"#fde047",
|
|
94
|
+
"#fef08a",
|
|
95
|
+
// Row 5: Greens
|
|
96
|
+
"#166534",
|
|
97
|
+
"#16a34a",
|
|
98
|
+
"#22c55e",
|
|
99
|
+
"#4ade80",
|
|
100
|
+
"#86efac",
|
|
101
|
+
"#bbf7d0",
|
|
102
|
+
// Row 6: Blues
|
|
103
|
+
"#1e40af",
|
|
104
|
+
"#2563eb",
|
|
105
|
+
"#3b82f6",
|
|
106
|
+
"#60a5fa",
|
|
107
|
+
"#93c5fd",
|
|
108
|
+
"#bfdbfe",
|
|
109
|
+
// Row 7: Purples
|
|
110
|
+
"#6b21a8",
|
|
111
|
+
"#9333ea",
|
|
112
|
+
"#a855f7",
|
|
113
|
+
"#c084fc",
|
|
114
|
+
"#d8b4fe",
|
|
115
|
+
"#e9d5ff",
|
|
116
|
+
// Row 8: Pinks
|
|
117
|
+
"#9d174d",
|
|
118
|
+
"#db2777",
|
|
119
|
+
"#ec4899",
|
|
120
|
+
"#f472b6",
|
|
121
|
+
"#f9a8d4",
|
|
122
|
+
"#fbcfe8"
|
|
123
|
+
], f = `
|
|
124
|
+
.Bear-RichEditor__content {
|
|
125
|
+
line-height: 1.6;
|
|
126
|
+
}
|
|
127
|
+
.Bear-RichEditor__content h1 {
|
|
128
|
+
font-size: 2rem;
|
|
129
|
+
font-weight: bold;
|
|
130
|
+
margin: 0.67em 0;
|
|
131
|
+
line-height: 1.2;
|
|
132
|
+
}
|
|
133
|
+
.Bear-RichEditor__content h2 {
|
|
134
|
+
font-size: 1.5rem;
|
|
135
|
+
font-weight: bold;
|
|
136
|
+
margin: 0.83em 0;
|
|
137
|
+
line-height: 1.3;
|
|
138
|
+
}
|
|
139
|
+
.Bear-RichEditor__content h3 {
|
|
140
|
+
font-size: 1.25rem;
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
margin: 1em 0;
|
|
143
|
+
line-height: 1.4;
|
|
144
|
+
}
|
|
145
|
+
.Bear-RichEditor__content h4 {
|
|
146
|
+
font-size: 1.125rem;
|
|
147
|
+
font-weight: 600;
|
|
148
|
+
margin: 1.33em 0;
|
|
149
|
+
}
|
|
150
|
+
.Bear-RichEditor__content h5 {
|
|
151
|
+
font-size: 1rem;
|
|
152
|
+
font-weight: 600;
|
|
153
|
+
margin: 1.67em 0;
|
|
154
|
+
}
|
|
155
|
+
.Bear-RichEditor__content h6 {
|
|
156
|
+
font-size: 0.875rem;
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
text-transform: uppercase;
|
|
159
|
+
letter-spacing: 0.05em;
|
|
160
|
+
margin: 2em 0;
|
|
161
|
+
}
|
|
162
|
+
.Bear-RichEditor__content p {
|
|
163
|
+
margin: 0.5em 0;
|
|
164
|
+
}
|
|
165
|
+
.Bear-RichEditor__content ul {
|
|
166
|
+
list-style-type: disc !important;
|
|
167
|
+
padding-left: 1.5em !important;
|
|
168
|
+
margin: 0.5em 0 !important;
|
|
169
|
+
display: block !important;
|
|
170
|
+
}
|
|
171
|
+
.Bear-RichEditor__content ol {
|
|
172
|
+
list-style-type: decimal !important;
|
|
173
|
+
padding-left: 1.5em !important;
|
|
174
|
+
margin: 0.5em 0 !important;
|
|
175
|
+
display: block !important;
|
|
176
|
+
}
|
|
177
|
+
.Bear-RichEditor__content li {
|
|
178
|
+
margin: 0.25em 0 !important;
|
|
179
|
+
display: list-item !important;
|
|
180
|
+
}
|
|
181
|
+
.Bear-RichEditor__content blockquote {
|
|
182
|
+
border-left: 4px solid #ec4899;
|
|
183
|
+
padding-left: 1em;
|
|
184
|
+
margin: 1em 0;
|
|
185
|
+
color: #6b7280;
|
|
186
|
+
font-style: italic;
|
|
187
|
+
background: rgba(236, 72, 153, 0.05);
|
|
188
|
+
padding: 0.5em 1em;
|
|
189
|
+
border-radius: 0 0.375rem 0.375rem 0;
|
|
190
|
+
}
|
|
191
|
+
.Bear-RichEditor__content pre {
|
|
192
|
+
background: #f3f4f6;
|
|
193
|
+
color: #374151;
|
|
194
|
+
padding: 1em;
|
|
195
|
+
border-radius: 0.5rem;
|
|
196
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
197
|
+
font-size: 0.875em;
|
|
198
|
+
overflow-x: auto;
|
|
199
|
+
margin: 1em 0;
|
|
200
|
+
white-space: pre-wrap;
|
|
201
|
+
word-break: break-word;
|
|
202
|
+
border: 1px solid #e5e7eb;
|
|
203
|
+
}
|
|
204
|
+
.Bear-RichEditor__content code {
|
|
205
|
+
background: #f3f4f6;
|
|
206
|
+
color: #374151;
|
|
207
|
+
padding: 0.125em 0.25em;
|
|
208
|
+
border-radius: 0.25rem;
|
|
209
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
210
|
+
font-size: 0.875em;
|
|
211
|
+
}
|
|
212
|
+
.Bear-RichEditor__content a {
|
|
213
|
+
color: #ec4899;
|
|
214
|
+
text-decoration: underline;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
}
|
|
217
|
+
.Bear-RichEditor__content a:hover {
|
|
218
|
+
color: #db2777;
|
|
219
|
+
}
|
|
220
|
+
.Bear-RichEditor__content img {
|
|
221
|
+
max-width: 100%;
|
|
222
|
+
height: auto;
|
|
223
|
+
border-radius: 0.5rem;
|
|
224
|
+
margin: 1em 0;
|
|
225
|
+
display: block;
|
|
226
|
+
}
|
|
227
|
+
.Bear-RichEditor__content table {
|
|
228
|
+
border-collapse: collapse;
|
|
229
|
+
width: 100%;
|
|
230
|
+
margin: 1em 0;
|
|
231
|
+
}
|
|
232
|
+
.Bear-RichEditor__content th,
|
|
233
|
+
.Bear-RichEditor__content td {
|
|
234
|
+
border: 1px solid #d1d5db;
|
|
235
|
+
padding: 0.5em;
|
|
236
|
+
text-align: left;
|
|
237
|
+
}
|
|
238
|
+
.Bear-RichEditor__content th {
|
|
239
|
+
background: #f3f4f6;
|
|
240
|
+
font-weight: 600;
|
|
241
|
+
}
|
|
242
|
+
/* Dark mode styles */
|
|
243
|
+
.dark .Bear-RichEditor__content pre {
|
|
244
|
+
background: #1f2937;
|
|
245
|
+
color: #e5e7eb;
|
|
246
|
+
border-color: #374151;
|
|
247
|
+
}
|
|
248
|
+
.dark .Bear-RichEditor__content code {
|
|
249
|
+
background: #374151;
|
|
250
|
+
color: #e5e7eb;
|
|
251
|
+
}
|
|
252
|
+
.dark .Bear-RichEditor__content blockquote {
|
|
253
|
+
color: #9ca3af;
|
|
254
|
+
background: rgba(236, 72, 153, 0.1);
|
|
255
|
+
}
|
|
256
|
+
.dark .Bear-RichEditor__content th {
|
|
257
|
+
background: #374151;
|
|
258
|
+
}
|
|
259
|
+
.dark .Bear-RichEditor__content th,
|
|
260
|
+
.dark .Bear-RichEditor__content td {
|
|
261
|
+
border-color: #4b5563;
|
|
262
|
+
}
|
|
263
|
+
`;
|
|
264
|
+
export {
|
|
265
|
+
c as RICH_EDITOR_BUTTON_ACTIVE_CLASSES,
|
|
266
|
+
l as RICH_EDITOR_BUTTON_BASE_CLASSES,
|
|
267
|
+
h as RICH_EDITOR_BUTTON_CONFIG,
|
|
268
|
+
g as RICH_EDITOR_BUTTON_DISABLED_CLASSES,
|
|
269
|
+
m as RICH_EDITOR_BUTTON_INACTIVE_CLASSES,
|
|
270
|
+
b as RICH_EDITOR_COLORS,
|
|
271
|
+
n as RICH_EDITOR_CONTENT_CLASSES,
|
|
272
|
+
f as RICH_EDITOR_CONTENT_STYLES,
|
|
273
|
+
o as RICH_EDITOR_DEFAULT_TOOLBAR,
|
|
274
|
+
d as RICH_EDITOR_DIVIDER_CLASSES,
|
|
275
|
+
s as RICH_EDITOR_HEADING_OPTIONS,
|
|
276
|
+
a as RICH_EDITOR_MIN_HEIGHT,
|
|
277
|
+
r as RICH_EDITOR_ROOT_CLASSES,
|
|
278
|
+
i as RICH_EDITOR_TOOLBAR_CLASSES
|
|
279
|
+
};
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { RichEditorProps } from './RichEditor.types';
|
|
3
|
+
/**
|
|
4
|
+
* RichEditor - WYSIWYG rich text editor with formatting toolbar
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const [value, setValue] = useState('<p>Start editing...</p>');
|
|
9
|
+
*
|
|
10
|
+
* <RichEditor
|
|
11
|
+
* value={value}
|
|
12
|
+
* onChange={setValue}
|
|
13
|
+
* placeholder="Start typing..."
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
3
17
|
export declare const RichEditor: FC<RichEditorProps>;
|
|
4
18
|
export default RichEditor;
|