beca-ui 2.1.2-beta.2 → 2.1.2-beta.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.
@@ -2,5 +2,6 @@ import React from "react";
2
2
  import { RadioGroupProps, RadioProps } from ".";
3
3
  export declare const Radio: React.FunctionComponent<RadioProps> & {
4
4
  Group: React.FunctionComponent<RadioGroupProps>;
5
+ Button: React.FunctionComponent<RadioProps>;
5
6
  };
6
7
  export default Radio;
@@ -1,5 +1,8 @@
1
- import { RadioProps as AntRadioProps, RadioGroupProps as AntRadioGroupProps } from "antd";
1
+ import { RadioProps as AntRadioProps, RadioGroupProps as AntRadioGroupProps, RadioChangeEvent as AntRadioChangeEvent } from "antd";
2
2
  export interface RadioProps extends AntRadioProps {
3
3
  }
4
4
  export interface RadioGroupProps extends AntRadioGroupProps {
5
5
  }
6
+ export interface RadioButtonProps extends RadioProps {
7
+ }
8
+ export type RadioChangeEvent = AntRadioChangeEvent;
@@ -1,3 +1,3 @@
1
- import { RadioProps, RadioGroupProps } from "./Radio.types";
1
+ import { RadioProps, RadioGroupProps, RadioButtonProps, RadioChangeEvent } from "./Radio.types";
2
2
  export * from "./Radio";
3
- export type { RadioProps, RadioGroupProps };
3
+ export type { RadioProps, RadioGroupProps, RadioButtonProps, RadioChangeEvent, };
@@ -1,6 +1,4 @@
1
1
  import { TextEditorMenuProps, MenuBarRefs } from "../TextEditor.types";
2
- export declare const fonts: {
3
- label: string;
4
- value: string;
5
- }[];
2
+ import { fonts } from "../constants";
3
+ export { fonts };
6
4
  export declare const MenuBar: import("react").ForwardRefExoticComponent<Omit<TextEditorMenuProps, "ref"> & import("react").RefAttributes<MenuBarRefs>>;
@@ -1,11 +1,3 @@
1
1
  import { TextEditorProps, TextEditorRefs } from "./TextEditor.types";
2
- declare module "@tiptap/core" {
3
- interface Commands<ReturnType> {
4
- indent: {
5
- indent: () => ReturnType;
6
- outdent: () => ReturnType;
7
- };
8
- }
9
- }
10
2
  declare const TextEditor: import("react").ForwardRefExoticComponent<TextEditorProps & import("react").RefAttributes<TextEditorRefs>>;
11
3
  export default TextEditor;
@@ -7,6 +7,8 @@ export interface TextEditorToolkitConfig {
7
7
  upper?: React.ReactNode;
8
8
  lower?: React.ReactNode;
9
9
  }
10
+ export type FontSizeUnit = "pt" | "px";
11
+ export type TextEditorMode = "advanced" | "compact";
10
12
  export interface TextEditorProps {
11
13
  value?: any;
12
14
  readingMode?: boolean;
@@ -21,9 +23,9 @@ export interface TextEditorProps {
21
23
  suggestionGroups?: SuggesstionGroupModel[];
22
24
  onUploadImage?: (file: File | null, base64?: string) => string;
23
25
  onEnter?: () => void;
24
- fontSizeUnit?: "pt" | "px";
26
+ fontSizeUnit?: FontSizeUnit;
25
27
  isSimpleText?: boolean;
26
- mode?: "advanced" | "compact";
28
+ mode?: TextEditorMode;
27
29
  variant?: "outlined" | "filled" | "borderless";
28
30
  }
29
31
  export interface SuggesstionGroupModel {
@@ -53,8 +55,8 @@ export interface TextEditorMenuProps extends EditorContentProps {
53
55
  extraMenus?: GroupMenu[];
54
56
  toolkit?: TextEditorToolkitConfig;
55
57
  addImage: (imageUrl: string) => void;
56
- fontSizeUnit?: "pt" | "px";
57
- mode?: "advanced" | "compact";
58
+ fontSizeUnit?: FontSizeUnit;
59
+ mode?: TextEditorMode;
58
60
  isFullscreen?: boolean;
59
61
  onToggleFullscreen?: () => void;
60
62
  }
@@ -0,0 +1,5 @@
1
+ export interface FontOption {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ export declare const fonts: FontOption[];
@@ -0,0 +1,6 @@
1
+ import { Extension } from "@tiptap/core";
2
+ /**
3
+ * Always keep an empty paragraph as the last node when the document
4
+ * ends with a table, so the cursor can escape below it.
5
+ */
6
+ export declare const AutoParagraph: Extension<any, any>;
@@ -0,0 +1,12 @@
1
+ import { Extension } from "@tiptap/core";
2
+ import { MutableRefObject } from "react";
3
+ interface DisableEnterOptions {
4
+ onEnterRef: MutableRefObject<(() => void) | undefined>;
5
+ mentionRendererRef: MutableRefObject<any>;
6
+ }
7
+ /**
8
+ * When `onEnter` is provided the Enter key never inserts a newline:
9
+ * it either inserts the active mention suggestion or fires `onEnter`.
10
+ */
11
+ export declare const createDisableEnterExtension: ({ onEnterRef, mentionRendererRef, }: DisableEnterOptions) => Extension<any, any>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare const ShiftEnterHardBreak: import("@tiptap/core").Node<import("@tiptap/extension-hard-break").HardBreakOptions, any>;
@@ -0,0 +1,11 @@
1
+ import { Extension } from "@tiptap/core";
2
+ declare module "@tiptap/core" {
3
+ interface Commands<ReturnType> {
4
+ indent: {
5
+ indent: () => ReturnType;
6
+ outdent: () => ReturnType;
7
+ };
8
+ }
9
+ }
10
+ export declare const MAX_INDENT_LEVEL = 8;
11
+ export declare const Indent: Extension<any, any>;
@@ -0,0 +1,11 @@
1
+ import { Extensions } from "@tiptap/core";
2
+ import { MutableRefObject } from "react";
3
+ import { SuggesstionGroupModel, TextEditorMode } from "../TextEditor.types";
4
+ export interface BuildExtensionsOptions {
5
+ mode?: TextEditorMode;
6
+ suggestionGroups?: SuggesstionGroupModel[];
7
+ getPlaceholder: () => string;
8
+ onEnterRef: MutableRefObject<(() => void) | undefined>;
9
+ mentionRendererRef: MutableRefObject<any>;
10
+ }
11
+ export declare function buildExtensions({ mode, suggestionGroups, getPlaceholder, onEnterRef, mentionRendererRef, }: BuildExtensionsOptions): Extensions;
@@ -0,0 +1,2 @@
1
+ import { SuggesstionGroupModel } from "../TextEditor.types";
2
+ export declare const createMentionExtension: (suggestionGroups: SuggesstionGroupModel[], onRendererReady: (renderer: any) => void) => any;
@@ -0,0 +1 @@
1
+ export declare const CustomOrderedList: import("@tiptap/core").Node<import("@tiptap/extension-list").OrderedListOptions, any>;
@@ -0,0 +1,5 @@
1
+ import { TableRow } from "@tiptap/extension-table";
2
+ export declare const CustomTableHeader: import("@tiptap/core").Node<import("@tiptap/extension-table").TableHeaderOptions, any>;
3
+ export declare const CustomTableCell: import("@tiptap/core").Node<import("@tiptap/extension-table").TableCellOptions, any>;
4
+ export declare const CustomTable: import("@tiptap/core").Extension<import("@tiptap/extension-table").TableKitOptions, any>;
5
+ export { TableRow };
@@ -0,0 +1 @@
1
+ export declare function htmlStringToNodeList(htmlString: string): NodeListOf<ChildNode>;
@@ -0,0 +1,9 @@
1
+ import { FontSizeUnit } from "../TextEditor.types";
2
+ export interface StyleNormalizationOptions {
3
+ fontSizeUnit?: FontSizeUnit;
4
+ mode?: "advanced" | "compact";
5
+ }
6
+ export declare const reactStyleToHtml: (styleObj: Object) => string;
7
+ export declare const getFont: (fontString: string) => undefined;
8
+ export declare function applyStylesToNodeList(nodeList: any, parentFontFamily: string | undefined, parentFontSize: number | undefined, options?: StyleNormalizationOptions): any;
9
+ export declare const nodeListToHtmlString: (nodeList: NodeListOf<ChildNode>) => string;
@@ -0,0 +1,2 @@
1
+ export declare function pxToPt(px: number | string): string | number;
2
+ export declare function ptToPx(pt: number | string): string | number;