reshaped 3.1.5 → 3.1.7
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 +24 -1
- package/dist/bundle.css +1 -1
- package/dist/bundle.d.ts +2 -0
- package/dist/bundle.js +10 -11
- package/dist/cjs/themes/_generator/definitions/reshaped.js +1 -1
- package/dist/cjs/themes/reshaped/theme.css +1 -1
- package/dist/components/Actionable/Actionable.d.ts +1 -1
- package/dist/components/Actionable/Actionable.js +2 -2
- package/dist/components/Actionable/Actionable.module.css +1 -1
- package/dist/components/Actionable/Actionable.types.d.ts +1 -0
- package/dist/components/Autocomplete/Autocomplete.js +12 -6
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.module.css +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.module.css +1 -1
- package/dist/components/Card/tests/Card.stories.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.module.css +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +1 -1
- package/dist/components/FormControl/FormControl.context.d.ts +2 -1
- package/dist/components/Grid/Grid.d.ts +6 -0
- package/dist/components/Grid/Grid.js +46 -0
- package/dist/components/Grid/Grid.module.css +1 -0
- package/dist/components/Grid/Grid.types.d.ts +31 -0
- package/dist/components/Grid/Grid.types.js +1 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/index.js +1 -0
- package/dist/components/Grid/tests/Grid.stories.d.ts +18 -0
- package/dist/components/Grid/tests/Grid.stories.js +170 -0
- package/dist/components/Icon/Icon.module.css +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Loader/Loader.module.css +1 -1
- package/dist/components/Loader/Loader.types.d.ts +1 -1
- package/dist/components/Loader/tests/Loader.stories.js +5 -3
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/Modal.module.css +1 -1
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Overlay/tests/Overlay.stories.js +1 -1
- package/dist/components/Popover/Popover.js +2 -4
- package/dist/components/Popover/Popover.types.d.ts +1 -1
- package/dist/components/Radio/Radio.module.css +1 -1
- package/dist/components/Resizable/Resizable.module.css +1 -1
- package/dist/components/ScrollArea/ScrollArea.js +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Slider/Slider.module.css +1 -1
- package/dist/components/Slider/SliderControlled.js +2 -1
- package/dist/components/Switch/Switch.module.css +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.module.css +1 -1
- package/dist/components/Tabs/TabsItem.d.ts +1 -1
- package/dist/components/Tabs/TabsItem.js +2 -3
- package/dist/components/Tabs/TabsList.js +1 -1
- package/dist/components/Tabs/tests/Tabs.stories.d.ts +15 -13
- package/dist/components/Tabs/tests/Tabs.stories.js +71 -8
- package/dist/components/Toast/ToastContainer.js +1 -2
- package/dist/components/Toast/ToastRegion.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/View/View.js +7 -3
- package/dist/components/View/View.module.css +1 -1
- package/dist/components/View/View.types.d.ts +2 -2
- package/dist/components/_private/Expandable/Expandable.js +9 -5
- package/dist/components/_private/Flyout/Flyout.module.css +1 -1
- package/dist/components/_private/Flyout/Flyout.types.d.ts +12 -3
- package/dist/components/_private/Flyout/FlyoutContent.js +1 -1
- package/dist/components/_private/Flyout/FlyoutControlled.js +34 -20
- package/dist/components/_private/Flyout/tests/Flyout.stories.d.ts +1 -0
- package/dist/components/_private/Flyout/tests/Flyout.stories.js +28 -18
- package/dist/components/_private/Flyout/useFlyout.d.ts +2 -1
- package/dist/components/_private/Flyout/useFlyout.js +46 -57
- package/dist/components/_private/Flyout/utilities/calculatePosition.js +16 -11
- package/dist/components/_private/Flyout/utilities/cooldown.d.ts +1 -1
- package/dist/components/_private/Flyout/utilities/cooldown.js +17 -5
- package/dist/components/_private/Flyout/utilities/getPositionFallbacks.d.ts +3 -0
- package/dist/components/_private/Flyout/utilities/getPositionFallbacks.js +39 -0
- package/dist/config/tailwind.d.ts +1 -1
- package/dist/hooks/_private/useOnClickOutside.js +3 -2
- package/dist/hooks/_private/useSingletonHotkeys.js +15 -12
- package/dist/hooks/_private/useSingletonKeyboardMode.js +1 -1
- package/dist/hooks/tests/useHotkeys.stories.js +3 -0
- package/dist/hooks/useDrag.js +2 -1
- package/dist/hooks/useScrollLock.js +12 -39
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/styles/align/align.module.css +1 -0
- package/dist/styles/align/index.d.ts +3 -0
- package/dist/styles/align/index.js +10 -0
- package/dist/styles/justify/index.d.ts +3 -0
- package/dist/styles/justify/index.js +10 -0
- package/dist/styles/justify/justify.module.css +1 -0
- package/dist/styles/types.d.ts +2 -0
- package/dist/tests/ShadowDOM.stories.d.ts +6 -0
- package/dist/tests/ShadowDOM.stories.js +110 -0
- package/dist/themes/_generator/definitions/reshaped.js +1 -1
- package/dist/themes/_generator/tests/themes.stories.js +1 -1
- package/dist/themes/reshaped/theme.css +1 -1
- package/dist/utilities/a11y/TrapFocus.d.ts +1 -1
- package/dist/utilities/a11y/TrapFocus.js +14 -5
- package/dist/utilities/a11y/focus.d.ts +1 -1
- package/dist/utilities/a11y/focus.js +10 -5
- package/dist/utilities/a11y/index.d.ts +4 -0
- package/dist/utilities/a11y/index.js +3 -0
- package/dist/utilities/dom/flyout.d.ts +1 -0
- package/dist/utilities/dom/flyout.js +19 -0
- package/dist/utilities/dom/index.d.ts +3 -0
- package/dist/utilities/dom/index.js +3 -0
- package/dist/utilities/dom/shadowDom.d.ts +1 -0
- package/dist/utilities/dom/shadowDom.js +4 -0
- package/dist/utilities/dom/userSelect.d.ts +2 -0
- package/dist/utilities/dom/userSelect.js +6 -0
- package/dist/utilities/platform.d.ts +1 -0
- package/dist/utilities/platform.js +15 -0
- package/dist/utilities/scroll/disable.d.ts +7 -0
- package/dist/utilities/scroll/disable.js +13 -0
- package/dist/utilities/scroll/helpers.d.ts +1 -0
- package/dist/utilities/scroll/helpers.js +17 -0
- package/dist/utilities/scroll/index.d.ts +2 -0
- package/dist/utilities/scroll/index.js +2 -0
- package/dist/utilities/scroll/lock.d.ts +2 -0
- package/dist/utilities/scroll/lock.js +24 -0
- package/dist/utilities/scroll/lockSafari.d.ts +2 -0
- package/dist/utilities/scroll/lockSafari.js +31 -0
- package/dist/utilities/scroll/lockStandard.d.ts +2 -0
- package/dist/utilities/scroll/lockStandard.js +19 -0
- package/package.json +31 -29
- package/dist/utilities/dom.d.ts +0 -5
- package/dist/utilities/dom.js +0 -27
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.1.
|
4
|
+
"version": "3.1.7",
|
5
5
|
"license": "MIT",
|
6
6
|
"email": "hello@reshaped.so",
|
7
7
|
"homepage": "https://reshaped.so",
|
@@ -93,31 +93,31 @@
|
|
93
93
|
"defaults and not IE 11"
|
94
94
|
],
|
95
95
|
"devDependencies": {
|
96
|
-
"@commitlint/cli": "19.
|
97
|
-
"@commitlint/config-conventional": "19.
|
98
|
-
"@commitlint/types": "19.0
|
99
|
-
"@eslint/js": "
|
100
|
-
"@size-limit/preset-big-lib": "11.1.
|
101
|
-
"@storybook/addon-a11y": "8.
|
102
|
-
"@storybook/addon-controls": "8.
|
103
|
-
"@storybook/addon-docs": "8.
|
104
|
-
"@storybook/addon-storysource": "8.
|
105
|
-
"@storybook/react": "8.
|
106
|
-
"@storybook/react-vite": "8.
|
96
|
+
"@commitlint/cli": "19.5.0",
|
97
|
+
"@commitlint/config-conventional": "19.5.0",
|
98
|
+
"@commitlint/types": "19.5.0",
|
99
|
+
"@eslint/js": "9.11.1",
|
100
|
+
"@size-limit/preset-big-lib": "11.1.5",
|
101
|
+
"@storybook/addon-a11y": "8.3.4",
|
102
|
+
"@storybook/addon-controls": "8.3.4",
|
103
|
+
"@storybook/addon-docs": "8.3.4",
|
104
|
+
"@storybook/addon-storysource": "8.3.4",
|
105
|
+
"@storybook/react": "8.3.4",
|
106
|
+
"@storybook/react-vite": "8.3.4",
|
107
107
|
"@testing-library/dom": "10.4.0",
|
108
|
-
"@testing-library/jest-dom": "6.
|
109
|
-
"@testing-library/react": "16.0.
|
108
|
+
"@testing-library/jest-dom": "6.5.0",
|
109
|
+
"@testing-library/react": "16.0.1",
|
110
110
|
"@testing-library/user-event": "14.5.2",
|
111
111
|
"@types/culori": "2.1.1",
|
112
112
|
"@types/events": "3.0.3",
|
113
|
-
"@types/jest": "29.5.
|
114
|
-
"@types/node": "22.
|
115
|
-
"@types/react": "18.3.
|
113
|
+
"@types/jest": "29.5.13",
|
114
|
+
"@types/node": "22.7.4",
|
115
|
+
"@types/react": "18.3.10",
|
116
116
|
"@types/react-dom": "18.3.0",
|
117
117
|
"@typescript-eslint/eslint-plugin": "7.6.0",
|
118
118
|
"@typescript-eslint/parser": "7.6.0",
|
119
119
|
"@vitejs/plugin-react": "4.3.1",
|
120
|
-
"chromatic": "11.
|
120
|
+
"chromatic": "11.10.4",
|
121
121
|
"cz-conventional-changelog": "3.3.0",
|
122
122
|
"eslint": "8.56.0",
|
123
123
|
"eslint-config-airbnb-typescript": "17.1.0",
|
@@ -127,30 +127,31 @@
|
|
127
127
|
"eslint-plugin-prettier": "5.1.3",
|
128
128
|
"eslint-plugin-react": "7.33.2",
|
129
129
|
"eslint-plugin-react-hooks": "4.6.0",
|
130
|
-
"globals": "
|
130
|
+
"globals": "15.9.0",
|
131
131
|
"identity-obj-proxy": "3.0.0",
|
132
132
|
"jest": "29.7.0",
|
133
133
|
"jest-environment-jsdom": "29.7.0",
|
134
134
|
"jest-matchmedia-mock": "1.1.0",
|
135
|
-
"lefthook": "1.7.
|
136
|
-
"postcss": "8.4.
|
135
|
+
"lefthook": "1.7.17",
|
136
|
+
"postcss": "8.4.47",
|
137
137
|
"postcss-cli": "11.0.0",
|
138
138
|
"postcss-each": "1.1.0",
|
139
139
|
"postcss-nested": "6.2.0",
|
140
140
|
"prettier": "3.3.3",
|
141
141
|
"react": "18.3.1",
|
142
142
|
"react-dom": "18.3.1",
|
143
|
-
"
|
144
|
-
"
|
145
|
-
"
|
146
|
-
"
|
143
|
+
"react-shadow": "20.5.0",
|
144
|
+
"resolve-tspaths": "0.8.22",
|
145
|
+
"size-limit": "11.1.5",
|
146
|
+
"storybook": "8.3.4",
|
147
|
+
"stylelint": "16.9.0",
|
147
148
|
"stylelint-config-prettier": "9.0.5",
|
148
149
|
"stylelint-config-standard": "36.0.1",
|
149
|
-
"ts-jest": "29.2.
|
150
|
+
"ts-jest": "29.2.5",
|
150
151
|
"ts-node": "10.9.2",
|
151
|
-
"typescript": "5.
|
152
|
-
"typescript-eslint": "
|
153
|
-
"vite": "5.4.
|
152
|
+
"typescript": "5.6.2",
|
153
|
+
"typescript-eslint": "8.7.0",
|
154
|
+
"vite": "5.4.8",
|
154
155
|
"vite-tsconfig-paths": "4.3.2"
|
155
156
|
},
|
156
157
|
"peerDependencies": {
|
@@ -163,6 +164,7 @@
|
|
163
164
|
"chalk": "4.1.2",
|
164
165
|
"commander": "11.1.0",
|
165
166
|
"cssnano": "7.0.5",
|
167
|
+
"csstype": "^3.1.3",
|
166
168
|
"culori": "4.0.1",
|
167
169
|
"postcss-custom-media": "11.0.0"
|
168
170
|
},
|
package/dist/utilities/dom.d.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
export declare const getClosestFlyoutTarget: (el: HTMLElement | null) => HTMLElement;
|
2
|
-
export declare const disableUserSelect: () => void;
|
3
|
-
export declare const enableUserSelect: () => void;
|
4
|
-
export declare const disableScroll: () => void;
|
5
|
-
export declare const enableScroll: () => void;
|
package/dist/utilities/dom.js
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
export const getClosestFlyoutTarget = (el) => {
|
2
|
-
const style = el && window.getComputedStyle(el);
|
3
|
-
const overflowY = style?.overflowY;
|
4
|
-
const position = style?.position;
|
5
|
-
const isScrollable = overflowY?.includes("scroll");
|
6
|
-
const isFixed = position === "fixed" || position === "sticky";
|
7
|
-
if (el === document.body || !el)
|
8
|
-
return document.body;
|
9
|
-
if ((isScrollable && el.scrollHeight > el.clientHeight) || isFixed)
|
10
|
-
return el;
|
11
|
-
return getClosestFlyoutTarget(el.parentElement);
|
12
|
-
};
|
13
|
-
export const disableUserSelect = () => {
|
14
|
-
document.body.style.userSelect = "none";
|
15
|
-
};
|
16
|
-
export const enableUserSelect = () => {
|
17
|
-
document.body.style.userSelect = "";
|
18
|
-
};
|
19
|
-
const preventDefault = (e) => e.preventDefault();
|
20
|
-
export const disableScroll = () => {
|
21
|
-
window.addEventListener("wheel", preventDefault, { passive: false });
|
22
|
-
window.addEventListener("touchmove", preventDefault, { passive: false });
|
23
|
-
};
|
24
|
-
export const enableScroll = () => {
|
25
|
-
window.removeEventListener("wheel", preventDefault);
|
26
|
-
window.removeEventListener("touchmove", preventDefault);
|
27
|
-
};
|