@seeqdev/qomponents 0.0.114 → 0.0.116
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/ProgressBar/ProgressBar.types.d.ts +23 -6
- package/dist/index.esm.js +10 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10 -11
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -6
- package/package.json +1 -1
- package/dist/Collapse/Collapse.d.ts +0 -4
- package/dist/Collapse/Collapse.stories.d.ts +0 -5
- package/dist/Collapse/Collapse.test.d.ts +0 -1
- package/dist/Collapse/Collapse.types.d.ts +0 -4
- package/dist/Collapse/index.d.ts +0 -1
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
|
|
2
|
+
/**
|
|
3
|
+
* The ProgressBar component displays a visual representation of a progress value.
|
|
4
|
+
*/
|
|
5
|
+
interface ProgressIndicatorProps extends TooltipComponentProps {
|
|
6
|
+
/** Additional classes to apply to the progress indicator. */
|
|
7
|
+
extraClasses?: string;
|
|
8
|
+
/** The test id for the progress indicator. */
|
|
9
|
+
testId?: string;
|
|
10
|
+
/** The value of the progress indicator, between 0 and max. */
|
|
3
11
|
value: number;
|
|
4
|
-
/** The
|
|
5
|
-
|
|
12
|
+
/** The color of the progress indicator. e.g. #ffffff */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** The label to display on the progress indicator. */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** Additional classes to apply to the label. */
|
|
17
|
+
labelClasses?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ProgressBarProps {
|
|
20
|
+
/** The indicator values */
|
|
21
|
+
values: ProgressIndicatorProps[];
|
|
6
22
|
/** The maximum value of the progress bar. */
|
|
7
23
|
max?: number;
|
|
8
|
-
/** Additional classes to apply to the progress bar. */
|
|
9
|
-
|
|
24
|
+
/** Additional classes to apply to the progress bar container. */
|
|
25
|
+
containerExtraClasses?: string;
|
|
10
26
|
/** The test id for the progress bar. */
|
|
11
27
|
testId?: string;
|
|
12
28
|
}
|
|
29
|
+
export {};
|
package/dist/index.esm.js
CHANGED
|
@@ -15948,7 +15948,7 @@ const InputGroup = React__default.forwardRef((props, ref) => {
|
|
|
15948
15948
|
const fieldAppliedClasses = `${fieldClasses} ${extraClassNames} ${lightTheme} ${darkTheme} ${borderRadius} ${showError ? errorClasses : borderColorClasses} `;
|
|
15949
15949
|
return (React__default.createElement("div", { id: id, className: appliedClasses },
|
|
15950
15950
|
field ? (React__default.createElement("div", { "data-testid": testId, className: `tw-flex tw-flex-1 tw-cursor-pointer active:tw-z-50 ${fieldAppliedClasses}` }, field)) : (React__default.createElement(TextField, { testId: testId, readonly: readonly, onChange: onChange, onKeyUp: onKeyUp, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, name: name, ref: ref, showError: showError, value: value, required: required, placeholder: placeholder, autoComplete: autoComplete, autoFocus: autoFocus, id: id, type: type, disabled: disabled, step: step, min: min, max: max, maxLength: maxLength, minLength: minLength, extraClassNames: `tw-flex tw-flex-1 tw-w-full tw-rounded-r-none focus:tw-z-30 ${extraClassNames}`, ...tooltipData })),
|
|
15951
|
-
append.filter(Boolean).map((item, index) => item?.variant === 'button' ? (React__default.createElement(Button, { key: index, extraClassNames: "tw-ml-[-1px] focus:tw-z-40 focus:tw-border tw-rounded-l-none tw-rounded-r-none last:tw-rounded-r-sm",
|
|
15951
|
+
append.filter(Boolean).map((item, index) => item?.variant === 'button' ? (React__default.createElement(Button, { key: index, extraClassNames: "tw-ml-[-1px] focus:tw-z-40 focus:tw-border tw-rounded-l-none tw-rounded-r-none last:tw-rounded-r-sm", ...item.buttonProps })) : (React__default.createElement("div", { key: index, className: `${borderColorClasses} tw-flex tw-items-center tw-justify-center tw-rounded-none tw-ml-[-1px] active:tw-z-30 active:tw-border tw-border last:tw-rounded-r-sm` }, item?.element)))));
|
|
15952
15952
|
});
|
|
15953
15953
|
|
|
15954
15954
|
// packages/core/number/src/number.ts
|
|
@@ -17165,16 +17165,15 @@ Defaulting to \`null\`.`;
|
|
|
17165
17165
|
var Root = Progress;
|
|
17166
17166
|
var Indicator = ProgressIndicator;
|
|
17167
17167
|
|
|
17168
|
-
const ProgressBar = ({
|
|
17169
|
-
|
|
17170
|
-
|
|
17171
|
-
|
|
17172
|
-
|
|
17173
|
-
|
|
17174
|
-
|
|
17175
|
-
|
|
17176
|
-
|
|
17177
|
-
React__default.createElement(Indicator, { className: `tw-ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw-h-full tw-bg-sq-color-dark tw-transition-transform tw-duration-[660ms] ${extraClasses}`, style: { transform: `translateX(-${100 - progress}%)` } }))));
|
|
17168
|
+
const ProgressBar = ({ values = [], max = 100, containerExtraClasses = '', }) => {
|
|
17169
|
+
return (React__default.createElement(Root, { className: `tw-relative tw-h-[18px] tw-w-full tw-overflow-hidden tw-rounded-[2.5px] tw-bg-sq-dark-gray dark:tw-bg-sq-dark-disabled-gray tw-flex tw-flex-1 ${containerExtraClasses}`, max: max, value: values.reduce((acc, { value }) => acc + value, 0) }, values.map(({ value, color = undefined, testId, label, extraClasses = '', labelClasses = '', ...tooltipProps }, i) => {
|
|
17170
|
+
const tooltipData = getQTipData(tooltipProps);
|
|
17171
|
+
return (React__default.createElement(Indicator, { className: `tw-ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw-w-full tw-h-full tw-duration-[660ms] tw-flex tw-bg-sq-color-dark ${extraClasses}`, ...tooltipData, "data-qtip-text": tooltipProps.tooltip ? tooltipProps.tooltip : `${value}%`, "data-testid": `progress-bar-indicator-${testId ? testId : value}`, key: `${i}-${value}`, style: {
|
|
17172
|
+
// Background color will default to the theme color if undefined
|
|
17173
|
+
backgroundColor: values.length === 1 ? undefined : color,
|
|
17174
|
+
width: `${(Number(value) / Number(max)) * 100}%`,
|
|
17175
|
+
} }, label ? (React__default.createElement("span", { className: `tw-left-1 tw-text-xs tw-text-sq-text-color dark:tw-text-sq-dark-text tw-items-center ${labelClasses}` }, label)) : undefined));
|
|
17176
|
+
})));
|
|
17178
17177
|
};
|
|
17179
17178
|
|
|
17180
17179
|
export { Accordion, Alert, Button, ButtonWithDropdown, ButtonWithPopover, Checkbox, Icon, InputGroup, Modal, ProgressBar, QTip, SeeqActionDropdown, Select, components as SelectCompoents, Slider, Tabs, TextArea, TextField, ToolbarButton, Tooltip };
|