@seeqdev/qomponents 0.0.183 → 0.0.184
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/README.md +5 -19
- package/dist/example/.eslintrc.cjs +2 -6
- package/dist/example/README.md +0 -3
- package/dist/example/src/Example.tsx +7 -7
- package/dist/example/tsconfig.json +2 -8
- package/dist/example/tsconfig.node.json +1 -3
- package/dist/example/vite.config.ts +1 -1
- package/dist/index.esm.js +784 -523
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +781 -520
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3410 -2791
- package/package.json +12 -13
- package/dist/src/Accordion/Accordion.d.ts +0 -4
- package/dist/src/Accordion/Accordion.stories.d.ts +0 -5
- package/dist/src/Accordion/Accordion.test.d.ts +0 -1
- package/dist/src/Accordion/Accordion.types.d.ts +0 -86
- package/dist/src/Accordion/index.d.ts +0 -1
- package/dist/src/Alert/Alert.d.ts +0 -7
- package/dist/src/Alert/Alert.stories.d.ts +0 -6
- package/dist/src/Alert/Alert.test.d.ts +0 -1
- package/dist/src/Alert/Alert.types.d.ts +0 -62
- package/dist/src/Alert/index.d.ts +0 -1
- package/dist/src/Button/Button.d.ts +0 -10
- package/dist/src/Button/Button.stories.d.ts +0 -9
- package/dist/src/Button/Button.test.d.ts +0 -1
- package/dist/src/Button/Button.types.d.ts +0 -148
- package/dist/src/Button/index.d.ts +0 -1
- package/dist/src/ButtonGroup/ButtonGroup.d.ts +0 -7
- package/dist/src/ButtonGroup/ButtonGroup.stories.d.ts +0 -5
- package/dist/src/ButtonGroup/ButtonGroup.test.d.ts +0 -1
- package/dist/src/ButtonGroup/ButtonGroup.types.d.ts +0 -80
- package/dist/src/ButtonGroup/index.d.ts +0 -1
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.d.ts +0 -4
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +0 -5
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.test.d.ts +0 -1
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +0 -232
- package/dist/src/ButtonWithDropdown/index.d.ts +0 -1
- package/dist/src/ButtonWithPopover/ButtonWithPopover.d.ts +0 -4
- package/dist/src/ButtonWithPopover/ButtonWithPopover.stories.d.ts +0 -5
- package/dist/src/ButtonWithPopover/ButtonWithPopover.test.d.ts +0 -1
- package/dist/src/ButtonWithPopover/ButtonWithPopover.types.d.ts +0 -134
- package/dist/src/ButtonWithPopover/index.d.ts +0 -1
- package/dist/src/Carousel/Carousel.d.ts +0 -9
- package/dist/src/Carousel/Carousel.stories.d.ts +0 -5
- package/dist/src/Carousel/Carousel.test.d.ts +0 -1
- package/dist/src/Carousel/Carousel.types.d.ts +0 -85
- package/dist/src/Carousel/index.d.ts +0 -1
- package/dist/src/Checkbox/Checkbox.d.ts +0 -7
- package/dist/src/Checkbox/Checkbox.stories.d.ts +0 -5
- package/dist/src/Checkbox/Checkbox.test.d.ts +0 -1
- package/dist/src/Checkbox/Checkbox.types.d.ts +0 -91
- package/dist/src/Checkbox/index.d.ts +0 -1
- package/dist/src/Collapse/Collapse.d.ts +0 -4
- package/dist/src/Collapse/Collapse.stories.d.ts +0 -5
- package/dist/src/Collapse/Collapse.test.d.ts +0 -1
- package/dist/src/Collapse/Collapse.types.d.ts +0 -18
- package/dist/src/Collapse/index.d.ts +0 -1
- package/dist/src/Icon/Icon.d.ts +0 -10
- package/dist/src/Icon/Icon.stories.d.ts +0 -5
- package/dist/src/Icon/Icon.test.d.ts +0 -1
- package/dist/src/Icon/Icon.types.d.ts +0 -90
- package/dist/src/Icon/index.d.ts +0 -1
- package/dist/src/InputGroup/InputGroup.d.ts +0 -7
- package/dist/src/InputGroup/InputGroup.stories.d.ts +0 -5
- package/dist/src/InputGroup/InputGroup.test.d.ts +0 -1
- package/dist/src/InputGroup/InputGroup.types.d.ts +0 -61
- package/dist/src/InputGroup/index.d.ts +0 -2
- package/dist/src/Modal/Modal.d.ts +0 -5
- package/dist/src/Modal/Modal.stories.d.ts +0 -10
- package/dist/src/Modal/Modal.test.d.ts +0 -1
- package/dist/src/Modal/Modal.types.d.ts +0 -244
- package/dist/src/Modal/index.d.ts +0 -1
- package/dist/src/ProgressBar/ProgressBar.d.ts +0 -4
- package/dist/src/ProgressBar/ProgressBar.stories.d.ts +0 -5
- package/dist/src/ProgressBar/ProgressBar.test.d.ts +0 -1
- package/dist/src/ProgressBar/ProgressBar.types.d.ts +0 -77
- package/dist/src/ProgressBar/index.d.ts +0 -1
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.d.ts +0 -4
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +0 -5
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.test.d.ts +0 -1
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +0 -164
- package/dist/src/SeeqActionDropdown/index.d.ts +0 -1
- package/dist/src/SeeqActionDropdown/variants.d.ts +0 -5
- package/dist/src/Select/Select.d.ts +0 -15
- package/dist/src/Select/Select.stories.d.ts +0 -5
- package/dist/src/Select/Select.test.d.ts +0 -1
- package/dist/src/Select/Select.types.d.ts +0 -220
- package/dist/src/Select/index.d.ts +0 -2
- package/dist/src/Slider/Slider.d.ts +0 -6
- package/dist/src/Slider/Slider.stories.d.ts +0 -5
- package/dist/src/Slider/Slider.test.d.ts +0 -1
- package/dist/src/Slider/Slider.types.d.ts +0 -84
- package/dist/src/Slider/index.d.ts +0 -1
- package/dist/src/SvgIcon/SvgIcon.d.ts +0 -20
- package/dist/src/SvgIcon/SvgIcon.stories.d.ts +0 -5
- package/dist/src/SvgIcon/SvgIcon.test.d.ts +0 -1
- package/dist/src/SvgIcon/SvgIcon.types.d.ts +0 -75
- package/dist/src/SvgIcon/index.d.ts +0 -1
- package/dist/src/Tabs/Tabs.d.ts +0 -4
- package/dist/src/Tabs/Tabs.stories.d.ts +0 -5
- package/dist/src/Tabs/Tabs.test.d.ts +0 -1
- package/dist/src/Tabs/Tabs.types.d.ts +0 -100
- package/dist/src/Tabs/index.d.ts +0 -1
- package/dist/src/TextArea/TextArea.d.ts +0 -7
- package/dist/src/TextArea/TextArea.stories.d.ts +0 -5
- package/dist/src/TextArea/TextArea.test.d.ts +0 -1
- package/dist/src/TextArea/TextArea.types.d.ts +0 -115
- package/dist/src/TextArea/index.d.ts +0 -1
- package/dist/src/TextField/TextField.d.ts +0 -7
- package/dist/src/TextField/TextField.stories.d.ts +0 -5
- package/dist/src/TextField/TextField.test.d.ts +0 -1
- package/dist/src/TextField/TextField.types.d.ts +0 -198
- package/dist/src/TextField/index.d.ts +0 -1
- package/dist/src/ToolbarButton/ToolbarButton.d.ts +0 -3
- package/dist/src/ToolbarButton/ToolbarButton.stories.d.ts +0 -5
- package/dist/src/ToolbarButton/ToolbarButton.test.d.ts +0 -1
- package/dist/src/ToolbarButton/ToolbarButton.types.d.ts +0 -122
- package/dist/src/ToolbarButton/index.d.ts +0 -1
- package/dist/src/Tooltip/QTip.stories.d.ts +0 -5
- package/dist/src/Tooltip/QTip.types.d.ts +0 -13
- package/dist/src/Tooltip/QTipPerformance.stories.d.ts +0 -5
- package/dist/src/Tooltip/Qtip.d.ts +0 -26
- package/dist/src/Tooltip/Tooltip.d.ts +0 -13
- package/dist/src/Tooltip/Tooltip.stories.d.ts +0 -5
- package/dist/src/Tooltip/Tooltip.types.d.ts +0 -22
- package/dist/src/Tooltip/TooltipPerformance.stories.d.ts +0 -5
- package/dist/src/Tooltip/index.d.ts +0 -2
- package/dist/src/Tooltip/qTip.utilities.d.ts +0 -3
- package/dist/src/index.d.ts +0 -46
- package/dist/src/setupTests.d.ts +0 -1
- package/dist/src/types.d.ts +0 -27
- package/dist/src/utils/browserId.d.ts +0 -9
- package/dist/src/utils/svg.d.ts +0 -15
- package/dist/src/utils/validateStyleDimension.d.ts +0 -2
- package/dist/src/utils/validateStyleDimension.test.d.ts +0 -1
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
* 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
|
-
}[];
|
|
100
|
-
}
|
package/dist/src/Tabs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Tabs';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { FormControlElement } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Props for the TextArea component that provides a multi-line text input control.
|
|
4
|
-
*/
|
|
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>;
|
|
115
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TextArea as default } from './TextArea';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
2
|
-
import { FormControlElement, InputGroupPlacement } from '../types';
|
|
3
|
-
export interface TextFieldProps extends TooltipComponentProps {
|
|
4
|
-
/**
|
|
5
|
-
* When true, makes the text field read-only, preventing user input.
|
|
6
|
-
* The field will display its value but users cannot modify it. Unlike disabled fields,
|
|
7
|
-
* read-only fields can still receive focus and their values are included in form submissions.
|
|
8
|
-
*/
|
|
9
|
-
readonly?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* When true, disables the text field preventing any user interaction.
|
|
12
|
-
* Disabled fields appear visually dimmed, cannot receive focus, and their
|
|
13
|
-
* values are not included in form submissions.
|
|
14
|
-
*/
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Callback function triggered when the text field value changes.
|
|
18
|
-
* Receives the change event containing the new value. Use this to update
|
|
19
|
-
* your component state in controlled input scenarios.
|
|
20
|
-
*/
|
|
21
|
-
onChange?: React.ChangeEventHandler<FormControlElement>;
|
|
22
|
-
/**
|
|
23
|
-
* Callback function triggered when a key is released while the field has focus.
|
|
24
|
-
* Useful for implementing search-as-you-type functionality or debounced input handling.
|
|
25
|
-
* Receives the keyboard event with details about the released key.
|
|
26
|
-
*/
|
|
27
|
-
onKeyUp?: React.KeyboardEventHandler<FormControlElement>;
|
|
28
|
-
/**
|
|
29
|
-
* Callback function triggered when a key is pressed while the field has focus.
|
|
30
|
-
* Useful for implementing keyboard shortcuts, form submission on Enter,
|
|
31
|
-
* or preventing certain characters from being entered.
|
|
32
|
-
*/
|
|
33
|
-
onKeyDown?: React.KeyboardEventHandler<FormControlElement>;
|
|
34
|
-
/**
|
|
35
|
-
* Callback function triggered when the text field receives focus.
|
|
36
|
-
* Use this to handle focus-related logic such as showing hints,
|
|
37
|
-
* clearing placeholder text, or updating UI state.
|
|
38
|
-
*/
|
|
39
|
-
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
40
|
-
/**
|
|
41
|
-
* Callback function triggered when the text field loses focus.
|
|
42
|
-
* Commonly used for form validation, saving draft data, or
|
|
43
|
-
* updating UI state when users finish interacting with the field.
|
|
44
|
-
*/
|
|
45
|
-
onBlur?: React.FocusEventHandler<FormControlElement>;
|
|
46
|
-
/**
|
|
47
|
-
* HTML ID attribute for the text field element.
|
|
48
|
-
* Should be unique across the entire page for proper HTML semantics and accessibility.
|
|
49
|
-
* Used for associating labels and error messages with the input field.
|
|
50
|
-
*/
|
|
51
|
-
id?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Name attribute for the text field used in form submission.
|
|
54
|
-
* This identifies the field's data when the form is submitted to a server.
|
|
55
|
-
* Essential for proper form handling and data processing.
|
|
56
|
-
*/
|
|
57
|
-
name?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Size variant that controls the text field's height and text size:
|
|
60
|
-
* - `sm`: Small field with compact padding and smaller text
|
|
61
|
-
* - `lg`: Large field with generous padding and larger text
|
|
62
|
-
* If not specified, uses the default/medium size.
|
|
63
|
-
*/
|
|
64
|
-
size?: 'sm' | 'lg';
|
|
65
|
-
/**
|
|
66
|
-
* The current value of the text field.
|
|
67
|
-
* Can be a string for text input, an array of strings for multi-value fields,
|
|
68
|
-
* or a number for numeric inputs. Use this for controlled input components.
|
|
69
|
-
*/
|
|
70
|
-
value?: string | string[] | number;
|
|
71
|
-
/**
|
|
72
|
-
* Placeholder text displayed when the field is empty.
|
|
73
|
-
* Provides users with a hint about what type of content is expected.
|
|
74
|
-
* Should be descriptive but not replace proper labels.
|
|
75
|
-
*/
|
|
76
|
-
placeholder?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Additional CSS classes to apply to the text field element.
|
|
79
|
-
* These classes are combined with the component's built-in styling.
|
|
80
|
-
* Use this to customize appearance beyond the standard size variants.
|
|
81
|
-
*/
|
|
82
|
-
extraClassNames?: string;
|
|
83
|
-
/**
|
|
84
|
-
* HTML input type that determines the field's behavior and validation:
|
|
85
|
-
* - `text`: Standard text input (default)
|
|
86
|
-
* - `password`: Obscures entered text for security
|
|
87
|
-
* - `number`: Numeric input with increment/decrement controls
|
|
88
|
-
* - `email`: Email input with built-in email validation
|
|
89
|
-
* @default 'text'
|
|
90
|
-
*/
|
|
91
|
-
type?: 'text' | 'password' | 'number' | 'email';
|
|
92
|
-
/**
|
|
93
|
-
* Test ID attribute for the text field element used in automated testing.
|
|
94
|
-
* Applied to the `data-testid` attribute for element selection in test suites.
|
|
95
|
-
*/
|
|
96
|
-
testId?: string;
|
|
97
|
-
/**
|
|
98
|
-
* React ref object for direct access to the text field DOM element.
|
|
99
|
-
* Use this when you need to programmatically focus the field,
|
|
100
|
-
* measure its dimensions, or perform other direct DOM operations.
|
|
101
|
-
*/
|
|
102
|
-
ref?: any;
|
|
103
|
-
/**
|
|
104
|
-
* Configuration for input group styling when the field is part of a group:
|
|
105
|
-
* - `prepend`: Field is preceded by another element (button, icon, text)
|
|
106
|
-
* - `append`: Field is followed by another element
|
|
107
|
-
* Affects border radius and styling to create seamless grouped appearance.
|
|
108
|
-
*/
|
|
109
|
-
inputGroup?: InputGroupPlacement;
|
|
110
|
-
/**
|
|
111
|
-
* Step value for numeric input types that defines the increment/decrement amount.
|
|
112
|
-
* When users click the number input's up/down arrows or use arrow keys,
|
|
113
|
-
* the value changes by this step amount. Can be a number or string.
|
|
114
|
-
*/
|
|
115
|
-
step?: number | string;
|
|
116
|
-
/**
|
|
117
|
-
* When true, displays error styling on the text field.
|
|
118
|
-
* Typically changes border color to red and may add error-related visual cues.
|
|
119
|
-
* Usually used in combination with `errorText` to provide validation feedback.
|
|
120
|
-
*/
|
|
121
|
-
showError?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Error message text to display below the field when validation fails.
|
|
124
|
-
* Provides specific feedback about what the user needs to correct.
|
|
125
|
-
* Only shown when there's an actual error to communicate.
|
|
126
|
-
*/
|
|
127
|
-
errorText?: string;
|
|
128
|
-
/**
|
|
129
|
-
* When true, marks the field as required for form validation.
|
|
130
|
-
* May add visual indicators (like asterisks) and prevents form submission
|
|
131
|
-
* if the field is empty. Essential for mandatory form fields.
|
|
132
|
-
*/
|
|
133
|
-
required?: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* HTML autocomplete attribute that helps browsers provide appropriate suggestions.
|
|
136
|
-
* Values like 'email', 'name', 'new-password', 'current-password', etc.
|
|
137
|
-
* Improves user experience by enabling relevant autocomplete functionality.
|
|
138
|
-
*/
|
|
139
|
-
autoComplete?: string;
|
|
140
|
-
/**
|
|
141
|
-
* When true, automatically focuses this field when the component mounts.
|
|
142
|
-
* Useful for modal dialogs or forms where immediate input is expected.
|
|
143
|
-
* Should be used sparingly to avoid accessibility issues.
|
|
144
|
-
*/
|
|
145
|
-
autoFocus?: boolean;
|
|
146
|
-
/**
|
|
147
|
-
* Fixed width in pixels for the text field input element.
|
|
148
|
-
* Primarily used in the Editable Text component for precise sizing control.
|
|
149
|
-
* Overrides default responsive width behavior when a specific width is needed.
|
|
150
|
-
*/
|
|
151
|
-
inputWidth?: number;
|
|
152
|
-
/**
|
|
153
|
-
* Fixed height in pixels for the text field input element.
|
|
154
|
-
* Primarily used in the Editable Text component for precise sizing control.
|
|
155
|
-
* Overrides default height behavior when a specific height is needed.
|
|
156
|
-
*/
|
|
157
|
-
inputHeight?: number;
|
|
158
|
-
/**
|
|
159
|
-
* Minimum allowed value for numeric, date, time, and range input types.
|
|
160
|
-
* Prevents users from entering or selecting values below this threshold.
|
|
161
|
-
* Used for validation and UI constraints in number-based inputs.
|
|
162
|
-
*/
|
|
163
|
-
min?: number;
|
|
164
|
-
/**
|
|
165
|
-
* Maximum allowed value for numeric, date, time, and range input types.
|
|
166
|
-
* Prevents users from entering or selecting values above this threshold.
|
|
167
|
-
* Used for validation and UI constraints in number-based inputs.
|
|
168
|
-
*/
|
|
169
|
-
max?: number;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Interface for defining dimension styles with CSS-compatible values.
|
|
173
|
-
* Used internally for styling components with dynamic width and height.
|
|
174
|
-
*/
|
|
175
|
-
export interface DimensionStyle {
|
|
176
|
-
/** CSS width value (e.g., '100px', '50%', 'auto') */
|
|
177
|
-
width?: string;
|
|
178
|
-
/** CSS height value (e.g., '40px', '2rem', 'auto') */
|
|
179
|
-
height?: string;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Interface for defining text input length constraints.
|
|
183
|
-
* Used for validation and input limiting in text-based fields.
|
|
184
|
-
*/
|
|
185
|
-
export interface InputLengthStyleProps {
|
|
186
|
-
/**
|
|
187
|
-
* Maximum number of characters allowed in the text field.
|
|
188
|
-
* Prevents users from entering more text beyond this limit.
|
|
189
|
-
* Useful for database field constraints and UI consistency.
|
|
190
|
-
*/
|
|
191
|
-
maxLength?: number;
|
|
192
|
-
/**
|
|
193
|
-
* Minimum number of characters required in the text field.
|
|
194
|
-
* Used for validation to ensure adequate input length.
|
|
195
|
-
* Commonly used for passwords, codes, or required descriptions.
|
|
196
|
-
*/
|
|
197
|
-
minLength?: number;
|
|
198
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TextField as default } from './TextField';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import React, { MouseEvent } from 'react';
|
|
2
|
-
import { TooltipProps } from '../Tooltip/Tooltip.types';
|
|
3
|
-
export declare const toolbarButtonVariants: readonly ["outline", "theme", "theme-light", "warning", "danger", "no-border"];
|
|
4
|
-
export type ToolbarButtonVariant = (typeof toolbarButtonVariants)[number];
|
|
5
|
-
/**
|
|
6
|
-
* Props for the ToolbarButton component that creates toolbar-style buttons with optional popovers.
|
|
7
|
-
* Designed for use in toolbars, action bars, and similar UI contexts.
|
|
8
|
-
*/
|
|
9
|
-
export interface ToolbarButtonProps {
|
|
10
|
-
/**
|
|
11
|
-
* Primary icon class name to display on the button.
|
|
12
|
-
* Typically uses FontAwesome classes (e.g., 'fc-zoom', 'fc-delete').
|
|
13
|
-
* This is the main visual identifier for the button's function.
|
|
14
|
-
*/
|
|
15
|
-
icon: string;
|
|
16
|
-
/**
|
|
17
|
-
* Secondary icon class name to display alongside the primary icon.
|
|
18
|
-
* Useful for showing state indicators, badges, or additional context.
|
|
19
|
-
*/
|
|
20
|
-
secondIcon?: string;
|
|
21
|
-
/**
|
|
22
|
-
* When true, forces the primary icon to render in a smaller size.
|
|
23
|
-
* Overrides automatic sizing based on button variant or layout.
|
|
24
|
-
*/
|
|
25
|
-
forceSmallIcon?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Text label for the toolbar button.
|
|
28
|
-
* Typically shown when the toolbar has sufficient width or in expanded states.
|
|
29
|
-
* Helps users understand the button's function when icons alone aren't clear.
|
|
30
|
-
*/
|
|
31
|
-
label?: string;
|
|
32
|
-
/**
|
|
33
|
-
* React content to display in an attached popover when the button is clicked.
|
|
34
|
-
* Can be any React elements including forms, menus, or complex layouts.
|
|
35
|
-
* When provided, the button becomes a popover trigger.
|
|
36
|
-
*/
|
|
37
|
-
popoverContent?: React.ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* When true, renders the button in a compact, icon-only mode.
|
|
40
|
-
* Hides the label even if provided and uses minimal padding for space-constrained layouts.
|
|
41
|
-
*/
|
|
42
|
-
isSmall?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* HTML ID attribute for the toolbar button element.
|
|
45
|
-
* Should be unique across the page for proper HTML semantics and accessibility.
|
|
46
|
-
*/
|
|
47
|
-
id?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Additional CSS classes to apply to the toolbar button container.
|
|
50
|
-
* Use this to customize the button's appearance beyond the built-in variants.
|
|
51
|
-
*/
|
|
52
|
-
extraClassNames?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Test ID attribute for the toolbar button element used in automated testing.
|
|
55
|
-
* Applied to the button element for test targeting and interaction.
|
|
56
|
-
*/
|
|
57
|
-
testId?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Text to display in the button's tooltip when hovering.
|
|
60
|
-
* Provides additional context or instructions about the button's function.
|
|
61
|
-
*/
|
|
62
|
-
tooltipText?: string;
|
|
63
|
-
/**
|
|
64
|
-
* When true, the tooltip text is rendered as HTML allowing for rich content.
|
|
65
|
-
* When false (default), the tooltip text is treated as plain text for security.
|
|
66
|
-
* Only set to true if you trust the tooltip content source.
|
|
67
|
-
*/
|
|
68
|
-
isHtmlTooltip?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Test ID attribute specifically for the tooltip element used in automated testing.
|
|
71
|
-
* Helps identify and interact with the tooltip separately from the button.
|
|
72
|
-
*/
|
|
73
|
-
tooltipTestId?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Configuration options for customizing tooltip behavior and appearance.
|
|
76
|
-
* Omits the 'text' property since that's handled by the `tooltipText` prop.
|
|
77
|
-
* Includes options like position, delay, and other tooltip-specific settings.
|
|
78
|
-
*/
|
|
79
|
-
tooltipOptions?: Omit<TooltipProps, 'text'>;
|
|
80
|
-
/**
|
|
81
|
-
* When true, disables the toolbar button preventing user interaction.
|
|
82
|
-
* Disabled buttons appear visually dimmed and don't respond to clicks or show popovers.
|
|
83
|
-
*/
|
|
84
|
-
disabled?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Callback function triggered when the toolbar button is clicked.
|
|
87
|
-
* Primarily used for tracking, analytics, or additional click handling.
|
|
88
|
-
* Note: this doesn't prevent popover opening if popoverContent is provided.
|
|
89
|
-
*/
|
|
90
|
-
onClick?: (e: MouseEvent) => void;
|
|
91
|
-
/**
|
|
92
|
-
* When true, displays the button in an "active" or "pressed" visual state.
|
|
93
|
-
* Useful for toggle buttons or indicating the current tool/mode in a toolbar.
|
|
94
|
-
*/
|
|
95
|
-
isActive?: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Callback function triggered when an attached popover is hidden/closed.
|
|
98
|
-
* Use this for cleanup, state management, or other hide-related side effects.
|
|
99
|
-
*/
|
|
100
|
-
onHide?: () => void;
|
|
101
|
-
/**
|
|
102
|
-
* When true, displays a visual arrow on the button indicating it has a dropdown/popover.
|
|
103
|
-
* Helps users understand that clicking will reveal additional options or content.
|
|
104
|
-
*/
|
|
105
|
-
hasArrow?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* When true, treats the primary icon string as an SVG identifier instead of a font icon class.
|
|
108
|
-
* Changes how the icon is rendered and styled within the component.
|
|
109
|
-
*/
|
|
110
|
-
isPrimaryAnSvg?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* Additional CSS classes to apply specifically to the primary icon element.
|
|
113
|
-
* Use this to customize the icon's appearance independently from the button container.
|
|
114
|
-
*/
|
|
115
|
-
primaryIconExtraClassNames?: string;
|
|
116
|
-
/** height for the icon */
|
|
117
|
-
iconHeight?: number;
|
|
118
|
-
/** width for the icon */
|
|
119
|
-
iconWidth?: number;
|
|
120
|
-
/** viewbox for the icon */
|
|
121
|
-
primaryIconViewbox?: string;
|
|
122
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ToolbarButton as default } from './ToolbarButton';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TooltipPosition } from './Tooltip.types';
|
|
2
|
-
export interface QTipDataAttributes {
|
|
3
|
-
/** text displayed by the tooltip */
|
|
4
|
-
'data-qtip-text': string;
|
|
5
|
-
/** one of TooltipPosition */
|
|
6
|
-
'data-qtip-placement'?: TooltipPosition;
|
|
7
|
-
/** set to true to render the provided text as html */
|
|
8
|
-
'data-qtip-is-html'?: boolean;
|
|
9
|
-
/** number of milliseconds to wait before showing a tooltip on-hover */
|
|
10
|
-
'data-qtip-delay'?: number;
|
|
11
|
-
/** useful for testing; sets the provided string as the data-testid attribute of the tooltip */
|
|
12
|
-
'data-qtip-testid'?: string;
|
|
13
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* QTip
|
|
4
|
-
*
|
|
5
|
-
* QTip is a Singleton Tooltip component that guarantees high-performance and reduces component wrappers!
|
|
6
|
-
*
|
|
7
|
-
* QTip is used by all qomponents that support the display of tooltips.
|
|
8
|
-
* If you want to add a Tooltip to your application you can do so by adding the following html data-attributes:
|
|
9
|
-
*
|
|
10
|
-
* 'data-qtip-text': the tooltip text to display; this can also be a string containing valid HTML
|
|
11
|
-
* 'data-qtip-placement': one of TooltipPosition (top, bottom, right, or left)
|
|
12
|
-
* 'data-qtip-is-html': set this to true if you provided a text that contains HTML,
|
|
13
|
-
* 'data-qtip-delay': this can be used to delay the showing of the tooltip. this should be a number representing
|
|
14
|
-
* the # of milliseconds you want to delay the tooltip for. If no delay is provided the DEFAULT_TOOL_TIP_DELAY is
|
|
15
|
-
* applied!
|
|
16
|
-
* 'data-qtip-testid': use this attribute to provide a value for a data-testid of your tooltip; this is useful
|
|
17
|
-
* for tests
|
|
18
|
-
*
|
|
19
|
-
* In order for QTip to be able to display Tooltips you must add the QTip component to your top-most component
|
|
20
|
-
* (often that's App or Application) - simply add:
|
|
21
|
-
*
|
|
22
|
-
* <QTip />
|
|
23
|
-
*
|
|
24
|
-
* and enjoy beautiful & performant tooltips!
|
|
25
|
-
*/
|
|
26
|
-
export declare const QTip: React.FunctionComponent<any>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '../styles.css';
|
|
3
|
-
import { TooltipProps } from './Tooltip.types';
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated
|
|
6
|
-
* Note: Tooltip has been replaced by QTip - a singleton JS tooltip that behaves well even with overflow settings :)
|
|
7
|
-
* See @QTip for more info!
|
|
8
|
-
*
|
|
9
|
-
* This component displays a Tooltip for the provided children. It is a CSS only tooltip that will not display
|
|
10
|
-
* correctly if a parent element has an overflow CSS property assigned. Please use QTip to ensure your tooltips
|
|
11
|
-
* display correctly.
|
|
12
|
-
*/
|
|
13
|
-
export declare const Tooltip: React.FunctionComponent<TooltipProps>;
|