@spaced-out/ui-design-system 0.3.12 → 0.3.13

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 CHANGED
@@ -2,6 +2,13 @@
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.13](https://github.com/spaced-out/ui-design-system/compare/v0.3.12...v0.3.13) (2024-12-18)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * Removed stories that are not required in Chatbubble ([#308](https://github.com/spaced-out/ui-design-system/issues/308)) ([4b65c32](https://github.com/spaced-out/ui-design-system/commit/4b65c32e544f8c9953de78d375ee4959957670d1))
11
+
5
12
  ### [0.3.12](https://github.com/spaced-out/ui-design-system/compare/v0.3.11...v0.3.12) (2024-12-18)
6
13
 
7
14
 
@@ -14,12 +14,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
16
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
- const getNamedComponent = (childrenArray, comp) => {
17
+ const getNamedComponent = (childrenArray, componentDisplayName) => {
18
18
  const nodes = [];
19
19
  for (const child of childrenArray) {
20
20
  if (
21
21
  // $FlowFixMe
22
- child?.type?.displayName === comp) {
22
+ child?.type?.displayName === componentDisplayName) {
23
23
  nodes.push(child);
24
24
  }
25
25
  }
@@ -44,7 +44,6 @@ const ChatBubble = /*#__PURE__*/React.forwardRef((_ref, ref) => {
44
44
  ref: ref,
45
45
  "data-testid": "ChatBubble",
46
46
  className: (0, _classify.default)(_ChatBubbleModule.default.chatBubbleWrapper, {
47
- [_ChatBubbleModule.default.chatBubbleWrapperLeft]: isLeftAligned,
48
47
  [_ChatBubbleModule.default.chatBubbleWrapperRight]: !isLeftAligned
49
48
  }, classNames?.wrapper)
50
49
  }, anchorComponent, chatComponent);
@@ -65,8 +64,8 @@ const ChatAnchor = _ref2 => {
65
64
  }), isAI ? /*#__PURE__*/React.createElement(_Icon.Icon, {
66
65
  name: "sparkle",
67
66
  color: "information",
68
- type: "solid",
69
- size: "large"
67
+ type: _Icon.ICON_TYPE.solid,
68
+ size: _Icon.ICON_SIZE.large
70
69
  }) : /*#__PURE__*/React.createElement(_Avatar.Avatar, avatarProps)));
71
70
  };
72
71
  exports.ChatAnchor = ChatAnchor;
@@ -3,9 +3,9 @@
3
3
  import * as React from 'react';
4
4
 
5
5
  import classify from '../../utils/classify';
6
+ import type {AvatarProps} from '../Avatar';
6
7
  import {Avatar} from '../Avatar';
7
- import type {AvatarProps} from '../Avatar/Avatar.js';
8
- import {Icon} from '../Icon';
8
+ import {Icon, ICON_SIZE, ICON_TYPE} from '../Icon';
9
9
  import type {BaseTooltipProps} from '../Tooltip';
10
10
  import {Tooltip} from '../Tooltip';
11
11
 
@@ -14,13 +14,13 @@ import css from './ChatBubble.module.css';
14
14
 
15
15
  const getNamedComponent = (
16
16
  childrenArray: Array<React.Node>,
17
- comp: string,
18
- ): React.Node | React.Node[] | null => {
17
+ componentDisplayName: string,
18
+ ): ?React.Node | React.Node[] => {
19
19
  const nodes: React.Node[] = [];
20
20
  for (const child of childrenArray) {
21
21
  if (
22
22
  // $FlowFixMe
23
- child?.type?.displayName === comp
23
+ child?.type?.displayName === componentDisplayName
24
24
  ) {
25
25
  nodes.push(child);
26
26
  }
@@ -62,7 +62,6 @@ export const ChatBubble: React$AbstractComponent<
62
62
  className={classify(
63
63
  css.chatBubbleWrapper,
64
64
  {
65
- [css.chatBubbleWrapperLeft]: isLeftAligned,
66
65
  [css.chatBubbleWrapperRight]: !isLeftAligned,
67
66
  },
68
67
  classNames?.wrapper,
@@ -94,7 +93,12 @@ export const ChatAnchor = ({
94
93
  >
95
94
  <Tooltip {...tooltip} hidden={!tooltip}>
96
95
  {isAI ? (
97
- <Icon name="sparkle" color="information" type="solid" size="large" />
96
+ <Icon
97
+ name="sparkle"
98
+ color="information"
99
+ type={ICON_TYPE.solid}
100
+ size={ICON_SIZE.large}
101
+ />
98
102
  ) : (
99
103
  <Avatar {...avatarProps} />
100
104
  )}
@@ -1,29 +1,41 @@
1
- @value (spaceNone,spaceXSmall,spaceSmall) from '../../styles/variables/_space.css';
2
- @value (colorBorderPrimary,
3
- colorBackgroundTertiary,
4
- colorNeutralLightest,
5
- colorFillPrimary,
6
- colorInformation) from '../../styles/variables/_color.css';
7
- @value (borderWidthNone,
8
- borderWidthPrimary,
9
- borderRadiusSmall
1
+ @value (
2
+ spaceNone,
3
+ spaceXSmall,
4
+ spaceSmall
5
+ ) from '../../styles/variables/_space.css';
6
+ @value (
7
+ colorBorderPrimary,
8
+ colorBackgroundTertiary,
9
+ colorNeutralLightest,
10
+ colorFillPrimary,
11
+ colorInformation
12
+ ) from '../../styles/variables/_color.css';
13
+ @value (
14
+ borderWidthPrimary,
15
+ borderRadiusSmall,
16
+ borderRadiusCircle
10
17
  ) from '../../styles/variables/_border.css';
11
- @value (size2,size4,size12,size24,size42,size580,sizeFluid) from
12
- '../../styles/variables/_size.css';
13
- @value (opacity100, opacity60,opacity80) from
14
- '../../styles/variables/_opacity.css';
18
+ @value (
19
+ size2,
20
+ size12,
21
+ size24,
22
+ size42,
23
+ size580
24
+ ) from '../../styles/variables/_size.css';
25
+ @value (
26
+ opacity100,
27
+ opacity60,
28
+ opacity80
29
+ ) from '../../styles/variables/_opacity.css';
15
30
 
16
31
  .chatBubbleWrapper {
17
32
  display: flex;
18
33
  gap: spaceSmall;
19
- }
20
-
21
- .chatBubbleWrapperLeft {
22
- flex-direction: row; /* ChatAnchor comes first */
34
+ flex-direction: row;
23
35
  }
24
36
 
25
37
  .chatBubbleWrapperRight {
26
- flex-direction: row-reverse; /* ChatContent comes first */
38
+ flex-direction: row-reverse;
27
39
  }
28
40
 
29
41
  .chatAnchorWrapper {
@@ -74,11 +86,7 @@ borderRadiusSmall
74
86
  .loadingText {
75
87
  composes: buttonTextMedium from '../../styles/typography.module.css';
76
88
  display: inline-flex;
77
- background: linear-gradient(
78
- 90deg,
79
- colorFillPrimary 0%,
80
- colorInformation 100%
81
- );
89
+ background: linear-gradient(90deg, colorFillPrimary, colorInformation);
82
90
  -webkit-background-clip: text;
83
91
  -webkit-text-fill-color: transparent;
84
92
  background-clip: text;
@@ -96,12 +104,8 @@ borderRadiusSmall
96
104
  .dot {
97
105
  width: calc(size12/4);
98
106
  height: calc(size12/4);
99
- background: linear-gradient(
100
- 90deg,
101
- colorFillPrimary 0%,
102
- colorInformation 100%
103
- );
104
- border-radius: 50%; /* Makes dots circular */
107
+ background: linear-gradient(90deg, colorFillPrimary, colorInformation);
108
+ border-radius: borderRadiusCircle;
105
109
  opacity: opacity80;
106
110
 
107
111
  /* Bounce Animation */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {