@zendeskgarden/react-grid 9.11.1 → 9.11.3

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.
@@ -21,8 +21,8 @@ import { Col } from './Col.js';
21
21
 
22
22
  const GridComponent = React.forwardRef((_ref, ref) => {
23
23
  let {
24
- columns,
25
- gutters,
24
+ columns = 12,
25
+ gutters = 'md',
26
26
  debug,
27
27
  ...other
28
28
  } = _ref;
@@ -45,10 +45,6 @@ GridComponent.propTypes = {
45
45
  gutters: PropTypes.oneOf(SPACE),
46
46
  debug: PropTypes.bool
47
47
  };
48
- GridComponent.defaultProps = {
49
- columns: 12,
50
- gutters: 'md'
51
- };
52
48
  const Grid = GridComponent;
53
49
  Grid.Row = Row;
54
50
  Grid.Col = Col;
@@ -42,7 +42,7 @@ const SplitterComponent = forwardRef((_ref, ref) => {
42
42
  layoutKey,
43
43
  min,
44
44
  max,
45
- orientation,
45
+ orientation = 'end',
46
46
  isFixed,
47
47
  onMouseDown,
48
48
  onTouchStart,
@@ -120,9 +120,6 @@ SplitterComponent.propTypes = {
120
120
  orientation: PropTypes.oneOf(ORIENTATION),
121
121
  isFixed: PropTypes.bool
122
122
  };
123
- SplitterComponent.defaultProps = {
124
- orientation: 'end'
125
- };
126
123
  const Splitter = SplitterComponent;
127
124
 
128
125
  export { Splitter };
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { componentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
9
+ import { componentStyles, getColor } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'grid.col';
12
12
  const colorStyles = _ref => {
@@ -74,16 +74,13 @@ const sizeStyles = _ref2 => {
74
74
  const padding = $gutters ? math(`${theme.space[$gutters]} / 2`) : 0;
75
75
  return css(["padding-right:", ";padding-left:", ";"], padding, padding);
76
76
  };
77
- const StyledCol = styled.div.attrs({
77
+ const StyledCol = styled.div.attrs(props => ({
78
78
  'data-garden-id': COMPONENT_ID,
79
- 'data-garden-version': '9.11.1'
80
- }).withConfig({
79
+ 'data-garden-version': '9.11.3',
80
+ $columns: props.$columns ?? 12
81
+ })).withConfig({
81
82
  displayName: "StyledCol",
82
83
  componentId: "sc-inuw62-0"
83
84
  })(["box-sizing:border-box;width:100%;", ";", ";", ";", ";", ";", ";", ";", ";", ";"], props => flexStyles(!props.$sizeAll && (props.$xs || props.$sm || props.$md || props.$lg || props.$xl) ? undefined : props.$sizeAll || false, props.$alignSelf, props.$textAlign, props.$offset, props.$order, props), sizeStyles, props => props.$debug && colorStyles(props), props => mediaStyles(props.theme.breakpoints.xs, props.$xs, props.$alignSelfXs, props.$textAlignXs, props.$offsetXs, props.$orderXs, props), props => mediaStyles(props.theme.breakpoints.sm, props.$sm, props.$alignSelfSm, props.$textAlignSm, props.$offsetSm, props.$orderSm, props), props => mediaStyles(props.theme.breakpoints.md, props.$md, props.$alignSelfMd, props.$textAlignMd, props.$offsetMd, props.$orderMd, props), props => mediaStyles(props.theme.breakpoints.lg, props.$lg, props.$alignSelfLg, props.$textAlignLg, props.$offsetLg, props.$orderLg, props), props => mediaStyles(props.theme.breakpoints.xl, props.$xl, props.$alignSelfXl, props.$textAlignXl, props.$offsetXl, props.$orderXl, props), componentStyles);
84
- StyledCol.defaultProps = {
85
- $columns: 12,
86
- theme: DEFAULT_THEME
87
- };
88
85
 
89
86
  export { StyledCol };
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { componentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
9
+ import { componentStyles, getColor } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'grid.grid';
12
12
  const colorStyles = _ref => {
@@ -34,16 +34,13 @@ const sizeStyles = _ref2 => {
34
34
  const padding = $gutters ? math(`${theme.space[$gutters]} / 2`) : 0;
35
35
  return css(["padding-right:", ";padding-left:", ";"], padding, padding);
36
36
  };
37
- const StyledGrid = styled.div.attrs({
37
+ const StyledGrid = styled.div.attrs(props => ({
38
38
  'data-garden-id': COMPONENT_ID,
39
- 'data-garden-version': '9.11.1'
40
- }).withConfig({
39
+ 'data-garden-version': '9.11.3',
40
+ $gutters: props.$gutters ?? 'md'
41
+ })).withConfig({
41
42
  displayName: "StyledGrid",
42
43
  componentId: "sc-oxgg5i-0"
43
44
  })(["direction:", ";margin-right:auto;margin-left:auto;width:100%;box-sizing:border-box;", ";", ";", ";"], props => props.theme.rtl && 'rtl', sizeStyles, colorStyles, componentStyles);
44
- StyledGrid.defaultProps = {
45
- $gutters: 'md',
46
- theme: DEFAULT_THEME
47
- };
48
45
 
49
46
  export { StyledGrid };
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { componentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
9
+ import { componentStyles, getColor } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'grid.row';
12
12
  const colorStyles = _ref => {
@@ -50,16 +50,13 @@ const sizeStyles = _ref2 => {
50
50
  const margin = $gutters ? math(`${theme.space[$gutters]} / 2`) : 0;
51
51
  return css(["margin-right:-", ";margin-left:-", ";"], margin, margin);
52
52
  };
53
- const StyledRow = styled.div.attrs({
53
+ const StyledRow = styled.div.attrs(props => ({
54
54
  'data-garden-id': COMPONENT_ID,
55
- 'data-garden-version': '9.11.1'
56
- }).withConfig({
55
+ 'data-garden-version': '9.11.3',
56
+ $wrapAll: props.$wrapAll ?? 'wrap'
57
+ })).withConfig({
57
58
  displayName: "StyledRow",
58
59
  componentId: "sc-xjsdg1-0"
59
60
  })(["display:flex;box-sizing:border-box;", " ", ";", ";", ";", ";", ";", ";", ";", ";"], props => flexStyles(props.$alignItems, props.$justifyContent, props.$wrapAll), sizeStyles, props => props.$debug && colorStyles(props), props => mediaStyles(props.theme.breakpoints.xs, props.$alignItemsXs, props.$justifyContentXs, props.$wrapXs), props => mediaStyles(props.theme.breakpoints.sm, props.$alignItemsSm, props.$justifyContentSm, props.$wrapSm), props => mediaStyles(props.theme.breakpoints.md, props.$alignItemsMd, props.$justifyContentMd, props.$wrapMd), props => mediaStyles(props.theme.breakpoints.lg, props.$alignItemsLg, props.$justifyContentLg, props.$wrapLg), props => mediaStyles(props.theme.breakpoints.xl, props.$alignItemsXl, props.$justifyContentXl, props.$wrapXl), componentStyles);
60
- StyledRow.defaultProps = {
61
- $wrapAll: 'wrap',
62
- theme: DEFAULT_THEME
63
- };
64
61
 
65
62
  export { StyledRow };
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
10
10
  const COMPONENT_ID = 'pane';
11
11
  const StyledPane = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.11.1'
13
+ 'data-garden-version': '9.11.3'
14
14
  }).withConfig({
15
15
  displayName: "StyledPane",
16
16
  componentId: "sc-1ltjst7-0"
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
10
10
  const COMPONENT_ID = 'pane.content';
11
11
  const StyledPaneContent = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.11.1'
13
+ 'data-garden-version': '9.11.3'
14
14
  }).withConfig({
15
15
  displayName: "StyledPaneContent",
16
16
  componentId: "sc-1b38mbh-0"
@@ -107,7 +107,7 @@ const sizeStyles = _ref2 => {
107
107
  };
108
108
  const StyledPaneSplitter = styled.div.attrs({
109
109
  'data-garden-id': COMPONENT_ID,
110
- 'data-garden-version': '9.11.1'
110
+ 'data-garden-version': '9.11.3'
111
111
  }).withConfig({
112
112
  displayName: "StyledPaneSplitter",
113
113
  componentId: "sc-jylemn-0"
@@ -36,7 +36,7 @@ const transformStyles = _ref2 => {
36
36
  return css(["& > svg{transform:rotate(", "deg);}"], degrees);
37
37
  };
38
38
  const StyledPaneSplitterButton = styled(ChevronButton).attrs({
39
- 'data-garden-version': '9.11.1',
39
+ 'data-garden-version': '9.11.3',
40
40
  isBasic: true,
41
41
  isPill: true,
42
42
  size: 'small'
@@ -119,7 +119,7 @@ const sizeStyles = _ref3 => {
119
119
  const minimumSplitterSize = theme => stripUnit(math(`${theme.shadowWidths.md} * 2 + ${getSize(theme)}`));
120
120
  const StyledPaneSplitterButtonContainer = styled.div.attrs({
121
121
  'data-garden-id': COMPONENT_ID,
122
- 'data-garden-version': '9.11.1'
122
+ 'data-garden-version': '9.11.3'
123
123
  }).withConfig({
124
124
  displayName: "StyledPaneSplitterButtonContainer",
125
125
  componentId: "sc-1w84y62-0"
package/dist/index.cjs.js CHANGED
@@ -100,17 +100,14 @@ const sizeStyles$5 = _ref2 => {
100
100
  const padding = $gutters ? polished.math(`${theme.space[$gutters]} / 2`) : 0;
101
101
  return styled.css(["padding-right:", ";padding-left:", ";"], padding, padding);
102
102
  };
103
- const StyledCol = styled__default.default.div.attrs({
103
+ const StyledCol = styled__default.default.div.attrs(props => ({
104
104
  'data-garden-id': COMPONENT_ID$6,
105
- 'data-garden-version': '9.11.1'
106
- }).withConfig({
105
+ 'data-garden-version': '9.11.3',
106
+ $columns: props.$columns ?? 12
107
+ })).withConfig({
107
108
  displayName: "StyledCol",
108
109
  componentId: "sc-inuw62-0"
109
110
  })(["box-sizing:border-box;width:100%;", ";", ";", ";", ";", ";", ";", ";", ";", ";"], props => flexStyles$1(!props.$sizeAll && (props.$xs || props.$sm || props.$md || props.$lg || props.$xl) ? undefined : props.$sizeAll || false, props.$alignSelf, props.$textAlign, props.$offset, props.$order, props), sizeStyles$5, props => props.$debug && colorStyles$4(props), props => mediaStyles$1(props.theme.breakpoints.xs, props.$xs, props.$alignSelfXs, props.$textAlignXs, props.$offsetXs, props.$orderXs, props), props => mediaStyles$1(props.theme.breakpoints.sm, props.$sm, props.$alignSelfSm, props.$textAlignSm, props.$offsetSm, props.$orderSm, props), props => mediaStyles$1(props.theme.breakpoints.md, props.$md, props.$alignSelfMd, props.$textAlignMd, props.$offsetMd, props.$orderMd, props), props => mediaStyles$1(props.theme.breakpoints.lg, props.$lg, props.$alignSelfLg, props.$textAlignLg, props.$offsetLg, props.$orderLg, props), props => mediaStyles$1(props.theme.breakpoints.xl, props.$xl, props.$alignSelfXl, props.$textAlignXl, props.$offsetXl, props.$orderXl, props), reactTheming.componentStyles);
110
- StyledCol.defaultProps = {
111
- $columns: 12,
112
- theme: reactTheming.DEFAULT_THEME
113
- };
114
111
 
115
112
  const COMPONENT_ID$5 = 'grid.grid';
116
113
  const colorStyles$3 = _ref => {
@@ -138,17 +135,14 @@ const sizeStyles$4 = _ref2 => {
138
135
  const padding = $gutters ? polished.math(`${theme.space[$gutters]} / 2`) : 0;
139
136
  return styled.css(["padding-right:", ";padding-left:", ";"], padding, padding);
140
137
  };
141
- const StyledGrid = styled__default.default.div.attrs({
138
+ const StyledGrid = styled__default.default.div.attrs(props => ({
142
139
  'data-garden-id': COMPONENT_ID$5,
143
- 'data-garden-version': '9.11.1'
144
- }).withConfig({
140
+ 'data-garden-version': '9.11.3',
141
+ $gutters: props.$gutters ?? 'md'
142
+ })).withConfig({
145
143
  displayName: "StyledGrid",
146
144
  componentId: "sc-oxgg5i-0"
147
145
  })(["direction:", ";margin-right:auto;margin-left:auto;width:100%;box-sizing:border-box;", ";", ";", ";"], props => props.theme.rtl && 'rtl', sizeStyles$4, colorStyles$3, reactTheming.componentStyles);
148
- StyledGrid.defaultProps = {
149
- $gutters: 'md',
150
- theme: reactTheming.DEFAULT_THEME
151
- };
152
146
 
153
147
  const COMPONENT_ID$4 = 'grid.row';
154
148
  const colorStyles$2 = _ref => {
@@ -192,22 +186,19 @@ const sizeStyles$3 = _ref2 => {
192
186
  const margin = $gutters ? polished.math(`${theme.space[$gutters]} / 2`) : 0;
193
187
  return styled.css(["margin-right:-", ";margin-left:-", ";"], margin, margin);
194
188
  };
195
- const StyledRow = styled__default.default.div.attrs({
189
+ const StyledRow = styled__default.default.div.attrs(props => ({
196
190
  'data-garden-id': COMPONENT_ID$4,
197
- 'data-garden-version': '9.11.1'
198
- }).withConfig({
191
+ 'data-garden-version': '9.11.3',
192
+ $wrapAll: props.$wrapAll ?? 'wrap'
193
+ })).withConfig({
199
194
  displayName: "StyledRow",
200
195
  componentId: "sc-xjsdg1-0"
201
196
  })(["display:flex;box-sizing:border-box;", " ", ";", ";", ";", ";", ";", ";", ";", ";"], props => flexStyles(props.$alignItems, props.$justifyContent, props.$wrapAll), sizeStyles$3, props => props.$debug && colorStyles$2(props), props => mediaStyles(props.theme.breakpoints.xs, props.$alignItemsXs, props.$justifyContentXs, props.$wrapXs), props => mediaStyles(props.theme.breakpoints.sm, props.$alignItemsSm, props.$justifyContentSm, props.$wrapSm), props => mediaStyles(props.theme.breakpoints.md, props.$alignItemsMd, props.$justifyContentMd, props.$wrapMd), props => mediaStyles(props.theme.breakpoints.lg, props.$alignItemsLg, props.$justifyContentLg, props.$wrapLg), props => mediaStyles(props.theme.breakpoints.xl, props.$alignItemsXl, props.$justifyContentXl, props.$wrapXl), reactTheming.componentStyles);
202
- StyledRow.defaultProps = {
203
- $wrapAll: 'wrap',
204
- theme: reactTheming.DEFAULT_THEME
205
- };
206
197
 
207
198
  const COMPONENT_ID$3 = 'pane';
208
199
  const StyledPane = styled__default.default.div.attrs({
209
200
  'data-garden-id': COMPONENT_ID$3,
210
- 'data-garden-version': '9.11.1'
201
+ 'data-garden-version': '9.11.3'
211
202
  }).withConfig({
212
203
  displayName: "StyledPane",
213
204
  componentId: "sc-1ltjst7-0"
@@ -216,7 +207,7 @@ const StyledPane = styled__default.default.div.attrs({
216
207
  const COMPONENT_ID$2 = 'pane.content';
217
208
  const StyledPaneContent = styled__default.default.div.attrs({
218
209
  'data-garden-id': COMPONENT_ID$2,
219
- 'data-garden-version': '9.11.1'
210
+ 'data-garden-version': '9.11.3'
220
211
  }).withConfig({
221
212
  displayName: "StyledPaneContent",
222
213
  componentId: "sc-1b38mbh-0"
@@ -321,7 +312,7 @@ const sizeStyles$2 = _ref2 => {
321
312
  };
322
313
  const StyledPaneSplitter = styled__default.default.div.attrs({
323
314
  'data-garden-id': COMPONENT_ID$1,
324
- 'data-garden-version': '9.11.1'
315
+ 'data-garden-version': '9.11.3'
325
316
  }).withConfig({
326
317
  displayName: "StyledPaneSplitter",
327
318
  componentId: "sc-jylemn-0"
@@ -355,7 +346,7 @@ const transformStyles = _ref2 => {
355
346
  return styled.css(["& > svg{transform:rotate(", "deg);}"], degrees);
356
347
  };
357
348
  const StyledPaneSplitterButton = styled__default.default(reactButtons.ChevronButton).attrs({
358
- 'data-garden-version': '9.11.1',
349
+ 'data-garden-version': '9.11.3',
359
350
  isBasic: true,
360
351
  isPill: true,
361
352
  size: 'small'
@@ -473,7 +464,7 @@ const sizeStyles = _ref3 => {
473
464
  const minimumSplitterSize = theme => polished.stripUnit(polished.math(`${theme.shadowWidths.md} * 2 + ${getSize(theme)}`));
474
465
  const StyledPaneSplitterButtonContainer = styled__default.default.div.attrs({
475
466
  'data-garden-id': COMPONENT_ID,
476
- 'data-garden-version': '9.11.1'
467
+ 'data-garden-version': '9.11.3'
477
468
  }).withConfig({
478
469
  displayName: "StyledPaneSplitterButtonContainer",
479
470
  componentId: "sc-1w84y62-0"
@@ -670,8 +661,8 @@ Row.propTypes = {
670
661
 
671
662
  const GridComponent = React__default.default.forwardRef((_ref, ref) => {
672
663
  let {
673
- columns,
674
- gutters,
664
+ columns = 12,
665
+ gutters = 'md',
675
666
  debug,
676
667
  ...other
677
668
  } = _ref;
@@ -694,10 +685,6 @@ GridComponent.propTypes = {
694
685
  gutters: PropTypes__default.default.oneOf(SPACE),
695
686
  debug: PropTypes__default.default.bool
696
687
  };
697
- GridComponent.defaultProps = {
698
- columns: 12,
699
- gutters: 'md'
700
- };
701
688
  const Grid = GridComponent;
702
689
  Grid.Row = Row;
703
690
  Grid.Col = Col;
@@ -934,7 +921,7 @@ const SplitterComponent = React.forwardRef((_ref, ref) => {
934
921
  layoutKey,
935
922
  min,
936
923
  max,
937
- orientation,
924
+ orientation = 'end',
938
925
  isFixed,
939
926
  onMouseDown,
940
927
  onTouchStart,
@@ -1012,9 +999,6 @@ SplitterComponent.propTypes = {
1012
999
  orientation: PropTypes__default.default.oneOf(ORIENTATION),
1013
1000
  isFixed: PropTypes__default.default.bool
1014
1001
  };
1015
- SplitterComponent.defaultProps = {
1016
- orientation: 'end'
1017
- };
1018
1002
  const Splitter = SplitterComponent;
1019
1003
 
1020
1004
  const ContentComponent = React.forwardRef((props, ref) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-grid",
3
- "version": "9.11.1",
3
+ "version": "9.11.3",
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,8 +23,8 @@
23
23
  "dependencies": {
24
24
  "@zendeskgarden/container-splitter": "^2.0.17",
25
25
  "@zendeskgarden/container-utilities": "^2.0.0",
26
- "@zendeskgarden/react-buttons": "^9.11.1",
27
- "@zendeskgarden/react-tooltips": "^9.11.1",
26
+ "@zendeskgarden/react-buttons": "^9.11.3",
27
+ "@zendeskgarden/react-tooltips": "^9.11.3",
28
28
  "polished": "^4.3.1",
29
29
  "prop-types": "^15.5.7",
30
30
  "react-merge-refs": "^2.0.0",
@@ -37,7 +37,7 @@
37
37
  "styled-components": "^5.3.1 || ^6.0.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@zendeskgarden/react-theming": "^9.11.1"
40
+ "@zendeskgarden/react-theming": "^9.11.3"
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": "c45a8893e0ed1fd9f1cf257b2badf6bbeae90bc0"
52
+ "gitHead": "3f20a4270555169d6fc00ecd93e85346a5ee50f5"
53
53
  }