@vkzstudio/muza-ui 1.0.43 → 1.0.44
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/dist/components/Accordion/Accordion.d.ts +42 -6
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +71 -17
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +52 -15
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +69 -36
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.d.ts +10 -11
- package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +73 -8
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +3 -0
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/index.d.ts +1 -1
- package/dist/components/ExpandableTable/index.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.d.ts +16 -0
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +105 -42
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/index.d.ts +1 -1
- package/dist/components/FileUpload/index.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +33 -34
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +50 -23
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.d.ts +48 -1
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +34 -17
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +38 -21
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/TextEditor/TextEditor.d.ts +82 -46
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
- package/dist/components/TextEditor/index.d.ts +1 -1
- package/dist/components/TextEditor/index.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +41 -10
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/muza-ui.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AnyExtension } from '@tiptap/core';
|
|
3
3
|
import { Editor } from '@tiptap/react';
|
|
4
|
-
/**
|
|
5
|
-
type HistoryItem = 'undo' | 'redo';
|
|
6
|
-
/** Heading level
|
|
7
|
-
type HeadingLevel = 1 | 2 | 3;
|
|
8
|
-
/**
|
|
9
|
-
type FormattingItem = 'bold' | 'italic' | 'strikethrough';
|
|
10
|
-
/**
|
|
11
|
-
type ListItem = 'bullet' | 'ordered';
|
|
4
|
+
/** Identifier for a history toolbar item. */
|
|
5
|
+
export type HistoryItem = 'undo' | 'redo';
|
|
6
|
+
/** Heading level supported by the editor (H1, H2, H3). */
|
|
7
|
+
export type HeadingLevel = 1 | 2 | 3;
|
|
8
|
+
/** Identifier for a text formatting toolbar item. */
|
|
9
|
+
export type FormattingItem = 'bold' | 'italic' | 'strikethrough';
|
|
10
|
+
/** Identifier for a list toolbar item. */
|
|
11
|
+
export type ListItem = 'bullet' | 'ordered';
|
|
12
12
|
/**
|
|
13
13
|
* Configuration for the TextEditor toolbar.
|
|
14
14
|
* Each property can be:
|
|
@@ -28,17 +28,33 @@ type ListItem = 'bullet' | 'ordered';
|
|
|
28
28
|
* }
|
|
29
29
|
*/
|
|
30
30
|
export interface TextEditorToolbarConfig {
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Controls the history buttons (undo/redo). Pass an array to show only specific items.
|
|
33
|
+
* @default true
|
|
34
|
+
* @see HistoryItem
|
|
35
|
+
*/
|
|
32
36
|
history?: boolean | HistoryItem[];
|
|
33
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Controls the heading buttons (H1/H2/H3). Pass an array to show only specific levels.
|
|
39
|
+
* @default true
|
|
40
|
+
* @see HeadingLevel
|
|
41
|
+
*/
|
|
34
42
|
headings?: boolean | HeadingLevel[];
|
|
35
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Controls the formatting buttons (bold/italic/strikethrough). Pass an array to show only specific items.
|
|
45
|
+
* @default true
|
|
46
|
+
* @see FormattingItem
|
|
47
|
+
*/
|
|
36
48
|
formatting?: boolean | FormattingItem[];
|
|
37
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Controls the list buttons (bullet/ordered). Pass an array to show only specific items.
|
|
51
|
+
* @default true
|
|
52
|
+
* @see ListItem
|
|
53
|
+
*/
|
|
38
54
|
lists?: boolean | ListItem[];
|
|
39
|
-
/**
|
|
55
|
+
/** Controls the link button. When `false`, link pasting is also disabled. @default true */
|
|
40
56
|
link?: boolean;
|
|
41
|
-
/**
|
|
57
|
+
/** Controls the clear-formatting button. @default true */
|
|
42
58
|
clearFormatting?: boolean;
|
|
43
59
|
}
|
|
44
60
|
/**
|
|
@@ -54,90 +70,110 @@ export interface TextEditorToolbarConfig {
|
|
|
54
70
|
* const html = editorRef.current?.getHTML()
|
|
55
71
|
*/
|
|
56
72
|
export interface TextEditorRef {
|
|
57
|
-
/** The underlying TipTap editor instance */
|
|
73
|
+
/** The underlying TipTap editor instance. */
|
|
58
74
|
editor: Editor | null;
|
|
59
|
-
/** Focuses the editor */
|
|
75
|
+
/** Focuses the editor. */
|
|
60
76
|
focus: () => void;
|
|
61
|
-
/** Removes focus from the editor */
|
|
77
|
+
/** Removes focus from the editor. */
|
|
62
78
|
blur: () => void;
|
|
63
|
-
/** Returns the current content as HTML */
|
|
79
|
+
/** Returns the current content as HTML. */
|
|
64
80
|
getHTML: () => string;
|
|
65
|
-
/** Returns the current content as plain text */
|
|
81
|
+
/** Returns the current content as plain text. */
|
|
66
82
|
getText: () => string;
|
|
67
|
-
/** Returns true if the editor has no content */
|
|
83
|
+
/** Returns `true` if the editor has no content. */
|
|
68
84
|
isEmpty: () => boolean;
|
|
69
|
-
/**
|
|
85
|
+
/** Replaces the editor content with the given HTML string. */
|
|
70
86
|
setContent: (html: string) => void;
|
|
71
87
|
}
|
|
72
88
|
/**
|
|
73
89
|
* Props for the TextEditor component.
|
|
74
90
|
*/
|
|
75
91
|
export interface TextEditorProps {
|
|
76
|
-
/** Controlled value
|
|
92
|
+
/** Controlled value as an HTML string. Pair with `onChange` for controlled usage. */
|
|
77
93
|
value?: string;
|
|
78
|
-
/** Initial value for uncontrolled
|
|
94
|
+
/** Initial HTML value for uncontrolled usage. */
|
|
79
95
|
defaultValue?: string;
|
|
80
96
|
/**
|
|
81
|
-
* Fires when content changes. Receives empty string when editor is
|
|
82
|
-
* otherwise HTML
|
|
97
|
+
* Fires when the content changes. Receives an empty string when the editor is
|
|
98
|
+
* empty (no visible text), otherwise the current HTML.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* <TextEditor onChange={(html) => setValue(html)} />
|
|
83
102
|
*/
|
|
84
103
|
onChange?: (html: string) => void;
|
|
85
|
-
/** Fires when the editor loses focus */
|
|
104
|
+
/** Fires when the editor loses focus. */
|
|
86
105
|
onBlur?: () => void;
|
|
87
|
-
/** Fires when the editor gains focus */
|
|
106
|
+
/** Fires when the editor gains focus. */
|
|
88
107
|
onFocus?: () => void;
|
|
89
|
-
/** Placeholder text shown when editor is empty */
|
|
108
|
+
/** Placeholder text shown when the editor is empty. */
|
|
90
109
|
placeholder?: string;
|
|
91
|
-
/** Label displayed above the editor */
|
|
110
|
+
/** Label displayed above the editor. */
|
|
92
111
|
label?: string;
|
|
93
|
-
/** Helper text displayed below the editor */
|
|
112
|
+
/** Helper text displayed below the editor. Replaced by the error message when `error` is a string. */
|
|
94
113
|
hint?: string;
|
|
95
|
-
/** Tooltip content shown next to the label */
|
|
114
|
+
/** Tooltip content shown next to the label. */
|
|
96
115
|
infoTooltip?: string;
|
|
97
|
-
/**
|
|
116
|
+
/** Prevents editing and applies disabled styling. @default false */
|
|
98
117
|
disabled?: boolean;
|
|
99
|
-
/** Allows viewing but not editing content */
|
|
118
|
+
/** Allows viewing but not editing the content. @default false */
|
|
100
119
|
readOnly?: boolean;
|
|
101
120
|
/** Marks the field as required and displays a red asterisk next to the label. @default false */
|
|
102
121
|
required?: boolean;
|
|
103
122
|
/** Hides the required asterisk even when `required` is true. @default false */
|
|
104
123
|
disableRequiredAsterisk?: boolean;
|
|
105
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Error state. A string is shown as the error message below the editor;
|
|
126
|
+
* a boolean only applies the error border styling.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* <TextEditor error="Title is required" />
|
|
130
|
+
* <TextEditor error={!!formErrors.title} />
|
|
131
|
+
*/
|
|
106
132
|
error?: string | boolean;
|
|
107
133
|
/**
|
|
108
|
-
* Toolbar configuration.
|
|
134
|
+
* Toolbar configuration. Controls which toolbar groups are visible.
|
|
109
135
|
* @see TextEditorToolbarConfig
|
|
110
136
|
*/
|
|
111
137
|
toolbar?: TextEditorToolbarConfig;
|
|
112
|
-
/** Additional content rendered at the end of the toolbar */
|
|
138
|
+
/** Additional content rendered at the end of the toolbar. */
|
|
113
139
|
toolbarExtra?: ReactNode;
|
|
114
140
|
/**
|
|
115
141
|
* Additional TipTap extensions to add to the editor.
|
|
142
|
+
*
|
|
116
143
|
* @example
|
|
117
144
|
* import Mention from '@tiptap/extension-mention'
|
|
118
145
|
* <TextEditor extensions={[Mention.configure({ ... })]} />
|
|
119
146
|
*/
|
|
120
147
|
extensions?: AnyExtension[];
|
|
121
148
|
/**
|
|
122
|
-
* Minimum height of the content area in pixels. Clamped to a minimum of
|
|
123
|
-
* to ensure the link bubble menu has enough space.
|
|
149
|
+
* Minimum height of the content area in pixels. Clamped to a minimum of 200px
|
|
150
|
+
* to ensure the link bubble menu has enough space.
|
|
151
|
+
* @default 200
|
|
124
152
|
*/
|
|
125
153
|
minHeight?: number;
|
|
126
|
-
/** Maximum height of the content area
|
|
154
|
+
/** Maximum height of the content area. Enables scrolling when content exceeds it. */
|
|
127
155
|
maxHeight?: number | string;
|
|
128
|
-
/** Enables vertical resizing.
|
|
156
|
+
/** Enables vertical resizing via the content area handle. @default true */
|
|
129
157
|
resizable?: boolean;
|
|
130
|
-
/** Additional class name for the root element */
|
|
158
|
+
/** Additional class name for the root element. */
|
|
131
159
|
className?: string;
|
|
132
|
-
/** Additional class name for the content area */
|
|
160
|
+
/** Additional class name for the scrollable content area. */
|
|
133
161
|
contentClassName?: string;
|
|
134
|
-
/** Disables built-in content formatting styles (headings, paragraphs, lists, links).
|
|
162
|
+
/** Disables built-in content formatting styles (headings, paragraphs, lists, links). @default false */
|
|
135
163
|
unstyled?: boolean;
|
|
136
|
-
/** Additional class name for the TipTap editor element */
|
|
164
|
+
/** Additional class name for the inner TipTap editor element. */
|
|
137
165
|
editorClassName?: string;
|
|
138
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Maximum character count. Blocks input past this limit and enables the counter
|
|
168
|
+
* when `showCharacterCount` is true. Counts plain-text characters only — formatting
|
|
169
|
+
* markup is excluded.
|
|
170
|
+
*/
|
|
139
171
|
maxLength?: number;
|
|
140
|
-
/**
|
|
172
|
+
/**
|
|
173
|
+
* Displays a character counter (`currentCount/maxLength`) in the label row.
|
|
174
|
+
* Requires `maxLength` to be set.
|
|
175
|
+
* @default false
|
|
176
|
+
*/
|
|
141
177
|
showCharacterCount?: boolean;
|
|
142
178
|
}
|
|
143
179
|
declare const TextEditor: import('react').ForwardRefExoticComponent<TextEditorProps & import('react').RefAttributes<TextEditorRef>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAIhD,OAAO,EAAE,KAAK,MAAM,EAA4B,MAAM,eAAe,CAAA;AAWrE,
|
|
1
|
+
{"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,OAAO,EACL,UAAU,EAIX,MAAM,SAAS,CAAA;AAEhB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/TextEditor.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,OAAO,EACL,UAAU,EAIX,MAAM,SAAS,CAAA;AAEhB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CA0JjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAGxC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAgBlC,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,KA4BxB,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KAmCjC,CAAA;AAGD,eAAO,MAAM,SAAS,EAAE,KA6DvB,CAAA;AAGD,eAAO,MAAM,kBAAkB,EAAE,KAsBhC,CAAA;AAGD,eAAO,MAAM,cAAc,EAAE,KAsB5B,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,KAsC9B,CAAA;AAGD,eAAO,MAAM,YAAY,EAAE,KAmC1B,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KAsCjC,CAAA;AAqKD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,EAAE,KAwD1B,CAAA;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,EAAE,KA0DjC,CAAA;AAGD,eAAO,MAAM,QAAQ,EAAE,KA6CtB,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,KA0CjC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TextEditor, type TextEditorProps, type TextEditorRef, type TextEditorToolbarConfig, } from './TextEditor';
|
|
1
|
+
export { TextEditor, type FormattingItem, type HeadingLevel, type HistoryItem, type ListItem, type TextEditorProps, type TextEditorRef, type TextEditorToolbarConfig, } from './TextEditor';
|
|
2
2
|
export { ToolbarButton, toolbarButtonVariants, type ToolbarButtonProps, } from './ToolbarButton';
|
|
3
3
|
export { ToolbarSeparator, type ToolbarSeparatorProps, } from './ToolbarSeparator';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,uBAAuB,GAC7B,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,uBAAuB,GAC7B,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAA"}
|
|
@@ -1,29 +1,60 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the Textarea component.
|
|
4
|
+
*
|
|
5
|
+
* Extends native `<textarea>` attributes except `resize`, which is replaced
|
|
6
|
+
* by a typed union controlling the CSS resize behavior via a custom prop.
|
|
7
|
+
*/
|
|
8
|
+
export interface TextareaProps extends Omit<ComponentProps<'textarea'>, 'resize'> {
|
|
9
|
+
/**
|
|
10
|
+
* Controls manual resize behavior via the drag handle.
|
|
11
|
+
* - `'none'` disables resizing
|
|
12
|
+
* - `'vertical'` allows vertical drag only
|
|
13
|
+
* - `'horizontal'` allows horizontal drag only
|
|
14
|
+
* - `'both'` allows both axes
|
|
15
|
+
*
|
|
16
|
+
* Should not be combined with `autoResize`.
|
|
17
|
+
*
|
|
18
|
+
* @default 'none'
|
|
19
|
+
* @example
|
|
20
|
+
* <Textarea resize="vertical" />
|
|
21
|
+
*/
|
|
5
22
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
6
23
|
/** Label text displayed above the textarea. */
|
|
7
24
|
label?: string;
|
|
8
|
-
/** Helper text displayed below the textarea. Replaced by errorMessage when error is true. */
|
|
25
|
+
/** Helper text displayed below the textarea. Replaced by `errorMessage` when `error` is true. */
|
|
9
26
|
hint?: string;
|
|
10
|
-
/** Applies error border styling
|
|
27
|
+
/** Applies error border styling and surfaces `errorMessage` in place of `hint`. @default false */
|
|
11
28
|
error?: boolean;
|
|
12
|
-
/** Error message displayed below textarea when error is true. Overrides hint
|
|
29
|
+
/** Error message displayed below the textarea when `error` is true. Overrides `hint`. */
|
|
13
30
|
errorMessage?: string;
|
|
14
31
|
/** Marks the field as required and displays a red asterisk next to the label. @default false */
|
|
15
32
|
required?: boolean;
|
|
16
33
|
/** Hides the required asterisk even when `required` is true. @default false */
|
|
17
34
|
disableRequiredAsterisk?: boolean;
|
|
18
|
-
/** Name attribute
|
|
35
|
+
/** Name attribute used when submitting the textarea as part of an HTML form. */
|
|
19
36
|
name?: string;
|
|
20
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Automatically grows the textarea height to fit its content on every input event.
|
|
39
|
+
* When enabled, internal overflow is hidden; prefer not to combine with `resize`.
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
* @example
|
|
43
|
+
* <Textarea autoResize rows={2} placeholder="Grows as you type" />
|
|
44
|
+
*/
|
|
21
45
|
autoResize?: boolean;
|
|
22
|
-
/** Extra content rendered inline next to the label (e.g. a tooltip icon). */
|
|
46
|
+
/** Extra content rendered inline next to the label (e.g. a tooltip icon). Takes precedence over `infoTooltip`. */
|
|
23
47
|
labelExtra?: ReactNode;
|
|
24
48
|
/** Tooltip content shown in an info icon next to the label. Overridden by `labelExtra` if both are provided. */
|
|
25
49
|
infoTooltip?: string;
|
|
26
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Displays a live character counter (`currentCount/maxLength`) in the label row.
|
|
52
|
+
* Requires `maxLength` to be set; the counter is omitted otherwise.
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
* @example
|
|
56
|
+
* <Textarea showCharacterCount maxLength={200} label="Bio" />
|
|
57
|
+
*/
|
|
27
58
|
showCharacterCount?: boolean;
|
|
28
59
|
}
|
|
29
60
|
export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AA+Dd
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AA+Dd;;;;;GAKG;AACH,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;IAClD;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;IACpD,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iGAAiG;IACjG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kGAAkG;IAClG,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kHAAkH;IAClH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,gHAAgH;IAChH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAO,MAAM,QAAQ,4HA0GpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAgG/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAgB9B,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAgBpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAiBnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAiBlC,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAiB9B,CAAA"}
|