@purpurds/table 8.8.1 → 8.9.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/table",
3
- "version": "8.8.1",
3
+ "version": "8.9.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/table.cjs.js",
6
6
  "types": "./dist/table.d.ts",
@@ -20,53 +20,53 @@
20
20
  "@dnd-kit/modifiers": "~9.0.0",
21
21
  "@dnd-kit/utilities": "~3.2.2",
22
22
  "@tanstack/react-table": "~8.21.2",
23
- "classnames": "~2.5.0",
24
- "@purpurds/badge": "8.8.1",
25
- "@purpurds/cta-link": "8.8.1",
26
- "@purpurds/checkbox": "8.8.1",
27
- "@purpurds/drawer": "8.8.1",
28
- "@purpurds/button": "8.8.1",
29
- "@purpurds/heading": "8.8.1",
30
- "@purpurds/icon": "8.8.1",
31
- "@purpurds/paragraph": "8.8.1",
32
- "@purpurds/link": "8.8.1",
33
- "@purpurds/text-field": "8.8.1",
34
- "@purpurds/select": "8.8.1",
35
- "@purpurds/skeleton": "8.8.1",
36
- "@purpurds/toggle": "8.8.1",
37
- "@purpurds/tokens": "8.8.1",
38
- "@purpurds/tooltip": "8.8.1",
39
- "@purpurds/visually-hidden": "8.8.1"
23
+ "classnames": "~2.5.1",
24
+ "@purpurds/badge": "8.9.0",
25
+ "@purpurds/button": "8.9.0",
26
+ "@purpurds/cta-link": "8.9.0",
27
+ "@purpurds/drawer": "8.9.0",
28
+ "@purpurds/checkbox": "8.9.0",
29
+ "@purpurds/heading": "8.9.0",
30
+ "@purpurds/icon": "8.9.0",
31
+ "@purpurds/link": "8.9.0",
32
+ "@purpurds/select": "8.9.0",
33
+ "@purpurds/skeleton": "8.9.0",
34
+ "@purpurds/paragraph": "8.9.0",
35
+ "@purpurds/text-field": "8.9.0",
36
+ "@purpurds/tokens": "8.9.0",
37
+ "@purpurds/toggle": "8.9.0",
38
+ "@purpurds/visually-hidden": "8.9.0",
39
+ "@purpurds/tooltip": "8.9.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@rushstack/eslint-patch": "~1.10.0",
43
- "@storybook/react-vite": "^10.0.7",
44
- "@testing-library/dom": "~10.4.0",
45
- "@testing-library/jest-dom": "~6.4.0",
46
- "@testing-library/react": "~16.2.0",
43
+ "@storybook/react-vite": "^10.0.8",
44
+ "@testing-library/dom": "~10.4.1",
45
+ "@testing-library/jest-dom": "~6.9.1",
46
+ "@testing-library/react": "~16.3.0",
47
47
  "@testing-library/user-event": "~14.5.1",
48
48
  "@types/node": "22.17",
49
- "@types/react-dom": "^19.0.4",
50
- "@types/react": "^19.0.10",
51
- "eslint": "9.24.0",
52
- "jsdom": "~22.1.0",
53
- "lint-staged": "15.5.0",
49
+ "@types/react-dom": "^19.2.3",
50
+ "@types/react": "^19.2.6",
51
+ "eslint": "9.39.1",
52
+ "jsdom": "~27.2.0",
53
+ "lint-staged": "16.2.6",
54
54
  "prettier": "~2.8.8",
55
- "react-dom": "^19.0.0",
56
- "react": "^19.0.0",
57
- "storybook": "^10.0.7",
58
- "typescript": "^5.6.3",
59
- "vite": "^6.2.1",
55
+ "react-dom": "^19.2.0",
56
+ "react": "^19.2.0",
57
+ "storybook": "^10.0.8",
58
+ "typescript": "^5.9.3",
59
+ "vite": "^7.2.2",
60
60
  "vitest-axe": "~0.1.0",
61
61
  "vitest-canvas-mock": "~0.3.3",
62
- "vitest": "^3.1.2",
63
- "@purpurds/autocomplete": "8.8.1",
62
+ "vitest": "^4.0.10",
63
+ "@purpurds/autocomplete": "8.9.0",
64
+ "@purpurds/grid": "8.9.0",
64
65
  "@purpurds/component-rig": "1.0.0",
65
- "@purpurds/grid": "8.8.1",
66
- "@purpurds/label": "8.8.1",
67
- "@purpurds/listbox": "8.8.1",
68
- "@purpurds/pagination": "8.8.1",
69
- "@purpurds/illustrative-icon": "8.8.1"
66
+ "@purpurds/illustrative-icon": "8.9.0",
67
+ "@purpurds/label": "8.9.0",
68
+ "@purpurds/listbox": "8.9.0",
69
+ "@purpurds/pagination": "8.9.0"
70
70
  },
71
71
  "scripts": {
72
72
  "build:dev": "vite",
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { render, screen, waitFor } from "@testing-library/react";
3
+ import { vi } from "vitest";
3
4
  import { axe } from "vitest-axe";
4
5
 
5
6
  import { DraggableTable } from "./draggable-table";
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { render, screen } from "@testing-library/react";
3
+ import { vi } from "vitest";
3
4
  import { axe } from "vitest-axe";
4
5
 
5
6
  import { TableContent } from "./table-content";
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { type Column } from "@tanstack/react-table";
3
3
  import { render, screen, within } from "@testing-library/react";
4
4
  import userEvent from "@testing-library/user-event";
5
+ import { vi } from "vitest";
5
6
  import { axe } from "vitest-axe";
6
7
 
7
8
  import { TableSettingsDrawer } from "./table-settings-drawer";
@@ -292,7 +293,9 @@ describe("Data Table - Settings drawer", () => {
292
293
  name: copy.settingsDrawerWithColumnDrag.visibleColumns.ariaLabels.buttons.rearrange,
293
294
  });
294
295
  expect(rearrangeButton).toBeInTheDocument();
295
- expect(rearrangeButton).toHaveTextContent(copy.settingsDrawerWithColumnDrag.visibleColumns.buttons.rearrange);
296
+ expect(rearrangeButton).toHaveTextContent(
297
+ copy.settingsDrawerWithColumnDrag.visibleColumns.buttons.rearrange
298
+ );
296
299
  });
297
300
 
298
301
  it("should update aria-label when entering rearrange mode", async () => {
@@ -306,7 +309,9 @@ describe("Data Table - Settings drawer", () => {
306
309
  name: copy.settingsDrawerWithColumnDrag.visibleColumns.ariaLabels.buttons.done,
307
310
  });
308
311
  expect(doneButton).toBeInTheDocument();
309
- expect(doneButton).toHaveTextContent(copy.settingsDrawerWithColumnDrag.visibleColumns.buttons.done);
312
+ expect(doneButton).toHaveTextContent(
313
+ copy.settingsDrawerWithColumnDrag.visibleColumns.buttons.done
314
+ );
310
315
  });
311
316
  });
312
317
  });
package/vitest.setup.ts CHANGED
@@ -33,28 +33,32 @@ vi.mock("./src/table-row-cell-skeleton.tsx", () => ({
33
33
  },
34
34
  }));
35
35
 
36
- const ResizeObserverMock = vi.fn(() => ({
37
- disconnect: vi.fn(),
38
- observe: vi.fn(),
39
- takeRecords: vi.fn(),
40
- unobserve: vi.fn(),
41
- }));
36
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
+ const ResizeObserverMock = vi.fn(function (this: any) {
38
+ this.disconnect = vi.fn();
39
+ this.observe = vi.fn();
40
+ this.takeRecords = vi.fn();
41
+ this.unobserve = vi.fn();
42
+ });
42
43
  vi.stubGlobal("ResizeObserver", ResizeObserverMock);
43
44
 
44
- const IntersectionObserverMock = vi.fn(() => ({
45
- disconnect: vi.fn(),
46
- observe: vi.fn(),
47
- takeRecords: vi.fn(),
48
- unobserve: vi.fn(),
49
- }));
45
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
+ const IntersectionObserverMock = vi.fn(function (this: any) {
47
+ this.disconnect = vi.fn();
48
+ this.observe = vi.fn();
49
+ this.takeRecords = vi.fn();
50
+ this.unobserve = vi.fn();
51
+ });
50
52
  vi.stubGlobal("IntersectionObserver", IntersectionObserverMock);
51
53
 
52
- const matchMedia = vi.fn((query) => ({
53
- matches: true,
54
- media: query,
55
- onchange: null,
56
- addEventListener: vi.fn(),
57
- removeEventListener: vi.fn(),
58
- }));
54
+ const matchMedia = vi.fn(function (query) {
55
+ return {
56
+ matches: true,
57
+ media: query,
58
+ onchange: null,
59
+ addEventListener: vi.fn(),
60
+ removeEventListener: vi.fn(),
61
+ };
62
+ });
59
63
 
60
64
  vi.stubGlobal("matchMedia", matchMedia);