@pareto-engineering/design-system 4.0.0-alpha.17 → 4.0.0-alpha.20

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.
Files changed (46) hide show
  1. package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +5 -1
  2. package/dist/cjs/a/AppContext/useTheme.js +0 -4
  3. package/dist/cjs/a/Conversation/Conversation.js +1 -1
  4. package/dist/cjs/a/Conversation/common/Message/Message.js +2 -3
  5. package/dist/cjs/a/Conversation/styles.scss +44 -28
  6. package/dist/cjs/a/SnapScroller/styles.scss +9 -4
  7. package/dist/cjs/b/Button/Button.js +10 -2
  8. package/dist/cjs/b/Button/styles.scss +27 -4
  9. package/dist/cjs/b/Page/Page.js +5 -1
  10. package/dist/cjs/b/Page/common/Section/Section.js +2 -2
  11. package/dist/cjs/b/ThemeSelector/ThemeSelector.js +15 -29
  12. package/dist/cjs/b/ThemeSelector/styles.scss +2 -7
  13. package/dist/cjs/f/fields/TextInput/TextInput.js +12 -3
  14. package/dist/cjs/f/fields/TextInput/styles.scss +20 -0
  15. package/dist/es/a/AnimatedGradient/AnimatedGradient.js +5 -1
  16. package/dist/es/a/AppContext/useTheme.js +0 -4
  17. package/dist/es/a/Conversation/Conversation.js +1 -1
  18. package/dist/es/a/Conversation/common/Message/Message.js +2 -3
  19. package/dist/es/a/Conversation/styles.scss +44 -28
  20. package/dist/es/a/SnapScroller/styles.scss +9 -4
  21. package/dist/es/b/Button/Button.js +10 -2
  22. package/dist/es/b/Button/styles.scss +27 -4
  23. package/dist/es/b/Page/Page.js +5 -1
  24. package/dist/es/b/Page/common/Section/Section.js +2 -2
  25. package/dist/es/b/ThemeSelector/ThemeSelector.js +15 -30
  26. package/dist/es/b/ThemeSelector/styles.scss +2 -7
  27. package/dist/es/f/fields/TextInput/TextInput.js +12 -3
  28. package/dist/es/f/fields/TextInput/styles.scss +20 -0
  29. package/package.json +4 -4
  30. package/src/stories/a/Conversation.stories.jsx +5 -1
  31. package/src/stories/f/TextInput.stories.jsx +7 -0
  32. package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +5 -1
  33. package/src/ui/a/AppContext/useTheme.js +0 -4
  34. package/src/ui/a/Conversation/Conversation.jsx +3 -1
  35. package/src/ui/a/Conversation/common/Message/Message.jsx +3 -5
  36. package/src/ui/a/Conversation/styles.scss +44 -28
  37. package/src/ui/a/SnapScroller/styles.scss +9 -4
  38. package/src/ui/b/Button/Button.jsx +11 -1
  39. package/src/ui/b/Button/styles.scss +27 -4
  40. package/src/ui/b/Page/Page.jsx +4 -0
  41. package/src/ui/b/Page/common/Section/Section.jsx +2 -2
  42. package/src/ui/b/ThemeSelector/ThemeSelector.jsx +8 -28
  43. package/src/ui/b/ThemeSelector/styles.scss +2 -7
  44. package/src/ui/f/fields/TextInput/TextInput.jsx +12 -1
  45. package/src/ui/f/fields/TextInput/styles.scss +20 -0
  46. package/tests/__snapshots__/Storyshots.test.js.snap +1701 -961
@@ -1,4 +1,5 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
+ /* stylelint-disable selector-max-compound-selectors -- Required here */
2
3
 
3
4
  @use "@pareto-engineering/bem";
4
5
  @use "@pareto-engineering/styles/src/mixins";
@@ -12,39 +13,54 @@ $default-message-border: 1px solid var(--hard-background-cards);
12
13
 
13
14
  .#{bem.$base}.conversation {
14
15
  background: var(--y);
15
- display: flex;
16
- flex-direction: column;
17
- padding: $default-padding;
18
-
19
- > .#{bem.$base}.message {
20
- align-self: flex-start;
21
- max-width: $default-message-max-width;
22
- min-width: $default-message-min-width;
23
- position: relative;
24
-
25
- > .message-content {
26
- background-color: var(--x);
27
- border: $default-message-border;
28
- border-radius: $default-border-radius;
29
- display: flex;
30
- flex-direction: column;
31
- padding: 0 $default-padding;
32
-
33
- > p {
34
- color: var(--on-x);
16
+
17
+ > .#{bem.$base}.section {
18
+ display: flex;
19
+ flex-direction: column;
20
+
21
+ > .#{bem.$base}.message + .#{bem.$base}.message {
22
+ padding-top: $default-padding;
23
+ }
24
+
25
+ > .#{bem.$base}.message.ours + .#{bem.$base}.message.ours,
26
+ > .#{bem.$base}.message.theirs + .#{bem.$base}.message.theirs {
27
+ padding-top: calc($default-padding / 2);
28
+ }
29
+
30
+ > .#{bem.$base}.message {
31
+ align-self: flex-start;
32
+ max-width: $default-message-max-width;
33
+ min-width: $default-message-min-width;
34
+ position: relative;
35
+
36
+ > .sender {
37
+ margin: 0;
35
38
  }
36
39
 
37
- > .attachment {
38
- align-items: center;
39
- align-self: flex-end;
40
+ > .message-content {
41
+ background-color: var(--x);
42
+ border: $default-message-border;
43
+ border-radius: $default-border-radius;
40
44
  display: flex;
41
- flex-direction: row;
42
- gap: calc($default-padding / 2);
45
+ flex-direction: column;
46
+ padding: 0 $default-padding;
47
+
48
+ > p {
49
+ color: var(--on-x);
50
+ }
51
+
52
+ > .attachment {
53
+ align-items: center;
54
+ align-self: flex-end;
55
+ display: flex;
56
+ flex-direction: row;
57
+ gap: calc($default-padding / 2);
58
+ }
43
59
  }
44
- }
45
60
 
46
- &.#{bem.$base}.ours {
47
- align-self: flex-end;
61
+ &.#{bem.$base}.ours {
62
+ align-self: flex-end;
63
+ }
48
64
  }
49
65
  }
50
66
  }
@@ -5,7 +5,7 @@
5
5
  @use "@pareto-engineering/styles/src/mixins";
6
6
  @use "@pareto-engineering/styles/src/globals" as *;
7
7
 
8
- $default-spacing: var(--gap, 1em);
8
+ $default-spacing: var(--gap);
9
9
 
10
10
  .#{bem.$base}.snap-scroller {
11
11
  display: flex;
@@ -27,10 +27,11 @@ $default-spacing: var(--gap, 1em);
27
27
  &:first-child {
28
28
  margin-left: $default-spacing;
29
29
  }
30
+ }
30
31
 
31
- &:last-child {
32
- margin-right: $default-spacing;
33
- }
32
+ &::after {
33
+ content: "";
34
+ min-width: calc($default-spacing / 2);
34
35
  }
35
36
 
36
37
  @include mixins.media($from: $sm-md) {
@@ -40,6 +41,10 @@ $default-spacing: var(--gap, 1em);
40
41
  scroll-snap-type: none;
41
42
  scrollbar-width: unset;
42
43
 
44
+ &::after {
45
+ display: none;
46
+ }
47
+
43
48
  >* {
44
49
  min-width: unset;
45
50
 
@@ -24,15 +24,19 @@ const Button = ({
24
24
  isGhost,
25
25
  isSimple,
26
26
  isGradient,
27
+ isSpaced,
27
28
  arrowDirection,
28
29
  ...otherProps
29
30
  }) => {
30
31
  useInsertionEffect(() => {
31
32
  import("./styles.scss");
32
33
  }, []);
34
+ const buttonText = isSimple ? /*#__PURE__*/React.createElement("span", {
35
+ className: styleNames.modifierUnderlined
36
+ }, children) : children;
33
37
  return /*#__PURE__*/React.createElement("button", _extends({
34
38
  id: id,
35
- className: [baseClassName, componentClassName, userClassName, `x-${color}`, isGhost && styleNames.modifierGhost, isCompact && styleNames.modifierCompact, isSimple && styleNames.modifierSimple, isGradient && styleNames.modifierGradient, arrowDirection && `arrow-${arrowDirection}`].filter(e => e).join(' '),
39
+ className: [baseClassName, componentClassName, userClassName, `x-${color}`, isGhost && styleNames.modifierGhost, isCompact && styleNames.modifierCompact, isSimple && styleNames.modifierSimple, isGradient && styleNames.modifierGradient, isSpaced && styleNames.modifierSpaced, arrowDirection && `arrow-${arrowDirection}`].filter(e => e).join(' '),
36
40
  style: style,
37
41
  type: "button"
38
42
  }, otherProps), isLoading ? /*#__PURE__*/React.createElement(LoadingCircle, {
@@ -40,7 +44,7 @@ const Button = ({
40
44
  '--x': 'var(--on-x)'
41
45
  },
42
46
  heightWidth: "1.15em"
43
- }) : children);
47
+ }) : buttonText);
44
48
  };
45
49
  Button.propTypes = {
46
50
  /**
@@ -75,6 +79,10 @@ Button.propTypes = {
75
79
  * Should this button have a gradient
76
80
  */
77
81
  isGradient: PropTypes.bool,
82
+ /**
83
+ * Should this button be spaced
84
+ */
85
+ isSpaced: PropTypes.bool,
78
86
  /**
79
87
  * The button color
80
88
  */
@@ -20,7 +20,8 @@ $default-animation-time: .31s;
20
20
  font-weight: 400;
21
21
  justify-content: space-between;
22
22
  padding: $default-padding;
23
- transition: all .25s;//var(--theme-default-paragraph);
23
+ transition: all .25s;
24
+ white-space: nowrap;//var(--theme-default-paragraph);
24
25
 
25
26
  &.arrow-right {
26
27
  &::after {
@@ -57,7 +58,10 @@ $default-animation-time: .31s;
57
58
  &:not(:disabled) {
58
59
  cursor: pointer;
59
60
 
60
- &:hover {
61
+ &:hover
62
+ :not(.#{bem.$modifier-gradient})
63
+ :not(.#{bem.$modifier-ghost})
64
+ :not(.#{bem.$modifier-simple}) {
61
65
  background: var(--soft-x, var(--soft-#{$default-color}));
62
66
  }
63
67
 
@@ -67,8 +71,18 @@ $default-animation-time: .31s;
67
71
  }
68
72
 
69
73
  &.#{bem.$modifier-gradient} {
70
- background: linear-gradient(to left, var(--soft-x), var(--hard-x) 60%);
71
- transition: unset;
74
+ background-image: linear-gradient(
75
+ to right,
76
+ var(--hard-x) 30%,
77
+ var(--x) 50%,
78
+ var(--hard-x) 100%
79
+ );
80
+ background-position: left;
81
+ background-size: 200% auto;
82
+
83
+ &:not(:disabled):hover {
84
+ background-position: right center;
85
+ }
72
86
  }
73
87
 
74
88
  &.#{bem.$modifier-compact} {
@@ -104,12 +118,21 @@ $default-animation-time: .31s;
104
118
  }
105
119
  }
106
120
 
121
+ &.#{bem.$modifier-spaced} {
122
+ margin-bottom: var(--spacing-2);
123
+ margin-top: var(--spacing-2);
124
+ }
125
+
107
126
  &.#{bem.$modifier-simple} {
108
127
  background: transparent;
109
128
  border: 1px solid transparent;
110
129
  color: var(--x, var(--#{$default-color}));
111
130
  padding: 0;
112
131
 
132
+ > .#{bem.$modifier-underlined} {
133
+ text-decoration: underline;
134
+ }
135
+
113
136
  &:disabled,
114
137
  &:hover,
115
138
  &:focus {
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  import { useInsertionEffect, useEffect } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import styleNames from '@pareto-engineering/bem/exports';
7
+ import { useApp } from "../../a";
7
8
 
8
9
  // Imports from the component folder
9
10
  import { PageHelmet, Section } from "./common";
@@ -33,6 +34,9 @@ const Page = ({
33
34
  useInsertionEffect(() => {
34
35
  import("./styles.scss");
35
36
  }, []);
37
+ const {
38
+ userTheme
39
+ } = useApp();
36
40
  useEffect(() => {
37
41
  // If we're on the client, we make sure to scroll up when the page loads
38
42
  // This is a necessary transform to make react apt for website pages
@@ -47,7 +51,7 @@ const Page = ({
47
51
  }
48
52
  }, /*#__PURE__*/React.createElement(Wrapper, _extends({
49
53
  id: id,
50
- className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
54
+ className: [baseClassName, componentClassName, userClassName, userTheme && `ui-${userTheme}`].filter(e => e).join(' '),
51
55
  style: style,
52
56
  itemType: itemType,
53
57
  itemScope: itemType && ' '
@@ -13,7 +13,7 @@ const Section = ({
13
13
  className: userClassName,
14
14
  style,
15
15
  children,
16
- spaced,
16
+ isSpaced,
17
17
  padded,
18
18
  ...otherProps
19
19
  }) => {
@@ -23,7 +23,7 @@ const Section = ({
23
23
  const sectionId = userId && `${pageId}_${userId}`;
24
24
  return /*#__PURE__*/React.createElement("section", _extends({
25
25
  id: sectionId,
26
- className: [baseClassName, componentClassName, userClassName, spaced && styleNames.modifierSpaced, padded && 'padded', 'grid'].filter(e => e).join(' '),
26
+ className: [baseClassName, componentClassName, userClassName, isSpaced && styleNames.modifierSpaced, padded && 'padded', 'grid'].filter(e => e).join(' '),
27
27
  style: style
28
28
  }, otherProps), children);
29
29
  };
@@ -17,10 +17,7 @@ const ThemeSelector = ({
17
17
  id,
18
18
  className: userClassName,
19
19
  style,
20
- // children
21
-
22
- themes,
23
- iconMap
20
+ themes
24
21
  }) => {
25
22
  const {
26
23
  userTheme,
@@ -33,15 +30,18 @@ const ThemeSelector = ({
33
30
  const current = themes.indexOf(userTheme);
34
31
  setPreferredTheme(themes[(current + 1) % themes.length]);
35
32
  }, [userTheme]);
36
- return /*#__PURE__*/React.createElement("button", {
37
- type: "button",
38
- className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
39
- id: id,
40
- style: style,
41
- onClick: loopThemes
42
- }, /*#__PURE__*/React.createElement("span", {
43
- className: "v0 m-v icon"
44
- }, iconMap[userTheme]), /*#__PURE__*/React.createElement("span", null, userTheme));
33
+ const themeText = userTheme && userTheme.charAt(0).toUpperCase() + userTheme.slice(1);
34
+ return (
35
+ /*#__PURE__*/
36
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid, jsx-a11y/no-static-element-interactions
37
+ React.createElement("a", {
38
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
39
+ id: id,
40
+ style: style,
41
+ onClick: loopThemes,
42
+ onKeyDown: loopThemes
43
+ }, themeText)
44
+ );
45
45
  };
46
46
  ThemeSelector.propTypes = {
47
47
  /**
@@ -56,27 +56,12 @@ ThemeSelector.propTypes = {
56
56
  * The React-written, css properties for this element.
57
57
  */
58
58
  style: PropTypes.objectOf(PropTypes.string),
59
- /**
60
- * The children JSX
61
- */
62
- // children: PropTypes.node,
63
-
64
59
  /**
65
60
  * The themes and the order in which they appear
66
61
  */
67
- themes: PropTypes.arrayOf(PropTypes.string),
68
- /**
69
- * A map of the theme names with the icons that represent them. Uses the default font icon.
70
- */
71
- iconMap: PropTypes.objectOf(PropTypes.string)
62
+ themes: PropTypes.arrayOf(PropTypes.string)
72
63
  };
73
64
  ThemeSelector.defaultProps = {
74
- themes: ['light', 'dark'],
75
- iconMap: {
76
- dark: 'n',
77
- // sun,
78
- light: 'm' // moon,
79
- }
65
+ themes: ['light', 'dark']
80
66
  };
81
-
82
67
  export default ThemeSelector;
@@ -2,13 +2,8 @@
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
4
 
5
- $default-color:var(--x, var(--contrast));
6
-
7
5
  .#{bem.$base}.theme-selector {
8
- background: transparent;
9
- border: none;
10
- color: $default-color;
11
6
  cursor: pointer;
7
+ display: block;
8
+ text-decoration: none;
12
9
  }
13
-
14
-
@@ -30,7 +30,8 @@ const TextInput = ({
30
30
  disabled,
31
31
  placeholder,
32
32
  optional,
33
- autoComplete
33
+ autoComplete,
34
+ symbol
34
35
  // ...otherProps
35
36
  }) => {
36
37
  useInsertionEffect(() => {
@@ -40,6 +41,9 @@ const TextInput = ({
40
41
  name,
41
42
  validate
42
43
  });
44
+ const symbolStyle = symbol ? {
45
+ '--symbol': symbol
46
+ } : {};
43
47
  return /*#__PURE__*/React.createElement("div", {
44
48
  id: id,
45
49
  className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
@@ -51,7 +55,8 @@ const TextInput = ({
51
55
  color: labelColor,
52
56
  optional: optional
53
57
  }, label), /*#__PURE__*/React.createElement("div", {
54
- className: "input-wrapper with-faded-border"
58
+ className: `input-wrapper with-faded-border ${symbol ? 'has-symbol' : ''}`,
59
+ style: symbolStyle
55
60
  }, /*#__PURE__*/React.createElement("input", _extends({
56
61
  id: name,
57
62
  className: "input",
@@ -126,7 +131,11 @@ TextInput.propTypes = {
126
131
  * The autoComplete value that the browser should watch for the input
127
132
  * `https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete`
128
133
  */
129
- autoComplete: PropTypes.string
134
+ autoComplete: PropTypes.string,
135
+ /**
136
+ * A symbol to be set inside the input field
137
+ */
138
+ symbol: PropTypes.string
130
139
  };
131
140
  TextInput.defaultProps = {
132
141
  type: 'text',
@@ -4,6 +4,12 @@
4
4
  @use "../../../form.scss";
5
5
 
6
6
  $default-padding: .75em .75em .55em;
7
+ $default-symbol-left: 3em;
8
+ $default-padding-with-symbol:
9
+ .75em
10
+ calc($default-symbol-left - 1em)
11
+ .55em
12
+ calc($default-symbol-left + 1em);
7
13
  $default-input-border-radius: var(--theme-default-input-border-radius);
8
14
 
9
15
 
@@ -18,6 +24,20 @@ $default-input-border-radius: var(--theme-default-input-border-radius);
18
24
  border-radius: $default-input-border-radius;
19
25
  }
20
26
 
27
+ &.has-symbol {
28
+ &::before {
29
+ color: var(--interactive);
30
+ content: var(--symbol);
31
+ left: $default-symbol-left;
32
+ position: absolute;
33
+ top: .5em;
34
+ }
35
+
36
+ input {
37
+ padding: $default-padding-with-symbol;
38
+ }
39
+ }
40
+
21
41
  > input {
22
42
  background-color: var(--background-inputs);
23
43
  border-radius: $default-input-border-radius;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "4.0.0-alpha.17",
3
+ "version": "4.0.0-alpha.20",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",
@@ -51,8 +51,8 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@pareto-engineering/assets": "^4.0.0-alpha.11",
54
- "@pareto-engineering/bem": "^4.0.0-alpha.11",
55
- "@pareto-engineering/styles": "^4.0.0-alpha.16",
54
+ "@pareto-engineering/bem": "^4.0.0-alpha.20",
55
+ "@pareto-engineering/styles": "^4.0.0-alpha.20",
56
56
  "date-fns": "^2.29.3",
57
57
  "downshift": "^6.1.12",
58
58
  "formik": "^2.2.9",
@@ -67,5 +67,5 @@
67
67
  "relay-test-utils": "^15.0.0"
68
68
  },
69
69
  "browserslist": "> 2%",
70
- "gitHead": "54fc8906a8d9b0d73d38468ac42f433873317458"
70
+ "gitHead": "fffe052db834d7127d1270b562f935789ae17a3a"
71
71
  }
@@ -30,10 +30,14 @@ export const Base = () => {
30
30
  from :'ours',
31
31
  },
32
32
  {
33
- message:'Hi Camille, please compile an assesment of top 6 firms/brand providers for the listed fields in the US.',
33
+ message:'That looks amazing',
34
34
  sender :'Humbl',
35
35
  from :'theirs',
36
36
  },
37
+ {
38
+ message:'Thank you for the great work, can we also get this information in a spreadsheet?',
39
+ from :'theirs',
40
+ },
37
41
  {
38
42
  message:'Hi Morgan! Here is the spreadsheet we prepared for you.',
39
43
  sender :'Camille',
@@ -34,6 +34,7 @@ export default {
34
34
  name :{ control: 'text' },
35
35
  label :{ control: 'text' },
36
36
  optional :{ control: 'boolean' },
37
+ symbol :{ control: 'text' },
37
38
  },
38
39
  }
39
40
 
@@ -104,3 +105,9 @@ Time.args = {
104
105
  name :'time',
105
106
  label:'Select time',
106
107
  }
108
+
109
+ export const HasSymbol = Template.bind({})
110
+ HasSymbol.args = {
111
+ ...Base.args,
112
+ symbol:"'$'",
113
+ }
@@ -10,6 +10,8 @@ import PropTypes from 'prop-types'
10
10
 
11
11
  import styleNames from '@pareto-engineering/bem/exports'
12
12
 
13
+ import { useApp } from 'ui/a'
14
+
13
15
  import { Gradient } from './webGIRenderer'
14
16
 
15
17
  // Local Definitions
@@ -29,6 +31,8 @@ const AnimatedGradient = ({
29
31
  import('./styles.scss')
30
32
  }, [])
31
33
 
34
+ const { userTheme } = useApp()
35
+
32
36
  const isClient = typeof window !== 'undefined'
33
37
 
34
38
  useEffect(() => {
@@ -37,7 +41,7 @@ const AnimatedGradient = ({
37
41
  const gradient = new Gradient()
38
42
  gradient.initGradient('#gradient-canvas')
39
43
  }
40
- }, [])
44
+ }, [userTheme])
41
45
 
42
46
  return (
43
47
  <canvas
@@ -14,9 +14,7 @@ export default (
14
14
  const storage = window.localStorage
15
15
  if (isClient) {
16
16
  const storedTheme = window.localStorage.getItem(storageKey)
17
- // console.log(storedTheme, storedTheme != userTheme)
18
17
  if (storedTheme && (storedTheme !== userTheme)) {
19
- // console.warn('Theme load')
20
18
  setPreferredTheme(storedTheme)
21
19
  setUserTheme(storedTheme)
22
20
  } else if (preferredTheme && preferredTheme.length && preferredTheme !== 'system') {
@@ -25,11 +23,9 @@ export default (
25
23
  storageKey,
26
24
  preferredTheme,
27
25
  )
28
- // console.warn('theme change', preferredTheme)
29
26
  } else {
30
27
  setUserTheme(window.matchMedia('(prefers-color-scheme:dark)').matches ? 'dark' : 'light')
31
28
  storage.removeItem(storageKey)
32
- // console.warn('theme reset')
33
29
  }
34
30
  } else {
35
31
  setUserTheme('light')
@@ -55,7 +55,9 @@ const Conversation = ({
55
55
  .join(' ')}
56
56
  style={style}
57
57
  >
58
- {children}
58
+ <Card.Section>
59
+ {children}
60
+ </Card.Section>
59
61
  </Card>
60
62
  </ConversationContext.Provider>
61
63
  )
@@ -5,8 +5,6 @@ import PropTypes from 'prop-types'
5
5
 
6
6
  import styleNames from '@pareto-engineering/bem/exports'
7
7
 
8
- import { Card } from 'ui'
9
-
10
8
  // Local Definitions
11
9
 
12
10
  import useConversation from '../../useConversation'
@@ -33,14 +31,14 @@ const Message = ({
33
31
  const { ourColor, theirColor } = useConversation()
34
32
 
35
33
  return (
36
- <Card.Section
34
+ <div
37
35
  id={id}
38
36
  className={[
39
37
  baseClassName,
40
38
  componentClassName,
41
39
  userClassName,
42
40
  `x-${from === 'ours' ? ourColor : theirColor}`,
43
- from === 'ours' && 'ours',
41
+ from,
44
42
  ]
45
43
  .filter((e) => e)
46
44
  .join(' ')}
@@ -66,7 +64,7 @@ const Message = ({
66
64
  </div>
67
65
  )}
68
66
  </div>
69
- </Card.Section>
67
+ </div>
70
68
  )
71
69
  }
72
70
  Message.propTypes = {