design-react-kit 5.0.3 → 5.0.4
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/CHANGELOG.md +9 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +2 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.js +2 -4
- package/dist/types/index.js.map +1 -1
- package/package.json +12 -31
- package/src/NavScroll/useNavScroll.ts +3 -4
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"bugs": {
|
|
24
24
|
"url": "https://github.com/italia/design-react-kit/issues"
|
|
25
25
|
},
|
|
26
|
-
"version": "5.0.
|
|
26
|
+
"version": "5.0.4",
|
|
27
27
|
"license": "BSD-3",
|
|
28
28
|
"module": "dist/esm/index.js",
|
|
29
29
|
"main": "src/index.tsx",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"scripts": {
|
|
44
44
|
"start": "NODE_OPTIONS=--max_old_space_size=16384 npm run storybook:serve",
|
|
45
45
|
"build": "tsdx build --format cjs,esm",
|
|
46
|
-
"test": "
|
|
47
|
-
"test:ci": "
|
|
46
|
+
"test": "jest ./src ./test --passWithNoTests",
|
|
47
|
+
"test:ci": "jest ./src ./test --passWithNoTests --runInBand --ci",
|
|
48
48
|
"lint": "npx eslint src stories test --ext js,ts,tsx,jsx",
|
|
49
49
|
"lint:staged": "npx eslint --ext js,ts,tsx,jsx",
|
|
50
50
|
"prepare": "tsdx build --format cjs,esm && husky install",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"storybook:serve": "storybook dev -p 9001",
|
|
55
55
|
"storybook:build": "storybook build --docs",
|
|
56
56
|
"storybook:build:base": "storybook build",
|
|
57
|
-
"storybook:deploy": "npx gh-pages -d storybook-static -m '
|
|
57
|
+
"storybook:deploy": "npx gh-pages -d storybook-static -m 'chore: update documentation [ci skip]' --nojekyll",
|
|
58
58
|
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && node scripts/wait-confirm && git add CHANGELOG.md",
|
|
59
59
|
"postversion": "echo \"You can now publish your version using 'git push --follow-tags'\""
|
|
60
60
|
},
|
|
@@ -99,16 +99,16 @@
|
|
|
99
99
|
"@storybook/react-vite": "^8.0.5",
|
|
100
100
|
"@storybook/test": "^8.0.5",
|
|
101
101
|
"@svgr/rollup": "^8.1.0",
|
|
102
|
-
"@testing-library/jest-dom": "^
|
|
103
|
-
"@testing-library/react": "
|
|
102
|
+
"@testing-library/jest-dom": "^6.4.2",
|
|
103
|
+
"@testing-library/react": "12.1.5",
|
|
104
104
|
"@testing-library/react-hooks": "^8.0.1",
|
|
105
105
|
"@types/is-number": "^7.0.3",
|
|
106
|
+
"@types/jest": "^29.5.12",
|
|
106
107
|
"@types/node": "^20.12.2",
|
|
107
108
|
"@types/react": "^17.0.2",
|
|
108
109
|
"@types/react-dom": "^17.0.2",
|
|
109
110
|
"@types/react-select": "^4.0.15",
|
|
110
111
|
"@types/react-transition-group": "^4.4.10",
|
|
111
|
-
"babel-jest": "^26.6.3",
|
|
112
112
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
113
113
|
"babel-plugin-polyfill-corejs3": "^0.10.4",
|
|
114
114
|
"bootstrap-italia": "2.8.4",
|
|
@@ -119,14 +119,14 @@
|
|
|
119
119
|
"eslint-plugin-prettier": "^5.1.3",
|
|
120
120
|
"eslint-plugin-storybook": "^0.8.0",
|
|
121
121
|
"husky": "^8.0.1",
|
|
122
|
-
"jest": "^
|
|
123
|
-
"jest-transform-stub": "^2.0.0",
|
|
122
|
+
"jest": "^29.7.0",
|
|
124
123
|
"lint-staged": "^13.0.3",
|
|
125
124
|
"prettier": "^3.2.5",
|
|
126
125
|
"react": "^17.0.2",
|
|
127
126
|
"react-dom": "^17.0.2",
|
|
127
|
+
"sass": "^1.75.0",
|
|
128
128
|
"storybook": "^8.0.5",
|
|
129
|
-
"ts-jest": "^
|
|
129
|
+
"ts-jest": "^29.1.2",
|
|
130
130
|
"tsdx": "^0.14.1",
|
|
131
131
|
"tslib": "^2.4.0",
|
|
132
132
|
"typeface-lora": "^1.1.13",
|
|
@@ -144,28 +144,9 @@
|
|
|
144
144
|
"reactstrap": "9.2.2",
|
|
145
145
|
"webfontloader": "^1.6.28"
|
|
146
146
|
},
|
|
147
|
-
"jest": {
|
|
148
|
-
"transform": {
|
|
149
|
-
".(ts|tsx)$": "ts-jest",
|
|
150
|
-
".(js|jsx)$": "./jest-transformer.js",
|
|
151
|
-
"^.+\\.mdx$": "@storybook/addon-docs"
|
|
152
|
-
},
|
|
153
|
-
"moduleNameMapper": {
|
|
154
|
-
"^.+.(svg|png|jpg)$": "jest-transform-stub",
|
|
155
|
-
"^.+\\.css$": "identity-obj-proxy"
|
|
156
|
-
},
|
|
157
|
-
"moduleFileExtensions": [
|
|
158
|
-
"ts",
|
|
159
|
-
"tsx",
|
|
160
|
-
"js",
|
|
161
|
-
"jsx",
|
|
162
|
-
"json",
|
|
163
|
-
"node",
|
|
164
|
-
"mdx"
|
|
165
|
-
]
|
|
166
|
-
},
|
|
167
147
|
"resolutions": {
|
|
168
148
|
"@types/react": "17.0.2",
|
|
169
|
-
"@types/react-dom": "17.0.2"
|
|
149
|
+
"@types/react-dom": "17.0.2",
|
|
150
|
+
"jest-environment-jsdom": "29.7.0"
|
|
170
151
|
}
|
|
171
152
|
}
|
|
@@ -122,12 +122,11 @@ export function useNavScroll(args: useNavScrollArgs = {}): useNavScrollResult {
|
|
|
122
122
|
forceRecompute
|
|
123
123
|
]);
|
|
124
124
|
|
|
125
|
-
const refresh = useCallback(
|
|
125
|
+
const refresh = useCallback(() => {
|
|
126
126
|
debounce(() => {
|
|
127
127
|
setCounter(counter + 1);
|
|
128
|
-
}, REGISTER_DELAY)
|
|
129
|
-
|
|
130
|
-
);
|
|
128
|
+
}, REGISTER_DELAY);
|
|
129
|
+
}, [counter]);
|
|
131
130
|
|
|
132
131
|
const register = useCallback(
|
|
133
132
|
(id, options = {}) => {
|