@seeqdev/qomponents 0.0.159 → 0.0.160
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/index.esm.js +27 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -1
- package/dist/src/ToolbarButton/ToolbarButton.types.d.ts +0 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/types.d.ts +25 -0
- package/package.json +2 -2
- package/dist/types.d.ts.map +0 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { MouseEvent } from 'react';
|
|
2
2
|
import { TooltipProps } from '../Tooltip/Tooltip.types';
|
|
3
|
-
export declare const tooltipPositions: readonly ['top', 'left', 'right', 'bottom'];
|
|
4
|
-
export type TooltipPosition = (typeof tooltipPositions)[number];
|
|
5
3
|
export declare const toolbarButtonVariants: readonly ["outline", "theme", "theme-light", "warning", "danger", "no-border"];
|
|
6
4
|
export type ToolbarButtonVariant = (typeof toolbarButtonVariants)[number];
|
|
7
5
|
/**
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/types.d.ts
CHANGED
|
@@ -1,2 +1,27 @@
|
|
|
1
1
|
export type InputGroupPlacement = 'left' | 'right' | undefined;
|
|
2
2
|
export type FormControlElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
3
|
+
export * from './Accordion/Accordion.types';
|
|
4
|
+
export * from './Alert/Alert.types';
|
|
5
|
+
export * from './Button/Button.types';
|
|
6
|
+
export * from './ButtonGroup/ButtonGroup.types';
|
|
7
|
+
export * from './ButtonWithDropdown/ButtonWithDropdown.types';
|
|
8
|
+
export * from './ButtonWithPopover/ButtonWithPopover.types';
|
|
9
|
+
export * from './Carousel/Carousel.types';
|
|
10
|
+
export * from './Checkbox/Checkbox.types';
|
|
11
|
+
export * from './Collapse/Collapse.types';
|
|
12
|
+
export * from './Icon/Icon.types';
|
|
13
|
+
export * from './InputGroup/InputGroup.types';
|
|
14
|
+
export * from './Modal/Modal.types';
|
|
15
|
+
export * from './ProgressBar/ProgressBar.types';
|
|
16
|
+
export * from './SeeqActionDropdown/SeeqActionDropdown.types';
|
|
17
|
+
export * from './Select/Select.types';
|
|
18
|
+
export * from './Slider/Slider.types';
|
|
19
|
+
export * from './SvgIcon/SvgIcon.types';
|
|
20
|
+
export * from './Tabs/Tabs.types';
|
|
21
|
+
export * from './TextArea/TextArea.types';
|
|
22
|
+
export * from './TextField/TextField.types';
|
|
23
|
+
export * from './ToolbarButton/ToolbarButton.types';
|
|
24
|
+
export * from './Tooltip/QTip.types';
|
|
25
|
+
export * from './Tooltip/Tooltip.types';
|
|
26
|
+
export type { ToolbarButtonVariant, ToolbarButtonProps } from './ToolbarButton/ToolbarButton.types';
|
|
27
|
+
export { toolbarButtonVariants } from './ToolbarButton/ToolbarButton.types';
|
package/package.json
CHANGED
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sources":["../src/Button/Button.types.ts","../src/Icon/Icon.types.ts","../src/Tooltip/Tooltip.types.ts"],"sourcesContent":["import { TooltipProps } from '../Tooltip/Tooltip.types';\nimport { IconType } from '../Icon/Icon.types';\nimport React from 'react';\n\nexport const buttonTypes = ['button', 'reset', 'submit', 'link'] as const;\nexport const buttonSizes = ['sm', 'lg'] as const;\nexport const buttonVariants = ['outline', 'theme', 'theme-light', 'warning', 'danger', 'no-border'] as const;\nexport const iconPositions = ['left', 'right'];\n\nexport type ButtonType = (typeof buttonTypes)[number];\nexport type ButtonSize = (typeof buttonSizes)[number];\nexport type ButtonVariant = (typeof buttonVariants)[number];\nexport type IconPosition = (typeof iconPositions)[number];\n\nexport interface ButtonProps {\n /**\n * Callback function triggered when the button is clicked.\n * Receives the mouse event as a parameter for additional event handling.\n * Use this to define the primary action the button should perform.\n */\n onClick?: (e: React.MouseEvent) => void;\n\n /**\n * The text, element, or content to display inside the button.\n * Can be a string for simple text, a translation key, or any React element/node\n * for more complex content like formatted text or inline elements.\n */\n label?: string | React.JSX.Element | React.ReactNode;\n\n /**\n * Visual style variant that determines the button's appearance and color scheme:\n * - `outline`: White background with border, suitable for secondary actions\n * - `theme`: Primary theme colors, typically for main call-to-action buttons\n * - `theme-light`: Lighter version of theme colors for subtle primary actions\n * - `warning`: Yellow/orange styling for caution-related actions\n * - `danger`: Red styling for destructive or critical actions\n * - `no-border`: Borderless styling for minimal, text-like buttons\n * @default 'outline'\n */\n variant?: ButtonVariant;\n\n /**\n * HTML button type attribute that determines the button's behavior in forms:\n * - `button`: Standard button with no special form behavior (default)\n * - `submit`: Submits the parent form when clicked\n * - `reset`: Resets the parent form fields to their initial values\n * - `link`: Behaves like a button but renders as button type for Firefox compatibility\n * @default 'button'\n */\n type?: ButtonType;\n\n /**\n * Size variant that controls the button's dimensions and text size:\n * - `sm`: Small button with compact padding and smaller text (default)\n * - `lg`: Large button with generous padding and larger text\n * @default 'sm'\n */\n size?: ButtonSize;\n\n /**\n * When true, disables the button preventing user interaction.\n * Disabled buttons are visually dimmed and do not respond to clicks or focus.\n * The button will also have `pointer-events: none` applied via CSS.\n */\n disabled?: boolean;\n\n /**\n * Additional CSS classes to apply to the button element.\n * These classes are combined with the component's built-in styling classes.\n * Use this to customize appearance beyond the standard variants.\n */\n extraClassNames?: string;\n\n /**\n * Icon class name to display alongside the button text.\n * Typically uses FontAwesome classes (e.g., 'fc-zoom', 'fc-delete').\n * The icon is automatically styled to match the button's text color.\n */\n icon?: string;\n\n /**\n * Determines how the icon should be styled and colored:\n * - `text`: Uses the button's text color (default)\n * - `white`: Forces white color regardless of button variant\n * - `theme`: Uses theme-specific colors\n * - `color`: Uses a custom color specified in `iconColor`\n * @default 'text'\n */\n iconStyle?: IconType;\n\n /**\n * Custom color for the icon when `iconStyle` is set to 'color'.\n * Can be any valid CSS color value (hex, rgb, color name, etc.).\n * This property is required when iconStyle is 'color'.\n */\n iconColor?: string;\n\n /**\n * Position of the icon relative to the button text:\n * - `left`: Icon appears before the text with right margin\n * - `right`: Icon appears after the text with left margin\n * @default 'left'\n */\n iconPosition?: IconPosition;\n\n /**\n * Custom prefix for the icon class when not using standard FontAwesome icons.\n * By default, icons are prefixed with 'fa-sharp fa-regular', but some icons\n * require different prefixes. Use this to override the default behavior.\n */\n iconPrefix?: string;\n\n /**\n * HTML ID attribute for the button element.\n * Should be unique across the entire page for proper HTML semantics.\n * Also used as a prefix for the icon's test ID when an icon is present.\n */\n id?: string;\n\n /**\n * Test ID attribute for the button element used in automated testing.\n * Applied to the `data-testid` attribute for element selection in test suites.\n */\n testId?: string;\n\n /**\n * Controls whether the click event should stop propagation to parent elements.\n * When true (default), prevents the click from bubbling up the DOM tree.\n * Set to false if you need parent elements to also handle the click event.\n * @default true\n */\n stopPropagation?: boolean;\n\n /**\n * Tooltip text to display when hovering over the button.\n * When provided, the button will show a tooltip with this text on hover.\n * The tooltip appearance and behavior can be customized with `tooltipOptions`.\n */\n tooltip?: string;\n\n /**\n * When true, the tooltip text is rendered as HTML allowing for rich content.\n * When false (default), the tooltip text is treated as plain text for security.\n * Only set to true if you trust the tooltip content source.\n * @default false\n */\n isHtmlTooltip?: boolean;\n\n /**\n * Test ID attribute specifically for the tooltip element.\n * Used for automated testing to identify and interact with the tooltip.\n * Helpful when you need to test tooltip-specific behavior separately from the button.\n */\n tooltipTestId?: string;\n\n /**\n * Configuration options for customizing tooltip behavior and appearance.\n * Omits the 'text' property since that's handled by the `tooltip` prop.\n * Includes options like position, delay, and other tooltip-specific settings.\n */\n tooltipOptions?: Omit<TooltipProps, 'text'>;\n\n /**\n * When true, prevents the blur event from occurring on mouse down.\n * Useful when you want to keep focus on the current element after clicking the button.\n * Commonly used in scenarios where button clicks shouldn't interrupt form input focus.\n * @default false\n */\n preventBlur?: boolean;\n}\n","import { TooltipComponentProps } from '../Tooltip/Tooltip.types';\n\nexport const iconTypes = [\n 'theme',\n 'white',\n 'dark-gray',\n 'darkish-gray',\n 'gray',\n 'color',\n 'info',\n 'text',\n 'warning',\n 'inherit',\n 'danger',\n 'theme-light',\n 'success',\n] as const;\n\nexport type IconType = (typeof iconTypes)[number];\n\n/**\n * Props for the Icon component that renders customizable icons with various styling options.\n * Extends TooltipComponentProps to support tooltip functionality on the icon.\n */\nexport interface IconProps extends TooltipComponentProps {\n /**\n * Icon class name to display, typically from FontAwesome.\n * Examples: 'fc-zoom', 'fc-delete', 'fc-save'. This determines which icon is rendered.\n */\n icon: string;\n\n /**\n * Custom prefix for the icon class when not using standard FontAwesome icons.\n * By default, icons are prefixed with 'fa-sharp fa-regular', but some icons\n * from different icon sets require specific prefixes. Use this to override the default.\n */\n iconPrefix?: string;\n\n /**\n * Visual style type that determines the icon's color and appearance:\n * - `theme`: Uses primary theme colors (default)\n * - `white`: Pure white color\n * - `text`: Uses standard text color\n * - `dark-gray`: Dark gray color\n * - `darkish-gray`: Medium-dark gray color\n * - `gray`: Standard gray color\n * - `color`: Uses custom color specified in `color` prop\n * - `info`: Blue informational color\n * - `warning`: Yellow/orange warning color\n * - `danger`: Red error/danger color\n * - `success`: Green success color\n * - `theme-light`: Lighter version of theme color\n * - `inherit`: Inherits color from parent element\n * @default 'theme'\n */\n type?: IconType;\n\n /**\n * Custom color value for the icon when `type` is set to 'color'.\n * Can be any valid CSS color (hex, rgb, color names, etc.).\n * This property is required when type is 'color'.\n */\n color?: string;\n\n /**\n * Callback function triggered when the icon is clicked.\n * Receives the mouse event as a parameter. Use this to make icons interactive\n * for actions like opening menus, triggering functions, or navigation.\n */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => any;\n\n /**\n * Additional CSS classes to apply to the icon element.\n * Use this to customize the icon's appearance, spacing, or behavior beyond built-in options.\n */\n extraClassNames?: string;\n\n /**\n * HTML ID attribute for the icon element.\n * Should be unique across the page for proper HTML semantics and accessibility.\n */\n id?: string;\n\n /**\n * When true, applies the 'fa-lg' class to make the icon larger than normal size.\n * Cannot be used together with the `small` prop. Useful for emphasis or better visibility.\n */\n large?: boolean;\n\n /**\n * When true, applies the 'fa-sm' class to make the icon smaller than normal size.\n * Cannot be used together with the `large` prop. Useful for compact layouts or inline text.\n */\n small?: boolean;\n\n /**\n * Test ID attribute for the icon element used in automated testing.\n * Applied to the `data-testid` attribute for element selection in test suites.\n */\n testId?: string;\n\n /**\n * Custom identifier placed in the `data-customid` attribute on the icon element.\n * Useful for identifying the specific icon in event handlers when multiple icons\n * share the same click handler. Helps distinguish which icon was clicked.\n */\n customId?: string;\n\n /**\n * Numeric value associated with the icon, purpose depends on specific use case.\n * Can be used for ordering, counting, or any numeric data related to the icon.\n */\n number?: number;\n}\n","export const DEFAULT_TOOL_TIP_DELAY = 500;\nexport const tooltipPositions = ['top', 'left', 'right', 'bottom'] as const;\nimport React from 'react';\n\nexport type TooltipPosition = (typeof tooltipPositions)[number];\n\nexport interface TooltipProps {\n position?: TooltipPosition;\n children?: React.JSX.Element | string;\n text: React.JSX.Element | string;\n delay?: number;\n}\n\nexport interface TooltipComponentProps {\n /** text to display on tooltip */\n tooltip?: string;\n /** number of milliseconds to wait before showing a tooltip on-hover */\n tooltipDelay?: number;\n /** one of four possible tooltip positions */\n tooltipPlacement?: TooltipPosition;\n /** true if the provided tooltip text should be rendered as HTML */\n isHtmlTooltip?: boolean;\n /** optional testId applied to the tooltip - useful for testing */\n tooltipTestId?: string;\n}\n"],"names":[],"mappings":";;AAIO,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAW;MAC7D,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAW;AACpC,MAAA,cAAc,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAW;MAChG,aAAa,GAAG,CAAC,MAAM,EAAE,OAAO;;ACLhC,MAAA,SAAS,GAAG;IACvB,OAAO;IACP,OAAO;IACP,WAAW;IACX,cAAc;IACd,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,aAAa;IACb,SAAS;;;ACfJ,MAAM,sBAAsB,GAAG,IAAI;AACnC,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ;;;;;;;;;;"}
|