@zendeskgarden/react-datepickers 9.0.0-next.4 → 9.0.0-next.6

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/README.md CHANGED
@@ -22,7 +22,7 @@ for localization support.
22
22
 
23
23
  ```jsx
24
24
  import { ThemeProvider } from '@zendeskgarden/react-theming';
25
- import { Field, Label, Input } from '@zendeskgarden/react-forms';
25
+ import { Field, Input } from '@zendeskgarden/react-forms';
26
26
  import { DatePicker } from '@zendeskgarden/react-datepickers';
27
27
 
28
28
  /**
@@ -30,7 +30,7 @@ import { DatePicker } from '@zendeskgarden/react-datepickers';
30
30
  */
31
31
  <ThemeProvider>
32
32
  <Field>
33
- <Label>Example datepicker</Label>
33
+ <Field.Label>Example datepicker</Field.Label>
34
34
  <DatePicker value={new Date()} onChange={selectedDate => console.log(selectedDate)}>
35
35
  <Input />
36
36
  </DatePicker>
package/dist/index.cjs.js CHANGED
@@ -63,7 +63,7 @@ const PLACEMENT = ['auto', ...reactTheming.PLACEMENT];
63
63
  const COMPONENT_ID$b = 'datepickers.menu';
64
64
  const StyledMenu = styled__default.default.div.attrs({
65
65
  'data-garden-id': COMPONENT_ID$b,
66
- 'data-garden-version': '9.0.0-next.4'
66
+ 'data-garden-version': '9.0.0-next.6'
67
67
  }).withConfig({
68
68
  displayName: "StyledMenu",
69
69
  componentId: "sc-1npbkk0-0"
@@ -106,7 +106,7 @@ const StyledDatePicker = styled__default.default.div.attrs({
106
106
  }).withConfig({
107
107
  displayName: "StyledDatePicker",
108
108
  componentId: "sc-15hwqzh-0"
109
- })(["direction:", ";", " background-color:", ";color:", ";", ";"], props => props.theme.rtl && 'rtl', retrievePadding, props => props.theme.colors.background, props => props.theme.colors.foreground, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
109
+ })(["direction:", ";", " background-color:", ";color:", ";", ";"], props => props.theme.rtl && 'rtl', retrievePadding, props => reactTheming.getColorV8('background', 600 , props.theme), props => reactTheming.getColorV8('foreground', 600 , props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
110
110
  StyledDatePicker.defaultProps = {
111
111
  theme: reactTheming.DEFAULT_THEME
112
112
  };
@@ -148,7 +148,7 @@ const retrieveColor$1 = _ref2 => {
148
148
  let {
149
149
  theme
150
150
  } = _ref2;
151
- return styled.css([":hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}color:", ";"], reactTheming.getColor('primaryHue', 600, theme, 0.08), theme.colors.foreground, reactTheming.getColor('primaryHue', 600, theme, 0.2), theme.colors.foreground, reactTheming.getColor('neutralHue', 600, theme));
151
+ return styled.css([":hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}color:", ";"], reactTheming.getColorV8('primaryHue', 600, theme, 0.08), reactTheming.getColorV8('foreground', 600 , theme), reactTheming.getColorV8('primaryHue', 600, theme, 0.2), reactTheming.getColorV8('foreground', 600 , theme), reactTheming.getColorV8('neutralHue', 600, theme));
152
152
  };
153
153
  const COMPONENT_ID$6 = 'datepickers.header_paddle';
154
154
  const StyledHeaderPaddle = styled__default.default.div.attrs({
@@ -246,7 +246,7 @@ const retrieveColor = _ref2 => {
246
246
  isHighlighted,
247
247
  theme
248
248
  } = _ref2;
249
- return styled.css(["background-color:", ";"], isHighlighted && reactTheming.getColor('primaryHue', 600, theme, 0.08));
249
+ return styled.css(["background-color:", ";"], isHighlighted && reactTheming.getColorV8('primaryHue', 600, theme, 0.08));
250
250
  };
251
251
  const StyledHighlight = styled__default.default.div.attrs({
252
252
  'data-garden-id': COMPONENT_ID$1
@@ -267,26 +267,26 @@ const retrieveStyledDayColors = _ref => {
267
267
  theme
268
268
  } = _ref;
269
269
  let backgroundColor = 'inherit';
270
- let color = reactTheming.getColor('primaryHue', 600, theme);
270
+ let color = reactTheming.getColorV8('primaryHue', 600, theme);
271
271
  if (isSelected && !isDisabled) {
272
- backgroundColor = reactTheming.getColor('primaryHue', 600, theme);
273
- color = theme.colors.background;
272
+ backgroundColor = reactTheming.getColorV8('primaryHue', 600, theme);
273
+ color = reactTheming.getColorV8('background', 600 , theme);
274
274
  } else if (isDisabled) {
275
- color = reactTheming.getColor('neutralHue', 400, theme);
275
+ color = reactTheming.getColorV8('neutralHue', 400, theme);
276
276
  } else if (isToday) {
277
277
  color = 'inherit';
278
278
  } else if (isPreviousMonth) {
279
- color = reactTheming.getColor('neutralHue', 600, theme);
279
+ color = reactTheming.getColorV8('neutralHue', 600, theme);
280
280
  }
281
281
  return styled.css(["background-color:", ";color:", ";", ""], backgroundColor, color, !isSelected && !isDisabled && `
282
282
  :hover {
283
- background-color: ${reactTheming.getColor('primaryHue', 600, theme, 0.08)};
284
- color: ${reactTheming.getColor('primaryHue', 800, theme)};
283
+ background-color: ${reactTheming.getColorV8('primaryHue', 600, theme, 0.08)};
284
+ color: ${reactTheming.getColorV8('primaryHue', 800, theme)};
285
285
  }
286
286
 
287
287
  :active {
288
- background-color: ${reactTheming.getColor('primaryHue', 600, theme, 0.2)};
289
- color: ${reactTheming.getColor('primaryHue', 800, theme)};
288
+ background-color: ${reactTheming.getColorV8('primaryHue', 600, theme, 0.2)};
289
+ color: ${reactTheming.getColorV8('primaryHue', 800, theme)};
290
290
  }
291
291
  `);
292
292
  };
@@ -1612,7 +1612,7 @@ const Calendar = React.forwardRef((props, ref) => {
1612
1612
  return React__namespace.default.createElement(StyledRangeCalendar, _extends({
1613
1613
  ref: ref,
1614
1614
  "data-garden-id": "datepickers.range",
1615
- "data-garden-version": '9.0.0-next.4'
1615
+ "data-garden-version": '9.0.0-next.6'
1616
1616
  }, props), React__namespace.default.createElement(Month, {
1617
1617
  displayDate: state.previewDate,
1618
1618
  isNextHidden: true
package/dist/index.esm.js CHANGED
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
11
11
  import { mergeRefs } from 'react-merge-refs';
12
12
  import styled, { css, ThemeContext } from 'styled-components';
13
13
  import { useFloating, platform, autoPlacement, flip, autoUpdate } from '@floating-ui/react-dom';
14
- import { PLACEMENT as PLACEMENT$1, retrieveComponentStyles, DEFAULT_THEME, menuStyles, getMenuPosition, getColor, getFloatingPlacements } from '@zendeskgarden/react-theming';
14
+ import { PLACEMENT as PLACEMENT$1, retrieveComponentStyles, DEFAULT_THEME, menuStyles, getMenuPosition, getColorV8, getFloatingPlacements } from '@zendeskgarden/react-theming';
15
15
  import { startOfMonth } from 'date-fns/startOfMonth';
16
16
  import { endOfMonth } from 'date-fns/endOfMonth';
17
17
  import { startOfWeek } from 'date-fns/startOfWeek';
@@ -38,7 +38,7 @@ const PLACEMENT = ['auto', ...PLACEMENT$1];
38
38
  const COMPONENT_ID$b = 'datepickers.menu';
39
39
  const StyledMenu = styled.div.attrs({
40
40
  'data-garden-id': COMPONENT_ID$b,
41
- 'data-garden-version': '9.0.0-next.4'
41
+ 'data-garden-version': '9.0.0-next.6'
42
42
  }).withConfig({
43
43
  displayName: "StyledMenu",
44
44
  componentId: "sc-1npbkk0-0"
@@ -81,7 +81,7 @@ const StyledDatePicker = styled.div.attrs({
81
81
  }).withConfig({
82
82
  displayName: "StyledDatePicker",
83
83
  componentId: "sc-15hwqzh-0"
84
- })(["direction:", ";", " background-color:", ";color:", ";", ";"], props => props.theme.rtl && 'rtl', retrievePadding, props => props.theme.colors.background, props => props.theme.colors.foreground, props => retrieveComponentStyles(COMPONENT_ID$9, props));
84
+ })(["direction:", ";", " background-color:", ";color:", ";", ";"], props => props.theme.rtl && 'rtl', retrievePadding, props => getColorV8('background', 600 , props.theme), props => getColorV8('foreground', 600 , props.theme), props => retrieveComponentStyles(COMPONENT_ID$9, props));
85
85
  StyledDatePicker.defaultProps = {
86
86
  theme: DEFAULT_THEME
87
87
  };
@@ -123,7 +123,7 @@ const retrieveColor$1 = _ref2 => {
123
123
  let {
124
124
  theme
125
125
  } = _ref2;
126
- return css([":hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}color:", ";"], getColor('primaryHue', 600, theme, 0.08), theme.colors.foreground, getColor('primaryHue', 600, theme, 0.2), theme.colors.foreground, getColor('neutralHue', 600, theme));
126
+ return css([":hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}color:", ";"], getColorV8('primaryHue', 600, theme, 0.08), getColorV8('foreground', 600 , theme), getColorV8('primaryHue', 600, theme, 0.2), getColorV8('foreground', 600 , theme), getColorV8('neutralHue', 600, theme));
127
127
  };
128
128
  const COMPONENT_ID$6 = 'datepickers.header_paddle';
129
129
  const StyledHeaderPaddle = styled.div.attrs({
@@ -221,7 +221,7 @@ const retrieveColor = _ref2 => {
221
221
  isHighlighted,
222
222
  theme
223
223
  } = _ref2;
224
- return css(["background-color:", ";"], isHighlighted && getColor('primaryHue', 600, theme, 0.08));
224
+ return css(["background-color:", ";"], isHighlighted && getColorV8('primaryHue', 600, theme, 0.08));
225
225
  };
226
226
  const StyledHighlight = styled.div.attrs({
227
227
  'data-garden-id': COMPONENT_ID$1
@@ -242,26 +242,26 @@ const retrieveStyledDayColors = _ref => {
242
242
  theme
243
243
  } = _ref;
244
244
  let backgroundColor = 'inherit';
245
- let color = getColor('primaryHue', 600, theme);
245
+ let color = getColorV8('primaryHue', 600, theme);
246
246
  if (isSelected && !isDisabled) {
247
- backgroundColor = getColor('primaryHue', 600, theme);
248
- color = theme.colors.background;
247
+ backgroundColor = getColorV8('primaryHue', 600, theme);
248
+ color = getColorV8('background', 600 , theme);
249
249
  } else if (isDisabled) {
250
- color = getColor('neutralHue', 400, theme);
250
+ color = getColorV8('neutralHue', 400, theme);
251
251
  } else if (isToday) {
252
252
  color = 'inherit';
253
253
  } else if (isPreviousMonth) {
254
- color = getColor('neutralHue', 600, theme);
254
+ color = getColorV8('neutralHue', 600, theme);
255
255
  }
256
256
  return css(["background-color:", ";color:", ";", ""], backgroundColor, color, !isSelected && !isDisabled && `
257
257
  :hover {
258
- background-color: ${getColor('primaryHue', 600, theme, 0.08)};
259
- color: ${getColor('primaryHue', 800, theme)};
258
+ background-color: ${getColorV8('primaryHue', 600, theme, 0.08)};
259
+ color: ${getColorV8('primaryHue', 800, theme)};
260
260
  }
261
261
 
262
262
  :active {
263
- background-color: ${getColor('primaryHue', 600, theme, 0.2)};
264
- color: ${getColor('primaryHue', 800, theme)};
263
+ background-color: ${getColorV8('primaryHue', 600, theme, 0.2)};
264
+ color: ${getColorV8('primaryHue', 800, theme)};
265
265
  }
266
266
  `);
267
267
  };
@@ -1587,7 +1587,7 @@ const Calendar = forwardRef((props, ref) => {
1587
1587
  return React__default.createElement(StyledRangeCalendar, _extends({
1588
1588
  ref: ref,
1589
1589
  "data-garden-id": "datepickers.range",
1590
- "data-garden-version": '9.0.0-next.4'
1590
+ "data-garden-version": '9.0.0-next.6'
1591
1591
  }, props), React__default.createElement(Month, {
1592
1592
  displayDate: state.previewDate,
1593
1593
  isNextHidden: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-datepickers",
3
- "version": "9.0.0-next.4",
3
+ "version": "9.0.0-next.6",
4
4
  "description": "Components relating to datepickers in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -31,10 +31,10 @@
31
31
  "@zendeskgarden/react-theming": "^8.1.0",
32
32
  "react": ">=16.8.0",
33
33
  "react-dom": ">=16.8.0",
34
- "styled-components": "^5.1.0"
34
+ "styled-components": "^5.3.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@zendeskgarden/react-theming": "^9.0.0-next.4",
37
+ "@zendeskgarden/react-theming": "^9.0.0-next.6",
38
38
  "@zendeskgarden/svg-icons": "7.0.0"
39
39
  },
40
40
  "keywords": [
@@ -47,5 +47,5 @@
47
47
  "access": "public"
48
48
  },
49
49
  "zendeskgarden:src": "src/index.ts",
50
- "gitHead": "749220247e3a22d2d502dcb3691d81e6a3d52b02"
50
+ "gitHead": "45c56ad1c73af40afba8e5415f529a2c9601c83f"
51
51
  }