@telus-uds/components-web 1.10.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 (110) hide show
  1. package/CHANGELOG.md +47 -2
  2. package/lib/Breadcrumbs/Item/Item.js +31 -6
  3. package/lib/Callout/Callout.js +24 -3
  4. package/lib/DatePicker/CalendarContainer.js +60 -71
  5. package/lib/DatePicker/DatePicker.js +66 -22
  6. package/lib/Disclaimer/Disclaimer.js +72 -0
  7. package/lib/Disclaimer/index.js +15 -0
  8. package/lib/Footnote/Footnote.js +3 -4
  9. package/lib/Footnote/FootnoteLink.js +11 -13
  10. package/lib/List/List.js +11 -0
  11. package/lib/List/ListItem.js +48 -0
  12. package/lib/List/index.js +16 -0
  13. package/lib/NavigationBar/NavigationBar.js +231 -0
  14. package/lib/NavigationBar/NavigationItem.js +111 -0
  15. package/lib/NavigationBar/NavigationSubMenu.js +179 -0
  16. package/lib/NavigationBar/collapseItems.js +51 -0
  17. package/lib/NavigationBar/index.js +13 -0
  18. package/lib/PriceLockup/PriceLockup.js +60 -23
  19. package/lib/PriceLockup/tokens.js +49 -116
  20. package/lib/Progress/ProgressBar.js +100 -0
  21. package/lib/Progress/index.js +16 -0
  22. package/lib/Ribbon/Ribbon.js +53 -32
  23. package/lib/SkeletonProvider/SkeletonImage.js +55 -0
  24. package/lib/SkeletonProvider/SkeletonProvider.js +84 -0
  25. package/lib/SkeletonProvider/SkeletonTypography.js +54 -0
  26. package/lib/SkeletonProvider/index.js +13 -0
  27. package/lib/Spinner/Spinner.js +18 -14
  28. package/lib/Table/Cell.js +15 -1
  29. package/lib/Table/Table.js +14 -5
  30. package/lib/Toast/Toast.js +1 -1
  31. package/lib/VideoPicker/VideoPicker.js +177 -0
  32. package/lib/VideoPicker/VideoPickerPlayer.js +54 -0
  33. package/lib/VideoPicker/VideoPickerThumbnail.js +201 -0
  34. package/lib/VideoPicker/VideoSlider.js +100 -0
  35. package/lib/VideoPicker/index.js +13 -0
  36. package/lib/VideoPicker/videoPropType.js +25 -0
  37. package/lib/index.js +55 -1
  38. package/lib-module/Breadcrumbs/Item/Item.js +32 -7
  39. package/lib-module/Callout/Callout.js +24 -3
  40. package/lib-module/DatePicker/CalendarContainer.js +61 -72
  41. package/lib-module/DatePicker/DatePicker.js +67 -23
  42. package/lib-module/Disclaimer/Disclaimer.js +54 -0
  43. package/lib-module/Disclaimer/index.js +1 -0
  44. package/lib-module/Footnote/Footnote.js +3 -3
  45. package/lib-module/Footnote/FootnoteLink.js +12 -14
  46. package/lib-module/List/List.js +2 -0
  47. package/lib-module/List/ListItem.js +31 -0
  48. package/lib-module/List/index.js +4 -0
  49. package/lib-module/NavigationBar/NavigationBar.js +207 -0
  50. package/lib-module/NavigationBar/NavigationItem.js +87 -0
  51. package/lib-module/NavigationBar/NavigationSubMenu.js +161 -0
  52. package/lib-module/NavigationBar/collapseItems.js +43 -0
  53. package/lib-module/NavigationBar/index.js +2 -0
  54. package/lib-module/PriceLockup/PriceLockup.js +62 -25
  55. package/lib-module/PriceLockup/tokens.js +54 -119
  56. package/lib-module/Progress/ProgressBar.js +83 -0
  57. package/lib-module/Progress/index.js +4 -0
  58. package/lib-module/Ribbon/Ribbon.js +53 -32
  59. package/lib-module/SkeletonProvider/SkeletonImage.js +42 -0
  60. package/lib-module/SkeletonProvider/SkeletonProvider.js +65 -0
  61. package/lib-module/SkeletonProvider/SkeletonTypography.js +41 -0
  62. package/lib-module/SkeletonProvider/index.js +2 -0
  63. package/lib-module/Spinner/Spinner.js +17 -14
  64. package/lib-module/Table/Cell.js +15 -1
  65. package/lib-module/Table/Table.js +14 -5
  66. package/lib-module/Toast/Toast.js +1 -1
  67. package/lib-module/VideoPicker/VideoPicker.js +151 -0
  68. package/lib-module/VideoPicker/VideoPickerPlayer.js +41 -0
  69. package/lib-module/VideoPicker/VideoPickerThumbnail.js +180 -0
  70. package/lib-module/VideoPicker/VideoSlider.js +83 -0
  71. package/lib-module/VideoPicker/index.js +2 -0
  72. package/lib-module/VideoPicker/videoPropType.js +9 -0
  73. package/lib-module/index.js +6 -0
  74. package/package.json +3 -3
  75. package/src/Breadcrumbs/Item/Item.jsx +18 -4
  76. package/src/Callout/Callout.jsx +27 -3
  77. package/src/DatePicker/CalendarContainer.jsx +61 -71
  78. package/src/DatePicker/DatePicker.jsx +47 -19
  79. package/src/Disclaimer/Disclaimer.jsx +39 -0
  80. package/src/Disclaimer/index.js +1 -0
  81. package/src/Footnote/Footnote.jsx +3 -3
  82. package/src/Footnote/FootnoteLink.jsx +28 -18
  83. package/src/List/List.jsx +3 -0
  84. package/src/List/ListItem.jsx +21 -0
  85. package/src/List/index.js +6 -0
  86. package/src/NavigationBar/NavigationBar.jsx +217 -0
  87. package/src/NavigationBar/NavigationItem.jsx +83 -0
  88. package/src/NavigationBar/NavigationSubMenu.jsx +121 -0
  89. package/src/NavigationBar/collapseItems.js +29 -0
  90. package/src/NavigationBar/index.js +3 -0
  91. package/src/PriceLockup/PriceLockup.jsx +58 -26
  92. package/src/PriceLockup/tokens.js +34 -54
  93. package/src/Progress/ProgressBar.jsx +67 -0
  94. package/src/Progress/index.js +6 -0
  95. package/src/Ribbon/Ribbon.jsx +21 -9
  96. package/src/SkeletonProvider/SkeletonImage.jsx +33 -0
  97. package/src/SkeletonProvider/SkeletonProvider.jsx +62 -0
  98. package/src/SkeletonProvider/SkeletonTypography.jsx +31 -0
  99. package/src/SkeletonProvider/index.js +3 -0
  100. package/src/Spinner/Spinner.jsx +20 -17
  101. package/src/Table/Cell.jsx +22 -5
  102. package/src/Table/Table.jsx +7 -4
  103. package/src/Toast/Toast.jsx +1 -0
  104. package/src/VideoPicker/VideoPicker.jsx +144 -0
  105. package/src/VideoPicker/VideoPickerPlayer.jsx +21 -0
  106. package/src/VideoPicker/VideoPickerThumbnail.jsx +182 -0
  107. package/src/VideoPicker/VideoSlider.jsx +85 -0
  108. package/src/VideoPicker/index.js +3 -0
  109. package/src/VideoPicker/videoPropType.js +12 -0
  110. package/src/index.js +6 -0
package/CHANGELOG.md CHANGED
@@ -1,12 +1,57 @@
1
1
  # Change Log - @telus-uds/components-web
2
2
 
3
- This log was last generated on Mon, 01 May 2023 22:02:12 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 17 May 2023 00:13:27 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.12.0
8
+
9
+ Wed, 17 May 2023 00:13:27 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Standardized Pagination (wlsdud194@hotmail.com)
14
+ - move 'List' to components-web (kyle.king2@telus.com)
15
+ - Standardize DatePicker for TELUS, Public Mobile, and Koodo (samuraix221@hotmail.com)
16
+ - add 'strikeThroughPosition' token (kyle.king2@telus.com)
17
+ - Add fullWidth prop to Table (wlsdud194@hotmail.com)
18
+ - make Skeleton provider multibrand (mauricio.batresmontejo@telus.com)
19
+ - Expand collapse standardization (akshay.pandey1@telus.com)
20
+ - Bump @telus-uds/components-base to v1.41.0
21
+ - Bump @telus-uds/system-theme-tokens to v2.26.0
22
+
23
+ ### Patches
24
+
25
+ - Remove flexGrow from text styles (wlsdud194@hotmail.com)
26
+ - Fix an issue where `Toast` doesn't render as expected on smaller screens (shahzaibkhalidmalik@outlook.com)
27
+
28
+ ## 1.11.0
29
+
30
+ Tue, 09 May 2023 00:29:54 GMT
31
+
32
+ ### Minor changes
33
+
34
+ - Fix to import icon from palette (wlsdud194@hotmail.com)
35
+ - make ProgressBar component to multibrand (mauricio.batresmontejo@telus.com)
36
+ - Add fontWeight, fontName, color, currentColor to component implementation (kyle.king2@telus.com)
37
+ - Callout has a new prop - textAlign that centers or left aligns text (akshay.pandey1@telus.com)
38
+ - refactor 'PriceLockup' & 'FootnoteLink' to take additional properties/tokens (kyle.king2@telus.com)
39
+ - font color as a property to follow the standarization guidelines in the brands for the ribbon components (35577399+JoshHC@users.noreply.github.com)
40
+ - Updated snapshots for components that depend on 'Typography' (kyle.king2@telus.com)
41
+ - added font props to Cell component (ignacio.cuyun@telus.com)
42
+ - makes navigation bar component multibrand (mauricio.batresmontejo@telus.com)
43
+ - moved 'Disclaimer' to components-web from ds-allium (kyle.king2@telus.com)
44
+ - move 'VideoPicker' to components-web (kyle.king2@telus.com)
45
+ - Bump @telus-uds/components-base to v1.40.0
46
+ - Bump @telus-uds/system-theme-tokens to v2.25.0
47
+
48
+ ### Patches
49
+
50
+ - Fix an issue where `Spinner` might not render correctly in `fullScreen` mode (shahzaibkhalidmalik@outlook.com)
51
+
7
52
  ## 1.10.0
8
53
 
9
- Mon, 01 May 2023 22:02:12 GMT
54
+ Mon, 01 May 2023 22:09:07 GMT
10
55
 
11
56
  ### Minor changes
12
57
 
@@ -55,10 +55,20 @@ const IconContainer = /*#__PURE__*/_styledComponents.default.span.withConfig({
55
55
  iconPadding
56
56
  } = _ref3;
57
57
  return `${iconPadding}px`;
58
+ },
59
+ fontFamily: _ref4 => {
60
+ let {
61
+ fontName,
62
+ fontWeight
63
+ } = _ref4;
64
+ return (0, _componentsBase.applyTextStyles)({
65
+ fontName,
66
+ fontWeight
67
+ }).fontFamily;
58
68
  }
59
69
  });
60
70
 
61
- const Item = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
71
+ const Item = /*#__PURE__*/(0, _react.forwardRef)((_ref5, ref) => {
62
72
  let {
63
73
  href,
64
74
  reactRouterLinkComponent: ReactRouterLink,
@@ -70,10 +80,14 @@ const Item = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
70
80
  },
71
81
  // `light` variant (shared with the `Link` component) is default by design
72
82
  ...rest
73
- } = _ref4;
83
+ } = _ref5;
74
84
  const {
75
85
  iconColor,
76
86
  icon: ChevronRightIcon,
87
+ currentColor,
88
+ color,
89
+ iconSize,
90
+ fontSize,
77
91
  ...themeTokens
78
92
  } = (0, _componentsBase.useThemeTokens)('Breadcrumbs', tokens, variant);
79
93
 
@@ -87,14 +101,21 @@ const Item = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
87
101
 
88
102
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledItemContainer, { ...themeTokens,
89
103
  children: current ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
90
- variant: { ...variant,
91
- secondary: true
104
+ tokens: {
105
+ color: currentColor,
106
+ fontSize
107
+ },
108
+ variant: { ...variant
92
109
  },
93
110
  children: children
94
111
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
95
112
  children: [ReactRouterLink ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ReactRouterLink, { ...linkOptions,
96
- // TODO refactor
113
+ tokens: {
114
+ color,
115
+ blockFontSize: fontSize
116
+ } // TODO refactor
97
117
  // eslint-disable-next-line react/no-unstable-nested-components
118
+ ,
98
119
  component: props => {
99
120
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Link, { ...props,
100
121
  variant: variant
@@ -103,12 +124,16 @@ const Item = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
103
124
  ref: ref,
104
125
  children: children
105
126
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Link, { ...linkOptions,
127
+ tokens: {
128
+ color,
129
+ blockFontSize: fontSize
130
+ },
106
131
  ref: ref,
107
132
  variant: variant,
108
133
  children: children
109
134
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(IconContainer, { ...themeTokens,
110
135
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChevronRightIcon, {
111
- size: 16,
136
+ size: iconSize,
112
137
  color: iconColor
113
138
  })
114
139
  })]
@@ -21,6 +21,23 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
21
21
 
22
22
  const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
23
23
 
24
+ const getAlignment = (rounded, textAlignToFlex) => {
25
+ if (textAlignToFlex) {
26
+ switch (textAlignToFlex) {
27
+ case 'left':
28
+ return 'flex-star';
29
+
30
+ case 'center':
31
+ return 'center';
32
+
33
+ default:
34
+ return 'flex-start';
35
+ }
36
+ }
37
+
38
+ return rounded ? 'center' : ' flex-start';
39
+ };
40
+
24
41
  const verticalAlignToFlex = verticalAlign => {
25
42
  switch (verticalAlign) {
26
43
  case 'top':
@@ -43,7 +60,8 @@ const CalloutContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
43
60
  })(_ref => {
44
61
  let {
45
62
  rounded,
46
- verticalAlign = 'top',
63
+ verticalAlign,
64
+ textAlignToFlex,
47
65
  background,
48
66
  gap,
49
67
  borderRadius,
@@ -55,7 +73,7 @@ const CalloutContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
55
73
  gap,
56
74
  borderRadius,
57
75
  padding,
58
- justifyContent: `${rounded ? 'center' : 'flex-start'}`,
76
+ justifyContent: getAlignment(rounded, textAlignToFlex),
59
77
  alignItems: verticalAlignToFlex(verticalAlign)
60
78
  };
61
79
  });
@@ -64,7 +82,8 @@ const Callout = _ref2 => {
64
82
  let {
65
83
  icon,
66
84
  children,
67
- verticalAlign = 'top',
85
+ verticalAlign,
86
+ textAlignToFlex,
68
87
  tokens,
69
88
  variant = {},
70
89
  ...rest
@@ -88,6 +107,7 @@ const Callout = _ref2 => {
88
107
  rounded: rounded,
89
108
  "data-testid": "callout-container",
90
109
  verticalAlign: verticalAlign,
110
+ textAlignToFlex: textAlignToFlex,
91
111
  background: background,
92
112
  gap: gap,
93
113
  borderRadius: borderRadius,
@@ -118,6 +138,7 @@ const Callout = _ref2 => {
118
138
  Callout.propTypes = { ...selectedSystemPropTypes,
119
139
  icon: _propTypes.default.elementType,
120
140
  children: _propTypes.default.node.isRequired,
141
+ textAlignToFlex: _propTypes.default.oneOf(['center', 'left']),
121
142
  verticalAlign: _propTypes.default.oneOf(['top', 'middle', 'bottom'])
122
143
  };
123
144
  var _default = Callout;
@@ -11,6 +11,8 @@ var _reactDatesCss = _interopRequireDefault(require("./reactDatesCss"));
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
+ // calendarDayDefaultHeight and calendarDayDefaultWidth
15
+ // refer to circle size when selected, focused, or hovered and is passed with getResponsiveCircleSize in DatePicker
14
16
  const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
15
17
  displayName: "CalendarContainer",
16
18
  componentId: "components-web__sc-qdc1tg-0"
@@ -20,7 +22,9 @@ const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
20
22
  validation,
21
23
  remainingTokens,
22
24
  calendarMonthFontTokens,
23
- dayPickerNavigationButtonTokens,
25
+ calendarDayDefaultHeight,
26
+ calendarDayDefaultWidth,
27
+ calendarWeekFontTokens,
24
28
  defaultFontTokens
25
29
  } = _ref;
26
30
  return `
@@ -33,24 +37,25 @@ const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
33
37
  display: block;
34
38
  }
35
39
  .SingleDatePicker_picker {
40
+ background-color: ${remainingTokens.calendarBackgroundColor};
36
41
  box-shadow: none;
37
42
  border: 1px solid ${remainingTokens.singleDatePickerBorderColor};
38
- border-radius: ${remainingTokens.singleDatePickerRadius};
43
+ border-radius: ${remainingTokens.singleDatePickerRadius}px;
39
44
  padding: ${remainingTokens.singleDatePickerPaddingTopBottom}px ${remainingTokens.singleDatePickerLeftRight}px;
40
45
  z-index: 3;
41
46
  }
42
47
  .DateInput {
43
48
  width: 100%;
44
49
  border: 2px solid ${remainingTokens.dateInputBorderColor};
45
- border-radius: ${remainingTokens.dateInputBorderRadius};
46
50
  ${validation === 'error' && `input { border-color: ${remainingTokens.invalidInputMixin}; }`};
47
51
  ${validation === 'success' && `input { border-color: ${remainingTokens.validInputMixin}; }`};
48
52
  }
49
53
  .DateInput:hover {
54
+ border-radius: ${remainingTokens.dateInputBorderRadius}px;
50
55
  border: 2px solid ${remainingTokens.dateInputHoverBorderColor};
51
56
  }
52
- .DateInput:focus {
53
- border: 2px solid ${remainingTokens.dateInputFocusBorderColor};
57
+ .DateInput_input:focus {
58
+ border: 3px solid ${remainingTokens.dateInputFocusBorderColor};
54
59
  }
55
60
  .SingleDatePickerInput__withBorder {
56
61
  border: 0 !important;
@@ -71,94 +76,63 @@ const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
71
76
  z-index: 4;
72
77
  left: ${(daySize * 8.5 - 20) / 2}px;
73
78
  }
79
+ .DateInput_fangShape {
80
+ fill: ${remainingTokens.calendarBackgroundColor}
81
+ }
74
82
  .DateInput_fangStroke {
75
83
  stroke: ${remainingTokens.dateInputStrokeColor};
76
84
  }
77
85
  .CalendarMonth_caption {
78
86
  color: ${remainingTokens.calendarMonthCaptionColor};
79
87
  font-family: ${calendarMonthFontTokens.fontFamily};
80
- font-size: ${remainingTokens.calendarMonthCaptionFontSize};
88
+ font-size: ${remainingTokens.calendarMonthCaptionFontSize}px;
81
89
  font-weight: ${calendarMonthFontTokens.fontWeight};
82
90
  line-height: ${remainingTokens.calendarMonthCaptionLineHeight};
83
91
  padding-bottom: ${remainingTokens.calendarMonthCaptionPaddingBottom}px;
84
92
  }
93
+ .DayPicker{
94
+ background-color: ${remainingTokens.calendarBackgroundColor};
95
+ }
85
96
  .DayPicker__withBorder {
86
97
  box-shadow: none;
87
98
  }
88
- .DayPickerNavigation_button {
89
- align-items: center;
99
+ .DayPickerNavigation {
90
100
  display: flex;
91
- justify-content: center;
92
- border: 1px solid ${remainingTokens.dayPickerNavigationButtonBorderColor};
93
- background-color: ${remainingTokens.dayPickerNavigationButtonBackgroundColor};
94
- border-radius: 50%;
95
- box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
96
- max-height: ${remainingTokens.dayPickerNavigationButtonMaxHeight}px;
97
- max-width: ${remainingTokens.dayPickerNavigationButtonMaxWidth}px;
98
- position: absolute;
99
- top: 18px;
100
- line-height: 0.78;
101
- padding: ${remainingTokens.dayPickerNavigationButtonPadding}px;
102
- cursor: pointer;
103
- user-select: none;
104
- &:nth-child(1) {
105
- left: ${remainingTokens.dayPickerNavigationButtonChildLeft}px;
106
- }
107
- &:nth-child(2) {
108
- right: ${remainingTokens.dayPickerNavigationButtonChildRight}px;
109
- i {
110
- font-family: 'TELUS Core Icons';
111
- display: inline-block;
112
- font-weight: normal;
113
- font-style: normal;
114
- speak: none;
115
- text-decoration: inherit;
116
- text-transform: none;
117
- text-rendering: auto;
118
- -webkit-font-smoothing: antialiased;
119
- -moz-osx-font-smoothing: grayscale;
120
- line-height: 1;
121
- vertical-align: middle;
122
- &:before {
123
- content: '\\F107';
124
- display: inline-block;
125
- }
126
- }
127
- }
128
- & svg {
129
- fill: ${remainingTokens.dayPickerNavigationButtonChildSvgFill};
130
- }
101
+ justify-content: space-between;
102
+ align-self: center;
103
+ top: 23px;
104
+ padding: 0px ${remainingTokens.dayPickerNavigationButtonPadding}px;
131
105
  }
132
106
  .DayPickerNavigation_button__default:focus,
133
- .DayPickerNavigation_button__default:hover {
134
- border: 1px solid ${remainingTokens.dayPickerNavigationButtonDefaultHoverBorderColor};
135
- }
136
- .DayPickerNavigation_svg__horizontal {
137
- fill: ${remainingTokens.dayPickerNavigationSVGHorizontalFill};
138
- }
107
+ .DayPickerNavigation_button:hover,
108
+ .DayPickerNavigation_svg__horizontal,
139
109
  .DayPicker_weekHeader {
140
110
  color: ${remainingTokens.dayPickerWeekHeaderColor};
141
- font-family: ${dayPickerNavigationButtonTokens.fontFamily};
142
- font-weight: ${dayPickerNavigationButtonTokens.fontWeight};
111
+ font-family: ${calendarWeekFontTokens.fontFamily};
143
112
  font-feature-settings: 'ss01' on, 'ss03' on, 'ss08' on;
144
113
  line-height: ${remainingTokens.dayPickerWeekHeaderLineHeight};
145
- & small {
146
- font-size: ${remainingTokens.dayPickerWeekHeaderSmall};
147
- }
148
114
  & li {
115
+ font-size: ${remainingTokens.dayPickerWeekHeaderSmall}px;
149
116
  max-width: ${daySize}px !important;
150
117
  }
151
118
  }
119
+ .CalendarMonthGrid {
120
+ background-color: ${remainingTokens.calendarBackgroundColor};
121
+ }
122
+ .CalendarMonth {
123
+ background-color: ${remainingTokens.calendarBackgroundColor};
124
+ }
152
125
  .CalendarDay__default {
153
126
  padding: 0px;
154
127
  position: relative;
128
+ background: ${remainingTokens.calendarDayDefaultBackgroundColor};
155
129
  background-clip: padding-box;
156
- border: ${remainingTokens.calendarDayDefaultBorder} solid ${remainingTokens.calendarDayDefaultBorderColor};
130
+ border: ${remainingTokens.calendarDayDefaultBorder}px solid ${remainingTokens.calendarDayDefaultBorderColor};
157
131
  vertical-align: middle;
158
132
  font-family: ${defaultFontTokens.fontFamily};
159
133
  font-weight: ${defaultFontTokens.fontWeight}
160
134
  font-feature-settings: 'ss01' on, 'ss03' on, 'ss08' on;
161
- font-size: ${remainingTokens.calendarDayDefaultFontSize};
135
+ font-size: ${remainingTokens.calendarDayDefaultFontSize}px;
162
136
  line-height: ${daySize - 3}px !important;
163
137
  color: ${remainingTokens.calendarDayDefaultColor};
164
138
  text-decoration: none;
@@ -169,36 +143,51 @@ const CalendarContainer = /*#__PURE__*/_styledComponents.default.div.withConfig(
169
143
  top: 50%;
170
144
  left: 50%;
171
145
  transform: translate(-50%, -50%);
172
- height: ${remainingTokens.calendarDayDefaultBeforeHeight}px;
173
- width: ${remainingTokens.calendarDayDefaultBeforeWidth}px;
146
+ height: ${calendarDayDefaultHeight}px;
147
+ width: ${calendarDayDefaultWidth}px;
174
148
  border-radius: 50%;
175
149
  background: transparent;
176
150
  transition: all 0.3s;
177
151
  z-index: -1;
178
152
  }
179
153
  }
180
- .CalendarDay__default:hover,
181
- .CalendarDay__selected,
182
- .CalendarDay__selected:active,
183
- .CalendarDay__selected:hover {
184
- background: none;
154
+ .CalendarDay__default:hover {
155
+ background: ${remainingTokens.calendarDaySelectedHoverBackground};
185
156
  border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
186
157
  color: ${remainingTokens.calendarDaySelectedHoverColor};
187
158
  text-decoration: none;
188
159
  z-index: 0;
189
160
  &:before {
161
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBeforeBorderColor};
190
162
  background: ${remainingTokens.calendarDaySelectedHoverBeforeBackground};
191
163
  }
192
164
  }
165
+ .CalendarDay__default:focus{
166
+ background: ${remainingTokens.calendarDaySelectedHoverBackground};
167
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
168
+ color: ${remainingTokens.calendarDaySelectedHoverColor};
169
+ text-decoration: none;
170
+ z-index: 0;
171
+ &:before {
172
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBeforeBorderColor};
173
+ background: ${remainingTokens.calendarDaySelectedFocusBeforeBackground};
174
+ }
175
+ }
176
+ .CalendarDay__selected,
177
+ .CalendarDay__selected:active,
178
+ .CalendarDay__selected:hover
193
179
  .CalendarDay__default.CalendarDay__selected,
194
180
  .CalendarDay__default.CalendarDay__selected:active
195
- .CalendarDay__default.CalendarDay__selected:hover {
181
+ .CalendarDay__default.CalendarDay__selected:hover{
182
+ background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBackground};
183
+ border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
196
184
  color: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverColor};
197
185
  text-decoration: none;
186
+ z-index: 0;
198
187
  &:before {
199
- background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBackground};
200
- }
188
+ background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBeforeBackground};
201
189
  }
190
+ }
202
191
  .CalendarDay__blocked_out_of_range,
203
192
  .CalendarDay__blocked_out_of_range:active,
204
193
  .CalendarDay__blocked_out_of_range:hover,
@@ -51,12 +51,19 @@ const getResponsiveDaySize = function () {
51
51
  return responsiveDaySize;
52
52
  };
53
53
 
54
- const getIcon = icon => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Icon, {
55
- icon: icon,
56
- variant: {
57
- size: 'small'
54
+ const getResponsiveCircleSize = function () {
55
+ let inline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
56
+ let viewport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md';
57
+ let responsiveCircleSize;
58
+
59
+ if (viewport === 'xs') {
60
+ responsiveCircleSize = 26;
61
+ } else {
62
+ responsiveCircleSize = inline ? 44 : 26;
58
63
  }
59
- });
64
+
65
+ return responsiveCircleSize;
66
+ };
60
67
 
61
68
  const MonthCenterContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
62
69
  displayName: "DatePicker__MonthCenterContainer",
@@ -129,6 +136,7 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
129
136
 
130
137
  const viewport = (0, _componentsBase.useViewport)();
131
138
  const daySize = getResponsiveDaySize(inline, viewport);
139
+ const circleSize = getResponsiveCircleSize(inline, viewport);
132
140
  const value = date ?? inputDate;
133
141
 
134
142
  const HiddenInputFieldContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
@@ -142,7 +150,9 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
142
150
  previousIcon,
143
151
  nextIcon,
144
152
  ...remainingTokens
145
- } = (0, _componentsBase.useThemeTokens)('DatePicker', tokens, variant, {
153
+ } = (0, _componentsBase.useThemeTokens)('DatePicker', tokens, { ...variant,
154
+ inline
155
+ }, {
146
156
  viewport
147
157
  });
148
158
  const defaultFontTokens = (0, _componentsBase.applyTextStyles)({
@@ -153,16 +163,50 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
153
163
  fontName: remainingTokens.calendarMonthCaptionFontName,
154
164
  fontWeight: remainingTokens.calendarMonthCaptionFontWeight
155
165
  });
156
- const dayPickerNavigationButtonTokens = (0, _componentsBase.applyTextStyles)({
166
+ const calendarWeekFontTokens = (0, _componentsBase.applyTextStyles)({
157
167
  fontName: remainingTokens.dayPickerWeekHeaderFontName,
158
168
  fontWeight: remainingTokens.dayPickerWeekHeaderFontWeight
159
169
  });
170
+
171
+ const renderPrevButton = _ref3 => {
172
+ let {
173
+ onClick
174
+ } = _ref3;
175
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.IconButton, {
176
+ onPress: () => {
177
+ onClick();
178
+ },
179
+ icon: previousIcon,
180
+ variant: {
181
+ size: 'small'
182
+ }
183
+ });
184
+ };
185
+
186
+ const renderNextButton = _ref4 => {
187
+ let {
188
+ onClick
189
+ } = _ref4;
190
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.IconButton, {
191
+ onPress: () => {
192
+ onClick();
193
+ },
194
+ icon: nextIcon,
195
+ variant: {
196
+ size: 'small'
197
+ }
198
+ });
199
+ };
200
+
160
201
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CalendarContainer.default, { ...selectProps(rest),
161
202
  daySize: daySize,
162
203
  validation: validation,
163
- remainingTokens: remainingTokens,
204
+ remainingTokens: { ...remainingTokens
205
+ },
206
+ calendarDayDefaultHeight: circleSize,
207
+ calendarDayDefaultWidth: circleSize,
164
208
  calendarMonthFontTokens: calendarMonthFontTokens,
165
- dayPickerNavigationButtonTokens: dayPickerNavigationButtonTokens,
209
+ calendarWeekFontTokens: calendarWeekFontTokens,
166
210
  defaultFontTokens: defaultFontTokens,
167
211
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.InputSupports, {
168
212
  copy: copy,
@@ -193,14 +237,14 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
193
237
  hideKeyboardShortcutsPanel: true,
194
238
  keepOpenOnDateSelect: false,
195
239
  daySize: daySize,
196
- navPrev: getIcon(previousIcon),
197
- navNext: getIcon(nextIcon),
240
+ renderNavPrevButton: renderPrevButton,
241
+ renderNavNextButton: renderNextButton,
198
242
  isOutsideRange: isDayDisabled,
199
243
  phrases: getCopy(),
200
- renderMonthElement: _ref3 => {
244
+ renderMonthElement: _ref5 => {
201
245
  let {
202
246
  month
203
- } = _ref3;
247
+ } = _ref5;
204
248
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthCenterContainer, {
205
249
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
206
250
  children: [_dictionary.default[copy] ? _dictionary.default[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
@@ -212,26 +256,26 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
212
256
  })
213
257
  })]
214
258
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_SingleDatePicker.default, {
215
- ref: ref,
216
- id: id,
217
259
  date: value,
218
260
  onDateChange: onChange,
219
261
  focused: isFocused,
220
262
  onFocusChange: onFocusChange,
221
263
  numberOfMonths: 1,
222
264
  hideKeyboardShortcutsPanel: true,
223
- displayFormat: "DD / MM / YYYY",
224
- placeholder: "DD / MM / YYYY",
225
- keepOpenOnDateSelect: false,
265
+ keepOpenOnDateSelect: true,
226
266
  daySize: daySize,
227
- navPrev: getIcon(previousIcon),
228
- navNext: getIcon(nextIcon),
267
+ ref: ref,
268
+ renderNavPrevButton: renderPrevButton,
229
269
  isOutsideRange: isDayDisabled,
230
270
  phrases: getCopy(),
231
- renderMonthElement: _ref4 => {
271
+ id: id,
272
+ displayFormat: "DD / MM / YYYY",
273
+ placeholder: "DD / MM / YYYY",
274
+ renderNavNextButton: renderNextButton,
275
+ renderMonthElement: _ref6 => {
232
276
  let {
233
277
  month
234
- } = _ref4;
278
+ } = _ref6;
235
279
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthCenterContainer, {
236
280
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
237
281
  children: [_dictionary.default[copy] ? _dictionary.default[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ var _componentsBase = require("@telus-uds/components-base");
15
+
16
+ var _utils = require("../utils");
17
+
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
23
+
24
+ const StyledDisclaimer = /*#__PURE__*/_styledComponents.default.p.withConfig({
25
+ displayName: "Disclaimer__StyledDisclaimer",
26
+ componentId: "components-web__sc-1l4xf7u-0"
27
+ })(_ref => {
28
+ let {
29
+ fontName,
30
+ fontWeight,
31
+ fontSize,
32
+ ...tokens
33
+ } = _ref;
34
+ const {
35
+ fontFamily
36
+ } = (0, _componentsBase.applyTextStyles)({
37
+ fontName,
38
+ fontWeight
39
+ });
40
+ return {
41
+ fontSize: `${fontSize}px`,
42
+ fontFamily,
43
+ ...tokens
44
+ };
45
+ });
46
+ /**
47
+ * Use Disclaimer to display singular legal statement and must be displayed
48
+ * immediately adjacent to the related, originating content.
49
+ */
50
+
51
+
52
+ const Disclaimer = _ref2 => {
53
+ let {
54
+ children,
55
+ ...rest
56
+ } = _ref2;
57
+ const themeTokens = (0, _componentsBase.useThemeTokens)('Disclaimer');
58
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDisclaimer, { ...selectProps(rest),
59
+ ...themeTokens,
60
+ children: children
61
+ });
62
+ };
63
+
64
+ Disclaimer.propTypes = { ...selectedSystemPropTypes,
65
+
66
+ /**
67
+ * The content
68
+ */
69
+ children: _propTypes.default.node.isRequired
70
+ };
71
+ var _default = Disclaimer;
72
+ exports.default = _default;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Disclaimer.default;
10
+ }
11
+ });
12
+
13
+ var _Disclaimer = _interopRequireDefault(require("./Disclaimer"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }