@seeqdev/qomponents 0.0.214 → 0.0.216

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 (87) hide show
  1. package/dist/example/package.json +1 -1
  2. package/dist/index.esm.js +76 -29429
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +78 -29481
  5. package/dist/index.js.map +1 -1
  6. package/dist/src/Accordion/Accordion.d.ts +6 -3
  7. package/dist/src/Accordion/Accordion.types.d.ts +86 -83
  8. package/dist/src/Accordion/index.d.ts +2 -1
  9. package/dist/src/Alert/Alert.d.ts +8 -3
  10. package/dist/src/Alert/Alert.types.d.ts +58 -55
  11. package/dist/src/Alert/index.d.ts +2 -1
  12. package/dist/src/Button/Button.d.ts +6 -3
  13. package/dist/src/Button/Button.types.d.ts +151 -147
  14. package/dist/src/Button/index.d.ts +2 -1
  15. package/dist/src/ButtonGroup/ButtonGroup.d.ts +8 -3
  16. package/dist/src/ButtonGroup/ButtonGroup.types.d.ts +66 -62
  17. package/dist/src/ButtonGroup/index.d.ts +2 -1
  18. package/dist/src/ButtonWithDropdown/ButtonWithDropdown.d.ts +8 -5
  19. package/dist/src/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +209 -204
  20. package/dist/src/ButtonWithDropdown/index.d.ts +2 -1
  21. package/dist/src/ButtonWithPopover/ButtonWithPopover.d.ts +7 -4
  22. package/dist/src/ButtonWithPopover/ButtonWithPopover.types.d.ts +134 -129
  23. package/dist/src/ButtonWithPopover/index.d.ts +2 -1
  24. package/dist/src/Carousel/Carousel.d.ts +7 -3
  25. package/dist/src/Carousel/Carousel.types.d.ts +84 -81
  26. package/dist/src/Carousel/index.d.ts +2 -1
  27. package/dist/src/Checkbox/Checkbox.d.ts +8 -3
  28. package/dist/src/Checkbox/Checkbox.types.d.ts +92 -89
  29. package/dist/src/Checkbox/index.d.ts +2 -1
  30. package/dist/src/Collapse/Collapse.d.ts +6 -3
  31. package/dist/src/Collapse/Collapse.types.d.ts +17 -14
  32. package/dist/src/Collapse/index.d.ts +2 -1
  33. package/dist/src/Icon/Icon.d.ts +7 -3
  34. package/dist/src/Icon/Icon.types.d.ts +89 -85
  35. package/dist/src/Icon/index.d.ts +2 -1
  36. package/dist/src/InputGroup/InputGroup.d.ts +8 -3
  37. package/dist/src/InputGroup/InputGroup.types.d.ts +42 -38
  38. package/dist/src/InputGroup/index.d.ts +3 -2
  39. package/dist/src/Modal/Modal.d.ts +8 -3
  40. package/dist/src/Modal/Modal.types.d.ts +253 -249
  41. package/dist/src/Modal/index.d.ts +2 -1
  42. package/dist/src/ProgressBar/ProgressBar.d.ts +6 -3
  43. package/dist/src/ProgressBar/ProgressBar.types.d.ts +71 -66
  44. package/dist/src/ProgressBar/index.d.ts +2 -1
  45. package/dist/src/SeeqActionDropdown/SeeqActionDropdown.d.ts +7 -4
  46. package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +159 -154
  47. package/dist/src/SeeqActionDropdown/index.d.ts +2 -1
  48. package/dist/src/SeeqActionDropdown/variants.d.ts +9 -5
  49. package/dist/src/Select/Select.d.ts +9 -6
  50. package/dist/src/Select/Select.types.d.ts +219 -213
  51. package/dist/src/Select/index.d.ts +3 -2
  52. package/dist/src/Slider/Slider.d.ts +8 -3
  53. package/dist/src/Slider/Slider.types.d.ts +83 -80
  54. package/dist/src/Slider/index.d.ts +2 -1
  55. package/dist/src/SvgIcon/SvgIcon.d.ts +7 -3
  56. package/dist/src/SvgIcon/SvgIcon.types.d.ts +73 -69
  57. package/dist/src/SvgIcon/index.d.ts +2 -1
  58. package/dist/src/Tabs/Tabs.d.ts +6 -3
  59. package/dist/src/Tabs/Tabs.types.d.ts +83 -78
  60. package/dist/src/Tabs/index.d.ts +2 -1
  61. package/dist/src/TextArea/TextArea.d.ts +8 -3
  62. package/dist/src/TextArea/TextArea.types.d.ts +116 -111
  63. package/dist/src/TextArea/index.d.ts +2 -1
  64. package/dist/src/TextField/TextField.d.ts +8 -3
  65. package/dist/src/TextField/TextField.types.d.ts +198 -194
  66. package/dist/src/TextField/index.d.ts +2 -1
  67. package/dist/src/ToolbarButton/ToolbarButton.d.ts +7 -3
  68. package/dist/src/ToolbarButton/ToolbarButton.types.d.ts +121 -117
  69. package/dist/src/ToolbarButton/index.d.ts +2 -1
  70. package/dist/src/Tooltip/QTip.types.d.ts +16 -12
  71. package/dist/src/Tooltip/Qtip.d.ts +7 -2
  72. package/dist/src/Tooltip/Tooltip.d.ts +8 -3
  73. package/dist/src/Tooltip/Tooltip.types.d.ts +24 -20
  74. package/dist/src/Tooltip/index.d.ts +3 -2
  75. package/dist/src/Tooltip/qTip.utilities.d.ts +13 -3
  76. package/dist/src/TriggerWithDropdown/TriggerWithDropdown.d.ts +7 -4
  77. package/dist/src/TriggerWithDropdown/TriggerWithDropdown.types.d.ts +99 -94
  78. package/dist/src/TriggerWithDropdown/index.d.ts +2 -1
  79. package/dist/src/index.build.d.ts +50 -6
  80. package/dist/src/index.d.ts +50 -46
  81. package/dist/src/test-utils/is-browser-mode.d.ts +7 -4
  82. package/dist/src/types.d.ts +30 -28
  83. package/dist/src/utils/browserId.d.ts +8 -5
  84. package/dist/src/utils/svg.d.ts +6 -3
  85. package/dist/src/utils/validateStyleDimension.d.ts +6 -2
  86. package/package.json +10 -9
  87. package/dist/src/styles.build.css.d.ts +0 -1
@@ -1,5 +1,8 @@
1
- import React from 'react';
2
- import { SvgIconProps } from './SvgIcon.types';
1
+ import { SvgIconProps } from "./SvgIcon.types.js";
2
+ import React from "react";
3
+
4
+ //#region src/SvgIcon/SvgIcon.d.ts
5
+
3
6
  /**
4
7
  * Renders an icon that has an SVG icon path (see {@link isSvgIcon() })
5
8
  *
@@ -16,4 +19,5 @@ import { SvgIconProps } from './SvgIcon.types';
16
19
  * @param tooltipProps - props to pass to the tooltip
17
20
  */
18
21
  declare const SvgIcon: React.FunctionComponent<SvgIconProps>;
19
- export default SvgIcon;
22
+ //#endregion
23
+ export { SvgIcon as default };
@@ -1,75 +1,79 @@
1
- import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
- export declare const svgIconTypes: readonly ["theme", "white", "dark-gray", "darkish-gray", "gray", "color", "info", "text", "warning", "inherit", "danger", "theme-light", "success", "default"];
3
- export type SvgIconType = (typeof svgIconTypes)[number];
1
+ import { TooltipComponentProps } from "../Tooltip/Tooltip.types.js";
2
+
3
+ //#region src/SvgIcon/SvgIcon.types.d.ts
4
+ declare const svgIconTypes: readonly ["theme", "white", "dark-gray", "darkish-gray", "gray", "color", "info", "text", "warning", "inherit", "danger", "theme-light", "success", "default"];
5
+ type SvgIconType = (typeof svgIconTypes)[number];
4
6
  /**
5
7
  * Props for the SvgIcon component that renders SVG-based icons with various styling options.
6
8
  * Extends TooltipComponentProps to support tooltip functionality on the icon.
7
9
  * Similar to Icon component but specifically for SVG icons instead of font icons.
8
10
  */
9
- export interface SvgIconProps extends TooltipComponentProps {
10
- /**
11
- * SVG icon identifier or class name to display.
12
- * This should correspond to an available SVG icon in your icon system.
13
- * Examples: 'fc-zoom', 'fc-delete', 'custom-arrow'.
14
- */
15
- icon: string;
16
- /**
17
- * Visual style type that determines the icon's color and appearance:
18
- * - `default`: Uses automatic dark/light text colors based on theme
19
- * - `theme`: Uses primary theme colors
20
- * - `white`: Pure white color
21
- * - `text`: Uses standard text color
22
- * - `dark-gray`: Dark gray color
23
- * - `darkish-gray`: Medium-dark gray color
24
- * - `gray`: Standard gray color
25
- * - `color`: Uses custom color specified in `color` prop
26
- * - `info`: Blue informational color
27
- * - `warning`: Yellow/orange warning color
28
- * - `danger`: Red error/danger color
29
- * - `success`: Green success color
30
- * - `theme-light`: Lighter version of theme color
31
- * - `inherit`: Inherits color from parent element
32
- * @default 'default'
33
- */
34
- type?: SvgIconType;
35
- /**
36
- * Custom color value for the icon when `type` is set to 'color'.
37
- * Can be any valid CSS color (hex, rgb, color names, etc.).
38
- * This property is required when type is 'color'.
39
- */
40
- color?: string;
41
- /**
42
- * Callback function triggered when the icon is clicked.
43
- * Receives the mouse event as a parameter. Use this to make icons interactive
44
- * for actions like opening menus, triggering functions, or navigation.
45
- */
46
- onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => any;
47
- /**
48
- * Additional CSS classes to apply to the SVG icon element.
49
- * Use this to customize the icon's appearance, spacing, or behavior beyond built-in options.
50
- */
51
- extraClassNames?: string;
52
- /**
53
- * HTML ID attribute for the SVG icon element.
54
- * Should be unique across the page for proper HTML semantics and accessibility.
55
- */
56
- id?: string;
57
- /**
58
- * Test ID attribute for the SVG icon element used in automated testing.
59
- * Applied to the `data-testid` attribute for element selection in test suites.
60
- */
61
- testId?: string;
62
- /**
63
- * Custom identifier placed in the `data-customid` attribute on the icon element.
64
- * Useful for identifying the specific icon in event handlers when multiple icons
65
- * share the same click handler. Helps distinguish which icon was clicked.
66
- */
67
- customId?: string;
68
- /**
69
- * SVG viewBox attribute that defines the coordinate system and aspect ratio.
70
- * Format: "min-x min-y width height" (e.g., "0 0 24 24").
71
- * If not provided, uses the default viewBox from the SVG definition.
72
- * Use this to crop or scale the icon's visible area.
73
- */
74
- viewBox?: string;
11
+ interface SvgIconProps extends TooltipComponentProps {
12
+ /**
13
+ * SVG icon identifier or class name to display.
14
+ * This should correspond to an available SVG icon in your icon system.
15
+ * Examples: 'fc-zoom', 'fc-delete', 'custom-arrow'.
16
+ */
17
+ icon: string;
18
+ /**
19
+ * Visual style type that determines the icon's color and appearance:
20
+ * - `default`: Uses automatic dark/light text colors based on theme
21
+ * - `theme`: Uses primary theme colors
22
+ * - `white`: Pure white color
23
+ * - `text`: Uses standard text color
24
+ * - `dark-gray`: Dark gray color
25
+ * - `darkish-gray`: Medium-dark gray color
26
+ * - `gray`: Standard gray color
27
+ * - `color`: Uses custom color specified in `color` prop
28
+ * - `info`: Blue informational color
29
+ * - `warning`: Yellow/orange warning color
30
+ * - `danger`: Red error/danger color
31
+ * - `success`: Green success color
32
+ * - `theme-light`: Lighter version of theme color
33
+ * - `inherit`: Inherits color from parent element
34
+ * @default 'default'
35
+ */
36
+ type?: SvgIconType;
37
+ /**
38
+ * Custom color value for the icon when `type` is set to 'color'.
39
+ * Can be any valid CSS color (hex, rgb, color names, etc.).
40
+ * This property is required when type is 'color'.
41
+ */
42
+ color?: string;
43
+ /**
44
+ * Callback function triggered when the icon is clicked.
45
+ * Receives the mouse event as a parameter. Use this to make icons interactive
46
+ * for actions like opening menus, triggering functions, or navigation.
47
+ */
48
+ onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => any;
49
+ /**
50
+ * Additional CSS classes to apply to the SVG icon element.
51
+ * Use this to customize the icon's appearance, spacing, or behavior beyond built-in options.
52
+ */
53
+ extraClassNames?: string;
54
+ /**
55
+ * HTML ID attribute for the SVG icon element.
56
+ * Should be unique across the page for proper HTML semantics and accessibility.
57
+ */
58
+ id?: string;
59
+ /**
60
+ * Test ID attribute for the SVG icon element used in automated testing.
61
+ * Applied to the `data-testid` attribute for element selection in test suites.
62
+ */
63
+ testId?: string;
64
+ /**
65
+ * Custom identifier placed in the `data-customid` attribute on the icon element.
66
+ * Useful for identifying the specific icon in event handlers when multiple icons
67
+ * share the same click handler. Helps distinguish which icon was clicked.
68
+ */
69
+ customId?: string;
70
+ /**
71
+ * SVG viewBox attribute that defines the coordinate system and aspect ratio.
72
+ * Format: "min-x min-y width height" (e.g., "0 0 24 24").
73
+ * If not provided, uses the default viewBox from the SVG definition.
74
+ * Use this to crop or scale the icon's visible area.
75
+ */
76
+ viewBox?: string;
75
77
  }
78
+ //#endregion
79
+ export { SvgIconProps, SvgIconType, svgIconTypes };
@@ -1 +1,2 @@
1
- export { default } from './SvgIcon';
1
+ import SvgIcon from "./SvgIcon.js";
2
+ export { SvgIcon as default };
@@ -1,4 +1,7 @@
1
- import React from 'react';
2
- import { TabsProps } from './Tabs.types';
1
+ import { TabsProps } from "./Tabs.types.js";
2
+ import React from "react";
3
+
4
+ //#region src/Tabs/Tabs.d.ts
3
5
  declare const Tabs: React.FunctionComponent<TabsProps>;
4
- export default Tabs;
6
+ //#endregion
7
+ export { Tabs as default };
@@ -1,100 +1,105 @@
1
- import React from 'react';
1
+ import React from "react";
2
+
3
+ //#region src/Tabs/Tabs.types.d.ts
4
+
2
5
  /**
3
6
  * Props for the Tabs component that creates a tabbed interface for organizing content.
4
7
  */
5
- export interface TabsProps {
8
+ interface TabsProps {
9
+ /**
10
+ * Additional CSS classes to apply to the tabs container.
11
+ * Use this to customize the overall appearance and layout of the tab component.
12
+ */
13
+ extraClassNames?: string;
14
+ /**
15
+ * ID of the tab that should be active when the component first loads.
16
+ * Only used for uncontrolled tabs where the component manages its own active state.
17
+ * Should match the `id` of one of the tabs in the `tabs` array.
18
+ */
19
+ defaultActiveTab?: string;
20
+ /**
21
+ * ID of the currently active tab for controlled component behavior.
22
+ * When provided, the component becomes controlled and you must handle tab changes
23
+ * via the `onTabSelect` callback to update this value.
24
+ */
25
+ activeTab?: string;
26
+ /**
27
+ * When true, enables smooth transitions when switching between tabs.
28
+ * Provides visual animation effects during tab content changes.
29
+ */
30
+ transition?: boolean;
31
+ /**
32
+ * Callback function triggered when a user selects a different tab.
33
+ * Receives the ID of the newly selected tab. Use this to handle tab changes
34
+ * and update the `activeTab` prop in controlled mode.
35
+ */
36
+ onTabSelect?: (tabId: string) => void;
37
+ /**
38
+ * HTML ID attribute for the tabs container element.
39
+ * Should be unique across the page for proper HTML semantics and accessibility.
40
+ */
41
+ id?: string;
42
+ /**
43
+ * Test ID attribute for the tabs container used in automated testing.
44
+ * Applied to the main tabs component for test targeting and interaction.
45
+ */
46
+ testId?: string;
47
+ /**
48
+ * When true, makes the tab headers stretch to fill the full width of the container.
49
+ * Each tab header will take equal width. When false, tabs size based on their content.
50
+ */
51
+ stretchTabs?: boolean;
52
+ /**
53
+ * Array of tab configurations that define the available tabs and their content.
54
+ * Each tab represents a separate page or section within the tabbed interface.
55
+ */
56
+ tabs: {
6
57
  /**
7
- * Additional CSS classes to apply to the tabs container.
8
- * Use this to customize the overall appearance and layout of the tab component.
58
+ * Display text for the tab header.
59
+ * This is what users see and click on to switch tabs.
9
60
  */
10
- extraClassNames?: string;
61
+ label: string;
11
62
  /**
12
- * ID of the tab that should be active when the component first loads.
13
- * Only used for uncontrolled tabs where the component manages its own active state.
14
- * Should match the `id` of one of the tabs in the `tabs` array.
63
+ * Unique identifier for this tab.
64
+ * Used for tracking the active tab and in callbacks. Must be unique within the tabs array.
15
65
  */
16
- defaultActiveTab?: string;
66
+ id: string;
17
67
  /**
18
- * ID of the currently active tab for controlled component behavior.
19
- * When provided, the component becomes controlled and you must handle tab changes
20
- * via the `onTabSelect` callback to update this value.
68
+ * React content to display when this tab is selected.
69
+ * Can be any React element including complex layouts, forms, or other components.
21
70
  */
22
- activeTab?: string;
71
+ content: React.JSX.Element;
23
72
  /**
24
- * When true, enables smooth transitions when switching between tabs.
25
- * Provides visual animation effects during tab content changes.
73
+ * Icon class name to display next to the tab label.
74
+ * Typically uses FontAwesome classes for visual enhancement of the tab header.
26
75
  */
27
- transition?: boolean;
76
+ icon?: string;
28
77
  /**
29
- * Callback function triggered when a user selects a different tab.
30
- * Receives the ID of the newly selected tab. Use this to handle tab changes
31
- * and update the `activeTab` prop in controlled mode.
78
+ * Test ID attribute for this specific tab header used in automated testing.
79
+ * Helps identify and interact with individual tabs in test suites.
32
80
  */
33
- onTabSelect?: (tabId: string) => void;
81
+ testId?: string;
34
82
  /**
35
- * HTML ID attribute for the tabs container element.
36
- * Should be unique across the page for proper HTML semantics and accessibility.
83
+ * Additional CSS classes to apply to this tab's header element.
84
+ * Use this to customize individual tab appearance beyond global styling.
37
85
  */
38
- id?: string;
86
+ tabExtraClassNames?: string;
39
87
  /**
40
- * Test ID attribute for the tabs container used in automated testing.
41
- * Applied to the main tabs component for test targeting and interaction.
88
+ * When true, disables this tab preventing user interaction.
89
+ * Disabled tabs appear visually dimmed and cannot be selected.
42
90
  */
43
- testId?: string;
91
+ disabled?: boolean;
44
92
  /**
45
- * When true, makes the tab headers stretch to fill the full width of the container.
46
- * Each tab header will take equal width. When false, tabs size based on their content.
93
+ * Additional CSS classes to apply to this tab's content area.
94
+ * Use this to customize the styling of the content when this tab is active.
47
95
  */
48
- stretchTabs?: boolean;
96
+ tabContentExtraClassNames?: string;
49
97
  /**
50
- * Array of tab configurations that define the available tabs and their content.
51
- * Each tab represents a separate page or section within the tabbed interface.
98
+ * Additional CSS classes to apply to this tab's label.
99
+ * Use this to customize the styling of the label.
52
100
  */
53
- tabs: {
54
- /**
55
- * Display text for the tab header.
56
- * This is what users see and click on to switch tabs.
57
- */
58
- label: string;
59
- /**
60
- * Unique identifier for this tab.
61
- * Used for tracking the active tab and in callbacks. Must be unique within the tabs array.
62
- */
63
- id: string;
64
- /**
65
- * React content to display when this tab is selected.
66
- * Can be any React element including complex layouts, forms, or other components.
67
- */
68
- content: React.JSX.Element;
69
- /**
70
- * Icon class name to display next to the tab label.
71
- * Typically uses FontAwesome classes for visual enhancement of the tab header.
72
- */
73
- icon?: string;
74
- /**
75
- * Test ID attribute for this specific tab header used in automated testing.
76
- * Helps identify and interact with individual tabs in test suites.
77
- */
78
- testId?: string;
79
- /**
80
- * Additional CSS classes to apply to this tab's header element.
81
- * Use this to customize individual tab appearance beyond global styling.
82
- */
83
- tabExtraClassNames?: string;
84
- /**
85
- * When true, disables this tab preventing user interaction.
86
- * Disabled tabs appear visually dimmed and cannot be selected.
87
- */
88
- disabled?: boolean;
89
- /**
90
- * Additional CSS classes to apply to this tab's content area.
91
- * Use this to customize the styling of the content when this tab is active.
92
- */
93
- tabContentExtraClassNames?: string;
94
- /**
95
- * Additional CSS classes to apply to this tab's label.
96
- * Use this to customize the styling of the label.
97
- */
98
- tabLabelExtraClassNames?: string;
99
- }[];
101
+ tabLabelExtraClassNames?: string;
102
+ }[];
100
103
  }
104
+ //#endregion
105
+ export { TabsProps };
@@ -1 +1,2 @@
1
- export { default } from './Tabs';
1
+ import Tabs from "./Tabs.js";
2
+ export { Tabs as default };
@@ -1,6 +1,11 @@
1
- import React from 'react';
2
- import { TextAreaProps } from './TextArea.types';
1
+ import { TextAreaProps } from "./TextArea.types.js";
2
+ import React from "react";
3
+
4
+ //#region src/TextArea/TextArea.d.ts
5
+
3
6
  /**
4
7
  * TextArea.
5
8
  */
6
- export declare const TextArea: React.ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
9
+ declare const TextArea: React.ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
10
+ //#endregion
11
+ export { TextArea };
@@ -1,115 +1,120 @@
1
- import { FormControlElement } from '../types';
1
+ import { FormControlElement } from "../types.js";
2
+
3
+ //#region src/TextArea/TextArea.types.d.ts
4
+
2
5
  /**
3
6
  * Props for the TextArea component that provides a multi-line text input control.
4
7
  */
5
- export interface TextAreaProps {
6
- /**
7
- * Additional CSS classes to apply to the textarea element.
8
- * Use this to customize the appearance beyond the default styling.
9
- */
10
- extraClassNames?: string;
11
- /**
12
- * HTML ID attribute for the textarea element.
13
- * Should be unique across the page for proper HTML semantics and accessibility.
14
- */
15
- id?: string;
16
- /**
17
- * Name attribute for the textarea used in form submission.
18
- * Identifies the textarea's data when the form is submitted to a server.
19
- */
20
- name?: string;
21
- /**
22
- * Callback function triggered when the textarea value changes.
23
- * Receives the change event containing the new value. Use this to update
24
- * your component state in controlled input scenarios.
25
- */
26
- onChange?: React.ChangeEventHandler<FormControlElement>;
27
- /**
28
- * Callback function triggered when a key is released while the textarea has focus.
29
- * Useful for implementing search-as-you-type functionality or debounced input handling.
30
- */
31
- onKeyUp?: React.KeyboardEventHandler<FormControlElement>;
32
- /**
33
- * Callback function triggered when a key is pressed while the textarea has focus.
34
- * Useful for implementing keyboard shortcuts, form submission shortcuts,
35
- * or preventing certain characters from being entered.
36
- */
37
- onKeyDown?: React.KeyboardEventHandler<FormControlElement>;
38
- /**
39
- * Callback function triggered when the textarea receives focus.
40
- * Use this to handle focus-related logic such as showing hints,
41
- * clearing placeholder text, or updating UI state.
42
- */
43
- onFocus?: React.FocusEventHandler<HTMLTextAreaElement>;
44
- /**
45
- * Callback function triggered when the textarea loses focus.
46
- * Commonly used for form validation, saving draft data, or
47
- * updating UI state when users finish interacting with the field.
48
- */
49
- onBlur?: React.FocusEventHandler<FormControlElement>;
50
- /**
51
- * Callback function triggered when the text selection changes in the
52
- * textarea. Useful for implementing features like mention autocomplete or
53
- * context-sensitive tools that need to react to cursor position or text
54
- * selection changes.
55
- */
56
- onSelectionChange?: (e: Event) => void;
57
- /**
58
- * Placeholder text displayed when the textarea is empty.
59
- * Provides users with a hint about what type of content is expected.
60
- * Should be descriptive but not replace proper labels.
61
- */
62
- placeholder?: string;
63
- /**
64
- * When true, makes the textarea read-only, preventing user input.
65
- * The field will display its value but users cannot modify it. Unlike disabled fields,
66
- * read-only fields can still receive focus and their values are included in form submissions.
67
- */
68
- readonly?: boolean;
69
- /**
70
- * When true, disables the textarea preventing any user interaction.
71
- * Disabled fields appear visually dimmed, cannot receive focus, and their
72
- * values are not included in form submissions.
73
- */
74
- disabled?: boolean;
75
- /**
76
- * Number of visible text lines in the textarea.
77
- * Controls the initial height of the textarea. Users can typically resize
78
- * the textarea if the browser allows it.
79
- * @default 3
80
- */
81
- rows?: number;
82
- /**
83
- * Number of visible character columns in the textarea.
84
- * Controls the initial width of the textarea based on average character width.
85
- * Less commonly used than CSS width styling.
86
- */
87
- cols?: number;
88
- /**
89
- * When true, automatically focuses this textarea when the component mounts.
90
- * Useful for modal dialogs or forms where immediate input is expected.
91
- * Should be used sparingly to avoid accessibility issues.
92
- */
93
- autoFocus?: boolean;
94
- /**
95
- * Test ID attribute for the textarea element used in automated testing.
96
- * Applied to the `data-testid` attribute for element selection in test suites.
97
- */
98
- testId?: string;
99
- /**
100
- * Current value of the textarea for controlled component behavior.
101
- * Can be a string for text content, an array of strings for multi-value scenarios,
102
- * or a number that will be converted to string. Use this for controlled input components.
103
- */
104
- value?: string | string[] | number;
105
- /**
106
- * When true, displays error styling on the textarea.
107
- * Typically changes border color to red and may add error-related visual cues.
108
- * Usually used in combination with error messages to provide validation feedback.
109
- */
110
- showError?: boolean;
111
- /**
112
- * Ref object to access the underlying textarea DOM element.
113
- */
114
- ref?: React.Ref<HTMLTextAreaElement>;
8
+ interface TextAreaProps {
9
+ /**
10
+ * Additional CSS classes to apply to the textarea element.
11
+ * Use this to customize the appearance beyond the default styling.
12
+ */
13
+ extraClassNames?: string;
14
+ /**
15
+ * HTML ID attribute for the textarea element.
16
+ * Should be unique across the page for proper HTML semantics and accessibility.
17
+ */
18
+ id?: string;
19
+ /**
20
+ * Name attribute for the textarea used in form submission.
21
+ * Identifies the textarea's data when the form is submitted to a server.
22
+ */
23
+ name?: string;
24
+ /**
25
+ * Callback function triggered when the textarea value changes.
26
+ * Receives the change event containing the new value. Use this to update
27
+ * your component state in controlled input scenarios.
28
+ */
29
+ onChange?: React.ChangeEventHandler<FormControlElement>;
30
+ /**
31
+ * Callback function triggered when a key is released while the textarea has focus.
32
+ * Useful for implementing search-as-you-type functionality or debounced input handling.
33
+ */
34
+ onKeyUp?: React.KeyboardEventHandler<FormControlElement>;
35
+ /**
36
+ * Callback function triggered when a key is pressed while the textarea has focus.
37
+ * Useful for implementing keyboard shortcuts, form submission shortcuts,
38
+ * or preventing certain characters from being entered.
39
+ */
40
+ onKeyDown?: React.KeyboardEventHandler<FormControlElement>;
41
+ /**
42
+ * Callback function triggered when the textarea receives focus.
43
+ * Use this to handle focus-related logic such as showing hints,
44
+ * clearing placeholder text, or updating UI state.
45
+ */
46
+ onFocus?: React.FocusEventHandler<HTMLTextAreaElement>;
47
+ /**
48
+ * Callback function triggered when the textarea loses focus.
49
+ * Commonly used for form validation, saving draft data, or
50
+ * updating UI state when users finish interacting with the field.
51
+ */
52
+ onBlur?: React.FocusEventHandler<FormControlElement>;
53
+ /**
54
+ * Callback function triggered when the text selection changes in the
55
+ * textarea. Useful for implementing features like mention autocomplete or
56
+ * context-sensitive tools that need to react to cursor position or text
57
+ * selection changes.
58
+ */
59
+ onSelectionChange?: (e: Event) => void;
60
+ /**
61
+ * Placeholder text displayed when the textarea is empty.
62
+ * Provides users with a hint about what type of content is expected.
63
+ * Should be descriptive but not replace proper labels.
64
+ */
65
+ placeholder?: string;
66
+ /**
67
+ * When true, makes the textarea read-only, preventing user input.
68
+ * The field will display its value but users cannot modify it. Unlike disabled fields,
69
+ * read-only fields can still receive focus and their values are included in form submissions.
70
+ */
71
+ readonly?: boolean;
72
+ /**
73
+ * When true, disables the textarea preventing any user interaction.
74
+ * Disabled fields appear visually dimmed, cannot receive focus, and their
75
+ * values are not included in form submissions.
76
+ */
77
+ disabled?: boolean;
78
+ /**
79
+ * Number of visible text lines in the textarea.
80
+ * Controls the initial height of the textarea. Users can typically resize
81
+ * the textarea if the browser allows it.
82
+ * @default 3
83
+ */
84
+ rows?: number;
85
+ /**
86
+ * Number of visible character columns in the textarea.
87
+ * Controls the initial width of the textarea based on average character width.
88
+ * Less commonly used than CSS width styling.
89
+ */
90
+ cols?: number;
91
+ /**
92
+ * When true, automatically focuses this textarea when the component mounts.
93
+ * Useful for modal dialogs or forms where immediate input is expected.
94
+ * Should be used sparingly to avoid accessibility issues.
95
+ */
96
+ autoFocus?: boolean;
97
+ /**
98
+ * Test ID attribute for the textarea element used in automated testing.
99
+ * Applied to the `data-testid` attribute for element selection in test suites.
100
+ */
101
+ testId?: string;
102
+ /**
103
+ * Current value of the textarea for controlled component behavior.
104
+ * Can be a string for text content, an array of strings for multi-value scenarios,
105
+ * or a number that will be converted to string. Use this for controlled input components.
106
+ */
107
+ value?: string | string[] | number;
108
+ /**
109
+ * When true, displays error styling on the textarea.
110
+ * Typically changes border color to red and may add error-related visual cues.
111
+ * Usually used in combination with error messages to provide validation feedback.
112
+ */
113
+ showError?: boolean;
114
+ /**
115
+ * Ref object to access the underlying textarea DOM element.
116
+ */
117
+ ref?: React.Ref<HTMLTextAreaElement>;
115
118
  }
119
+ //#endregion
120
+ export { TextAreaProps };
@@ -1 +1,2 @@
1
- export { TextArea as default } from './TextArea';
1
+ import { TextArea } from "./TextArea.js";
2
+ export { TextArea as default };