@apolitical/component-library 6.0.2 → 6.0.3-ac.0

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.
@@ -0,0 +1,2 @@
1
+ declare const HeaderOption: () => import("react/jsx-runtime").JSX.Element;
2
+ export default HeaderOption;
@@ -0,0 +1 @@
1
+ export { default as HeaderOption } from './header-option';
@@ -1,4 +1,4 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { BaseProps } from './../../rich-text-editor.types';
3
- declare const Toolbar: ({ ...props }: PropsWithChildren<BaseProps>) => import("react/jsx-runtime").JSX.Element;
3
+ declare const Toolbar: ({ styling, ...props }: PropsWithChildren<BaseProps>) => import("react/jsx-runtime").JSX.Element;
4
4
  export default Toolbar;
@@ -1,3 +1,3 @@
1
1
  import { IRTEProps } from './rich-text-editor.types';
2
- declare const RichTextEditor: ({ id, value, placeholder, maxLength, meta, functions, autoFocus, data, ...props }: IRTEProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const RichTextEditor: ({ id, value, placeholder, maxLength, meta, functions, autoFocus, data, styling, ...props }: IRTEProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default RichTextEditor;
@@ -42,6 +42,13 @@ export interface IRTEProps {
42
42
  'aria-errormessage'?: string;
43
43
  /** Optional data for the editor */
44
44
  data?: IRTEData;
45
+ /** Optional styling */
46
+ styling?: {
47
+ /** Optional toolbar styling */
48
+ toolbar?: {
49
+ showHeadingOption?: boolean;
50
+ };
51
+ };
45
52
  }
46
53
  export interface IRTEInitialState {
47
54
  editorKey: string | null;
@@ -78,7 +85,8 @@ export declare enum Formatting {
78
85
  paragraph = "paragraph",
79
86
  ul = "ul_list",
80
87
  strikethrough = "strikeThrough",
81
- span = "span"
88
+ span = "span",
89
+ h3 = "h3"
82
90
  }
83
91
  export declare enum Marks {
84
92
  delete = "delete_mark",
@@ -88,6 +96,9 @@ export declare enum Marks {
88
96
  }
89
97
  export interface BaseProps {
90
98
  className?: string;
99
+ styling?: {
100
+ showHeadingOption?: boolean;
101
+ };
91
102
  [key: string]: unknown;
92
103
  }
93
104
  export type BlockOptionType = Formatting.blockquote | Formatting.link | Formatting.li | Formatting.mention | Formatting.ol | Formatting.ul | Formatting.paragraph | Formatting.span;
@@ -99,11 +110,12 @@ export interface MentionElement extends BaseElement {
99
110
  id: string;
100
111
  name?: string;
101
112
  }
102
- export type MarkOptionType = Formatting.bold | Formatting.italic | Formatting.strikethrough;
113
+ export type MarkOptionType = Formatting.bold | Formatting.italic | Formatting.strikethrough | Formatting.h3;
103
114
  export interface TypeText extends BaseText {
104
115
  [Formatting.bold]?: boolean;
105
116
  [Formatting.italic]?: boolean;
106
117
  [Formatting.strikethrough]?: boolean;
118
+ [Formatting.h3]?: boolean;
107
119
  }
108
120
  export type OptionTypes = {
109
121
  format: BlockOptionType | MarkOptionType;
package/helpers/intl.d.ts CHANGED
@@ -297,6 +297,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
297
297
  richTextEditor_placeholder: string;
298
298
  richTextEditor_toolbar: string;
299
299
  richTextEditor_bold: string;
300
+ richTextEditor_h3: string;
300
301
  richTextEditor_italic: string;
301
302
  richTextEditor_strikeThrough: string;
302
303
  richTextEditor_link: string;