@cmgfi/clear-ds 1.1.7 → 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 +133 -0
- package/dist/index.mjs +23772 -3958
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -3
package/dist/index.d.ts
CHANGED
|
@@ -245,6 +245,45 @@ export declare type ButtonSize = 'sm' | 'md' | 'lg';
|
|
|
245
245
|
|
|
246
246
|
export declare type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'link';
|
|
247
247
|
|
|
248
|
+
/**
|
|
249
|
+
* Calendar — Clear Design System
|
|
250
|
+
*
|
|
251
|
+
* A standalone, inline calendar for picking a single date. Renders directly in the
|
|
252
|
+
* page (no popover or text input). Three views: day, month, and year — click the
|
|
253
|
+
* month or year in the header to drill up. This is the same calendar surface used
|
|
254
|
+
* inside DatePicker, extracted for use on its own.
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* <Calendar value={date} onChange={setDate} />
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* <Calendar value={date} onChange={setDate} minDate={new Date()} showFooter />
|
|
261
|
+
*/
|
|
262
|
+
export declare const Calendar: ForwardRefExoticComponent<CalendarProps & RefAttributes<HTMLDivElement>>;
|
|
263
|
+
|
|
264
|
+
export declare interface CalendarProps {
|
|
265
|
+
/** Controlled selected date. Pass `null` to clear. */
|
|
266
|
+
value?: Date | null;
|
|
267
|
+
/** Called when the user selects (or, with the footer, clears) a date. */
|
|
268
|
+
onChange?: (date: Date | null) => void;
|
|
269
|
+
/** Dates before this date are disabled and not selectable. */
|
|
270
|
+
minDate?: Date;
|
|
271
|
+
/** Dates after this date are disabled and not selectable. */
|
|
272
|
+
maxDate?: Date;
|
|
273
|
+
/** When true, shows ISO week numbers as the first column. Defaults to false. */
|
|
274
|
+
showWeekNumbers?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Surface style. `'card'` (default) is a white panel with a border and shadow;
|
|
277
|
+
* `'plain'` is transparent with no border or shadow, letting the page show through.
|
|
278
|
+
*/
|
|
279
|
+
variant?: 'card' | 'plain';
|
|
280
|
+
/** Month to display initially when there is no `value`. Defaults to the current month. */
|
|
281
|
+
defaultMonth?: Date;
|
|
282
|
+
id?: string;
|
|
283
|
+
className?: string;
|
|
284
|
+
style?: React.CSSProperties;
|
|
285
|
+
}
|
|
286
|
+
|
|
248
287
|
/**
|
|
249
288
|
* Card — Clear Design System
|
|
250
289
|
*
|
|
@@ -1146,6 +1185,11 @@ export declare interface LoanBannerNavToolbar {
|
|
|
1146
1185
|
right?: React.ReactNode;
|
|
1147
1186
|
}
|
|
1148
1187
|
|
|
1188
|
+
export declare interface MentionItem {
|
|
1189
|
+
id: string;
|
|
1190
|
+
label: string;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1149
1193
|
export declare function MiscChip({ label, color, dismissible, onDismiss }: MiscChipProps): JSX_2.Element;
|
|
1150
1194
|
|
|
1151
1195
|
export declare namespace MiscChip {
|
|
@@ -1614,6 +1658,91 @@ export declare interface RadioButtonProps extends Omit<React.InputHTMLAttributes
|
|
|
1614
1658
|
size?: 'sm' | 'md' | 'lg';
|
|
1615
1659
|
}
|
|
1616
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
|
+
|
|
1617
1746
|
export declare interface RuleFilterValue {
|
|
1618
1747
|
operator: 'and' | 'or';
|
|
1619
1748
|
rules: FilterRule[];
|
|
@@ -2034,6 +2163,8 @@ export declare const TextArea: ForwardRefExoticComponent<TextAreaProps & RefAttr
|
|
|
2034
2163
|
export declare interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
|
|
2035
2164
|
/** Label shown above the textarea. */
|
|
2036
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;
|
|
2037
2168
|
/** Adds a red asterisk to the label and sets aria-required. */
|
|
2038
2169
|
required?: boolean;
|
|
2039
2170
|
/** Helper text shown below the textarea. Turns red when `invalid` is true. */
|
|
@@ -2047,6 +2178,8 @@ export declare interface TextAreaProps extends Omit<React.TextareaHTMLAttributes
|
|
|
2047
2178
|
* instead of showing a scrollbar.
|
|
2048
2179
|
*/
|
|
2049
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';
|
|
2050
2183
|
}
|
|
2051
2184
|
|
|
2052
2185
|
/**
|