@zendeskgarden/react-grid 8.66.0 → 8.68.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/dist/index.cjs.js
CHANGED
|
@@ -103,7 +103,7 @@ const sizeStyles$4 = props => {
|
|
|
103
103
|
};
|
|
104
104
|
const StyledCol = styled__default.default.div.attrs({
|
|
105
105
|
'data-garden-id': COMPONENT_ID$6,
|
|
106
|
-
'data-garden-version': '8.
|
|
106
|
+
'data-garden-version': '8.68.0'
|
|
107
107
|
}).withConfig({
|
|
108
108
|
displayName: "StyledCol",
|
|
109
109
|
componentId: "sc-inuw62-0"
|
|
@@ -125,7 +125,7 @@ const sizeStyles$3 = props => {
|
|
|
125
125
|
};
|
|
126
126
|
const StyledGrid = styled__default.default.div.attrs({
|
|
127
127
|
'data-garden-id': COMPONENT_ID$5,
|
|
128
|
-
'data-garden-version': '8.
|
|
128
|
+
'data-garden-version': '8.68.0'
|
|
129
129
|
}).withConfig({
|
|
130
130
|
displayName: "StyledGrid",
|
|
131
131
|
componentId: "sc-oxgg5i-0"
|
|
@@ -167,7 +167,7 @@ const sizeStyles$2 = props => {
|
|
|
167
167
|
};
|
|
168
168
|
const StyledRow = styled__default.default.div.attrs({
|
|
169
169
|
'data-garden-id': COMPONENT_ID$4,
|
|
170
|
-
'data-garden-version': '8.
|
|
170
|
+
'data-garden-version': '8.68.0'
|
|
171
171
|
}).withConfig({
|
|
172
172
|
displayName: "StyledRow",
|
|
173
173
|
componentId: "sc-xjsdg1-0"
|
|
@@ -180,7 +180,7 @@ StyledRow.defaultProps = {
|
|
|
180
180
|
const COMPONENT_ID$3 = 'pane';
|
|
181
181
|
const StyledPane = styled__default.default.div.attrs({
|
|
182
182
|
'data-garden-id': COMPONENT_ID$3,
|
|
183
|
-
'data-garden-version': '8.
|
|
183
|
+
'data-garden-version': '8.68.0'
|
|
184
184
|
}).withConfig({
|
|
185
185
|
displayName: "StyledPane",
|
|
186
186
|
componentId: "sc-1ltjst7-0"
|
|
@@ -192,7 +192,7 @@ StyledPane.defaultProps = {
|
|
|
192
192
|
const COMPONENT_ID$2 = 'pane.content';
|
|
193
193
|
const StyledPaneContent = styled__default.default.div.attrs({
|
|
194
194
|
'data-garden-id': COMPONENT_ID$2,
|
|
195
|
-
'data-garden-version': '8.
|
|
195
|
+
'data-garden-version': '8.68.0'
|
|
196
196
|
}).withConfig({
|
|
197
197
|
displayName: "StyledPaneContent",
|
|
198
198
|
componentId: "sc-1b38mbh-0"
|
|
@@ -206,8 +206,14 @@ const colorStyles$1 = props => {
|
|
|
206
206
|
const color = reactTheming.getColor('neutralHue', 300, props.theme);
|
|
207
207
|
const hoverColor = reactTheming.getColor('primaryHue', 600, props.theme);
|
|
208
208
|
const activeColor = reactTheming.getColor('primaryHue', 800, props.theme);
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
return styled.css(["&::before{background-color:", ";}&:hover::before{background-color:", ";}", " &:active::before{background-color:", ";}"], color, props.isHovered && hoverColor, reactTheming.focusStyles({
|
|
210
|
+
theme: props.theme,
|
|
211
|
+
hue: hoverColor,
|
|
212
|
+
styles: {
|
|
213
|
+
backgroundColor: hoverColor
|
|
214
|
+
},
|
|
215
|
+
selector: '&:focus-visible::before, &[data-garden-focus-visible="true"]::before'
|
|
216
|
+
}), props.isHovered && activeColor);
|
|
211
217
|
};
|
|
212
218
|
const sizeStyles$1 = props => {
|
|
213
219
|
const size = polished.math(`${props.theme.shadowWidths.md} * 2`);
|
|
@@ -268,15 +274,15 @@ const sizeStyles$1 = props => {
|
|
|
268
274
|
break;
|
|
269
275
|
}
|
|
270
276
|
const dimensionProperty = width === '100%' ? 'height' : 'width';
|
|
271
|
-
return styled.css(["top:", ";right:", ";bottom:", ";left:", ";cursor:", ";width:", ";height:", ";&::before{width:", ";height:", ";}&:hover::before{", ":", ";}
|
|
277
|
+
return styled.css(["top:", ";right:", ";bottom:", ";left:", ";cursor:", ";width:", ";height:", ";&::before{width:", ";height:", ";}&:hover::before{", ":", ";}&:focus::before,&:focus-visible::before,&[data-garden-focus-visible]::before{", ":", ";}&:focus-visible::before,&[data-garden-focus-visible]::before{border-radius:", ";}"], top, right, bottom, left, props.isFixed ? 'pointer' : cursor, width, height, separatorWidth, separatorHeight, dimensionProperty, props.isHovered && separatorSize, dimensionProperty, separatorSize, props.theme.borderRadii.md);
|
|
272
278
|
};
|
|
273
279
|
const StyledPaneSplitter = styled__default.default.div.attrs({
|
|
274
280
|
'data-garden-id': COMPONENT_ID$1,
|
|
275
|
-
'data-garden-version': '8.
|
|
281
|
+
'data-garden-version': '8.68.0'
|
|
276
282
|
}).withConfig({
|
|
277
283
|
displayName: "StyledPaneSplitter",
|
|
278
284
|
componentId: "sc-jylemn-0"
|
|
279
|
-
})(["display:flex;position:absolute;align-items:center;justify-content:center;z-index:1;user-select:none;", "
|
|
285
|
+
})(["display:flex;position:absolute;align-items:center;justify-content:center;z-index:1;user-select:none;", ";", "{z-index:2;}&::before{position:absolute;transition:box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out;z-index:-1;content:'';}", ";", ";"], sizeStyles$1, reactTheming.SELECTOR_FOCUS_VISIBLE, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
280
286
|
StyledPaneSplitter.defaultProps = {
|
|
281
287
|
theme: reactTheming.DEFAULT_THEME
|
|
282
288
|
};
|
|
@@ -301,8 +307,10 @@ const colorStyles = _ref => {
|
|
|
301
307
|
theme
|
|
302
308
|
} = _ref;
|
|
303
309
|
const boxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, reactTheming.getColor('chromeHue', 600, theme, 0.15));
|
|
304
|
-
|
|
305
|
-
|
|
310
|
+
return styled.css(["box-shadow:", ";", ""], boxShadow, reactTheming.focusStyles({
|
|
311
|
+
theme,
|
|
312
|
+
boxShadow
|
|
313
|
+
}));
|
|
306
314
|
};
|
|
307
315
|
const sizeStyles = props => {
|
|
308
316
|
const size = `${props.theme.space.base * 6}px`;
|
|
@@ -335,14 +343,14 @@ const sizeStyles = props => {
|
|
|
335
343
|
};
|
|
336
344
|
const StyledPaneSplitterButton = styled__default.default(reactButtons.ChevronButton).attrs({
|
|
337
345
|
'data-garden-id': COMPONENT_ID,
|
|
338
|
-
'data-garden-version': '8.
|
|
346
|
+
'data-garden-version': '8.68.0',
|
|
339
347
|
isBasic: true,
|
|
340
348
|
isPill: true,
|
|
341
349
|
size: 'small'
|
|
342
350
|
}).withConfig({
|
|
343
351
|
displayName: "StyledPaneSplitterButton",
|
|
344
352
|
componentId: "sc-zh032e-0"
|
|
345
|
-
})(["position:absolute;transition:background-color 0.25s ease-in-out,opacity 0.25s ease-in-out 0.1s;opacity:0
|
|
353
|
+
})(["position:absolute;transition:box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,opacity 0.25s ease-in-out 0.1s;opacity:0;", ";", ";&::before{position:absolute;z-index:-1;background-color:", ";width:100%;height:100%;content:'';}", ";", ":hover &,", ":focus-visible &,", "[data-garden-focus-visible] &,", "{opacity:1;}", ";"], sizeStyles, transformStyles, props => props.theme.colors.background, colorStyles, StyledPaneSplitter, StyledPaneSplitter, StyledPaneSplitter, reactTheming.SELECTOR_FOCUS_VISIBLE, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
346
354
|
StyledPaneSplitterButton.defaultProps = {
|
|
347
355
|
theme: reactTheming.DEFAULT_THEME
|
|
348
356
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import React, { createContext, useContext, useMemo, useState, useCallback, forwardRef, useRef, useEffect } from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import styled, { css, ThemeContext } from 'styled-components';
|
|
11
|
-
import { math,
|
|
12
|
-
import { retrieveComponentStyles, DEFAULT_THEME, getColor, useDocument, useText } from '@zendeskgarden/react-theming';
|
|
11
|
+
import { math, stripUnit } from 'polished';
|
|
12
|
+
import { retrieveComponentStyles, DEFAULT_THEME, getColor, SELECTOR_FOCUS_VISIBLE, focusStyles, useDocument, useText } from '@zendeskgarden/react-theming';
|
|
13
13
|
import { ChevronButton } from '@zendeskgarden/react-buttons';
|
|
14
14
|
import { useId, composeEventHandlers } from '@zendeskgarden/container-utilities';
|
|
15
15
|
import useResizeObserver from 'use-resize-observer';
|
|
@@ -93,7 +93,7 @@ const sizeStyles$4 = props => {
|
|
|
93
93
|
};
|
|
94
94
|
const StyledCol = styled.div.attrs({
|
|
95
95
|
'data-garden-id': COMPONENT_ID$6,
|
|
96
|
-
'data-garden-version': '8.
|
|
96
|
+
'data-garden-version': '8.68.0'
|
|
97
97
|
}).withConfig({
|
|
98
98
|
displayName: "StyledCol",
|
|
99
99
|
componentId: "sc-inuw62-0"
|
|
@@ -115,7 +115,7 @@ const sizeStyles$3 = props => {
|
|
|
115
115
|
};
|
|
116
116
|
const StyledGrid = styled.div.attrs({
|
|
117
117
|
'data-garden-id': COMPONENT_ID$5,
|
|
118
|
-
'data-garden-version': '8.
|
|
118
|
+
'data-garden-version': '8.68.0'
|
|
119
119
|
}).withConfig({
|
|
120
120
|
displayName: "StyledGrid",
|
|
121
121
|
componentId: "sc-oxgg5i-0"
|
|
@@ -157,7 +157,7 @@ const sizeStyles$2 = props => {
|
|
|
157
157
|
};
|
|
158
158
|
const StyledRow = styled.div.attrs({
|
|
159
159
|
'data-garden-id': COMPONENT_ID$4,
|
|
160
|
-
'data-garden-version': '8.
|
|
160
|
+
'data-garden-version': '8.68.0'
|
|
161
161
|
}).withConfig({
|
|
162
162
|
displayName: "StyledRow",
|
|
163
163
|
componentId: "sc-xjsdg1-0"
|
|
@@ -170,7 +170,7 @@ StyledRow.defaultProps = {
|
|
|
170
170
|
const COMPONENT_ID$3 = 'pane';
|
|
171
171
|
const StyledPane = styled.div.attrs({
|
|
172
172
|
'data-garden-id': COMPONENT_ID$3,
|
|
173
|
-
'data-garden-version': '8.
|
|
173
|
+
'data-garden-version': '8.68.0'
|
|
174
174
|
}).withConfig({
|
|
175
175
|
displayName: "StyledPane",
|
|
176
176
|
componentId: "sc-1ltjst7-0"
|
|
@@ -182,7 +182,7 @@ StyledPane.defaultProps = {
|
|
|
182
182
|
const COMPONENT_ID$2 = 'pane.content';
|
|
183
183
|
const StyledPaneContent = styled.div.attrs({
|
|
184
184
|
'data-garden-id': COMPONENT_ID$2,
|
|
185
|
-
'data-garden-version': '8.
|
|
185
|
+
'data-garden-version': '8.68.0'
|
|
186
186
|
}).withConfig({
|
|
187
187
|
displayName: "StyledPaneContent",
|
|
188
188
|
componentId: "sc-1b38mbh-0"
|
|
@@ -196,8 +196,14 @@ const colorStyles$1 = props => {
|
|
|
196
196
|
const color = getColor('neutralHue', 300, props.theme);
|
|
197
197
|
const hoverColor = getColor('primaryHue', 600, props.theme);
|
|
198
198
|
const activeColor = getColor('primaryHue', 800, props.theme);
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
return css(["&::before{background-color:", ";}&:hover::before{background-color:", ";}", " &:active::before{background-color:", ";}"], color, props.isHovered && hoverColor, focusStyles({
|
|
200
|
+
theme: props.theme,
|
|
201
|
+
hue: hoverColor,
|
|
202
|
+
styles: {
|
|
203
|
+
backgroundColor: hoverColor
|
|
204
|
+
},
|
|
205
|
+
selector: '&:focus-visible::before, &[data-garden-focus-visible="true"]::before'
|
|
206
|
+
}), props.isHovered && activeColor);
|
|
201
207
|
};
|
|
202
208
|
const sizeStyles$1 = props => {
|
|
203
209
|
const size = math(`${props.theme.shadowWidths.md} * 2`);
|
|
@@ -258,15 +264,15 @@ const sizeStyles$1 = props => {
|
|
|
258
264
|
break;
|
|
259
265
|
}
|
|
260
266
|
const dimensionProperty = width === '100%' ? 'height' : 'width';
|
|
261
|
-
return css(["top:", ";right:", ";bottom:", ";left:", ";cursor:", ";width:", ";height:", ";&::before{width:", ";height:", ";}&:hover::before{", ":", ";}
|
|
267
|
+
return css(["top:", ";right:", ";bottom:", ";left:", ";cursor:", ";width:", ";height:", ";&::before{width:", ";height:", ";}&:hover::before{", ":", ";}&:focus::before,&:focus-visible::before,&[data-garden-focus-visible]::before{", ":", ";}&:focus-visible::before,&[data-garden-focus-visible]::before{border-radius:", ";}"], top, right, bottom, left, props.isFixed ? 'pointer' : cursor, width, height, separatorWidth, separatorHeight, dimensionProperty, props.isHovered && separatorSize, dimensionProperty, separatorSize, props.theme.borderRadii.md);
|
|
262
268
|
};
|
|
263
269
|
const StyledPaneSplitter = styled.div.attrs({
|
|
264
270
|
'data-garden-id': COMPONENT_ID$1,
|
|
265
|
-
'data-garden-version': '8.
|
|
271
|
+
'data-garden-version': '8.68.0'
|
|
266
272
|
}).withConfig({
|
|
267
273
|
displayName: "StyledPaneSplitter",
|
|
268
274
|
componentId: "sc-jylemn-0"
|
|
269
|
-
})(["display:flex;position:absolute;align-items:center;justify-content:center;z-index:1;user-select:none;", "
|
|
275
|
+
})(["display:flex;position:absolute;align-items:center;justify-content:center;z-index:1;user-select:none;", ";", "{z-index:2;}&::before{position:absolute;transition:box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out;z-index:-1;content:'';}", ";", ";"], sizeStyles$1, SELECTOR_FOCUS_VISIBLE, colorStyles$1, props => retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
270
276
|
StyledPaneSplitter.defaultProps = {
|
|
271
277
|
theme: DEFAULT_THEME
|
|
272
278
|
};
|
|
@@ -291,8 +297,10 @@ const colorStyles = _ref => {
|
|
|
291
297
|
theme
|
|
292
298
|
} = _ref;
|
|
293
299
|
const boxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, getColor('chromeHue', 600, theme, 0.15));
|
|
294
|
-
|
|
295
|
-
|
|
300
|
+
return css(["box-shadow:", ";", ""], boxShadow, focusStyles({
|
|
301
|
+
theme,
|
|
302
|
+
boxShadow
|
|
303
|
+
}));
|
|
296
304
|
};
|
|
297
305
|
const sizeStyles = props => {
|
|
298
306
|
const size = `${props.theme.space.base * 6}px`;
|
|
@@ -325,14 +333,14 @@ const sizeStyles = props => {
|
|
|
325
333
|
};
|
|
326
334
|
const StyledPaneSplitterButton = styled(ChevronButton).attrs({
|
|
327
335
|
'data-garden-id': COMPONENT_ID,
|
|
328
|
-
'data-garden-version': '8.
|
|
336
|
+
'data-garden-version': '8.68.0',
|
|
329
337
|
isBasic: true,
|
|
330
338
|
isPill: true,
|
|
331
339
|
size: 'small'
|
|
332
340
|
}).withConfig({
|
|
333
341
|
displayName: "StyledPaneSplitterButton",
|
|
334
342
|
componentId: "sc-zh032e-0"
|
|
335
|
-
})(["position:absolute;transition:background-color 0.25s ease-in-out,opacity 0.25s ease-in-out 0.1s;opacity:0
|
|
343
|
+
})(["position:absolute;transition:box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,opacity 0.25s ease-in-out 0.1s;opacity:0;", ";", ";&::before{position:absolute;z-index:-1;background-color:", ";width:100%;height:100%;content:'';}", ";", ":hover &,", ":focus-visible &,", "[data-garden-focus-visible] &,", "{opacity:1;}", ";"], sizeStyles, transformStyles, props => props.theme.colors.background, colorStyles, StyledPaneSplitter, StyledPaneSplitter, StyledPaneSplitter, SELECTOR_FOCUS_VISIBLE, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
336
344
|
StyledPaneSplitterButton.defaultProps = {
|
|
337
345
|
theme: DEFAULT_THEME
|
|
338
346
|
};
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
+
import React from 'react';
|
|
7
8
|
import PropTypes from 'prop-types';
|
|
8
9
|
import { IPaneProviderProps } from '../../types';
|
|
9
10
|
export declare const PaneProvider: {
|
|
10
|
-
({ id, totalPanesWidth, totalPanesHeight, defaultRowValues, defaultColumnValues, rowValues, columnValues, onChange, children }: IPaneProviderProps): JSX.Element;
|
|
11
|
+
({ id, totalPanesWidth, totalPanesHeight, defaultRowValues, defaultColumnValues, rowValues, columnValues, onChange, children }: IPaneProviderProps): React.JSX.Element;
|
|
11
12
|
displayName: string;
|
|
12
13
|
propTypes: {
|
|
13
14
|
id: PropTypes.Requireable<string>;
|
|
@@ -14,6 +14,7 @@ interface IStyledPaneSplitterProps {
|
|
|
14
14
|
/**
|
|
15
15
|
* 1. Elevated initial context to pickup full-width hover
|
|
16
16
|
* 2. Stack below splitter button.
|
|
17
|
+
* 3. Stack above other splitters when focused
|
|
17
18
|
*/
|
|
18
19
|
export declare const StyledPaneSplitter: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
19
20
|
'data-garden-id': string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-grid",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.68.0",
|
|
4
4
|
"description": "Components relating to layout grids in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@zendeskgarden/container-splitter": "^2.0.3",
|
|
25
25
|
"@zendeskgarden/container-utilities": "^1.0.0",
|
|
26
|
-
"@zendeskgarden/react-buttons": "^8.
|
|
27
|
-
"@zendeskgarden/react-tooltips": "^8.
|
|
26
|
+
"@zendeskgarden/react-buttons": "^8.68.0",
|
|
27
|
+
"@zendeskgarden/react-tooltips": "^8.68.0",
|
|
28
28
|
"polished": "^4.0.0",
|
|
29
29
|
"prop-types": "^15.5.7",
|
|
30
30
|
"react-merge-refs": "^1.1.0",
|
|
31
31
|
"use-resize-observer": "^9.1.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@zendeskgarden/react-theming": "^8.
|
|
34
|
+
"@zendeskgarden/react-theming": "^8.67.0",
|
|
35
35
|
"react": ">=16.8.0",
|
|
36
36
|
"react-dom": ">=16.8.0",
|
|
37
37
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@zendeskgarden/react-theming": "^8.
|
|
40
|
+
"@zendeskgarden/react-theming": "^8.68.0"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"components",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"zendeskgarden:src": "src/index.ts",
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "e05a28d586f47d95e0570fe2d529915aa4285845"
|
|
53
53
|
}
|