@spaced-out/ui-design-system 0.1.14 → 0.1.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 CHANGED
@@ -2,6 +2,19 @@
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.1.15](https://github.com/spaced-out/ui-design-system/compare/v0.1.14...v0.1.15) (2023-04-18)
6
+
7
+
8
+ ### Features
9
+
10
+ * tooltips now support custom components ([1096cf8](https://github.com/spaced-out/ui-design-system/commit/1096cf8efb96f1fb321e3a4e372aeafa114f9f51))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * export everything from dropdown ([b2bb628](https://github.com/spaced-out/ui-design-system/commit/b2bb6286362acccaca12f794711d2d12c895633b))
16
+ * fixed imports ([af88522](https://github.com/spaced-out/ui-design-system/commit/af88522d227895bbf67f81157ed5395dde76e75c))
17
+
5
18
  ### [0.1.14](https://github.com/spaced-out/ui-design-system/compare/v0.1.13...v0.1.14) (2023-04-17)
6
19
 
7
20
 
@@ -13,7 +13,6 @@ var _space = require("../../styles/variables/_space");
13
13
  var _classify = require("../../utils/classify");
14
14
  var _mergeRefs = require("../../utils/merge-refs");
15
15
  var _string = require("../../utils/string");
16
- var _Text = require("../Text");
17
16
  var _Truncate = require("../Truncate");
18
17
  var _TooltipModule = _interopRequireDefault(require("./Tooltip.module.css"));
19
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -87,12 +86,14 @@ const Tooltip = _ref => {
87
86
  }
88
87
  }, getFloatingProps()), !!title && /*#__PURE__*/React.createElement(_Truncate.Truncate, {
89
88
  line: titleMaxLines
90
- }, /*#__PURE__*/React.createElement(_Text.SubTitleExtraSmall, {
91
- color: "inversePrimary"
89
+ }, /*#__PURE__*/React.createElement("div", {
90
+ className: (0, _classify.classify)(_TooltipModule.default.title, classNames?.title)
92
91
  }, title)), !!body && /*#__PURE__*/React.createElement(_Truncate.Truncate, {
93
92
  line: bodyMaxLines
94
- }, /*#__PURE__*/React.createElement(_Text.BodyMedium, {
95
- color: !title ? 'inversePrimary' : 'inverseSecondary'
93
+ }, /*#__PURE__*/React.createElement("div", {
94
+ className: (0, _classify.classify)(_TooltipModule.default.body, {
95
+ [_TooltipModule.default.hasTitle]: !!title
96
+ }, classNames?.body)
96
97
  }, body))), bodyRef.current));
97
98
  };
98
99
  exports.Tooltip = Tooltip;
@@ -32,13 +32,12 @@ import {spaceNone, spaceXXSmall} from '../../styles/variables/_space';
32
32
  import {classify} from '../../utils/classify';
33
33
  import {mergeRefs} from '../../utils/merge-refs';
34
34
  import {capitalize} from '../../utils/string';
35
- import {BodyMedium, SubTitleExtraSmall} from '../Text';
36
35
  import {Truncate} from '../Truncate';
37
36
 
38
37
  import css from './Tooltip.module.css';
39
38
 
40
39
 
41
- type ClassNames = $ReadOnly<{tooltip?: string}>;
40
+ type ClassNames = $ReadOnly<{tooltip?: string, title?: string, body?: string}>;
42
41
 
43
42
  export const DELAY_MOTION_DURATION_TYPES = Object.freeze({
44
43
  none: 'none',
@@ -147,19 +146,25 @@ export const Tooltip = ({
147
146
  >
148
147
  {!!title && (
149
148
  <Truncate line={titleMaxLines}>
150
- <SubTitleExtraSmall color="inversePrimary">
149
+ <div className={classify(css.title, classNames?.title)}>
151
150
  {title}
152
- </SubTitleExtraSmall>
151
+ </div>
153
152
  </Truncate>
154
153
  )}
155
154
 
156
155
  {!!body && (
157
156
  <Truncate line={bodyMaxLines}>
158
- <BodyMedium
159
- color={!title ? 'inversePrimary' : 'inverseSecondary'}
157
+ <div
158
+ className={classify(
159
+ css.body,
160
+ {
161
+ [css.hasTitle]: !!title,
162
+ },
163
+ classNames?.body,
164
+ )}
160
165
  >
161
166
  {body}
162
- </BodyMedium>
167
+ </div>
163
168
  </Truncate>
164
169
  )}
165
170
  </div>,
@@ -1,4 +1,4 @@
1
- @value (colorTooltipFill) from '../../styles/variables/_color.css';
1
+ @value (colorTooltipFill, colorTextInversePrimary, colorTextInverseSecondary) from '../../styles/variables/_color.css';
2
2
  @value (size300) from '../../styles/variables/_size.css';
3
3
  @value (spaceXSmall, spaceSmall, spaceXXSmall) from '../../styles/variables/_space.css';
4
4
  @value (borderRadiusSmall) from '../../styles/variables/_border.css';
@@ -17,3 +17,17 @@
17
17
  word-wrap: break-word;
18
18
  z-index: var(--tooltip-elevation);
19
19
  }
20
+
21
+ .title {
22
+ composes: subTitleExtraSmall from '../../styles/typography.module.css';
23
+ color: colorTextInversePrimary;
24
+ }
25
+
26
+ .body {
27
+ composes: bodyMedium from '../../styles/typography.module.css';
28
+ color: colorTextInversePrimary;
29
+ }
30
+
31
+ .hasTitle {
32
+ color: colorTextInverseSecondary;
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {