@telus-uds/components-base 1.50.0 → 1.51.1

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 (70) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/component-docs.json +160 -46
  3. package/lib/A11yText/index.js +8 -0
  4. package/lib/Divider/Divider.js +4 -0
  5. package/lib/IconButton/IconButton.js +16 -0
  6. package/lib/Link/ChevronLink.js +4 -0
  7. package/lib/Link/LinkBase.js +1 -1
  8. package/lib/Modal/Modal.js +16 -0
  9. package/lib/MultiSelectFilter/ModalOverlay.js +24 -8
  10. package/lib/MultiSelectFilter/MultiSelectFilter.js +154 -21
  11. package/lib/Pagination/PageButton.js +12 -0
  12. package/lib/Pagination/Pagination.js +12 -0
  13. package/lib/QuickLinks/QuickLinks.js +12 -0
  14. package/lib/QuickLinksFeature/QuickLinksFeatureItem.js +62 -41
  15. package/lib/Responsive/Responsive.js +7 -0
  16. package/lib/Select/Group.js +4 -0
  17. package/lib/Select/Group.native.js +4 -0
  18. package/lib/Select/Item.js +4 -0
  19. package/lib/SideNav/ItemsGroup.js +4 -0
  20. package/lib/SideNav/SideNav.js +8 -0
  21. package/lib/StepTracker/Step.js +35 -14
  22. package/lib/StepTracker/StepTracker.js +21 -2
  23. package/lib/StepTracker/dictionary.js +24 -4
  24. package/lib/Tabs/Tabs.js +20 -0
  25. package/lib-module/A11yText/index.js +8 -0
  26. package/lib-module/Divider/Divider.js +4 -0
  27. package/lib-module/IconButton/IconButton.js +16 -0
  28. package/lib-module/Link/ChevronLink.js +4 -0
  29. package/lib-module/Link/LinkBase.js +1 -1
  30. package/lib-module/Modal/Modal.js +16 -0
  31. package/lib-module/MultiSelectFilter/ModalOverlay.js +25 -9
  32. package/lib-module/MultiSelectFilter/MultiSelectFilter.js +154 -23
  33. package/lib-module/Pagination/PageButton.js +12 -0
  34. package/lib-module/Pagination/Pagination.js +12 -0
  35. package/lib-module/QuickLinks/QuickLinks.js +12 -0
  36. package/lib-module/QuickLinksFeature/QuickLinksFeatureItem.js +64 -43
  37. package/lib-module/Responsive/Responsive.js +7 -0
  38. package/lib-module/Select/Group.js +4 -0
  39. package/lib-module/Select/Group.native.js +4 -0
  40. package/lib-module/Select/Item.js +4 -0
  41. package/lib-module/SideNav/ItemsGroup.js +4 -0
  42. package/lib-module/SideNav/SideNav.js +8 -0
  43. package/lib-module/StepTracker/Step.js +35 -14
  44. package/lib-module/StepTracker/StepTracker.js +21 -2
  45. package/lib-module/StepTracker/dictionary.js +24 -4
  46. package/lib-module/Tabs/Tabs.js +20 -0
  47. package/package.json +2 -2
  48. package/src/A11yText/index.jsx +6 -0
  49. package/src/Divider/Divider.jsx +3 -0
  50. package/src/IconButton/IconButton.jsx +12 -0
  51. package/src/Link/ChevronLink.jsx +3 -0
  52. package/src/Link/LinkBase.jsx +3 -1
  53. package/src/Modal/Modal.jsx +12 -0
  54. package/src/MultiSelectFilter/ModalOverlay.jsx +30 -6
  55. package/src/MultiSelectFilter/MultiSelectFilter.jsx +142 -20
  56. package/src/Pagination/PageButton.jsx +9 -0
  57. package/src/Pagination/Pagination.jsx +9 -0
  58. package/src/QuickLinks/QuickLinks.jsx +9 -0
  59. package/src/QuickLinksFeature/QuickLinksFeatureItem.jsx +42 -35
  60. package/src/Responsive/Responsive.jsx +6 -0
  61. package/src/Select/Group.jsx +3 -0
  62. package/src/Select/Group.native.jsx +3 -0
  63. package/src/Select/Item.jsx +3 -0
  64. package/src/SideNav/ItemsGroup.jsx +3 -0
  65. package/src/SideNav/SideNav.jsx +6 -0
  66. package/src/StepTracker/Step.jsx +34 -10
  67. package/src/StepTracker/StepTracker.jsx +23 -2
  68. package/src/StepTracker/dictionary.js +24 -4
  69. package/src/Tabs/Tabs.jsx +15 -0
  70. package/src/Typography/Typography.jsx +1 -0
@@ -200,9 +200,25 @@ const Modal = /*#__PURE__*/(0, _react.forwardRef)((_ref5, ref) => {
200
200
  Modal.displayName = 'Modal';
201
201
  Modal.propTypes = { ...selectedSystemPropTypes,
202
202
  children: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.arrayOf(_propTypes.default.node)]),
203
+
204
+ /**
205
+ * To define the locale of the copy
206
+ */
203
207
  copy: _utils.copyPropTypes,
208
+
209
+ /**
210
+ * Setting this to `true` will open the `Modal`
211
+ */
204
212
  isOpen: _propTypes.default.bool,
213
+
214
+ /**
215
+ * This function is triggered when the `Modal` is closed
216
+ */
205
217
  onClose: _propTypes.default.func,
218
+
219
+ /**
220
+ * `max-width` is applied to the `Modal` container
221
+ */
206
222
  maxWidth: _propTypes.default.bool,
207
223
  tokens: (0, _utils.getTokensPropType)('Modal'),
208
224
  variant: _utils.variantProp.propType,
@@ -40,7 +40,6 @@ const staticStyles = _StyleSheet.default.create({
40
40
  flex: 1,
41
41
  // Grow to maxWidth when possible, shrink when not possible
42
42
  position: 'absolute',
43
- height: 330,
44
43
  zIndex: 10000 // Position on top of all the other overlays, including backdrops and modals
45
44
 
46
45
  },
@@ -86,6 +85,11 @@ const ModalOverlay = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
86
85
  let {
87
86
  children,
88
87
  isReady = false,
88
+ maxHeight,
89
+ maxHeightSize,
90
+ maxWidthSize,
91
+ minHeight,
92
+ minWidth,
89
93
  overlaidPosition,
90
94
  onLayout,
91
95
  variant,
@@ -98,9 +102,18 @@ const ModalOverlay = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
98
102
  viewport,
99
103
  maxWidth: false
100
104
  });
105
+ const containerWidthHeight = {
106
+ minWidth,
107
+ minHeight,
108
+ ...(tokens.maxWidth && maxWidthSize && {
109
+ maxWidth: maxWidthSize
110
+ }),
111
+ ...(maxHeight && maxHeightSize && {
112
+ maxHeight: maxHeightSize
113
+ })
114
+ };
101
115
  const {
102
- closeIcon: CloseIconComponent,
103
- maxWidth
116
+ closeIcon: CloseIconComponent
104
117
  } = themeTokens;
105
118
  const getCopy = (0, _utils.useCopy)({
106
119
  dictionary: _dictionary.default,
@@ -111,9 +124,7 @@ const ModalOverlay = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
111
124
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
112
125
  ref: ref,
113
126
  onLayout: onLayout,
114
- style: [overlaidPosition, {
115
- minWidth: maxWidth
116
- }, staticStyles.positioner, !isReady && staticStyles.hidden],
127
+ style: [overlaidPosition, containerWidthHeight, staticStyles.positioner, !isReady && staticStyles.hidden],
117
128
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.default, {
118
129
  tokens: selectPaddingContainerStyles(themeTokens),
119
130
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
@@ -122,8 +133,7 @@ const ModalOverlay = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
122
133
  onPress: onClose,
123
134
  icon: CloseIconComponent,
124
135
  accessibilityRole: "button",
125
- accessibilityLabel: closeLabel,
126
- tokens: (0, _utils.selectTokens)('IconButton', themeTokens, 'close')
136
+ accessibilityLabel: closeLabel
127
137
  })
128
138
  }), children]
129
139
  })
@@ -139,6 +149,12 @@ ModalOverlay.propTypes = {
139
149
  left: _propTypes.default.number,
140
150
  width: _propTypes.default.number
141
151
  }),
152
+ minWidth: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
153
+ minHeight: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
154
+ maxHeightSize: _propTypes.default.number,
155
+ maxWidthSize: _propTypes.default.number,
156
+ maxHeight: _propTypes.default.bool,
157
+ maxWidth: _propTypes.default.bool,
142
158
  onLayout: _propTypes.default.func,
143
159
  variant: _utils.variantProp.propType,
144
160
  tokens: (0, _utils.getTokensPropType)('Modal'),
@@ -15,6 +15,8 @@ var _utils = require("../utils");
15
15
 
16
16
  var _dictionary = _interopRequireDefault(require("./dictionary"));
17
17
 
18
+ var _ViewportProvider = require("../ViewportProvider");
19
+
18
20
  var _Box = _interopRequireDefault(require("../Box"));
19
21
 
20
22
  var _Button = require("../Button");
@@ -35,6 +37,8 @@ var _Link = require("../Link");
35
37
 
36
38
  var _ModalOverlay = _interopRequireDefault(require("./ModalOverlay"));
37
39
 
40
+ var _Modal = _interopRequireDefault(require("../Modal"));
41
+
38
42
  var _jsxRuntime = require("react/jsx-runtime");
39
43
 
40
44
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -81,6 +85,7 @@ const MultiSelectFilter = _ref3 => {
81
85
  tokens,
82
86
  items = [],
83
87
  values,
88
+ maxHeight = false,
84
89
  initialValues,
85
90
  maxValues,
86
91
  onChange,
@@ -90,6 +95,7 @@ const MultiSelectFilter = _ref3 => {
90
95
  rowLimit = 12,
91
96
  ...rest
92
97
  } = _ref3;
98
+ const viewport = (0, _ViewportProvider.useViewport)();
93
99
  const {
94
100
  currentValues,
95
101
  setValues
@@ -100,6 +106,9 @@ const MultiSelectFilter = _ref3 => {
100
106
  onChange,
101
107
  readOnly
102
108
  });
109
+ const [isOpen, setIsOpen] = (0, _react.useState)(false);
110
+ const [checkedIds, setCheckedIds] = (0, _react.useState)(currentValues ?? []);
111
+ const [maxWidth, setMaxWidth] = (0, _react.useState)(false);
103
112
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('ButtonDropdown', tokens, variant);
104
113
  const getItemTokens = (0, _ThemeProvider.useThemeTokensCallback)('ButtonDropdown', tokens, variant);
105
114
 
@@ -109,10 +118,34 @@ const MultiSelectFilter = _ref3 => {
109
118
  dictionary: _dictionary.default,
110
119
  copy
111
120
  });
112
- const [isOpen, setIsOpen] = (0, _react.useState)(false);
113
- const [checkedIds, setCheckedIds] = (0, _react.useState)(currentValues ?? []);
114
- const colSize = items.length > rowLimit ? 2 : 1;
121
+ const colSizeNotMobile = items.length > rowLimit ? 2 : 1;
122
+ const colSize = viewport !== 'xs' ? colSizeNotMobile : 1;
123
+ const itemsLengthNotMobile = items.length > 24 ? items.length / 2 : rowLimit;
115
124
  const isSelected = currentValues.length > 0;
125
+ const rowLength = viewport !== 'xs' ? itemsLengthNotMobile : items.length;
126
+ (0, _react.useEffect)(() => {
127
+ if (colSize === 1) return setMaxWidth(false);
128
+ return colSize === 2 && setMaxWidth(true);
129
+ }, [colSize]);
130
+ const {
131
+ headerFontColor,
132
+ headerFontSize,
133
+ buttonDirection,
134
+ headerFontWeight,
135
+ headerLineHeight,
136
+ subHeaderFontWeight,
137
+ subHeaderFontSize,
138
+ maxHeightSize,
139
+ maxWidthSize,
140
+ subHeaderLineHeight,
141
+ minHeight,
142
+ minWidth
143
+ } = (0, _ThemeProvider.useThemeTokens)('MultiSelectFilter', tokens, { ...variant,
144
+ maxHeight,
145
+ maxWidth
146
+ }, {
147
+ viewport
148
+ });
116
149
  const uniqueFields = ['id', 'label'];
117
150
 
118
151
  if (!(0, _utils.containUniqueFields)(items, uniqueFields)) {
@@ -136,6 +169,11 @@ const MultiSelectFilter = _ref3 => {
136
169
  setIsOpen(false);
137
170
  };
138
171
 
172
+ const onClear = () => {
173
+ setCheckedIds(() => []);
174
+ onApply([]);
175
+ };
176
+
139
177
  const {
140
178
  align,
141
179
  offsets
@@ -143,9 +181,7 @@ const MultiSelectFilter = _ref3 => {
143
181
  xs: {
144
182
  align: {
145
183
  top: 'top',
146
- left: 'left',
147
- bottom: 'bottom',
148
- right: 'right'
184
+ left: 'left'
149
185
  }
150
186
  },
151
187
  sm: {
@@ -158,6 +194,16 @@ const MultiSelectFilter = _ref3 => {
158
194
  }
159
195
  }
160
196
  });
197
+ const headerStyles = (0, _ThemeProvider.applyTextStyles)({
198
+ fontSize: headerFontSize,
199
+ fontWeight: headerFontWeight,
200
+ fontColor: headerFontColor
201
+ });
202
+ const subeHeaderStyles = (0, _ThemeProvider.applyTextStyles)({
203
+ fontSize: subHeaderFontSize,
204
+ fontWeight: subHeaderFontWeight,
205
+ fontColor: selectSubTitleTokens(themeTokens)
206
+ });
161
207
  const {
162
208
  overlaidPosition,
163
209
  onTargetLayout,
@@ -178,20 +224,96 @@ const MultiSelectFilter = _ref3 => {
178
224
  onChange: handleChange,
179
225
  tokens: getButtonTokens,
180
226
  inactive: inactive
181
- }, id), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalOverlay.default, {
227
+ }, id), isOpen && viewport === 'xs' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Modal.default, {
228
+ isOpen: isOpen,
229
+ onClose: () => setIsOpen(false),
230
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Row, {
231
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
232
+ tokens: { ...headerStyles,
233
+ lineHeight: headerLineHeight
234
+ },
235
+ children: getCopy('filterByLabel').replace(/%\{filterCategory\}/g, label.toLowerCase())
236
+ })
237
+ }), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
238
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Spacer.default, {
239
+ space: 5
240
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Row, {
241
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
242
+ tokens: { ...subeHeaderStyles,
243
+ lineHeight: subHeaderLineHeight
244
+ },
245
+ children: subtitle
246
+ })
247
+ })]
248
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spacer.default, {
249
+ space: 4
250
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
251
+ scroll: true,
252
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Row, {
253
+ distribute: "between",
254
+ children: [...Array(colSize).keys()].map(i => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Col, {
255
+ xs: 12 / colSize,
256
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.CheckboxGroup, {
257
+ items: items.slice(i * rowLength, (i + 1) * rowLength),
258
+ checkedIds: checkedIds,
259
+ onChange: e => setCheckedIds(e, i)
260
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spacer.default, {
261
+ size: 4
262
+ })]
263
+ }, i))
264
+ })
265
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Divider.default, {
266
+ variant: selectDividerToknes({ ...themeTokens,
267
+ width: 'full'
268
+ }),
269
+ space: 4
270
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Row, {
271
+ horizontalAlign: buttonDirection === 'column' ? 'center' : 'start',
272
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StackView.default, {
273
+ direction: buttonDirection,
274
+ space: 3,
275
+ tokens: {
276
+ alignItems: 'center',
277
+ ...(viewport === 'xs' && {
278
+ flexGrow: 1
279
+ })
280
+ },
281
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
282
+ onPress: () => onApply(checkedIds),
283
+ variant: {
284
+ size: 'small',
285
+ priority: 'high',
286
+ ...(viewport === 'xs' && {
287
+ width: 'full'
288
+ })
289
+ },
290
+ children: getCopy('applyButtonLabel')
291
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
292
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.TextButton, {
293
+ onPress: () => onClear(),
294
+ children: getCopy('clearButtonLabel')
295
+ })
296
+ })]
297
+ })
298
+ })]
299
+ }), isOpen && viewport !== 'xs' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalOverlay.default, {
182
300
  overlaidPosition: overlaidPosition,
183
- variant: {
184
- width: colSize > 1 ? 'size576' : 's'
185
- },
186
301
  onClose: () => setIsOpen(false),
187
- tokens: tokens,
302
+ maxHeight: maxHeight,
303
+ maxHeightSize: maxHeightSize,
304
+ maxWidthSize: maxWidthSize,
305
+ minHeight: minHeight,
306
+ minWidth: minWidth,
307
+ tokens: { ...tokens,
308
+ maxWidth
309
+ },
188
310
  copy: copy,
189
311
  isReady: isReady,
190
312
  onLayout: onTargetLayout,
191
313
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Row, {
192
314
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
193
- variant: {
194
- size: 'h4'
315
+ tokens: { ...headerStyles,
316
+ lineHeight: headerLineHeight
195
317
  },
196
318
  children: getCopy('filterByLabel').replace(/%\{filterCategory\}/g, label.toLowerCase())
197
319
  })
@@ -200,10 +322,9 @@ const MultiSelectFilter = _ref3 => {
200
322
  space: 5
201
323
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Row, {
202
324
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
203
- variant: {
204
- size: 'h5'
325
+ tokens: { ...subeHeaderStyles,
326
+ lineHeight: subHeaderLineHeight
205
327
  },
206
- tokens: selectSubTitleTokens(themeTokens),
207
328
  children: subtitle
208
329
  })
209
330
  })]
@@ -216,7 +337,7 @@ const MultiSelectFilter = _ref3 => {
216
337
  children: [...Array(colSize).keys()].map(i => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Col, {
217
338
  xs: 12 / colSize,
218
339
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.CheckboxGroup, {
219
- items: items.slice(i * rowLimit, (i + 1) * rowLimit),
340
+ items: items.slice(i * rowLength, (i + 1) * rowLength),
220
341
  checkedIds: checkedIds,
221
342
  onChange: e => setCheckedIds(e, i)
222
343
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spacer.default, {
@@ -230,22 +351,29 @@ const MultiSelectFilter = _ref3 => {
230
351
  }),
231
352
  space: 4
232
353
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Row, {
354
+ horizontalAlign: buttonDirection === 'column' ? 'center' : 'start',
233
355
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StackView.default, {
234
- direction: "row",
356
+ direction: buttonDirection,
235
357
  space: 3,
236
358
  tokens: {
237
- alignItems: 'center'
359
+ alignItems: 'center',
360
+ ...(viewport === 'xs' && {
361
+ flexGrow: 1
362
+ })
238
363
  },
239
364
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
240
365
  onPress: () => onApply(checkedIds),
241
366
  variant: {
242
367
  size: 'small',
243
- priority: 'high'
368
+ priority: 'high',
369
+ ...(viewport === 'xs' && {
370
+ width: 'full'
371
+ })
244
372
  },
245
373
  children: getCopy('applyButtonLabel')
246
374
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
247
375
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.TextButton, {
248
- onPress: () => setCheckedIds([]),
376
+ onPress: () => onClear(),
249
377
  children: getCopy('clearButtonLabel')
250
378
  })
251
379
  })]
@@ -319,6 +447,11 @@ MultiSelectFilter.propTypes = {
319
447
  */
320
448
  maxValues: _propTypes.default.number,
321
449
 
450
+ /**
451
+ * If provided sets maxHeight to be active
452
+ */
453
+ maxHeight: _propTypes.default.bool,
454
+
322
455
  /**
323
456
  * If provided, this function is called when the current selection is changed
324
457
  * and is passed an array of the `id`s of all currently selected `items`.
@@ -80,8 +80,20 @@ const PageButton = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
80
80
  });
81
81
  PageButton.displayName = 'PageButton';
82
82
  PageButton.propTypes = { ..._utils.linkProps.types,
83
+
84
+ /**
85
+ * To set custom label for the button
86
+ */
83
87
  label: _propTypes.default.string,
88
+
89
+ /**
90
+ * To set `PageButton` to active state
91
+ */
84
92
  isActive: _propTypes.default.bool,
93
+
94
+ /**
95
+ * To change the language for labels
96
+ */
85
97
  copy: _utils.copyPropTypes,
86
98
  variant: _utils.variantProp.propType,
87
99
  tokens: (0, _utils.getTokensPropType)('PaginationPageButton')
@@ -210,10 +210,22 @@ Pagination.PageButton = _PageButton.default;
210
210
  Pagination.propTypes = { ...selectedSystemPropTypes,
211
211
  ..._utils.withLinkRouter.propTypes,
212
212
  children: (0, _utils.componentPropType)('PageButton'),
213
+
214
+ /**
215
+ * To change the language for labels
216
+ */
213
217
  copy: _utils.copyPropTypes,
214
218
  variant: _utils.variantProp.propType,
215
219
  tokens: (0, _utils.getTokensPropType)('Pagination'),
220
+
221
+ /**
222
+ * When passed as `{{ compact: true }}`, `Pagination` does not render labels along side buttons
223
+ */
216
224
  sideButtonVariant: _utils.variantProp.propType,
225
+
226
+ /**
227
+ * Custom tokens for `PaginationSideButton`
228
+ */
217
229
  sideButtonTokens: (0, _utils.getTokensPropType)('PaginationSideButton')
218
230
  };
219
231
 
@@ -81,8 +81,20 @@ const QuickLinks = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
81
81
  QuickLinks.displayName = 'QuickLinks';
82
82
  QuickLinks.propTypes = {
83
83
  tokens: (0, _utils.getTokensPropType)('QuickLinks'),
84
+
85
+ /**
86
+ * Custom tokens override for `Card`
87
+ */
84
88
  cardTokens: (0, _utils.getTokensPropType)('Card'),
89
+
90
+ /**
91
+ * Custom tokens override for `QuickLinksList`
92
+ */
85
93
  listTokens: (0, _utils.getTokensPropType)('QuickLinksList'),
94
+
95
+ /**
96
+ * The HTML tag to render the list as
97
+ */
86
98
  tag: _propTypes.default.string,
87
99
  variant: _utils.variantProp.propType,
88
100
  children: _propTypes.default.node
@@ -56,6 +56,7 @@ const selectContainerStyle = _ref => {
56
56
  } = _ref;
57
57
  return {
58
58
  textAlign,
59
+ outline: 'red',
59
60
  width: contentMaxDimension,
60
61
  overflow: 'hidden'
61
62
  };
@@ -67,6 +68,15 @@ const selectImageContainerStyle = contentMaxDimension => ({
67
68
  justifyContent: 'center',
68
69
  alignItems: 'center'
69
70
  });
71
+
72
+ const selectLinkToken = _ref2 => {
73
+ let {
74
+ outerBorderColor
75
+ } = _ref2;
76
+ return {
77
+ outerBorderColor
78
+ };
79
+ };
70
80
  /**
71
81
  * Component export along with QuickLinksFeature to be used as children
72
82
  *
@@ -74,7 +84,7 @@ const selectImageContainerStyle = contentMaxDimension => ({
74
84
  */
75
85
 
76
86
 
77
- const QuickLinksFeatureItem = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) => {
87
+ const QuickLinksFeatureItem = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
78
88
  let {
79
89
  tokens,
80
90
  variant,
@@ -82,52 +92,63 @@ const QuickLinksFeatureItem = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) =
82
92
  imageAccessibilityLabel,
83
93
  imageSource,
84
94
  ...rest
85
- } = _ref2;
95
+ } = _ref3;
86
96
  const viewport = (0, _ViewportProvider.useViewport)();
87
97
  const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('QuickLinksFeatureItem', tokens, variant);
88
- const [hover, setHover] = (0, _react.useState)(false);
89
- const {
90
- contentDirection,
91
- contentSpace,
92
- contentAlignItems,
93
- contentMaxDimension,
94
- imageDimension,
95
- textAlign
96
- } = getTokens({
97
- viewport,
98
- hover
99
- });
100
98
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.Link, {
101
99
  ref: ref,
102
- tokens: state => {
103
- setHover(state.hover);
104
- return getTokens(state);
105
- },
106
100
  ...selectProps(rest),
107
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
108
- style: selectContainerStyle({
101
+ tokens: state => selectLinkToken(getTokens(state)),
102
+ children: _ref4 => {
103
+ let {
104
+ hovered: hover,
105
+ pressed,
106
+ focused: focus
107
+ } = _ref4;
108
+ const {
109
+ contentDirection,
110
+ contentSpace,
111
+ contentAlignItems,
109
112
  contentMaxDimension,
110
- textAlign
111
- }),
112
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StackView.StackWrap, {
113
- direction: contentDirection,
114
- space: contentSpace,
115
- tokens: {
116
- alignItems: contentAlignItems
117
- },
118
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
119
- style: selectImageContainerStyle(contentMaxDimension),
120
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
121
- accessibilityIgnoresInvertColors: true,
122
- imageAccessibilityLabel: imageAccessibilityLabel,
123
- source: imageSource,
124
- style: selectImageStyle(imageDimension)
125
- })
126
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
127
- children: children
128
- })]
129
- })
130
- })
113
+ imageDimension,
114
+ textLine,
115
+ gap,
116
+ ...themeTokens
117
+ } = getTokens({
118
+ viewport,
119
+ hover,
120
+ pressed,
121
+ focus
122
+ });
123
+ const textStyle = { ...(0, _ThemeProvider.applyTextStyles)(themeTokens),
124
+ textDecorationLine: textLine
125
+ };
126
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
127
+ style: selectContainerStyle({ ...themeTokens,
128
+ contentMaxDimension
129
+ }),
130
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StackView.StackWrap, {
131
+ direction: contentDirection,
132
+ space: contentSpace,
133
+ gap: gap,
134
+ tokens: {
135
+ alignItems: contentAlignItems
136
+ },
137
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
138
+ style: selectImageContainerStyle(contentMaxDimension),
139
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
140
+ accessibilityIgnoresInvertColors: true,
141
+ imageAccessibilityLabel: imageAccessibilityLabel,
142
+ source: imageSource,
143
+ style: selectImageStyle(imageDimension)
144
+ })
145
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
146
+ style: textStyle,
147
+ children: children
148
+ })]
149
+ })
150
+ });
151
+ }
131
152
  });
132
153
  });
133
154
  QuickLinksFeatureItem.displayName = 'QuickLinksFeatureItem';
@@ -50,7 +50,14 @@ const Responsive = _ref => {
50
50
  };
51
51
 
52
52
  Responsive.propTypes = {
53
+ /**
54
+ * To hide children of `Responsive` if the current viewport is smaller than `min`
55
+ */
53
56
  min: _propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
57
+
58
+ /**
59
+ * To hide children of `Responsive` if the current viewport is larger than `max`
60
+ */
54
61
  max: _propTypes.default.oneOf(['sm', 'md', 'lg', 'xl']),
55
62
  children: _propTypes.default.node.isRequired
56
63
  };
@@ -30,5 +30,9 @@ var _default = Group;
30
30
  exports.default = _default;
31
31
  Group.propTypes = {
32
32
  children: (0, _utils.componentPropType)('Item'),
33
+
34
+ /**
35
+ * The label for the group.
36
+ */
33
37
  label: _propTypes.default.string.isRequired
34
38
  };
@@ -22,5 +22,9 @@ var _default = Group;
22
22
  exports.default = _default;
23
23
  Group.propTypes = {
24
24
  children: (0, _utils.componentPropType)('Item'),
25
+
26
+ /**
27
+ * The label for the group.
28
+ */
25
29
  label: _propTypes.default.string.isRequired
26
30
  };
@@ -28,5 +28,9 @@ var _default = Item;
28
28
  exports.default = _default;
29
29
  Item.propTypes = {
30
30
  children: _propTypes.default.string.isRequired,
31
+
32
+ /**
33
+ * The value of the option
34
+ */
31
35
  value: _propTypes.default.string.isRequired
32
36
  };
@@ -141,6 +141,10 @@ ItemsGroup.propTypes = {
141
141
  isActive: _propTypes.default.bool,
142
142
  variant: _utils.variantProp.propType,
143
143
  tokens: (0, _utils.getTokensPropType)('SideNavItemsGroup'),
144
+
145
+ /**
146
+ * Custom tokens for `SideNav.Item`
147
+ */
144
148
  itemTokens: (0, _utils.getTokensPropType)('SideNavItem')
145
149
  };
146
150
  var _default = ItemsGroup;
@@ -147,7 +147,15 @@ SideNav.propTypes = { ...selectedSystemPropTypes,
147
147
  accordion: _propTypes.default.bool,
148
148
  variant: _utils.variantProp.propType,
149
149
  tokens: (0, _utils.getTokensPropType)('SideNav'),
150
+
151
+ /**
152
+ * Custom tokens for `SideNav.Item`
153
+ */
150
154
  itemTokens: (0, _utils.getTokensPropType)('SideNavItem'),
155
+
156
+ /**
157
+ * Custom tokens for `SideNavItemsGroup`
158
+ */
151
159
  groupTokens: (0, _utils.getTokensPropType)('SideNavItemsGroup')
152
160
  };
153
161
  SideNav.Item = _Item.default;