@seeqdev/qomponents 0.0.157 → 0.0.159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/example/package.json +15 -13
  2. package/dist/example/src/Example.tsx +269 -39
  3. package/dist/example/src/index.css +1 -0
  4. package/dist/example/vite.config.ts +2 -1
  5. package/dist/index.esm.js +2731 -2712
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +2731 -2712
  8. package/dist/index.js.map +1 -1
  9. package/dist/{Accordion → src/Accordion}/Accordion.d.ts +4 -4
  10. package/dist/src/Accordion/Accordion.stories.d.ts +5 -0
  11. package/dist/{Accordion → src/Accordion}/Accordion.test.d.ts +1 -1
  12. package/dist/src/Accordion/Accordion.types.d.ts +86 -0
  13. package/dist/{Accordion → src/Accordion}/index.d.ts +1 -1
  14. package/dist/{Alert → src/Alert}/Alert.d.ts +7 -7
  15. package/dist/src/Alert/Alert.stories.d.ts +5 -0
  16. package/dist/src/Alert/Alert.test.d.ts +1 -0
  17. package/dist/src/Alert/Alert.types.d.ts +63 -0
  18. package/dist/{Alert → src/Alert}/index.d.ts +1 -1
  19. package/dist/{Button → src/Button}/Button.d.ts +10 -10
  20. package/dist/src/Button/Button.stories.d.ts +8 -0
  21. package/dist/{Button → src/Button}/Button.test.d.ts +1 -1
  22. package/dist/src/Button/Button.types.d.ts +148 -0
  23. package/dist/{Button → src/Button}/index.d.ts +1 -1
  24. package/dist/{ButtonGroup → src/ButtonGroup}/ButtonGroup.d.ts +7 -7
  25. package/dist/src/ButtonGroup/ButtonGroup.stories.d.ts +5 -0
  26. package/dist/src/ButtonGroup/ButtonGroup.test.d.ts +1 -0
  27. package/dist/src/ButtonGroup/ButtonGroup.types.d.ts +81 -0
  28. package/dist/{ButtonGroup → src/ButtonGroup}/index.d.ts +1 -1
  29. package/dist/{ButtonWithDropdown → src/ButtonWithDropdown}/ButtonWithDropdown.d.ts +4 -4
  30. package/dist/src/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +5 -0
  31. package/dist/{ButtonWithDropdown → src/ButtonWithDropdown}/ButtonWithDropdown.test.d.ts +1 -1
  32. package/dist/src/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +233 -0
  33. package/dist/{ButtonWithDropdown → src/ButtonWithDropdown}/index.d.ts +1 -1
  34. package/dist/{ButtonWithPopover → src/ButtonWithPopover}/ButtonWithPopover.d.ts +4 -4
  35. package/dist/src/ButtonWithPopover/ButtonWithPopover.stories.d.ts +5 -0
  36. package/dist/{ButtonWithPopover → src/ButtonWithPopover}/ButtonWithPopover.test.d.ts +1 -1
  37. package/dist/src/ButtonWithPopover/ButtonWithPopover.types.d.ts +134 -0
  38. package/dist/{ButtonWithPopover → src/ButtonWithPopover}/index.d.ts +1 -1
  39. package/dist/{Carousel → src/Carousel}/Carousel.d.ts +9 -9
  40. package/dist/src/Carousel/Carousel.stories.d.ts +5 -0
  41. package/dist/{Carousel → src/Carousel}/Carousel.test.d.ts +1 -1
  42. package/dist/src/Carousel/Carousel.types.d.ts +86 -0
  43. package/dist/{Carousel → src/Carousel}/index.d.ts +1 -1
  44. package/dist/{Checkbox → src/Checkbox}/Checkbox.d.ts +7 -7
  45. package/dist/src/Checkbox/Checkbox.stories.d.ts +5 -0
  46. package/dist/{Checkbox → src/Checkbox}/Checkbox.test.d.ts +1 -1
  47. package/dist/src/Checkbox/Checkbox.types.d.ts +92 -0
  48. package/dist/{Checkbox → src/Checkbox}/index.d.ts +1 -1
  49. package/dist/{Collapse → src/Collapse}/Collapse.d.ts +4 -4
  50. package/dist/src/Collapse/Collapse.stories.d.ts +5 -0
  51. package/dist/{Collapse → src/Collapse}/Collapse.test.d.ts +1 -1
  52. package/dist/src/Collapse/Collapse.types.d.ts +19 -0
  53. package/dist/{Collapse → src/Collapse}/index.d.ts +1 -1
  54. package/dist/{Icon → src/Icon}/Icon.d.ts +10 -10
  55. package/dist/src/Icon/Icon.stories.d.ts +5 -0
  56. package/dist/{Icon → src/Icon}/Icon.test.d.ts +1 -1
  57. package/dist/src/Icon/Icon.types.d.ts +87 -0
  58. package/dist/{Icon → src/Icon}/index.d.ts +1 -1
  59. package/dist/{InputGroup → src/InputGroup}/InputGroup.d.ts +7 -7
  60. package/dist/src/InputGroup/InputGroup.stories.d.ts +5 -0
  61. package/dist/src/InputGroup/InputGroup.test.d.ts +1 -0
  62. package/dist/src/InputGroup/InputGroup.types.d.ts +62 -0
  63. package/dist/{InputGroup → src/InputGroup}/index.d.ts +2 -2
  64. package/dist/{Modal → src/Modal}/Modal.d.ts +5 -5
  65. package/dist/{Modal → src/Modal}/Modal.stories.d.ts +10 -10
  66. package/dist/{Modal → src/Modal}/Modal.test.d.ts +1 -1
  67. package/dist/src/Modal/Modal.types.d.ts +244 -0
  68. package/dist/{Modal → src/Modal}/index.d.ts +1 -1
  69. package/dist/{ProgressBar → src/ProgressBar}/ProgressBar.d.ts +4 -4
  70. package/dist/src/ProgressBar/ProgressBar.stories.d.ts +5 -0
  71. package/dist/src/ProgressBar/ProgressBar.test.d.ts +1 -0
  72. package/dist/src/ProgressBar/ProgressBar.types.d.ts +77 -0
  73. package/dist/{ProgressBar → src/ProgressBar}/index.d.ts +1 -1
  74. package/dist/{SeeqActionDropdown → src/SeeqActionDropdown}/SeeqActionDropdown.d.ts +4 -4
  75. package/dist/src/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +5 -0
  76. package/dist/{SeeqActionDropdown → src/SeeqActionDropdown}/SeeqActionDropdown.test.d.ts +1 -1
  77. package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +160 -0
  78. package/dist/{SeeqActionDropdown → src/SeeqActionDropdown}/index.d.ts +1 -1
  79. package/dist/{SeeqActionDropdown → src/SeeqActionDropdown}/variants.d.ts +5 -5
  80. package/dist/{Select → src/Select}/Select.d.ts +15 -15
  81. package/dist/src/Select/Select.stories.d.ts +5 -0
  82. package/dist/{Select → src/Select}/Select.test.d.ts +1 -1
  83. package/dist/src/Select/Select.types.d.ts +220 -0
  84. package/dist/{Select → src/Select}/index.d.ts +2 -2
  85. package/dist/{Slider → src/Slider}/Slider.d.ts +6 -6
  86. package/dist/src/Slider/Slider.stories.d.ts +5 -0
  87. package/dist/src/Slider/Slider.test.d.ts +1 -0
  88. package/dist/src/Slider/Slider.types.d.ts +85 -0
  89. package/dist/{Slider → src/Slider}/index.d.ts +1 -1
  90. package/dist/{SvgIcon → src/SvgIcon}/SvgIcon.d.ts +20 -20
  91. package/dist/src/SvgIcon/SvgIcon.stories.d.ts +5 -0
  92. package/dist/{SvgIcon → src/SvgIcon}/SvgIcon.test.d.ts +1 -1
  93. package/dist/src/SvgIcon/SvgIcon.types.d.ts +76 -0
  94. package/dist/{SvgIcon → src/SvgIcon}/index.d.ts +1 -1
  95. package/dist/{Tabs → src/Tabs}/Tabs.d.ts +4 -4
  96. package/dist/src/Tabs/Tabs.stories.d.ts +5 -0
  97. package/dist/{Tabs → src/Tabs}/Tabs.test.d.ts +1 -1
  98. package/dist/src/Tabs/Tabs.types.d.ts +95 -0
  99. package/dist/{Tabs → src/Tabs}/index.d.ts +1 -1
  100. package/dist/{TextArea → src/TextArea}/TextArea.d.ts +7 -7
  101. package/dist/src/TextArea/TextArea.stories.d.ts +5 -0
  102. package/dist/{TextArea → src/TextArea}/TextArea.test.d.ts +1 -1
  103. package/dist/src/TextArea/TextArea.types.d.ts +105 -0
  104. package/dist/{TextArea → src/TextArea}/index.d.ts +1 -1
  105. package/dist/{TextField → src/TextField}/TextField.d.ts +7 -7
  106. package/dist/src/TextField/TextField.stories.d.ts +5 -0
  107. package/dist/{TextField → src/TextField}/TextField.test.d.ts +1 -1
  108. package/dist/src/TextField/TextField.types.d.ts +199 -0
  109. package/dist/{TextField → src/TextField}/index.d.ts +1 -1
  110. package/dist/{ToolbarButton → src/ToolbarButton}/ToolbarButton.d.ts +3 -3
  111. package/dist/src/ToolbarButton/ToolbarButton.stories.d.ts +5 -0
  112. package/dist/{ToolbarButton → src/ToolbarButton}/ToolbarButton.test.d.ts +1 -1
  113. package/dist/src/ToolbarButton/ToolbarButton.types.d.ts +124 -0
  114. package/dist/{ToolbarButton → src/ToolbarButton}/index.d.ts +1 -1
  115. package/dist/src/Tooltip/QTip.stories.d.ts +5 -0
  116. package/dist/{Tooltip → src/Tooltip}/QTip.types.d.ts +13 -13
  117. package/dist/src/Tooltip/QTipPerformance.stories.d.ts +5 -0
  118. package/dist/{Tooltip → src/Tooltip}/Qtip.d.ts +26 -26
  119. package/dist/{Tooltip → src/Tooltip}/Tooltip.d.ts +13 -13
  120. package/dist/src/Tooltip/Tooltip.stories.d.ts +5 -0
  121. package/dist/{Tooltip → src/Tooltip}/Tooltip.types.d.ts +22 -22
  122. package/dist/src/Tooltip/TooltipPerformance.stories.d.ts +5 -0
  123. package/dist/{Tooltip → src/Tooltip}/index.d.ts +2 -2
  124. package/dist/{Tooltip → src/Tooltip}/qTip.utilities.d.ts +3 -3
  125. package/dist/{index.d.ts → src/index.d.ts} +45 -45
  126. package/dist/src/setupTests.d.ts +1 -0
  127. package/dist/{types.d.ts → src/types.d.ts} +2 -2
  128. package/dist/{utils → src/utils}/browserId.d.ts +9 -9
  129. package/dist/{utils → src/utils}/svg.d.ts +15 -15
  130. package/dist/{utils → src/utils}/validateStyleDimension.d.ts +2 -2
  131. package/dist/{utils → src/utils}/validateStyleDimension.test.d.ts +1 -1
  132. package/dist/styles.css +102 -67
  133. package/dist/types.d.ts.map +1 -0
  134. package/package.json +20 -22
  135. package/dist/Accordion/Accordion.stories.d.ts +0 -6
  136. package/dist/Accordion/Accordion.types.d.ts +0 -20
  137. package/dist/Alert/Alert.stories.d.ts +0 -6
  138. package/dist/Alert/Alert.test.d.ts +0 -1
  139. package/dist/Alert/Alert.types.d.ts +0 -14
  140. package/dist/Button/Button.stories.d.ts +0 -9
  141. package/dist/Button/Button.types.d.ts +0 -53
  142. package/dist/ButtonGroup/ButtonGroup.stories.d.ts +0 -6
  143. package/dist/ButtonGroup/ButtonGroup.test.d.ts +0 -1
  144. package/dist/ButtonGroup/ButtonGroup.types.d.ts +0 -40
  145. package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +0 -6
  146. package/dist/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +0 -90
  147. package/dist/ButtonWithPopover/ButtonWithPopover.stories.d.ts +0 -6
  148. package/dist/ButtonWithPopover/ButtonWithPopover.types.d.ts +0 -48
  149. package/dist/Carousel/Carousel.stories.d.ts +0 -6
  150. package/dist/Carousel/Carousel.types.d.ts +0 -24
  151. package/dist/Checkbox/Checkbox.stories.d.ts +0 -6
  152. package/dist/Checkbox/Checkbox.types.d.ts +0 -20
  153. package/dist/Collapse/Collapse.stories.d.ts +0 -6
  154. package/dist/Collapse/Collapse.types.d.ts +0 -5
  155. package/dist/Icon/Icon.stories.d.ts +0 -6
  156. package/dist/Icon/Icon.types.d.ts +0 -31
  157. package/dist/InputGroup/InputGroup.stories.d.ts +0 -6
  158. package/dist/InputGroup/InputGroup.test.d.ts +0 -1
  159. package/dist/InputGroup/InputGroup.types.d.ts +0 -36
  160. package/dist/Modal/Modal.types.d.ts +0 -48
  161. package/dist/ProgressBar/ProgressBar.stories.d.ts +0 -6
  162. package/dist/ProgressBar/ProgressBar.test.d.ts +0 -1
  163. package/dist/ProgressBar/ProgressBar.types.d.ts +0 -30
  164. package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +0 -6
  165. package/dist/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +0 -58
  166. package/dist/Select/Select.stories.d.ts +0 -6
  167. package/dist/Select/Select.types.d.ts +0 -89
  168. package/dist/Slider/Slider.stories.d.ts +0 -6
  169. package/dist/Slider/Slider.test.d.ts +0 -1
  170. package/dist/Slider/Slider.types.d.ts +0 -17
  171. package/dist/SvgIcon/SvgIcon.stories.d.ts +0 -6
  172. package/dist/SvgIcon/SvgIcon.types.d.ts +0 -25
  173. package/dist/Tabs/Tabs.stories.d.ts +0 -6
  174. package/dist/Tabs/Tabs.types.d.ts +0 -21
  175. package/dist/TextArea/TextArea.stories.d.ts +0 -6
  176. package/dist/TextArea/TextArea.types.d.ts +0 -35
  177. package/dist/TextField/TextField.stories.d.ts +0 -6
  178. package/dist/TextField/TextField.types.d.ts +0 -40
  179. package/dist/ToolbarButton/ToolbarButton.stories.d.ts +0 -6
  180. package/dist/ToolbarButton/ToolbarButton.types.d.ts +0 -53
  181. package/dist/Tooltip/QTip.stories.d.ts +0 -6
  182. package/dist/Tooltip/QTipPerformance.stories.d.ts +0 -6
  183. package/dist/Tooltip/Tooltip.stories.d.ts +0 -6
  184. package/dist/Tooltip/TooltipPerformance.stories.d.ts +0 -6
@@ -0,0 +1,160 @@
1
+ /// <reference types="react" />
2
+ import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
3
+ /**
4
+ * Interface for individual action items within a SeeqActionDropdown.
5
+ * Each item represents a clickable action with optional icon, text, and divider.
6
+ */
7
+ export interface SeeqActionDropdownItems {
8
+ /**
9
+ * HTML ID attribute for the dropdown item element.
10
+ * Should be unique for proper HTML semantics and accessibility.
11
+ */
12
+ id?: string;
13
+ /**
14
+ * Icon class name to display next to the item label.
15
+ * Typically uses FontAwesome classes (e.g., 'fc-zoom', 'fc-delete').
16
+ * Provides visual context for the action.
17
+ */
18
+ icon?: string;
19
+ /**
20
+ * Additional CSS classes to apply to the icon element.
21
+ * Use this to customize icon appearance beyond standard styling.
22
+ */
23
+ iconExtraClassNames?: string;
24
+ /**
25
+ * Main display text for the dropdown item.
26
+ * This is the primary text that users see and click on to trigger the action.
27
+ */
28
+ display: string;
29
+ /**
30
+ * Callback function triggered when the dropdown item is clicked.
31
+ * Use this to define the specific action that should occur when users select this item.
32
+ */
33
+ action: (e?: Event) => void;
34
+ /**
35
+ * When true, the item is clickable and interactive.
36
+ * When false, the item appears disabled and doesn't respond to clicks.
37
+ * @default true
38
+ */
39
+ enabled?: boolean;
40
+ /**
41
+ * When true, displays a visual divider line below this dropdown item.
42
+ * Useful for grouping related items or separating different sections of actions.
43
+ */
44
+ divider?: boolean;
45
+ /**
46
+ * Test ID attribute for the dropdown item used in automated testing.
47
+ * Helps identify and interact with specific action items in test suites.
48
+ */
49
+ testId?: string;
50
+ /**
51
+ * Secondary descriptive text displayed below the main display text.
52
+ * Provides additional context or explanation about what the action does.
53
+ */
54
+ text?: string;
55
+ }
56
+ /**
57
+ * Props for the SeeqActionDropdown component that creates specialized Seeq-branded action menus.
58
+ * Extends TooltipComponentProps to support tooltip functionality on the trigger.
59
+ */
60
+ export interface SeeqActionDropdownProps extends TooltipComponentProps {
61
+ /**
62
+ * Array of action items to display in the dropdown menu.
63
+ * Each item represents a specific action users can perform, with icons and descriptions.
64
+ */
65
+ seeqActionDropdownItems: SeeqActionDropdownItems[];
66
+ /**
67
+ * React element to use as the clickable trigger for the dropdown.
68
+ * Typically a button, icon, or text element that users click to open the action menu.
69
+ */
70
+ trigger: React.ReactNode;
71
+ /**
72
+ * HTML ID attribute for the dropdown trigger element.
73
+ * Should be unique across the page for proper HTML semantics and accessibility.
74
+ */
75
+ id?: string;
76
+ /**
77
+ * Additional CSS classes to apply to the dropdown container.
78
+ * Use this to customize the dropdown's appearance beyond default Seeq styling.
79
+ */
80
+ extraClassNames?: string;
81
+ /**
82
+ * Test ID attribute for the dropdown container element used in automated testing.
83
+ * Applied to the main container that wraps both trigger and dropdown content.
84
+ */
85
+ containerTestId?: string;
86
+ /**
87
+ * When true, disables the dropdown trigger preventing user interaction.
88
+ * Disabled triggers appear visually dimmed and don't open the dropdown when clicked.
89
+ */
90
+ disabled?: boolean;
91
+ /**
92
+ * Callback function triggered when the trigger is clicked.
93
+ * Primarily used for tracking or analytics purposes. Note: this doesn't control
94
+ * dropdown opening, which is handled separately.
95
+ */
96
+ onClick?: (e: MouseEvent) => void;
97
+ /**
98
+ * Horizontal alignment of the dropdown content relative to the trigger:
99
+ * - `start`: Aligns to the left edge of the trigger
100
+ * - `center`: Centers the dropdown on the trigger
101
+ * - `end`: Aligns to the right edge of the trigger
102
+ */
103
+ align?: 'start' | 'center' | 'end';
104
+ /**
105
+ * Numeric offset in pixels from the aligned position.
106
+ * Positive values move the dropdown further from the trigger in the align direction.
107
+ */
108
+ alignOffset?: number;
109
+ /**
110
+ * Position of the dropdown relative to the trigger element:
111
+ * - `top`: Dropdown appears above the trigger
112
+ * - `bottom`: Dropdown appears below the trigger
113
+ * - `left`: Dropdown appears to the left of the trigger
114
+ * - `right`: Dropdown appears to the right of the trigger
115
+ */
116
+ placement?: 'top' | 'bottom' | 'left' | 'right';
117
+ /**
118
+ * Numeric offset in pixels from the placement position.
119
+ * Positive values move the dropdown further away from the trigger.
120
+ */
121
+ placementOffset?: number;
122
+ /**
123
+ * When true, displays a visual arrow pointing from the dropdown to the trigger.
124
+ * Helps users understand the relationship between trigger and dropdown content.
125
+ */
126
+ hasArrow?: boolean;
127
+ /**
128
+ * Controls whether the dropdown is currently open and visible.
129
+ * Use this for controlled dropdown behavior where you manage open state externally.
130
+ */
131
+ isOpen?: boolean;
132
+ /**
133
+ * Callback function triggered when the dropdown open state changes.
134
+ * Receives the new open state as a boolean parameter. Use this to sync with external state.
135
+ */
136
+ onOpenChange?: (isOpen: boolean) => void;
137
+ /**
138
+ * When true, automatically focuses the trigger button when the dropdown closes.
139
+ * Improves keyboard navigation and accessibility by returning focus to the trigger.
140
+ */
141
+ setFocusOnTriggerOnClose?: boolean;
142
+ /**
143
+ * When true, automatically closes the dropdown when any content inside it is clicked.
144
+ * Useful for action dropdowns where selecting an option should close the dropdown.
145
+ */
146
+ isCloseOnContentClick?: boolean;
147
+ /**
148
+ * When true, traps keyboard focus within the dropdown when it's open.
149
+ * Prevents users from tabbing outside the dropdown, improving accessibility.
150
+ */
151
+ keepFocusInsideDropdown?: boolean;
152
+ /**
153
+ * Predefined variant that determines the dropdown's styling and behavior:
154
+ * - `create-workbench`: For workbench creation actions
155
+ * - `view-workbench`: For workbench viewing and management actions
156
+ * - `insert-seeq-content`: For inserting Seeq-specific content and objects
157
+ * Each variant has specific styling and may filter available actions.
158
+ */
159
+ variant: 'create-workbench' | 'view-workbench' | 'insert-seeq-content';
160
+ }
@@ -1 +1 @@
1
- export { default } from './SeeqActionDropdown';
1
+ export { default } from './SeeqActionDropdown';
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { SeeqActionDropdownItems } from './SeeqActionDropdown.types';
3
- export declare const SeeqActionDropdownItem: React.FC<SeeqActionDropdownItems>;
4
- export declare const ViewWorkbench: React.FC<SeeqActionDropdownItems>;
5
- export declare const InsertSeeqContent: React.FC<SeeqActionDropdownItems>;
1
+ import React from 'react';
2
+ import { SeeqActionDropdownItems } from './SeeqActionDropdown.types';
3
+ export declare const SeeqActionDropdownItem: React.FC<SeeqActionDropdownItems>;
4
+ export declare const ViewWorkbench: React.FC<SeeqActionDropdownItems>;
5
+ export declare const InsertSeeqContent: React.FC<SeeqActionDropdownItems>;
@@ -1,15 +1,15 @@
1
- import React from 'react';
2
- import { SelectProps } from './Select.types';
3
- import '../styles.css';
4
- import { MultiValue as MV, SingleValue as SV } from 'react-select';
5
- export type MultiValue<T> = MV<T>;
6
- export type SingleValue<T> = SV<T>;
7
- /**
8
- * Select Component
9
- * - based on react-select (https://react-select.com/)
10
- *
11
- * For ease of testing most of the elements of this select can be identified by classNames prefixed with "spec".
12
- *
13
- */
14
- declare const Select: React.FunctionComponent<SelectProps>;
15
- export default Select;
1
+ import React from 'react';
2
+ import { SelectProps } from './Select.types';
3
+ import '../styles.css';
4
+ import { MultiValue as MV, SingleValue as SV } from 'react-select';
5
+ export type MultiValue<T> = MV<T>;
6
+ export type SingleValue<T> = SV<T>;
7
+ /**
8
+ * Select Component
9
+ * - based on react-select (https://react-select.com/)
10
+ *
11
+ * For ease of testing most of the elements of this select can be identified by classNames prefixed with "spec".
12
+ *
13
+ */
14
+ declare const Select: React.FunctionComponent<SelectProps>;
15
+ export default Select;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const AllSelectVariants: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,220 @@
1
+ import { GroupBase, InputActionMeta, MenuPlacement, MultiValue, SingleValue } from 'react-select';
2
+ import { ReactNode } from 'react';
3
+ import { InputGroupPlacement } from '../types';
4
+ export type Option = {
5
+ label: string;
6
+ value: string | number;
7
+ } | any;
8
+ export type GroupedOption = {
9
+ label: string;
10
+ options: Option[];
11
+ };
12
+ /**
13
+ * Props for the Select component that provides a customizable dropdown selection interface.
14
+ * Built on top of react-select with additional Seeq-specific styling and functionality.
15
+ */
16
+ export interface SelectProps {
17
+ /**
18
+ * When false (default), automatically closes the dropdown menu after an option is selected.
19
+ * When true, keeps the menu open after selection, useful for multi-select scenarios
20
+ * where users might want to select multiple options quickly.
21
+ */
22
+ closeMenuOnSelect?: boolean;
23
+ /**
24
+ * When true, allows users to create new options by typing values not in the existing options list.
25
+ * The new option will be added to the selection and can be handled in the onChange callback.
26
+ * Useful for tag-like inputs or dynamic option lists.
27
+ */
28
+ creatable?: boolean;
29
+ /**
30
+ * When true, disables the entire select component preventing user interaction.
31
+ * The select appears visually dimmed and doesn't respond to clicks or keyboard input.
32
+ */
33
+ isDisabled?: boolean;
34
+ /**
35
+ * Additional CSS classes to apply to the select container element.
36
+ * Can be used to control the overall size, positioning, or styling of the select component.
37
+ */
38
+ extraClassNames?: string;
39
+ /**
40
+ * Additional CSS classes to apply specifically to the select control (the main input area).
41
+ * Use this to customize the appearance of the clickable area that displays the selected value.
42
+ */
43
+ controlClassNames?: string;
44
+ /**
45
+ * Custom filter configuration for search functionality.
46
+ * Advanced option for customizing how the select filters options when users type.
47
+ */
48
+ filterConfig?: unknown;
49
+ /**
50
+ * Custom function to format how option labels are displayed in the dropdown menu and control.
51
+ * Receives an option object and should return a React node for custom rendering.
52
+ * Useful for displaying rich content like icons, badges, or formatted text.
53
+ */
54
+ getOptionLabel?: (option: Option) => ReactNode | undefined;
55
+ /**
56
+ * Custom function to extract the value from an option object.
57
+ * Should return a string that uniquely identifies the option.
58
+ * Used internally by react-select for option comparison and selection tracking.
59
+ */
60
+ getOptionValue?: (option: Option) => string;
61
+ /**
62
+ * Custom function to format how selected option labels are displayed.
63
+ * Similar to getOptionLabel but specifically for rendering selected values.
64
+ * Useful when you want different formatting for selected vs dropdown options.
65
+ */
66
+ getSelectedValueLabel?: (option: Option) => ReactNode | undefined;
67
+ /**
68
+ * HTML ID attribute for the select component container.
69
+ * Should be unique across the page for proper HTML semantics and accessibility.
70
+ */
71
+ id?: string;
72
+ /**
73
+ * Specifies the select's position within an input group:
74
+ * - `prepend`: Select is preceded by another element
75
+ * - `append`: Select is followed by another element
76
+ * Affects styling to create seamless grouped appearance.
77
+ */
78
+ inputGroup?: InputGroupPlacement;
79
+ /**
80
+ * HTML ID attribute for the internal input element.
81
+ * Used for accessibility and form associations. If not provided, one will be generated.
82
+ */
83
+ inputId?: string;
84
+ /**
85
+ * When true, displays a clear button (X) that allows users to remove their selection.
86
+ * Useful for optional selections where users might want to revert to no selection.
87
+ */
88
+ isClearable?: boolean;
89
+ /**
90
+ * When true, displays a loading spinner and disables interaction while options are being fetched.
91
+ * Use this when loading options asynchronously to provide visual feedback to users.
92
+ */
93
+ isLoading?: boolean;
94
+ /**
95
+ * When true, allows selection of multiple options instead of just one.
96
+ * Selected options are displayed as chips/tags within the control area.
97
+ * The onChange callback will receive an array of selected options.
98
+ */
99
+ isMulti?: boolean;
100
+ /**
101
+ * When true, allows users to type in the select to filter/search through available options.
102
+ * When false, the select acts as a pure dropdown without search functionality.
103
+ */
104
+ isSearchable?: boolean;
105
+ /**
106
+ * Forces the dropdown menu to remain open regardless of user interaction.
107
+ * Primarily useful for debugging or special UI scenarios. Normally should be left undefined.
108
+ */
109
+ menuIsOpen?: boolean;
110
+ /**
111
+ * Controls where the dropdown menu appears relative to the select control:
112
+ * - `auto`: Automatically positions based on available space (recommended)
113
+ * - `top`: Always appears above the control
114
+ * - `bottom`: Always appears below the control
115
+ */
116
+ menuPlacement?: MenuPlacement;
117
+ /**
118
+ * Specifies a DOM element where the dropdown menu should be rendered.
119
+ * When null, renders in the normal document flow. When specified, renders in a portal
120
+ * to that element, which can help with z-index issues.
121
+ */
122
+ menuPortalTarget?: null | HTMLElement;
123
+ /**
124
+ * Custom message to display when no options are available for selection.
125
+ * Shown when the options array is empty or when search filters exclude all options.
126
+ * @default "No options"
127
+ */
128
+ noOptionsMessage?: string;
129
+ /**
130
+ * Callback function triggered when the selected value(s) change.
131
+ * For single selects, receives a single Option or null. For multi-selects, receives an array.
132
+ * Use this to handle selection changes and update your application state.
133
+ */
134
+ onChange: (newValue: SingleValue<Option> | MultiValue<Option>) => void;
135
+ /**
136
+ * Array of available options for selection in the dropdown.
137
+ * Can be a flat array of options or grouped options with category labels.
138
+ * Each option should have at minimum a label and value property.
139
+ */
140
+ options: Option[] | GroupedOption[];
141
+ /**
142
+ * Placeholder text displayed when no option is selected.
143
+ * Provides guidance to users about what they should select.
144
+ * Only shown when there's no current selection.
145
+ */
146
+ placeholder?: string;
147
+ /**
148
+ * When true, displays error styling (typically red border) on the select control.
149
+ * Used to indicate validation errors or invalid selections.
150
+ */
151
+ showError?: boolean;
152
+ /**
153
+ * When true, renders the select in a smaller, more compact size.
154
+ * Useful for dense layouts or when space is limited.
155
+ */
156
+ small?: boolean;
157
+ /**
158
+ * Currently selected option(s) for controlled component behavior.
159
+ * For single selects, should be a single Option or undefined.
160
+ * For multi-selects, should be an array of Options.
161
+ */
162
+ value?: Option | undefined;
163
+ /**
164
+ * Initial selected option(s) for uncontrolled component behavior.
165
+ * Used when you want the select to manage its own state internally.
166
+ * Only used during initial render.
167
+ */
168
+ defaultValue?: Option | undefined;
169
+ /**
170
+ * Custom function to determine if an option should be displayed in the menu.
171
+ * Receives the option and current search input, returns true to show the option.
172
+ * Useful for implementing complex filtering logic beyond simple text matching.
173
+ */
174
+ filterOption?: (option: Option, rawInput: string) => boolean;
175
+ /**
176
+ * Custom function to format group labels when using grouped options.
177
+ * Receives a group object and should return a React node for the group header.
178
+ */
179
+ formatGroupLabel?: (group: GroupBase<unknown>) => ReactNode;
180
+ /**
181
+ * Callback triggered when an option is removed in multi-select mode.
182
+ * Receives an object with the ID of the removed option.
183
+ * Useful for handling removal-specific logic separately from general onChange.
184
+ */
185
+ onRemove?: ({ id }: {
186
+ id: Option | string;
187
+ }) => void;
188
+ /**
189
+ * Callback triggered when the dropdown menu opens.
190
+ * Use this for lazy loading options, analytics, or other open-related side effects.
191
+ */
192
+ onMenuOpen?: () => void;
193
+ /**
194
+ * Callback triggered when the dropdown menu closes.
195
+ * Use this for cleanup, saving state, or other close-related side effects.
196
+ */
197
+ onMenuClose?: () => void;
198
+ /**
199
+ * Custom react-select components to override default rendering.
200
+ * Allows deep customization of option rendering, control appearance, etc.
201
+ * See react-select documentation for available component slots.
202
+ */
203
+ components?: Partial<any>;
204
+ /**
205
+ * Callback triggered when the search input within the menu receives focus.
206
+ * Receives the current input value. Useful for search-related functionality.
207
+ */
208
+ onMenuInputFocus?: (inputValue: string) => void;
209
+ /**
210
+ * Callback triggered whenever the search input value changes.
211
+ * Different from onChange which only fires on selection - this fires on every keystroke.
212
+ * The action parameter indicates what caused the change (input, menu-close, etc.).
213
+ */
214
+ onInputChange?: (inputValue: string, action: InputActionMeta) => void;
215
+ /**
216
+ * Current value of the search input for controlled search behavior.
217
+ * Use this when you want to control the search input externally.
218
+ */
219
+ inputValue?: string;
220
+ }
@@ -1,2 +1,2 @@
1
- export { default } from './Select';
2
- export { components as SelectCompoents } from 'react-select';
1
+ export { default } from './Select';
2
+ export { components as SelectCompoents } from 'react-select';
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { SliderProps } from './Slider.types';
3
- /**
4
- * Slider .
5
- */
6
- export declare const Slider: React.FunctionComponent<SliderProps>;
1
+ import React from 'react';
2
+ import { SliderProps } from './Slider.types';
3
+ /**
4
+ * Slider .
5
+ */
6
+ export declare const Slider: React.FunctionComponent<SliderProps>;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const AllSliders: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,85 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Props for the Slider component that provides an interactive range input control.
4
+ */
5
+ export interface SliderProps {
6
+ /**
7
+ * When true, disables the slider preventing user interaction.
8
+ * Disabled sliders appear visually dimmed and don't respond to mouse or keyboard input.
9
+ */
10
+ disabled?: boolean;
11
+ /**
12
+ * Callback function triggered when the slider value changes.
13
+ * Receives an array of numbers (even for single-value sliders for consistency).
14
+ * Use this to handle value changes and update your application state.
15
+ */
16
+ onValueChange?: (value: number[]) => void;
17
+ /**
18
+ * Callback function triggered when the user releases the pointer (mouse/touch) from the slider.
19
+ * Useful for triggering actions only when the user finishes adjusting the value,
20
+ * rather than continuously during dragging.
21
+ */
22
+ onPointerUp?: React.PointerEventHandler<HTMLDivElement>;
23
+ /**
24
+ * HTML ID attribute for the slider component.
25
+ * Should be unique across the page for proper HTML semantics and accessibility.
26
+ */
27
+ id?: string;
28
+ /**
29
+ * Name attribute for the slider used in form submission.
30
+ * Identifies the slider's data when the form is submitted to a server.
31
+ */
32
+ name?: string;
33
+ /**
34
+ * Current value of the slider.
35
+ * Should be within the min/max range. The slider thumb will be positioned
36
+ * proportionally based on this value relative to the min/max range.
37
+ */
38
+ value: number;
39
+ /**
40
+ * Additional CSS classes to apply to the slider's root container.
41
+ * Use this to customize the overall slider appearance and layout.
42
+ */
43
+ rootExtraClassNames?: string;
44
+ /**
45
+ * Additional CSS classes to apply to the slider track (the background line).
46
+ * Use this to customize the track's color, height, or styling.
47
+ */
48
+ trackExtraClassNames?: string;
49
+ /**
50
+ * Additional CSS classes to apply to the slider thumb (the draggable handle).
51
+ * Use this to customize the thumb's size, color, shape, or styling.
52
+ */
53
+ thumbExtraClassNames?: string;
54
+ /**
55
+ * Additional CSS classes to apply to the active range (filled portion of the track).
56
+ * Use this to customize the color or styling of the filled area from min to current value.
57
+ */
58
+ rangeExtraClassNames?: string;
59
+ /**
60
+ * Test ID attribute for the slider component used in automated testing.
61
+ * Applied to the slider's root element for test targeting and interaction.
62
+ */
63
+ testId?: string;
64
+ /**
65
+ * Step value that defines the increment/decrement amount for the slider.
66
+ * The slider value will snap to multiples of this step value.
67
+ * Smaller steps provide finer control, larger steps provide coarser control.
68
+ * @default 1
69
+ */
70
+ step?: number;
71
+ /**
72
+ * Minimum allowed value for the slider.
73
+ * The slider thumb cannot be moved below this value.
74
+ * Defines the left/bottom end of the slider range.
75
+ * @default 0
76
+ */
77
+ min?: number;
78
+ /**
79
+ * Maximum allowed value for the slider.
80
+ * The slider thumb cannot be moved above this value.
81
+ * Defines the right/top end of the slider range.
82
+ * @default 100
83
+ */
84
+ max?: number;
85
+ }
@@ -1 +1 @@
1
- export { Slider as default } from './Slider';
1
+ export { Slider as default } from './Slider';
@@ -1,20 +1,20 @@
1
- import React from 'react';
2
- import '../styles.css';
3
- import { SvgIconProps } from './SvgIcon.types';
4
- /**
5
- * Renders an icon that has an SVG icon path (see {@link isSvgIcon() })
6
- *
7
- * @param onClick - function to call when clicking the icon (takes no parameters)
8
- * @param id - id that can be placed on the SvgIcon component
9
- * @param testId - id that will be used in the data-testid attribute on the icon
10
- * @param customId - id that will be used in the data-customid attribute on the icon. Can be used to identify the icon
11
- * as the click event target in an event handler
12
- * @param icon - the SVG icon
13
- * @param color - used to add a custom color to the icon (required if type="color")
14
- * @param extraClassNames - extra class names to apply
15
- * @param [viewBox='0 0 19 19'] - optional SVG view box
16
- * @param type - default will use dark/light text colors otherwise will use the theme color
17
- * @param tooltipProps - props to pass to the tooltip
18
- */
19
- declare const SvgIcon: React.FunctionComponent<SvgIconProps>;
20
- export default SvgIcon;
1
+ import React from 'react';
2
+ import '../styles.css';
3
+ import { SvgIconProps } from './SvgIcon.types';
4
+ /**
5
+ * Renders an icon that has an SVG icon path (see {@link isSvgIcon() })
6
+ *
7
+ * @param onClick - function to call when clicking the icon (takes no parameters)
8
+ * @param id - id that can be placed on the SvgIcon component
9
+ * @param testId - id that will be used in the data-testid attribute on the icon
10
+ * @param customId - id that will be used in the data-customid attribute on the icon. Can be used to identify the icon
11
+ * as the click event target in an event handler
12
+ * @param icon - the SVG icon
13
+ * @param color - used to add a custom color to the icon (required if type="color")
14
+ * @param extraClassNames - extra class names to apply
15
+ * @param [viewBox='0 0 19 19'] - optional SVG view box
16
+ * @param type - default will use dark/light text colors otherwise will use the theme color
17
+ * @param tooltipProps - props to pass to the tooltip
18
+ */
19
+ declare const SvgIcon: React.FunctionComponent<SvgIconProps>;
20
+ export default SvgIcon;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const AllIcons: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import '@testing-library/jest-dom';