@spaced-out/ui-design-system 0.0.3 → 0.0.4

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.
@@ -2,6 +2,7 @@ atleast
2
2
  circlehollow
3
3
  commitlint
4
4
  contributorsrc
5
+ Crespo
5
6
  DEFAULTTEXT
6
7
  dismissable
7
8
  Fennimore
@@ -18,6 +19,7 @@ preminor
18
19
  prepatch
19
20
  rgba
20
21
  sbdocs
22
+ Stapleton
21
23
  superrover
22
24
  testid
23
25
  tnum
package/.eslintignore CHANGED
@@ -1 +1,2 @@
1
- /src/assets/fontawesome/
1
+ /src/assets/fontawesome/
2
+ node_modules/
@@ -0,0 +1,17 @@
1
+ ### Description of changes
2
+ <!--- Describe your changes in detail -->
3
+
4
+ ### Design Specs(Add a link to Spec sheet)
5
+ <!--- Add a link to design specs -->
6
+
7
+ ### Screenshots(if appropriate)
8
+
9
+ ### Does this close any currently open issues?
10
+
11
+ ### Breaking changes(Describe if any)
12
+
13
+ ### Checklist:
14
+ <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
15
+ <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
16
+ - [ ] Merged with latest `master` branch
17
+ - [ ] I have updated the documentation accordingly.
package/.prettierrc CHANGED
@@ -1,11 +1,27 @@
1
- trailingComma: 'all'
2
- bracketSpacing: false
3
- singleQuote: true
4
- endOfLine: lf
5
- overrides:
6
- - files: ['*.js', '*.jsx']
7
- options:
8
- parser: 'babel-flow'
9
- - files: ['*.css']
10
- options:
11
- parser: 'css'
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "all",
4
+ "printWidth": 80,
5
+ "tabWidth": 2,
6
+ "bracketSpacing": false,
7
+ "endOfLine": "lf",
8
+ "overrides": [
9
+ {
10
+ "files": [
11
+ "*.js",
12
+ "*.jsx"
13
+ ],
14
+ "options": {
15
+ "parser": "babel-flow"
16
+ }
17
+ },
18
+ {
19
+ "files": [
20
+ "*.css"
21
+ ],
22
+ "options": {
23
+ "parser": "css"
24
+ }
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "eslint.validate": ["javascript", "javascriptreact"],
3
+ "editor.codeActionsOnSave": {
4
+ "source.fixAll.eslint": true
5
+ },
6
+ "marquee.widgets.npm-stats.packageNames": ["@spaced-out/ui-design-system"]
7
+ }
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.0.4 (2022-11-24)
6
+
7
+
8
+ ### Features
9
+
10
+ * pr template ([#35](https://github.com/Spaced-Out/ui-design-system/issues/35)) ([c18e112](https://github.com/Spaced-Out/ui-design-system/commit/c18e1123730acaad77e1334a949573ac0cfd3708))
11
+
5
12
  ### 0.0.3 (2022-11-22)
6
13
 
7
14
 
package/CONTRIBUTING.md CHANGED
@@ -144,9 +144,9 @@ Most commonly used commit prefixes:
144
144
 
145
145
  > `build:` Commits, that affect build components like build tool, ci pipeline, dependencies, project version, etc.
146
146
 
147
- ## Add yourself to the contributor list
147
+ ## Add yourself to the maintainer list
148
148
 
149
- To add yourself to the `all-contributors` table in the README and INTRODUCTION stories:
149
+ To add yourself to the `maintainers` table in the README and INTRODUCTION stories:
150
150
 
151
151
  > Run the following commands from the root of the repo:
152
152
 
package/README.md CHANGED
@@ -101,6 +101,10 @@ import * as SIZES from "@spaced-out/ui-design-system/lib/styles/variables/_size.
101
101
 
102
102
  Check out our [**Contribution Guide**](https://spaced-out.github.io/ui-design-system/?path=/docs/contribution--page) to setup and contribute to Genesis.
103
103
 
104
+ ## Changelog
105
+
106
+ Check out our [**Changelog here**](https://spaced-out.github.io/ui-design-system/?path=/docs/changelog--page)
107
+
104
108
  ## Maintainers ✨
105
109
 
106
110
  <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
@@ -22,7 +22,9 @@ const Tooltip = _ref => {
22
22
  children,
23
23
  title,
24
24
  body,
25
- placement = 'top'
25
+ placement = 'top',
26
+ bodyMaxLines = 2,
27
+ titleMaxLines = 1
26
28
  } = _ref;
27
29
  const [open, setOpen] = React.useState(false);
28
30
  const {
@@ -53,7 +55,7 @@ const Tooltip = _ref => {
53
55
  ...children.props
54
56
  })), open && /*#__PURE__*/React.createElement("div", _extends({
55
57
  ref: floating,
56
- className: (0, _classify.classify)(_TooltipModule.default.tooltip, classNames?.wrapper),
58
+ className: (0, _classify.classify)(_TooltipModule.default.tooltip, classNames?.tooltip),
57
59
  style: {
58
60
  position: strategy,
59
61
  top: y ?? _space.spaceNone,
@@ -62,11 +64,11 @@ const Tooltip = _ref => {
62
64
  }, getFloatingProps()), !!title && /*#__PURE__*/React.createElement(_Text.SubTitleExtraSmall, {
63
65
  color: "inversePrimary"
64
66
  }, /*#__PURE__*/React.createElement(_Truncate.Truncate, {
65
- line: 1
67
+ line: titleMaxLines
66
68
  }, title)), !!body && /*#__PURE__*/React.createElement(_Text.BodyMedium, {
67
69
  color: !title ? 'inversePrimary' : 'inverseSecondary'
68
70
  }, /*#__PURE__*/React.createElement(_Truncate.Truncate, {
69
- line: 2
71
+ line: bodyMaxLines
70
72
  }, body))));
71
73
  };
72
74
  exports.Tooltip = Tooltip;
@@ -33,13 +33,23 @@ import {Truncate} from '../Truncate';
33
33
  import css from './Tooltip.module.css';
34
34
 
35
35
 
36
- type ClassNames = $ReadOnly<{wrapper?: string}>;
36
+ type ClassNames = $ReadOnly<{tooltip?: string}>;
37
37
 
38
38
  export type TooltipProps = {
39
39
  classNames?: ClassNames,
40
- title?: string,
41
- body?: string,
42
- placement?: 'top' | 'bottom' | 'left' | 'right',
40
+ title?: string | React.Node,
41
+ body?: string | React.Node,
42
+ placement?:
43
+ | 'top'
44
+ | 'top-start'
45
+ | 'top-end'
46
+ | 'bottom'
47
+ | 'bottom-start'
48
+ | 'bottom-end'
49
+ | 'left'
50
+ | 'right',
51
+ bodyMaxLines?: number,
52
+ titleMaxLines?: number,
43
53
  // TODO(Nishant): Decide on a type to use
44
54
  // $FlowFixMe
45
55
  children: any,
@@ -51,6 +61,8 @@ export const Tooltip = ({
51
61
  title,
52
62
  body,
53
63
  placement = 'top',
64
+ bodyMaxLines = 2,
65
+ titleMaxLines = 1,
54
66
  }: TooltipProps): React.Node => {
55
67
  const [open, setOpen] = React.useState(false);
56
68
 
@@ -79,12 +91,15 @@ export const Tooltip = ({
79
91
  <>
80
92
  {React.cloneElement(
81
93
  children,
82
- getReferenceProps({ref, ...children.props}),
94
+ getReferenceProps({
95
+ ref,
96
+ ...children.props,
97
+ }),
83
98
  )}
84
99
  {open && (
85
100
  <div
86
101
  ref={floating}
87
- className={classify(css.tooltip, classNames?.wrapper)}
102
+ className={classify(css.tooltip, classNames?.tooltip)}
88
103
  style={{
89
104
  position: strategy,
90
105
  top: y ?? spaceNone,
@@ -94,13 +109,13 @@ export const Tooltip = ({
94
109
  >
95
110
  {!!title && (
96
111
  <SubTitleExtraSmall color="inversePrimary">
97
- <Truncate line={1}>{title}</Truncate>
112
+ <Truncate line={titleMaxLines}>{title}</Truncate>
98
113
  </SubTitleExtraSmall>
99
114
  )}
100
115
 
101
116
  {!!body && (
102
117
  <BodyMedium color={!title ? 'inversePrimary' : 'inverseSecondary'}>
103
- <Truncate line={2}>{body}</Truncate>
118
+ <Truncate line={bodyMaxLines}>{body}</Truncate>
104
119
  </BodyMedium>
105
120
  )}
106
121
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {
@@ -32,9 +32,10 @@
32
32
  "React",
33
33
  "Component",
34
34
  "Library",
35
- "Rollup",
36
- "Sass",
37
- "Storybook"
35
+ "Design System",
36
+ "Genesis",
37
+ "Spaced Out",
38
+ "Sense"
38
39
  ],
39
40
  "peerDependencies": {
40
41
  "react": ">=16.8.0",
@@ -1,48 +0,0 @@
1
- * **Please check if the PR fulfills these requirements**
2
- - [ ] The commit message follows our guidelines
3
- - [ ] Tests for the changes have been added (for bug fixes / features)
4
- - [ ] Docs have been added / updated (for bug fixes / features)
5
-
6
-
7
- * **Other information**:
8
-
9
- ### All Submissions:
10
-
11
- * [ ] Have you followed the guidelines in our Contributing document?
12
- * [ ] Have you checked to ensure there aren't other open [Pull Requests](../../../pulls) for the same update/change?
13
-
14
- <!-- You can erase any parts of this template not applicable to your Pull Request. -->
15
-
16
-
17
- ## Types of changes
18
- <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
19
- - [ ] Bug fix (non-breaking change which fixes an issue)
20
- - [ ] New feature (non-breaking change which adds functionality)
21
- - [ ] Breaking change (fix or feature that would cause existing functionality to change)
22
-
23
- <!--- Provide a general summary of your changes in the Title above -->
24
-
25
- ## Description
26
- <!--- Describe your changes in detail -->
27
-
28
- ## Design Specs
29
- <!--- Add a link to design specs -->
30
-
31
- ## Motivation and Context
32
- <!--- Why is this change required? What problem does it solve? -->
33
- <!--- If it fixes an open issue, please link to the issue here. -->
34
-
35
- ## How has this been tested?
36
- <!--- Please describe in detail how you tested your changes. -->
37
- <!--- Include details of your testing environment, tests ran to see how -->
38
- <!--- your change affects other areas of the code, etc. -->
39
-
40
- ## Screenshots (if appropriate):
41
-
42
-
43
- ## Checklist:
44
- <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
45
- <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
46
- - [ ] My code follows the code style of this project.
47
- - [ ] My change requires a change to the documentation.
48
- - [ ] I have updated the documentation accordingly.