@spaced-out/ui-design-system 0.3.14 → 0.3.15
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/CHANGELOG.md +14 -0
- package/lib/components/AvatarGroup/AvatarGroup.js +8 -2
- package/lib/components/AvatarGroup/AvatarGroup.js.flow +9 -2
- package/lib/components/ChatBubble/ChatBubble.module.css +6 -1
- package/lib/components/PromptChip/PromptChip.js +5 -3
- package/lib/components/PromptChip/PromptChip.js.flow +8 -3
- package/lib/components/PromptChip/PromptChip.module.css +20 -9
- package/lib/components/PromptInput/PromptInput.module.css +1 -1
- package/lib/components/TextTile/TextTile.module.css +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.3.15](https://github.com/spaced-out/ui-design-system/compare/v0.3.14...v0.3.15) (2024-12-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added tooltip to avatarGroup ([#310](https://github.com/spaced-out/ui-design-system/issues/310)) ([5ed558a](https://github.com/spaced-out/ui-design-system/commit/5ed558aef65f29a82e9ae0f5f130eb00fb444830))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* fixed content design fixes ([#309](https://github.com/spaced-out/ui-design-system/issues/309)) ([120de80](https://github.com/spaced-out/ui-design-system/commit/120de8085a731009d6a920c0b8bc11848b3472f4))
|
|
16
|
+
* updated docs for dismissable ([8c5dcbe](https://github.com/spaced-out/ui-design-system/commit/8c5dcbe9bb7140e4c7bf5dbb29dbd784f9579b51))
|
|
17
|
+
* uses a design token ([a01d821](https://github.com/spaced-out/ui-design-system/commit/a01d82193f4738a25384172e77e2c53d82480143))
|
|
18
|
+
|
|
5
19
|
### [0.3.14](https://github.com/spaced-out/ui-design-system/compare/v0.3.13...v0.3.14) (2024-12-19)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -36,13 +36,14 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
36
36
|
let colorIndex = -1;
|
|
37
37
|
const avatarInGroup = (child, index, color) => {
|
|
38
38
|
const {
|
|
39
|
-
classNames
|
|
39
|
+
classNames,
|
|
40
|
+
text
|
|
40
41
|
} = child.props;
|
|
41
42
|
const {
|
|
42
43
|
wrapper,
|
|
43
44
|
...restClassNames
|
|
44
45
|
} = classNames || {};
|
|
45
|
-
|
|
46
|
+
const avatar = /*#__PURE__*/React.cloneElement(child, {
|
|
46
47
|
size,
|
|
47
48
|
classNames: {
|
|
48
49
|
wrapper: (0, _classify.default)(_AvatarGroupModule.default.avatarInGroup, wrapper),
|
|
@@ -54,6 +55,11 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
54
55
|
},
|
|
55
56
|
color
|
|
56
57
|
});
|
|
58
|
+
return text ? /*#__PURE__*/React.createElement(_Tooltip.Tooltip, {
|
|
59
|
+
body: text,
|
|
60
|
+
placement: placement,
|
|
61
|
+
elevation: tooltipElevation
|
|
62
|
+
}, avatar) : avatar;
|
|
57
63
|
};
|
|
58
64
|
const childrenArray = React.Children.toArray(children);
|
|
59
65
|
const totalAvatarCount = childrenArray.length;
|
|
@@ -57,9 +57,9 @@ export const AvatarGroup: React$AbstractComponent<
|
|
|
57
57
|
let colorIndex = -1;
|
|
58
58
|
|
|
59
59
|
const avatarInGroup = (child, index, color) => {
|
|
60
|
-
const {classNames} = child.props;
|
|
60
|
+
const {classNames, text} = child.props;
|
|
61
61
|
const {wrapper, ...restClassNames} = classNames || {};
|
|
62
|
-
|
|
62
|
+
const avatar = React.cloneElement(child, {
|
|
63
63
|
size,
|
|
64
64
|
classNames: {
|
|
65
65
|
wrapper: classify(css.avatarInGroup, wrapper),
|
|
@@ -71,6 +71,13 @@ export const AvatarGroup: React$AbstractComponent<
|
|
|
71
71
|
},
|
|
72
72
|
color,
|
|
73
73
|
});
|
|
74
|
+
return text ? (
|
|
75
|
+
<Tooltip body={text} placement={placement} elevation={tooltipElevation}>
|
|
76
|
+
{avatar}
|
|
77
|
+
</Tooltip>
|
|
78
|
+
) : (
|
|
79
|
+
avatar
|
|
80
|
+
);
|
|
74
81
|
};
|
|
75
82
|
|
|
76
83
|
const childrenArray = React.Children.toArray(children);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@value (
|
|
2
2
|
spaceNone,
|
|
3
|
+
spaceXXSmall,
|
|
3
4
|
spaceXSmall,
|
|
4
5
|
spaceSmall
|
|
5
6
|
) from '../../styles/variables/_space.css';
|
|
@@ -49,12 +50,14 @@
|
|
|
49
50
|
.chatContentWrapper {
|
|
50
51
|
display: flex;
|
|
51
52
|
flex-direction: column;
|
|
53
|
+
justify-content: center;
|
|
52
54
|
gap: spaceXSmall;
|
|
53
55
|
border: borderWidthPrimary solid colorBorderPrimary;
|
|
54
56
|
border-radius: borderRadiusSmall;
|
|
55
57
|
background-color: colorBackgroundTertiary;
|
|
56
|
-
padding: spaceSmall;
|
|
58
|
+
padding: spaceXSmall spaceSmall;
|
|
57
59
|
max-width: size580;
|
|
60
|
+
min-height: size42;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
.chatBodyWrapper {
|
|
@@ -64,6 +67,8 @@
|
|
|
64
67
|
|
|
65
68
|
.chatBodyWrapperBgColor {
|
|
66
69
|
background-color: colorNeutralLightest;
|
|
70
|
+
margin-top: spaceXXSmall;
|
|
71
|
+
word-wrap: break-word;
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
.chatBodyWrapperLoading {
|
|
@@ -27,7 +27,7 @@ const PromptChip = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
27
27
|
iconType = _Icon.ICON_TYPE.solid,
|
|
28
28
|
iconName = 'lightbulb',
|
|
29
29
|
children,
|
|
30
|
-
iconColor
|
|
30
|
+
iconColor,
|
|
31
31
|
rightSlot,
|
|
32
32
|
onDismiss,
|
|
33
33
|
classNames,
|
|
@@ -56,7 +56,7 @@ const PromptChip = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
56
56
|
role: "button"
|
|
57
57
|
}, /*#__PURE__*/React.createElement("div", {
|
|
58
58
|
className: (0, _classify.classify)(_PromptChipModule.default.promptChipContainer, {
|
|
59
|
-
[_PromptChipModule.default.
|
|
59
|
+
[_PromptChipModule.default.promptChipContainerHover]: !!onClick
|
|
60
60
|
}, classNames?.container)
|
|
61
61
|
}, /*#__PURE__*/React.createElement("div", {
|
|
62
62
|
className: _PromptChipModule.default.leftSection
|
|
@@ -65,7 +65,9 @@ const PromptChip = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
65
65
|
name: iconName,
|
|
66
66
|
type: iconType,
|
|
67
67
|
color: iconColor,
|
|
68
|
-
className:
|
|
68
|
+
className: (0, _classify.classify)({
|
|
69
|
+
[_PromptChipModule.default.chipIconDefaultColor]: !iconColor
|
|
70
|
+
}, classNames?.icon)
|
|
69
71
|
}), !!children && /*#__PURE__*/React.createElement("div", {
|
|
70
72
|
className: (0, _classify.classify)(_PromptChipModule.default.childrenWrapper, classNames?.children)
|
|
71
73
|
}, children)), /*#__PURE__*/React.createElement("div", {
|
|
@@ -58,7 +58,7 @@ export const PromptChip: React$AbstractComponent<
|
|
|
58
58
|
iconType = ICON_TYPE.solid,
|
|
59
59
|
iconName = 'lightbulb',
|
|
60
60
|
children,
|
|
61
|
-
iconColor
|
|
61
|
+
iconColor,
|
|
62
62
|
rightSlot,
|
|
63
63
|
onDismiss,
|
|
64
64
|
classNames,
|
|
@@ -98,7 +98,7 @@ export const PromptChip: React$AbstractComponent<
|
|
|
98
98
|
className={classify(
|
|
99
99
|
css.promptChipContainer,
|
|
100
100
|
{
|
|
101
|
-
[css.
|
|
101
|
+
[css.promptChipContainerHover]: !!onClick,
|
|
102
102
|
},
|
|
103
103
|
classNames?.container,
|
|
104
104
|
)}
|
|
@@ -109,7 +109,12 @@ export const PromptChip: React$AbstractComponent<
|
|
|
109
109
|
name={iconName}
|
|
110
110
|
type={iconType}
|
|
111
111
|
color={iconColor}
|
|
112
|
-
className={
|
|
112
|
+
className={classify(
|
|
113
|
+
{
|
|
114
|
+
[css.chipIconDefaultColor]: !iconColor,
|
|
115
|
+
},
|
|
116
|
+
classNames?.icon,
|
|
117
|
+
)}
|
|
113
118
|
/>
|
|
114
119
|
{!!children && (
|
|
115
120
|
<div
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
spaceFluid
|
|
5
5
|
) from '../../styles/variables/_space.css';
|
|
6
6
|
@value (
|
|
7
|
+
colorDataViz2,
|
|
7
8
|
colorFillPrimary,
|
|
8
9
|
colorInformation,
|
|
9
10
|
colorFocusPrimary,
|
|
10
11
|
colorFillSecondary,
|
|
12
|
+
colorTextClickable,
|
|
11
13
|
colorNeutralLightest,
|
|
12
14
|
colorBackgroundTertiary,
|
|
13
15
|
colorInformationLightest
|
|
@@ -24,6 +26,7 @@
|
|
|
24
26
|
) from '../../styles/variables/_opacity.css';
|
|
25
27
|
|
|
26
28
|
.promptChipWrapper {
|
|
29
|
+
composes: boxShadow2 from '../../styles/shadow.module.css';
|
|
27
30
|
display: flex;
|
|
28
31
|
border-radius: borderRadiusMedium;
|
|
29
32
|
outline: none;
|
|
@@ -50,15 +53,6 @@
|
|
|
50
53
|
background-color: colorNeutralLightest;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
.onHover:hover {
|
|
54
|
-
background-image: linear-gradient(
|
|
55
|
-
to right,
|
|
56
|
-
colorFillSecondary,
|
|
57
|
-
colorInformationLightest
|
|
58
|
-
);
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
56
|
.promptChipContainer {
|
|
63
57
|
display: flex;
|
|
64
58
|
width: spaceFluid;
|
|
@@ -68,6 +62,23 @@
|
|
|
68
62
|
align-items: center;
|
|
69
63
|
border-radius: borderRadiusMedium;
|
|
70
64
|
justify-content: space-between;
|
|
65
|
+
|
|
66
|
+
& .chipIconDefaultColor {
|
|
67
|
+
color: colorDataViz2;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.promptChipContainerHover:hover {
|
|
72
|
+
background-image: linear-gradient(
|
|
73
|
+
to right,
|
|
74
|
+
colorFillSecondary,
|
|
75
|
+
colorInformationLightest
|
|
76
|
+
);
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
|
|
79
|
+
& .chipIconDefaultColor {
|
|
80
|
+
color: colorTextClickable;
|
|
81
|
+
}
|
|
71
82
|
}
|
|
72
83
|
|
|
73
84
|
.leftSection,
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
colorFillPrimary,
|
|
7
7
|
colorInformation
|
|
8
8
|
) from '../../styles/variables/_color.css';
|
|
9
|
+
@value (size44) from '../../styles/variables/_size.css';
|
|
9
10
|
|
|
10
11
|
.textTileWrapper {
|
|
11
12
|
display: flex;
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
display: flex;
|
|
19
20
|
gap: spaceXSmall;
|
|
20
21
|
justify-content: center;
|
|
22
|
+
margin-left: calc(-1 * size44);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
.sparkles {
|