dhx-react-suite 1.2.0 → 1.2.2

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.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { Context } from 'react';
2
2
  import { default as default_2 } from 'react';
3
+ import { ForwardRefExoticComponent } from 'react';
3
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
5
+ import { RefAttributes } from 'react';
4
6
  import { RefObject } from 'react';
5
7
 
6
8
  export declare function Button({ children, variant, size, icon, disabled, onClick, style, className, }: ButtonProps): JSX_2.Element;
@@ -494,6 +496,51 @@ export declare interface RibbonSubItem {
494
496
  onFocus?: (value: string) => void;
495
497
  }
496
498
 
499
+ export declare const Richtext: ForwardRefExoticComponent<RichtextProps & RefAttributes<RichtextRef>>;
500
+
501
+ export declare type RichtextCustomButton = {
502
+ type: "button";
503
+ id?: string;
504
+ icon?: string;
505
+ css?: string;
506
+ label?: string;
507
+ tooltip?: string;
508
+ handler?: () => void;
509
+ };
510
+
511
+ export declare type RichtextLayoutMode = "classic" | "document";
512
+
513
+ export declare interface RichtextProps {
514
+ /** Initial HTML content */
515
+ value?: string;
516
+ /** Toolbar buttons list, true = full toolbar, false = hidden */
517
+ toolbar?: boolean | Array<RichtextToolbarButton | RichtextCustomButton>;
518
+ /** Start in fullscreen mode */
519
+ fullscreenMode?: boolean;
520
+ /** Editor layout mode */
521
+ layoutMode?: RichtextLayoutMode;
522
+ /** Server endpoint for image uploads (reserved for future use) */
523
+ imageUploadUrl?: string;
524
+ /** Localisation object */
525
+ locale?: Record<string, string>;
526
+ /** Default text styles per block type */
527
+ defaultStyles?: Record<string, Record<string, string>>;
528
+ /** Fires on every content change with current HTML value */
529
+ onChange?: (value: string) => void;
530
+ style?: React.CSSProperties;
531
+ className?: string;
532
+ /** Show menu bar — reserved, not yet implemented */
533
+ menubar?: boolean;
534
+ }
535
+
536
+ export declare interface RichtextRef {
537
+ getValue(): string;
538
+ setValue(html: string): void;
539
+ focus(): void;
540
+ }
541
+
542
+ export declare type RichtextToolbarButton = "undo" | "redo" | "style" | "font-family" | "font-size" | "bold" | "italic" | "underline" | "strike" | "subscript" | "superscript" | "text-color" | "background-color" | "align" | "indent" | "outdent" | "line-height" | "quote" | "bulleted-list" | "numbered-list" | "link" | "image" | "line" | "clear" | "print" | "fullscreen" | "mode" | "shortcuts" | "separator";
543
+
497
544
  export declare function Sidebar({ items, width, minWidth, header, footer, collapsed, defaultCollapsed, selected, defaultSelected, onSelect, onCollapse, onExpand, onBeforeCollapse, onBeforeExpand, onToggleItem, style, }: SidebarProps): JSX_2.Element;
498
545
 
499
546
  export declare type SidebarBadgeColor = "danger" | "primary" | "success" | "secondary";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dhx-react-suite",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "TypeScript ui-components",
5
5
  "type": "module",
6
6
  "main": "./dist/dhx-react-suite.umd.cjs",