@telus-uds/components-web 2.11.0 → 2.13.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 (65) hide show
  1. package/CHANGELOG.md +38 -2
  2. package/component-docs.json +123 -35
  3. package/lib/Autocomplete/Loading.js +5 -10
  4. package/lib/Autocomplete/dictionary.js +2 -2
  5. package/lib/Card/Card.js +2 -0
  6. package/lib/DatePicker/DatePicker.js +6 -0
  7. package/lib/ExpandCollapseMini/ExpandCollapseMini.js +5 -10
  8. package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +32 -7
  9. package/lib/Footnote/FootnoteLink.js +1 -2
  10. package/lib/NavigationBar/NavigationSubMenu.js +4 -8
  11. package/lib/PriceLockup/PriceLockup.js +6 -1
  12. package/lib/Spinner/Spinner.js +10 -1
  13. package/lib/Spinner/SpinnerContent.js +8 -0
  14. package/lib/Table/Cell.js +62 -91
  15. package/lib/Table/Header.js +4 -1
  16. package/lib/Table/SubHeading.js +4 -1
  17. package/lib/Table/Table.js +2 -1
  18. package/lib/TermsAndConditions/ExpandCollapse.js +31 -13
  19. package/lib/TermsAndConditions/TermsAndConditions.js +21 -6
  20. package/lib/VideoPicker/VideoPickerPlayer.js +4 -2
  21. package/lib/VideoPicker/VideoPickerThumbnail.js +103 -60
  22. package/lib/VideoPicker/VideoSlider.js +2 -2
  23. package/lib-module/Autocomplete/Loading.js +6 -12
  24. package/lib-module/Autocomplete/dictionary.js +2 -2
  25. package/lib-module/Card/Card.js +2 -0
  26. package/lib-module/DatePicker/DatePicker.js +7 -1
  27. package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +6 -11
  28. package/lib-module/ExpandCollapseMini/ExpandCollapseMiniControl.js +32 -7
  29. package/lib-module/Footnote/FootnoteLink.js +1 -2
  30. package/lib-module/NavigationBar/NavigationSubMenu.js +5 -9
  31. package/lib-module/PriceLockup/PriceLockup.js +7 -2
  32. package/lib-module/Spinner/Spinner.js +10 -1
  33. package/lib-module/Spinner/SpinnerContent.js +8 -0
  34. package/lib-module/Table/Cell.js +65 -90
  35. package/lib-module/Table/Header.js +4 -1
  36. package/lib-module/Table/SubHeading.js +4 -1
  37. package/lib-module/Table/Table.js +2 -1
  38. package/lib-module/TermsAndConditions/ExpandCollapse.js +33 -15
  39. package/lib-module/TermsAndConditions/TermsAndConditions.js +22 -7
  40. package/lib-module/VideoPicker/VideoPickerPlayer.js +4 -2
  41. package/lib-module/VideoPicker/VideoPickerThumbnail.js +103 -61
  42. package/lib-module/VideoPicker/VideoSlider.js +2 -2
  43. package/package.json +3 -3
  44. package/src/Autocomplete/Loading.jsx +2 -5
  45. package/src/Autocomplete/dictionary.js +2 -2
  46. package/src/Card/Card.jsx +12 -8
  47. package/src/DatePicker/DatePicker.jsx +8 -1
  48. package/src/ExpandCollapseMini/ExpandCollapseMini.jsx +9 -6
  49. package/src/ExpandCollapseMini/ExpandCollapseMiniControl.jsx +21 -4
  50. package/src/Footnote/FootnoteLink.jsx +1 -2
  51. package/src/NavigationBar/NavigationSubMenu.jsx +3 -4
  52. package/src/PriceLockup/PriceLockup.jsx +7 -2
  53. package/src/Spinner/Spinner.jsx +9 -1
  54. package/src/Spinner/SpinnerContent.jsx +13 -1
  55. package/src/Table/Cell.jsx +58 -78
  56. package/src/Table/Header.jsx +6 -1
  57. package/src/Table/SubHeading.jsx +4 -1
  58. package/src/Table/Table.jsx +10 -2
  59. package/src/TermsAndConditions/ExpandCollapse.jsx +36 -14
  60. package/src/TermsAndConditions/TermsAndConditions.jsx +18 -6
  61. package/src/VideoPicker/VideoPickerPlayer.jsx +2 -2
  62. package/src/VideoPicker/VideoPickerThumbnail.jsx +51 -30
  63. package/src/VideoPicker/VideoSlider.jsx +2 -2
  64. package/types/BaseProvider.d.ts +25 -0
  65. package/types/index.d.ts +1 -1
package/lib/Table/Cell.js CHANGED
@@ -23,94 +23,77 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- const stickyStyles = /*#__PURE__*/(0, _styledComponents.css)(["position:sticky;left:0;z-index:2;clip-path:inset(0 -8px 0 0);&::before{content:'';box-shadow:", ";position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;}"], _ref => {
26
+ const HEADER_TYPE = {
27
+ HEADING: 'heading',
28
+ SUBHEADING: 'subHeading',
29
+ ROWHEADING: 'rowHeading'
30
+ };
31
+
32
+ const stickyStyles = _ref => {
27
33
  let {
28
- cellStickyShadow
34
+ cellStickyShadow,
35
+ stickyBackgroundColor,
36
+ type
29
37
  } = _ref;
30
- return cellStickyShadow;
31
- });
38
+ return (0, _styledComponents.css)(["position:sticky;left:0;z-index:2;clip-path:inset(0 -8px 0 0);", " &::before{content:'';box-shadow:", ";position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;}"], type !== HEADER_TYPE.SUBHEADING && type !== HEADER_TYPE.HEADING ? `background-color: ${stickyBackgroundColor};` : undefined, cellStickyShadow);
39
+ };
40
+
32
41
  const sharedStyles = /*#__PURE__*/(0, _styledComponents.css)(["", ""], _ref2 => {
33
42
  let {
34
43
  isSticky,
35
- cellBoxShadowColor,
36
44
  align,
37
45
  cellPaddingTop,
38
46
  cellPaddingRight,
39
47
  cellPaddingBottom,
40
48
  cellPaddingLeft,
41
- cellMinWidth
49
+ cellMinWidth,
50
+ cellBackground,
51
+ cellStickyShadow,
52
+ stickyBackgroundColor,
53
+ type
42
54
  } = _ref2;
43
- return (0, _styledComponents.css)(["", ";box-shadow:inset 0 -1px 0 ", ";text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;"], isSticky ? stickyStyles : undefined, cellBoxShadowColor, align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft);
55
+ return (0, _styledComponents.css)(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";"], align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft, cellBackground, isSticky && stickyStyles({
56
+ type,
57
+ cellStickyShadow,
58
+ stickyBackgroundColor
59
+ }));
44
60
  });
45
61
 
46
- const StyledHeading = /*#__PURE__*/_styledComponents.default.th.withConfig({
47
- displayName: "Cell__StyledHeading",
62
+ const createStyledCell = htmlElement => _styledComponents.default[htmlElement].withConfig({
63
+ displayName: "Cell__createStyledCell",
48
64
  componentId: "components-web__sc-ltgfic-0"
49
- })(["", ";", ""], sharedStyles, _ref3 => {
65
+ })(["", ";box-shadow:", ";"], sharedStyles, _ref3 => {
50
66
  let {
51
- cellHeadingBackground,
52
- cellHeadingBoxShadowColor
67
+ cellBoxShadowColor,
68
+ type
53
69
  } = _ref3;
54
- return `
55
- background-color: ${cellHeadingBackground};
56
- box-shadow: inset 0 1px 0 ${cellHeadingBoxShadowColor}, inset 0 -1px 0 ${cellHeadingBoxShadowColor};`;
70
+ return type === HEADER_TYPE.HEADING ? `inset 0 1px 0 ${cellBoxShadowColor}, inset 0 -1px 0 ${cellBoxShadowColor}` : `inset 0 1px 0 ${cellBoxShadowColor}`;
57
71
  });
58
72
 
59
- const StyledSubHeading = /*#__PURE__*/_styledComponents.default.th.withConfig({
60
- displayName: "Cell__StyledSubHeading",
61
- componentId: "components-web__sc-ltgfic-1"
62
- })(["", ";background-color:", ";"], sharedStyles, _ref4 => {
63
- let {
64
- cellSubheadingBackground
65
- } = _ref4;
66
- return cellSubheadingBackground;
67
- });
73
+ const StyledHeaderCell = createStyledCell('th');
74
+ const StyledDataCell = createStyledCell('td');
68
75
 
69
- const StyledCell = /*#__PURE__*/_styledComponents.default.td.withConfig({
70
- displayName: "Cell__StyledCell",
71
- componentId: "components-web__sc-ltgfic-2"
72
- })(["", ";background-color:", ";"], sharedStyles, _ref5 => {
73
- let {
74
- cellBackground
75
- } = _ref5;
76
- return cellBackground;
77
- });
78
-
79
- const StyledRowHeading = /*#__PURE__*/_styledComponents.default.th.withConfig({
80
- displayName: "Cell__StyledRowHeading",
81
- componentId: "components-web__sc-ltgfic-3"
82
- })(["", ";background-color:", ";"], sharedStyles, _ref6 => {
83
- let {
84
- cellRowHeadingBackground
85
- } = _ref6;
86
- return cellRowHeadingBackground;
87
- });
88
-
89
- const Cell = _ref7 => {
76
+ const Cell = _ref4 => {
90
77
  let {
91
78
  children,
92
- type = 'default',
93
79
  isFirstInRow,
94
80
  align = 'left',
95
- tokens: cellTokens
96
- } = _ref7;
81
+ tokens: cellTokens,
82
+ type
83
+ } = _ref4;
97
84
  const {
98
85
  text,
99
86
  isScrollable: isTableScrollable,
100
- variant,
101
- tokens: tableTokens
87
+ tokens: tableTokens,
88
+ spacing
102
89
  } = (0, _Table.useTableContext)();
103
90
  const themeTokens = { ...tableTokens,
104
91
  ...cellTokens
105
92
  };
106
93
  const {
107
94
  cellMinWidth,
108
- cellHeadingBackground,
109
- cellHeadingBoxShadowColor,
110
95
  cellBoxShadowColor,
111
- cellSubheadingBackground,
112
96
  cellBackground,
113
- cellRowHeadingBackground,
114
97
  cellStickyShadow,
115
98
  cellPaddingTop,
116
99
  cellPaddingRight,
@@ -118,80 +101,72 @@ const Cell = _ref7 => {
118
101
  cellPaddingBottom,
119
102
  fontName,
120
103
  fontWeight,
121
- fontSize
122
- } = (0, _componentsBase.useThemeTokens)('Table', themeTokens, variant);
104
+ fontSize,
105
+ lineHeight,
106
+ stickyBackgroundColor
107
+ } = (0, _componentsBase.useThemeTokens)('Table', themeTokens, {
108
+ spacing,
109
+ type,
110
+ text
111
+ });
123
112
  const sharedProps = {
124
113
  align,
125
114
  isSticky: isTableScrollable && isFirstInRow,
115
+ cellBackground,
126
116
  cellMinWidth,
127
- cellStickyShadow,
117
+ cellStickyShadow: (0, _componentsBase.applyShadowToken)(cellStickyShadow).boxShadow,
128
118
  cellPaddingTop,
129
119
  cellPaddingRight,
130
120
  cellPaddingLeft,
131
121
  cellPaddingBottom,
122
+ stickyBackgroundColor,
132
123
  cellBoxShadowColor
133
124
  };
134
125
  const typographyTokens = {
135
126
  fontName,
136
127
  fontWeight,
137
- fontSize
128
+ fontSize,
129
+ lineHeight
138
130
  };
139
131
 
140
132
  switch (type) {
141
- case 'heading':
142
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledHeading, {
133
+ case HEADER_TYPE.HEADING:
134
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledHeaderCell, {
143
135
  scope: "col",
144
- cellHeadingBackground: cellHeadingBackground,
145
- cellHeadingBoxShadowColor: cellHeadingBoxShadowColor,
146
136
  ...sharedProps,
137
+ type: type,
147
138
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
148
139
  tokens: typographyTokens,
149
- variant: {
150
- size: 'h4'
151
- },
152
140
  children: children
153
141
  })
154
142
  });
155
143
 
156
- case 'subHeading':
157
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledSubHeading, {
144
+ case HEADER_TYPE.SUBHEADING:
145
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledHeaderCell, {
158
146
  scope: "col",
159
- cellSubheadingBackground: cellSubheadingBackground,
160
147
  ...sharedProps,
148
+ type: type,
161
149
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
162
150
  tokens: typographyTokens,
163
- variant: {
164
- size: 'h5'
165
- },
166
151
  children: children
167
152
  })
168
153
  });
169
154
 
170
- case 'rowHeading':
171
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledRowHeading, {
155
+ case HEADER_TYPE.ROWHEADING:
156
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledHeaderCell, {
172
157
  scope: "row",
173
- cellRowHeadingBackground: cellRowHeadingBackground,
174
158
  ...sharedProps,
159
+ type: type,
175
160
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
176
161
  tokens: typographyTokens,
177
- variant: {
178
- size: text === 'small' ? 'h5' : 'h4'
179
- },
180
162
  children: children
181
163
  })
182
164
  });
183
165
 
184
166
  default:
185
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledCell, {
186
- cellBackground: cellBackground,
187
- ...sharedProps,
167
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDataCell, { ...sharedProps,
188
168
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
189
- tokens: {
190
- fontSize
191
- },
192
- variant: {
193
- size: text
194
- },
169
+ tokens: typographyTokens,
195
170
  children: children
196
171
  })
197
172
  });
@@ -199,14 +174,10 @@ const Cell = _ref7 => {
199
174
  };
200
175
 
201
176
  Cell.propTypes = {
177
+ type: _propTypes.default.oneOf(['default', 'heading', 'subHeading', 'rowHeading']),
202
178
  tokens: _propTypes.default.object,
203
179
  children: _propTypes.default.node,
204
180
 
205
- /**
206
- * Defines the visual styles of a cell, and whether it should be a `td` or `th` element
207
- */
208
- type: _propTypes.default.oneOf(['default', 'heading', 'subHeading', 'rowHeading']),
209
-
210
181
  /**
211
182
  * @ignore
212
183
  * Used internally for making the first column sticky
@@ -25,7 +25,10 @@ const Header = _ref => {
25
25
  } = _ref;
26
26
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("thead", {
27
27
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Row.default, {
28
- children: _react.default.Children.map(children, child => /*#__PURE__*/(0, _react.cloneElement)(child, {
28
+ children: _react.default.Children.map(children, child =>
29
+ /*#__PURE__*/
30
+ // TO DO: pass type as a variant instead of prop
31
+ (0, _react.cloneElement)(child, {
29
32
  type: 'heading'
30
33
  }))
31
34
  })
@@ -24,7 +24,10 @@ const Header = _ref => {
24
24
  children
25
25
  } = _ref;
26
26
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Row.default, {
27
- children: _react.default.Children.map(children, child => /*#__PURE__*/(0, _react.cloneElement)(child, {
27
+ children: _react.default.Children.map(children, child =>
28
+ /*#__PURE__*/
29
+ // TO DO: pass type as a variant instead of prop
30
+ (0, _react.cloneElement)(child, {
28
31
  type: 'subHeading'
29
32
  }))
30
33
  });
@@ -66,6 +66,7 @@ exports.useTableContext = useTableContext;
66
66
  const Table = _ref2 => {
67
67
  let {
68
68
  children,
69
+ spacing = 'default',
69
70
  fullWidth = true,
70
71
  text = 'medium',
71
72
  tokens,
@@ -110,7 +111,7 @@ const Table = _ref2 => {
110
111
  text,
111
112
  isScrollable,
112
113
  tokens,
113
- variant
114
+ spacing
114
115
  },
115
116
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTable, {
116
117
  tableWidth: tableWidth,
@@ -41,12 +41,9 @@ const ExpandCollapseIconContainer = /*#__PURE__*/_styledComponents.default.div.w
41
41
  } = _ref;
42
42
  return {
43
43
  alignItems: tokens.expandIconContainerAlignItems,
44
- border: `${tokens.expandIconContainerBorder}px solid ${tokens.expandIconContainerBorderColor}`,
45
- borderRadius: '50%',
46
- display: 'flex',
47
- height: tokens.expandIconContainerHeight,
48
44
  justifyContent: tokens.expandIconContainerJustifyContent,
49
- margin: `${tokens.expandIconContainerMarginX}px ${tokens.expandIconContainerMarginY}px`,
45
+ marginLeft: `${tokens.expandIconContainerMarginY}px`,
46
+ marginRight: `${tokens.expandIconContainerMarginY}px`,
50
47
  width: tokens.expandIconContainerWidth
51
48
  };
52
49
  });
@@ -60,7 +57,7 @@ const ExpandCollapseTitle = /*#__PURE__*/_styledComponents.default.h4.withConfig
60
57
  } = _ref2;
61
58
  return {
62
59
  color: tokens.expandTitleColor,
63
- fontFamily: `${tokens.listFontName}${tokens.listFontWeight}normal`,
60
+ fontFamily: `${tokens.expandTitleFontName}${tokens.expandTitleFontWeight}normal`,
64
61
  fontSize: tokens.expandTitleFontSize,
65
62
  lineHeight: tokens.expandTitleLineHeight,
66
63
  margin: `${tokens.expandTitleMarginX}px ${tokens.expandTitleMarginY}px`
@@ -79,8 +76,21 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
79
76
  expandContentPaddingBottom,
80
77
  expandContentPaddingLeft,
81
78
  expandContentPaddingRight,
82
- expandContentPaddingTop
79
+ expandContentPaddingTop,
80
+ contentBorderColor,
81
+ contentMarginBottom,
82
+ expandTitlePaddingLeft,
83
+ expandTitleBorder,
84
+ expandTitleBorderColor,
85
+ expandTitleUnderline
83
86
  } = getTokens();
87
+ const [expand, setExpand] = (0, _react.useState)(false);
88
+
89
+ const handleExpandToggle = (expandProps, event, expanded) => {
90
+ expandProps.onToggle('ExpandCollapsePanel', event);
91
+ setExpand(!expanded);
92
+ };
93
+
84
94
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse, {
85
95
  tokens: {
86
96
  borderWidth: expandBaseBorderWidth
@@ -88,7 +98,12 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
88
98
  children: expandProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse.Panel, { ...expandProps,
89
99
  panelId: "ExpandCollapsePanel",
90
100
  controlTokens: {
91
- icon: null
101
+ icon: null,
102
+ backgroundColor: 'transparent',
103
+ paddingLeft: expandTitlePaddingLeft,
104
+ borderColor: expandTitleBorderColor,
105
+ borderWidth: expandTitleBorder,
106
+ textLine: expandTitleUnderline
92
107
  } // TODO refactor
93
108
  // eslint-disable-next-line react/no-unstable-nested-components
94
109
  ,
@@ -102,15 +117,16 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
102
117
  expanded
103
118
  });
104
119
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ExpandCollapseControl, {
105
- onClick: event => expandProps.onToggle('ExpandCollapsePanel', event),
120
+ onClick: event => handleExpandToggle(expandProps, event, expanded),
106
121
  ref: ref,
107
122
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseIconContainer, {
108
123
  tokens: getTokens(),
109
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Icon, {
124
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.IconButton, {
110
125
  icon: icon,
111
126
  variant: {
112
127
  size: 'small'
113
- }
128
+ },
129
+ onClick: event => handleExpandToggle(expandProps, event, expanded)
114
130
  })
115
131
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseTitle, {
116
132
  tokens: getTokens(),
@@ -122,9 +138,11 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
122
138
  contentPaddingBottom: expandContentPaddingBottom,
123
139
  contentPaddingLeft: expandContentPaddingLeft,
124
140
  contentPaddingRight: expandContentPaddingRight,
125
- contentPaddingTop: expandContentPaddingTop
141
+ contentPaddingTop: expandContentPaddingTop,
142
+ borderColor: contentBorderColor,
143
+ marginBottom: contentMarginBottom
126
144
  },
127
- children: children
145
+ children: expand ? children : null
128
146
  })
129
147
  });
130
148
  });
@@ -71,7 +71,8 @@ const Unordered = /*#__PURE__*/_styledComponents.default.ul.withConfig({
71
71
  return {
72
72
  listStyleType: 'none',
73
73
  margin: 0,
74
- padding: tokens.unorderedPadding
74
+ padding: 0,
75
+ paddingTop: tokens.unorderedPadding
75
76
  };
76
77
  });
77
78
 
@@ -140,9 +141,16 @@ const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
140
141
  });
141
142
  const hasIndexedContent = indexedContent.length > 0;
142
143
  const hasNonIndexedContent = nonIndexedContent.length > 0;
143
- const themeTokens = (0, _componentsBase.useThemeTokens)('TermsAndConditions', tokens, variant);
144
+ const viewport = (0, _componentsBase.useViewport)();
145
+ const themeTokens = (0, _componentsBase.useThemeTokens)('TermsAndConditions', tokens, variant, {
146
+ viewport
147
+ });
144
148
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { ...selectProps(rest),
145
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandCollapse.default, {
149
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
150
+ tokens: {
151
+ color: themeTokens.dividerColor
152
+ }
153
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandCollapse.default, {
146
154
  collapseTitle: getCopy('headingView'),
147
155
  expandTitle: getCopy('headingHide'),
148
156
  ref: ref,
@@ -164,8 +172,11 @@ const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
164
172
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
165
173
  block: true,
166
174
  heading: true,
167
- variant: {
168
- size: 'h4'
175
+ tokens: {
176
+ fontName: themeTokens.expandTitleFontName,
177
+ fontWeight: themeTokens.expandTitleFontWeight,
178
+ fontSize: themeTokens.titleFontSize,
179
+ lineHeight: themeTokens.titleLineHeight
169
180
  },
170
181
  children: getCopy('nonIndexedTitle')
171
182
  })
@@ -181,7 +192,11 @@ const TermsAndConditions = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
181
192
  })]
182
193
  })]
183
194
  })
184
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {})]
195
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
196
+ tokens: {
197
+ color: themeTokens.dividerColor
198
+ }
199
+ })]
185
200
  });
186
201
  });
187
202
  TermsAndConditions.displayName = 'TermsAndConditions';
@@ -39,11 +39,13 @@ const VideoPickerPlayer = _ref => {
39
39
  space: 2,
40
40
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
41
41
  variant: {
42
- size: 'h2',
43
- colour: 'secondary'
42
+ size: 'h3'
44
43
  },
45
44
  children: video.title
46
45
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
46
+ variant: {
47
+ colour: 'default'
48
+ },
47
49
  children: video.description
48
50
  })]
49
51
  })]
@@ -61,38 +61,47 @@ const createReactNativeStyles = _ref => {
61
61
  });
62
62
  };
63
63
 
64
- const VideoThumbnail = /*#__PURE__*/_styledComponents.default.div.withConfig({
65
- displayName: "VideoPickerThumbnail__VideoThumbnail",
64
+ const ImageContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
65
+ displayName: "VideoPickerThumbnail__ImageContainer",
66
66
  componentId: "components-web__sc-1glxurq-0"
67
- })(["position:relative;width:", ";flex-shrink:0;* button{display:none;}&::before{content:'';display:block;padding-bottom:56.25%;}&::after{content:'';border:", "px solid;border-color:", ";border-radius:", "px;position:absolute;top:0;left:0;right:0;bottom:0;}& > div{border-radius:", "px;}"], props => props.layout === 'vertical' ? '100%' : '144px', _ref2 => {
67
+ })(["padding:", ";border:", ";border-radius:", "px;"], props => `${props.outerBorderGap}px`, props => `${props.outerBorderWidth}px solid ${props.outerBorderColor}`, _ref2 => {
68
68
  let {
69
- borderWidth
69
+ outerBorderRadius
70
70
  } = _ref2;
71
- return borderWidth;
72
- }, _ref3 => {
71
+ return outerBorderRadius;
72
+ });
73
+
74
+ const VideoThumbnail = /*#__PURE__*/_styledComponents.default.div.withConfig({
75
+ displayName: "VideoPickerThumbnail__VideoThumbnail",
76
+ componentId: "components-web__sc-1glxurq-1"
77
+ })(["position:relative;width:", ";flex-shrink:0;* button{display:none;}&::before{content:'';display:block;padding-bottom:56.25%;}&::after{content:'';border:", "px solid;border-color:", ";border-radius:", "px;position:absolute;top:0;left:0;right:0;bottom:0;}& > div{border-radius:", "px;}"], props => props.layout === 'vertical' ? '100%' : '144px', _ref3 => {
73
78
  let {
74
- isPlaying,
75
- borderColor
79
+ borderWidth
76
80
  } = _ref3;
77
- return isPlaying ? borderColor : 'transparent';
81
+ return borderWidth;
78
82
  }, _ref4 => {
79
83
  let {
80
- borderRadius
84
+ borderColor
81
85
  } = _ref4;
82
- return borderRadius;
86
+ return borderColor;
83
87
  }, _ref5 => {
84
88
  let {
85
89
  borderRadius
86
90
  } = _ref5;
87
91
  return borderRadius;
92
+ }, _ref6 => {
93
+ let {
94
+ borderRadius
95
+ } = _ref6;
96
+ return borderRadius;
88
97
  });
89
98
 
90
99
  const ThumbnailTitleContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
91
100
  displayName: "VideoPickerThumbnail__ThumbnailTitleContainer",
92
- componentId: "components-web__sc-1glxurq-1"
101
+ componentId: "components-web__sc-1glxurq-2"
93
102
  })(["display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;"]);
94
103
 
95
- const VideoPickerThumbnail = _ref6 => {
104
+ const VideoPickerThumbnail = _ref7 => {
96
105
  let {
97
106
  videoPlayerRef,
98
107
  selectedVideoId,
@@ -103,56 +112,59 @@ const VideoPickerThumbnail = _ref6 => {
103
112
  itemPositions,
104
113
  index,
105
114
  width = '100%'
106
- } = _ref6;
115
+ } = _ref7;
107
116
  const viewport = (0, _componentsBase.useViewport)();
108
- const {
109
- titleColor,
110
- subTitleColor,
111
- ...themeTokens
112
- } = (0, _componentsBase.useThemeTokens)('VideoPickerThumbnail');
113
- const rnStyles = createReactNativeStyles(themeTokens);
117
+ const getTokens = (0, _componentsBase.useThemeTokensCallback)('VideoPickerThumbnail', {}, {});
114
118
  const {
115
119
  timestamp
116
120
  } = (0, _helpers.getTimestamp)(video.videoLength, video.copy);
117
121
  const isPlaying = selectedVideoId === video.videoId;
118
122
 
119
- const renderThumbnailImage = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(VideoThumbnail, { ...themeTokens,
120
- isPlaying: isPlaying,
121
- layout: layout,
122
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoSplash.default, {
123
- simpleMode: true,
124
- poster: video.posterSrc || `https://img.youtube.com/vi/${video.videoId}/maxresdefault.jpg`,
125
- videoLength: video.videoLength,
126
- copy: video.copy
127
- })
128
- });
123
+ const renderThumbnailImage = themeTokens => {
124
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(VideoThumbnail, { ...themeTokens,
125
+ isPlaying: isPlaying,
126
+ layout: layout,
127
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoSplash.default, {
128
+ simpleMode: true,
129
+ poster: video.posterSrc || `https://img.youtube.com/vi/${video.videoId}/maxresdefault.jpg`,
130
+ videoLength: video.videoLength,
131
+ copy: video.copy
132
+ })
133
+ });
134
+ };
129
135
 
130
- const renderThumbnailInfo = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
131
- space: 2,
132
- tokens: {
133
- flexShrink: 1
134
- },
135
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ThumbnailTitleContainer, {
136
- viewport: viewport,
137
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
136
+ const renderThumbnailInfo = _ref8 => {
137
+ let {
138
+ titleColor,
139
+ subTitleColor
140
+ } = _ref8;
141
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
142
+ space: 2,
143
+ tokens: {
144
+ flexShrink: 1
145
+ },
146
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ThumbnailTitleContainer, {
147
+ viewport: viewport,
148
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
149
+ variant: {
150
+ bold: true
151
+ },
152
+ tokens: {
153
+ color: titleColor
154
+ },
155
+ children: video.title
156
+ })
157
+ }), viewport !== _systemConstants.viewports.xs && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
138
158
  variant: {
139
- bold: true
159
+ size: 'micro'
140
160
  },
141
161
  tokens: {
142
- color: isPlaying ? titleColor : 'none'
162
+ color: subTitleColor
143
163
  },
144
- children: video.title
145
- })
146
- }), viewport !== _systemConstants.viewports.xs && /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
147
- variant: {
148
- size: 'micro'
149
- },
150
- tokens: {
151
- color: subTitleColor
152
- },
153
- children: timestamp
154
- })]
155
- });
164
+ children: timestamp
165
+ })]
166
+ });
167
+ };
156
168
 
157
169
  const handleLayout = itemPositions !== undefined ? getItemPositionLayoutHandler(itemPositions.positions, index) : undefined;
158
170
 
@@ -175,14 +187,45 @@ const VideoPickerThumbnail = _ref6 => {
175
187
  accessibilityState: {
176
188
  checked: isPlaying
177
189
  },
178
- style: [rnStyles.container, layout === 'horizontal' && rnStyles.horizontal, isFramed && rnStyles.framed, isFramed && index > 0 && rnStyles.framedLine, {
179
- width
180
- }],
181
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
182
- space: layout === 'vertical' ? 2 : 3,
183
- direction: layout === 'vertical' ? 'column' : 'row',
184
- children: [renderThumbnailImage(), renderThumbnailInfo()]
185
- })
190
+ style: _ref9 => {
191
+ let {
192
+ hovered: hover,
193
+ focused: focus,
194
+ pressed
195
+ } = _ref9;
196
+ const themeTokens = getTokens({
197
+ hover,
198
+ focus,
199
+ pressed,
200
+ selected: isPlaying
201
+ });
202
+ const rnStyles = createReactNativeStyles(themeTokens);
203
+ return [rnStyles.container, layout === 'horizontal' && rnStyles.horizontal, isFramed && rnStyles.framed, isFramed && index > 0 && rnStyles.framedLine, {
204
+ width
205
+ }, {
206
+ outline: 'none'
207
+ }];
208
+ },
209
+ children: _ref10 => {
210
+ let {
211
+ hovered: hover,
212
+ focused: focus,
213
+ pressed
214
+ } = _ref10;
215
+ const themeTokens = getTokens({
216
+ hover,
217
+ focus,
218
+ pressed,
219
+ selected: isPlaying
220
+ });
221
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
222
+ space: layout === 'vertical' ? 2 : 3,
223
+ direction: layout === 'vertical' ? 'column' : 'row',
224
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ImageContainer, { ...themeTokens,
225
+ children: renderThumbnailImage(themeTokens)
226
+ }), renderThumbnailInfo(themeTokens)]
227
+ });
228
+ }
186
229
  }, video.videoId);
187
230
  };
188
231