@newhighsco/chipset 6.27.1 → 6.27.3
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 +21 -22
- package/src/components/Button/Button.module.scss +5 -0
- package/src/components/Menubar/Menubar.jsx +8 -7
- package/src/components/Navigation/Navigation.module.scss +1 -1
- package/src/components/Tooltip/Tooltip.jsx +9 -4
- package/src/components/Tooltip/Tooltip.module.scss +1 -1
- package/styles/normalize.stories.jsx +0 -1
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.27.
|
|
4
|
+
"version": "6.27.3",
|
|
5
5
|
"author": "New High Score",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"repository": {
|
|
@@ -37,33 +37,32 @@
|
|
|
37
37
|
"format:css": "yarn lint:css --fix"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@dr.pogodin/react-themes": "1.10.
|
|
40
|
+
"@dr.pogodin/react-themes": "1.10.3",
|
|
41
41
|
"classnames": "2.5.1",
|
|
42
42
|
"react-device-detect": "2.2.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@babel/core": "7.
|
|
46
|
-
"@babel/preset-env": "7.
|
|
45
|
+
"@babel/core": "7.29.0",
|
|
46
|
+
"@babel/preset-env": "7.29.0",
|
|
47
47
|
"@babel/preset-react": "7.28.5",
|
|
48
|
-
"@commitlint/cli": "20.
|
|
49
|
-
"@fullhuman/postcss-purgecss": "7.0.2",
|
|
48
|
+
"@commitlint/cli": "20.4.1",
|
|
50
49
|
"@newhighsco/browserslist-config": "2.0.0",
|
|
51
|
-
"@newhighsco/commitlint-config": "1.1.
|
|
50
|
+
"@newhighsco/commitlint-config": "1.1.48",
|
|
52
51
|
"@newhighsco/editor-config": "1.2.0",
|
|
53
|
-
"@newhighsco/eslint-config": "6.0.
|
|
54
|
-
"@newhighsco/postcss-config": "4.0.
|
|
52
|
+
"@newhighsco/eslint-config": "6.0.17",
|
|
53
|
+
"@newhighsco/postcss-config": "4.0.19",
|
|
55
54
|
"@newhighsco/prettier-config": "2.3.3",
|
|
56
|
-
"@newhighsco/release-config": "1.4.
|
|
57
|
-
"@newhighsco/storybook-preset": "10.
|
|
58
|
-
"@newhighsco/stylelint-config": "4.0.
|
|
55
|
+
"@newhighsco/release-config": "1.4.24",
|
|
56
|
+
"@newhighsco/storybook-preset": "10.2.3",
|
|
57
|
+
"@newhighsco/stylelint-config": "4.0.24",
|
|
59
58
|
"@newhighsco/svgr-config": "1.0.0",
|
|
60
59
|
"@omlet/cli": "2.0.0",
|
|
61
|
-
"@storybook/react-webpack5": "10.2.
|
|
60
|
+
"@storybook/react-webpack5": "10.2.7",
|
|
62
61
|
"@testing-library/dom": "10.4.1",
|
|
63
62
|
"@testing-library/jest-dom": "6.9.1",
|
|
64
63
|
"@testing-library/react": "16.3.2",
|
|
65
64
|
"babel-loader": "10.0.0",
|
|
66
|
-
"chromatic": "
|
|
65
|
+
"chromatic": "15.0.0",
|
|
67
66
|
"concurrently": "9.2.1",
|
|
68
67
|
"eslint": "9.39.2",
|
|
69
68
|
"husky": "9.1.7",
|
|
@@ -73,17 +72,17 @@
|
|
|
73
72
|
"jest-junit": "16.0.0",
|
|
74
73
|
"postcss": "8.5.6",
|
|
75
74
|
"prettier": "3.8.1",
|
|
76
|
-
"react": "19.2.
|
|
77
|
-
"react-dom": "19.2.
|
|
75
|
+
"react": "19.2.4",
|
|
76
|
+
"react-dom": "19.2.4",
|
|
78
77
|
"sass-true": "10.1.0",
|
|
79
|
-
"semantic-release": "25.0.
|
|
80
|
-
"storybook": "10.2.
|
|
81
|
-
"stylelint": "17.
|
|
82
|
-
"webpack": "5.
|
|
78
|
+
"semantic-release": "25.0.3",
|
|
79
|
+
"storybook": "10.2.7",
|
|
80
|
+
"stylelint": "17.1.1",
|
|
81
|
+
"webpack": "5.105.0"
|
|
83
82
|
},
|
|
84
83
|
"peerDependencies": {
|
|
85
|
-
"react": "19.2.
|
|
86
|
-
"react-dom": "19.2.
|
|
84
|
+
"react": "19.2.4",
|
|
85
|
+
"react-dom": "19.2.4"
|
|
87
86
|
},
|
|
88
87
|
"browserslist": [
|
|
89
88
|
"extends @newhighsco/browserslist-config"
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { any, array, bool, func, node, oneOf, shape, string } from 'prop-types'
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useToggle } from '../../hooks'
|
|
4
|
+
import { useIds, useToggle } from '../../hooks'
|
|
5
5
|
import { classNames } from '../../utils'
|
|
6
6
|
import Button from '../Button'
|
|
7
7
|
import Icon from '../Icon'
|
|
8
8
|
import List from '../List'
|
|
9
|
-
import SmartLink from '../SmartLink'
|
|
10
9
|
import { ReactComponent as ArrowDownSvg } from './images/arrow-down.svg'
|
|
11
10
|
import { ReactComponent as ArrowUpSvg } from './images/arrow-up.svg'
|
|
12
11
|
import { ReactComponent as CloseSvg } from './images/close.svg'
|
|
@@ -26,7 +25,7 @@ const Menubar = ({
|
|
|
26
25
|
theme
|
|
27
26
|
}) => {
|
|
28
27
|
const [visible, setVisibility] = useToggle(!toggle)
|
|
29
|
-
const
|
|
28
|
+
const [listId, iconId] = useIds(['list', 'icon'])
|
|
30
29
|
|
|
31
30
|
if (!links.length) return null
|
|
32
31
|
|
|
@@ -42,13 +41,16 @@ const Menubar = ({
|
|
|
42
41
|
{toggle && (
|
|
43
42
|
<Button
|
|
44
43
|
active={visible}
|
|
45
|
-
aria-controls={
|
|
44
|
+
aria-controls={listId}
|
|
46
45
|
aria-expanded={visible}
|
|
46
|
+
aria-labelledby={iconId}
|
|
47
|
+
aria-haspopup
|
|
47
48
|
onClick={toggleVisibility}
|
|
48
49
|
theme={{ root: theme?.toggle, active: theme?.toggleActive }}
|
|
49
50
|
>
|
|
50
51
|
{toggle.children}
|
|
51
52
|
<Icon
|
|
53
|
+
id={iconId}
|
|
52
54
|
theme={{ root: theme?.toggleIcon }}
|
|
53
55
|
alt={`${LABELS[visible]} ${title}`}
|
|
54
56
|
>
|
|
@@ -57,11 +59,10 @@ const Menubar = ({
|
|
|
57
59
|
</Button>
|
|
58
60
|
)}
|
|
59
61
|
<List
|
|
60
|
-
id={
|
|
62
|
+
id={listId}
|
|
61
63
|
role={role}
|
|
62
64
|
unstyled
|
|
63
65
|
inline={inline}
|
|
64
|
-
hidden={!visible}
|
|
65
66
|
theme={{ root: theme?.list, inline: theme?.inline }}
|
|
66
67
|
>
|
|
67
68
|
{links.map(({ links = [], ...rest }, index) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bool, node, oneOf, shape, string } from 'prop-types'
|
|
2
|
-
import React from 'react'
|
|
2
|
+
import React, { useId } from 'react'
|
|
3
3
|
|
|
4
4
|
import { useToggle } from '../../hooks'
|
|
5
5
|
import { classNames } from '../../utils'
|
|
@@ -9,6 +9,7 @@ import SmartLink from '../SmartLink'
|
|
|
9
9
|
* Use `Tooltip` to present additional information about a specific element
|
|
10
10
|
*/
|
|
11
11
|
const Tooltip = ({
|
|
12
|
+
role = 'tooltip',
|
|
12
13
|
hidden = true,
|
|
13
14
|
manual = true,
|
|
14
15
|
toggle,
|
|
@@ -23,11 +24,14 @@ const Tooltip = ({
|
|
|
23
24
|
className
|
|
24
25
|
}) => {
|
|
25
26
|
const [visible, setVisibility] = useToggle(!hidden)
|
|
27
|
+
const id = useId()
|
|
26
28
|
|
|
27
29
|
if (!heading && !children) return null
|
|
28
30
|
|
|
29
31
|
return (
|
|
30
32
|
<span
|
|
33
|
+
role={role}
|
|
34
|
+
aria-describedby={id}
|
|
31
35
|
className={classNames(theme?.root, className)}
|
|
32
36
|
{...(!manual && {
|
|
33
37
|
onMouseOver: setVisibility,
|
|
@@ -42,19 +46,19 @@ const Tooltip = ({
|
|
|
42
46
|
href={href}
|
|
43
47
|
target={target}
|
|
44
48
|
disabled={disabled}
|
|
45
|
-
aria-
|
|
46
|
-
{...(manual && {
|
|
49
|
+
aria-expanded={visible}
|
|
50
|
+
{...(manual && { onClick: setVisibility })}
|
|
47
51
|
>
|
|
48
52
|
{toggle}
|
|
49
53
|
</SmartLink>
|
|
50
54
|
{(heading || children) && (
|
|
51
55
|
<span
|
|
56
|
+
id={id}
|
|
52
57
|
className={classNames(
|
|
53
58
|
theme?.content,
|
|
54
59
|
align && theme?.[align],
|
|
55
60
|
valign && theme?.[valign]
|
|
56
61
|
)}
|
|
57
|
-
hidden={!visible}
|
|
58
62
|
>
|
|
59
63
|
{heading && <span className={theme?.heading}>{heading}</span>}
|
|
60
64
|
{children && <span className={theme?.copy}>{children}</span>}
|
|
@@ -66,6 +70,7 @@ const Tooltip = ({
|
|
|
66
70
|
|
|
67
71
|
Tooltip.displayName = 'Tooltip'
|
|
68
72
|
Tooltip.propTypes = {
|
|
73
|
+
role: string,
|
|
69
74
|
hidden: bool,
|
|
70
75
|
manual: bool,
|
|
71
76
|
toggle: node,
|