@seeqdev/qomponents 0.0.157 → 0.0.159-patch-package-alternative

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) 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 +2710 -2706
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +2710 -2706
  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 +98 -67
  133. package/package.json +21 -21
  134. package/dist/Accordion/Accordion.stories.d.ts +0 -6
  135. package/dist/Accordion/Accordion.types.d.ts +0 -20
  136. package/dist/Alert/Alert.stories.d.ts +0 -6
  137. package/dist/Alert/Alert.test.d.ts +0 -1
  138. package/dist/Alert/Alert.types.d.ts +0 -14
  139. package/dist/Button/Button.stories.d.ts +0 -9
  140. package/dist/Button/Button.types.d.ts +0 -53
  141. package/dist/ButtonGroup/ButtonGroup.stories.d.ts +0 -6
  142. package/dist/ButtonGroup/ButtonGroup.test.d.ts +0 -1
  143. package/dist/ButtonGroup/ButtonGroup.types.d.ts +0 -40
  144. package/dist/ButtonWithDropdown/ButtonWithDropdown.stories.d.ts +0 -6
  145. package/dist/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +0 -90
  146. package/dist/ButtonWithPopover/ButtonWithPopover.stories.d.ts +0 -6
  147. package/dist/ButtonWithPopover/ButtonWithPopover.types.d.ts +0 -48
  148. package/dist/Carousel/Carousel.stories.d.ts +0 -6
  149. package/dist/Carousel/Carousel.types.d.ts +0 -24
  150. package/dist/Checkbox/Checkbox.stories.d.ts +0 -6
  151. package/dist/Checkbox/Checkbox.types.d.ts +0 -20
  152. package/dist/Collapse/Collapse.stories.d.ts +0 -6
  153. package/dist/Collapse/Collapse.types.d.ts +0 -5
  154. package/dist/Icon/Icon.stories.d.ts +0 -6
  155. package/dist/Icon/Icon.types.d.ts +0 -31
  156. package/dist/InputGroup/InputGroup.stories.d.ts +0 -6
  157. package/dist/InputGroup/InputGroup.test.d.ts +0 -1
  158. package/dist/InputGroup/InputGroup.types.d.ts +0 -36
  159. package/dist/Modal/Modal.types.d.ts +0 -48
  160. package/dist/ProgressBar/ProgressBar.stories.d.ts +0 -6
  161. package/dist/ProgressBar/ProgressBar.test.d.ts +0 -1
  162. package/dist/ProgressBar/ProgressBar.types.d.ts +0 -30
  163. package/dist/SeeqActionDropdown/SeeqActionDropdown.stories.d.ts +0 -6
  164. package/dist/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +0 -58
  165. package/dist/Select/Select.stories.d.ts +0 -6
  166. package/dist/Select/Select.types.d.ts +0 -89
  167. package/dist/Slider/Slider.stories.d.ts +0 -6
  168. package/dist/Slider/Slider.test.d.ts +0 -1
  169. package/dist/Slider/Slider.types.d.ts +0 -17
  170. package/dist/SvgIcon/SvgIcon.stories.d.ts +0 -6
  171. package/dist/SvgIcon/SvgIcon.types.d.ts +0 -25
  172. package/dist/Tabs/Tabs.stories.d.ts +0 -6
  173. package/dist/Tabs/Tabs.types.d.ts +0 -21
  174. package/dist/TextArea/TextArea.stories.d.ts +0 -6
  175. package/dist/TextArea/TextArea.types.d.ts +0 -35
  176. package/dist/TextField/TextField.stories.d.ts +0 -6
  177. package/dist/TextField/TextField.types.d.ts +0 -40
  178. package/dist/ToolbarButton/ToolbarButton.stories.d.ts +0 -6
  179. package/dist/ToolbarButton/ToolbarButton.types.d.ts +0 -53
  180. package/dist/Tooltip/QTip.stories.d.ts +0 -6
  181. package/dist/Tooltip/QTipPerformance.stories.d.ts +0 -6
  182. package/dist/Tooltip/Tooltip.stories.d.ts +0 -6
  183. package/dist/Tooltip/TooltipPerformance.stories.d.ts +0 -6
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { AccordionProps } from './Accordion.types';
3
- declare const Accordion: React.FunctionComponent<AccordionProps>;
4
- export default Accordion;
1
+ import React from 'react';
2
+ import { AccordionProps } from './Accordion.types';
3
+ declare const Accordion: React.FunctionComponent<AccordionProps>;
4
+ export default Accordion;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const AllAccordionVariants: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,86 @@
1
+ import React from 'react';
2
+ export interface AccordionProps {
3
+ /**
4
+ * Additional CSS classes to apply to the accordion container.
5
+ * Use this to customize the styling of the entire accordion component.
6
+ */
7
+ extraClassNames?: string;
8
+ /**
9
+ * The value of the accordion item that should be expanded by default when the component first renders.
10
+ * Only used when the accordion is in uncontrolled mode (when you don't manage the state externally).
11
+ * Should match the `value` of one of the items in `accordionItems`.
12
+ */
13
+ defaultValue?: string;
14
+ /**
15
+ * The value of the currently selected/expanded accordion item.
16
+ * This should match the `value` property of one of the items in `accordionItems`.
17
+ * Use this when you want to control which item is expanded from a parent component.
18
+ */
19
+ value: string;
20
+ /**
21
+ * When true, disables the entire accordion component, preventing any user interaction.
22
+ * Individual items can still be disabled independently using their own `disabled` property.
23
+ */
24
+ disabled?: boolean;
25
+ /**
26
+ * Array of accordion items to render. Each item represents a collapsible section
27
+ * with a clickable header (trigger) and expandable content area.
28
+ */
29
+ accordionItems: AccordionItem[];
30
+ /**
31
+ * Test ID attribute for the accordion container element.
32
+ * Used for automated testing and element selection in test suites.
33
+ */
34
+ testId?: string;
35
+ /**
36
+ * Callback function triggered when a user clicks on an accordion item header.
37
+ * Receives the `value` of the selected item as a parameter.
38
+ * Use this to handle accordion state changes and update the `value` prop accordingly.
39
+ */
40
+ onItemSelect: (key: string) => void;
41
+ }
42
+ interface AccordionItem {
43
+ /**
44
+ * Unique identifier for the accordion item.
45
+ * This value is used to determine which item is currently expanded and
46
+ * is passed to the `onItemSelect` callback when the item is clicked.
47
+ */
48
+ value: string;
49
+ /**
50
+ * The content displayed in the clickable header/trigger area of the accordion item.
51
+ * This is what users click to expand or collapse the item.
52
+ * Can be any React element (text, icons, buttons, etc.).
53
+ */
54
+ trigger: React.ReactNode;
55
+ /**
56
+ * The content displayed when the accordion item is expanded.
57
+ * This is the collapsible content area that shows/hides when the trigger is clicked.
58
+ * Can contain any React elements including forms, lists, text, or other components.
59
+ */
60
+ content: React.ReactNode;
61
+ /**
62
+ * Test ID attribute for this specific accordion item.
63
+ * Used for automated testing to uniquely identify and interact with this item.
64
+ * Applied to the item's container element.
65
+ */
66
+ itemTestId?: string;
67
+ /**
68
+ * HTML ID attribute for the accordion item's container element.
69
+ * Useful for accessibility, linking, or custom styling via CSS selectors.
70
+ * Should be unique across the entire page.
71
+ */
72
+ id?: string;
73
+ /**
74
+ * When true, disables this specific accordion item, preventing user interaction.
75
+ * The item will appear visually disabled and clicking on it will have no effect.
76
+ * This overrides the parent accordion's disabled state for this individual item.
77
+ */
78
+ disabled?: boolean;
79
+ /**
80
+ * Additional CSS classes to apply specifically to this item's content area.
81
+ * Use this to customize the styling of the expandable content section.
82
+ * Does not affect the trigger/header styling.
83
+ */
84
+ contentClassNames?: string;
85
+ }
86
+ export {};
@@ -1 +1 @@
1
- export { default } from './Accordion';
1
+ export { default } from './Accordion';
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import '../styles.css';
3
- import { AlertProps } from './Alert.types';
4
- /**
5
- * Alert.
6
- */
7
- export declare const Alert: React.FunctionComponent<AlertProps>;
1
+ import React from 'react';
2
+ import '../styles.css';
3
+ import { AlertProps } from './Alert.types';
4
+ /**
5
+ * Alert.
6
+ */
7
+ export declare const Alert: React.FunctionComponent<AlertProps>;
@@ -0,0 +1,5 @@
1
+ export declare const ThemedAlert: any;
2
+ export declare const WarningAlert: any;
3
+ export declare const DangerAlert: any;
4
+ export declare const GrayAlert: any;
5
+ export declare const AllAlertsVariants: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,63 @@
1
+ /// <reference types="react" />
2
+ import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
3
+ interface Props {
4
+ /**
5
+ * The content to be displayed inside the alert message.
6
+ * Can include text, icons, buttons, or any other React elements.
7
+ * This is the main message or information you want to communicate to the user.
8
+ */
9
+ children: React.ReactNode;
10
+ /**
11
+ * When true, displays a close button (X icon) that allows users to dismiss the alert.
12
+ * When false, the alert cannot be closed by the user and must be controlled programmatically.
13
+ * @default true
14
+ */
15
+ dismissible?: boolean;
16
+ /**
17
+ * Callback function triggered when the user clicks the close button to dismiss the alert.
18
+ * Only relevant when `dismissible` is true. Use this to handle alert dismissal logic,
19
+ * such as updating state to hide the alert or performing cleanup actions.
20
+ */
21
+ onClose?: () => void;
22
+ /**
23
+ * Controls the visibility of the alert component.
24
+ * When false, the alert is completely hidden from the UI.
25
+ * Use this for programmatic control of when alerts should appear or disappear.
26
+ * @default true
27
+ */
28
+ show?: boolean;
29
+ /**
30
+ * The visual style variant of the alert, which determines its appearance and color scheme:
31
+ * - `danger`: Red styling for error messages or critical warnings
32
+ * - `warning`: Yellow/orange styling for caution messages
33
+ * - `gray`: Neutral gray styling for general information
34
+ * - `theme`: Uses the current theme colors for contextual information
35
+ */
36
+ variant: 'danger' | 'theme' | 'warning' | 'gray';
37
+ /**
38
+ * Test ID attribute for the alert container element.
39
+ * Used for automated testing and element selection in test suites.
40
+ * Also used as a prefix for the close button's test ID when dismissible.
41
+ * @default 'alert-id'
42
+ */
43
+ testId?: string;
44
+ /**
45
+ * HTML ID attribute for the alert container element.
46
+ * Should be unique across the entire page for proper HTML semantics.
47
+ * Useful for accessibility, linking, or custom styling via CSS selectors.
48
+ */
49
+ id?: string;
50
+ /**
51
+ * Additional CSS classes to apply to the alert container.
52
+ * Use this to customize the alert's appearance beyond the built-in variants.
53
+ * Classes are combined with the component's default styling.
54
+ */
55
+ extraClassNames?: string;
56
+ }
57
+ /**
58
+ * Combined props for the Alert component.
59
+ * Includes all Alert-specific properties plus tooltip functionality
60
+ * inherited from TooltipComponentProps for enhanced user interaction.
61
+ */
62
+ export type AlertProps = Props & TooltipComponentProps;
63
+ export {};
@@ -1 +1 @@
1
- export { Alert as default } from './Alert';
1
+ export { Alert as default } from './Alert';
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { ButtonProps } from './Button.types';
3
- import '../styles.css';
4
- /**
5
- * All-in-one Button:
6
- * - use "variant" to achieve the desired style
7
- * - include tooltips and/or icons
8
- */
9
- declare const Button: React.FunctionComponent<ButtonProps>;
10
- export default Button;
1
+ import React from 'react';
2
+ import { ButtonProps } from './Button.types';
3
+ import '../styles.css';
4
+ /**
5
+ * All-in-one Button:
6
+ * - use "variant" to achieve the desired style
7
+ * - include tooltips and/or icons
8
+ */
9
+ declare const Button: React.FunctionComponent<ButtonProps>;
10
+ export default Button;
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const AllButtonVariants: () => import("react/jsx-runtime").JSX.Element;
6
+ export declare const ButtonWithTooltip: () => import("react/jsx-runtime").JSX.Element;
7
+ export declare const ButtonWithIcon: () => import("react/jsx-runtime").JSX.Element;
8
+ export declare const DisabledButton: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,148 @@
1
+ import { TooltipProps } from '../Tooltip/Tooltip.types';
2
+ import { IconType } from '../Icon/Icon.types';
3
+ import React from 'react';
4
+ export declare const buttonTypes: readonly ["button", "reset", "submit", "link"];
5
+ export declare const buttonSizes: readonly ["sm", "lg"];
6
+ export declare const buttonVariants: readonly ["outline", "theme", "theme-light", "warning", "danger", "no-border"];
7
+ export declare const iconPositions: string[];
8
+ export type ButtonType = (typeof buttonTypes)[number];
9
+ export type ButtonSize = (typeof buttonSizes)[number];
10
+ export type ButtonVariant = (typeof buttonVariants)[number];
11
+ export type IconPosition = (typeof iconPositions)[number];
12
+ export interface ButtonProps {
13
+ /**
14
+ * Callback function triggered when the button is clicked.
15
+ * Receives the mouse event as a parameter for additional event handling.
16
+ * Use this to define the primary action the button should perform.
17
+ */
18
+ onClick?: (e: React.MouseEvent) => void;
19
+ /**
20
+ * The text, element, or content to display inside the button.
21
+ * Can be a string for simple text, a translation key, or any React element/node
22
+ * for more complex content like formatted text or inline elements.
23
+ */
24
+ label?: string | React.JSX.Element | React.ReactNode;
25
+ /**
26
+ * Visual style variant that determines the button's appearance and color scheme:
27
+ * - `outline`: White background with border, suitable for secondary actions
28
+ * - `theme`: Primary theme colors, typically for main call-to-action buttons
29
+ * - `theme-light`: Lighter version of theme colors for subtle primary actions
30
+ * - `warning`: Yellow/orange styling for caution-related actions
31
+ * - `danger`: Red styling for destructive or critical actions
32
+ * - `no-border`: Borderless styling for minimal, text-like buttons
33
+ * @default 'outline'
34
+ */
35
+ variant?: ButtonVariant;
36
+ /**
37
+ * HTML button type attribute that determines the button's behavior in forms:
38
+ * - `button`: Standard button with no special form behavior (default)
39
+ * - `submit`: Submits the parent form when clicked
40
+ * - `reset`: Resets the parent form fields to their initial values
41
+ * - `link`: Behaves like a button but renders as button type for Firefox compatibility
42
+ * @default 'button'
43
+ */
44
+ type?: ButtonType;
45
+ /**
46
+ * Size variant that controls the button's dimensions and text size:
47
+ * - `sm`: Small button with compact padding and smaller text (default)
48
+ * - `lg`: Large button with generous padding and larger text
49
+ * @default 'sm'
50
+ */
51
+ size?: ButtonSize;
52
+ /**
53
+ * When true, disables the button preventing user interaction.
54
+ * Disabled buttons are visually dimmed and do not respond to clicks or focus.
55
+ * The button will also have `pointer-events: none` applied via CSS.
56
+ */
57
+ disabled?: boolean;
58
+ /**
59
+ * Additional CSS classes to apply to the button element.
60
+ * These classes are combined with the component's built-in styling classes.
61
+ * Use this to customize appearance beyond the standard variants.
62
+ */
63
+ extraClassNames?: string;
64
+ /**
65
+ * Icon class name to display alongside the button text.
66
+ * Typically uses FontAwesome classes (e.g., 'fc-zoom', 'fc-delete').
67
+ * The icon is automatically styled to match the button's text color.
68
+ */
69
+ icon?: string;
70
+ /**
71
+ * Determines how the icon should be styled and colored:
72
+ * - `text`: Uses the button's text color (default)
73
+ * - `white`: Forces white color regardless of button variant
74
+ * - `theme`: Uses theme-specific colors
75
+ * - `color`: Uses a custom color specified in `iconColor`
76
+ * @default 'text'
77
+ */
78
+ iconStyle?: IconType;
79
+ /**
80
+ * Custom color for the icon when `iconStyle` is set to 'color'.
81
+ * Can be any valid CSS color value (hex, rgb, color name, etc.).
82
+ * This property is required when iconStyle is 'color'.
83
+ */
84
+ iconColor?: string;
85
+ /**
86
+ * Position of the icon relative to the button text:
87
+ * - `left`: Icon appears before the text with right margin
88
+ * - `right`: Icon appears after the text with left margin
89
+ * @default 'left'
90
+ */
91
+ iconPosition?: IconPosition;
92
+ /**
93
+ * Custom prefix for the icon class when not using standard FontAwesome icons.
94
+ * By default, icons are prefixed with 'fa-sharp fa-regular', but some icons
95
+ * require different prefixes. Use this to override the default behavior.
96
+ */
97
+ iconPrefix?: string;
98
+ /**
99
+ * HTML ID attribute for the button element.
100
+ * Should be unique across the entire page for proper HTML semantics.
101
+ * Also used as a prefix for the icon's test ID when an icon is present.
102
+ */
103
+ id?: string;
104
+ /**
105
+ * Test ID attribute for the button element used in automated testing.
106
+ * Applied to the `data-testid` attribute for element selection in test suites.
107
+ */
108
+ testId?: string;
109
+ /**
110
+ * Controls whether the click event should stop propagation to parent elements.
111
+ * When true (default), prevents the click from bubbling up the DOM tree.
112
+ * Set to false if you need parent elements to also handle the click event.
113
+ * @default true
114
+ */
115
+ stopPropagation?: boolean;
116
+ /**
117
+ * Tooltip text to display when hovering over the button.
118
+ * When provided, the button will show a tooltip with this text on hover.
119
+ * The tooltip appearance and behavior can be customized with `tooltipOptions`.
120
+ */
121
+ tooltip?: string;
122
+ /**
123
+ * When true, the tooltip text is rendered as HTML allowing for rich content.
124
+ * When false (default), the tooltip text is treated as plain text for security.
125
+ * Only set to true if you trust the tooltip content source.
126
+ * @default false
127
+ */
128
+ isHtmlTooltip?: boolean;
129
+ /**
130
+ * Test ID attribute specifically for the tooltip element.
131
+ * Used for automated testing to identify and interact with the tooltip.
132
+ * Helpful when you need to test tooltip-specific behavior separately from the button.
133
+ */
134
+ tooltipTestId?: string;
135
+ /**
136
+ * Configuration options for customizing tooltip behavior and appearance.
137
+ * Omits the 'text' property since that's handled by the `tooltip` prop.
138
+ * Includes options like position, delay, and other tooltip-specific settings.
139
+ */
140
+ tooltipOptions?: Omit<TooltipProps, 'text'>;
141
+ /**
142
+ * When true, prevents the blur event from occurring on mouse down.
143
+ * Useful when you want to keep focus on the current element after clicking the button.
144
+ * Commonly used in scenarios where button clicks shouldn't interrupt form input focus.
145
+ * @default false
146
+ */
147
+ preventBlur?: boolean;
148
+ }
@@ -1 +1 @@
1
- export { default } from "./Button";
1
+ export { default } from "./Button";
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import '../styles.css';
3
- import { ButtonGroupProps } from './ButtonGroup.types';
4
- /**
5
- * ButtonGroup.
6
- */
7
- export declare const ButtonGroup: React.FunctionComponent<ButtonGroupProps>;
1
+ import React from 'react';
2
+ import '../styles.css';
3
+ import { ButtonGroupProps } from './ButtonGroup.types';
4
+ /**
5
+ * ButtonGroup.
6
+ */
7
+ export declare const ButtonGroup: React.FunctionComponent<ButtonGroupProps>;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const AllButtonGroups: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,81 @@
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from '../Button/Button.types';
3
+ import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
4
+ /**
5
+ * Interface representing the properties for a button within a ButtonGroup.
6
+ * Used when you want to include an interactive button as part of the group.
7
+ */
8
+ interface AppendedButtonProps {
9
+ /**
10
+ * Specifies that this group item is a clickable button.
11
+ * Button items can be selected, have active states, and trigger onChange events.
12
+ */
13
+ variant: 'button';
14
+ /**
15
+ * Configuration properties for the button component.
16
+ * Omits the onClick handler since ButtonGroup manages selection internally.
17
+ * Requires a value for selection tracking and optionally an isActive state.
18
+ */
19
+ buttonProps: Omit<ButtonProps, 'onClick'> & {
20
+ /** Unique value used to identify this button when selected */
21
+ value: string;
22
+ /** Whether this button is currently in the active/selected state */
23
+ isActive?: boolean;
24
+ };
25
+ }
26
+ /**
27
+ * Interface for including custom React elements within a ButtonGroup.
28
+ * Used when you need to add non-button content like separators, labels, or custom components.
29
+ */
30
+ interface ElementProps {
31
+ /**
32
+ * Specifies that this group item is a custom React element.
33
+ * Element items are purely presentational and don't participate in selection logic.
34
+ */
35
+ variant: 'element';
36
+ /**
37
+ * The React content to render within the button group.
38
+ * Can be any valid React node including text, icons, separators, or complex components.
39
+ */
40
+ element: React.ReactNode;
41
+ /**
42
+ * Additional CSS classes to apply to the element's container.
43
+ * Use this to style the element consistently with the button group's appearance.
44
+ */
45
+ extraClassNames?: string;
46
+ }
47
+ type Props = AppendedButtonProps | ElementProps | undefined;
48
+ /**
49
+ * Props for the ButtonGroup component that creates a cohesive group of related buttons.
50
+ * Extends TooltipComponentProps to support tooltip functionality on the entire group.
51
+ */
52
+ export interface ButtonGroupProps extends TooltipComponentProps {
53
+ /**
54
+ * Array of items to display in the button group.
55
+ * Each item can be either a button (for interactive elements) or an element (for decorative content).
56
+ * Buttons within the group share consistent styling and spacing for a unified appearance.
57
+ */
58
+ buttons: Props[];
59
+ /**
60
+ * HTML ID attribute for the button group container.
61
+ * Should be unique across the page for proper HTML semantics and accessibility.
62
+ */
63
+ id?: string;
64
+ /**
65
+ * Additional CSS classes to apply to the button group container.
66
+ * Use this to customize the group's appearance, spacing, or layout beyond default styling.
67
+ */
68
+ extraClassNames?: string;
69
+ /**
70
+ * Callback function triggered when a button within the group is selected.
71
+ * Receives the value of the selected button as defined in its buttonProps.value.
72
+ * Use this to handle selection changes and update your application state.
73
+ */
74
+ onChange?: (value: string) => void;
75
+ /**
76
+ * Test ID attribute for the button group container used in automated testing.
77
+ * Applied to the group's root element for test targeting and interaction.
78
+ */
79
+ testId?: string;
80
+ }
81
+ export {};
@@ -1 +1 @@
1
- export { ButtonGroup as default } from './ButtonGroup';
1
+ export { ButtonGroup as default } from './ButtonGroup';
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
2
- import { ButtonWithDropdownProps } from './ButtonWithDropdown.types';
3
- declare const ButtonWithDropdown: React.FunctionComponent<ButtonWithDropdownProps>;
4
- export default ButtonWithDropdown;
1
+ import * as React from 'react';
2
+ import { ButtonWithDropdownProps } from './ButtonWithDropdown.types';
3
+ declare const ButtonWithDropdown: React.FunctionComponent<ButtonWithDropdownProps>;
4
+ export default ButtonWithDropdown;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const AllButtonWithDropdownVariants: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import '@testing-library/jest-dom';