@zendeskgarden/react-grid 9.0.0-next.8 → 9.0.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.
@@ -35,7 +35,7 @@ const Col = React.forwardRef((_ref, ref) => {
35
35
  ref: ref
36
36
  }, props));
37
37
  });
38
- Col.displayName = 'Col';
38
+ Col.displayName = 'Grid.Col';
39
39
  Col.propTypes = {
40
40
  size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
41
41
  xs: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.bool]),
@@ -33,7 +33,7 @@ const Row = React.forwardRef((_ref, ref) => {
33
33
  ref: ref
34
34
  }, props));
35
35
  });
36
- Row.displayName = 'Row';
36
+ Row.displayName = 'Grid.Row';
37
37
  Row.propTypes = {
38
38
  alignItems: PropTypes.oneOf(ALIGN_ITEMS),
39
39
  alignItemsXs: PropTypes.oneOf(ALIGN_ITEMS),
@@ -6,11 +6,23 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
9
+ import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'grid.col';
12
- const colorStyles = props => {
13
- const backgroundColor = getColorV8('primaryHue', 600, props.theme, 0.1);
12
+ const colorStyles = _ref => {
13
+ let {
14
+ theme
15
+ } = _ref;
16
+ const backgroundColor = getColor({
17
+ theme,
18
+ variable: 'background.primaryEmphasis',
19
+ dark: {
20
+ transparency: theme.opacity[200]
21
+ },
22
+ light: {
23
+ transparency: theme.opacity[100]
24
+ }
25
+ });
14
26
  return css(["background-clip:content-box;background-color:", ";"], backgroundColor);
15
27
  };
16
28
  const flexStyles = (size, alignSelf, textAlign, offset, order, props) => {
@@ -54,17 +66,21 @@ const flexStyles = (size, alignSelf, textAlign, offset, order, props) => {
54
66
  const mediaStyles = (minWidth, size, alignSelf, textAlign, offset, order, props) => {
55
67
  return css(["@media (min-width:", "){", ";}"], minWidth, flexStyles(size, alignSelf, textAlign, offset, order, props));
56
68
  };
57
- const sizeStyles = props => {
58
- const padding = props.gutters ? math(`${props.theme.space[props.gutters]} / 2`) : 0;
69
+ const sizeStyles = _ref2 => {
70
+ let {
71
+ theme,
72
+ gutters
73
+ } = _ref2;
74
+ const padding = gutters ? math(`${theme.space[gutters]} / 2`) : 0;
59
75
  return css(["padding-right:", ";padding-left:", ";"], padding, padding);
60
76
  };
61
77
  const StyledCol = styled.div.attrs({
62
78
  'data-garden-id': COMPONENT_ID,
63
- 'data-garden-version': '9.0.0-next.8'
79
+ 'data-garden-version': '9.0.0'
64
80
  }).withConfig({
65
81
  displayName: "StyledCol",
66
82
  componentId: "sc-inuw62-0"
67
- })(["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), props => sizeStyles(props), 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), props => retrieveComponentStyles(COMPONENT_ID, props));
83
+ })(["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), props => retrieveComponentStyles(COMPONENT_ID, props));
68
84
  StyledCol.defaultProps = {
69
85
  columns: 12,
70
86
  theme: DEFAULT_THEME
@@ -6,25 +6,41 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
9
+ import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'grid.grid';
12
- const colorStyles = props => {
13
- const borderColor = getColorV8(props.theme.palette.crimson, 400, props.theme, 0.5);
14
- const borderWidth = math(`${props.theme.borderWidths.sm} * 2`);
15
- return css(["box-shadow:-", " 0 0 0 ", ",", " 0 0 0 ", ";"], borderWidth, borderColor, borderWidth, borderColor);
12
+ const colorStyles = _ref => {
13
+ let {
14
+ theme,
15
+ debug
16
+ } = _ref;
17
+ const borderColor = debug && getColor({
18
+ theme,
19
+ hue: 'crimson',
20
+ shade: 700,
21
+ transparency: theme.opacity[600]
22
+ });
23
+ const borderWidth = debug && math(`${theme.borderWidths.sm} * 2`);
24
+ return css(["color-scheme:only ", ";box-shadow:", ";"], theme.colors.base, debug && `
25
+ -${borderWidth} 0 0 0 ${borderColor},
26
+ ${borderWidth} 0 0 0 ${borderColor}
27
+ `);
16
28
  };
17
- const sizeStyles = props => {
18
- const padding = props.gutters ? math(`${props.theme.space[props.gutters]} / 2`) : 0;
29
+ const sizeStyles = _ref2 => {
30
+ let {
31
+ theme,
32
+ gutters
33
+ } = _ref2;
34
+ const padding = gutters ? math(`${theme.space[gutters]} / 2`) : 0;
19
35
  return css(["padding-right:", ";padding-left:", ";"], padding, padding);
20
36
  };
21
37
  const StyledGrid = styled.div.attrs({
22
38
  'data-garden-id': COMPONENT_ID,
23
- 'data-garden-version': '9.0.0-next.8'
39
+ 'data-garden-version': '9.0.0'
24
40
  }).withConfig({
25
41
  displayName: "StyledGrid",
26
42
  componentId: "sc-oxgg5i-0"
27
- })(["direction:", ";margin-right:auto;margin-left:auto;width:100%;box-sizing:border-box;", ";", ";", ";"], props => props.theme.rtl && 'rtl', props => sizeStyles(props), props => props.debug && colorStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
43
+ })(["direction:", ";margin-right:auto;margin-left:auto;width:100%;box-sizing:border-box;", ";", ";", ";"], props => props.theme.rtl && 'rtl', sizeStyles, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
28
44
  StyledGrid.defaultProps = {
29
45
  gutters: 'md',
30
46
  theme: DEFAULT_THEME
@@ -6,12 +6,20 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
9
+ import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'grid.row';
12
- const colorStyles = props => {
13
- const borderColor = getColorV8(props.theme.palette.mint, 600, props.theme, 0.5);
14
- const borderWidth = props.theme.borderWidths.sm;
12
+ const colorStyles = _ref => {
13
+ let {
14
+ theme
15
+ } = _ref;
16
+ const borderColor = getColor({
17
+ theme,
18
+ hue: 'mint',
19
+ shade: 700,
20
+ transparency: theme.opacity[600]
21
+ });
22
+ const borderWidth = theme.borderWidths.sm;
15
23
  return css(["box-shadow:inset 0 ", " 0 0 ", ",inset 0 -", " 0 0 ", ";"], borderWidth, borderColor, borderWidth, borderColor);
16
24
  };
17
25
  const flexStyles = (alignItems, justifyContent, wrap) => {
@@ -34,17 +42,21 @@ const flexStyles = (alignItems, justifyContent, wrap) => {
34
42
  const mediaStyles = (minWidth, alignItems, justifyContent, wrap) => {
35
43
  return css(["@media (min-width:", "){", ";}"], minWidth, flexStyles(alignItems, justifyContent, wrap));
36
44
  };
37
- const sizeStyles = props => {
38
- const margin = props.gutters ? math(`${props.theme.space[props.gutters]} / 2`) : 0;
45
+ const sizeStyles = _ref2 => {
46
+ let {
47
+ theme,
48
+ gutters
49
+ } = _ref2;
50
+ const margin = gutters ? math(`${theme.space[gutters]} / 2`) : 0;
39
51
  return css(["margin-right:-", ";margin-left:-", ";"], margin, margin);
40
52
  };
41
53
  const StyledRow = styled.div.attrs({
42
54
  'data-garden-id': COMPONENT_ID,
43
- 'data-garden-version': '9.0.0-next.8'
55
+ 'data-garden-version': '9.0.0'
44
56
  }).withConfig({
45
57
  displayName: "StyledRow",
46
58
  componentId: "sc-xjsdg1-0"
47
- })(["display:flex;box-sizing:border-box;", " ", ";", ";", ";", ";", ";", ";", ";", ";"], props => flexStyles(props.alignItems, props.justifyContent, props.wrapAll), props => sizeStyles(props), 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), props => retrieveComponentStyles(COMPONENT_ID, props));
59
+ })(["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), props => retrieveComponentStyles(COMPONENT_ID, props));
48
60
  StyledRow.defaultProps = {
49
61
  wrapAll: 'wrap',
50
62
  theme: DEFAULT_THEME
@@ -5,18 +5,15 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled from 'styled-components';
8
- import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
8
+ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
9
9
 
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.0.0-next.8'
13
+ 'data-garden-version': '9.0.0'
14
14
  }).withConfig({
15
15
  displayName: "StyledPane",
16
16
  componentId: "sc-1ltjst7-0"
17
17
  })(["position:relative;min-width:0;min-height:0;", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
18
- StyledPane.defaultProps = {
19
- theme: DEFAULT_THEME
20
- };
21
18
 
22
19
  export { StyledPane };
@@ -5,18 +5,15 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled from 'styled-components';
8
- import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
8
+ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
9
9
 
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.0.0-next.8'
13
+ 'data-garden-version': '9.0.0'
14
14
  }).withConfig({
15
15
  displayName: "StyledPaneContent",
16
16
  componentId: "sc-1b38mbh-0"
17
- })(["height:100%;overflow:auto;&[hidden]{display:none;}", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
18
- StyledPaneContent.defaultProps = {
19
- theme: DEFAULT_THEME
20
- };
17
+ })(["height:100%;overflow:auto;color-scheme:only ", ";&[hidden]{display:none;}", ";"], p => p.theme.colors.base, props => retrieveComponentStyles(COMPONENT_ID, props));
21
18
 
22
19
  export { StyledPaneContent };
@@ -6,27 +6,47 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { SELECTOR_FOCUS_VISIBLE, retrieveComponentStyles, DEFAULT_THEME, getColorV8, focusStyles } from '@zendeskgarden/react-theming';
9
+ import { SELECTOR_FOCUS_VISIBLE, retrieveComponentStyles, getColor, focusStyles } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'pane.splitter';
12
- const colorStyles = props => {
13
- const color = getColorV8('neutralHue', 300, props.theme);
14
- const hoverColor = getColorV8('primaryHue', 600, props.theme);
15
- const activeColor = getColorV8('primaryHue', 800, props.theme);
16
- return css(["&::before{background-color:", ";}&:hover::before{background-color:", ";}", " &:active::before{background-color:", ";}"], color, hoverColor, focusStyles({
17
- theme: props.theme,
18
- color: {
19
- hue: hoverColor
12
+ const colorStyles = _ref => {
13
+ let {
14
+ theme
15
+ } = _ref;
16
+ const color = getColor({
17
+ theme,
18
+ variable: 'border.default'
19
+ });
20
+ const options = {
21
+ theme,
22
+ variable: 'border.primaryEmphasis'
23
+ };
24
+ const hoverColor = getColor(options);
25
+ const activeColor = getColor({
26
+ ...options,
27
+ dark: {
28
+ offset: -200
20
29
  },
30
+ light: {
31
+ offset: 200
32
+ }
33
+ });
34
+ return css(["&::before{background-color:", ";}&:hover::before{background-color:", ";}", " &:active::before{background-color:", ";}"], color, hoverColor, focusStyles({
35
+ theme,
21
36
  styles: {
22
37
  backgroundColor: hoverColor
23
38
  },
24
39
  selector: '&:focus-visible::before'
25
40
  }), activeColor);
26
41
  };
27
- const sizeStyles = props => {
28
- const size = math(`${props.theme.shadowWidths.md} * 2`);
29
- const separatorSize = math(`${props.theme.borderWidths.sm} * 2`);
42
+ const sizeStyles = _ref2 => {
43
+ let {
44
+ theme,
45
+ orientation,
46
+ isFixed
47
+ } = _ref2;
48
+ const size = math(`${theme.shadowWidths.md} * 2`);
49
+ const separatorSize = math(`${theme.borderWidths.sm} * 2`);
30
50
  const offset = math(`-${size} / 2`);
31
51
  let cursor;
32
52
  let top;
@@ -37,14 +57,14 @@ const sizeStyles = props => {
37
57
  let height;
38
58
  let separatorWidth;
39
59
  let separatorHeight;
40
- switch (props.orientation) {
60
+ switch (orientation) {
41
61
  case 'top':
42
62
  cursor = 'row-resize';
43
63
  top = offset;
44
64
  width = '100%';
45
65
  height = size;
46
66
  separatorWidth = width;
47
- separatorHeight = props.theme.borderWidths.sm;
67
+ separatorHeight = theme.borderWidths.sm;
48
68
  break;
49
69
  case 'bottom':
50
70
  cursor = 'row-resize';
@@ -52,16 +72,16 @@ const sizeStyles = props => {
52
72
  width = '100%';
53
73
  height = size;
54
74
  separatorWidth = width;
55
- separatorHeight = props.theme.borderWidths.sm;
75
+ separatorHeight = theme.borderWidths.sm;
56
76
  break;
57
77
  case 'start':
58
78
  cursor = 'col-resize';
59
79
  top = 0;
60
80
  width = size;
61
81
  height = '100%';
62
- separatorWidth = props.theme.borderWidths.sm;
82
+ separatorWidth = theme.borderWidths.sm;
63
83
  separatorHeight = height;
64
- if (props.theme.rtl) {
84
+ if (theme.rtl) {
65
85
  right = offset;
66
86
  } else {
67
87
  left = offset;
@@ -73,9 +93,9 @@ const sizeStyles = props => {
73
93
  top = 0;
74
94
  width = size;
75
95
  height = '100%';
76
- separatorWidth = props.theme.borderWidths.sm;
96
+ separatorWidth = theme.borderWidths.sm;
77
97
  separatorHeight = height;
78
- if (props.theme.rtl) {
98
+ if (theme.rtl) {
79
99
  left = offset;
80
100
  } else {
81
101
  right = offset;
@@ -83,17 +103,14 @@ const sizeStyles = props => {
83
103
  break;
84
104
  }
85
105
  const dimensionProperty = width === '100%' ? 'height' : 'width';
86
- return css(["top:", ";right:", ";bottom:", ";left:", ";cursor:", ";width:", ";height:", ";&::before{width:", ";height:", ";}&:hover::before{", ":", ";}&:focus::before,&:focus-visible::before{", ":", ";}&:focus-visible::before{border-radius:", ";}"], top, right, bottom, left, props.isFixed ? 'pointer' : cursor, width, height, separatorWidth, separatorHeight, dimensionProperty, separatorSize, dimensionProperty, separatorSize, props.theme.borderRadii.md);
106
+ return css(["top:", ";right:", ";bottom:", ";left:", ";cursor:", ";width:", ";height:", ";&::before{width:", ";height:", ";}&:hover::before{", ":", ";}&:focus::before,&:focus-visible::before{", ":", ";}&:focus-visible::before{border-radius:", ";}"], top, right, bottom, left, isFixed ? 'pointer' : cursor, width, height, separatorWidth, separatorHeight, dimensionProperty, separatorSize, dimensionProperty, separatorSize, theme.borderRadii.md);
87
107
  };
88
108
  const StyledPaneSplitter = styled.div.attrs({
89
109
  'data-garden-id': COMPONENT_ID,
90
- 'data-garden-version': '9.0.0-next.8'
110
+ 'data-garden-version': '9.0.0'
91
111
  }).withConfig({
92
112
  displayName: "StyledPaneSplitter",
93
113
  componentId: "sc-jylemn-0"
94
114
  })(["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, SELECTOR_FOCUS_VISIBLE, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
95
- StyledPaneSplitter.defaultProps = {
96
- theme: DEFAULT_THEME
97
- };
98
115
 
99
116
  export { StyledPaneSplitter };
@@ -5,10 +5,8 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
8
  import { ChevronButton } from '@zendeskgarden/react-buttons';
10
9
 
11
- const COMPONENT_ID = 'pane.splitter_button';
12
10
  const getSize = theme => theme.space.base * 6;
13
11
  const sizeStyles = _ref => {
14
12
  let {
@@ -32,17 +30,13 @@ const transformStyles = props => {
32
30
  return css(["& > svg{transform:rotate(", "deg);}"], degrees);
33
31
  };
34
32
  const StyledPaneSplitterButton = styled(ChevronButton).attrs({
35
- 'data-garden-id': COMPONENT_ID,
36
- 'data-garden-version': '9.0.0-next.8',
33
+ 'data-garden-version': '9.0.0',
37
34
  isBasic: true,
38
35
  isPill: true,
39
36
  size: 'small'
40
37
  }).withConfig({
41
38
  displayName: "StyledPaneSplitterButton",
42
39
  componentId: "sc-zh032e-0"
43
- })(["", ";", ";", ";"], sizeStyles, transformStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
44
- StyledPaneSplitterButton.defaultProps = {
45
- theme: DEFAULT_THEME
46
- };
40
+ })(["", ";", ";"], sizeStyles, transformStyles);
47
41
 
48
42
  export { StyledPaneSplitterButton, getSize };
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { stripUnit, math } from 'polished';
9
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
9
+ import { retrieveComponentStyles, getColor } from '@zendeskgarden/react-theming';
10
10
  import { StyledPaneSplitter } from './StyledPaneSplitter.js';
11
11
  import { getSize } from './StyledPaneSplitterButton.js';
12
12
 
@@ -15,20 +15,32 @@ const colorStyles = _ref => {
15
15
  let {
16
16
  theme
17
17
  } = _ref;
18
- const backgroundColor = getColorV8('background', 600 , theme);
19
- const boxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, getColorV8('chromeHue', 600, theme, 0.15));
18
+ const backgroundColor = getColor({
19
+ theme,
20
+ variable: 'background.raised'
21
+ });
22
+ const boxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, getColor({
23
+ variable: 'shadow.small',
24
+ theme
25
+ }));
20
26
  return css(["box-shadow:", ";background-color:", ";"], boxShadow, backgroundColor);
21
27
  };
22
- const positionStyles = props => {
28
+ const positionStyles = _ref2 => {
29
+ let {
30
+ theme,
31
+ placement,
32
+ splitterSize,
33
+ orientation
34
+ } = _ref2;
23
35
  let top;
24
36
  let left;
25
37
  let right;
26
38
  let bottom;
27
- const size = getSize(props.theme);
39
+ const size = getSize(theme);
28
40
  const inset = `-${size / 2}px`;
29
- if (props.placement === 'center' || props.splitterSize < size * 3) {
30
- const center = `${props.splitterSize / 2 - size / 2}px`;
31
- switch (`${props.orientation}-${props.theme.rtl ? 'rtl' : 'ltr'}`) {
41
+ if (placement === 'center' || splitterSize < size * 3) {
42
+ const center = `${splitterSize / 2 - size / 2}px`;
43
+ switch (`${orientation}-${theme.rtl ? 'rtl' : 'ltr'}`) {
32
44
  case 'top-ltr':
33
45
  case 'top-rtl':
34
46
  top = inset;
@@ -52,7 +64,7 @@ const positionStyles = props => {
52
64
  }
53
65
  } else {
54
66
  const offset = `${size}px`;
55
- switch (`${props.orientation}-${props.placement}-${props.theme.rtl ? 'rtl' : 'ltr'}`) {
67
+ switch (`${orientation}-${placement}-${theme.rtl ? 'rtl' : 'ltr'}`) {
56
68
  case 'top-end-ltr':
57
69
  case 'top-end-rtl':
58
70
  case 'top-start-rtl':
@@ -97,10 +109,10 @@ const positionStyles = props => {
97
109
  }
98
110
  return css(["top:", ";right:", ";bottom:", ";left:", ";"], top, right, bottom, left);
99
111
  };
100
- const sizeStyles = _ref2 => {
112
+ const sizeStyles = _ref3 => {
101
113
  let {
102
114
  theme
103
- } = _ref2;
115
+ } = _ref3;
104
116
  const size = getSize(theme);
105
117
  return css(["border-radius:", "px;width:", "px;height:", "px;"], size, size, size);
106
118
  };
@@ -109,8 +121,5 @@ const StyledPaneSplitterButtonContainer = styled.div.withConfig({
109
121
  displayName: "StyledPaneSplitterButtonContainer",
110
122
  componentId: "sc-1w84y62-0"
111
123
  })(["display:", ";position:absolute;transition:box-shadow 0.1s ease-in-out,opacity 0.25s ease-in-out 0.1s;opacity:0;z-index:2;", ";", ";", ";&:hover,&:focus-within,", ":hover ~ &,", ":focus-visible ~ &{opacity:1;}", ";"], props => props.splitterSize <= minimumSplitterSize(props.theme) ? 'none' : undefined, positionStyles, sizeStyles, colorStyles, StyledPaneSplitter, StyledPaneSplitter, props => retrieveComponentStyles(COMPONENT_ID, props));
112
- StyledPaneSplitterButtonContainer.defaultProps = {
113
- theme: DEFAULT_THEME
114
- };
115
124
 
116
125
  export { StyledPaneSplitterButtonContainer };
package/dist/index.cjs.js CHANGED
@@ -34,9 +34,21 @@ const SPACE = [false, 'xxs', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
34
34
  const WRAP = ['nowrap', 'wrap', 'wrap-reverse'];
35
35
  const ORIENTATION = ['top', 'bottom', 'start', 'end'];
36
36
 
37
- const COMPONENT_ID$7 = 'grid.col';
38
- const colorStyles$4 = props => {
39
- const backgroundColor = reactTheming.getColorV8('primaryHue', 600, props.theme, 0.1);
37
+ const COMPONENT_ID$6 = 'grid.col';
38
+ const colorStyles$4 = _ref => {
39
+ let {
40
+ theme
41
+ } = _ref;
42
+ const backgroundColor = reactTheming.getColor({
43
+ theme,
44
+ variable: 'background.primaryEmphasis',
45
+ dark: {
46
+ transparency: theme.opacity[200]
47
+ },
48
+ light: {
49
+ transparency: theme.opacity[100]
50
+ }
51
+ });
40
52
  return styled.css(["background-clip:content-box;background-color:", ";"], backgroundColor);
41
53
  };
42
54
  const flexStyles$1 = (size, alignSelf, textAlign, offset, order, props) => {
@@ -80,48 +92,76 @@ const flexStyles$1 = (size, alignSelf, textAlign, offset, order, props) => {
80
92
  const mediaStyles$1 = (minWidth, size, alignSelf, textAlign, offset, order, props) => {
81
93
  return styled.css(["@media (min-width:", "){", ";}"], minWidth, flexStyles$1(size, alignSelf, textAlign, offset, order, props));
82
94
  };
83
- const sizeStyles$5 = props => {
84
- const padding = props.gutters ? polished.math(`${props.theme.space[props.gutters]} / 2`) : 0;
95
+ const sizeStyles$5 = _ref2 => {
96
+ let {
97
+ theme,
98
+ gutters
99
+ } = _ref2;
100
+ const padding = gutters ? polished.math(`${theme.space[gutters]} / 2`) : 0;
85
101
  return styled.css(["padding-right:", ";padding-left:", ";"], padding, padding);
86
102
  };
87
103
  const StyledCol = styled__default.default.div.attrs({
88
- 'data-garden-id': COMPONENT_ID$7,
89
- 'data-garden-version': '9.0.0-next.8'
104
+ 'data-garden-id': COMPONENT_ID$6,
105
+ 'data-garden-version': '9.0.0'
90
106
  }).withConfig({
91
107
  displayName: "StyledCol",
92
108
  componentId: "sc-inuw62-0"
93
- })(["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), props => sizeStyles$5(props), 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), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
109
+ })(["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), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
94
110
  StyledCol.defaultProps = {
95
111
  columns: 12,
96
112
  theme: reactTheming.DEFAULT_THEME
97
113
  };
98
114
 
99
- const COMPONENT_ID$6 = 'grid.grid';
100
- const colorStyles$3 = props => {
101
- const borderColor = reactTheming.getColorV8(props.theme.palette.crimson, 400, props.theme, 0.5);
102
- const borderWidth = polished.math(`${props.theme.borderWidths.sm} * 2`);
103
- return styled.css(["box-shadow:-", " 0 0 0 ", ",", " 0 0 0 ", ";"], borderWidth, borderColor, borderWidth, borderColor);
104
- };
105
- const sizeStyles$4 = props => {
106
- const padding = props.gutters ? polished.math(`${props.theme.space[props.gutters]} / 2`) : 0;
115
+ const COMPONENT_ID$5 = 'grid.grid';
116
+ const colorStyles$3 = _ref => {
117
+ let {
118
+ theme,
119
+ debug
120
+ } = _ref;
121
+ const borderColor = debug && reactTheming.getColor({
122
+ theme,
123
+ hue: 'crimson',
124
+ shade: 700,
125
+ transparency: theme.opacity[600]
126
+ });
127
+ const borderWidth = debug && polished.math(`${theme.borderWidths.sm} * 2`);
128
+ return styled.css(["color-scheme:only ", ";box-shadow:", ";"], theme.colors.base, debug && `
129
+ -${borderWidth} 0 0 0 ${borderColor},
130
+ ${borderWidth} 0 0 0 ${borderColor}
131
+ `);
132
+ };
133
+ const sizeStyles$4 = _ref2 => {
134
+ let {
135
+ theme,
136
+ gutters
137
+ } = _ref2;
138
+ const padding = gutters ? polished.math(`${theme.space[gutters]} / 2`) : 0;
107
139
  return styled.css(["padding-right:", ";padding-left:", ";"], padding, padding);
108
140
  };
109
141
  const StyledGrid = styled__default.default.div.attrs({
110
- 'data-garden-id': COMPONENT_ID$6,
111
- 'data-garden-version': '9.0.0-next.8'
142
+ 'data-garden-id': COMPONENT_ID$5,
143
+ 'data-garden-version': '9.0.0'
112
144
  }).withConfig({
113
145
  displayName: "StyledGrid",
114
146
  componentId: "sc-oxgg5i-0"
115
- })(["direction:", ";margin-right:auto;margin-left:auto;width:100%;box-sizing:border-box;", ";", ";", ";"], props => props.theme.rtl && 'rtl', props => sizeStyles$4(props), props => props.debug && colorStyles$3(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
147
+ })(["direction:", ";margin-right:auto;margin-left:auto;width:100%;box-sizing:border-box;", ";", ";", ";"], props => props.theme.rtl && 'rtl', sizeStyles$4, colorStyles$3, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
116
148
  StyledGrid.defaultProps = {
117
149
  gutters: 'md',
118
150
  theme: reactTheming.DEFAULT_THEME
119
151
  };
120
152
 
121
- const COMPONENT_ID$5 = 'grid.row';
122
- const colorStyles$2 = props => {
123
- const borderColor = reactTheming.getColorV8(props.theme.palette.mint, 600, props.theme, 0.5);
124
- const borderWidth = props.theme.borderWidths.sm;
153
+ const COMPONENT_ID$4 = 'grid.row';
154
+ const colorStyles$2 = _ref => {
155
+ let {
156
+ theme
157
+ } = _ref;
158
+ const borderColor = reactTheming.getColor({
159
+ theme,
160
+ hue: 'mint',
161
+ shade: 700,
162
+ transparency: theme.opacity[600]
163
+ });
164
+ const borderWidth = theme.borderWidths.sm;
125
165
  return styled.css(["box-shadow:inset 0 ", " 0 0 ", ",inset 0 -", " 0 0 ", ";"], borderWidth, borderColor, borderWidth, borderColor);
126
166
  };
127
167
  const flexStyles = (alignItems, justifyContent, wrap) => {
@@ -144,65 +184,83 @@ const flexStyles = (alignItems, justifyContent, wrap) => {
144
184
  const mediaStyles = (minWidth, alignItems, justifyContent, wrap) => {
145
185
  return styled.css(["@media (min-width:", "){", ";}"], minWidth, flexStyles(alignItems, justifyContent, wrap));
146
186
  };
147
- const sizeStyles$3 = props => {
148
- const margin = props.gutters ? polished.math(`${props.theme.space[props.gutters]} / 2`) : 0;
187
+ const sizeStyles$3 = _ref2 => {
188
+ let {
189
+ theme,
190
+ gutters
191
+ } = _ref2;
192
+ const margin = gutters ? polished.math(`${theme.space[gutters]} / 2`) : 0;
149
193
  return styled.css(["margin-right:-", ";margin-left:-", ";"], margin, margin);
150
194
  };
151
195
  const StyledRow = styled__default.default.div.attrs({
152
- 'data-garden-id': COMPONENT_ID$5,
153
- 'data-garden-version': '9.0.0-next.8'
196
+ 'data-garden-id': COMPONENT_ID$4,
197
+ 'data-garden-version': '9.0.0'
154
198
  }).withConfig({
155
199
  displayName: "StyledRow",
156
200
  componentId: "sc-xjsdg1-0"
157
- })(["display:flex;box-sizing:border-box;", " ", ";", ";", ";", ";", ";", ";", ";", ";"], props => flexStyles(props.alignItems, props.justifyContent, props.wrapAll), props => sizeStyles$3(props), 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), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
201
+ })(["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), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
158
202
  StyledRow.defaultProps = {
159
203
  wrapAll: 'wrap',
160
204
  theme: reactTheming.DEFAULT_THEME
161
205
  };
162
206
 
163
- const COMPONENT_ID$4 = 'pane';
207
+ const COMPONENT_ID$3 = 'pane';
164
208
  const StyledPane = styled__default.default.div.attrs({
165
- 'data-garden-id': COMPONENT_ID$4,
166
- 'data-garden-version': '9.0.0-next.8'
209
+ 'data-garden-id': COMPONENT_ID$3,
210
+ 'data-garden-version': '9.0.0'
167
211
  }).withConfig({
168
212
  displayName: "StyledPane",
169
213
  componentId: "sc-1ltjst7-0"
170
- })(["position:relative;min-width:0;min-height:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
171
- StyledPane.defaultProps = {
172
- theme: reactTheming.DEFAULT_THEME
173
- };
214
+ })(["position:relative;min-width:0;min-height:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
174
215
 
175
- const COMPONENT_ID$3 = 'pane.content';
216
+ const COMPONENT_ID$2 = 'pane.content';
176
217
  const StyledPaneContent = styled__default.default.div.attrs({
177
- 'data-garden-id': COMPONENT_ID$3,
178
- 'data-garden-version': '9.0.0-next.8'
218
+ 'data-garden-id': COMPONENT_ID$2,
219
+ 'data-garden-version': '9.0.0'
179
220
  }).withConfig({
180
221
  displayName: "StyledPaneContent",
181
222
  componentId: "sc-1b38mbh-0"
182
- })(["height:100%;overflow:auto;&[hidden]{display:none;}", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
183
- StyledPaneContent.defaultProps = {
184
- theme: reactTheming.DEFAULT_THEME
185
- };
223
+ })(["height:100%;overflow:auto;color-scheme:only ", ";&[hidden]{display:none;}", ";"], p => p.theme.colors.base, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
186
224
 
187
- const COMPONENT_ID$2 = 'pane.splitter';
188
- const colorStyles$1 = props => {
189
- const color = reactTheming.getColorV8('neutralHue', 300, props.theme);
190
- const hoverColor = reactTheming.getColorV8('primaryHue', 600, props.theme);
191
- const activeColor = reactTheming.getColorV8('primaryHue', 800, props.theme);
192
- return styled.css(["&::before{background-color:", ";}&:hover::before{background-color:", ";}", " &:active::before{background-color:", ";}"], color, hoverColor, reactTheming.focusStyles({
193
- theme: props.theme,
194
- color: {
195
- hue: hoverColor
225
+ const COMPONENT_ID$1 = 'pane.splitter';
226
+ const colorStyles$1 = _ref => {
227
+ let {
228
+ theme
229
+ } = _ref;
230
+ const color = reactTheming.getColor({
231
+ theme,
232
+ variable: 'border.default'
233
+ });
234
+ const options = {
235
+ theme,
236
+ variable: 'border.primaryEmphasis'
237
+ };
238
+ const hoverColor = reactTheming.getColor(options);
239
+ const activeColor = reactTheming.getColor({
240
+ ...options,
241
+ dark: {
242
+ offset: -200
196
243
  },
244
+ light: {
245
+ offset: 200
246
+ }
247
+ });
248
+ return styled.css(["&::before{background-color:", ";}&:hover::before{background-color:", ";}", " &:active::before{background-color:", ";}"], color, hoverColor, reactTheming.focusStyles({
249
+ theme,
197
250
  styles: {
198
251
  backgroundColor: hoverColor
199
252
  },
200
253
  selector: '&:focus-visible::before'
201
254
  }), activeColor);
202
255
  };
203
- const sizeStyles$2 = props => {
204
- const size = polished.math(`${props.theme.shadowWidths.md} * 2`);
205
- const separatorSize = polished.math(`${props.theme.borderWidths.sm} * 2`);
256
+ const sizeStyles$2 = _ref2 => {
257
+ let {
258
+ theme,
259
+ orientation,
260
+ isFixed
261
+ } = _ref2;
262
+ const size = polished.math(`${theme.shadowWidths.md} * 2`);
263
+ const separatorSize = polished.math(`${theme.borderWidths.sm} * 2`);
206
264
  const offset = polished.math(`-${size} / 2`);
207
265
  let cursor;
208
266
  let top;
@@ -213,14 +271,14 @@ const sizeStyles$2 = props => {
213
271
  let height;
214
272
  let separatorWidth;
215
273
  let separatorHeight;
216
- switch (props.orientation) {
274
+ switch (orientation) {
217
275
  case 'top':
218
276
  cursor = 'row-resize';
219
277
  top = offset;
220
278
  width = '100%';
221
279
  height = size;
222
280
  separatorWidth = width;
223
- separatorHeight = props.theme.borderWidths.sm;
281
+ separatorHeight = theme.borderWidths.sm;
224
282
  break;
225
283
  case 'bottom':
226
284
  cursor = 'row-resize';
@@ -228,16 +286,16 @@ const sizeStyles$2 = props => {
228
286
  width = '100%';
229
287
  height = size;
230
288
  separatorWidth = width;
231
- separatorHeight = props.theme.borderWidths.sm;
289
+ separatorHeight = theme.borderWidths.sm;
232
290
  break;
233
291
  case 'start':
234
292
  cursor = 'col-resize';
235
293
  top = 0;
236
294
  width = size;
237
295
  height = '100%';
238
- separatorWidth = props.theme.borderWidths.sm;
296
+ separatorWidth = theme.borderWidths.sm;
239
297
  separatorHeight = height;
240
- if (props.theme.rtl) {
298
+ if (theme.rtl) {
241
299
  right = offset;
242
300
  } else {
243
301
  left = offset;
@@ -249,9 +307,9 @@ const sizeStyles$2 = props => {
249
307
  top = 0;
250
308
  width = size;
251
309
  height = '100%';
252
- separatorWidth = props.theme.borderWidths.sm;
310
+ separatorWidth = theme.borderWidths.sm;
253
311
  separatorHeight = height;
254
- if (props.theme.rtl) {
312
+ if (theme.rtl) {
255
313
  left = offset;
256
314
  } else {
257
315
  right = offset;
@@ -259,20 +317,16 @@ const sizeStyles$2 = props => {
259
317
  break;
260
318
  }
261
319
  const dimensionProperty = width === '100%' ? 'height' : 'width';
262
- return styled.css(["top:", ";right:", ";bottom:", ";left:", ";cursor:", ";width:", ";height:", ";&::before{width:", ";height:", ";}&:hover::before{", ":", ";}&:focus::before,&:focus-visible::before{", ":", ";}&:focus-visible::before{border-radius:", ";}"], top, right, bottom, left, props.isFixed ? 'pointer' : cursor, width, height, separatorWidth, separatorHeight, dimensionProperty, separatorSize, dimensionProperty, separatorSize, props.theme.borderRadii.md);
320
+ return styled.css(["top:", ";right:", ";bottom:", ";left:", ";cursor:", ";width:", ";height:", ";&::before{width:", ";height:", ";}&:hover::before{", ":", ";}&:focus::before,&:focus-visible::before{", ":", ";}&:focus-visible::before{border-radius:", ";}"], top, right, bottom, left, isFixed ? 'pointer' : cursor, width, height, separatorWidth, separatorHeight, dimensionProperty, separatorSize, dimensionProperty, separatorSize, theme.borderRadii.md);
263
321
  };
264
322
  const StyledPaneSplitter = styled__default.default.div.attrs({
265
- 'data-garden-id': COMPONENT_ID$2,
266
- 'data-garden-version': '9.0.0-next.8'
323
+ 'data-garden-id': COMPONENT_ID$1,
324
+ 'data-garden-version': '9.0.0'
267
325
  }).withConfig({
268
326
  displayName: "StyledPaneSplitter",
269
327
  componentId: "sc-jylemn-0"
270
- })(["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$2, reactTheming.SELECTOR_FOCUS_VISIBLE, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
271
- StyledPaneSplitter.defaultProps = {
272
- theme: reactTheming.DEFAULT_THEME
273
- };
328
+ })(["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$2, reactTheming.SELECTOR_FOCUS_VISIBLE, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
274
329
 
275
- const COMPONENT_ID$1 = 'pane.splitter_button';
276
330
  const getSize = theme => theme.space.base * 6;
277
331
  const sizeStyles$1 = _ref => {
278
332
  let {
@@ -296,38 +350,46 @@ const transformStyles = props => {
296
350
  return styled.css(["& > svg{transform:rotate(", "deg);}"], degrees);
297
351
  };
298
352
  const StyledPaneSplitterButton = styled__default.default(reactButtons.ChevronButton).attrs({
299
- 'data-garden-id': COMPONENT_ID$1,
300
- 'data-garden-version': '9.0.0-next.8',
353
+ 'data-garden-version': '9.0.0',
301
354
  isBasic: true,
302
355
  isPill: true,
303
356
  size: 'small'
304
357
  }).withConfig({
305
358
  displayName: "StyledPaneSplitterButton",
306
359
  componentId: "sc-zh032e-0"
307
- })(["", ";", ";", ";"], sizeStyles$1, transformStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
308
- StyledPaneSplitterButton.defaultProps = {
309
- theme: reactTheming.DEFAULT_THEME
310
- };
360
+ })(["", ";", ";"], sizeStyles$1, transformStyles);
311
361
 
312
362
  const COMPONENT_ID = 'pane.splitter_button_container';
313
363
  const colorStyles = _ref => {
314
364
  let {
315
365
  theme
316
366
  } = _ref;
317
- const backgroundColor = reactTheming.getColorV8('background', 600 , theme);
318
- const boxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, reactTheming.getColorV8('chromeHue', 600, theme, 0.15));
367
+ const backgroundColor = reactTheming.getColor({
368
+ theme,
369
+ variable: 'background.raised'
370
+ });
371
+ const boxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, reactTheming.getColor({
372
+ variable: 'shadow.small',
373
+ theme
374
+ }));
319
375
  return styled.css(["box-shadow:", ";background-color:", ";"], boxShadow, backgroundColor);
320
376
  };
321
- const positionStyles = props => {
377
+ const positionStyles = _ref2 => {
378
+ let {
379
+ theme,
380
+ placement,
381
+ splitterSize,
382
+ orientation
383
+ } = _ref2;
322
384
  let top;
323
385
  let left;
324
386
  let right;
325
387
  let bottom;
326
- const size = getSize(props.theme);
388
+ const size = getSize(theme);
327
389
  const inset = `-${size / 2}px`;
328
- if (props.placement === 'center' || props.splitterSize < size * 3) {
329
- const center = `${props.splitterSize / 2 - size / 2}px`;
330
- switch (`${props.orientation}-${props.theme.rtl ? 'rtl' : 'ltr'}`) {
390
+ if (placement === 'center' || splitterSize < size * 3) {
391
+ const center = `${splitterSize / 2 - size / 2}px`;
392
+ switch (`${orientation}-${theme.rtl ? 'rtl' : 'ltr'}`) {
331
393
  case 'top-ltr':
332
394
  case 'top-rtl':
333
395
  top = inset;
@@ -351,7 +413,7 @@ const positionStyles = props => {
351
413
  }
352
414
  } else {
353
415
  const offset = `${size}px`;
354
- switch (`${props.orientation}-${props.placement}-${props.theme.rtl ? 'rtl' : 'ltr'}`) {
416
+ switch (`${orientation}-${placement}-${theme.rtl ? 'rtl' : 'ltr'}`) {
355
417
  case 'top-end-ltr':
356
418
  case 'top-end-rtl':
357
419
  case 'top-start-rtl':
@@ -396,10 +458,10 @@ const positionStyles = props => {
396
458
  }
397
459
  return styled.css(["top:", ";right:", ";bottom:", ";left:", ";"], top, right, bottom, left);
398
460
  };
399
- const sizeStyles = _ref2 => {
461
+ const sizeStyles = _ref3 => {
400
462
  let {
401
463
  theme
402
- } = _ref2;
464
+ } = _ref3;
403
465
  const size = getSize(theme);
404
466
  return styled.css(["border-radius:", "px;width:", "px;height:", "px;"], size, size, size);
405
467
  };
@@ -408,9 +470,6 @@ const StyledPaneSplitterButtonContainer = styled__default.default.div.withConfig
408
470
  displayName: "StyledPaneSplitterButtonContainer",
409
471
  componentId: "sc-1w84y62-0"
410
472
  })(["display:", ";position:absolute;transition:box-shadow 0.1s ease-in-out,opacity 0.25s ease-in-out 0.1s;opacity:0;z-index:2;", ";", ";", ";&:hover,&:focus-within,", ":hover ~ &,", ":focus-visible ~ &{opacity:1;}", ";"], props => props.splitterSize <= minimumSplitterSize(props.theme) ? 'none' : undefined, positionStyles, sizeStyles, colorStyles, StyledPaneSplitter, StyledPaneSplitter, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
411
- StyledPaneSplitterButtonContainer.defaultProps = {
412
- theme: reactTheming.DEFAULT_THEME
413
- };
414
473
 
415
474
  const GridContext = React.createContext({
416
475
  gutters: 'md'
@@ -437,7 +496,7 @@ const Col = React__default.default.forwardRef((_ref, ref) => {
437
496
  ref: ref
438
497
  }, props));
439
498
  });
440
- Col.displayName = 'Col';
499
+ Col.displayName = 'Grid.Col';
441
500
  Col.propTypes = {
442
501
  size: PropTypes__default.default.oneOfType([PropTypes__default.default.number, PropTypes__default.default.string]),
443
502
  xs: PropTypes__default.default.oneOfType([PropTypes__default.default.number, PropTypes__default.default.string, PropTypes__default.default.bool]),
@@ -487,7 +546,7 @@ const Row = React__default.default.forwardRef((_ref, ref) => {
487
546
  ref: ref
488
547
  }, props));
489
548
  });
490
- Row.displayName = 'Row';
549
+ Row.displayName = 'Grid.Row';
491
550
  Row.propTypes = {
492
551
  alignItems: PropTypes__default.default.oneOf(ALIGN_ITEMS),
493
552
  alignItemsXs: PropTypes__default.default.oneOf(ALIGN_ITEMS),
@@ -12,7 +12,7 @@ export declare const GridComponent: React.ForwardRefExoticComponent<IGridProps &
12
12
  /**
13
13
  * @extends HTMLAttributes<HTMLDivElement>
14
14
  */
15
- export declare const Grid: React.ForwardRefExoticComponent<IGridProps & React.RefAttributes<HTMLDivElement>> & {
15
+ export declare const Grid: typeof GridComponent & {
16
16
  Row: typeof Row;
17
17
  Col: typeof Col;
18
18
  };
@@ -8,11 +8,13 @@ import React from 'react';
8
8
  import { Splitter } from './components/Splitter';
9
9
  import { Content } from './components/Content';
10
10
  import { SplitterButton } from './components/SplitterButton';
11
+ declare const PaneComponent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
11
12
  /**
12
13
  * @extends HTMLAttributes<HTMLDivElement>
13
14
  */
14
- export declare const Pane: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>> & {
15
+ export declare const Pane: typeof PaneComponent & {
15
16
  Content: typeof Content;
16
17
  Splitter: typeof Splitter;
17
18
  SplitterButton: typeof SplitterButton;
18
19
  };
20
+ export {};
@@ -4,7 +4,6 @@
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
- /// <reference types="react" />
8
7
  import { DefaultTheme } from 'styled-components';
9
8
  import { Orientation } from '../../types';
10
9
  interface IStyledSplitterButtonProps {
@@ -4,7 +4,6 @@
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
- /// <reference types="react" />
8
7
  import { GridNumber, Space } from '../types';
9
8
  interface IGridContext {
10
9
  columns?: GridNumber;
@@ -4,7 +4,6 @@
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
- /// <reference types="react" />
8
7
  interface IPaneContext {
9
8
  id?: string;
10
9
  isVisible?: boolean;
@@ -4,7 +4,6 @@
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
- /// <reference types="react" />
8
7
  interface IPaneProviderContextData {
9
8
  rowState: Record<string, number>;
10
9
  columnState: Record<string, number>;
@@ -4,7 +4,6 @@
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
- /// <reference types="react" />
8
7
  import { ISplitterProps, Orientation } from '../types';
9
8
  interface IPaneSplitterContext {
10
9
  orientation?: Orientation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-grid",
3
- "version": "9.0.0-next.8",
3
+ "version": "9.0.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>",
@@ -21,23 +21,23 @@
21
21
  "sideEffects": false,
22
22
  "types": "dist/typings/index.d.ts",
23
23
  "dependencies": {
24
- "@zendeskgarden/container-splitter": "^2.0.3",
24
+ "@zendeskgarden/container-splitter": "^2.0.17",
25
25
  "@zendeskgarden/container-utilities": "^2.0.0",
26
- "@zendeskgarden/react-buttons": "^9.0.0-next.8",
27
- "@zendeskgarden/react-tooltips": "^9.0.0-next.8",
28
- "polished": "^4.0.0",
26
+ "@zendeskgarden/react-buttons": "^9.0.0",
27
+ "@zendeskgarden/react-tooltips": "^9.0.0",
28
+ "polished": "^4.3.1",
29
29
  "prop-types": "^15.5.7",
30
30
  "react-merge-refs": "^2.0.0",
31
31
  "use-resize-observer": "^9.1.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@zendeskgarden/react-theming": ">=9.0.0-next",
35
- "react": ">=16.8.0",
36
- "react-dom": ">=16.8.0",
35
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
36
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
37
37
  "styled-components": "^5.3.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@zendeskgarden/react-theming": "^9.0.0-next.8"
40
+ "@zendeskgarden/react-theming": "^9.0.0"
41
41
  },
42
42
  "keywords": [
43
43
  "components",
@@ -48,6 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "zendeskgarden:src": "src/index.ts",
52
- "gitHead": "a3d6534843d5a4f5cb60b52bc67264f3230f2da0"
51
+ "zendeskgarden:src": "src/index.ts"
53
52
  }
package/LICENSE.md DELETED
@@ -1,176 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS