@newhighsco/chipset 6.13.0 → 6.13.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newhighsco/chipset",
3
3
  "description": "Shareable, theme-able component library by New High Score",
4
- "version": "6.13.0",
4
+ "version": "6.13.4",
5
5
  "author": "New High Score <hello@newhighsco.re>",
6
6
  "license": "ISC",
7
7
  "config": {
@@ -25,9 +25,9 @@
25
25
  "url": "https://main--6004028a0df11e0021f58df8.chromatic.com"
26
26
  },
27
27
  "scripts": {
28
- "start": "start-storybook --static-dir .storybook/static --docs",
28
+ "start": "start-storybook --docs --no-manager-cache",
29
29
  "prebuild": "rm -rf build",
30
- "build": "build-storybook --output-dir build --static-dir .storybook/static --docs --quiet",
30
+ "build": "build-storybook --output-dir build --docs --quiet",
31
31
  "pretest": "yarn lint",
32
32
  "test": "npm-run-all --parallel test:*",
33
33
  "test:js": "jest --maxWorkers=2 --coverage",
@@ -47,40 +47,42 @@
47
47
  "react-device-detect": "2.1.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@babel/core": "7.16.0",
50
+ "@babel/core": "7.16.12",
51
51
  "@babel/polyfill": "7.12.1",
52
- "@babel/preset-env": "7.16.0",
53
- "@babel/preset-react": "7.16.0",
54
- "@commitlint/cli": "14.1.0",
55
- "@fullhuman/postcss-purgecss": "4.0.3",
52
+ "@babel/preset-env": "7.16.11",
53
+ "@babel/preset-react": "7.16.7",
54
+ "@commitlint/cli": "16.1.0",
55
+ "@fullhuman/postcss-purgecss": "4.1.3",
56
56
  "@newhighsco/browserslist-config": "1.0.3",
57
- "@newhighsco/commitlint-config": "1.0.17",
57
+ "@newhighsco/commitlint-config": "1.0.22",
58
58
  "@newhighsco/editor-config": "1.1.2",
59
- "@newhighsco/eslint-config": "2.3.37",
60
- "@newhighsco/postcss-config": "3.4.15",
61
- "@newhighsco/prettier-config": "2.0.14",
62
- "@newhighsco/release-config": "1.0.76",
63
- "@newhighsco/storybook-preset": "4.3.26",
64
- "@newhighsco/stylelint-config": "3.0.3",
65
- "@storybook/react": "6.3.12",
66
- "@wojtekmaj/enzyme-adapter-react-17": "0.6.5",
67
- "babel-jest": "27.3.1",
59
+ "@newhighsco/eslint-config": "2.3.59",
60
+ "@newhighsco/postcss-config": "3.4.49",
61
+ "@newhighsco/prettier-config": "2.0.16",
62
+ "@newhighsco/release-config": "1.1.5",
63
+ "@newhighsco/storybook-preset": "4.4.16",
64
+ "@newhighsco/stylelint-config": "3.0.11",
65
+ "@storybook/builder-webpack5": "6.4.16",
66
+ "@storybook/manager-webpack5": "6.4.16",
67
+ "@storybook/react": "6.4.16",
68
+ "@wojtekmaj/enzyme-adapter-react-17": "0.6.6",
69
+ "babel-jest": "27.4.6",
68
70
  "babel-loader": "8.2.3",
69
- "chromatic": "6.0.5",
71
+ "chromatic": "6.4.2",
70
72
  "enzyme": "3.11.0",
71
- "eslint": "8.1.0",
73
+ "eslint": "8.8.0",
72
74
  "husky": "7.0.4",
73
75
  "identity-obj-proxy": "3.0.0",
74
- "jest": "27.3.1",
76
+ "jest": "27.4.7",
75
77
  "npm-run-all": "4.1.5",
76
- "postcss": "8.3.11",
77
- "prettier": "2.4.1",
78
+ "postcss": "8.4.5",
79
+ "prettier": "2.5.1",
78
80
  "react": "17.0.2",
79
81
  "react-dom": "17.0.2",
80
82
  "sass-true": "6.0.1",
81
- "semantic-release": "18.0.0",
82
- "stylelint": "14.0.1",
83
- "webpack": "5.61.0"
83
+ "semantic-release": "19.0.2",
84
+ "stylelint": "14.3.0",
85
+ "webpack": "5.67.0"
84
86
  },
85
87
  "peerDependencies": {
86
88
  "react": "17.0.2",
@@ -9,14 +9,15 @@ import SmartLink from '../SmartLink'
9
9
  */
10
10
  const Tooltip = ({
11
11
  hidden = true,
12
+ manual = true,
12
13
  toggle,
13
14
  href,
14
15
  target,
15
- automatic,
16
16
  heading,
17
17
  children,
18
18
  align = 'center',
19
19
  valign = 'top',
20
+ disabled,
20
21
  theme,
21
22
  className
22
23
  }) => {
@@ -27,7 +28,7 @@ const Tooltip = ({
27
28
  return (
28
29
  <span
29
30
  className={classNames(theme?.root, className)}
30
- {...(automatic && {
31
+ {...(!manual && {
31
32
  onMouseOver: setVisibility,
32
33
  onMouseOut: setVisibility,
33
34
  onFocus: setVisibility,
@@ -39,8 +40,9 @@ const Tooltip = ({
39
40
  className={classNames(theme?.toggle, visible && theme?.toggleActive)}
40
41
  href={href}
41
42
  target={target}
43
+ disabled={disabled}
42
44
  aria-label="Toggle tooltip"
43
- {...(!automatic && {
45
+ {...(manual && {
44
46
  'aria-expanded': visible,
45
47
  onClick: setVisibility
46
48
  })}
@@ -67,14 +69,15 @@ const Tooltip = ({
67
69
  Tooltip.displayName = 'Tooltip'
68
70
  Tooltip.propTypes = {
69
71
  hidden: bool,
72
+ manual: bool,
70
73
  toggle: node,
71
74
  href: string,
72
75
  target: string,
73
- automatic: bool,
74
76
  heading: node,
75
77
  children: node,
76
78
  align: oneOf(['left', 'right', 'center']),
77
79
  valign: oneOf(['top', 'middle', 'bottom']),
80
+ disabled: bool,
78
81
  theme: shape({
79
82
  root: string,
80
83
  toggle: string,
@@ -1,5 +1,3 @@
1
- @use '../../../styles/functions';
2
-
3
1
  .root {
4
2
  display: inline-block;
5
3
  position: relative;
@@ -15,10 +13,9 @@
15
13
  }
16
14
 
17
15
  .content {
18
- $tooltip-content-margin: functions.spacing(1);
19
-
20
16
  display: block;
21
17
  position: absolute;
18
+ z-index: 1;
22
19
 
23
20
  &[hidden] {
24
21
  display: none;
@@ -26,11 +23,9 @@
26
23
 
27
24
  &.top {
28
25
  bottom: 100%;
29
- margin-bottom: $tooltip-content-margin;
30
26
  }
31
27
 
32
28
  &.bottom {
33
- margin-top: $tooltip-content-margin;
34
29
  top: 100%;
35
30
  }
36
31
 
@@ -53,13 +48,11 @@
53
48
 
54
49
  &.left {
55
50
  left: auto;
56
- margin-right: $tooltip-content-margin;
57
51
  right: 100%;
58
52
  }
59
53
 
60
54
  &.right {
61
55
  left: 100%;
62
- margin-left: $tooltip-content-margin;
63
56
  right: auto;
64
57
  }
65
58
 
@@ -68,3 +61,8 @@
68
61
  }
69
62
  }
70
63
  }
64
+
65
+ .heading,
66
+ .copy {
67
+ display: block;
68
+ }