asma-ui-richeditor 0.6.4 → 0.7.1

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,7 +2,7 @@ import { Editor, UseEditorOptions } from '@tiptap/react';
2
2
  import { YoutubeOptions } from '@tiptap/extension-youtube';
3
3
  import { RefObject } from 'react';
4
4
  import { ImageOptions } from '@tiptap/extension-image';
5
- import { StyledChipProps } from 'asma-ui-core';
5
+ import { FieldLabelPlacement, FieldWidth, StyledChipProps } from 'asma-ui-core';
6
6
  export interface CustomCSSProperties extends React.CSSProperties {
7
7
  '--max-scrollable-height'?: string;
8
8
  }
@@ -13,11 +13,19 @@ export interface IRichInput extends UseEditorOptions {
13
13
  replyModeComponent?: React.ReactNode;
14
14
  inputRef?: RefObject<Editor | null>;
15
15
  id?: string;
16
+ /** Field label, rendered above the field by default (see `labelPlacement`). */
17
+ label?: string;
16
18
  /**
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
+ * @description `'above'` (default) renders `label` above the field like asma-ui-core fields.
20
+ * `'floating'` keeps the MUI-style label that rests inside the empty field and shrinks onto the
21
+ * top border once the editor is focused or has content (Figma DS "Rich text editor", node 20571-30699).
19
22
  */
20
- label?: string;
23
+ labelPlacement?: FieldLabelPlacement;
24
+ /**
25
+ * Field width pattern step; Full by default. `readOnly='plain'` is static text, not a field: it
26
+ * fills its container whatever the step.
27
+ */
28
+ width?: FieldWidth;
21
29
  /** Accessible name for the editable editor host. Takes precedence over `label`. */
22
30
  'aria-label'?: string;
23
31
  title?: string;