@seeqdev/qomponents 0.0.220 → 0.0.221
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 +31 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +25 -25
- package/dist/index.js.map +1 -1
- package/dist/src/Badge/Badge.d.ts +2 -2
- package/dist/src/Button/Button.types.d.ts +5 -0
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +5 -0
- package/dist/src/LoadingIndicator/LoadingIndicator.d.ts +24 -0
- package/dist/src/LoadingIndicator/LoadingIndicator.types.d.ts +70 -0
- package/dist/src/LoadingIndicator/index.d.ts +2 -0
- package/dist/src/index.build.d.ts +2 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/styles.css +40 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BadgeProps } from "./Badge.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/Badge/Badge.d.ts
|
|
5
5
|
/**
|
|
@@ -10,6 +10,6 @@ declare const Badge: ({
|
|
|
10
10
|
variant,
|
|
11
11
|
testId,
|
|
12
12
|
extraClassNames
|
|
13
|
-
}: BadgeProps) =>
|
|
13
|
+
}: BadgeProps) => react_jsx_runtime2.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Badge, Badge as default };
|
|
@@ -57,6 +57,11 @@ interface ButtonProps {
|
|
|
57
57
|
* The button will also have `pointer-events: none` applied via CSS.
|
|
58
58
|
*/
|
|
59
59
|
disabled?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* When true, renders a loading indicator in the icon slot instead of the configured icon.
|
|
62
|
+
* This keeps loading button treatment consistent across consumers.
|
|
63
|
+
*/
|
|
64
|
+
inProgress?: boolean;
|
|
60
65
|
/**
|
|
61
66
|
* Additional CSS classes to apply to the button element.
|
|
62
67
|
* These classes are combined with the component's built-in styling classes.
|
|
@@ -50,6 +50,11 @@ interface DropdownItems extends TooltipComponentProps {
|
|
|
50
50
|
* Typically uses Seeq or FontAwesome classes for consistent visual styling.
|
|
51
51
|
*/
|
|
52
52
|
icon?: string;
|
|
53
|
+
/**
|
|
54
|
+
* When true, renders a loading indicator in the icon slot instead of the configured icon.
|
|
55
|
+
* This keeps loading dropdown item treatment consistent across consumers.
|
|
56
|
+
*/
|
|
57
|
+
inProgress?: boolean;
|
|
53
58
|
/**
|
|
54
59
|
* Type/style of the icon that determines its rendering and colors.
|
|
55
60
|
* Common values include 'theme', 'text', 'color' based on the Icon component.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LoadingIndicatorProps } from "./LoadingIndicator.types.js";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/LoadingIndicator/LoadingIndicator.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Shared loading spinner that inherits the active Seeq theme color unless a color is provided.
|
|
7
|
+
*/
|
|
8
|
+
declare const LoadingIndicator: ({
|
|
9
|
+
id,
|
|
10
|
+
customId,
|
|
11
|
+
testId,
|
|
12
|
+
size,
|
|
13
|
+
thickness,
|
|
14
|
+
color,
|
|
15
|
+
extraClassNames,
|
|
16
|
+
style,
|
|
17
|
+
ariaLabel,
|
|
18
|
+
ariaHidden,
|
|
19
|
+
role,
|
|
20
|
+
onClick,
|
|
21
|
+
title
|
|
22
|
+
}: LoadingIndicatorProps) => react_jsx_runtime0.JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { LoadingIndicator as default };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { CSSProperties, MouseEventHandler } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/LoadingIndicator/LoadingIndicator.types.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Preset loading indicator sizes.
|
|
7
|
+
*/
|
|
8
|
+
type LoadingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
|
+
/**
|
|
10
|
+
* Props for the LoadingIndicator component.
|
|
11
|
+
*/
|
|
12
|
+
type LoadingIndicatorProps = {
|
|
13
|
+
/**
|
|
14
|
+
* HTML ID attribute for the loading indicator element.
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Legacy HTML ID attribute alias for consumers that still use customId.
|
|
19
|
+
*/
|
|
20
|
+
customId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Test ID attribute used in automated testing.
|
|
23
|
+
*/
|
|
24
|
+
testId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Preset size or explicit pixel size for the loading indicator.
|
|
27
|
+
* @default 'md'
|
|
28
|
+
*/
|
|
29
|
+
size?: LoadingIndicatorSize | number;
|
|
30
|
+
/**
|
|
31
|
+
* Ring thickness in pixels. Defaults to the selected preset size's thickness.
|
|
32
|
+
*/
|
|
33
|
+
thickness?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Spinner color. Defaults to currentColor so the indicator inherits from its context.
|
|
36
|
+
*/
|
|
37
|
+
color?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Additional CSS classes to apply to the loading indicator element.
|
|
40
|
+
*/
|
|
41
|
+
extraClassNames?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Inline styles to apply to the loading indicator element.
|
|
44
|
+
*/
|
|
45
|
+
style?: CSSProperties;
|
|
46
|
+
/**
|
|
47
|
+
* Accessible label for assistive technologies.
|
|
48
|
+
* When omitted, the indicator is treated as decorative unless role, onClick, or ariaHidden is provided.
|
|
49
|
+
*/
|
|
50
|
+
ariaLabel?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Controls whether the loading indicator is hidden from assistive technologies.
|
|
53
|
+
* When omitted, decorative indicators are hidden automatically.
|
|
54
|
+
*/
|
|
55
|
+
ariaHidden?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* ARIA role for the loading indicator element.
|
|
58
|
+
*/
|
|
59
|
+
role?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Click handler for interactive loading indicator usages.
|
|
62
|
+
*/
|
|
63
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
64
|
+
/**
|
|
65
|
+
* Browser tooltip text for the loading indicator element.
|
|
66
|
+
*/
|
|
67
|
+
title?: string;
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { LoadingIndicatorProps, LoadingIndicatorSize };
|
|
@@ -46,7 +46,8 @@ import Collapse from "./Collapse/Collapse.js";
|
|
|
46
46
|
import { Slider } from "./Slider/Slider.js";
|
|
47
47
|
import ProgressBar from "./ProgressBar/ProgressBar.js";
|
|
48
48
|
import Carousel from "./Carousel/Carousel.js";
|
|
49
|
+
import LoadingIndicator from "./LoadingIndicator/LoadingIndicator.js";
|
|
49
50
|
import { QomponentsTheme } from "./constants.js";
|
|
50
51
|
import { ButtonWithDropdownProps, DropdownItems, DropdownProps, DropdownSubItem } from "./ButtonWithDropdown/ButtonWithDropdown.types.js";
|
|
51
52
|
import ButtonWithDropdown from "./ButtonWithDropdown/ButtonWithDropdown.js";
|
|
52
|
-
export { Accordion, AccordionProps, Alert, AlertProps, AppendedProps, Badge, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonType, ButtonVariant, ButtonWithDropdown, ButtonWithDropdownProps, ButtonWithPopover, ButtonWithPopoverProps, Carousel, CarouselProps, Checkbox, CheckboxProps, Collapse, CollapseProps, DEFAULT_TOOL_TIP_DELAY, DimensionStyle, DropdownItems, DropdownProps, DropdownSubItem, FormControlElement, GroupBase, GroupedOption, Icon, IconPosition, IconProps, IconSize, IconType, InputGroup, InputGroupPlacement, InputGroupProps, InputLengthStyleProps, Modal, ModalProps, ModalSize, Option, OptionProps, ProgressBar, ProgressBarProps, ProgressIndicatorProps, QTip, QTipDataAttributes, QomponentsTheme, SeeqActionDropdown, SeeqActionDropdownItems, SeeqActionDropdownProps, Select, SelectComponents, SelectProps, Slider, SliderProps, SvgIconProps, SvgIconType, Tabs, TabsProps, TextArea, TextAreaProps, TextField, TextFieldProps, TitleIconPosition, ToolbarButton, ToolbarButtonProps, ToolbarButtonVariant, Tooltip, TooltipComponentProps, TooltipPosition, TooltipProps, TriggerWithDropdown, TriggerWithDropdownProps, buttonSizes, buttonTypes, buttonVariants, iconPositions, iconTypes, svgIconTypes, toolbarButtonVariants, tooltipPositions };
|
|
53
|
+
export { Accordion, AccordionProps, Alert, AlertProps, AppendedProps, Badge, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonType, ButtonVariant, ButtonWithDropdown, ButtonWithDropdownProps, ButtonWithPopover, ButtonWithPopoverProps, Carousel, CarouselProps, Checkbox, CheckboxProps, Collapse, CollapseProps, DEFAULT_TOOL_TIP_DELAY, DimensionStyle, DropdownItems, DropdownProps, DropdownSubItem, FormControlElement, GroupBase, GroupedOption, Icon, IconPosition, IconProps, IconSize, IconType, InputGroup, InputGroupPlacement, InputGroupProps, InputLengthStyleProps, LoadingIndicator, Modal, ModalProps, ModalSize, Option, OptionProps, ProgressBar, ProgressBarProps, ProgressIndicatorProps, QTip, QTipDataAttributes, QomponentsTheme, SeeqActionDropdown, SeeqActionDropdownItems, SeeqActionDropdownProps, Select, SelectComponents, SelectProps, Slider, SliderProps, SvgIconProps, SvgIconType, Tabs, TabsProps, TextArea, TextAreaProps, TextField, TextFieldProps, TitleIconPosition, ToolbarButton, ToolbarButtonProps, ToolbarButtonVariant, Tooltip, TooltipComponentProps, TooltipPosition, TooltipProps, TriggerWithDropdown, TriggerWithDropdownProps, buttonSizes, buttonTypes, buttonVariants, iconPositions, iconTypes, svgIconTypes, toolbarButtonVariants, tooltipPositions };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -46,7 +46,8 @@ import Collapse from "./Collapse/Collapse.js";
|
|
|
46
46
|
import { Slider } from "./Slider/Slider.js";
|
|
47
47
|
import ProgressBar from "./ProgressBar/ProgressBar.js";
|
|
48
48
|
import Carousel from "./Carousel/Carousel.js";
|
|
49
|
+
import LoadingIndicator from "./LoadingIndicator/LoadingIndicator.js";
|
|
49
50
|
import { QomponentsTheme } from "./constants.js";
|
|
50
51
|
import { ButtonWithDropdownProps, DropdownItems, DropdownProps, DropdownSubItem } from "./ButtonWithDropdown/ButtonWithDropdown.types.js";
|
|
51
52
|
import ButtonWithDropdown from "./ButtonWithDropdown/ButtonWithDropdown.js";
|
|
52
|
-
export { Accordion, AccordionProps, Alert, AlertProps, AppendedProps, Badge, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonType, ButtonVariant, ButtonWithDropdown, ButtonWithDropdownProps, ButtonWithPopover, ButtonWithPopoverProps, Carousel, CarouselProps, Checkbox, CheckboxProps, Collapse, CollapseProps, DEFAULT_TOOL_TIP_DELAY, DimensionStyle, DropdownItems, DropdownProps, DropdownSubItem, FormControlElement, type GroupBase, GroupedOption, Icon, IconPosition, IconProps, IconSize, IconType, InputGroup, InputGroupPlacement, InputGroupProps, InputLengthStyleProps, Modal, ModalProps, ModalSize, Option, type OptionProps, ProgressBar, ProgressBarProps, ProgressIndicatorProps, QTip, QTipDataAttributes, type QomponentsTheme, SeeqActionDropdown, SeeqActionDropdownItems, SeeqActionDropdownProps, Select, SelectComponents, SelectProps, Slider, SliderProps, SvgIconProps, SvgIconType, Tabs, TabsProps, TextArea, TextAreaProps, TextField, TextFieldProps, TitleIconPosition, ToolbarButton, ToolbarButtonProps, ToolbarButtonVariant, Tooltip, TooltipComponentProps, TooltipPosition, TooltipProps, TriggerWithDropdown, TriggerWithDropdownProps, buttonSizes, buttonTypes, buttonVariants, iconPositions, iconTypes, svgIconTypes, toolbarButtonVariants, tooltipPositions };
|
|
53
|
+
export { Accordion, AccordionProps, Alert, AlertProps, AppendedProps, Badge, Button, ButtonGroup, ButtonGroupProps, ButtonProps, ButtonSize, ButtonType, ButtonVariant, ButtonWithDropdown, ButtonWithDropdownProps, ButtonWithPopover, ButtonWithPopoverProps, Carousel, CarouselProps, Checkbox, CheckboxProps, Collapse, CollapseProps, DEFAULT_TOOL_TIP_DELAY, DimensionStyle, DropdownItems, DropdownProps, DropdownSubItem, FormControlElement, type GroupBase, GroupedOption, Icon, IconPosition, IconProps, IconSize, IconType, InputGroup, InputGroupPlacement, InputGroupProps, InputLengthStyleProps, LoadingIndicator, Modal, ModalProps, ModalSize, Option, type OptionProps, ProgressBar, ProgressBarProps, ProgressIndicatorProps, QTip, QTipDataAttributes, type QomponentsTheme, SeeqActionDropdown, SeeqActionDropdownItems, SeeqActionDropdownProps, Select, SelectComponents, SelectProps, Slider, SliderProps, SvgIconProps, SvgIconType, Tabs, TabsProps, TextArea, TextAreaProps, TextField, TextFieldProps, TitleIconPosition, ToolbarButton, ToolbarButtonProps, ToolbarButtonVariant, Tooltip, TooltipComponentProps, TooltipPosition, TooltipProps, TriggerWithDropdown, TriggerWithDropdownProps, buttonSizes, buttonTypes, buttonVariants, iconPositions, iconTypes, svgIconTypes, toolbarButtonVariants, tooltipPositions };
|
package/dist/styles.css
CHANGED
|
@@ -3711,6 +3711,46 @@
|
|
|
3711
3711
|
.svgContainer path {
|
|
3712
3712
|
transform: translateX(0.5px) translateY(0.5px);
|
|
3713
3713
|
}
|
|
3714
|
+
.loading-spinner, .fa-spinner, .fa-circle-notch.fa-spin, .fa-refresh.fa-spin {
|
|
3715
|
+
--spinner-size: 40px;
|
|
3716
|
+
--thickness: 7px;
|
|
3717
|
+
position: relative;
|
|
3718
|
+
display: inline-block;
|
|
3719
|
+
flex: 0 0 auto;
|
|
3720
|
+
width: var(--spinner-size);
|
|
3721
|
+
height: var(--spinner-size);
|
|
3722
|
+
color: var(--spinner-color, var(--theme-dark, var(--sq-theme-color, #4086c4)));
|
|
3723
|
+
line-height: 1;
|
|
3724
|
+
vertical-align: middle;
|
|
3725
|
+
border-radius: 50%;
|
|
3726
|
+
background: conic-gradient(from 0deg, transparent, currentColor);
|
|
3727
|
+
-webkit-mask: radial-gradient( farthest-side, transparent calc(100% - var(--thickness)), black calc(100% - var(--thickness) + 0.5px) );
|
|
3728
|
+
mask: radial-gradient( farthest-side, transparent calc(100% - var(--thickness)), black calc(100% - var(--thickness) + 0.5px) );
|
|
3729
|
+
animation: spin 1s linear infinite;
|
|
3730
|
+
}
|
|
3731
|
+
.loading-spinner::before, .fa-spinner::before, .fa-circle-notch.fa-spin::before, .fa-refresh.fa-spin::before {
|
|
3732
|
+
content: '';
|
|
3733
|
+
position: absolute;
|
|
3734
|
+
top: 0;
|
|
3735
|
+
left: 50%;
|
|
3736
|
+
width: var(--thickness);
|
|
3737
|
+
height: var(--thickness);
|
|
3738
|
+
background: currentColor;
|
|
3739
|
+
border-radius: 50%;
|
|
3740
|
+
transform: translateX(-50%);
|
|
3741
|
+
}
|
|
3742
|
+
.loading-spinner-icon, .fa-spinner, .fa-circle-notch.fa-spin, .fa-refresh.fa-spin {
|
|
3743
|
+
--spinner-size: 1em;
|
|
3744
|
+
--thickness: 0.18em;
|
|
3745
|
+
}
|
|
3746
|
+
@keyframes spin {
|
|
3747
|
+
from {
|
|
3748
|
+
transform: rotate(0deg);
|
|
3749
|
+
}
|
|
3750
|
+
to {
|
|
3751
|
+
transform: rotate(360deg);
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3714
3754
|
@property --tw-translate-x {
|
|
3715
3755
|
syntax: "*";
|
|
3716
3756
|
inherits: false;
|