@seeqdev/qomponents 0.0.157 → 0.0.159-patch-package-alternative
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 +15 -13
- package/dist/example/src/Example.tsx +269 -39
- package/dist/example/src/index.css +1 -0
- package/dist/example/vite.config.ts +2 -1
- package/dist/index.esm.js +2710 -2706
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2710 -2706
- package/dist/index.js.map +1 -1
- package/dist/{Accordion → src/Accordion}/Accordion.d.ts +4 -4
- package/dist/src/Accordion/Accordion.stories.d.ts +5 -0
- package/dist/{Accordion → src/Accordion}/Accordion.test.d.ts +1 -1
- package/dist/src/Accordion/Accordion.types.d.ts +86 -0
- package/dist/{Accordion → src/Accordion}/index.d.ts +1 -1
- package/dist/{Alert → src/Alert}/Alert.d.ts +7 -7
- package/dist/src/Alert/Alert.stories.d.ts +5 -0
- package/dist/src/Alert/Alert.test.d.ts +1 -0
- package/dist/src/Alert/Alert.types.d.ts +63 -0
- package/dist/{Alert → src/Alert}/index.d.ts +1 -1
- package/dist/{Button → src/Button}/Button.d.ts +10 -10
- package/dist/src/Button/Button.stories.d.ts +8 -0
- package/dist/{Button → src/Button}/Button.test.d.ts +1 -1
- package/dist/src/Button/Button.types.d.ts +148 -0
- package/dist/{Button → src/Button}/index.d.ts +1 -1
- package/dist/{ButtonGroup → src/ButtonGroup}/ButtonGroup.d.ts +7 -7
- package/dist/src/ButtonGroup/ButtonGroup.stories.d.ts +5 -0
- package/dist/src/ButtonGroup/ButtonGroup.test.d.ts +1 -0
- package/dist/src/ButtonGroup/ButtonGroup.types.d.ts +81 -0
- package/dist/{ButtonGroup → src/ButtonGroup}/index.d.ts +1 -1
- package/dist/{ButtonWithDropdown → src/ButtonWithDropdown}/ButtonWithDropdown.d.ts +4 -4
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +5 -0
- package/dist/{ButtonWithDropdown → src/ButtonWithDropdown}/ButtonWithDropdown.test.d.ts +1 -1
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +233 -0
- package/dist/{ButtonWithDropdown → src/ButtonWithDropdown}/index.d.ts +1 -1
- package/dist/{ButtonWithPopover → src/ButtonWithPopover}/ButtonWithPopover.d.ts +4 -4
- package/dist/src/ButtonWithPopover/ButtonWithPopover.stories.d.ts +5 -0
- package/dist/{ButtonWithPopover → src/ButtonWithPopover}/ButtonWithPopover.test.d.ts +1 -1
- package/dist/src/ButtonWithPopover/ButtonWithPopover.types.d.ts +134 -0
- package/dist/{ButtonWithPopover → src/ButtonWithPopover}/index.d.ts +1 -1
- package/dist/{Carousel → src/Carousel}/Carousel.d.ts +9 -9
- package/dist/src/Carousel/Carousel.stories.d.ts +5 -0
- package/dist/{Carousel → src/Carousel}/Carousel.test.d.ts +1 -1
- package/dist/src/Carousel/Carousel.types.d.ts +86 -0
- package/dist/{Carousel → src/Carousel}/index.d.ts +1 -1
- package/dist/{Checkbox → src/Checkbox}/Checkbox.d.ts +7 -7
- package/dist/src/Checkbox/Checkbox.stories.d.ts +5 -0
- package/dist/{Checkbox → src/Checkbox}/Checkbox.test.d.ts +1 -1
- package/dist/src/Checkbox/Checkbox.types.d.ts +92 -0
- package/dist/{Checkbox → src/Checkbox}/index.d.ts +1 -1
- package/dist/{Collapse → src/Collapse}/Collapse.d.ts +4 -4
- package/dist/src/Collapse/Collapse.stories.d.ts +5 -0
- package/dist/{Collapse → src/Collapse}/Collapse.test.d.ts +1 -1
- package/dist/src/Collapse/Collapse.types.d.ts +19 -0
- package/dist/{Collapse → src/Collapse}/index.d.ts +1 -1
- package/dist/{Icon → src/Icon}/Icon.d.ts +10 -10
- package/dist/src/Icon/Icon.stories.d.ts +5 -0
- package/dist/{Icon → src/Icon}/Icon.test.d.ts +1 -1
- package/dist/src/Icon/Icon.types.d.ts +87 -0
- package/dist/{Icon → src/Icon}/index.d.ts +1 -1
- package/dist/{InputGroup → src/InputGroup}/InputGroup.d.ts +7 -7
- package/dist/src/InputGroup/InputGroup.stories.d.ts +5 -0
- package/dist/src/InputGroup/InputGroup.test.d.ts +1 -0
- package/dist/src/InputGroup/InputGroup.types.d.ts +62 -0
- package/dist/{InputGroup → src/InputGroup}/index.d.ts +2 -2
- package/dist/{Modal → src/Modal}/Modal.d.ts +5 -5
- package/dist/{Modal → src/Modal}/Modal.stories.d.ts +10 -10
- package/dist/{Modal → src/Modal}/Modal.test.d.ts +1 -1
- package/dist/src/Modal/Modal.types.d.ts +244 -0
- package/dist/{Modal → src/Modal}/index.d.ts +1 -1
- package/dist/{ProgressBar → src/ProgressBar}/ProgressBar.d.ts +4 -4
- package/dist/src/ProgressBar/ProgressBar.stories.d.ts +5 -0
- package/dist/src/ProgressBar/ProgressBar.test.d.ts +1 -0
- package/dist/src/ProgressBar/ProgressBar.types.d.ts +77 -0
- package/dist/{ProgressBar → src/ProgressBar}/index.d.ts +1 -1
- package/dist/{SeeqActionDropdown → src/SeeqActionDropdown}/SeeqActionDropdown.d.ts +4 -4
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +5 -0
- package/dist/{SeeqActionDropdown → src/SeeqActionDropdown}/SeeqActionDropdown.test.d.ts +1 -1
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +160 -0
- package/dist/{SeeqActionDropdown → src/SeeqActionDropdown}/index.d.ts +1 -1
- package/dist/{SeeqActionDropdown → src/SeeqActionDropdown}/variants.d.ts +5 -5
- package/dist/{Select → src/Select}/Select.d.ts +15 -15
- package/dist/src/Select/Select.stories.d.ts +5 -0
- package/dist/{Select → src/Select}/Select.test.d.ts +1 -1
- package/dist/src/Select/Select.types.d.ts +220 -0
- package/dist/{Select → src/Select}/index.d.ts +2 -2
- package/dist/{Slider → src/Slider}/Slider.d.ts +6 -6
- package/dist/src/Slider/Slider.stories.d.ts +5 -0
- package/dist/src/Slider/Slider.test.d.ts +1 -0
- package/dist/src/Slider/Slider.types.d.ts +85 -0
- package/dist/{Slider → src/Slider}/index.d.ts +1 -1
- package/dist/{SvgIcon → src/SvgIcon}/SvgIcon.d.ts +20 -20
- package/dist/src/SvgIcon/SvgIcon.stories.d.ts +5 -0
- package/dist/{SvgIcon → src/SvgIcon}/SvgIcon.test.d.ts +1 -1
- package/dist/src/SvgIcon/SvgIcon.types.d.ts +76 -0
- package/dist/{SvgIcon → src/SvgIcon}/index.d.ts +1 -1
- package/dist/{Tabs → src/Tabs}/Tabs.d.ts +4 -4
- package/dist/src/Tabs/Tabs.stories.d.ts +5 -0
- package/dist/{Tabs → src/Tabs}/Tabs.test.d.ts +1 -1
- package/dist/src/Tabs/Tabs.types.d.ts +95 -0
- package/dist/{Tabs → src/Tabs}/index.d.ts +1 -1
- package/dist/{TextArea → src/TextArea}/TextArea.d.ts +7 -7
- package/dist/src/TextArea/TextArea.stories.d.ts +5 -0
- package/dist/{TextArea → src/TextArea}/TextArea.test.d.ts +1 -1
- package/dist/src/TextArea/TextArea.types.d.ts +105 -0
- package/dist/{TextArea → src/TextArea}/index.d.ts +1 -1
- package/dist/{TextField → src/TextField}/TextField.d.ts +7 -7
- package/dist/src/TextField/TextField.stories.d.ts +5 -0
- package/dist/{TextField → src/TextField}/TextField.test.d.ts +1 -1
- package/dist/src/TextField/TextField.types.d.ts +199 -0
- package/dist/{TextField → src/TextField}/index.d.ts +1 -1
- package/dist/{ToolbarButton → src/ToolbarButton}/ToolbarButton.d.ts +3 -3
- package/dist/src/ToolbarButton/ToolbarButton.stories.d.ts +5 -0
- package/dist/{ToolbarButton → src/ToolbarButton}/ToolbarButton.test.d.ts +1 -1
- package/dist/src/ToolbarButton/ToolbarButton.types.d.ts +124 -0
- package/dist/{ToolbarButton → src/ToolbarButton}/index.d.ts +1 -1
- package/dist/src/Tooltip/QTip.stories.d.ts +5 -0
- package/dist/{Tooltip → src/Tooltip}/QTip.types.d.ts +13 -13
- package/dist/src/Tooltip/QTipPerformance.stories.d.ts +5 -0
- package/dist/{Tooltip → src/Tooltip}/Qtip.d.ts +26 -26
- package/dist/{Tooltip → src/Tooltip}/Tooltip.d.ts +13 -13
- package/dist/src/Tooltip/Tooltip.stories.d.ts +5 -0
- package/dist/{Tooltip → src/Tooltip}/Tooltip.types.d.ts +22 -22
- package/dist/src/Tooltip/TooltipPerformance.stories.d.ts +5 -0
- package/dist/{Tooltip → src/Tooltip}/index.d.ts +2 -2
- package/dist/{Tooltip → src/Tooltip}/qTip.utilities.d.ts +3 -3
- package/dist/{index.d.ts → src/index.d.ts} +45 -45
- package/dist/src/setupTests.d.ts +1 -0
- package/dist/{types.d.ts → src/types.d.ts} +2 -2
- package/dist/{utils → src/utils}/browserId.d.ts +9 -9
- package/dist/{utils → src/utils}/svg.d.ts +15 -15
- package/dist/{utils → src/utils}/validateStyleDimension.d.ts +2 -2
- package/dist/{utils → src/utils}/validateStyleDimension.test.d.ts +1 -1
- package/dist/styles.css +98 -67
- package/package.json +21 -21
- package/dist/Accordion/Accordion.stories.d.ts +0 -6
- package/dist/Accordion/Accordion.types.d.ts +0 -20
- package/dist/Alert/Alert.stories.d.ts +0 -6
- package/dist/Alert/Alert.test.d.ts +0 -1
- package/dist/Alert/Alert.types.d.ts +0 -14
- package/dist/Button/Button.stories.d.ts +0 -9
- package/dist/Button/Button.types.d.ts +0 -53
- package/dist/ButtonGroup/ButtonGroup.stories.d.ts +0 -6
- package/dist/ButtonGroup/ButtonGroup.test.d.ts +0 -1
- package/dist/ButtonGroup/ButtonGroup.types.d.ts +0 -40
- package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +0 -6
- package/dist/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +0 -90
- package/dist/ButtonWithPopover/ButtonWithPopover.stories.d.ts +0 -6
- package/dist/ButtonWithPopover/ButtonWithPopover.types.d.ts +0 -48
- package/dist/Carousel/Carousel.stories.d.ts +0 -6
- package/dist/Carousel/Carousel.types.d.ts +0 -24
- package/dist/Checkbox/Checkbox.stories.d.ts +0 -6
- package/dist/Checkbox/Checkbox.types.d.ts +0 -20
- package/dist/Collapse/Collapse.stories.d.ts +0 -6
- package/dist/Collapse/Collapse.types.d.ts +0 -5
- package/dist/Icon/Icon.stories.d.ts +0 -6
- package/dist/Icon/Icon.types.d.ts +0 -31
- package/dist/InputGroup/InputGroup.stories.d.ts +0 -6
- package/dist/InputGroup/InputGroup.test.d.ts +0 -1
- package/dist/InputGroup/InputGroup.types.d.ts +0 -36
- package/dist/Modal/Modal.types.d.ts +0 -48
- package/dist/ProgressBar/ProgressBar.stories.d.ts +0 -6
- package/dist/ProgressBar/ProgressBar.test.d.ts +0 -1
- package/dist/ProgressBar/ProgressBar.types.d.ts +0 -30
- package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +0 -6
- package/dist/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +0 -58
- package/dist/Select/Select.stories.d.ts +0 -6
- package/dist/Select/Select.types.d.ts +0 -89
- package/dist/Slider/Slider.stories.d.ts +0 -6
- package/dist/Slider/Slider.test.d.ts +0 -1
- package/dist/Slider/Slider.types.d.ts +0 -17
- package/dist/SvgIcon/SvgIcon.stories.d.ts +0 -6
- package/dist/SvgIcon/SvgIcon.types.d.ts +0 -25
- package/dist/Tabs/Tabs.stories.d.ts +0 -6
- package/dist/Tabs/Tabs.types.d.ts +0 -21
- package/dist/TextArea/TextArea.stories.d.ts +0 -6
- package/dist/TextArea/TextArea.types.d.ts +0 -35
- package/dist/TextField/TextField.stories.d.ts +0 -6
- package/dist/TextField/TextField.types.d.ts +0 -40
- package/dist/ToolbarButton/ToolbarButton.stories.d.ts +0 -6
- package/dist/ToolbarButton/ToolbarButton.types.d.ts +0 -53
- package/dist/Tooltip/QTip.stories.d.ts +0 -6
- package/dist/Tooltip/QTipPerformance.stories.d.ts +0 -6
- package/dist/Tooltip/Tooltip.stories.d.ts +0 -6
- package/dist/Tooltip/TooltipPerformance.stories.d.ts +0 -6
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
3
|
+
export declare const svgIconTypes: readonly ["theme", "white", "dark-gray", "darkish-gray", "gray", "color", "info", "text", "warning", "inherit", "danger", "theme-light", "success", "default"];
|
|
4
|
+
export type SvgIconType = (typeof svgIconTypes)[number];
|
|
5
|
+
/**
|
|
6
|
+
* Props for the SvgIcon component that renders SVG-based icons with various styling options.
|
|
7
|
+
* Extends TooltipComponentProps to support tooltip functionality on the icon.
|
|
8
|
+
* Similar to Icon component but specifically for SVG icons instead of font icons.
|
|
9
|
+
*/
|
|
10
|
+
export interface SvgIconProps extends TooltipComponentProps {
|
|
11
|
+
/**
|
|
12
|
+
* SVG icon identifier or class name to display.
|
|
13
|
+
* This should correspond to an available SVG icon in your icon system.
|
|
14
|
+
* Examples: 'fc-zoom', 'fc-delete', 'custom-arrow'.
|
|
15
|
+
*/
|
|
16
|
+
icon: string;
|
|
17
|
+
/**
|
|
18
|
+
* Visual style type that determines the icon's color and appearance:
|
|
19
|
+
* - `default`: Uses automatic dark/light text colors based on theme
|
|
20
|
+
* - `theme`: Uses primary theme colors
|
|
21
|
+
* - `white`: Pure white color
|
|
22
|
+
* - `text`: Uses standard text color
|
|
23
|
+
* - `dark-gray`: Dark gray color
|
|
24
|
+
* - `darkish-gray`: Medium-dark gray color
|
|
25
|
+
* - `gray`: Standard gray color
|
|
26
|
+
* - `color`: Uses custom color specified in `color` prop
|
|
27
|
+
* - `info`: Blue informational color
|
|
28
|
+
* - `warning`: Yellow/orange warning color
|
|
29
|
+
* - `danger`: Red error/danger color
|
|
30
|
+
* - `success`: Green success color
|
|
31
|
+
* - `theme-light`: Lighter version of theme color
|
|
32
|
+
* - `inherit`: Inherits color from parent element
|
|
33
|
+
* @default 'default'
|
|
34
|
+
*/
|
|
35
|
+
type?: SvgIconType;
|
|
36
|
+
/**
|
|
37
|
+
* Custom color value for the icon when `type` is set to 'color'.
|
|
38
|
+
* Can be any valid CSS color (hex, rgb, color names, etc.).
|
|
39
|
+
* This property is required when type is 'color'.
|
|
40
|
+
*/
|
|
41
|
+
color?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Callback function triggered when the icon is clicked.
|
|
44
|
+
* Receives the mouse event as a parameter. Use this to make icons interactive
|
|
45
|
+
* for actions like opening menus, triggering functions, or navigation.
|
|
46
|
+
*/
|
|
47
|
+
onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => any;
|
|
48
|
+
/**
|
|
49
|
+
* Additional CSS classes to apply to the SVG icon element.
|
|
50
|
+
* Use this to customize the icon's appearance, spacing, or behavior beyond built-in options.
|
|
51
|
+
*/
|
|
52
|
+
extraClassNames?: string;
|
|
53
|
+
/**
|
|
54
|
+
* HTML ID attribute for the SVG icon element.
|
|
55
|
+
* Should be unique across the page for proper HTML semantics and accessibility.
|
|
56
|
+
*/
|
|
57
|
+
id?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Test ID attribute for the SVG icon element used in automated testing.
|
|
60
|
+
* Applied to the `data-testid` attribute for element selection in test suites.
|
|
61
|
+
*/
|
|
62
|
+
testId?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Custom identifier placed in the `data-customid` attribute on the icon element.
|
|
65
|
+
* Useful for identifying the specific icon in event handlers when multiple icons
|
|
66
|
+
* share the same click handler. Helps distinguish which icon was clicked.
|
|
67
|
+
*/
|
|
68
|
+
customId?: string;
|
|
69
|
+
/**
|
|
70
|
+
* SVG viewBox attribute that defines the coordinate system and aspect ratio.
|
|
71
|
+
* Format: "min-x min-y width height" (e.g., "0 0 24 24").
|
|
72
|
+
* If not provided, uses the default viewBox from the SVG definition.
|
|
73
|
+
* Use this to crop or scale the icon's visible area.
|
|
74
|
+
*/
|
|
75
|
+
viewBox?: string;
|
|
76
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './SvgIcon';
|
|
1
|
+
export { default } from './SvgIcon';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TabsProps } from './Tabs.types';
|
|
3
|
-
declare const Tabs: React.FunctionComponent<TabsProps>;
|
|
4
|
-
export default Tabs;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabsProps } from './Tabs.types';
|
|
3
|
+
declare const Tabs: React.FunctionComponent<TabsProps>;
|
|
4
|
+
export default Tabs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the Tabs component that creates a tabbed interface for organizing content.
|
|
4
|
+
*/
|
|
5
|
+
export interface TabsProps {
|
|
6
|
+
/**
|
|
7
|
+
* Additional CSS classes to apply to the tabs container.
|
|
8
|
+
* Use this to customize the overall appearance and layout of the tab component.
|
|
9
|
+
*/
|
|
10
|
+
extraClassNames?: string;
|
|
11
|
+
/**
|
|
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.
|
|
15
|
+
*/
|
|
16
|
+
defaultActiveTab?: string;
|
|
17
|
+
/**
|
|
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.
|
|
21
|
+
*/
|
|
22
|
+
activeTab?: string;
|
|
23
|
+
/**
|
|
24
|
+
* When true, enables smooth transitions when switching between tabs.
|
|
25
|
+
* Provides visual animation effects during tab content changes.
|
|
26
|
+
*/
|
|
27
|
+
transition?: boolean;
|
|
28
|
+
/**
|
|
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.
|
|
32
|
+
*/
|
|
33
|
+
onTabSelect?: (tabId: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* HTML ID attribute for the tabs container element.
|
|
36
|
+
* Should be unique across the page for proper HTML semantics and accessibility.
|
|
37
|
+
*/
|
|
38
|
+
id?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Test ID attribute for the tabs container used in automated testing.
|
|
41
|
+
* Applied to the main tabs component for test targeting and interaction.
|
|
42
|
+
*/
|
|
43
|
+
testId?: string;
|
|
44
|
+
/**
|
|
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.
|
|
47
|
+
*/
|
|
48
|
+
stretchTabs?: boolean;
|
|
49
|
+
/**
|
|
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.
|
|
52
|
+
*/
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './Tabs';
|
|
1
|
+
export { default } from './Tabs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextAreaProps } from './TextArea.types';
|
|
3
|
-
import '../styles.css';
|
|
4
|
-
/**
|
|
5
|
-
* TextArea.
|
|
6
|
-
*/
|
|
7
|
-
export declare const TextArea: React.FunctionComponent<TextAreaProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextAreaProps } from './TextArea.types';
|
|
3
|
+
import '../styles.css';
|
|
4
|
+
/**
|
|
5
|
+
* TextArea.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TextArea: React.FunctionComponent<TextAreaProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormControlElement } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the TextArea component that provides a multi-line text input control.
|
|
5
|
+
*/
|
|
6
|
+
export interface TextAreaProps {
|
|
7
|
+
/**
|
|
8
|
+
* Additional CSS classes to apply to the textarea element.
|
|
9
|
+
* Use this to customize the appearance beyond the default styling.
|
|
10
|
+
*/
|
|
11
|
+
extraClassNames?: string;
|
|
12
|
+
/**
|
|
13
|
+
* HTML ID attribute for the textarea element.
|
|
14
|
+
* Should be unique across the page for proper HTML semantics and accessibility.
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Name attribute for the textarea used in form submission.
|
|
19
|
+
* Identifies the textarea's data when the form is submitted to a server.
|
|
20
|
+
*/
|
|
21
|
+
name?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Callback function triggered when the textarea value changes.
|
|
24
|
+
* Receives the change event containing the new value. Use this to update
|
|
25
|
+
* your component state in controlled input scenarios.
|
|
26
|
+
*/
|
|
27
|
+
onChange?: React.ChangeEventHandler<FormControlElement>;
|
|
28
|
+
/**
|
|
29
|
+
* Callback function triggered when a key is released while the textarea has focus.
|
|
30
|
+
* Useful for implementing search-as-you-type functionality or debounced input handling.
|
|
31
|
+
*/
|
|
32
|
+
onKeyUp?: React.KeyboardEventHandler<FormControlElement>;
|
|
33
|
+
/**
|
|
34
|
+
* Callback function triggered when a key is pressed while the textarea has focus.
|
|
35
|
+
* Useful for implementing keyboard shortcuts, form submission shortcuts,
|
|
36
|
+
* or preventing certain characters from being entered.
|
|
37
|
+
*/
|
|
38
|
+
onKeyDown?: React.KeyboardEventHandler<FormControlElement>;
|
|
39
|
+
/**
|
|
40
|
+
* Callback function triggered when the textarea receives focus.
|
|
41
|
+
* Use this to handle focus-related logic such as showing hints,
|
|
42
|
+
* clearing placeholder text, or updating UI state.
|
|
43
|
+
*/
|
|
44
|
+
onFocus?: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
45
|
+
/**
|
|
46
|
+
* Callback function triggered when the textarea loses focus.
|
|
47
|
+
* Commonly used for form validation, saving draft data, or
|
|
48
|
+
* updating UI state when users finish interacting with the field.
|
|
49
|
+
*/
|
|
50
|
+
onBlur?: React.FocusEventHandler<FormControlElement>;
|
|
51
|
+
/**
|
|
52
|
+
* Placeholder text displayed when the textarea is empty.
|
|
53
|
+
* Provides users with a hint about what type of content is expected.
|
|
54
|
+
* Should be descriptive but not replace proper labels.
|
|
55
|
+
*/
|
|
56
|
+
placeholder?: string;
|
|
57
|
+
/**
|
|
58
|
+
* When true, makes the textarea read-only, preventing user input.
|
|
59
|
+
* The field will display its value but users cannot modify it. Unlike disabled fields,
|
|
60
|
+
* read-only fields can still receive focus and their values are included in form submissions.
|
|
61
|
+
*/
|
|
62
|
+
readonly?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* When true, disables the textarea preventing any user interaction.
|
|
65
|
+
* Disabled fields appear visually dimmed, cannot receive focus, and their
|
|
66
|
+
* values are not included in form submissions.
|
|
67
|
+
*/
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Number of visible text lines in the textarea.
|
|
71
|
+
* Controls the initial height of the textarea. Users can typically resize
|
|
72
|
+
* the textarea if the browser allows it.
|
|
73
|
+
* @default 3
|
|
74
|
+
*/
|
|
75
|
+
rows?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Number of visible character columns in the textarea.
|
|
78
|
+
* Controls the initial width of the textarea based on average character width.
|
|
79
|
+
* Less commonly used than CSS width styling.
|
|
80
|
+
*/
|
|
81
|
+
cols?: number;
|
|
82
|
+
/**
|
|
83
|
+
* When true, automatically focuses this textarea when the component mounts.
|
|
84
|
+
* Useful for modal dialogs or forms where immediate input is expected.
|
|
85
|
+
* Should be used sparingly to avoid accessibility issues.
|
|
86
|
+
*/
|
|
87
|
+
autoFocus?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Test ID attribute for the textarea element used in automated testing.
|
|
90
|
+
* Applied to the `data-testid` attribute for element selection in test suites.
|
|
91
|
+
*/
|
|
92
|
+
testId?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Current value of the textarea for controlled component behavior.
|
|
95
|
+
* Can be a string for text content, an array of strings for multi-value scenarios,
|
|
96
|
+
* or a number that will be converted to string. Use this for controlled input components.
|
|
97
|
+
*/
|
|
98
|
+
value?: string | string[] | number;
|
|
99
|
+
/**
|
|
100
|
+
* When true, displays error styling on the textarea.
|
|
101
|
+
* Typically changes border color to red and may add error-related visual cues.
|
|
102
|
+
* Usually used in combination with error messages to provide validation feedback.
|
|
103
|
+
*/
|
|
104
|
+
showError?: boolean;
|
|
105
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TextArea as default } from './TextArea';
|
|
1
|
+
export { TextArea as default } from './TextArea';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InputLengthStyleProps, TextFieldProps } from './TextField.types';
|
|
3
|
-
import '../styles.css';
|
|
4
|
-
/**
|
|
5
|
-
* Textfield.
|
|
6
|
-
*/
|
|
7
|
-
export declare const TextField: React.FunctionComponent<TextFieldProps & InputLengthStyleProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputLengthStyleProps, TextFieldProps } from './TextField.types';
|
|
3
|
+
import '../styles.css';
|
|
4
|
+
/**
|
|
5
|
+
* Textfield.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TextField: React.FunctionComponent<TextFieldProps & InputLengthStyleProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
3
|
+
import { FormControlElement, InputGroupPlacement } from '../types';
|
|
4
|
+
export interface TextFieldProps extends TooltipComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* When true, makes the text field read-only, preventing user input.
|
|
7
|
+
* The field will display its value but users cannot modify it. Unlike disabled fields,
|
|
8
|
+
* read-only fields can still receive focus and their values are included in form submissions.
|
|
9
|
+
*/
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* When true, disables the text field preventing any user interaction.
|
|
13
|
+
* Disabled fields appear visually dimmed, cannot receive focus, and their
|
|
14
|
+
* values are not included in form submissions.
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Callback function triggered when the text field value changes.
|
|
19
|
+
* Receives the change event containing the new value. Use this to update
|
|
20
|
+
* your component state in controlled input scenarios.
|
|
21
|
+
*/
|
|
22
|
+
onChange?: React.ChangeEventHandler<FormControlElement>;
|
|
23
|
+
/**
|
|
24
|
+
* Callback function triggered when a key is released while the field has focus.
|
|
25
|
+
* Useful for implementing search-as-you-type functionality or debounced input handling.
|
|
26
|
+
* Receives the keyboard event with details about the released key.
|
|
27
|
+
*/
|
|
28
|
+
onKeyUp?: React.KeyboardEventHandler<FormControlElement>;
|
|
29
|
+
/**
|
|
30
|
+
* Callback function triggered when a key is pressed while the field has focus.
|
|
31
|
+
* Useful for implementing keyboard shortcuts, form submission on Enter,
|
|
32
|
+
* or preventing certain characters from being entered.
|
|
33
|
+
*/
|
|
34
|
+
onKeyDown?: React.KeyboardEventHandler<FormControlElement>;
|
|
35
|
+
/**
|
|
36
|
+
* Callback function triggered when the text field receives focus.
|
|
37
|
+
* Use this to handle focus-related logic such as showing hints,
|
|
38
|
+
* clearing placeholder text, or updating UI state.
|
|
39
|
+
*/
|
|
40
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
41
|
+
/**
|
|
42
|
+
* Callback function triggered when the text field loses focus.
|
|
43
|
+
* Commonly used for form validation, saving draft data, or
|
|
44
|
+
* updating UI state when users finish interacting with the field.
|
|
45
|
+
*/
|
|
46
|
+
onBlur?: React.FocusEventHandler<FormControlElement>;
|
|
47
|
+
/**
|
|
48
|
+
* HTML ID attribute for the text field element.
|
|
49
|
+
* Should be unique across the entire page for proper HTML semantics and accessibility.
|
|
50
|
+
* Used for associating labels and error messages with the input field.
|
|
51
|
+
*/
|
|
52
|
+
id?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Name attribute for the text field used in form submission.
|
|
55
|
+
* This identifies the field's data when the form is submitted to a server.
|
|
56
|
+
* Essential for proper form handling and data processing.
|
|
57
|
+
*/
|
|
58
|
+
name?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Size variant that controls the text field's height and text size:
|
|
61
|
+
* - `sm`: Small field with compact padding and smaller text
|
|
62
|
+
* - `lg`: Large field with generous padding and larger text
|
|
63
|
+
* If not specified, uses the default/medium size.
|
|
64
|
+
*/
|
|
65
|
+
size?: 'sm' | 'lg';
|
|
66
|
+
/**
|
|
67
|
+
* The current value of the text field.
|
|
68
|
+
* Can be a string for text input, an array of strings for multi-value fields,
|
|
69
|
+
* or a number for numeric inputs. Use this for controlled input components.
|
|
70
|
+
*/
|
|
71
|
+
value?: string | string[] | number;
|
|
72
|
+
/**
|
|
73
|
+
* Placeholder text displayed when the field is empty.
|
|
74
|
+
* Provides users with a hint about what type of content is expected.
|
|
75
|
+
* Should be descriptive but not replace proper labels.
|
|
76
|
+
*/
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Additional CSS classes to apply to the text field element.
|
|
80
|
+
* These classes are combined with the component's built-in styling.
|
|
81
|
+
* Use this to customize appearance beyond the standard size variants.
|
|
82
|
+
*/
|
|
83
|
+
extraClassNames?: string;
|
|
84
|
+
/**
|
|
85
|
+
* HTML input type that determines the field's behavior and validation:
|
|
86
|
+
* - `text`: Standard text input (default)
|
|
87
|
+
* - `password`: Obscures entered text for security
|
|
88
|
+
* - `number`: Numeric input with increment/decrement controls
|
|
89
|
+
* - `email`: Email input with built-in email validation
|
|
90
|
+
* @default 'text'
|
|
91
|
+
*/
|
|
92
|
+
type?: 'text' | 'password' | 'number' | 'email';
|
|
93
|
+
/**
|
|
94
|
+
* Test ID attribute for the text field element used in automated testing.
|
|
95
|
+
* Applied to the `data-testid` attribute for element selection in test suites.
|
|
96
|
+
*/
|
|
97
|
+
testId?: string;
|
|
98
|
+
/**
|
|
99
|
+
* React ref object for direct access to the text field DOM element.
|
|
100
|
+
* Use this when you need to programmatically focus the field,
|
|
101
|
+
* measure its dimensions, or perform other direct DOM operations.
|
|
102
|
+
*/
|
|
103
|
+
ref?: any;
|
|
104
|
+
/**
|
|
105
|
+
* Configuration for input group styling when the field is part of a group:
|
|
106
|
+
* - `prepend`: Field is preceded by another element (button, icon, text)
|
|
107
|
+
* - `append`: Field is followed by another element
|
|
108
|
+
* Affects border radius and styling to create seamless grouped appearance.
|
|
109
|
+
*/
|
|
110
|
+
inputGroup?: InputGroupPlacement;
|
|
111
|
+
/**
|
|
112
|
+
* Step value for numeric input types that defines the increment/decrement amount.
|
|
113
|
+
* When users click the number input's up/down arrows or use arrow keys,
|
|
114
|
+
* the value changes by this step amount. Can be a number or string.
|
|
115
|
+
*/
|
|
116
|
+
step?: number | string;
|
|
117
|
+
/**
|
|
118
|
+
* When true, displays error styling on the text field.
|
|
119
|
+
* Typically changes border color to red and may add error-related visual cues.
|
|
120
|
+
* Usually used in combination with `errorText` to provide validation feedback.
|
|
121
|
+
*/
|
|
122
|
+
showError?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Error message text to display below the field when validation fails.
|
|
125
|
+
* Provides specific feedback about what the user needs to correct.
|
|
126
|
+
* Only shown when there's an actual error to communicate.
|
|
127
|
+
*/
|
|
128
|
+
errorText?: string;
|
|
129
|
+
/**
|
|
130
|
+
* When true, marks the field as required for form validation.
|
|
131
|
+
* May add visual indicators (like asterisks) and prevents form submission
|
|
132
|
+
* if the field is empty. Essential for mandatory form fields.
|
|
133
|
+
*/
|
|
134
|
+
required?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* HTML autocomplete attribute that helps browsers provide appropriate suggestions.
|
|
137
|
+
* Values like 'email', 'name', 'new-password', 'current-password', etc.
|
|
138
|
+
* Improves user experience by enabling relevant autocomplete functionality.
|
|
139
|
+
*/
|
|
140
|
+
autoComplete?: string;
|
|
141
|
+
/**
|
|
142
|
+
* When true, automatically focuses this field when the component mounts.
|
|
143
|
+
* Useful for modal dialogs or forms where immediate input is expected.
|
|
144
|
+
* Should be used sparingly to avoid accessibility issues.
|
|
145
|
+
*/
|
|
146
|
+
autoFocus?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Fixed width in pixels for the text field input element.
|
|
149
|
+
* Primarily used in the Editable Text component for precise sizing control.
|
|
150
|
+
* Overrides default responsive width behavior when a specific width is needed.
|
|
151
|
+
*/
|
|
152
|
+
inputWidth?: number;
|
|
153
|
+
/**
|
|
154
|
+
* Fixed height in pixels for the text field input element.
|
|
155
|
+
* Primarily used in the Editable Text component for precise sizing control.
|
|
156
|
+
* Overrides default height behavior when a specific height is needed.
|
|
157
|
+
*/
|
|
158
|
+
inputHeight?: number;
|
|
159
|
+
/**
|
|
160
|
+
* Minimum allowed value for numeric, date, time, and range input types.
|
|
161
|
+
* Prevents users from entering or selecting values below this threshold.
|
|
162
|
+
* Used for validation and UI constraints in number-based inputs.
|
|
163
|
+
*/
|
|
164
|
+
min?: number;
|
|
165
|
+
/**
|
|
166
|
+
* Maximum allowed value for numeric, date, time, and range input types.
|
|
167
|
+
* Prevents users from entering or selecting values above this threshold.
|
|
168
|
+
* Used for validation and UI constraints in number-based inputs.
|
|
169
|
+
*/
|
|
170
|
+
max?: number;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Interface for defining dimension styles with CSS-compatible values.
|
|
174
|
+
* Used internally for styling components with dynamic width and height.
|
|
175
|
+
*/
|
|
176
|
+
export interface DimensionStyle {
|
|
177
|
+
/** CSS width value (e.g., '100px', '50%', 'auto') */
|
|
178
|
+
width?: string;
|
|
179
|
+
/** CSS height value (e.g., '40px', '2rem', 'auto') */
|
|
180
|
+
height?: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Interface for defining text input length constraints.
|
|
184
|
+
* Used for validation and input limiting in text-based fields.
|
|
185
|
+
*/
|
|
186
|
+
export interface InputLengthStyleProps {
|
|
187
|
+
/**
|
|
188
|
+
* Maximum number of characters allowed in the text field.
|
|
189
|
+
* Prevents users from entering more text beyond this limit.
|
|
190
|
+
* Useful for database field constraints and UI consistency.
|
|
191
|
+
*/
|
|
192
|
+
maxLength?: number;
|
|
193
|
+
/**
|
|
194
|
+
* Minimum number of characters required in the text field.
|
|
195
|
+
* Used for validation to ensure adequate input length.
|
|
196
|
+
* Commonly used for passwords, codes, or required descriptions.
|
|
197
|
+
*/
|
|
198
|
+
minLength?: number;
|
|
199
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TextField as default } from './TextField';
|
|
1
|
+
export { TextField as default } from './TextField';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ToolbarButtonProps } from './ToolbarButton.types';
|
|
3
|
-
export declare const ToolbarButton: React.FunctionComponent<ToolbarButtonProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ToolbarButtonProps } from './ToolbarButton.types';
|
|
3
|
+
export declare const ToolbarButton: React.FunctionComponent<ToolbarButtonProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
1
|
+
import '@testing-library/jest-dom';
|