@newhighsco/chipset 7.0.0 → 7.0.2

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": "7.0.0",
4
+ "version": "7.0.2",
5
5
  "author": "New High Score",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -12,7 +12,7 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/newhighsco/chipset/issues"
14
14
  },
15
- "packageManager": "yarn@4.12.0",
15
+ "packageManager": "yarn@4.15.0",
16
16
  "main": "src/index.js",
17
17
  "files": [
18
18
  "src",
@@ -29,7 +29,6 @@
29
29
  "test": "jest --runInBand",
30
30
  "test:list": "jest --listTests",
31
31
  "snapshot": "chromatic --storybook-build-dir build --auto-accept-changes main --exit-once-uploaded --only-changed",
32
- "analyze": "omlet analyze",
33
32
  "lint": "concurrently 'yarn:lint:*'",
34
33
  "lint:js": "eslint --cache .",
35
34
  "lint:css": "stylelint --cache --ignore-path .gitignore '**/*.?(s)css'",
@@ -38,53 +37,53 @@
38
37
  "format:css": "yarn lint:css --fix"
39
38
  },
40
39
  "dependencies": {
41
- "@dr.pogodin/react-themes": "1.10.3",
40
+ "@dr.pogodin/react-themes": "1.10.4",
42
41
  "@iconify/react": "6.0.2",
43
42
  "classnames": "2.5.1",
44
43
  "react-device-detect": "2.2.3"
45
44
  },
46
45
  "devDependencies": {
47
46
  "@babel/core": "7.29.0",
48
- "@babel/preset-env": "7.29.0",
47
+ "@babel/preset-env": "7.29.5",
49
48
  "@babel/preset-react": "7.28.5",
50
- "@commitlint/cli": "20.4.2",
49
+ "@commitlint/cli": "21.0.1",
51
50
  "@newhighsco/browserslist-config": "2.0.0",
52
- "@newhighsco/commitlint-config": "1.1.48",
51
+ "@newhighsco/commitlint-config": "1.1.56",
53
52
  "@newhighsco/editor-config": "1.2.0",
54
- "@newhighsco/eslint-config": "7.0.10",
55
- "@newhighsco/postcss-config": "4.0.20",
56
- "@newhighsco/prettier-config": "2.3.3",
57
- "@newhighsco/release-config": "1.4.25",
58
- "@newhighsco/storybook-preset": "10.2.9",
59
- "@newhighsco/stylelint-config": "4.0.27",
53
+ "@newhighsco/eslint-config": "7.1.1",
54
+ "@newhighsco/postcss-config": "4.0.52",
55
+ "@newhighsco/prettier-config": "2.3.5",
56
+ "@newhighsco/release-config": "1.4.28",
57
+ "@newhighsco/storybook-preset": "10.2.46",
58
+ "@newhighsco/stylelint-config": "4.0.43",
60
59
  "@newhighsco/svgr-config": "1.0.0",
61
- "@omlet/cli": "2.0.0",
62
- "@storybook/react-webpack5": "10.2.10",
60
+ "@newhighsco/yarn-plugin-preset": "1.1.4",
61
+ "@storybook/react-webpack5": "10.4.1",
63
62
  "@testing-library/dom": "10.4.1",
64
63
  "@testing-library/jest-dom": "6.9.1",
65
64
  "@testing-library/react": "16.3.2",
66
- "babel-loader": "10.0.0",
67
- "chromatic": "15.1.1",
65
+ "babel-loader": "10.1.1",
66
+ "chromatic": "17.0.0",
68
67
  "concurrently": "9.2.1",
69
- "eslint": "10.0.0",
68
+ "eslint": "10.4.0",
70
69
  "husky": "9.1.7",
71
70
  "identity-obj-proxy": "3.0.0",
72
- "jest": "30.2.0",
73
- "jest-environment-jsdom": "30.2.0",
74
- "jest-junit": "16.0.0",
75
- "postcss": "8.5.6",
76
- "prettier": "3.8.1",
77
- "react": "19.2.4",
78
- "react-dom": "19.2.4",
71
+ "jest": "30.4.2",
72
+ "jest-environment-jsdom": "30.4.1",
73
+ "jest-junit": "17.0.0",
74
+ "prettier": "3.8.3",
75
+ "react": "19.2.6",
76
+ "react-dom": "19.2.6",
79
77
  "sass-true": "10.1.0",
80
78
  "semantic-release": "25.0.3",
81
- "storybook": "10.2.10",
82
- "stylelint": "17.3.0",
83
- "webpack": "5.105.2"
79
+ "storybook": "10.4.1",
80
+ "stylelint": "17.12.0",
81
+ "typescript": "6.0.3",
82
+ "webpack": "5.107.1"
84
83
  },
85
84
  "peerDependencies": {
86
- "react": "19.2.4",
87
- "react-dom": "19.2.4"
85
+ "react": "19.2.6",
86
+ "react-dom": "19.2.6"
88
87
  },
89
88
  "browserslist": [
90
89
  "extends @newhighsco/browserslist-config"
@@ -94,14 +93,6 @@
94
93
  "@newhighsco"
95
94
  ]
96
95
  },
97
- "omlet": {
98
- "exports": {
99
- ".": "src/index.js"
100
- },
101
- "ignore": [
102
- "example/**"
103
- ]
104
- },
105
96
  "prettier": "@newhighsco/prettier-config",
106
97
  "release": {
107
98
  "extends": "@newhighsco/release-config"
@@ -3,7 +3,7 @@ import React from 'react'
3
3
 
4
4
  import SmartLink from '../SmartLink'
5
5
 
6
- const CardHeading = ({ href, target, children, ref, theme }) => {
6
+ const CardHeading = ({ href, target, children, theme }) => {
7
7
  if (!children) return null
8
8
 
9
9
  return (
@@ -20,15 +20,15 @@ const Menubar = ({
20
20
  onToggle = () => {},
21
21
  theme
22
22
  }) => {
23
- const [visible, setVisibility] = useToggle(!toggle)
23
+ const [visible, toggleVisibility] = useToggle(!toggle)
24
24
  const id = useIds()
25
25
 
26
26
  if (!links.length) return null
27
27
 
28
28
  const icons = toggle?.icons || ICONS
29
29
 
30
- const toggleVisibility = () => {
31
- setVisibility()
30
+ const handleToggle = () => {
31
+ toggleVisibility()
32
32
  onToggle({ visible })
33
33
  }
34
34
 
@@ -41,7 +41,7 @@ const Menubar = ({
41
41
  aria-expanded={visible}
42
42
  aria-label={`${LABELS[visible]} ${title}`}
43
43
  aria-haspopup
44
- onClick={toggleVisibility}
44
+ onClick={handleToggle}
45
45
  theme={{ root: theme?.toggle, active: theme?.toggleActive }}
46
46
  >
47
47
  {toggle.children}
@@ -23,7 +23,7 @@ const Tooltip = ({
23
23
  theme,
24
24
  className
25
25
  }) => {
26
- const [visible, setVisibility] = useToggle(!hidden)
26
+ const [visible, toggleVisibility, setVisibility] = useToggle(!hidden)
27
27
  const id = useIds()
28
28
 
29
29
  if (!heading && !children) return null
@@ -34,11 +34,11 @@ const Tooltip = ({
34
34
  aria-describedby={id}
35
35
  className={classNames(theme?.root, className)}
36
36
  {...(!manual && {
37
- onMouseOver: setVisibility,
38
- onMouseOut: setVisibility,
39
- onFocus: setVisibility,
40
- onBlur: setVisibility,
41
- onTouchEnd: setVisibility
37
+ onMouseOver: () => setVisibility(true),
38
+ onMouseOut: () => setVisibility(false),
39
+ onFocus: () => setVisibility(true),
40
+ onBlur: () => setVisibility(false),
41
+ onTouchEnd: () => setVisibility(false)
42
42
  })}
43
43
  >
44
44
  <SmartLink
@@ -47,7 +47,7 @@ const Tooltip = ({
47
47
  target={target}
48
48
  disabled={disabled}
49
49
  aria-expanded={visible}
50
- {...(manual && { onClick: setVisibility })}
50
+ {...(manual && { onClick: toggleVisibility })}
51
51
  >
52
52
  {toggle}
53
53
  </SmartLink>
@@ -4,5 +4,5 @@ export const useToggle = (initialState = false) => {
4
4
  const [state, setState] = useState(initialState)
5
5
  const toggle = useCallback(() => setState(state => !state), [])
6
6
 
7
- return [state, toggle]
7
+ return [state, toggle, setState]
8
8
  }
@@ -143,14 +143,10 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
143
143
  @for $i from 1 through $columns-length {
144
144
  $column: list.nth($columns, $i);
145
145
  $grid: list.nth($fraction-names, $column);
146
- $column-count: if(
147
- sass($column == 1): 1; else: $column - 1
148
- );
146
+ $column-count: if(sass($column == 1): 1; else: $column - 1);
149
147
 
150
148
  @for $j from 1 through $column-count {
151
- $plural: if(
152
- sass($j == 1): '' ; else: 's'
153
- );
149
+ $plural: if(sass($j == 1): '' ; else: 's');
154
150
  $column-width: $j * math.div(100, $column);
155
151
  $column-name: list.nth($count-names, $j);
156
152
 
@@ -1,7 +1,5 @@
1
1
  @mixin mq($min: false, $max: false, $height: false, $and: false, $media: all) {
2
- $-direction: if(
3
- sass($height): height; else: width
4
- );
2
+ $-direction: if(sass($height): height; else: width);
5
3
  $mq: '#{$media} ';
6
4
 
7
5
  @if $min {