@canonical/react-components 0.34.2 → 0.37.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.
Files changed (78) hide show
  1. package/dist/components/Accordion/Accordion.js +1 -1
  2. package/dist/components/ActionButton/ActionButton.js +1 -1
  3. package/dist/components/ArticlePagination/ArticlePagination.js +1 -1
  4. package/dist/components/Button/Button.d.ts +1 -0
  5. package/dist/components/Button/Button.js +2 -1
  6. package/dist/components/Card/Card.js +1 -1
  7. package/dist/components/CheckableInput/CheckableInput.js +1 -1
  8. package/dist/components/CheckboxInput/CheckboxInput.js +1 -1
  9. package/dist/components/Chip/Chip.js +1 -1
  10. package/dist/components/Code/Code.js +1 -1
  11. package/dist/components/CodeSnippet/CodeSnippet.js +1 -1
  12. package/dist/components/CodeSnippet/CodeSnippetBlock.js +1 -1
  13. package/dist/components/CodeSnippet/CodeSnippetDropdown.js +1 -1
  14. package/dist/components/Col/Col.js +1 -1
  15. package/dist/components/ContextualMenu/ContextualMenu.js +1 -2
  16. package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +1 -1
  17. package/dist/components/Field/Field.d.ts +5 -1
  18. package/dist/components/Field/Field.js +6 -1
  19. package/dist/components/Form/Form.js +1 -1
  20. package/dist/components/Icon/Icon.js +1 -1
  21. package/dist/components/Input/Input.d.ts +5 -1
  22. package/dist/components/Input/Input.js +4 -2
  23. package/dist/components/Label/Label.js +1 -1
  24. package/dist/components/Link/Link.js +1 -1
  25. package/dist/components/List/List.js +28 -17
  26. package/dist/components/MainTable/MainTable.js +98 -79
  27. package/dist/components/Modal/Modal.js +1 -1
  28. package/dist/components/ModularTable/ModularTable.js +1 -1
  29. package/dist/components/Navigation/Navigation.d.ts +57 -0
  30. package/dist/components/Navigation/Navigation.js +266 -0
  31. package/dist/components/Navigation/NavigationLink/NavigationLink.d.ts +11 -0
  32. package/dist/components/Navigation/NavigationLink/NavigationLink.js +57 -0
  33. package/dist/components/Navigation/NavigationLink/index.d.ts +1 -0
  34. package/dist/components/Navigation/NavigationLink/index.js +15 -0
  35. package/dist/components/Navigation/NavigationMenu/NavigationMenu.d.ts +11 -0
  36. package/dist/components/Navigation/NavigationMenu/NavigationMenu.js +97 -0
  37. package/dist/components/Navigation/NavigationMenu/index.d.ts +1 -0
  38. package/dist/components/Navigation/NavigationMenu/index.js +15 -0
  39. package/dist/components/Navigation/index.d.ts +3 -0
  40. package/dist/components/Navigation/index.js +15 -0
  41. package/dist/components/Navigation/types.d.ts +57 -0
  42. package/dist/components/Navigation/types.js +5 -0
  43. package/dist/components/Notification/Notification.js +1 -1
  44. package/dist/components/PasswordToggle/PasswordToggle.js +1 -1
  45. package/dist/components/RadioInput/RadioInput.js +1 -1
  46. package/dist/components/Row/Row.js +1 -1
  47. package/dist/components/SearchAndFilter/SearchAndFilter.js +12 -16
  48. package/dist/components/SearchBox/SearchBox.d.ts +6 -5
  49. package/dist/components/SearchBox/SearchBox.js +22 -8
  50. package/dist/components/Select/Select.js +1 -1
  51. package/dist/components/Slider/Slider.js +1 -1
  52. package/dist/components/Spinner/Spinner.js +1 -1
  53. package/dist/components/StatusLabel/StatusLabel.d.ts +31 -0
  54. package/dist/components/StatusLabel/StatusLabel.js +51 -0
  55. package/dist/components/StatusLabel/index.d.ts +2 -0
  56. package/dist/components/StatusLabel/index.js +25 -0
  57. package/dist/components/Strip/Strip.js +1 -1
  58. package/dist/components/Switch/Switch.js +1 -1
  59. package/dist/components/Table/Table.js +1 -1
  60. package/dist/components/TableCell/TableCell.js +1 -1
  61. package/dist/components/TableHeader/TableHeader.js +1 -1
  62. package/dist/components/TableRow/TableRow.js +1 -1
  63. package/dist/components/Tabs/Tabs.js +1 -1
  64. package/dist/components/Textarea/Textarea.js +1 -1
  65. package/dist/components/Tooltip/Tooltip.js +30 -1
  66. package/dist/hooks/index.d.ts +5 -2
  67. package/dist/hooks/index.js +26 -2
  68. package/dist/hooks/useClickOutside.d.ts +7 -0
  69. package/dist/hooks/useClickOutside.js +41 -0
  70. package/dist/hooks/useOnEscapePressed.d.ts +4 -0
  71. package/dist/hooks/useOnEscapePressed.js +27 -0
  72. package/dist/hooks/usePagination.d.ts +19 -0
  73. package/dist/hooks/usePagination.js +74 -0
  74. package/dist/index.d.ts +6 -2
  75. package/dist/index.js +34 -0
  76. package/dist/types/index.d.ts +13 -0
  77. package/dist/types/index.js +49 -1
  78. package/package.json +44 -42
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "0.34.2",
3
+ "version": "0.37.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "Huw Wilkins <huw.wilkins@canonical.com>",
@@ -22,87 +22,89 @@
22
22
  },
23
23
  "homepage": "/react-components/",
24
24
  "devDependencies": {
25
- "@babel/cli": "7.17.6",
26
- "@babel/eslint-parser": "7.17.0",
27
- "@babel/preset-typescript": "7.16.7",
28
- "@percy/cli": "1.0.5",
29
- "@percy/storybook": "4.2.0",
30
- "@storybook/addon-a11y": "6.4.20",
31
- "@storybook/addon-controls": "6.4.20",
32
- "@storybook/addon-docs": "6.4.20",
33
- "@storybook/addons": "6.4.20",
34
- "@storybook/react": "6.4.20",
35
- "@storybook/theming": "6.4.20",
25
+ "@babel/cli": "7.17.10",
26
+ "@babel/eslint-parser": "7.18.2",
27
+ "@babel/preset-typescript": "7.17.12",
28
+ "@percy/cli": "1.2.1",
29
+ "@percy/storybook": "4.2.1",
30
+ "@storybook/addon-a11y": "6.5.6",
31
+ "@storybook/addon-controls": "6.5.6",
32
+ "@storybook/addon-docs": "6.5.6",
33
+ "@storybook/addons": "6.5.6",
34
+ "@storybook/react": "6.5.6",
35
+ "@storybook/theming": "6.5.6",
36
36
  "@testing-library/cypress": "8.0.2",
37
- "@testing-library/dom": "8.12.0",
38
- "@testing-library/jest-dom": "5.16.3",
39
- "@testing-library/react": "12.1.4",
37
+ "@testing-library/dom": "8.13.0",
38
+ "@testing-library/jest-dom": "5.16.4",
39
+ "@testing-library/react": "12.1.5",
40
40
  "@testing-library/react-hooks": "7.0.2",
41
41
  "@testing-library/user-event": "13.5.0",
42
- "@typescript-eslint/eslint-plugin": "5.18.0",
43
- "@typescript-eslint/parser": "5.18.0",
42
+ "@typescript-eslint/eslint-plugin": "5.27.0",
43
+ "@typescript-eslint/parser": "5.27.0",
44
44
  "@wojtekmaj/enzyme-adapter-react-17": "0.6.7",
45
45
  "babel-jest": "27.5.1",
46
- "babel-loader": "8.2.4",
46
+ "babel-loader": "8.2.5",
47
47
  "babel-plugin-module-resolver": "4.1.0",
48
48
  "babel-plugin-typescript-to-proptypes": "2.0.0",
49
- "concurrently": "7.1.0",
49
+ "concurrently": "7.2.1",
50
50
  "css-loader": "5.2.7",
51
- "cypress": "9.5.3",
51
+ "cypress": "9.7.0",
52
52
  "deepmerge": "4.2.2",
53
53
  "enzyme": "3.11.0",
54
54
  "enzyme-adapter-react-16": "1.15.6",
55
55
  "enzyme-to-json": "3.6.2",
56
- "eslint": "8.12.0",
56
+ "eslint": "8.16.0",
57
57
  "eslint-config-prettier": "8.5.0",
58
- "eslint-config-react-app": "7.0.0",
58
+ "eslint-config-react-app": "7.0.1",
59
59
  "eslint-plugin-cypress": "2.12.1",
60
60
  "eslint-plugin-flowtype": "8.0.3",
61
- "eslint-plugin-import": "2.25.4",
61
+ "eslint-plugin-import": "2.26.0",
62
62
  "eslint-plugin-jsx-a11y": "6.5.1",
63
63
  "eslint-plugin-prettier": "4.0.0",
64
- "eslint-plugin-react": "7.29.4",
65
- "eslint-plugin-react-hooks": "4.4.0",
66
- "eslint-plugin-testing-library": "5.2.1",
64
+ "eslint-plugin-react": "7.30.0",
65
+ "eslint-plugin-react-hooks": "4.5.0",
66
+ "eslint-plugin-testing-library": "5.5.1",
67
67
  "jest": "27.5.1",
68
68
  "npm-package-json-lint": "5.4.2",
69
69
  "prettier": "2.6.2",
70
70
  "react": "17.0.2",
71
71
  "react-docgen-typescript-loader": "3.7.2",
72
72
  "react-dom": "17.0.2",
73
- "sass": "1.49.11",
73
+ "sass": "1.52.2",
74
74
  "sass-loader": "10.2.1",
75
75
  "style-loader": "2.0.0",
76
- "stylelint": "14.6.1",
76
+ "stylelint": "14.8.5",
77
77
  "stylelint-config-prettier": "9.0.3",
78
78
  "stylelint-config-recommended-scss": "5.0.2",
79
79
  "stylelint-order": "5.0.0",
80
80
  "stylelint-prettier": "2.0.0",
81
- "ts-jest": "27.1.4",
82
- "tsc-alias": "1.6.5",
83
- "typescript": "4.6.3",
84
- "vanilla-framework": "3.2.0",
81
+ "ts-jest": "27.1.5",
82
+ "tsc-alias": "1.6.8",
83
+ "typescript": "4.7.2",
84
+ "vanilla-framework": "3.4.0",
85
85
  "wait-on": "5.3.0"
86
86
  },
87
87
  "dependencies": {
88
- "@types/jest": "27.4.1",
89
- "@types/node": "16.11.26",
90
- "@types/react": "17.0.43",
91
- "@types/react-dom": "17.0.14",
92
- "@types/react-table": "7.7.10",
88
+ "@types/jest": "27.5.2",
89
+ "@types/node": "16.11.38",
90
+ "@types/react": "17.0.45",
91
+ "@types/react-dom": "17.0.17",
92
+ "@types/react-table": "7.7.12",
93
93
  "classnames": "2.3.1",
94
- "nanoid": "3.3.2",
94
+ "nanoid": "3.3.4",
95
95
  "prop-types": "15.8.1",
96
- "react-table": "7.7.0",
96
+ "react-table": "7.8.0",
97
97
  "react-useportal": "1.0.16"
98
98
  },
99
99
  "resolutions": {
100
+ "@types/react": "17.0.45",
101
+ "@types/react-dom": "17.0.17",
100
102
  "postcss": "^8.3.11"
101
103
  },
102
104
  "peerDependencies": {
103
105
  "react": "17.0.2",
104
106
  "react-dom": "17.0.2",
105
- "vanilla-framework": "3.2.0"
107
+ "vanilla-framework": "3.4.0"
106
108
  },
107
109
  "scripts": {
108
110
  "build": "rm -rf dist && yarn build-local; yarn build-declaration",
@@ -125,8 +127,8 @@
125
127
  "test-cypress": "concurrently 'yarn run docs' 'yarn run cypress:test' -k -s first",
126
128
  "unlink-packages": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink",
127
129
  "cypress:test": "wait-on http://localhost:${PORT:-9009} && cypress run --env port=${PORT:-9009}",
128
- "cypress:run": "cypress run",
129
- "cypress:open": "cypress open"
130
+ "cypress:run": "cypress run --env port=${PORT:-9009}",
131
+ "cypress:open": "cypress open --env port=${PORT:-9009}"
130
132
  },
131
133
  "eslintConfig": {
132
134
  "extends": "react-app"