reshaped 3.4.7 → 3.5.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/CHANGELOG.md +0 -28
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +11 -11
- package/dist/components/Autocomplete/tests/Autocomplete.stories.d.ts +0 -1
- package/dist/components/Autocomplete/tests/Autocomplete.stories.js +3 -15
- package/dist/components/Badge/Badge.types.d.ts +4 -2
- package/dist/components/Button/Button.types.d.ts +4 -2
- package/dist/components/MenuItem/MenuItem.types.d.ts +4 -2
- package/dist/components/NumberField/NumberField.module.css +1 -1
- package/dist/components/NumberField/NumberField.types.d.ts +1 -1
- package/dist/components/NumberField/NumberFieldControlled.js +44 -28
- package/dist/components/NumberField/tests/NumberField.stories.d.ts +2 -1
- package/dist/components/NumberField/tests/NumberField.stories.js +30 -5
- package/dist/components/Overlay/Overlay.js +2 -2
- package/dist/components/TextField/TextField.module.css +1 -1
- package/dist/components/Toast/ToastContainer.js +2 -2
- package/dist/components/_private/Flyout/FlyoutControlled.js +2 -2
- package/dist/utilities/a11y/TrapFocus.d.ts +3 -17
- package/dist/utilities/a11y/TrapFocus.js +54 -49
- package/dist/utilities/a11y/tests/TrapFocus.stories.js +20 -20
- package/package.json +31 -31
@@ -34,8 +34,8 @@ export const modeDialog = {
|
|
34
34
|
return;
|
35
35
|
if (!rootRef.current)
|
36
36
|
return;
|
37
|
-
const trapFocus = new TrapFocus(
|
38
|
-
trapFocus.trap({ mode: "dialog" });
|
37
|
+
const trapFocus = new TrapFocus();
|
38
|
+
trapFocus.trap(rootRef.current, { mode: "dialog" });
|
39
39
|
return () => trapFocus.release();
|
40
40
|
}, [trapToggle.active]);
|
41
41
|
return (<Example>
|
@@ -92,8 +92,8 @@ export const modeActionMenu = {
|
|
92
92
|
return;
|
93
93
|
if (!rootRef.current)
|
94
94
|
return;
|
95
|
-
const trapFocus = new TrapFocus(
|
96
|
-
trapFocus.trap({
|
95
|
+
const trapFocus = new TrapFocus();
|
96
|
+
trapFocus.trap(rootRef.current, {
|
97
97
|
mode: "action-menu",
|
98
98
|
onRelease: () => {
|
99
99
|
trapToggle.deactivate();
|
@@ -154,8 +154,8 @@ export const modeActionBar = {
|
|
154
154
|
return;
|
155
155
|
if (!rootRef.current)
|
156
156
|
return;
|
157
|
-
const trapFocus = new TrapFocus(
|
158
|
-
trapFocus.trap({
|
157
|
+
const trapFocus = new TrapFocus();
|
158
|
+
trapFocus.trap(rootRef.current, {
|
159
159
|
mode: "action-bar",
|
160
160
|
onRelease: () => {
|
161
161
|
trapToggle.deactivate();
|
@@ -216,8 +216,8 @@ export const modeContentMenu = {
|
|
216
216
|
return;
|
217
217
|
if (!rootRef.current)
|
218
218
|
return;
|
219
|
-
const trapFocus = new TrapFocus(
|
220
|
-
trapFocus.trap({
|
219
|
+
const trapFocus = new TrapFocus();
|
220
|
+
trapFocus.trap(rootRef.current, {
|
221
221
|
mode: "content-menu",
|
222
222
|
onRelease: () => {
|
223
223
|
trapToggle.deactivate();
|
@@ -279,8 +279,8 @@ export const includeTrigger = {
|
|
279
279
|
return;
|
280
280
|
if (!rootRef.current)
|
281
281
|
return;
|
282
|
-
const trapFocus = new TrapFocus(
|
283
|
-
trapFocus.trap({
|
282
|
+
const trapFocus = new TrapFocus();
|
283
|
+
trapFocus.trap(rootRef.current, {
|
284
284
|
mode: "dialog",
|
285
285
|
includeTrigger: true,
|
286
286
|
});
|
@@ -327,8 +327,8 @@ export const initialFocusEl = {
|
|
327
327
|
return;
|
328
328
|
if (!rootRef.current)
|
329
329
|
return;
|
330
|
-
const trapFocus = new TrapFocus(
|
331
|
-
trapFocus.trap({
|
330
|
+
const trapFocus = new TrapFocus();
|
331
|
+
trapFocus.trap(rootRef.current, {
|
332
332
|
mode: "dialog",
|
333
333
|
initialFocusEl: initialFocusRef.current,
|
334
334
|
});
|
@@ -388,8 +388,8 @@ export const focusableElements = {
|
|
388
388
|
return;
|
389
389
|
if (!rootRef.current)
|
390
390
|
return;
|
391
|
-
const trapFocus = new TrapFocus(
|
392
|
-
trapFocus.trap();
|
391
|
+
const trapFocus = new TrapFocus();
|
392
|
+
trapFocus.trap(rootRef.current);
|
393
393
|
return () => trapFocus.release();
|
394
394
|
}, [trapToggle.active]);
|
395
395
|
return (<Example>
|
@@ -498,8 +498,8 @@ export const nested = {
|
|
498
498
|
return;
|
499
499
|
if (!rootRef.current)
|
500
500
|
return;
|
501
|
-
const trapFocus = new TrapFocus(
|
502
|
-
trapFocus.trap({
|
501
|
+
const trapFocus = new TrapFocus();
|
502
|
+
trapFocus.trap(rootRef.current, {
|
503
503
|
mode: "dialog",
|
504
504
|
});
|
505
505
|
return () => trapFocus.release();
|
@@ -509,8 +509,8 @@ export const nested = {
|
|
509
509
|
return;
|
510
510
|
if (!innerRootRef.current)
|
511
511
|
return;
|
512
|
-
const trapFocus = new TrapFocus(
|
513
|
-
trapFocus.trap({
|
512
|
+
const trapFocus = new TrapFocus();
|
513
|
+
trapFocus.trap(innerRootRef.current, {
|
514
514
|
mode: "dialog",
|
515
515
|
});
|
516
516
|
return () => trapFocus.release();
|
@@ -567,8 +567,8 @@ export const mutationObserver = {
|
|
567
567
|
return;
|
568
568
|
if (!rootRef.current)
|
569
569
|
return;
|
570
|
-
const trapFocus = new TrapFocus(
|
571
|
-
trapFocus.trap({
|
570
|
+
const trapFocus = new TrapFocus();
|
571
|
+
trapFocus.trap(rootRef.current, {
|
572
572
|
mode: "dialog",
|
573
573
|
});
|
574
574
|
setTimeout(() => {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "reshaped",
|
3
3
|
"description": "Professionally crafted design system in React & Figma for building products of any scale and complexity",
|
4
|
-
"version": "3.
|
4
|
+
"version": "3.5.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"email": "hello@reshaped.so",
|
7
7
|
"homepage": "https://reshaped.so",
|
@@ -98,35 +98,35 @@
|
|
98
98
|
"@commitlint/cli": "19.8.0",
|
99
99
|
"@commitlint/config-conventional": "19.8.0",
|
100
100
|
"@commitlint/types": "19.8.0",
|
101
|
-
"@eslint/js": "9.
|
101
|
+
"@eslint/js": "9.25.0",
|
102
102
|
"@size-limit/preset-big-lib": "11.2.0",
|
103
|
-
"@storybook/addon-a11y": "8.6.
|
104
|
-
"@storybook/addon-actions": "8.6.
|
105
|
-
"@storybook/addon-controls": "8.6.
|
106
|
-
"@storybook/addon-docs": "8.6.
|
107
|
-
"@storybook/addon-storysource": "8.6.
|
108
|
-
"@storybook/experimental-addon-test": "8.6.
|
109
|
-
"@storybook/react": "8.6.
|
110
|
-
"@storybook/react-vite": "8.6.
|
103
|
+
"@storybook/addon-a11y": "8.6.12",
|
104
|
+
"@storybook/addon-actions": "8.6.12",
|
105
|
+
"@storybook/addon-controls": "8.6.12",
|
106
|
+
"@storybook/addon-docs": "8.6.12",
|
107
|
+
"@storybook/addon-storysource": "8.6.12",
|
108
|
+
"@storybook/experimental-addon-test": "8.6.12",
|
109
|
+
"@storybook/react": "8.6.12",
|
110
|
+
"@storybook/react-vite": "8.6.12",
|
111
111
|
"@types/culori": "2.1.1",
|
112
112
|
"@types/events": "3.0.3",
|
113
|
-
"@types/node": "22.
|
114
|
-
"@types/react": "19.
|
115
|
-
"@types/react-dom": "19.
|
116
|
-
"@vitejs/plugin-react": "4.
|
117
|
-
"@vitest/browser": "3.
|
118
|
-
"@vitest/coverage-istanbul": "3.
|
119
|
-
"@vitest/coverage-v8": "3.
|
120
|
-
"chromatic": "11.
|
113
|
+
"@types/node": "22.14.1",
|
114
|
+
"@types/react": "19.1.2",
|
115
|
+
"@types/react-dom": "19.1.2",
|
116
|
+
"@vitejs/plugin-react": "4.4.0",
|
117
|
+
"@vitest/browser": "3.1.1",
|
118
|
+
"@vitest/coverage-istanbul": "3.1.1",
|
119
|
+
"@vitest/coverage-v8": "3.1.1",
|
120
|
+
"chromatic": "11.28.2",
|
121
121
|
"cz-conventional-changelog": "3.3.0",
|
122
|
-
"eslint": "9.
|
123
|
-
"eslint-config-prettier": "10.1.
|
122
|
+
"eslint": "9.25.0",
|
123
|
+
"eslint-config-prettier": "10.1.2",
|
124
124
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
125
|
-
"eslint-plugin-prettier": "5.2.
|
126
|
-
"eslint-plugin-react": "7.37.
|
125
|
+
"eslint-plugin-prettier": "5.2.6",
|
126
|
+
"eslint-plugin-react": "7.37.5",
|
127
127
|
"eslint-plugin-react-hooks": "5.2.0",
|
128
|
-
"lefthook": "1.11.
|
129
|
-
"playwright": "1.
|
128
|
+
"lefthook": "1.11.10",
|
129
|
+
"playwright": "1.52.0",
|
130
130
|
"postcss": "8.5.3",
|
131
131
|
"postcss-cli": "11.0.1",
|
132
132
|
"postcss-each": "1.1.0",
|
@@ -137,16 +137,16 @@
|
|
137
137
|
"react-shadow": "20.6.0",
|
138
138
|
"resolve-tspaths": "0.8.23",
|
139
139
|
"size-limit": "11.2.0",
|
140
|
-
"storybook": "8.6.
|
141
|
-
"stylelint": "16.
|
140
|
+
"storybook": "8.6.12",
|
141
|
+
"stylelint": "16.18.0",
|
142
142
|
"stylelint-config-prettier": "9.0.5",
|
143
|
-
"stylelint-config-standard": "
|
143
|
+
"stylelint-config-standard": "38.0.0",
|
144
144
|
"ts-node": "10.9.2",
|
145
|
-
"typescript": "5.8.
|
146
|
-
"typescript-eslint": "8.
|
147
|
-
"vite": "6.2
|
145
|
+
"typescript": "5.8.3",
|
146
|
+
"typescript-eslint": "8.30.1",
|
147
|
+
"vite": "6.3.2",
|
148
148
|
"vite-tsconfig-paths": "5.1.4",
|
149
|
-
"vitest": "3.
|
149
|
+
"vitest": "3.1.1",
|
150
150
|
"vitest-browser-react": "0.1.1"
|
151
151
|
},
|
152
152
|
"peerDependencies": {
|