reshaped 3.0.11-rc.3 → 3.1.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 +2 -0
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +14 -9
- package/dist/components/Carousel/CarouselControl.js +1 -1
- package/dist/components/Tabs/TabsContext.d.ts +6 -6
- package/dist/components/Toast/ToastRegion.js +1 -1
- package/dist/components/_private/Flyout/tests/Flyout.stories.js +2 -3
- package/dist/components/_private/Flyout/useFlyout.js +1 -1
- package/package.json +40 -36
@@ -36,7 +36,7 @@ const CarouselControl = (props) => {
|
|
36
36
|
if (timer)
|
37
37
|
clearTimeout(timer);
|
38
38
|
};
|
39
|
-
}, [scrollPosition, scrollElRef
|
39
|
+
}, [scrollPosition, scrollElRef, mounted, isNext]);
|
40
40
|
return (_jsx("div", { className: controlClassNames, "aria-hidden": "true", children: _jsx(Button, { onClick: onClick, icon: isDisplayedAsNext ? IconChevronRight : IconChevronLeft, rounded: true, variant: "outline", elevated: true, attributes: { "aria-disabled": !visible } }) }));
|
41
41
|
};
|
42
42
|
export default CarouselControl;
|
@@ -4,14 +4,14 @@ export declare const TabsProvider: React.Provider<T.Context>;
|
|
4
4
|
export declare const useTabs: (value?: string) => {
|
5
5
|
panelId: string | undefined;
|
6
6
|
buttonId: string | undefined;
|
7
|
-
name?: string;
|
8
|
-
onChange?: (args: {
|
7
|
+
name?: string | undefined;
|
8
|
+
onChange?: ((args: {
|
9
9
|
value: string;
|
10
10
|
name?: string;
|
11
|
-
}) => void;
|
12
|
-
direction?: "column" | "row";
|
13
|
-
variant?: "bordered" | "borderless" | "pills" | "pills-elevated";
|
14
|
-
itemWidth?: "equal";
|
11
|
+
}) => void) | undefined;
|
12
|
+
direction?: ("column" | "row") | undefined;
|
13
|
+
variant?: ("bordered" | "borderless" | "pills" | "pills-elevated") | undefined;
|
14
|
+
itemWidth?: "equal" | undefined;
|
15
15
|
size: NonNullable<T.BaseProps["size"]>;
|
16
16
|
value?: string;
|
17
17
|
setDefaultValue: (value: string) => void;
|
@@ -53,7 +53,7 @@ const ToastRegion = (props) => {
|
|
53
53
|
return null;
|
54
54
|
return (
|
55
55
|
// We only use onClick for touch devices since touchend is not supported
|
56
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
56
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events
|
57
57
|
_jsx("ul", { role: "region", "aria-live": "polite", className: regionClassNames, ref: rootRef, onTouchStart: handleTouchStart, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, style: { width }, children: queue.map((data, index) => {
|
58
58
|
const visibleIndex = filteredLength - index + hiddenCount - 1;
|
59
59
|
if (data.status !== "entered")
|
@@ -136,10 +136,9 @@ if (!window.customElements.get("custom-element")) {
|
|
136
136
|
export const customPortalTarget = () => {
|
137
137
|
const portalRef = React.useRef(null);
|
138
138
|
return (<Example>
|
139
|
-
<div style={{ height: 1000 }}/>
|
140
139
|
<Example.Item title="Custom containerRef">
|
141
140
|
<View padding={4} paddingInline={40} height={50} overflow="auto" backgroundColor="neutral-faded" borderRadius="small" attributes={{ ref: portalRef }}>
|
142
|
-
<Flyout position="bottom-end" containerRef={portalRef}>
|
141
|
+
<Flyout position="bottom-end" containerRef={portalRef} active>
|
143
142
|
<Flyout.Trigger>{(attributes) => <button {...attributes}>Open</button>}</Flyout.Trigger>
|
144
143
|
<Flyout.Content>
|
145
144
|
<div style={{
|
@@ -164,7 +163,7 @@ export const customPortalTarget = () => {
|
|
164
163
|
</Example.Item>
|
165
164
|
</Example>);
|
166
165
|
};
|
167
|
-
export const testWidthOverflowOnMobile = () => (<Demo position="bottom-start" width=
|
166
|
+
export const testWidthOverflowOnMobile = () => (<Demo position="bottom-start" width={600}>
|
168
167
|
Should work on mobile
|
169
168
|
<button type="button">Item 1</button>
|
170
169
|
<button type="button">Item 2</button>
|
@@ -79,7 +79,7 @@ const flyout = (triggerEl, flyoutEl, options) => {
|
|
79
79
|
}
|
80
80
|
const rootNode = triggerEl?.getRootNode();
|
81
81
|
const shadowRoot = rootNode instanceof ShadowRoot ? rootNode : null;
|
82
|
-
//
|
82
|
+
// Insert inside shadow root if possible to make sure styles are applied correctly
|
83
83
|
(shadowRoot || document.body).appendChild(targetClone);
|
84
84
|
const flyoutBounds = targetClone.getBoundingClientRect();
|
85
85
|
const containerParent = container || getClosestFlyoutTarget(triggerEl);
|
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.0
|
4
|
+
"version": "3.1.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"email": "hello@reshaped.so",
|
7
7
|
"homepage": "https://reshaped.so",
|
@@ -84,7 +84,7 @@
|
|
84
84
|
"test:unit": "jest --config tools/jest/jest.config.ts",
|
85
85
|
"test:size": "size-limit",
|
86
86
|
"lint": "yarn lint:js && yarn lint:css",
|
87
|
-
"lint:js": "eslint
|
87
|
+
"lint:js": "eslint './src/**/*.{ts,tsx}' --fix",
|
88
88
|
"lint:css": "stylelint 'src/**/*.css'",
|
89
89
|
"commit": "git-cz"
|
90
90
|
},
|
@@ -92,29 +92,31 @@
|
|
92
92
|
"defaults and not IE 11"
|
93
93
|
],
|
94
94
|
"devDependencies": {
|
95
|
-
"@commitlint/cli": "19.
|
96
|
-
"@commitlint/config-conventional": "19.
|
95
|
+
"@commitlint/cli": "19.4.0",
|
96
|
+
"@commitlint/config-conventional": "19.2.2",
|
97
97
|
"@commitlint/types": "19.0.3",
|
98
|
-
"@
|
99
|
-
"@
|
100
|
-
"@storybook/addon-
|
101
|
-
"@storybook/addon-
|
102
|
-
"@storybook/addon-
|
103
|
-
"@storybook/
|
104
|
-
"@storybook/react
|
105
|
-
"@
|
106
|
-
"@testing-library/
|
98
|
+
"@eslint/js": "^9.9.0",
|
99
|
+
"@size-limit/preset-big-lib": "11.1.4",
|
100
|
+
"@storybook/addon-a11y": "8.2.8",
|
101
|
+
"@storybook/addon-controls": "8.2.8",
|
102
|
+
"@storybook/addon-docs": "8.2.8",
|
103
|
+
"@storybook/addon-storysource": "8.2.8",
|
104
|
+
"@storybook/react": "8.2.8",
|
105
|
+
"@storybook/react-vite": "8.2.8",
|
106
|
+
"@testing-library/dom": "10.4.0",
|
107
|
+
"@testing-library/jest-dom": "6.4.8",
|
108
|
+
"@testing-library/react": "16.0.0",
|
107
109
|
"@testing-library/user-event": "14.5.2",
|
108
|
-
"@types/culori": "
|
110
|
+
"@types/culori": "2.1.1",
|
109
111
|
"@types/events": "3.0.3",
|
110
112
|
"@types/jest": "29.5.12",
|
111
|
-
"@types/node": "
|
112
|
-
"@types/react": "18.
|
113
|
-
"@types/react-dom": "18.
|
113
|
+
"@types/node": "22.2.0",
|
114
|
+
"@types/react": "18.3.3",
|
115
|
+
"@types/react-dom": "18.3.0",
|
114
116
|
"@typescript-eslint/eslint-plugin": "7.6.0",
|
115
117
|
"@typescript-eslint/parser": "7.6.0",
|
116
|
-
"@vitejs/plugin-react": "4.
|
117
|
-
"chromatic": "11.
|
118
|
+
"@vitejs/plugin-react": "4.3.1",
|
119
|
+
"chromatic": "11.7.0",
|
118
120
|
"cz-conventional-changelog": "3.3.0",
|
119
121
|
"eslint": "8.56.0",
|
120
122
|
"eslint-config-airbnb-typescript": "17.1.0",
|
@@ -124,28 +126,30 @@
|
|
124
126
|
"eslint-plugin-prettier": "5.1.3",
|
125
127
|
"eslint-plugin-react": "7.33.2",
|
126
128
|
"eslint-plugin-react-hooks": "4.6.0",
|
129
|
+
"globals": "^15.9.0",
|
127
130
|
"identity-obj-proxy": "3.0.0",
|
128
131
|
"jest": "29.7.0",
|
129
132
|
"jest-environment-jsdom": "29.7.0",
|
130
133
|
"jest-matchmedia-mock": "1.1.0",
|
131
|
-
"lefthook": "1.
|
132
|
-
"postcss": "8.4.
|
134
|
+
"lefthook": "1.7.12",
|
135
|
+
"postcss": "8.4.41",
|
133
136
|
"postcss-cli": "11.0.0",
|
134
137
|
"postcss-each": "1.1.0",
|
135
|
-
"postcss-nested": "6.0
|
136
|
-
"prettier": "3.
|
137
|
-
"react": "18.
|
138
|
-
"react-dom": "18.
|
139
|
-
"resolve-tspaths": "0.8.
|
140
|
-
"size-limit": "11.1.
|
141
|
-
"storybook": "8.
|
142
|
-
"stylelint": "16.
|
138
|
+
"postcss-nested": "6.2.0",
|
139
|
+
"prettier": "3.3.3",
|
140
|
+
"react": "18.3.1",
|
141
|
+
"react-dom": "18.3.1",
|
142
|
+
"resolve-tspaths": "0.8.19",
|
143
|
+
"size-limit": "11.1.4",
|
144
|
+
"storybook": "8.2.8",
|
145
|
+
"stylelint": "16.8.1",
|
143
146
|
"stylelint-config-prettier": "9.0.5",
|
144
|
-
"stylelint-config-standard": "36.0.
|
145
|
-
"ts-jest": "29.
|
147
|
+
"stylelint-config-standard": "36.0.1",
|
148
|
+
"ts-jest": "29.2.4",
|
146
149
|
"ts-node": "10.9.2",
|
147
|
-
"typescript": "5.5.
|
148
|
-
"
|
150
|
+
"typescript": "5.5.4",
|
151
|
+
"typescript-eslint": "^8.0.1",
|
152
|
+
"vite": "5.4.0",
|
149
153
|
"vite-tsconfig-paths": "4.3.2"
|
150
154
|
},
|
151
155
|
"peerDependencies": {
|
@@ -154,12 +158,12 @@
|
|
154
158
|
"react-dom": "^18"
|
155
159
|
},
|
156
160
|
"dependencies": {
|
157
|
-
"@csstools/postcss-global-data": "
|
161
|
+
"@csstools/postcss-global-data": "3.0.0",
|
158
162
|
"chalk": "4.1.2",
|
159
163
|
"commander": "11.1.0",
|
160
|
-
"cssnano": "
|
164
|
+
"cssnano": "7.0.5",
|
161
165
|
"culori": "4.0.1",
|
162
|
-
"postcss-custom-media": "
|
166
|
+
"postcss-custom-media": "11.0.0"
|
163
167
|
},
|
164
168
|
"resolutions": {
|
165
169
|
"jackspeak": "2.1.1"
|