@telus-uds/components-web 1.11.0 → 1.12.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/lib/DatePicker/CalendarContainer.js +60 -71
  3. package/lib/DatePicker/DatePicker.js +66 -22
  4. package/lib/List/List.js +11 -0
  5. package/lib/List/ListItem.js +48 -0
  6. package/lib/List/index.js +16 -0
  7. package/lib/PriceLockup/PriceLockup.js +27 -13
  8. package/lib/SkeletonProvider/SkeletonImage.js +55 -0
  9. package/lib/SkeletonProvider/SkeletonProvider.js +84 -0
  10. package/lib/SkeletonProvider/SkeletonTypography.js +54 -0
  11. package/lib/SkeletonProvider/index.js +13 -0
  12. package/lib/Table/Table.js +14 -5
  13. package/lib/Toast/Toast.js +1 -1
  14. package/lib/index.js +19 -1
  15. package/lib-module/DatePicker/CalendarContainer.js +61 -72
  16. package/lib-module/DatePicker/DatePicker.js +67 -23
  17. package/lib-module/List/List.js +2 -0
  18. package/lib-module/List/ListItem.js +31 -0
  19. package/lib-module/List/index.js +4 -0
  20. package/lib-module/PriceLockup/PriceLockup.js +27 -13
  21. package/lib-module/SkeletonProvider/SkeletonImage.js +42 -0
  22. package/lib-module/SkeletonProvider/SkeletonProvider.js +65 -0
  23. package/lib-module/SkeletonProvider/SkeletonTypography.js +41 -0
  24. package/lib-module/SkeletonProvider/index.js +2 -0
  25. package/lib-module/Table/Table.js +14 -5
  26. package/lib-module/Toast/Toast.js +1 -1
  27. package/lib-module/index.js +2 -0
  28. package/package.json +3 -3
  29. package/src/DatePicker/CalendarContainer.jsx +61 -71
  30. package/src/DatePicker/DatePicker.jsx +47 -19
  31. package/src/List/List.jsx +3 -0
  32. package/src/List/ListItem.jsx +21 -0
  33. package/src/List/index.js +6 -0
  34. package/src/PriceLockup/PriceLockup.jsx +13 -7
  35. package/src/SkeletonProvider/SkeletonImage.jsx +33 -0
  36. package/src/SkeletonProvider/SkeletonProvider.jsx +62 -0
  37. package/src/SkeletonProvider/SkeletonTypography.jsx +31 -0
  38. package/src/SkeletonProvider/index.js +3 -0
  39. package/src/Table/Table.jsx +7 -4
  40. package/src/Toast/Toast.jsx +1 -0
  41. package/src/index.js +2 -0
@@ -0,0 +1,31 @@
1
+ import React, { forwardRef } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { ListItem as ListItemBase, Typography } from '@telus-uds/components-base';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ const ListItem = /*#__PURE__*/forwardRef((_ref, ref) => {
7
+ let {
8
+ children,
9
+ title,
10
+ ...rest
11
+ } = _ref;
12
+ return /*#__PURE__*/_jsxs(ListItemBase, {
13
+ ref: ref,
14
+ ...rest,
15
+ children: [Boolean(title) && /*#__PURE__*/_jsx(Typography, {
16
+ variant: {
17
+ size: 'h4'
18
+ },
19
+ children: title
20
+ }), children]
21
+ });
22
+ });
23
+ ListItem.displayName = 'ListItem';
24
+ ListItem.propTypes = {
25
+ children: PropTypes.node.isRequired,
26
+ title: PropTypes.string
27
+ };
28
+ ListItem.defaultProps = {
29
+ title: undefined
30
+ };
31
+ export default ListItem;
@@ -0,0 +1,4 @@
1
+ import List from './List';
2
+ import ListItem from './ListItem';
3
+ List.Item = ListItem;
4
+ export default List;
@@ -70,24 +70,29 @@ const RateTextContainer = /*#__PURE__*/styled.div.withConfig({
70
70
  const StrikeThroughContainer = /*#__PURE__*/styled.div.withConfig({
71
71
  displayName: "PriceLockup__StrikeThroughContainer",
72
72
  componentId: "components-web__sc-1x6duay-7"
73
- })(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;height:", ";background:", ";position:absolute;}"], _ref7 => {
73
+ })(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"], _ref7 => {
74
74
  let {
75
- strikeThroughHeight
75
+ strikeThroughPosition
76
76
  } = _ref7;
77
- return strikeThroughHeight;
77
+ return `${strikeThroughPosition}px`;
78
78
  }, _ref8 => {
79
79
  let {
80
- strikeThroughColor
80
+ strikeThroughHeight
81
81
  } = _ref8;
82
+ return `${strikeThroughHeight}px`;
83
+ }, _ref9 => {
84
+ let {
85
+ strikeThroughColor
86
+ } = _ref9;
82
87
  return strikeThroughColor;
83
88
  });
84
89
 
85
- const selectFootnoteLinkStyles = _ref9 => {
90
+ const selectFootnoteLinkStyles = _ref10 => {
86
91
  let {
87
92
  footnoteLinkColor,
88
93
  footnoteLinkFontName,
89
94
  footnoteLinkFontWeight
90
- } = _ref9;
95
+ } = _ref10;
91
96
  return {
92
97
  color: footnoteLinkColor,
93
98
  fontName: footnoteLinkFontName,
@@ -95,7 +100,20 @@ const selectFootnoteLinkStyles = _ref9 => {
95
100
  };
96
101
  };
97
102
 
98
- const PriceLockup = _ref10 => {
103
+ const selectStrikeThroughTokens = _ref11 => {
104
+ let {
105
+ strikeThroughPosition,
106
+ strikeThroughHeight,
107
+ strikeThroughColor
108
+ } = _ref11;
109
+ return {
110
+ strikeThroughHeight,
111
+ strikeThroughPosition,
112
+ strikeThroughColor
113
+ };
114
+ };
115
+
116
+ const PriceLockup = _ref12 => {
99
117
  let {
100
118
  size = 'medium',
101
119
  signDirection = 'left',
@@ -111,7 +129,7 @@ const PriceLockup = _ref10 => {
111
129
  tokens: priceLockupTokens,
112
130
  variant = {},
113
131
  ...rest
114
- } = _ref10;
132
+ } = _ref12;
115
133
  const viewport = useViewport();
116
134
  const {
117
135
  footnoteMarginTop,
@@ -120,8 +138,6 @@ const PriceLockup = _ref10 => {
120
138
  priceMarginBottom,
121
139
  bottomLinksMarginLeft,
122
140
  topTextMarginBottom,
123
- strikeThroughHeight,
124
- strikeThroughColor,
125
141
  fontColor,
126
142
  dividerColor,
127
143
  footnoteLinkFontSize,
@@ -166,9 +182,7 @@ const PriceLockup = _ref10 => {
166
182
  return /*#__PURE__*/_jsxs(_Fragment, {
167
183
  children: [/*#__PURE__*/_jsx(A11yText, {
168
184
  text: a11yText
169
- }), /*#__PURE__*/_jsx(StrikeThroughContainer, {
170
- strikeThroughHeight: `${strikeThroughHeight}px`,
171
- strikeThroughColor: strikeThroughColor,
185
+ }), /*#__PURE__*/_jsx(StrikeThroughContainer, { ...selectStrikeThroughTokens(themeTokens),
172
186
  children: amountComponent
173
187
  })]
174
188
  });
@@ -0,0 +1,42 @@
1
+ var _Skeleton$propTypes, _Skeleton$propTypes2, _Skeleton$propTypes3;
2
+
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import { Skeleton } from '@telus-uds/components-base';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+
8
+ const SkeletonImage = _ref => {
9
+ let {
10
+ rounded,
11
+ imgHeight,
12
+ size,
13
+ sizeIndex,
14
+ // Size automatically from image height, unless any size prop is passed in
15
+ sizePixels = !(size || sizeIndex) ? imgHeight : undefined,
16
+ show,
17
+ children
18
+ } = _ref;
19
+
20
+ if (!show) {
21
+ return children;
22
+ }
23
+
24
+ const shape = rounded !== 'circle' ? 'box' : rounded;
25
+ return /*#__PURE__*/_jsx(Skeleton, {
26
+ size: size,
27
+ sizePixels: sizePixels,
28
+ sizeIndex: sizeIndex,
29
+ shape: shape
30
+ });
31
+ };
32
+
33
+ SkeletonImage.propTypes = {
34
+ imgHeight: PropTypes.number,
35
+ rounded: PropTypes.oneOf(['circle', 'corners']),
36
+ size: (_Skeleton$propTypes = Skeleton.propTypes) === null || _Skeleton$propTypes === void 0 ? void 0 : _Skeleton$propTypes.size,
37
+ sizeIndex: (_Skeleton$propTypes2 = Skeleton.propTypes) === null || _Skeleton$propTypes2 === void 0 ? void 0 : _Skeleton$propTypes2.sizeIndex,
38
+ sizePixels: (_Skeleton$propTypes3 = Skeleton.propTypes) === null || _Skeleton$propTypes3 === void 0 ? void 0 : _Skeleton$propTypes3.sizePixels,
39
+ show: PropTypes.bool.isRequired,
40
+ children: PropTypes.node
41
+ };
42
+ export default SkeletonImage;
@@ -0,0 +1,65 @@
1
+ import React, { Children, cloneElement } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Typography } from '@telus-uds/components-base';
4
+ import Image from '../Image';
5
+ import SkeletonTypography from './SkeletonTypography';
6
+ import SkeletonImage from './SkeletonImage';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { Fragment as _Fragment } from "react/jsx-runtime";
9
+
10
+ const SkeletonProvider = _ref => {
11
+ let {
12
+ children,
13
+ show
14
+ } = _ref;
15
+
16
+ if (!show) {
17
+ return children;
18
+ }
19
+
20
+ const mapChild = child => {
21
+ if (!child) {
22
+ return null;
23
+ }
24
+
25
+ let childElement = child;
26
+
27
+ if (childElement.props && 'children' in childElement.props) {
28
+ const {
29
+ children: elementChildren
30
+ } = childElement.props;
31
+ const mappedChildren = Array.isArray(elementChildren) ? elementChildren.map(mapChild) : mapChild(elementChildren);
32
+ childElement = /*#__PURE__*/cloneElement(childElement, {
33
+ children: mappedChildren
34
+ });
35
+ }
36
+
37
+ if (childElement.type === Typography) {
38
+ return /*#__PURE__*/_jsx(SkeletonTypography, { ...childElement.props.skeleton,
39
+ show: show,
40
+ children: childElement
41
+ });
42
+ }
43
+
44
+ if (childElement.type === Image) {
45
+ return /*#__PURE__*/_jsx(SkeletonImage, { ...childElement.props.skeleton,
46
+ imgHeight: childElement.props.height,
47
+ rounded: childElement.props.rounded,
48
+ show: show,
49
+ children: childElement
50
+ });
51
+ }
52
+
53
+ return childElement;
54
+ };
55
+
56
+ return /*#__PURE__*/_jsx(_Fragment, {
57
+ children: Children.map(children, mapChild)
58
+ });
59
+ };
60
+
61
+ SkeletonProvider.propTypes = {
62
+ show: PropTypes.bool.isRequired,
63
+ children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]).isRequired
64
+ };
65
+ export default SkeletonProvider;
@@ -0,0 +1,41 @@
1
+ var _Skeleton$propTypes, _Skeleton$propTypes2, _Skeleton$propTypes3, _Skeleton$propTypes4, _Skeleton$propTypes5;
2
+
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import { Skeleton } from '@telus-uds/components-base';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+
8
+ const SkeletonTypography = _ref => {
9
+ let {
10
+ show,
11
+ size,
12
+ sizeIndex,
13
+ sizePixels,
14
+ characters,
15
+ lines,
16
+ children
17
+ } = _ref;
18
+
19
+ if (!show) {
20
+ return children;
21
+ }
22
+
23
+ return /*#__PURE__*/_jsx(Skeleton, {
24
+ size: size,
25
+ sizeIndex: sizeIndex,
26
+ sizePixels: sizePixels,
27
+ characters: characters,
28
+ lines: lines
29
+ });
30
+ };
31
+
32
+ SkeletonTypography.propTypes = {
33
+ show: PropTypes.bool.isRequired,
34
+ children: PropTypes.node,
35
+ size: (_Skeleton$propTypes = Skeleton.propTypes) === null || _Skeleton$propTypes === void 0 ? void 0 : _Skeleton$propTypes.size,
36
+ sizeIndex: (_Skeleton$propTypes2 = Skeleton.propTypes) === null || _Skeleton$propTypes2 === void 0 ? void 0 : _Skeleton$propTypes2.sizeIndex,
37
+ sizePixels: (_Skeleton$propTypes3 = Skeleton.propTypes) === null || _Skeleton$propTypes3 === void 0 ? void 0 : _Skeleton$propTypes3.sizePixels,
38
+ characters: (_Skeleton$propTypes4 = Skeleton.propTypes) === null || _Skeleton$propTypes4 === void 0 ? void 0 : _Skeleton$propTypes4.characters,
39
+ lines: (_Skeleton$propTypes5 = Skeleton.propTypes) === null || _Skeleton$propTypes5 === void 0 ? void 0 : _Skeleton$propTypes5.lines
40
+ };
41
+ export default SkeletonTypography;
@@ -0,0 +1,2 @@
1
+ import SkeletonProvider from './SkeletonProvider';
2
+ export default SkeletonProvider;
@@ -13,7 +13,12 @@ const StyledContainer = /*#__PURE__*/styled.div.withConfig({
13
13
  const StyledTable = /*#__PURE__*/styled.table.withConfig({
14
14
  displayName: "Table__StyledTable",
15
15
  componentId: "components-web__sc-10d9q3m-1"
16
- })(["margin:0;padding:0;"]);
16
+ })(["margin:0;padding:0;width:", ";"], _ref => {
17
+ let {
18
+ tableWidth
19
+ } = _ref;
20
+ return `${tableWidth}px`;
21
+ });
17
22
  const TableContext = /*#__PURE__*/React.createContext({});
18
23
  export const useTableContext = () => useContext(TableContext);
19
24
  /**
@@ -31,14 +36,15 @@ export const useTableContext = () => useContext(TableContext);
31
36
  * - Use `Cell`'s `type` prop to visually mark it as a row heading (`type="rowHeading"`)
32
37
  */
33
38
 
34
- const Table = _ref => {
39
+ const Table = _ref2 => {
35
40
  let {
36
41
  children,
42
+ fullWidth = false,
37
43
  text = 'medium',
38
44
  tokens,
39
45
  variant,
40
46
  ...rest
41
- } = _ref;
47
+ } = _ref2;
42
48
  const {
43
49
  tablePaddingBottom
44
50
  } = useThemeTokens('Table', tokens, variant);
@@ -48,8 +54,10 @@ const Table = _ref => {
48
54
  const [tableWidth, setTableWidth] = useState(0);
49
55
  useSafeLayoutEffect(() => {
50
56
  const updateDimensions = () => {
51
- setContainerWidth(containerRef.current.clientWidth);
52
- setTableWidth(tableRef.current.clientWidth);
57
+ const containerClientWidth = containerRef.current.clientWidth;
58
+ const responsiveTableWidth = fullWidth ? containerClientWidth : tableRef.current.clientWidth;
59
+ setContainerWidth(containerClientWidth);
60
+ setTableWidth(responsiveTableWidth);
53
61
  };
54
62
 
55
63
  const throttledUpdateDimensions = throttle(updateDimensions, 100, {
@@ -78,6 +86,7 @@ const Table = _ref => {
78
86
  variant
79
87
  },
80
88
  children: /*#__PURE__*/_jsx(StyledTable, {
89
+ tableWidth: tableWidth,
81
90
  cellSpacing: 0,
82
91
  ref: tableRef,
83
92
  children: children
@@ -21,7 +21,7 @@ const animation = props => css(["", " 1s ease-in-out 2s forwards,", " 1s ease-in
21
21
  const ToastContainer = /*#__PURE__*/styled.div.withConfig({
22
22
  displayName: "Toast__ToastContainer",
23
23
  componentId: "components-web__sc-p78jdh-0"
24
- })(["display:flex;justify-content:center;align-items:center;background:", ";gap:", ";height:0;overflow:hidden;animation:", ";"], _ref => {
24
+ })(["display:flex;justify-content:center;align-items:center;flex-wrap:wrap;background:", ";gap:", ";height:0;overflow:hidden;animation:", ";"], _ref => {
25
25
  let {
26
26
  containerBackgroundColor
27
27
  } = _ref;
@@ -32,7 +32,9 @@ export { default as Video } from './Video';
32
32
  export { default as StoryCard } from './StoryCard';
33
33
  export { default as Disclaimer } from './Disclaimer';
34
34
  export { default as Card } from './Card';
35
+ export { default as List } from './List';
35
36
  export { default as TermsAndConditions } from './TermsAndConditions';
36
37
  export { default as NavigationBar } from './NavigationBar';
37
38
  export { default as Progress } from './Progress';
39
+ export { default as SkeletonProvider } from './SkeletonProvider';
38
40
  export * from './baseExports';
package/package.json CHANGED
@@ -5,14 +5,14 @@
5
5
  ],
6
6
  "dependencies": {
7
7
  "@gorhom/portal": "^1.0.14",
8
- "@telus-uds/components-base": "1.40.0",
8
+ "@telus-uds/components-base": "1.41.0",
9
9
  "@telus-uds/system-constants": "^1.2.0",
10
10
  "fscreen": "^1.2.0",
11
11
  "lodash.omit": "^4.5.0",
12
12
  "react-dates": "^21.8.0",
13
13
  "react-helmet-async": "^1.3.0",
14
14
  "react-moment-proptypes": "^1.8.1",
15
- "@telus-uds/system-theme-tokens": "^2.25.0",
15
+ "@telus-uds/system-theme-tokens": "^2.26.0",
16
16
  "prop-types": "^15.7.2",
17
17
  "lodash.throttle": "^4.1.1",
18
18
  "react-youtube": "^10.1.0"
@@ -61,5 +61,5 @@
61
61
  "skip": true
62
62
  },
63
63
  "types": "types/index.d.ts",
64
- "version": "1.11.0"
64
+ "version": "1.12.0"
65
65
  }
@@ -1,13 +1,18 @@
1
1
  import styled from 'styled-components'
2
2
  import defaultReactDatesCss from './reactDatesCss'
3
3
 
4
+ // calendarDayDefaultHeight and calendarDayDefaultWidth
5
+ // refer to circle size when selected, focused, or hovered and is passed with getResponsiveCircleSize in DatePicker
6
+
4
7
  const CalendarContainer = styled.div(
5
8
  ({
6
9
  daySize,
7
10
  validation,
8
11
  remainingTokens,
9
12
  calendarMonthFontTokens,
10
- dayPickerNavigationButtonTokens,
13
+ calendarDayDefaultHeight,
14
+ calendarDayDefaultWidth,
15
+ calendarWeekFontTokens,
11
16
  defaultFontTokens
12
17
  }) => `
13
18
  ${defaultReactDatesCss}
@@ -19,9 +24,10 @@ const CalendarContainer = styled.div(
19
24
  display: block;
20
25
  }
21
26
  .SingleDatePicker_picker {
27
+ background-color: ${remainingTokens.calendarBackgroundColor};
22
28
  box-shadow: none;
23
29
  border: 1px solid ${remainingTokens.singleDatePickerBorderColor};
24
- border-radius: ${remainingTokens.singleDatePickerRadius};
30
+ border-radius: ${remainingTokens.singleDatePickerRadius}px;
25
31
  padding: ${remainingTokens.singleDatePickerPaddingTopBottom}px ${
26
32
  remainingTokens.singleDatePickerLeftRight
27
33
  }px;
@@ -30,15 +36,15 @@ const CalendarContainer = styled.div(
30
36
  .DateInput {
31
37
  width: 100%;
32
38
  border: 2px solid ${remainingTokens.dateInputBorderColor};
33
- border-radius: ${remainingTokens.dateInputBorderRadius};
34
39
  ${validation === 'error' && `input { border-color: ${remainingTokens.invalidInputMixin}; }`};
35
40
  ${validation === 'success' && `input { border-color: ${remainingTokens.validInputMixin}; }`};
36
41
  }
37
42
  .DateInput:hover {
43
+ border-radius: ${remainingTokens.dateInputBorderRadius}px;
38
44
  border: 2px solid ${remainingTokens.dateInputHoverBorderColor};
39
45
  }
40
- .DateInput:focus {
41
- border: 2px solid ${remainingTokens.dateInputFocusBorderColor};
46
+ .DateInput_input:focus {
47
+ border: 3px solid ${remainingTokens.dateInputFocusBorderColor};
42
48
  }
43
49
  .SingleDatePickerInput__withBorder {
44
50
  border: 0 !important;
@@ -59,96 +65,65 @@ const CalendarContainer = styled.div(
59
65
  z-index: 4;
60
66
  left: ${(daySize * 8.5 - 20) / 2}px;
61
67
  }
68
+ .DateInput_fangShape {
69
+ fill: ${remainingTokens.calendarBackgroundColor}
70
+ }
62
71
  .DateInput_fangStroke {
63
72
  stroke: ${remainingTokens.dateInputStrokeColor};
64
73
  }
65
74
  .CalendarMonth_caption {
66
75
  color: ${remainingTokens.calendarMonthCaptionColor};
67
76
  font-family: ${calendarMonthFontTokens.fontFamily};
68
- font-size: ${remainingTokens.calendarMonthCaptionFontSize};
77
+ font-size: ${remainingTokens.calendarMonthCaptionFontSize}px;
69
78
  font-weight: ${calendarMonthFontTokens.fontWeight};
70
79
  line-height: ${remainingTokens.calendarMonthCaptionLineHeight};
71
80
  padding-bottom: ${remainingTokens.calendarMonthCaptionPaddingBottom}px;
72
81
  }
82
+ .DayPicker{
83
+ background-color: ${remainingTokens.calendarBackgroundColor};
84
+ }
73
85
  .DayPicker__withBorder {
74
86
  box-shadow: none;
75
87
  }
76
- .DayPickerNavigation_button {
77
- align-items: center;
88
+ .DayPickerNavigation {
78
89
  display: flex;
79
- justify-content: center;
80
- border: 1px solid ${remainingTokens.dayPickerNavigationButtonBorderColor};
81
- background-color: ${remainingTokens.dayPickerNavigationButtonBackgroundColor};
82
- border-radius: 50%;
83
- box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
84
- max-height: ${remainingTokens.dayPickerNavigationButtonMaxHeight}px;
85
- max-width: ${remainingTokens.dayPickerNavigationButtonMaxWidth}px;
86
- position: absolute;
87
- top: 18px;
88
- line-height: 0.78;
89
- padding: ${remainingTokens.dayPickerNavigationButtonPadding}px;
90
- cursor: pointer;
91
- user-select: none;
92
- &:nth-child(1) {
93
- left: ${remainingTokens.dayPickerNavigationButtonChildLeft}px;
94
- }
95
- &:nth-child(2) {
96
- right: ${remainingTokens.dayPickerNavigationButtonChildRight}px;
97
- i {
98
- font-family: 'TELUS Core Icons';
99
- display: inline-block;
100
- font-weight: normal;
101
- font-style: normal;
102
- speak: none;
103
- text-decoration: inherit;
104
- text-transform: none;
105
- text-rendering: auto;
106
- -webkit-font-smoothing: antialiased;
107
- -moz-osx-font-smoothing: grayscale;
108
- line-height: 1;
109
- vertical-align: middle;
110
- &:before {
111
- content: '\\F107';
112
- display: inline-block;
113
- }
114
- }
115
- }
116
- & svg {
117
- fill: ${remainingTokens.dayPickerNavigationButtonChildSvgFill};
118
- }
90
+ justify-content: space-between;
91
+ align-self: center;
92
+ top: 23px;
93
+ padding: 0px ${remainingTokens.dayPickerNavigationButtonPadding}px;
119
94
  }
120
95
  .DayPickerNavigation_button__default:focus,
121
- .DayPickerNavigation_button__default:hover {
122
- border: 1px solid ${remainingTokens.dayPickerNavigationButtonDefaultHoverBorderColor};
123
- }
124
- .DayPickerNavigation_svg__horizontal {
125
- fill: ${remainingTokens.dayPickerNavigationSVGHorizontalFill};
126
- }
96
+ .DayPickerNavigation_button:hover,
97
+ .DayPickerNavigation_svg__horizontal,
127
98
  .DayPicker_weekHeader {
128
99
  color: ${remainingTokens.dayPickerWeekHeaderColor};
129
- font-family: ${dayPickerNavigationButtonTokens.fontFamily};
130
- font-weight: ${dayPickerNavigationButtonTokens.fontWeight};
100
+ font-family: ${calendarWeekFontTokens.fontFamily};
131
101
  font-feature-settings: 'ss01' on, 'ss03' on, 'ss08' on;
132
102
  line-height: ${remainingTokens.dayPickerWeekHeaderLineHeight};
133
- & small {
134
- font-size: ${remainingTokens.dayPickerWeekHeaderSmall};
135
- }
136
103
  & li {
104
+ font-size: ${remainingTokens.dayPickerWeekHeaderSmall}px;
137
105
  max-width: ${daySize}px !important;
138
106
  }
139
107
  }
108
+ .CalendarMonthGrid {
109
+ background-color: ${remainingTokens.calendarBackgroundColor};
110
+ }
111
+ .CalendarMonth {
112
+ background-color: ${remainingTokens.calendarBackgroundColor};
113
+ }
140
114
  .CalendarDay__default {
141
115
  padding: 0px;
142
116
  position: relative;
117
+ background: ${remainingTokens.calendarDayDefaultBackgroundColor};
143
118
  background-clip: padding-box;
144
- border: ${remainingTokens.calendarDayDefaultBorder} solid ${
119
+ border: ${remainingTokens.calendarDayDefaultBorder}px solid ${
145
120
  remainingTokens.calendarDayDefaultBorderColor
146
121
  };
147
122
  vertical-align: middle;
148
123
  font-family: ${defaultFontTokens.fontFamily};
149
124
  font-weight: ${defaultFontTokens.fontWeight}
150
125
  font-feature-settings: 'ss01' on, 'ss03' on, 'ss08' on;
151
- font-size: ${remainingTokens.calendarDayDefaultFontSize};
126
+ font-size: ${remainingTokens.calendarDayDefaultFontSize}px;
152
127
  line-height: ${daySize - 3}px !important;
153
128
  color: ${remainingTokens.calendarDayDefaultColor};
154
129
  text-decoration: none;
@@ -159,36 +134,51 @@ const CalendarContainer = styled.div(
159
134
  top: 50%;
160
135
  left: 50%;
161
136
  transform: translate(-50%, -50%);
162
- height: ${remainingTokens.calendarDayDefaultBeforeHeight}px;
163
- width: ${remainingTokens.calendarDayDefaultBeforeWidth}px;
137
+ height: ${calendarDayDefaultHeight}px;
138
+ width: ${calendarDayDefaultWidth}px;
164
139
  border-radius: 50%;
165
140
  background: transparent;
166
141
  transition: all 0.3s;
167
142
  z-index: -1;
168
143
  }
169
144
  }
170
- .CalendarDay__default:hover,
171
- .CalendarDay__selected,
172
- .CalendarDay__selected:active,
173
- .CalendarDay__selected:hover {
174
- background: none;
145
+ .CalendarDay__default:hover {
146
+ background: ${remainingTokens.calendarDaySelectedHoverBackground};
175
147
  border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
176
148
  color: ${remainingTokens.calendarDaySelectedHoverColor};
177
149
  text-decoration: none;
178
150
  z-index: 0;
179
151
  &:before {
152
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBeforeBorderColor};
180
153
  background: ${remainingTokens.calendarDaySelectedHoverBeforeBackground};
181
154
  }
182
155
  }
156
+ .CalendarDay__default:focus{
157
+ background: ${remainingTokens.calendarDaySelectedHoverBackground};
158
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
159
+ color: ${remainingTokens.calendarDaySelectedHoverColor};
160
+ text-decoration: none;
161
+ z-index: 0;
162
+ &:before {
163
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBeforeBorderColor};
164
+ background: ${remainingTokens.calendarDaySelectedFocusBeforeBackground};
165
+ }
166
+ }
167
+ .CalendarDay__selected,
168
+ .CalendarDay__selected:active,
169
+ .CalendarDay__selected:hover
183
170
  .CalendarDay__default.CalendarDay__selected,
184
171
  .CalendarDay__default.CalendarDay__selected:active
185
- .CalendarDay__default.CalendarDay__selected:hover {
172
+ .CalendarDay__default.CalendarDay__selected:hover{
173
+ background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBackground};
174
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
186
175
  color: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverColor};
187
176
  text-decoration: none;
177
+ z-index: 0;
188
178
  &:before {
189
- background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBackground};
190
- }
179
+ background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBeforeBackground};
191
180
  }
181
+ }
192
182
  .CalendarDay__blocked_out_of_range,
193
183
  .CalendarDay__blocked_out_of_range:active,
194
184
  .CalendarDay__blocked_out_of_range:hover,