@seeqdev/qomponents 0.0.209 → 0.0.215
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/iconFont/FontCustom.woff +0 -0
- package/dist/iconFont/FontCustom.woff2 +0 -0
- 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/dist/styles.css +16 -31
- package/package.json +13 -12
|
@@ -1,122 +1,126 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { TooltipProps } from "../Tooltip/Tooltip.types.js";
|
|
2
|
+
import React, { MouseEvent } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/ToolbarButton/ToolbarButton.types.d.ts
|
|
5
|
+
declare const toolbarButtonVariants: readonly ["outline", "theme", "theme-light", "warning", "danger", "no-border"];
|
|
6
|
+
type ToolbarButtonVariant = (typeof toolbarButtonVariants)[number];
|
|
5
7
|
/**
|
|
6
8
|
* Props for the ToolbarButton component that creates toolbar-style buttons with optional popovers.
|
|
7
9
|
* Designed for use in toolbars, action bars, and similar UI contexts.
|
|
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
|
-
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
11
|
+
interface ToolbarButtonProps {
|
|
12
|
+
/**
|
|
13
|
+
* Primary icon class name to display on the button.
|
|
14
|
+
* Typically uses FontAwesome classes (e.g., 'fc-zoom', 'fc-delete').
|
|
15
|
+
* This is the main visual identifier for the button's function.
|
|
16
|
+
*/
|
|
17
|
+
icon: string;
|
|
18
|
+
/**
|
|
19
|
+
* Secondary icon class name to display alongside the primary icon.
|
|
20
|
+
* Useful for showing state indicators, badges, or additional context.
|
|
21
|
+
*/
|
|
22
|
+
secondIcon?: string;
|
|
23
|
+
/**
|
|
24
|
+
* When true, forces the primary icon to render in a smaller size.
|
|
25
|
+
* Overrides automatic sizing based on button variant or layout.
|
|
26
|
+
*/
|
|
27
|
+
forceSmallIcon?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Text label for the toolbar button.
|
|
30
|
+
* Typically shown when the toolbar has sufficient width or in expanded states.
|
|
31
|
+
* Helps users understand the button's function when icons alone aren't clear.
|
|
32
|
+
*/
|
|
33
|
+
label?: string;
|
|
34
|
+
/**
|
|
35
|
+
* React content to display in an attached popover when the button is clicked.
|
|
36
|
+
* Can be any React elements including forms, menus, or complex layouts.
|
|
37
|
+
* When provided, the button becomes a popover trigger.
|
|
38
|
+
*/
|
|
39
|
+
popoverContent?: React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* When true, renders the button in a compact, icon-only mode.
|
|
42
|
+
* Hides the label even if provided and uses minimal padding for space-constrained layouts.
|
|
43
|
+
*/
|
|
44
|
+
isSmall?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* HTML ID attribute for the toolbar button element.
|
|
47
|
+
* Should be unique across the page for proper HTML semantics and accessibility.
|
|
48
|
+
*/
|
|
49
|
+
id?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Additional CSS classes to apply to the toolbar button container.
|
|
52
|
+
* Use this to customize the button's appearance beyond the built-in variants.
|
|
53
|
+
*/
|
|
54
|
+
extraClassNames?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Test ID attribute for the toolbar button element used in automated testing.
|
|
57
|
+
* Applied to the button element for test targeting and interaction.
|
|
58
|
+
*/
|
|
59
|
+
testId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Text to display in the button's tooltip when hovering.
|
|
62
|
+
* Provides additional context or instructions about the button's function.
|
|
63
|
+
*/
|
|
64
|
+
tooltipText?: string;
|
|
65
|
+
/**
|
|
66
|
+
* When true, the tooltip text is rendered as HTML allowing for rich content.
|
|
67
|
+
* When false (default), the tooltip text is treated as plain text for security.
|
|
68
|
+
* Only set to true if you trust the tooltip content source.
|
|
69
|
+
*/
|
|
70
|
+
isHtmlTooltip?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Test ID attribute specifically for the tooltip element used in automated testing.
|
|
73
|
+
* Helps identify and interact with the tooltip separately from the button.
|
|
74
|
+
*/
|
|
75
|
+
tooltipTestId?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Configuration options for customizing tooltip behavior and appearance.
|
|
78
|
+
* Omits the 'text' property since that's handled by the `tooltipText` prop.
|
|
79
|
+
* Includes options like position, delay, and other tooltip-specific settings.
|
|
80
|
+
*/
|
|
81
|
+
tooltipOptions?: Omit<TooltipProps, 'text'>;
|
|
82
|
+
/**
|
|
83
|
+
* When true, disables the toolbar button preventing user interaction.
|
|
84
|
+
* Disabled buttons appear visually dimmed and don't respond to clicks or show popovers.
|
|
85
|
+
*/
|
|
86
|
+
disabled?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Callback function triggered when the toolbar button is clicked.
|
|
89
|
+
* Primarily used for tracking, analytics, or additional click handling.
|
|
90
|
+
* Note: this doesn't prevent popover opening if popoverContent is provided.
|
|
91
|
+
*/
|
|
92
|
+
onClick?: (e: MouseEvent) => void;
|
|
93
|
+
/**
|
|
94
|
+
* When true, displays the button in an "active" or "pressed" visual state.
|
|
95
|
+
* Useful for toggle buttons or indicating the current tool/mode in a toolbar.
|
|
96
|
+
*/
|
|
97
|
+
isActive?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Callback function triggered when an attached popover is hidden/closed.
|
|
100
|
+
* Use this for cleanup, state management, or other hide-related side effects.
|
|
101
|
+
*/
|
|
102
|
+
onHide?: () => void;
|
|
103
|
+
/**
|
|
104
|
+
* When true, displays a visual arrow on the button indicating it has a dropdown/popover.
|
|
105
|
+
* Helps users understand that clicking will reveal additional options or content.
|
|
106
|
+
*/
|
|
107
|
+
hasArrow?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* When true, treats the primary icon string as an SVG identifier instead of a font icon class.
|
|
110
|
+
* Changes how the icon is rendered and styled within the component.
|
|
111
|
+
*/
|
|
112
|
+
isPrimaryAnSvg?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Additional CSS classes to apply specifically to the primary icon element.
|
|
115
|
+
* Use this to customize the icon's appearance independently from the button container.
|
|
116
|
+
*/
|
|
117
|
+
primaryIconExtraClassNames?: string;
|
|
118
|
+
/** height for the icon */
|
|
119
|
+
iconHeight?: number;
|
|
120
|
+
/** width for the icon */
|
|
121
|
+
iconWidth?: number;
|
|
122
|
+
/** viewbox for the icon */
|
|
123
|
+
primaryIconViewbox?: string;
|
|
122
124
|
}
|
|
125
|
+
//#endregion
|
|
126
|
+
export { ToolbarButtonProps, ToolbarButtonVariant, toolbarButtonVariants };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ToolbarButton } from "./ToolbarButton.js";
|
|
2
|
+
export { ToolbarButton as default };
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { TooltipPosition } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { TooltipPosition } from "./Tooltip.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/Tooltip/QTip.types.d.ts
|
|
4
|
+
interface QTipDataAttributes {
|
|
5
|
+
/** text displayed by the tooltip */
|
|
6
|
+
'data-qtip-text': string;
|
|
7
|
+
/** one of TooltipPosition */
|
|
8
|
+
'data-qtip-placement'?: TooltipPosition;
|
|
9
|
+
/** set to true to render the provided text as html */
|
|
10
|
+
'data-qtip-is-html'?: boolean;
|
|
11
|
+
/** number of milliseconds to wait before showing a tooltip on-hover */
|
|
12
|
+
'data-qtip-delay'?: number;
|
|
13
|
+
/** useful for testing; sets the provided string as the data-testid attribute of the tooltip */
|
|
14
|
+
'data-qtip-testid'?: string;
|
|
13
15
|
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { QTipDataAttributes };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/Tooltip/Qtip.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* QTip
|
|
4
7
|
*
|
|
@@ -23,4 +26,6 @@ import React from 'react';
|
|
|
23
26
|
*
|
|
24
27
|
* and enjoy beautiful & performant tooltips!
|
|
25
28
|
*/
|
|
26
|
-
|
|
29
|
+
declare const QTip: React.FunctionComponent<any>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { QTip };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TooltipProps } from "./Tooltip.types.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/Tooltip/Tooltip.d.ts
|
|
5
|
+
|
|
3
6
|
/**
|
|
4
7
|
* @deprecated
|
|
5
8
|
* Note: Tooltip has been replaced by QTip - a singleton JS tooltip that behaves well even with overflow settings :)
|
|
@@ -9,4 +12,6 @@ import { TooltipProps } from './Tooltip.types';
|
|
|
9
12
|
* correctly if a parent element has an overflow CSS property assigned. Please use QTip to ensure your tooltips
|
|
10
13
|
* display correctly.
|
|
11
14
|
*/
|
|
12
|
-
|
|
15
|
+
declare const Tooltip: React.FunctionComponent<TooltipProps>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Tooltip };
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/Tooltip/Tooltip.types.d.ts
|
|
4
|
+
declare const DEFAULT_TOOL_TIP_DELAY: number;
|
|
5
|
+
declare const tooltipPositions: readonly ["top", "left", "right", "bottom"];
|
|
6
|
+
type TooltipPosition = (typeof tooltipPositions)[number];
|
|
7
|
+
interface TooltipProps {
|
|
8
|
+
position?: TooltipPosition;
|
|
9
|
+
children?: React.JSX.Element | string;
|
|
10
|
+
text: React.JSX.Element | string;
|
|
11
|
+
delay?: number;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
interface TooltipComponentProps {
|
|
14
|
+
/** text to display on tooltip */
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
/** number of milliseconds to wait before showing a tooltip on-hover */
|
|
17
|
+
tooltipDelay?: number;
|
|
18
|
+
/** one of four possible tooltip positions */
|
|
19
|
+
tooltipPlacement?: TooltipPosition;
|
|
20
|
+
/** true if the provided tooltip text should be rendered as HTML */
|
|
21
|
+
isHtmlTooltip?: boolean;
|
|
22
|
+
/** optional testId applied to the tooltip - useful for testing */
|
|
23
|
+
tooltipTestId?: string;
|
|
22
24
|
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { DEFAULT_TOOL_TIP_DELAY, TooltipComponentProps, TooltipPosition, TooltipProps, tooltipPositions };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Tooltip } from "./Tooltip.js";
|
|
2
|
+
import { QTip } from "./Qtip.js";
|
|
3
|
+
export { QTip, Tooltip };
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { TooltipComponentProps } from "./Tooltip.types.js";
|
|
2
|
+
import { QTipDataAttributes } from "./QTip.types.js";
|
|
3
|
+
|
|
4
|
+
//#region src/Tooltip/qTip.utilities.d.ts
|
|
5
|
+
declare const getQTipData: ({
|
|
6
|
+
tooltip,
|
|
7
|
+
tooltipPlacement,
|
|
8
|
+
isHtmlTooltip,
|
|
9
|
+
tooltipTestId,
|
|
10
|
+
tooltipDelay
|
|
11
|
+
}: TooltipComponentProps) => QTipDataAttributes | undefined;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { getQTipData };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { TriggerWithDropdownProps } from "./TriggerWithDropdown.types.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/TriggerWithDropdown/TriggerWithDropdown.d.ts
|
|
5
|
+
declare const TriggerWithDropdown: React$1.FunctionComponent<TriggerWithDropdownProps>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { TriggerWithDropdown as default };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { TooltipComponentProps } from
|
|
2
|
-
import { DropdownItems } from
|
|
1
|
+
import { TooltipComponentProps } from "../Tooltip/Tooltip.types.js";
|
|
2
|
+
import { DropdownItems } from "../ButtonWithDropdown/ButtonWithDropdown.types.js";
|
|
3
|
+
|
|
4
|
+
//#region src/TriggerWithDropdown/TriggerWithDropdown.types.d.ts
|
|
5
|
+
|
|
3
6
|
/**
|
|
4
7
|
* Props for the TriggerWithDropdown component that creates a custom trigger with an attached dropdown menu.
|
|
5
8
|
* Extends TooltipComponentProps to support tooltip functionality on the trigger element.
|
|
@@ -7,96 +10,98 @@ import { DropdownItems } from '..';
|
|
|
7
10
|
* Use this component when you need full control over the trigger element's appearance.
|
|
8
11
|
* If you want a standard Qomponents Button as the trigger, use ButtonWithDropdown instead.
|
|
9
12
|
*/
|
|
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
|
-
|
|
13
|
+
interface TriggerWithDropdownProps extends TooltipComponentProps {
|
|
14
|
+
/**
|
|
15
|
+
* Array of items to display in the dropdown menu.
|
|
16
|
+
* Each item can be interactive (with onClick) or decorative (labels/dividers).
|
|
17
|
+
* Items can also contain sub-menus for hierarchical organization.
|
|
18
|
+
*/
|
|
19
|
+
dropdownItems: DropdownItems[];
|
|
20
|
+
/**
|
|
21
|
+
* React element to use as the clickable trigger.
|
|
22
|
+
* Can be any React element — icon, text, custom component, etc.
|
|
23
|
+
*/
|
|
24
|
+
triggerIcon: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* HTML ID attribute for the dropdown trigger element.
|
|
27
|
+
* Should be unique across the page for proper HTML semantics and accessibility.
|
|
28
|
+
*/
|
|
29
|
+
id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Additional CSS classes to apply to the dropdown trigger.
|
|
32
|
+
* Use this to customize the trigger's appearance beyond default styling.
|
|
33
|
+
*/
|
|
34
|
+
extraClassNames?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Test ID attribute for the dropdown container element used in automated testing.
|
|
37
|
+
* Applied to the main container that wraps both trigger and dropdown content.
|
|
38
|
+
*/
|
|
39
|
+
containerTestId?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Additional CSS classes to apply to the dropdown content container.
|
|
42
|
+
* Use this to customize the dropdown menu's appearance, spacing, or styling.
|
|
43
|
+
*/
|
|
44
|
+
contentExtraClassNames?: string;
|
|
45
|
+
/**
|
|
46
|
+
* When true, disables the dropdown trigger preventing user interaction.
|
|
47
|
+
* Disabled triggers appear visually dimmed and don't open the dropdown when clicked.
|
|
48
|
+
*/
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Horizontal alignment of the dropdown content relative to the trigger:
|
|
52
|
+
* - `start`: Aligns to the left edge of the trigger
|
|
53
|
+
* - `center`: Centers the dropdown on the trigger
|
|
54
|
+
* - `end`: Aligns to the right edge of the trigger
|
|
55
|
+
*/
|
|
56
|
+
align?: 'start' | 'center' | 'end';
|
|
57
|
+
/**
|
|
58
|
+
* Numeric offset in pixels from the aligned position.
|
|
59
|
+
* Positive values move the dropdown further from the trigger in the align direction.
|
|
60
|
+
*/
|
|
61
|
+
alignOffset?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Position of the dropdown relative to the trigger element:
|
|
64
|
+
* - `top`: Dropdown appears above the trigger
|
|
65
|
+
* - `bottom`: Dropdown appears below the trigger
|
|
66
|
+
* - `left`: Dropdown appears to the left of the trigger
|
|
67
|
+
* - `right`: Dropdown appears to the right of the trigger
|
|
68
|
+
*/
|
|
69
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
70
|
+
/**
|
|
71
|
+
* Numeric offset in pixels from the placement position.
|
|
72
|
+
* Positive values move the dropdown further away from the trigger.
|
|
73
|
+
*/
|
|
74
|
+
placementOffset?: number;
|
|
75
|
+
/**
|
|
76
|
+
* When true, displays a visual arrow pointing from the dropdown to the trigger.
|
|
77
|
+
* Helps users understand the relationship between trigger and dropdown content.
|
|
78
|
+
*/
|
|
79
|
+
hasArrow?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Controls whether the dropdown is currently open and visible.
|
|
82
|
+
* Use this for controlled dropdown behavior where you manage open state externally.
|
|
83
|
+
*/
|
|
84
|
+
isOpen?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Callback function triggered when the dropdown open state changes.
|
|
87
|
+
* Receives the new open state as a boolean parameter. Use this to sync with external state.
|
|
88
|
+
*/
|
|
89
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
90
|
+
/**
|
|
91
|
+
* When true, automatically focuses the trigger button when the dropdown closes.
|
|
92
|
+
* Improves keyboard navigation and accessibility by returning focus to the trigger.
|
|
93
|
+
*/
|
|
94
|
+
setFocusOnTriggerOnClose?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* When true, traps keyboard focus within the dropdown when it's open.
|
|
97
|
+
* Prevents users from tabbing outside the dropdown, improving accessibility.
|
|
98
|
+
*/
|
|
99
|
+
keepFocusInsideDropdown?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Callback function triggered when the dropdown container is clicked.
|
|
102
|
+
* Receives the click event. Use this for handling container-level interactions.
|
|
103
|
+
*/
|
|
104
|
+
onContainerClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
102
105
|
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { TriggerWithDropdownProps };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import TriggerWithDropdown from "./TriggerWithDropdown.js";
|
|
2
|
+
export { TriggerWithDropdown as default };
|