asma-ui-richeditor 0.3.13 → 0.4.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,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DS floating label for the rich text editor (Figma node 20571-30699). Class recipe copied from
|
|
3
|
+
* asma-ui-core `src/components/inputs/field-styles.ts` (`floatingLabelClass` +
|
|
4
|
+
* `floatingLabelLayoutStyle`) — those helpers are not exported from the ui-core barrel, so the
|
|
5
|
+
* shrunk-notch typography/colors are duplicated here verbatim to stay pixel-identical to
|
|
6
|
+
* StyledInputField. Converge on the shared helpers if ui-core ever exports them.
|
|
7
|
+
*/
|
|
8
|
+
export declare const FloatingLabel: ({ label, shrink, focused, error, disabled, readOnly, }: {
|
|
9
|
+
label: string;
|
|
10
|
+
shrink: boolean;
|
|
11
|
+
focused: boolean;
|
|
12
|
+
error?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
}) => import("node_modules/@types/react").JSX.Element;
|
|
@@ -13,6 +13,11 @@ export interface IRichInput extends UseEditorOptions {
|
|
|
13
13
|
replyModeComponent?: React.ReactNode;
|
|
14
14
|
inputRef?: RefObject<Editor | null>;
|
|
15
15
|
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @description MUI-style floating label: rests inside the empty field, shrinks onto the top
|
|
18
|
+
* border once the editor is focused or has content (Figma DS "Rich text editor", node 20571-30699).
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
16
21
|
title?: string;
|
|
17
22
|
placeholder?: string;
|
|
18
23
|
/**
|