@telus-uds/components-web 2.10.0 → 2.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 (60) hide show
  1. package/CHANGELOG.md +33 -2
  2. package/component-docs.json +76 -11
  3. package/lib/BlockQuote/BlockQuote.js +4 -1
  4. package/lib/Card/Card.js +2 -0
  5. package/lib/DatePicker/DatePicker.js +23 -12
  6. package/lib/ExpandCollapseMini/ExpandCollapseMini.js +5 -10
  7. package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +32 -7
  8. package/lib/Footnote/FootnoteLink.js +1 -2
  9. package/lib/Listbox/GroupControl.js +44 -28
  10. package/lib/Listbox/Listbox.js +54 -47
  11. package/lib/Listbox/ListboxGroup.js +36 -20
  12. package/lib/Listbox/ListboxItem.js +14 -51
  13. package/lib/Listbox/ListboxOverlay.js +1 -1
  14. package/lib/PriceLockup/PriceLockup.js +6 -1
  15. package/lib/Video/ControlBar/ControlBar.js +13 -10
  16. package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +4 -1
  17. package/lib/VideoPicker/VideoPicker.js +1 -1
  18. package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +14 -2
  19. package/lib/utils/index.js +3 -3
  20. package/lib-module/BlockQuote/BlockQuote.js +4 -1
  21. package/lib-module/Card/Card.js +2 -0
  22. package/lib-module/DatePicker/DatePicker.js +23 -12
  23. package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +6 -11
  24. package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +32 -7
  25. package/lib-module/Footnote/FootnoteLink.js +1 -2
  26. package/lib-module/Listbox/GroupControl.js +45 -29
  27. package/lib-module/Listbox/Listbox.js +54 -46
  28. package/lib-module/Listbox/ListboxGroup.js +37 -21
  29. package/lib-module/Listbox/ListboxItem.js +15 -51
  30. package/lib-module/Listbox/ListboxOverlay.js +1 -1
  31. package/lib-module/PriceLockup/PriceLockup.js +7 -2
  32. package/lib-module/Video/ControlBar/ControlBar.js +14 -11
  33. package/lib-module/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +4 -1
  34. package/lib-module/VideoPicker/VideoPicker.js +1 -1
  35. package/lib-module/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +14 -2
  36. package/lib-module/utils/index.js +1 -1
  37. package/package.json +3 -3
  38. package/src/BlockQuote/BlockQuote.jsx +13 -1
  39. package/src/Card/Card.jsx +12 -8
  40. package/src/DatePicker/DatePicker.jsx +22 -12
  41. package/src/ExpandCollapseMini/ExpandCollapseMini.jsx +9 -6
  42. package/src/ExpandCollapseMini/ExpandCollapseMiniControl.jsx +21 -4
  43. package/src/Footnote/FootnoteLink.jsx +1 -2
  44. package/src/Listbox/GroupControl.jsx +50 -33
  45. package/src/Listbox/Listbox.jsx +59 -50
  46. package/src/Listbox/ListboxGroup.jsx +34 -19
  47. package/src/Listbox/ListboxItem.jsx +26 -48
  48. package/src/Listbox/ListboxOverlay.jsx +1 -1
  49. package/src/PriceLockup/PriceLockup.jsx +7 -2
  50. package/src/Video/ControlBar/ControlBar.jsx +17 -13
  51. package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +2 -1
  52. package/src/VideoPicker/VideoPicker.jsx +1 -1
  53. package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +8 -1
  54. package/src/utils/index.js +1 -1
  55. package/lib/Listbox/PressableItem.js +0 -149
  56. package/lib/utils/htmlAttrs.js +0 -33
  57. package/lib-module/Listbox/PressableItem.js +0 -128
  58. package/lib-module/utils/htmlAttrs.js +0 -22
  59. package/src/Listbox/PressableItem.jsx +0 -121
  60. package/src/utils/htmlAttrs.js +0 -29
@@ -55,7 +55,6 @@ const ListboxGroup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
55
55
  id,
56
56
  label,
57
57
  items,
58
- selectedId,
59
58
  LinkRouter,
60
59
  linkRouterProps,
61
60
  expandProps,
@@ -63,7 +62,10 @@ const ListboxGroup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
63
62
  nextItemRef,
64
63
  prevItemRef
65
64
  } = _ref;
66
- // TODO: implement keyboard navigation via refs for grouped items separately here
65
+ const {
66
+ selectedId
67
+ } = (0, _componentsBase.useListboxContext)(); // TODO: implement keyboard navigation via refs for grouped items separately here
68
+
67
69
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledGroupWrapper, {
68
70
  role: "option",
69
71
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse.Panel, {
@@ -73,11 +75,17 @@ const ListboxGroup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
73
75
  paddingLeft: 'none',
74
76
  paddingRight: 'none',
75
77
  paddingTop: 'none',
76
- paddingBottom: 'none'
78
+ paddingBottom: 'none',
79
+ backgroundColor: 'transparent',
80
+ borderColor: 'transparent',
81
+ textLine: 'none',
82
+ borderWidth: 0
77
83
  } // TODO refactor
78
84
  // eslint-disable-next-line react/no-unstable-nested-components
79
85
  ,
80
- control: controlProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupControl.default, { ...controlProps,
86
+ control: controlProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupControl.default, {
87
+ id: id ?? label,
88
+ ...controlProps,
81
89
  label: label
82
90
  }),
83
91
  ...expandProps,
@@ -85,25 +93,33 @@ const ListboxGroup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
85
93
  contentPaddingLeft: 'none',
86
94
  contentPaddingRight: 'none',
87
95
  contentPaddingTop: 'none',
88
- contentPaddingBottom: 'none'
96
+ contentPaddingBottom: 'none',
97
+ borderColor: 'transparent',
98
+ borderRadius: 0,
99
+ borderWidth: 0,
100
+ marginBottom: 0
89
101
  },
90
102
  controlRef: ref,
91
103
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledList, {
92
- children: items.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListboxItem.default, { ...item,
93
- selected: item.id === selectedId,
94
- isChild: true,
95
- LinkRouter: LinkRouter,
96
- linkRouterProps: linkRouterProps,
97
- ...(index === 0 && {
98
- prevItemRef
99
- }),
100
- ...(index === items.length - 1 && {
101
- nextItemRef
102
- }),
103
- ...(index === items.length - 1 && {
104
- onBlur: onLastItemBlur
105
- })
106
- }, item.label))
104
+ children: items.map((item, index) => {
105
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListboxItem.default, {
106
+ id: item.id ?? item.label,
107
+ ...item,
108
+ selected: item.id && item.id === selectedId || item.label && item.label === selectedId,
109
+ isChild: true,
110
+ LinkRouter: LinkRouter,
111
+ linkRouterProps: linkRouterProps,
112
+ ...(index === 0 && {
113
+ prevItemRef
114
+ }),
115
+ ...(index === items.length - 1 && {
116
+ nextItemRef
117
+ }),
118
+ ...(index === items.length - 1 && {
119
+ onBlur: onLastItemBlur
120
+ })
121
+ }, item.label);
122
+ })
107
123
  })
108
124
  })
109
125
  });
@@ -15,8 +15,6 @@ var _componentsBase = require("@telus-uds/components-base");
15
15
 
16
16
  var _utils = require("../utils");
17
17
 
18
- var _PressableItem = _interopRequireDefault(require("./PressableItem"));
19
-
20
18
  var _jsxRuntime = require("react/jsx-runtime");
21
19
 
22
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -45,48 +43,10 @@ const StyledItemContainer = /*#__PURE__*/_styledComponents.default.li.withConfig
45
43
  }
46
44
  });
47
45
 
48
- const getSelectedItemStyles = _ref2 => {
49
- let {
50
- tokens
51
- } = _ref2;
52
- return {
53
- display: tokens.itemDisplay,
54
- fontFamily: `${tokens.itemFontName}${tokens.itemFontWeight}normal`,
55
- fontSize: tokens.itemFontSize,
56
- paddingTop: tokens.itemPaddingTop,
57
- paddingBottom: tokens.itemPaddingBottom,
58
- paddingLeft: tokens.itemPaddingLeft,
59
- paddingRight: tokens.itemPaddingRight,
60
- color: tokens.itemColor,
61
- textDecoration: tokens.itemTextDecoration,
62
- backgroundColor: tokens.itemBackgroundColor,
63
- outline: tokens.itemOutline,
64
- borderWidth: tokens.itemBorderWidth,
65
- width: '100%'
66
- };
67
- };
68
-
69
- const SelectedItem = /*#__PURE__*/_styledComponents.default.div.withConfig({
70
- displayName: "ListboxItem__SelectedItem",
71
- componentId: "components-web__sc-tlroet-1"
72
- })(_ref3 => {
73
- let {
74
- isChild,
75
- tokens
76
- } = _ref3;
77
- return { ...getSelectedItemStyles({
78
- tokens
79
- }),
80
- borderLeft: isChild ? `${tokens.itemBorderLeftWidth}px solid ${tokens.itemBorderLeftColor}` : 'none'
81
- };
82
- });
83
-
84
- const ListboxItem = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
46
+ const ListboxItem = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) => {
85
47
  let {
86
48
  href,
87
49
  label,
88
- onPress,
89
- selected = false,
90
50
  isChild = false,
91
51
  onBlur,
92
52
  nextItemRef,
@@ -95,21 +55,22 @@ const ListboxItem = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
95
55
  variant = {},
96
56
  LinkRouter,
97
57
  linkRouterProps,
58
+ id,
59
+ onPress = () => {},
60
+ ...rest
61
+ } = _ref2;
62
+ const selectedProps = selectProps({
63
+ href,
98
64
  ...rest
99
- } = _ref4;
100
- const selectedProps = selectProps(rest);
101
- const systemTokens = (0, _componentsBase.useThemeTokens)('ListBox', tokens, variant, {
65
+ });
66
+ const getTokens = (0, _componentsBase.useThemeTokensCallback)('Listbox', tokens, variant, {
102
67
  isChild
103
68
  });
104
69
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledItemContainer, {
105
70
  isChild: isChild,
106
71
  ...selectedProps,
107
72
  role: "option",
108
- children: selected ? /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectedItem, {
109
- isChild: isChild,
110
- tokens: systemTokens,
111
- children: label
112
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_PressableItem.default, {
73
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.PressableItem, {
113
74
  href: href,
114
75
  isChild: isChild,
115
76
  onPress: onPress,
@@ -117,6 +78,9 @@ const ListboxItem = /*#__PURE__*/(0, _react.forwardRef)((_ref4, ref) => {
117
78
  nextItemRef: nextItemRef,
118
79
  prevItemRef: prevItemRef,
119
80
  ref: ref,
81
+ tokens: getTokens,
82
+ selectedProps: selectedProps,
83
+ id: id,
120
84
  children: label
121
85
  })
122
86
  });
@@ -129,8 +93,7 @@ ListboxItem.propTypes = { ...selectedSystemPropTypes,
129
93
  label: _propTypes.default.node.isRequired,
130
94
  nextItemRef: _propTypes.default.object,
131
95
  prevItemRef: _propTypes.default.object,
132
- onPress: _propTypes.default.func,
133
- selected: _propTypes.default.bool
96
+ onPress: _propTypes.default.func
134
97
  };
135
98
 
136
99
  var _default = (0, _componentsBase.withLinkRouter)(ListboxItem);
@@ -52,7 +52,7 @@ const DropdownOverlay = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
52
52
  minWidth,
53
53
  onLayout
54
54
  } = _ref;
55
- const systemTokens = (0, _componentsBase.useThemeTokens)('ListBox', {}, {});
55
+ const systemTokens = (0, _componentsBase.useThemeTokens)('Listbox', {}, {});
56
56
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_WebPortal.default, {
57
57
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
58
58
  ref: ref,
@@ -316,7 +316,12 @@ PriceLockup.propTypes = { ...selectedSystemPropTypes,
316
316
  *
317
317
  * **Note:** a11yText will override strikethrough price, so it must include price (ie. "was 50 dollars per month")
318
318
  */
319
- a11yText: _propTypes.default.string
319
+ a11yText: _propTypes.default.string,
320
+
321
+ /**
322
+ * `PriceLockup` tokens
323
+ */
324
+ tokens: (0, _componentsBase.getTokensPropType)('PriceLockup')
320
325
  };
321
326
  var _default = PriceLockup;
322
327
  exports.default = _default;
@@ -57,13 +57,14 @@ const StyledControlBar = /*#__PURE__*/_styledComponents.default.div.withConfig({
57
57
  componentId: "components-web__sc-13y61ky-1"
58
58
  })(_ref2 => {
59
59
  let {
60
- padding
60
+ padding,
61
+ height
61
62
  } = _ref2;
62
63
  return {
63
64
  boxSizing: 'border-box',
64
65
  position: 'absolute',
65
66
  width: '100%',
66
- height: 56,
67
+ height,
67
68
  padding,
68
69
  bottom: 0,
69
70
  backgroundColor: 'rgba(42, 44, 46, 0.85)',
@@ -141,21 +142,23 @@ const ControlBar = _ref4 => {
141
142
  variant,
142
143
  ...rest
143
144
  } = _ref4;
145
+ const viewport = (0, _componentsBase.useViewport)();
144
146
  const {
145
147
  paddingTop,
146
148
  paddingBottom,
147
- paddingLeft: paddingLeftDefault,
148
- paddingRight: paddingRightDefault,
149
- paddingLeftCompactMode,
150
- paddingRightCompactMode,
149
+ paddingLeft,
150
+ paddingRight,
151
151
  menuBottom,
152
152
  menuRight,
153
153
  menuMarginLeft,
154
154
  captionsIcon,
155
155
  settingsIcon,
156
156
  minimizeIcon,
157
- maximizeIcon
158
- } = (0, _componentsBase.useThemeTokens)('VideoControlBar', tokens, variant);
157
+ maximizeIcon,
158
+ height
159
+ } = (0, _componentsBase.useThemeTokens)('VideoControlBar', tokens, variant, {
160
+ viewport
161
+ });
159
162
 
160
163
  const parseVideoQuality = () => {
161
164
  return sources.map(source => {
@@ -184,8 +187,6 @@ const ControlBar = _ref4 => {
184
187
  return parsed;
185
188
  };
186
189
 
187
- const paddingLeft = videoPlayerWidth > compactModeThreshold ? paddingLeftDefault : paddingLeftCompactMode;
188
- const paddingRight = videoPlayerWidth > compactModeThreshold ? paddingRightDefault : paddingRightCompactMode;
189
190
  const menuContainerStyleProps = {
190
191
  menuBottom,
191
192
  menuRight,
@@ -197,10 +198,12 @@ const ControlBar = _ref4 => {
197
198
  ...selectProps(rest),
198
199
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledControlBar, {
199
200
  padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
201
+ height: `${height}px`,
200
202
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(VideoProgressBarContainer, {
201
203
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoProgressBar.default, {
202
204
  copy: copy,
203
205
  videoPlayer: videoPlayer,
206
+ playing: videoPlaying,
204
207
  videoLength: videoLength,
205
208
  videoCurrentTime: videoCurrentTime,
206
209
  videoBufferEnd: videoBufferEnd,
@@ -140,6 +140,7 @@ const VideoProgressBar = _ref5 => {
140
140
  videoLength,
141
141
  videoCurrentTime,
142
142
  videoBufferEnd,
143
+ playing,
143
144
  setSeek,
144
145
  resetInactivityTimer,
145
146
  tokens,
@@ -155,7 +156,9 @@ const VideoProgressBar = _ref5 => {
155
156
  trackGradientStart,
156
157
  trackGradientEnd,
157
158
  rangeBackground
158
- } = (0, _componentsBase.useThemeTokens)('VideoProgressBar', tokens, variant);
159
+ } = (0, _componentsBase.useThemeTokens)('VideoProgressBar', tokens, variant, {
160
+ playing
161
+ });
159
162
 
160
163
  const videoProgressBar = /*#__PURE__*/_react.default.createRef();
161
164
 
@@ -112,7 +112,7 @@ const VideoPicker = _ref6 => {
112
112
  setCurrentVideoId(selectedVideo);
113
113
  }, [selectedVideo]); // `frame` variant should only work on larger screens
114
114
 
115
- const isFramed = frame && [_systemConstants.viewports.md, _systemConstants.viewports.lg, _systemConstants.viewports.xl].includes(viewport);
115
+ const isFramed = frame && [_systemConstants.viewports.lg, _systemConstants.viewports.xl].includes(viewport);
116
116
  const hasSlider = !frame && [_systemConstants.viewports.md, _systemConstants.viewports.lg, _systemConstants.viewports.xl].includes(viewport);
117
117
  const listElements = videoList.map((video, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoPickerThumbnail.default, {
118
118
  video: video,
@@ -174,14 +174,25 @@ const selectButtonContentTokens = _ref14 => {
174
174
  };
175
175
  };
176
176
 
177
- const SplashButtonWithDetails = _ref15 => {
177
+ const getLabelTokens = _ref15 => {
178
+ let {
179
+ labelFontName: fontName,
180
+ labelFontWeight: fontWeight
181
+ } = _ref15;
182
+ return {
183
+ fontName,
184
+ fontWeight
185
+ };
186
+ };
187
+
188
+ const SplashButtonWithDetails = _ref16 => {
178
189
  let {
179
190
  label,
180
191
  tokens,
181
192
  variant,
182
193
  copy,
183
194
  videoLength
184
- } = _ref15;
195
+ } = _ref16;
185
196
  const {
186
197
  buttonContentChildrenBackground
187
198
  } = (0, _componentsBase.useThemeTokens)('SplashButtonWithDetails', tokens, variant, {
@@ -208,6 +219,7 @@ const SplashButtonWithDetails = _ref15 => {
208
219
  variant: {
209
220
  bold: true
210
221
  },
222
+ tokens: getLabelTokens(themeTokens),
211
223
  children: label
212
224
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
213
225
  variant: {
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "deprecate", {
12
12
  Object.defineProperty(exports, "htmlAttrs", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _htmlAttrs.default;
15
+ return _componentsBase.htmlAttrs;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "media", {
@@ -58,14 +58,14 @@ Object.defineProperty(exports, "warn", {
58
58
  }
59
59
  });
60
60
 
61
+ var _componentsBase = require("@telus-uds/components-base");
62
+
61
63
  var _logger = require("./logger");
62
64
 
63
65
  var _transforms = require("./transforms");
64
66
 
65
67
  var _useTypographyTheme = _interopRequireDefault(require("./useTypographyTheme"));
66
68
 
67
- var _htmlAttrs = _interopRequireDefault(require("./htmlAttrs"));
68
-
69
69
  var _media = _interopRequireDefault(require("./media"));
70
70
 
71
71
  var _ssr = _interopRequireDefault(require("./ssr"));
@@ -124,7 +124,10 @@ const BlockQuote = _ref8 => {
124
124
  return /*#__PURE__*/_jsx(Typography, {
125
125
  tokens: {
126
126
  color,
127
- fontWeight: '500'
127
+ fontName: linkFontName,
128
+ fontSize: linkFontSize,
129
+ fontWeight: linkFontWeight,
130
+ lineHeight: linkLineHeight
128
131
  },
129
132
  children: link
130
133
  });
@@ -12,6 +12,7 @@ const selectCardBaseTokens = _ref => {
12
12
  let {
13
13
  backgroundColor,
14
14
  borderColor,
15
+ gradient,
15
16
  borderWidth,
16
17
  borderRadius,
17
18
  shadow,
@@ -20,6 +21,7 @@ const selectCardBaseTokens = _ref => {
20
21
  return {
21
22
  backgroundColor,
22
23
  borderColor,
24
+ gradient,
23
25
  borderWidth,
24
26
  borderRadius,
25
27
  shadow,
@@ -99,6 +99,7 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
99
99
  tokens,
100
100
  variant = {},
101
101
  validation,
102
+ disabled,
102
103
  ...rest
103
104
  } = _ref;
104
105
  const [inputDate, setInputDate] = useState(date instanceof moment ? date : undefined);
@@ -123,21 +124,23 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
123
124
  };
124
125
 
125
126
  const handleFocus = event => {
126
- if (event.target.tagName === 'INPUT') {
127
+ if (event.target.tagName === 'INPUT' && !disabled) {
127
128
  setIsFocused(true);
128
129
  }
129
130
  };
130
131
 
131
132
  const handleMouseDown = event => {
132
- if (event.target.tagName === 'INPUT') {
133
- setIsClickedInside(true);
134
- setIsFocused(true);
135
- } else if (event.target.tagName === 'path') {
136
- // needed to handle the case where the user clicks on the tooltip icon
137
- setIsClickedInside(true);
138
- event.stopPropagation();
139
- } else {
140
- event.stopPropagation();
133
+ if (!disabled) {
134
+ if (event.target.tagName === 'INPUT') {
135
+ setIsClickedInside(true);
136
+ setIsFocused(true);
137
+ } else if (event.target.tagName === 'path') {
138
+ // needed to handle the case where the user clicks on the tooltip icon
139
+ setIsClickedInside(true);
140
+ event.stopPropagation();
141
+ } else {
142
+ event.stopPropagation();
143
+ }
141
144
  }
142
145
  };
143
146
 
@@ -280,8 +283,10 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
280
283
  label: ((_dictionary$copy = dictionary[copy]) === null || _dictionary$copy === void 0 ? void 0 : _dictionary$copy.roleDescription) ?? label,
281
284
  value: inputText,
282
285
  validation: validation,
286
+ inactive: disabled,
283
287
  children: /*#__PURE__*/_jsx(SingleDatePicker, {
284
288
  date: inputDate,
289
+ disabled: disabled,
285
290
  onDateChange: onChange,
286
291
  focused: isFocused,
287
292
  onFocusChange: onFocusChange,
@@ -378,7 +383,12 @@ DatePicker.propTypes = { ...selectedSystemPropTypes,
378
383
  /**
379
384
  * Use to visually mark an input as valid or invalid.
380
385
  */
381
- validation: PropTypes.oneOf(['error', 'success'])
386
+ validation: PropTypes.oneOf(['error', 'success']),
387
+
388
+ /**
389
+ * Disable the input which will not open the calendar picker
390
+ */
391
+ disabled: PropTypes.bool
382
392
  };
383
393
  DatePicker.defaultProps = {
384
394
  copy: 'en',
@@ -391,6 +401,7 @@ DatePicker.defaultProps = {
391
401
  hintPosition: 'inline',
392
402
  tooltip: undefined,
393
403
  onDateChange: () => {},
394
- validation: undefined
404
+ validation: undefined,
405
+ disabled: false
395
406
  };
396
407
  export default DatePicker;
@@ -1,6 +1,6 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { ExpandCollapse, useThemeTokens } from '@telus-uds/components-base';
3
+ import { ExpandCollapse } from '@telus-uds/components-base';
4
4
  import ExpandCollapseMiniControl from './ExpandCollapseMiniControl';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
@@ -10,12 +10,6 @@ const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
10
10
  tokens,
11
11
  ...rest
12
12
  } = _ref;
13
- const {
14
- variant
15
- } = rest;
16
- const {
17
- borderWidth
18
- } = useThemeTokens('ExpandCollapseMini', tokens, variant);
19
13
 
20
14
  const handleChange = (openPanels, event) => {
21
15
  if (typeof onToggle === 'function') {
@@ -25,9 +19,6 @@ const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
25
19
  };
26
20
 
27
21
  return /*#__PURE__*/_jsx(ExpandCollapse, {
28
- tokens: {
29
- borderWidth
30
- },
31
22
  onChange: handleChange,
32
23
  children: expandProps => /*#__PURE__*/_jsx(ExpandCollapse.Panel, { ...expandProps,
33
24
  panelId: "ExpandCollapseMiniPanel",
@@ -35,7 +26,11 @@ const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
35
26
  mini: true
36
27
  },
37
28
  controlTokens: {
38
- icon: null
29
+ // Remove unwanted look and feel from ExpandCollapse(background pressed, focus border and text underline)
30
+ icon: null,
31
+ borderColor: 'transparent',
32
+ textLine: 'none',
33
+ backgroundColor: 'transparent'
39
34
  } // TODO refactor
40
35
  // eslint-disable-next-line react/no-unstable-nested-components
41
36
  ,
@@ -15,7 +15,22 @@ const presentationOnly = {
15
15
 
16
16
  };
17
17
 
18
- const ExpandCollapseMiniControl = _ref => {
18
+ const selectLinkTokens = _ref => {
19
+ let {
20
+ color,
21
+ textLine,
22
+ lineHeight,
23
+ fontSize
24
+ } = _ref;
25
+ return {
26
+ color,
27
+ textLine,
28
+ blockLineHeight: lineHeight,
29
+ blockFontSize: fontSize
30
+ };
31
+ };
32
+
33
+ const ExpandCollapseMiniControl = _ref2 => {
19
34
  let {
20
35
  pressableState,
21
36
  collapseTitle,
@@ -24,16 +39,25 @@ const ExpandCollapseMiniControl = _ref => {
24
39
  tokens,
25
40
  variant = {},
26
41
  ...rest
27
- } = _ref;
42
+ } = _ref2;
28
43
  const {
29
44
  expanded,
30
- hover
31
- } = pressableState || {};
45
+ hover,
46
+ focus
47
+ } = pressableState || {}; // we only want focus outline when focusing, if user is pressing we don't want the border.
48
+
49
+ const {
50
+ outerBorderColor
51
+ } = useThemeTokens('Link', {}, {}, {
52
+ focus
53
+ });
32
54
  const {
33
55
  size,
34
- icon
56
+ icon,
57
+ ...themeTokens
35
58
  } = useThemeTokens('ExpandCollapseMiniControl', tokens, variant, {
36
- expanded
59
+ expanded,
60
+ focus
37
61
  }); // Choose hover styles when any part of Control is hoverred
38
62
 
39
63
  const appearance = { ...variant,
@@ -61,7 +85,8 @@ const ExpandCollapseMiniControl = _ref => {
61
85
  icon: icon,
62
86
  iconPosition: iconPosition,
63
87
  tokens: linkState => ({ ...getTokens(linkState),
64
- outerBorderWidth: 0
88
+ ...selectLinkTokens(themeTokens),
89
+ outerBorderColor
65
90
  }),
66
91
  ...presentationOnly,
67
92
  ...selectProps(rest),
@@ -122,7 +122,6 @@ FootnoteLink.propTypes = { ...selectedSystemPropTypes,
122
122
  fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
123
123
  };
124
124
  FootnoteLink.defaultProps = {
125
- copy: 'en',
126
- fontSize: 'smaller'
125
+ copy: 'en'
127
126
  };
128
127
  export default FootnoteLink;