@zendeskgarden/react-datepickers 8.74.2 → 8.75.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 +14 -14
- package/dist/index.esm.js +15 -15
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -112,7 +112,7 @@ function getMenuPosition(popperPlacement) {
|
|
|
112
112
|
const COMPONENT_ID$b = 'datepickers.menu';
|
|
113
113
|
const StyledMenu = styled__default.default.div.attrs({
|
|
114
114
|
'data-garden-id': COMPONENT_ID$b,
|
|
115
|
-
'data-garden-version': '8.
|
|
115
|
+
'data-garden-version': '8.75.0'
|
|
116
116
|
}).withConfig({
|
|
117
117
|
displayName: "StyledMenu",
|
|
118
118
|
componentId: "sc-1npbkk0-0"
|
|
@@ -155,7 +155,7 @@ const StyledDatepicker = styled__default.default.div.attrs({
|
|
|
155
155
|
}).withConfig({
|
|
156
156
|
displayName: "StyledDatepicker",
|
|
157
157
|
componentId: "sc-w3zqsp-0"
|
|
158
|
-
})(["direction:", ";", " background-color:", ";color:", ";", ";"], props => props.theme.rtl && 'rtl', retrievePadding, props => props.theme
|
|
158
|
+
})(["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));
|
|
159
159
|
StyledDatepicker.defaultProps = {
|
|
160
160
|
theme: reactTheming.DEFAULT_THEME
|
|
161
161
|
};
|
|
@@ -197,7 +197,7 @@ const retrieveColor$1 = _ref2 => {
|
|
|
197
197
|
let {
|
|
198
198
|
theme
|
|
199
199
|
} = _ref2;
|
|
200
|
-
return styled.css([":hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}color:", ";"], reactTheming.
|
|
200
|
+
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));
|
|
201
201
|
};
|
|
202
202
|
const COMPONENT_ID$6 = 'datepickers.header_paddle';
|
|
203
203
|
const StyledHeaderPaddle = styled__default.default.div.attrs({
|
|
@@ -295,7 +295,7 @@ const retrieveColor = _ref2 => {
|
|
|
295
295
|
isHighlighted,
|
|
296
296
|
theme
|
|
297
297
|
} = _ref2;
|
|
298
|
-
return styled.css(["background-color:", ";"], isHighlighted && reactTheming.
|
|
298
|
+
return styled.css(["background-color:", ";"], isHighlighted && reactTheming.getColorV8('primaryHue', 600, theme, 0.08));
|
|
299
299
|
};
|
|
300
300
|
const StyledHighlight = styled__default.default.div.attrs({
|
|
301
301
|
'data-garden-id': COMPONENT_ID$1
|
|
@@ -316,26 +316,26 @@ const retrieveStyledDayColors = _ref => {
|
|
|
316
316
|
theme
|
|
317
317
|
} = _ref;
|
|
318
318
|
let backgroundColor = 'inherit';
|
|
319
|
-
let color = reactTheming.
|
|
319
|
+
let color = reactTheming.getColorV8('primaryHue', 600, theme);
|
|
320
320
|
if (isSelected && !isDisabled) {
|
|
321
|
-
backgroundColor = reactTheming.
|
|
322
|
-
color =
|
|
321
|
+
backgroundColor = reactTheming.getColorV8('primaryHue', 600, theme);
|
|
322
|
+
color = reactTheming.getColorV8('background', 600 , theme);
|
|
323
323
|
} else if (isDisabled) {
|
|
324
|
-
color = reactTheming.
|
|
324
|
+
color = reactTheming.getColorV8('neutralHue', 400, theme);
|
|
325
325
|
} else if (isToday) {
|
|
326
326
|
color = 'inherit';
|
|
327
327
|
} else if (isPreviousMonth) {
|
|
328
|
-
color = reactTheming.
|
|
328
|
+
color = reactTheming.getColorV8('neutralHue', 600, theme);
|
|
329
329
|
}
|
|
330
330
|
return styled.css(["background-color:", ";color:", ";", ""], backgroundColor, color, !isSelected && !isDisabled && `
|
|
331
331
|
:hover {
|
|
332
|
-
background-color: ${reactTheming.
|
|
333
|
-
color: ${reactTheming.
|
|
332
|
+
background-color: ${reactTheming.getColorV8('primaryHue', 600, theme, 0.08)};
|
|
333
|
+
color: ${reactTheming.getColorV8('primaryHue', 800, theme)};
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
:active {
|
|
337
|
-
background-color: ${reactTheming.
|
|
338
|
-
color: ${reactTheming.
|
|
337
|
+
background-color: ${reactTheming.getColorV8('primaryHue', 600, theme, 0.2)};
|
|
338
|
+
color: ${reactTheming.getColorV8('primaryHue', 800, theme)};
|
|
339
339
|
}
|
|
340
340
|
`);
|
|
341
341
|
};
|
|
@@ -1639,7 +1639,7 @@ const Calendar = React.forwardRef((props, ref) => {
|
|
|
1639
1639
|
return React__namespace.default.createElement(StyledRangeCalendar, _extends({
|
|
1640
1640
|
ref: ref,
|
|
1641
1641
|
"data-garden-id": "datepickers.range",
|
|
1642
|
-
"data-garden-version": '8.
|
|
1642
|
+
"data-garden-version": '8.75.0'
|
|
1643
1643
|
}, props), React__namespace.default.createElement(Month, {
|
|
1644
1644
|
displayDate: state.previewDate,
|
|
1645
1645
|
isNextHidden: true
|
package/dist/index.esm.js
CHANGED
|
@@ -23,7 +23,7 @@ import { isSameMonth } from 'date-fns/isSameMonth';
|
|
|
23
23
|
import { isBefore } from 'date-fns/isBefore';
|
|
24
24
|
import { isAfter } from 'date-fns/isAfter';
|
|
25
25
|
import { getDate } from 'date-fns/getDate';
|
|
26
|
-
import { retrieveComponentStyles, DEFAULT_THEME, menuStyles,
|
|
26
|
+
import { retrieveComponentStyles, DEFAULT_THEME, menuStyles, getColorV8 } from '@zendeskgarden/react-theming';
|
|
27
27
|
import { addMonths } from 'date-fns/addMonths';
|
|
28
28
|
import { subMonths } from 'date-fns/subMonths';
|
|
29
29
|
import { isValid } from 'date-fns/isValid';
|
|
@@ -87,7 +87,7 @@ function getMenuPosition(popperPlacement) {
|
|
|
87
87
|
const COMPONENT_ID$b = 'datepickers.menu';
|
|
88
88
|
const StyledMenu = styled.div.attrs({
|
|
89
89
|
'data-garden-id': COMPONENT_ID$b,
|
|
90
|
-
'data-garden-version': '8.
|
|
90
|
+
'data-garden-version': '8.75.0'
|
|
91
91
|
}).withConfig({
|
|
92
92
|
displayName: "StyledMenu",
|
|
93
93
|
componentId: "sc-1npbkk0-0"
|
|
@@ -130,7 +130,7 @@ const StyledDatepicker = styled.div.attrs({
|
|
|
130
130
|
}).withConfig({
|
|
131
131
|
displayName: "StyledDatepicker",
|
|
132
132
|
componentId: "sc-w3zqsp-0"
|
|
133
|
-
})(["direction:", ";", " background-color:", ";color:", ";", ";"], props => props.theme.rtl && 'rtl', retrievePadding, props => props.theme
|
|
133
|
+
})(["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));
|
|
134
134
|
StyledDatepicker.defaultProps = {
|
|
135
135
|
theme: DEFAULT_THEME
|
|
136
136
|
};
|
|
@@ -172,7 +172,7 @@ const retrieveColor$1 = _ref2 => {
|
|
|
172
172
|
let {
|
|
173
173
|
theme
|
|
174
174
|
} = _ref2;
|
|
175
|
-
return css([":hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}color:", ";"],
|
|
175
|
+
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));
|
|
176
176
|
};
|
|
177
177
|
const COMPONENT_ID$6 = 'datepickers.header_paddle';
|
|
178
178
|
const StyledHeaderPaddle = styled.div.attrs({
|
|
@@ -270,7 +270,7 @@ const retrieveColor = _ref2 => {
|
|
|
270
270
|
isHighlighted,
|
|
271
271
|
theme
|
|
272
272
|
} = _ref2;
|
|
273
|
-
return css(["background-color:", ";"], isHighlighted &&
|
|
273
|
+
return css(["background-color:", ";"], isHighlighted && getColorV8('primaryHue', 600, theme, 0.08));
|
|
274
274
|
};
|
|
275
275
|
const StyledHighlight = styled.div.attrs({
|
|
276
276
|
'data-garden-id': COMPONENT_ID$1
|
|
@@ -291,26 +291,26 @@ const retrieveStyledDayColors = _ref => {
|
|
|
291
291
|
theme
|
|
292
292
|
} = _ref;
|
|
293
293
|
let backgroundColor = 'inherit';
|
|
294
|
-
let color =
|
|
294
|
+
let color = getColorV8('primaryHue', 600, theme);
|
|
295
295
|
if (isSelected && !isDisabled) {
|
|
296
|
-
backgroundColor =
|
|
297
|
-
color = theme
|
|
296
|
+
backgroundColor = getColorV8('primaryHue', 600, theme);
|
|
297
|
+
color = getColorV8('background', 600 , theme);
|
|
298
298
|
} else if (isDisabled) {
|
|
299
|
-
color =
|
|
299
|
+
color = getColorV8('neutralHue', 400, theme);
|
|
300
300
|
} else if (isToday) {
|
|
301
301
|
color = 'inherit';
|
|
302
302
|
} else if (isPreviousMonth) {
|
|
303
|
-
color =
|
|
303
|
+
color = getColorV8('neutralHue', 600, theme);
|
|
304
304
|
}
|
|
305
305
|
return css(["background-color:", ";color:", ";", ""], backgroundColor, color, !isSelected && !isDisabled && `
|
|
306
306
|
:hover {
|
|
307
|
-
background-color: ${
|
|
308
|
-
color: ${
|
|
307
|
+
background-color: ${getColorV8('primaryHue', 600, theme, 0.08)};
|
|
308
|
+
color: ${getColorV8('primaryHue', 800, theme)};
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
:active {
|
|
312
|
-
background-color: ${
|
|
313
|
-
color: ${
|
|
312
|
+
background-color: ${getColorV8('primaryHue', 600, theme, 0.2)};
|
|
313
|
+
color: ${getColorV8('primaryHue', 800, theme)};
|
|
314
314
|
}
|
|
315
315
|
`);
|
|
316
316
|
};
|
|
@@ -1614,7 +1614,7 @@ const Calendar = forwardRef((props, ref) => {
|
|
|
1614
1614
|
return React__default.createElement(StyledRangeCalendar, _extends({
|
|
1615
1615
|
ref: ref,
|
|
1616
1616
|
"data-garden-id": "datepickers.range",
|
|
1617
|
-
"data-garden-version": '8.
|
|
1617
|
+
"data-garden-version": '8.75.0'
|
|
1618
1618
|
}, props), React__default.createElement(Month, {
|
|
1619
1619
|
displayDate: state.previewDate,
|
|
1620
1620
|
isNextHidden: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-datepickers",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.75.0",
|
|
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>",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zendeskgarden/react-theming": "^8.
|
|
36
|
+
"@zendeskgarden/react-theming": "^8.75.0",
|
|
37
37
|
"@zendeskgarden/svg-icons": "7.0.0"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"zendeskgarden:src": "src/index.ts",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "56a54793a611efc223b8e36262d428365613c853"
|
|
50
50
|
}
|