@digital-ai/dot-components 3.9.0 → 3.10.1
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/index.esm.js
CHANGED
|
@@ -5733,6 +5733,7 @@ const DotSidebar = ({
|
|
|
5733
5733
|
setIsOpen(!isOpen);
|
|
5734
5734
|
};
|
|
5735
5735
|
useEffect(() => {
|
|
5736
|
+
if (!collapsable) return;
|
|
5736
5737
|
const handleKeyPress = event => {
|
|
5737
5738
|
const element = event.target;
|
|
5738
5739
|
if (event.key === collapseKey && !['INPUT', 'TEXTAREA'].includes(element.nodeName) && !element.isContentEditable) {
|
|
@@ -5743,7 +5744,7 @@ const DotSidebar = ({
|
|
|
5743
5744
|
return () => {
|
|
5744
5745
|
window.removeEventListener('keydown', handleKeyPress);
|
|
5745
5746
|
};
|
|
5746
|
-
}, [isOpen]);
|
|
5747
|
+
}, [isOpen, collapsable]);
|
|
5747
5748
|
const sidebarClasses = useStylesWithRootClass('side-nav', openClass);
|
|
5748
5749
|
const rootClasses = useStylesWithRootClass(rootClassName$X, openClass, className);
|
|
5749
5750
|
return jsxs(StyledSidebar, {
|
|
@@ -5796,7 +5797,7 @@ const DotSidebar = ({
|
|
|
5796
5797
|
}), collapsable && jsx("div", {
|
|
5797
5798
|
className: "toggle-nav",
|
|
5798
5799
|
children: jsx(DotTooltip, {
|
|
5799
|
-
title: (isOpen ? 'Collapse' : 'Expand') + ` ${collapseKey}`,
|
|
5800
|
+
title: (isOpen ? 'Collapse' : 'Expand') + ` ${collapseKey.toUpperCase()}`,
|
|
5800
5801
|
placement: "right",
|
|
5801
5802
|
children: jsx(DotIconButton, {
|
|
5802
5803
|
ariaLabel: "collapse sidebar navigation",
|
|
@@ -12790,6 +12791,7 @@ const DotPill = ({
|
|
|
12790
12791
|
icon,
|
|
12791
12792
|
label,
|
|
12792
12793
|
labelcolor,
|
|
12794
|
+
onClick,
|
|
12793
12795
|
size = 'medium',
|
|
12794
12796
|
status = 'default',
|
|
12795
12797
|
variant = 'filled'
|
|
@@ -12802,11 +12804,12 @@ const DotPill = ({
|
|
|
12802
12804
|
classes: {
|
|
12803
12805
|
root: rootClasses
|
|
12804
12806
|
},
|
|
12805
|
-
clickable:
|
|
12807
|
+
clickable: !!onClick,
|
|
12806
12808
|
"data-testid": dataTestId,
|
|
12807
12809
|
icon: icon,
|
|
12808
12810
|
label: label,
|
|
12809
12811
|
labelcolor: labelcolor,
|
|
12812
|
+
onClick: onClick,
|
|
12810
12813
|
size: size,
|
|
12811
12814
|
variant: variant
|
|
12812
12815
|
});
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonProps } from '../CommonProps';
|
|
2
|
-
export type LinearProgressColor = '
|
|
2
|
+
export type LinearProgressColor = 'error' | 'inherit' | 'primary' | 'purple' | 'secondary' | 'warning';
|
|
3
3
|
export type LinearProgressVariant = 'buffer' | 'determinate' | 'indeterminate' | 'query';
|
|
4
4
|
export interface LinearProgressProps extends CommonProps {
|
|
5
5
|
/** The color of the component. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ReactElement, MouseEvent } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export type PillSize = 'small' | 'medium';
|
|
4
4
|
export type PillStatus = 'success' | 'error' | 'warning' | 'in-progress' | 'default';
|
|
@@ -14,6 +14,8 @@ export interface PillProps extends CommonProps {
|
|
|
14
14
|
label: string;
|
|
15
15
|
/** Label color for the pill, ignored if 'status' is not 'default' */
|
|
16
16
|
labelcolor?: string;
|
|
17
|
+
/** Event callback on click */
|
|
18
|
+
onClick?: (event: MouseEvent) => void;
|
|
17
19
|
/** Determines the size of the pill 'medium' or 'small' */
|
|
18
20
|
size?: PillSize;
|
|
19
21
|
/** Determines the status of the pill component */
|
|
@@ -21,4 +23,4 @@ export interface PillProps extends CommonProps {
|
|
|
21
23
|
/** Determines the variant of the pill 'filled' or 'outlined' */
|
|
22
24
|
variant?: PillVariant;
|
|
23
25
|
}
|
|
24
|
-
export declare const DotPill: ({ ariaLabel, backgroundcolor, bordercolor, className, "data-testid": dataTestId, icon, label, labelcolor, size, status, variant, }: PillProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const DotPill: ({ ariaLabel, backgroundcolor, bordercolor, className, "data-testid": dataTestId, icon, label, labelcolor, onClick, size, status, variant, }: PillProps) => import("react/jsx-runtime").JSX.Element;
|