@digital-ai/dot-components 1.21.0 → 1.21.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/CHANGE_LOG.md +10 -0
- package/index.esm.js +15 -3
- package/index.umd.js +22 -9
- package/lib/components/avatar/Avatar.d.ts +3 -1
- package/lib/components/pill/Pill.d.ts +9 -2
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.21.1](https://github.com/digital-ai/dot-components/tree/1.21.1) (08/31/2022)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/digital-ai/dot-components/compare/1.21.0...1.21.1)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- Add focus state on Avatar With Tooltip component [\#1246](https://github.com/digital-ai/dot-components/issues/1246)
|
|
10
|
+
- D-22238 Add focus state for Avatar With Tooltip [\#1248](https://github.com/digital-ai/dot-components/pull/1248) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
11
|
+
- S-87031: Extended DotPill props to support account list changes [\#1247](https://github.com/digital-ai/dot-components/pull/1247) ([ryangamble](https://github.com/ryangamble))
|
|
12
|
+
|
|
3
13
|
## [1.21.0](https://github.com/digital-ai/dot-components/tree/1.21.0) (08/22/2022)
|
|
4
14
|
|
|
5
15
|
[Full Changelog](https://github.com/digital-ai/dot-components/compare/1.20.0...1.21.0)
|
package/index.esm.js
CHANGED
|
@@ -1328,6 +1328,7 @@ const DotAvatar = ({
|
|
|
1328
1328
|
imageSrc,
|
|
1329
1329
|
onClick,
|
|
1330
1330
|
size: _size = 'medium',
|
|
1331
|
+
tabIndex: _tabIndex = 0,
|
|
1331
1332
|
text: _text = alt,
|
|
1332
1333
|
type: _type = 'image',
|
|
1333
1334
|
tooltip,
|
|
@@ -1359,6 +1360,7 @@ const DotAvatar = ({
|
|
|
1359
1360
|
onClick: event => onClick ? onClick(event) : null,
|
|
1360
1361
|
src: _type === 'image' ? imageSrc : null,
|
|
1361
1362
|
style: style,
|
|
1363
|
+
tabIndex: tooltip ? _tabIndex : undefined,
|
|
1362
1364
|
variant: _variant
|
|
1363
1365
|
}, {
|
|
1364
1366
|
children: jsx(AvatarContent, {
|
|
@@ -6475,7 +6477,7 @@ const StyledPill = styled(Chip).withConfig({
|
|
|
6475
6477
|
componentId: "l7oxi2-0"
|
|
6476
6478
|
})(["", ""], ({
|
|
6477
6479
|
theme
|
|
6478
|
-
}) => css(["&.", "{background-color:", ";color:", ";&.error{background-color:", ";color:", ";}&.success{background-color:", ";color:", ";}&.warning{background-color:", ";color:", ";}&.in-progress{background-color:", ";color:", ";}"], rootClassName$l, ({
|
|
6480
|
+
}) => css(["&.", "{background-color:", ";color:", ";border-color:", ";&.error{background-color:", ";color:", ";}&.success{background-color:", ";color:", ";}&.warning{background-color:", ";color:", ";}&.in-progress{background-color:", ";color:", ";}"], rootClassName$l, ({
|
|
6479
6481
|
backgroundcolor
|
|
6480
6482
|
}) => {
|
|
6481
6483
|
return backgroundcolor ? backgroundcolor : theme.palette.product === 'agility' ? theme.palette.layer.n100 : theme.palette.grey[200];
|
|
@@ -6483,30 +6485,40 @@ const StyledPill = styled(Chip).withConfig({
|
|
|
6483
6485
|
labelcolor
|
|
6484
6486
|
}) => {
|
|
6485
6487
|
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
6488
|
+
}, ({
|
|
6489
|
+
bordercolor
|
|
6490
|
+
}) => {
|
|
6491
|
+
return bordercolor ? bordercolor : theme.palette.layer.n700;
|
|
6486
6492
|
}, theme.palette.error[500], theme.palette.layer.n0, theme.palette.success[500], theme.palette.layer.n0, theme.palette.warning[500], theme.palette.layer.n700, theme.palette.primary.main, theme.palette.layer.n0));
|
|
6487
6493
|
|
|
6488
6494
|
const DotPill = ({
|
|
6489
6495
|
ariaLabel,
|
|
6490
6496
|
backgroundcolor,
|
|
6497
|
+
bordercolor,
|
|
6491
6498
|
className,
|
|
6492
6499
|
'data-testid': dataTestId,
|
|
6500
|
+
icon,
|
|
6493
6501
|
label,
|
|
6494
6502
|
labelcolor,
|
|
6495
6503
|
size: _size = 'medium',
|
|
6496
|
-
status: _status = 'default'
|
|
6504
|
+
status: _status = 'default',
|
|
6505
|
+
variant: _variant = 'default'
|
|
6497
6506
|
}) => {
|
|
6498
6507
|
const rootClasses = useStylesWithRootClass(rootClassName$l, className, _status);
|
|
6499
6508
|
return jsx(StyledPill, {
|
|
6500
6509
|
"aria-label": ariaLabel,
|
|
6510
|
+
bordercolor: bordercolor,
|
|
6501
6511
|
backgroundcolor: backgroundcolor,
|
|
6502
6512
|
classes: {
|
|
6503
6513
|
root: rootClasses
|
|
6504
6514
|
},
|
|
6505
6515
|
clickable: false,
|
|
6506
6516
|
"data-testid": dataTestId,
|
|
6517
|
+
icon: icon,
|
|
6507
6518
|
label: label,
|
|
6508
6519
|
labelcolor: labelcolor,
|
|
6509
|
-
size: _size
|
|
6520
|
+
size: _size,
|
|
6521
|
+
variant: _variant
|
|
6510
6522
|
}, void 0);
|
|
6511
6523
|
};
|
|
6512
6524
|
|
package/index.umd.js
CHANGED
|
@@ -1473,13 +1473,15 @@
|
|
|
1473
1473
|
onClick = _a.onClick,
|
|
1474
1474
|
_c = _a.size,
|
|
1475
1475
|
size = _c === void 0 ? 'medium' : _c,
|
|
1476
|
-
_d = _a.
|
|
1477
|
-
|
|
1478
|
-
_e = _a.
|
|
1479
|
-
|
|
1476
|
+
_d = _a.tabIndex,
|
|
1477
|
+
tabIndex = _d === void 0 ? 0 : _d,
|
|
1478
|
+
_e = _a.text,
|
|
1479
|
+
text = _e === void 0 ? alt : _e,
|
|
1480
|
+
_f = _a.type,
|
|
1481
|
+
type = _f === void 0 ? 'image' : _f,
|
|
1480
1482
|
tooltip = _a.tooltip,
|
|
1481
|
-
|
|
1482
|
-
variant =
|
|
1483
|
+
_g = _a.variant,
|
|
1484
|
+
variant = _g === void 0 ? 'circular' : _g,
|
|
1483
1485
|
style = _a.style;
|
|
1484
1486
|
var rootClasses = useStylesWithRootClass(rootClassName$T, className);
|
|
1485
1487
|
|
|
@@ -1508,6 +1510,7 @@
|
|
|
1508
1510
|
},
|
|
1509
1511
|
src: type === 'image' ? imageSrc : null,
|
|
1510
1512
|
style: style,
|
|
1513
|
+
tabIndex: tooltip ? tabIndex : undefined,
|
|
1511
1514
|
variant: variant
|
|
1512
1515
|
}, {
|
|
1513
1516
|
children: jsxRuntime.jsx(AvatarContent, {
|
|
@@ -6998,12 +7001,15 @@
|
|
|
6998
7001
|
componentId: "l7oxi2-0"
|
|
6999
7002
|
})(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
7000
7003
|
var theme = _a.theme;
|
|
7001
|
-
return styled.css(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n &.", " {\n background-color: ", ";\n color: ", ";\n\n &.error {\n background-color: ", ";\n color: ", ";\n }\n\n &.success {\n background-color: ", ";\n color: ", ";\n }\n &.warning {\n background-color: ", ";\n color: ", ";\n }\n\n &.in-progress {\n background-color: ", ";\n color: ", ";\n }\n "], ["\n &.", " {\n background-color: ", ";\n color: ", ";\n\n &.error {\n background-color: ", ";\n color: ", ";\n }\n\n &.success {\n background-color: ", ";\n color: ", ";\n }\n &.warning {\n background-color: ", ";\n color: ", ";\n }\n\n &.in-progress {\n background-color: ", ";\n color: ", ";\n }\n "])), rootClassName$l, function (_a) {
|
|
7004
|
+
return styled.css(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n &.", " {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n &.error {\n background-color: ", ";\n color: ", ";\n }\n\n &.success {\n background-color: ", ";\n color: ", ";\n }\n &.warning {\n background-color: ", ";\n color: ", ";\n }\n\n &.in-progress {\n background-color: ", ";\n color: ", ";\n }\n "], ["\n &.", " {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n &.error {\n background-color: ", ";\n color: ", ";\n }\n\n &.success {\n background-color: ", ";\n color: ", ";\n }\n &.warning {\n background-color: ", ";\n color: ", ";\n }\n\n &.in-progress {\n background-color: ", ";\n color: ", ";\n }\n "])), rootClassName$l, function (_a) {
|
|
7002
7005
|
var backgroundcolor = _a.backgroundcolor;
|
|
7003
7006
|
return backgroundcolor ? backgroundcolor : theme.palette.product === 'agility' ? theme.palette.layer.n100 : theme.palette.grey[200];
|
|
7004
7007
|
}, function (_a) {
|
|
7005
7008
|
var labelcolor = _a.labelcolor;
|
|
7006
7009
|
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
7010
|
+
}, function (_a) {
|
|
7011
|
+
var bordercolor = _a.bordercolor;
|
|
7012
|
+
return bordercolor ? bordercolor : theme.palette.layer.n700;
|
|
7007
7013
|
}, theme.palette.error[500], theme.palette.layer.n0, theme.palette.success[500], theme.palette.layer.n0, theme.palette.warning[500], theme.palette.layer.n700, theme.palette.primary.main, theme.palette.layer.n0);
|
|
7008
7014
|
});
|
|
7009
7015
|
var templateObject_1$l, templateObject_2$l;
|
|
@@ -7011,26 +7017,33 @@
|
|
|
7011
7017
|
var DotPill = function DotPill(_a) {
|
|
7012
7018
|
var ariaLabel = _a.ariaLabel,
|
|
7013
7019
|
backgroundcolor = _a.backgroundcolor,
|
|
7020
|
+
bordercolor = _a.bordercolor,
|
|
7014
7021
|
className = _a.className,
|
|
7015
7022
|
dataTestId = _a["data-testid"],
|
|
7023
|
+
icon = _a.icon,
|
|
7016
7024
|
label = _a.label,
|
|
7017
7025
|
labelcolor = _a.labelcolor,
|
|
7018
7026
|
_b = _a.size,
|
|
7019
7027
|
size = _b === void 0 ? 'medium' : _b,
|
|
7020
7028
|
_c = _a.status,
|
|
7021
|
-
status = _c === void 0 ? 'default' : _c
|
|
7029
|
+
status = _c === void 0 ? 'default' : _c,
|
|
7030
|
+
_d = _a.variant,
|
|
7031
|
+
variant = _d === void 0 ? 'default' : _d;
|
|
7022
7032
|
var rootClasses = useStylesWithRootClass(rootClassName$l, className, status);
|
|
7023
7033
|
return jsxRuntime.jsx(StyledPill, {
|
|
7024
7034
|
"aria-label": ariaLabel,
|
|
7035
|
+
bordercolor: bordercolor,
|
|
7025
7036
|
backgroundcolor: backgroundcolor,
|
|
7026
7037
|
classes: {
|
|
7027
7038
|
root: rootClasses
|
|
7028
7039
|
},
|
|
7029
7040
|
clickable: false,
|
|
7030
7041
|
"data-testid": dataTestId,
|
|
7042
|
+
icon: icon,
|
|
7031
7043
|
label: label,
|
|
7032
7044
|
labelcolor: labelcolor,
|
|
7033
|
-
size: size
|
|
7045
|
+
size: size,
|
|
7046
|
+
variant: variant
|
|
7034
7047
|
}, void 0);
|
|
7035
7048
|
};
|
|
7036
7049
|
|
|
@@ -21,6 +21,8 @@ export interface AvatarProps extends CommonProps {
|
|
|
21
21
|
size?: AvatarSize;
|
|
22
22
|
/** To be used to override styles inline */
|
|
23
23
|
style?: CSSProperties;
|
|
24
|
+
/** tab order for the avatar */
|
|
25
|
+
tabIndex?: number;
|
|
24
26
|
/** The text to be displayed. Only the first 2 letters will be displayed. */
|
|
25
27
|
text?: string;
|
|
26
28
|
/** Tooltip for avatar */
|
|
@@ -30,4 +32,4 @@ export interface AvatarProps extends CommonProps {
|
|
|
30
32
|
/** The shape of the avatar */
|
|
31
33
|
variant?: AvatarVariant;
|
|
32
34
|
}
|
|
33
|
-
export declare const DotAvatar: ({ alt, ariaLabel, className, component, color, "data-testid": dataTestId, iconId, imageSrc, onClick, size, text, type, tooltip, variant, style, }: AvatarProps) => JSX.Element;
|
|
35
|
+
export declare const DotAvatar: ({ alt, ariaLabel, className, component, color, "data-testid": dataTestId, iconId, imageSrc, onClick, size, tabIndex, text, type, tooltip, variant, style, }: AvatarProps) => JSX.Element;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export declare type PillSize = 'small' | 'medium';
|
|
4
4
|
export declare type PillStatus = 'success' | 'error' | 'warning' | 'in-progress' | 'default';
|
|
5
|
+
export declare type PillVariant = 'default' | 'outlined';
|
|
5
6
|
export interface PillProps extends CommonProps {
|
|
6
7
|
/** Background color for the pill, ignored if 'status' is not 'default' */
|
|
7
8
|
backgroundcolor?: string;
|
|
9
|
+
/** Border color for the pill, ignored if 'status' is not 'default' */
|
|
10
|
+
bordercolor?: string;
|
|
11
|
+
/** The icon for the pill */
|
|
12
|
+
icon?: ReactElement;
|
|
8
13
|
/** The text for the pill. */
|
|
9
14
|
label: string;
|
|
10
15
|
/** Label color for the pill, ignored if 'status' is not 'default' */
|
|
@@ -13,5 +18,7 @@ export interface PillProps extends CommonProps {
|
|
|
13
18
|
size?: PillSize;
|
|
14
19
|
/** Determines the status of the pill component */
|
|
15
20
|
status?: PillStatus;
|
|
21
|
+
/** Determines the variant of the pill 'default' or 'outlined' */
|
|
22
|
+
variant?: PillVariant;
|
|
16
23
|
}
|
|
17
|
-
export declare const DotPill: ({ ariaLabel, backgroundcolor, className, "data-testid": dataTestId, label, labelcolor, size, status, }: PillProps) => JSX.Element;
|
|
24
|
+
export declare const DotPill: ({ ariaLabel, backgroundcolor, bordercolor, className, "data-testid": dataTestId, icon, label, labelcolor, size, status, variant, }: PillProps) => JSX.Element;
|