Skip to content

Commit af1b218

Browse files
committed
v4.6.0
1 parent 67d125f commit af1b218

File tree

6 files changed

+1821
-1203
lines changed

6 files changed

+1821
-1203
lines changed

jest/setupForEach.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,15 @@ afterEach(() => jest.clearAllTimers())
66

77
jest.setTimeout(10000)
88
jest.retryTimes(2)
9+
10+
Element.prototype.getOriginalBoundingClientRect = Element.prototype.getBoundingClientRect
11+
Element.prototype.getBoundingClientRect = jest.fn(() => {
12+
return {
13+
width: 120,
14+
height: 120,
15+
top: 0,
16+
left: 0,
17+
bottom: 0,
18+
right: 0,
19+
}
20+
})

package.json

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netdata/netdata-ui",
3-
"version": "4.5.11",
3+
"version": "4.6.0",
44
"description": "netdata UI kit",
55
"main": "dist/index.js",
66
"module": "dist/es6/index.js",
@@ -42,20 +42,20 @@
4242
"dependencies": {
4343
"@dnd-kit/core": "^6.1.0",
4444
"@dnd-kit/sortable": "^8.0.0",
45-
"@elastic/react-search-ui": "^1.21.1",
46-
"@elastic/search-ui-site-search-connector": "^1.21.1",
47-
"@prismicio/client": "7.3.1",
48-
"@storybook/test": "^8.0.9",
45+
"@elastic/react-search-ui": "^1.21.5",
46+
"@elastic/search-ui-site-search-connector": "^1.21.5",
47+
"@prismicio/client": "7.6.0",
48+
"@storybook/test": "^8.1.11",
4949
"@styled-system/css": "^5.1.5",
50-
"@tanstack/react-table": "^8.14.0",
51-
"@tanstack/react-virtual": "3.2.0",
52-
"axios": "^1.6.8",
50+
"@tanstack/react-table": "^8.19.2",
51+
"@tanstack/react-virtual": "3.8.1",
52+
"axios": "^1.7.2",
5353
"polished": "^4.3.1",
5454
"react-portal": "^4.2.2",
5555
"react-select": "^5.8.0",
5656
"styled-system": "^5.1.5",
57-
"throttle-debounce": "5.0.0",
58-
"use-context-selector": "^1.4.4"
57+
"throttle-debounce": "5.0.2",
58+
"use-context-selector": "^2.0.0"
5959
},
6060
"peerDependencies": {
6161
"lodash": "*",
@@ -64,55 +64,55 @@
6464
"styled-components": "^5.3.9"
6565
},
6666
"devDependencies": {
67-
"@babel/cli": "^7.24.1",
68-
"@babel/core": "^7.24.4",
69-
"@babel/eslint-parser": "^7.24.1",
67+
"@babel/cli": "^7.24.7",
68+
"@babel/core": "^7.24.7",
69+
"@babel/eslint-parser": "^7.24.7",
7070
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
71-
"@babel/plugin-transform-modules-umd": "^7.24.1",
72-
"@babel/plugin-transform-runtime": "^7.24.3",
73-
"@babel/preset-env": "^7.24.4",
74-
"@babel/preset-react": "^7.24.1",
75-
"@storybook/addon-essentials": "^8.0.9",
76-
"@storybook/addon-interactions": "^8.0.9",
77-
"@storybook/addon-links": "^8.0.9",
71+
"@babel/plugin-transform-modules-umd": "^7.24.7",
72+
"@babel/plugin-transform-runtime": "^7.24.7",
73+
"@babel/preset-env": "^7.24.7",
74+
"@babel/preset-react": "^7.24.7",
75+
"@storybook/addon-essentials": "^8.1.11",
76+
"@storybook/addon-interactions": "^8.1.11",
77+
"@storybook/addon-links": "^8.1.11",
7878
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
79-
"@storybook/blocks": "^8.0.9",
80-
"@storybook/react": "^8.0.9",
81-
"@storybook/react-webpack5": "^8.0.9",
82-
"@testing-library/jest-dom": "^6.4.2",
83-
"@testing-library/react": "^14.2.2",
79+
"@storybook/blocks": "^8.1.11",
80+
"@storybook/react": "^8.1.11",
81+
"@storybook/react-webpack5": "^8.1.11",
82+
"@testing-library/jest-dom": "^6.4.6",
83+
"@testing-library/react": "^16.0.0",
8484
"@testing-library/user-event": "^14.5.2",
8585
"babel-loader": "^9.1.3",
8686
"babel-plugin-module-resolver": "^5.0.2",
8787
"babel-plugin-styled-components": "^2.1.4",
8888
"clean-webpack-plugin": "^4.0.0",
8989
"copyfiles": "^2.4.1",
9090
"eslint": "^8.57.0",
91-
"eslint-plugin-react": "^7.34.1",
92-
"eslint-plugin-react-hooks": "^4.6.0",
91+
"eslint-plugin-react": "^7.34.3",
92+
"eslint-plugin-react-hooks": "^4.6.2",
9393
"eslint-plugin-storybook": "^0.8.0",
9494
"html-loader": "^5.0.0",
9595
"identity-obj-proxy": "^3.0.0",
9696
"install-peers-cli": "^2.2.0",
9797
"jest": "^29.7.0",
9898
"jest-environment-jsdom": "^29.7.0",
9999
"jest-styled-components": "^7.1.1",
100-
"jsdom": "24.0.0",
100+
"jsdom": "24.1.0",
101101
"lodash": "^4.17.21",
102102
"markdown-loader": "8.0.0",
103-
"prettier": "^3.2.5",
103+
"prettier": "^3.3.2",
104104
"prop-types": "^15.8.1",
105105
"raw-loader": "^4.0.2",
106-
"react": "^18.2.0",
107-
"react-dom": "^18.2.0",
108-
"rimraf": "^5.0.5",
106+
"react": "^18.3.1",
107+
"react-dom": "^18.3.1",
108+
"rimraf": "^5.0.7",
109109
"sass-loader": "^14.2.1",
110-
"storybook": "^8.0.9",
110+
"storybook": "^8.1.11",
111111
"styled-components": "^5.3.9",
112112
"svg-sprite-loader": "^6.0.11",
113113
"svgo-loader": "^4.0.0",
114114
"url-loader": "^4.1.1",
115-
"webpack": "^5.91.0",
115+
"webpack": "^5.92.1",
116116
"webpack-cli": "^5.1.4"
117117
}
118118
}

src/components/button/button.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ describe("Hollow Button", () => {
278278
expect(button).toHaveStyleRule("border-color", "#C0CACA", {
279279
modifier: "&&",
280280
})
281-
expect(button).toHaveStyleRule("color", "#4A5757", {
281+
expect(button).toHaveStyleRule("color", "#526161", {
282282
modifier: "&&",
283283
})
284284
})

src/components/drops/drop/index.test.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ const getStyle = el => {
77
return { left, top, width }
88
}
99

10+
beforeEach(() => {
11+
Element.prototype.getBoundingClientRect = Element.prototype.getOriginalBoundingClientRect
12+
})
13+
1014
it("renders", async () => {
1115
const div = document.createElement("div")
12-
div.getBoundingClientRect = jest.fn(() => ({ bottom: 200, left: 300, width: 100, height: 100 }))
16+
div.getBoundingClientRect = jest.fn(() => ({
17+
bottom: 200,
18+
left: 300,
19+
width: 100,
20+
height: 100,
21+
}))
1322

1423
const { getByTestId, getByText } = renderWithProviders(
1524
<Drop target={div} animation>
@@ -116,10 +125,10 @@ it("renders aligns", async () => {
116125
const { target, result } = positions[i]
117126
rerender(
118127
<Drop target={div} align={target}>
119-
Drop content
128+
Drop content {JSON.stringify(target)}
120129
</Drop>
121130
)
122-
await waitFor(() => expect(getStyle(getByText("Drop content"))).toEqual(result))
131+
await waitFor(() => expect(getStyle(getByText(/Drop content/))).toEqual(result))
123132
}
124133
})
125134

src/components/drops/menu/index.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,13 @@ it("closes on item click", () => {
4848

4949
it("renders controlled", () => {
5050
const onChange = jest.fn()
51-
const { getByText, queryByTestId, debug, getAllByRole } = render({
51+
const { getByText, queryByTestId } = render({
5252
value: "durgen",
5353
onChange,
5454
label: null,
5555
})
5656

5757
fireEvent.click(getByText("Tyler Durden"))
58-
expect(getAllByRole("option")[1]).toHaveAttribute("disabled")
59-
6058
fireEvent.click(getByText("Marla Singer"))
6159
expect(onChange).toBeCalledWith("singer")
6260
expect(queryByTestId("drop")).not.toBeInTheDocument()

0 commit comments

Comments
 (0)