@vkzstudio/muza-ui 1.0.42 → 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.
Files changed (53) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +42 -6
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Button/Button.d.ts +74 -12
  4. package/dist/components/Button/Button.d.ts.map +1 -1
  5. package/dist/components/Button/Button.js +60 -55
  6. package/dist/components/Button/Button.stories.d.ts +2 -0
  7. package/dist/components/Button/Button.stories.d.ts.map +1 -1
  8. package/dist/components/DataTable/DataTable.d.ts +52 -15
  9. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  10. package/dist/components/DatePicker/DatePicker.d.ts +69 -36
  11. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  12. package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
  13. package/dist/components/EdgeButton/EdgeButton.d.ts +16 -12
  14. package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
  15. package/dist/components/EdgeButton/EdgeButton.js +70 -46
  16. package/dist/components/EdgeButton/EdgeButton.stories.d.ts +2 -0
  17. package/dist/components/EdgeButton/EdgeButton.stories.d.ts.map +1 -1
  18. package/dist/components/ExpandableTable/ExpandableTable.d.ts +73 -8
  19. package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
  20. package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +3 -0
  21. package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
  22. package/dist/components/ExpandableTable/index.d.ts +1 -1
  23. package/dist/components/ExpandableTable/index.d.ts.map +1 -1
  24. package/dist/components/FileUpload/FileItem.d.ts +16 -0
  25. package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
  26. package/dist/components/FileUpload/FileUpload.d.ts +105 -42
  27. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  28. package/dist/components/FileUpload/index.d.ts +1 -1
  29. package/dist/components/FileUpload/index.d.ts.map +1 -1
  30. package/dist/components/Input/Input.d.ts +33 -34
  31. package/dist/components/Input/Input.d.ts.map +1 -1
  32. package/dist/components/Input/Input.stories.d.ts.map +1 -1
  33. package/dist/components/MultiSelect/MultiSelect.d.ts +50 -23
  34. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  35. package/dist/components/Reorderable/Reorderable.d.ts +48 -1
  36. package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
  37. package/dist/components/ReorderableTable/ReorderableTable.d.ts +34 -17
  38. package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
  39. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
  40. package/dist/components/Select/Select.d.ts +38 -21
  41. package/dist/components/Select/Select.d.ts.map +1 -1
  42. package/dist/components/Select/index.d.ts +1 -1
  43. package/dist/components/Select/index.d.ts.map +1 -1
  44. package/dist/components/TextEditor/TextEditor.d.ts +82 -46
  45. package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
  46. package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
  47. package/dist/components/TextEditor/index.d.ts +1 -1
  48. package/dist/components/TextEditor/index.d.ts.map +1 -1
  49. package/dist/components/Textarea/Textarea.d.ts +41 -10
  50. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  51. package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
  52. package/dist/muza-ui.css +1 -1
  53. package/package.json +1 -1
@@ -1,8 +1,9 @@
1
1
  import { ForwardedRef, ReactNode } from 'react';
2
2
  /**
3
- * Column definition for ReorderableTable.
3
+ * Column definition for the ReorderableTable. Describes how a single column's
4
+ * header and body cells are derived from row data.
4
5
  *
5
- * @typeParam T - Row data object type
6
+ * @typeParam T - The type of data objects in each row
6
7
  *
7
8
  * @example
8
9
  * const columns: ReorderableTableColumn<User>[] = [
@@ -13,17 +14,19 @@ import { ForwardedRef, ReactNode } from 'react';
13
14
  export interface ReorderableTableColumn<T> {
14
15
  /** Property key from the row data object to display in this column. */
15
16
  dataKey: keyof T;
16
- /** Column header content. */
17
+ /** Header content rendered in the table head for this column. */
17
18
  title: ReactNode;
18
- /** Applies custom CSS classes to cells in this column. */
19
+ /** Applies custom CSS classes to both header and body cells in this column. */
19
20
  className?: string;
20
21
  /**
21
- * Controls text truncation via line clamping.
22
- * `true` or `1` applies single-line clamp, `2` applies two-line clamp.
22
+ * Controls text truncation via line clamping. `true` or `1` applies a
23
+ * single-line clamp, `2` applies a two-line clamp. Only used when `render`
24
+ * is omitted (the default Typography renderer honors this prop).
23
25
  */
24
26
  lineClamp?: boolean | 1 | 2;
25
27
  /**
26
- * Custom cell renderer. When omitted, the raw data value is rendered as text.
28
+ * Custom cell renderer. When omitted, the raw data value is rendered inside
29
+ * a Typography component.
27
30
  *
28
31
  * @example
29
32
  * render: (value, rowData, rowIndex) => <Tag>{value}</Tag>
@@ -34,7 +37,7 @@ export interface ReorderableTableColumn<T> {
34
37
  * Props for the ReorderableTable component.
35
38
  * Extends standard table attributes except `children` (rows are generated from `data`).
36
39
  *
37
- * @typeParam T - Row data object type; must include an `id` field
40
+ * @typeParam T - The type of data objects in each row; must include an `id` field used as the React key
38
41
  * @see ReorderableTableColumn
39
42
  */
40
43
  export interface ReorderableTableProps<T extends {
@@ -44,27 +47,37 @@ export interface ReorderableTableProps<T extends {
44
47
  data: T[];
45
48
  /**
46
49
  * Fires when rows are reordered. Receives the full array in its new order.
47
- * Optional when `onSync` is provided.
50
+ * Optional when `onSync` is provided — in sync mode `onSync` is the primary
51
+ * handler and `onReorder` becomes a pass-through for immediate local feedback.
52
+ *
53
+ * @example
54
+ * onReorder={(newOrder) => setRows(newOrder)}
48
55
  */
49
56
  onReorder?: (newOrder: T[]) => void;
50
57
  /**
51
58
  * Debounced sync callback. Fires once after the user finishes reordering
52
59
  * (`syncDelay` ms after the last reorder event). When provided, the component
53
60
  * manages internal state and blocks external `data` updates while sync is pending.
61
+ *
62
+ * @example
63
+ * onSync={(newOrder) => api.saveOrder(newOrder)}
54
64
  */
55
65
  onSync?: (newOrder: T[]) => void;
56
66
  /** Milliseconds to wait after the last reorder event before calling `onSync`. @default 300 */
57
67
  syncDelay?: number;
58
68
  /**
59
- * Called when the internal sync pending state changes.
60
- * Useful for showing loading indicators or disabling other interactions during sync.
69
+ * Fires when the internal sync pending state changes. Useful for showing
70
+ * loading indicators or disabling other interactions during sync.
61
71
  */
62
72
  onSyncPendingChange?: (isPending: boolean) => void;
63
73
  /** Fires when a pointer drag interaction starts. */
64
74
  onDragStart?: () => void;
65
75
  /** Fires when a pointer drag interaction ends. */
66
76
  onDragEnd?: () => void;
67
- /** Column definitions describing headers and cell rendering. @see ReorderableTableColumn */
77
+ /**
78
+ * Column definitions describing headers and cell rendering.
79
+ * @see ReorderableTableColumn
80
+ */
68
81
  columns: ReorderableTableColumn<T>[];
69
82
  /** Displays the table header row. @default false */
70
83
  showHeader?: boolean;
@@ -72,7 +85,8 @@ export interface ReorderableTableProps<T extends {
72
85
  disabled?: boolean;
73
86
  /**
74
87
  * Determines whether a specific row is disabled based on its data and index.
75
- * Disabled rows cannot be dragged but may still shift when other rows are reordered.
88
+ * Disabled rows cannot be dragged but may still shift position when other
89
+ * rows are reordered around them.
76
90
  *
77
91
  * @example
78
92
  * isRowDisabled={(row) => row.status === 'inactive'}
@@ -85,14 +99,17 @@ export interface ReorderableTableProps<T extends {
85
99
  /** Enables enter/exit animations when rows are added or removed. @default false */
86
100
  animateItems?: boolean;
87
101
  /**
88
- * Controls Motion's layout animation mode on rows.
89
- * Use `"position"` to animate only position and prevent scale distortion when row height changes.
102
+ * Controls Motion's layout animation mode on rows. Use `"position"` to
103
+ * animate only position and prevent scale distortion when row height changes.
90
104
  */
91
105
  layout?: true | 'position';
92
106
  /**
93
107
  * Fires when a row is clicked. Does not fire when the click originates from
94
- * the drag handle. Clicks inside interactive children (buttons, links) should
95
- * call `event.stopPropagation()` to avoid double-firing.
108
+ * the drag handle column. Clicks inside interactive children (buttons, links,
109
+ * inputs) should call `event.stopPropagation()` to avoid double-firing.
110
+ *
111
+ * @example
112
+ * onRowClick={(rowData, rowIndex) => navigate(`/items/${rowData.id}`)}
96
113
  */
97
114
  onRowClick?: (rowData: T, rowIndex: number) => void;
98
115
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderableTable.d.ts","sourceRoot":"","sources":["../../../src/components/ReorderableTable/ReorderableTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AAWrE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC,CAAA;IAChB,6BAA6B;IAC7B,KAAK,EAAE,SAAS,CAAA;IAChB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,CAAA;IAC3B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;CACxE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CACtE,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAChE,wFAAwF;IACxF,IAAI,EAAE,CAAC,EAAE,CAAA;IACT;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,IAAI,CAAA;IACnC;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,IAAI,CAAA;IAChC,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAClD,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,4FAA4F;IAC5F,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAA;IACpC,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAA;IACzD,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uFAAuF;IACvF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,UAAU,CAAA;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACpD;AAkQD,QAAA,MAAM,gBAAgB,EAAwC,CAC5D,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAEjC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;CAAE,KACvE,KAAK,CAAC,YAAY,CACtB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"ReorderableTable.d.ts","sourceRoot":"","sources":["../../../src/components/ReorderableTable/ReorderableTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA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AAE,CAAA;IACpC,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAA;IACzD,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uFAAuF;IACvF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,UAAU,CAAA;IAC1B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACpD;AAkQD,QAAA,MAAM,gBAAgB,EAAwC,CAC5D,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAEjC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;CAAE,KACvE,KAAK,CAAC,YAAY,CACtB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderableTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ReorderableTable/ReorderableTable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAc3D,OAAO,EACL,gBAAgB,EAEjB,MAAM,oBAAoB,CAAA;AAE3B,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAA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AAM,YAAY,EAAE,KAuL1B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAsG3B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA2G7B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KA0H1B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAkG3B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KA4FtB,CAAA"}
@@ -1,5 +1,26 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- /** Props for the {@link Select} dropdown component. */
2
+ /**
3
+ * A single option in the {@link Select} dropdown.
4
+ *
5
+ * @example
6
+ * const options: ISelectOption[] = [
7
+ * { value: 'a', label: 'Option A' },
8
+ * { value: 'b', label: 'Option B', disabled: true, icon: <Icon /> },
9
+ * ]
10
+ */
11
+ export interface ISelectOption {
12
+ /** Unique value identifying the option. Passed to `onChange` when selected. */
13
+ value: string;
14
+ /** Visible label rendered inside the dropdown item and in the trigger when selected. */
15
+ label: ReactNode;
16
+ /** Prevents the option from being selected and applies disabled styling. @default false */
17
+ disabled?: boolean;
18
+ /** Icon rendered before the option label inside the dropdown. */
19
+ icon?: ReactNode;
20
+ }
21
+ /**
22
+ * Props for the Select component.
23
+ */
3
24
  export interface ISelectProps {
4
25
  /** Label text displayed above the select trigger. */
5
26
  label?: string;
@@ -7,13 +28,13 @@ export interface ISelectProps {
7
28
  hint?: string;
8
29
  /** Applies error styling to the trigger border and hint text. @default false */
9
30
  error?: boolean;
10
- /** Marks the field as required. */
31
+ /** Marks the field as required and shows an asterisk next to the label. @default false */
11
32
  required?: boolean;
12
33
  /** Hides the required asterisk even when `required` is true. @default false */
13
34
  disableRequiredAsterisk?: boolean;
14
- /** Element displayed after the selected value. */
35
+ /** Element rendered after the selected value inside the trigger. */
15
36
  suffix?: ReactNode;
16
- /** Icon or element displayed before the selected value. */
37
+ /** Icon or element rendered before the selected value inside the trigger. */
17
38
  prefix?: ReactNode;
18
39
  /** Text shown when no option is selected. @default translations.select.placeholder */
19
40
  placeholder?: string;
@@ -22,35 +43,31 @@ export interface ISelectProps {
22
43
  /** Controls trigger height and padding. @default 'base' */
23
44
  size?: 'xs' | 'sm' | 'base' | 'lg';
24
45
  /**
25
- * Array of selectable option objects.
46
+ * Array of selectable options.
47
+ * @see ISelectOption
26
48
  *
27
49
  * @example
28
- * ```tsx
29
- * options={[
30
- * { value: 'a', label: 'Option A' },
31
- * { value: 'b', label: 'Option B', disabled: true, icon: <Icon /> },
32
- * ]}
33
- * ```
50
+ * <Select
51
+ * options={[
52
+ * { value: 'a', label: 'Option A' },
53
+ * { value: 'b', label: 'Option B', disabled: true, icon: <Icon /> },
54
+ * ]}
55
+ * />
34
56
  */
35
- options: Array<{
36
- value: string;
37
- label: ReactNode;
38
- disabled?: boolean;
39
- icon?: ReactNode;
40
- }>;
57
+ options: ISelectOption[];
41
58
  /** Prevents interaction and applies disabled styling. @default false */
42
59
  disabled?: boolean;
43
- /** Currently selected value (controlled). */
60
+ /** Controlled selected value. Must match a `value` field in `options`. */
44
61
  value?: string;
45
62
  /** Fires when the selected value changes. Receives the new value string. */
46
63
  onChange?: (value: string) => void;
47
64
  /** Scrolls the dropdown to the selected option when opened. @default false */
48
65
  shouldScrollToSelectedOption?: boolean;
49
- /** Distance in pixels from viewport edge before the dropdown repositions. Passed to Radix collision padding. */
66
+ /** Distance in pixels from the viewport edge before the dropdown repositions. Passed to Radix collision padding. */
50
67
  collisionPadding?: number;
51
- /** Extra content rendered inline next to the label (e.g. a tooltip icon). */
68
+ /** Extra content rendered inline next to the label (e.g. a tooltip icon). Overrides `infoTooltip` when both are provided. */
52
69
  labelExtra?: ReactNode;
53
- /** Tooltip content shown in an info icon next to the label. Overridden by `labelExtra` if both are provided. */
70
+ /** Tooltip content shown in an info icon next to the label. Ignored when `labelExtra` is provided. */
54
71
  infoTooltip?: string;
55
72
  }
56
73
  export declare const Select: React.ForwardRefExoticComponent<ISelectProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- {"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AAK,CAAC,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,8EAA8E;IAC9E,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,oHAAoH;IACpH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,6HAA6H;IAC7H,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,sGAAsG;IACtG,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,MAAM,wFAyMlB,CAAA"}
@@ -1,2 +1,2 @@
1
- export { Select, type ISelectProps } from './Select';
1
+ export { Select, type ISelectOption, type ISelectProps } from './Select';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA"}
@@ -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
- /** History toolbar item type */
5
- type HistoryItem = 'undo' | 'redo';
6
- /** Heading level type (1-3) */
7
- type HeadingLevel = 1 | 2 | 3;
8
- /** Text formatting toolbar item type */
9
- type FormattingItem = 'bold' | 'italic' | 'strikethrough';
10
- /** List toolbar item type */
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
- /** Show history buttons (undo/redo). Default: true */
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
- /** Show heading buttons (H1/H2/H3). Default: true */
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
- /** Show formatting buttons (bold/italic/strikethrough). Default: true */
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
- /** Show list buttons (bullet/ordered). Default: true */
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
- /** Show link button. When false, link pasting is also disabled. Default: true */
55
+ /** Controls the link button. When `false`, link pasting is also disabled. @default true */
40
56
  link?: boolean;
41
- /** Show clear formatting button. Default: true */
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
- /** Sets the editor content from HTML string */
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 (HTML string). Use with onChange for controlled mode. */
92
+ /** Controlled value as an HTML string. Pair with `onChange` for controlled usage. */
77
93
  value?: string;
78
- /** Initial value for uncontrolled mode */
94
+ /** Initial HTML value for uncontrolled usage. */
79
95
  defaultValue?: string;
80
96
  /**
81
- * Fires when content changes. Receives empty string when editor is empty,
82
- * otherwise HTML content.
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
- /** Disables editing and applies disabled styling */
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
- /** Error state. String shows as error message, boolean only shows error styling. */
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. See TextEditorToolbarConfig for options.
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 220px
123
- * to ensure the link bubble menu has enough space. Default: 220
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 (enables scrolling) */
154
+ /** Maximum height of the content area. Enables scrolling when content exceeds it. */
127
155
  maxHeight?: number | string;
128
- /** Enables vertical resizing. Default: true */
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). Default: false */
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
- /** Maximum character count. Blocks input past this limit and enables the counter when `showCharacterCount` is true. */
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
- /** Displays a character counter (currentCount/maxLength) in the label row. Requires `maxLength` to be set. @default false */
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,gCAAgC;AAChC,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,CAAA;AAElC,+BAA+B;AAC/B,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAE7B,wCAAwC;AACxC,KAAK,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,CAAA;AAEzD,6BAA6B;AAC7B,KAAK,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,OAAO,CAAC,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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
- /** Props for the Textarea component. */
3
- export interface TextareaProps extends ComponentProps<'textarea'> {
4
- /** Controls manual resize behavior via drag handle. @default 'none' */
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. @default false */
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 text. */
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 for form submission. */
35
+ /** Name attribute used when submitting the textarea as part of an HTML form. */
19
36
  name?: string;
20
- /** Automatically grows textarea height to fit content. @default false */
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
- /** Displays a character counter (currentCount/maxLength) in the label row. Requires `maxLength` to be set. @default false */
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,wCAAwC;AACxC,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,UAAU,CAAC;IAC/D,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;IACpD,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,gHAAgH;IAChH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6HAA6H;IAC7H,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAO,MAAM,QAAQ,4HA0GpB,CAAA"}
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,CAyG/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"}
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,KA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