@telus-uds/components-web 1.11.0 → 2.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +40 -2
  2. package/lib/Breadcrumbs/Breadcrumbs.js +7 -10
  3. package/lib/Breadcrumbs/Item/Item.js +10 -37
  4. package/lib/DatePicker/CalendarContainer.js +60 -71
  5. package/lib/DatePicker/DatePicker.js +66 -22
  6. package/lib/Footnote/Footnote.js +26 -9
  7. package/lib/List/List.js +11 -0
  8. package/lib/List/ListItem.js +48 -0
  9. package/lib/List/index.js +16 -0
  10. package/lib/PriceLockup/PriceLockup.js +27 -13
  11. package/lib/SkeletonProvider/SkeletonImage.js +55 -0
  12. package/lib/SkeletonProvider/SkeletonProvider.js +84 -0
  13. package/lib/SkeletonProvider/SkeletonTypography.js +54 -0
  14. package/lib/SkeletonProvider/index.js +13 -0
  15. package/lib/Table/Table.js +14 -5
  16. package/lib/Toast/Toast.js +1 -1
  17. package/lib/index.js +19 -1
  18. package/lib-module/Breadcrumbs/Breadcrumbs.js +7 -10
  19. package/lib-module/Breadcrumbs/Item/Item.js +11 -35
  20. package/lib-module/DatePicker/CalendarContainer.js +61 -72
  21. package/lib-module/DatePicker/DatePicker.js +67 -23
  22. package/lib-module/Footnote/Footnote.js +26 -9
  23. package/lib-module/List/List.js +2 -0
  24. package/lib-module/List/ListItem.js +31 -0
  25. package/lib-module/List/index.js +4 -0
  26. package/lib-module/PriceLockup/PriceLockup.js +27 -13
  27. package/lib-module/SkeletonProvider/SkeletonImage.js +42 -0
  28. package/lib-module/SkeletonProvider/SkeletonProvider.js +65 -0
  29. package/lib-module/SkeletonProvider/SkeletonTypography.js +41 -0
  30. package/lib-module/SkeletonProvider/index.js +2 -0
  31. package/lib-module/Table/Table.js +14 -5
  32. package/lib-module/Toast/Toast.js +1 -1
  33. package/lib-module/index.js +2 -0
  34. package/package.json +3 -3
  35. package/src/Breadcrumbs/Breadcrumbs.jsx +19 -22
  36. package/src/Breadcrumbs/Item/Item.jsx +16 -42
  37. package/src/DatePicker/CalendarContainer.jsx +61 -71
  38. package/src/DatePicker/DatePicker.jsx +47 -19
  39. package/src/Footnote/Footnote.jsx +42 -11
  40. package/src/List/List.jsx +3 -0
  41. package/src/List/ListItem.jsx +21 -0
  42. package/src/List/index.js +6 -0
  43. package/src/PriceLockup/PriceLockup.jsx +13 -7
  44. package/src/SkeletonProvider/SkeletonImage.jsx +33 -0
  45. package/src/SkeletonProvider/SkeletonProvider.jsx +62 -0
  46. package/src/SkeletonProvider/SkeletonTypography.jsx +31 -0
  47. package/src/SkeletonProvider/index.js +3 -0
  48. package/src/Table/Table.jsx +7 -4
  49. package/src/Toast/Toast.jsx +1 -0
  50. package/src/index.js +2 -0
@@ -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.42.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": "2.0.0"
65
65
  }
@@ -74,10 +74,13 @@ const getItems = (items, params, concatenatePaths) => {
74
74
  const isLast = i === filteredItems.length - 1
75
75
  const breadcrumbName = getBreadcrumbName(item, params)
76
76
  const href = getPath(item.path, params, concatenatePaths, paths)
77
+ const { LinkRouter, linkRouterProps } = item
77
78
  return {
78
79
  breadcrumbName,
79
80
  href,
80
81
  current: isLast,
82
+ LinkRouter,
83
+ linkRouterProps,
81
84
  ...omitProps(selectProps(item))
82
85
  }
83
86
  })
@@ -103,7 +106,6 @@ const Breadcrumbs = ({
103
106
  linkRouterProps,
104
107
  params = {},
105
108
  tokens,
106
- reactRouterLinkComponent,
107
109
  routes,
108
110
  variant,
109
111
  LinkRouter,
@@ -157,25 +159,25 @@ const Breadcrumbs = ({
157
159
  href,
158
160
  current,
159
161
  breadcrumbName,
160
- reactRouterLinkComponent: linkComponent = reactRouterLinkComponent,
161
162
  LinkRouter: ItemLinkRouter = LinkRouter,
162
163
  linkRouterProps: itemLinkRouterProps,
163
164
  ...itemRest
164
- }) => (
165
- <Item
166
- {...itemRest}
167
- current={current}
168
- href={href}
169
- tokens={tokens}
170
- key={href}
171
- linkRouterProps={{ ...linkRouterProps, itemLinkRouterProps }}
172
- reactRouterLinkComponent={linkComponent}
173
- variant={{ ...variant, size: 'micro' }}
174
- LinkRouter={ItemLinkRouter}
175
- >
176
- {breadcrumbName}
177
- </Item>
178
- )
165
+ }) => {
166
+ return (
167
+ <Item
168
+ {...itemRest}
169
+ current={current}
170
+ href={href}
171
+ tokens={tokens}
172
+ key={href}
173
+ linkRouterProps={{ ...linkRouterProps, ...itemLinkRouterProps }}
174
+ variant={{ ...variant, size: 'micro' }}
175
+ LinkRouter={ItemLinkRouter}
176
+ >
177
+ {breadcrumbName}
178
+ </Item>
179
+ )
180
+ }
179
181
  )}
180
182
  </StyledList>
181
183
  {metadata}
@@ -198,11 +200,6 @@ Breadcrumbs.propTypes = {
198
200
  * React Router params.
199
201
  */
200
202
  params: PropTypes.object,
201
- /**
202
- * React Router Link component.
203
- * @deprecated please use `LinkRouter` and `linkRouterProps` instead
204
- */
205
- reactRouterLinkComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
206
203
  /**
207
204
  * An array of routes to be displayed as breadcrumbs.
208
205
  */
@@ -7,8 +7,7 @@ import {
7
7
  applyTextStyles,
8
8
  clickProps,
9
9
  selectSystemProps,
10
- useThemeTokens,
11
- withLinkRouter
10
+ useThemeTokens
12
11
  } from '@telus-uds/components-base'
13
12
  import { htmlAttrs } from '../../utils'
14
13
 
@@ -31,11 +30,12 @@ const Item = forwardRef(
31
30
  (
32
31
  {
33
32
  href,
34
- reactRouterLinkComponent: ReactRouterLink,
35
33
  children,
36
34
  current = false,
37
35
  tokens,
38
36
  variant = { light: true }, // `light` variant (shared with the `Link` component) is default by design
37
+ LinkRouter,
38
+ linkRouterProps,
39
39
  ...rest
40
40
  },
41
41
  ref
@@ -50,13 +50,7 @@ const Item = forwardRef(
50
50
  ...themeTokens
51
51
  } = useThemeTokens('Breadcrumbs', tokens, variant)
52
52
 
53
- const linkOptions = clickProps.toPressProps(selectProps(rest))
54
-
55
- if (ReactRouterLink) {
56
- linkOptions.to = href
57
- } else {
58
- linkOptions.href = href
59
- }
53
+ const linkOptions = { ...clickProps.toPressProps(selectProps(rest)), href }
60
54
 
61
55
  return (
62
56
  <StyledItemContainer {...themeTokens}>
@@ -66,29 +60,16 @@ const Item = forwardRef(
66
60
  </Typography>
67
61
  ) : (
68
62
  <>
69
- {ReactRouterLink ? (
70
- <ReactRouterLink
71
- {...linkOptions}
72
- tokens={{ color, blockFontSize: fontSize }}
73
- // TODO refactor
74
- // eslint-disable-next-line react/no-unstable-nested-components
75
- component={(props) => {
76
- return <Link {...props} variant={variant} />
77
- }}
78
- ref={ref}
79
- >
80
- {children}
81
- </ReactRouterLink>
82
- ) : (
83
- <Link
84
- {...linkOptions}
85
- tokens={{ color, blockFontSize: fontSize }}
86
- ref={ref}
87
- variant={variant}
88
- >
89
- {children}
90
- </Link>
91
- )}
63
+ <Link
64
+ {...linkOptions}
65
+ ref={ref}
66
+ tokens={{ color, blockFontSize: fontSize }}
67
+ LinkRouter={LinkRouter}
68
+ linkRouterProps={linkRouterProps}
69
+ variant={variant}
70
+ >
71
+ {children}
72
+ </Link>
92
73
  <IconContainer {...themeTokens}>
93
74
  <ChevronRightIcon size={iconSize} color={iconColor} />
94
75
  </IconContainer>
@@ -114,16 +95,10 @@ Item.propTypes = {
114
95
  */
115
96
  current: PropTypes.bool,
116
97
  /**
117
- * Target URL. This will be converted to `to` if the `reactRouterLinkComponent`
98
+ * Target URL. This will be converted to `to` if the `LinkRouter`
118
99
  * prop is provided to the `Item` or parent `Breadcrumbs` element.
119
100
  */
120
101
  href: PropTypes.string.isRequired,
121
- /**
122
- * React Router Link component. This will be passed down from the parent
123
- * `<Breadcrumbs>` if the parent has a `reactRouterLinkComponent` provided.
124
- * @deprecated please use `LinkRouter` and `linkRouterProps` instead
125
- */
126
- reactRouterLinkComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
127
102
  /**
128
103
  * Variant to render.
129
104
  */
@@ -134,8 +109,7 @@ Item.propTypes = {
134
109
  // - probably related https://github.com/yannickcr/eslint-plugin-react/issues/2760
135
110
  Item.defaultProps = {
136
111
  current: false,
137
- reactRouterLinkComponent: undefined,
138
112
  variant: { light: true }
139
113
  }
140
114
 
141
- export default withLinkRouter(Item)
115
+ export default Item
@@ -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,