mino-daisy-react 1.1.20 → 1.1.22

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/index.js CHANGED
@@ -21159,7 +21159,7 @@ function ImageIcon() {
21159
21159
 
21160
21160
  // src/rich-text-editor/toolbar.tsx
21161
21161
  import { jsx as jsx55, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
21162
- function Toolbar({ className }) {
21162
+ function Toolbar({ className, enableImage = true }) {
21163
21163
  const [editor] = useLexicalComposerContext();
21164
21164
  const [isBold, setIsBold] = useState5(false);
21165
21165
  const [isItalic, setIsItalic] = useState5(false);
@@ -21408,7 +21408,7 @@ function Toolbar({ className }) {
21408
21408
  title: "Insert Link",
21409
21409
  children: /* @__PURE__ */ jsx55(LinkIcon, {})
21410
21410
  }),
21411
- /* @__PURE__ */ jsx55(Dropdown3, {
21411
+ enableImage && /* @__PURE__ */ jsx55(Dropdown3, {
21412
21412
  className: "join-item [&>summary]:list-none [&>summary::-webkit-details-marker]:hidden",
21413
21413
  trigger: /* @__PURE__ */ jsx55("div", {
21414
21414
  className: "btn btn-sm btn-ghost",
@@ -21439,7 +21439,7 @@ function Toolbar({ className }) {
21439
21439
  })
21440
21440
  ]
21441
21441
  }),
21442
- /* @__PURE__ */ jsx55("input", {
21442
+ enableImage && /* @__PURE__ */ jsx55("input", {
21443
21443
  type: "file",
21444
21444
  ref: fileInputRef,
21445
21445
  accept: "image/*",
@@ -21491,6 +21491,7 @@ function RichTextEditor({
21491
21491
  editorClassName,
21492
21492
  className,
21493
21493
  ref,
21494
+ enableImage = true,
21494
21495
  ...props
21495
21496
  }) {
21496
21497
  const initialConfig = {
@@ -21509,7 +21510,8 @@ function RichTextEditor({
21509
21510
  initialConfig,
21510
21511
  children: [
21511
21512
  !disabled && /* @__PURE__ */ jsx56(Toolbar, {
21512
- className: toolbarClassName
21513
+ className: toolbarClassName,
21514
+ enableImage
21513
21515
  }),
21514
21516
  /* @__PURE__ */ jsx56("div", {
21515
21517
  className: "relative",
@@ -62,8 +62,13 @@ export interface RichTextEditorProps extends Omit<HTMLAttributes<HTMLDivElement>
62
62
  * Ref to the Lexical editor instance for advanced use cases.
63
63
  */
64
64
  ref?: React.Ref<LexicalEditor>;
65
+ /**
66
+ * Enable image insertion in toolbar.
67
+ * @default true
68
+ */
69
+ enableImage?: boolean;
65
70
  }
66
- export declare function RichTextEditor({ initialContent, onChange, contentFormat, enableMarkdownShortcuts, disabled, placeholder, toolbarClassName, editorClassName, className, ref, ...props }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
71
+ export declare function RichTextEditor({ initialContent, onChange, contentFormat, enableMarkdownShortcuts, disabled, placeholder, toolbarClassName, editorClassName, className, ref, enableImage, ...props }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
67
72
  export declare namespace RichTextEditor {
68
73
  var displayName: string;
69
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-editor.d.ts","sourceRoot":"","sources":["../../src/rich-text-editor/rich-text-editor.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAW3C,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC3F;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAEpC;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IAEnC;;;;;;;;;;;;;;;;;OAiBG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA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a,CAAC,CAAA;IAE9B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AA+BD,wBAAgB,cAAc,CAAC,EAC7B,cAAc,EACd,QAAQ,EACR,aAAsB,EACtB,uBAA+B,EAC/B,QAAgB,EAChB,WAA+B,EAC/B,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,GAAG,EACH,WAAkB,EAClB,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAiDrB;yBA9De,cAAc"}
@@ -1,5 +1,6 @@
1
1
  export interface ToolbarProps {
2
2
  className?: string;
3
+ enableImage?: boolean;
3
4
  }
4
- export declare function Toolbar({ className }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Toolbar({ className, enableImage }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
5
6
  //# sourceMappingURL=toolbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../src/rich-text-editor/toolbar.tsx"],"names":[],"mappings":"AAmCA,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAcD,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,EAAE,YAAY,2CAmTlD"}
1
+ {"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../src/rich-text-editor/toolbar.tsx"],"names":[],"mappings":"AAmCA,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAcD,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,WAAkB,EAAE,EAAE,YAAY,2CAuTtE"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/giacomorebonato/mino-daisy-react.git"
6
6
  },
7
- "version": "1.1.20",
7
+ "version": "1.1.22",
8
8
  "description": "React component library wrapping DaisyUI components",
9
9
  "type": "module",
10
10
  "main": "./dist/index.js",