@cmgfi/clear-ds 1.1.8 → 1.2.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.
- package/README.md +4 -3
- package/dist/index.cjs +174 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +94 -0
- package/dist/index.mjs +23684 -4120
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -3
package/dist/index.d.ts
CHANGED
|
@@ -1185,6 +1185,11 @@ export declare interface LoanBannerNavToolbar {
|
|
|
1185
1185
|
right?: React.ReactNode;
|
|
1186
1186
|
}
|
|
1187
1187
|
|
|
1188
|
+
export declare interface MentionItem {
|
|
1189
|
+
id: string;
|
|
1190
|
+
label: string;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1188
1193
|
export declare function MiscChip({ label, color, dismissible, onDismiss }: MiscChipProps): JSX_2.Element;
|
|
1189
1194
|
|
|
1190
1195
|
export declare namespace MiscChip {
|
|
@@ -1653,6 +1658,91 @@ export declare interface RadioButtonProps extends Omit<React.InputHTMLAttributes
|
|
|
1653
1658
|
size?: 'sm' | 'md' | 'lg';
|
|
1654
1659
|
}
|
|
1655
1660
|
|
|
1661
|
+
export declare const RichTextEditor: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes<HTMLDivElement>>;
|
|
1662
|
+
|
|
1663
|
+
export declare interface RichTextEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
1664
|
+
/** Label shown above the editor. */
|
|
1665
|
+
label?: string;
|
|
1666
|
+
/** When false, hides the label visually and falls back to aria-label on the editor. Defaults to true. */
|
|
1667
|
+
showLabel?: boolean;
|
|
1668
|
+
/** Adds a red asterisk and sets aria-required. */
|
|
1669
|
+
required?: boolean;
|
|
1670
|
+
/** Show or hide the helper text area below the editor. */
|
|
1671
|
+
helperText?: boolean;
|
|
1672
|
+
/** Text displayed in the helper text area. Defaults to 'Helper text' when not provided. Turns red when invalid is true. */
|
|
1673
|
+
helperTextContent?: string;
|
|
1674
|
+
/** Renders the invalid/error state with red border and red helper text. */
|
|
1675
|
+
invalid?: boolean;
|
|
1676
|
+
/** Disables the editor and all toolbar buttons. */
|
|
1677
|
+
disabled?: boolean;
|
|
1678
|
+
/** Placeholder text shown when the editor is empty. */
|
|
1679
|
+
placeholder?: string;
|
|
1680
|
+
/** Initial HTML content (uncontrolled). */
|
|
1681
|
+
defaultValue?: string;
|
|
1682
|
+
/** Called with the current HTML string on every change. */
|
|
1683
|
+
onChange?: (html: string) => void;
|
|
1684
|
+
/** When set, shows a character counter. */
|
|
1685
|
+
maxLength?: number;
|
|
1686
|
+
/** Where the character counter appears. Defaults to 'outside'. */
|
|
1687
|
+
counterPlacement?: 'inside' | 'outside';
|
|
1688
|
+
/**
|
|
1689
|
+
* Controls when the toolbar is visible.
|
|
1690
|
+
* - `'always'` (default) — toolbar is always shown when any button prop is true.
|
|
1691
|
+
* - `'on-focus'` — toolbar appears when the editor is focused and hides on blur.
|
|
1692
|
+
*/
|
|
1693
|
+
toolbarMode?: 'always' | 'on-focus';
|
|
1694
|
+
/** Show Bold button. */
|
|
1695
|
+
showBold?: boolean;
|
|
1696
|
+
/** Show Italic button. */
|
|
1697
|
+
showItalic?: boolean;
|
|
1698
|
+
/** Show Underline button. */
|
|
1699
|
+
showUnderline?: boolean;
|
|
1700
|
+
/** Show Strikethrough button. */
|
|
1701
|
+
showStrike?: boolean;
|
|
1702
|
+
/** Show inline Code button. */
|
|
1703
|
+
showCode?: boolean;
|
|
1704
|
+
/** Show Highlight button. */
|
|
1705
|
+
showHighlight?: boolean;
|
|
1706
|
+
/** Show Subscript button. */
|
|
1707
|
+
showSubscript?: boolean;
|
|
1708
|
+
/** Show Superscript button. */
|
|
1709
|
+
showSuperscript?: boolean;
|
|
1710
|
+
/** Show Heading buttons. Renders H1/H2/H3 by default; use headingLevels to customise. */
|
|
1711
|
+
showHeading?: boolean;
|
|
1712
|
+
/** Which heading levels to show. Defaults to [1, 2, 3]. */
|
|
1713
|
+
headingLevels?: (1 | 2 | 3 | 4 | 5 | 6)[];
|
|
1714
|
+
/** Show Blockquote button. */
|
|
1715
|
+
showBlockquote?: boolean;
|
|
1716
|
+
/** Show Code Block button. */
|
|
1717
|
+
showCodeBlock?: boolean;
|
|
1718
|
+
/** Show Bullet List button. */
|
|
1719
|
+
showBulletList?: boolean;
|
|
1720
|
+
/** Show Ordered List button. */
|
|
1721
|
+
showOrderedList?: boolean;
|
|
1722
|
+
/** Show Task List button. */
|
|
1723
|
+
showTaskList?: boolean;
|
|
1724
|
+
/** Show Horizontal Rule button. */
|
|
1725
|
+
showHorizontalRule?: boolean;
|
|
1726
|
+
/** Show text-alignment buttons (left / center / right / justify). */
|
|
1727
|
+
showTextAlign?: boolean;
|
|
1728
|
+
/** Show Link button. Toggles an inline URL bar for adding/removing links. */
|
|
1729
|
+
showLink?: boolean;
|
|
1730
|
+
/** Show Image button. Toggles an inline URL bar for inserting images. */
|
|
1731
|
+
showImage?: boolean;
|
|
1732
|
+
/** Show Mention (@) button. Also activates the @ trigger in the editor. */
|
|
1733
|
+
showMention?: boolean;
|
|
1734
|
+
/** Show Undo button. */
|
|
1735
|
+
showUndo?: boolean;
|
|
1736
|
+
/** Show Redo button. */
|
|
1737
|
+
showRedo?: boolean;
|
|
1738
|
+
/**
|
|
1739
|
+
* Items shown in the @ mention dropdown.
|
|
1740
|
+
* Pass an array for static data, or a (sync or async) function for dynamic data.
|
|
1741
|
+
* Falls back to built-in mock loan-party data if omitted.
|
|
1742
|
+
*/
|
|
1743
|
+
mentionSuggestions?: MentionItem[] | ((query: string) => MentionItem[] | Promise<MentionItem[]>);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1656
1746
|
export declare interface RuleFilterValue {
|
|
1657
1747
|
operator: 'and' | 'or';
|
|
1658
1748
|
rules: FilterRule[];
|
|
@@ -2073,6 +2163,8 @@ export declare const TextArea: ForwardRefExoticComponent<TextAreaProps & RefAttr
|
|
|
2073
2163
|
export declare interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
|
|
2074
2164
|
/** Label shown above the textarea. */
|
|
2075
2165
|
label?: string;
|
|
2166
|
+
/** When false, hides the label visually and falls back to aria-label on the textarea. Defaults to true. */
|
|
2167
|
+
showLabel?: boolean;
|
|
2076
2168
|
/** Adds a red asterisk to the label and sets aria-required. */
|
|
2077
2169
|
required?: boolean;
|
|
2078
2170
|
/** Helper text shown below the textarea. Turns red when `invalid` is true. */
|
|
@@ -2086,6 +2178,8 @@ export declare interface TextAreaProps extends Omit<React.TextareaHTMLAttributes
|
|
|
2086
2178
|
* instead of showing a scrollbar.
|
|
2087
2179
|
*/
|
|
2088
2180
|
autoGrow?: boolean;
|
|
2181
|
+
/** Controls where the character counter renders. 'inside' pins it to the bottom-right of the field; 'outside' (default) places it below the field in the bottom row. */
|
|
2182
|
+
counterPlacement?: 'inside' | 'outside';
|
|
2089
2183
|
}
|
|
2090
2184
|
|
|
2091
2185
|
/**
|