@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.
- package/dist/example/package.json +1 -1
- package/dist/index.esm.js +76 -29429
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +78 -29481
- package/dist/index.js.map +1 -1
- package/dist/src/Accordion/Accordion.d.ts +6 -3
- package/dist/src/Accordion/Accordion.types.d.ts +86 -83
- package/dist/src/Accordion/index.d.ts +2 -1
- package/dist/src/Alert/Alert.d.ts +8 -3
- package/dist/src/Alert/Alert.types.d.ts +58 -55
- package/dist/src/Alert/index.d.ts +2 -1
- package/dist/src/Button/Button.d.ts +6 -3
- package/dist/src/Button/Button.types.d.ts +151 -147
- package/dist/src/Button/index.d.ts +2 -1
- package/dist/src/ButtonGroup/ButtonGroup.d.ts +8 -3
- package/dist/src/ButtonGroup/ButtonGroup.types.d.ts +66 -62
- package/dist/src/ButtonGroup/index.d.ts +2 -1
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.d.ts +8 -5
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +209 -204
- package/dist/src/ButtonWithDropdown/index.d.ts +2 -1
- package/dist/src/ButtonWithPopover/ButtonWithPopover.d.ts +7 -4
- package/dist/src/ButtonWithPopover/ButtonWithPopover.types.d.ts +134 -129
- package/dist/src/ButtonWithPopover/index.d.ts +2 -1
- package/dist/src/Carousel/Carousel.d.ts +7 -3
- package/dist/src/Carousel/Carousel.types.d.ts +84 -81
- package/dist/src/Carousel/index.d.ts +2 -1
- package/dist/src/Checkbox/Checkbox.d.ts +8 -3
- package/dist/src/Checkbox/Checkbox.types.d.ts +92 -89
- package/dist/src/Checkbox/index.d.ts +2 -1
- package/dist/src/Collapse/Collapse.d.ts +6 -3
- package/dist/src/Collapse/Collapse.types.d.ts +17 -14
- package/dist/src/Collapse/index.d.ts +2 -1
- package/dist/src/Icon/Icon.d.ts +7 -3
- package/dist/src/Icon/Icon.types.d.ts +89 -85
- package/dist/src/Icon/index.d.ts +2 -1
- package/dist/src/InputGroup/InputGroup.d.ts +8 -3
- package/dist/src/InputGroup/InputGroup.types.d.ts +42 -38
- package/dist/src/InputGroup/index.d.ts +3 -2
- package/dist/src/Modal/Modal.d.ts +8 -3
- package/dist/src/Modal/Modal.types.d.ts +253 -249
- package/dist/src/Modal/index.d.ts +2 -1
- package/dist/src/ProgressBar/ProgressBar.d.ts +6 -3
- package/dist/src/ProgressBar/ProgressBar.types.d.ts +71 -66
- package/dist/src/ProgressBar/index.d.ts +2 -1
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.d.ts +7 -4
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +159 -154
- package/dist/src/SeeqActionDropdown/index.d.ts +2 -1
- package/dist/src/SeeqActionDropdown/variants.d.ts +9 -5
- package/dist/src/Select/Select.d.ts +9 -6
- package/dist/src/Select/Select.types.d.ts +219 -213
- package/dist/src/Select/index.d.ts +3 -2
- package/dist/src/Slider/Slider.d.ts +8 -3
- package/dist/src/Slider/Slider.types.d.ts +83 -80
- package/dist/src/Slider/index.d.ts +2 -1
- package/dist/src/SvgIcon/SvgIcon.d.ts +7 -3
- package/dist/src/SvgIcon/SvgIcon.types.d.ts +73 -69
- package/dist/src/SvgIcon/index.d.ts +2 -1
- package/dist/src/Tabs/Tabs.d.ts +6 -3
- package/dist/src/Tabs/Tabs.types.d.ts +83 -78
- package/dist/src/Tabs/index.d.ts +2 -1
- package/dist/src/TextArea/TextArea.d.ts +8 -3
- package/dist/src/TextArea/TextArea.types.d.ts +116 -111
- package/dist/src/TextArea/index.d.ts +2 -1
- package/dist/src/TextField/TextField.d.ts +8 -3
- package/dist/src/TextField/TextField.types.d.ts +198 -194
- package/dist/src/TextField/index.d.ts +2 -1
- package/dist/src/ToolbarButton/ToolbarButton.d.ts +7 -3
- package/dist/src/ToolbarButton/ToolbarButton.types.d.ts +121 -117
- package/dist/src/ToolbarButton/index.d.ts +2 -1
- package/dist/src/Tooltip/QTip.types.d.ts +16 -12
- package/dist/src/Tooltip/Qtip.d.ts +7 -2
- package/dist/src/Tooltip/Tooltip.d.ts +8 -3
- package/dist/src/Tooltip/Tooltip.types.d.ts +24 -20
- package/dist/src/Tooltip/index.d.ts +3 -2
- package/dist/src/Tooltip/qTip.utilities.d.ts +13 -3
- package/dist/src/TriggerWithDropdown/TriggerWithDropdown.d.ts +7 -4
- package/dist/src/TriggerWithDropdown/TriggerWithDropdown.types.d.ts +99 -94
- package/dist/src/TriggerWithDropdown/index.d.ts +2 -1
- package/dist/src/index.build.d.ts +50 -6
- package/dist/src/index.d.ts +50 -46
- package/dist/src/test-utils/is-browser-mode.d.ts +7 -4
- package/dist/src/types.d.ts +30 -28
- package/dist/src/utils/browserId.d.ts +8 -5
- package/dist/src/utils/svg.d.ts +6 -3
- package/dist/src/utils/validateStyleDimension.d.ts +6 -2
- package/package.json +10 -9
- package/dist/src/styles.build.css.d.ts +0 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
|
|
22
|
+
//#endregion
|
|
23
|
+
export { SvgIcon as default };
|
|
@@ -1,75 +1,79 @@
|
|
|
1
|
-
import { TooltipComponentProps } from
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
1
|
+
import SvgIcon from "./SvgIcon.js";
|
|
2
|
+
export { SvgIcon as default };
|
package/dist/src/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Tabs as default };
|
|
@@ -1,100 +1,105 @@
|
|
|
1
|
-
import React from
|
|
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
|
-
|
|
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
|
-
*
|
|
8
|
-
*
|
|
58
|
+
* Display text for the tab header.
|
|
59
|
+
* This is what users see and click on to switch tabs.
|
|
9
60
|
*/
|
|
10
|
-
|
|
61
|
+
label: string;
|
|
11
62
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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
|
-
|
|
66
|
+
id: string;
|
|
17
67
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
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
|
-
|
|
71
|
+
content: React.JSX.Element;
|
|
23
72
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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
|
-
|
|
76
|
+
icon?: string;
|
|
28
77
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
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
|
-
|
|
81
|
+
testId?: string;
|
|
34
82
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
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
|
-
|
|
86
|
+
tabExtraClassNames?: string;
|
|
39
87
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
88
|
+
* When true, disables this tab preventing user interaction.
|
|
89
|
+
* Disabled tabs appear visually dimmed and cannot be selected.
|
|
42
90
|
*/
|
|
43
|
-
|
|
91
|
+
disabled?: boolean;
|
|
44
92
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
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
|
-
|
|
96
|
+
tabContentExtraClassNames?: string;
|
|
49
97
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
98
|
+
* Additional CSS classes to apply to this tab's label.
|
|
99
|
+
* Use this to customize the styling of the label.
|
|
52
100
|
*/
|
|
53
|
-
|
|
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 };
|
package/dist/src/Tabs/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import Tabs from "./Tabs.js";
|
|
2
|
+
export { Tabs as default };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
1
|
+
import { TextArea } from "./TextArea.js";
|
|
2
|
+
export { TextArea as default };
|