@telus-uds/components-web 2.39.1 → 2.41.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.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,38 @@
1
1
  # Change Log - @telus-uds/components-web
2
2
 
3
- This log was last generated on Mon, 26 Aug 2024 16:19:45 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 25 Sep 2024 16:57:49 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 2.39.1
7
+ ## 2.41.0
8
8
 
9
- Mon, 26 Aug 2024 16:19:45 GMT
9
+ Wed, 25 Sep 2024 16:57:49 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `TabBar`: new component added (35577399+JoshHC@users.noreply.github.com)
14
+ - `DownloadApp`: add component (Mauricio.BatresMontejo@telus.com)
15
+ - Bump @telus-uds/components-base to v1.95.0
16
+ - Bump @telus-uds/system-theme-tokens to v2.64.0
17
+
18
+ ### Patches
19
+
20
+ - `Typography`: added strikethrough to components-web typography props as it was missing (chris.tafts@telus.com)
21
+
22
+ ## 2.40.0
23
+
24
+ Mon, 16 Sep 2024 12:35:38 GMT
25
+
26
+ ### Minor changes
27
+
28
+ - `Card`: Add `backgroundImage` prop (<tony.eng@telus.com>)
29
+ - `FileUpload`: add component export (guillermo.peitzner@telus.com)
30
+ - Bump @telus-uds/components-base to v1.94.0
31
+ - Bump @telus-uds/system-theme-tokens to v2.63.0
10
32
 
11
33
  ### Patches
12
34
 
13
- - Bump @telus-uds/components-base to v1.93.0
35
+ - `Badge`: Add inverse for Badge propTypes (carlos.jeronimo@telus.com)
14
36
 
15
37
  ## 2.39.0
16
38
 
@@ -121,7 +121,8 @@ Badge.propTypes = {
121
121
  variant: _propTypes.default.exact({
122
122
  outline: _propTypes.default.bool,
123
123
  purpose: _propTypes.default.oneOf(['offer', 'editorial']),
124
- alternative: _propTypes.default.bool
124
+ alternative: _propTypes.default.bool,
125
+ inverse: _propTypes.default.bool
125
126
  })
126
127
  };
127
128
  var _default = Badge;
package/lib/Card/Card.js CHANGED
@@ -78,6 +78,7 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
78
78
  interactiveCard,
79
79
  onPress,
80
80
  dataSet,
81
+ backgroundImage,
81
82
  ...rest
82
83
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
83
84
  fullBleedContent: {
@@ -146,6 +147,7 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
146
147
  padding: 'custom'
147
148
  },
148
149
  tokens: restOfTokens,
150
+ backgroundImage: backgroundImage,
149
151
  ...selectProps(rest),
150
152
  children: [interactiveCard !== null && interactiveCard !== void 0 && interactiveCard.body ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.PressableCardBase, {
151
153
  ref: ref,
@@ -242,6 +244,15 @@ Card.propTypes = {
242
244
  body: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
243
245
  tokens: (0, _componentsBase.getTokensPropType)('Card'),
244
246
  variant: _componentsBase.variantProp.propType
247
+ }),
248
+ /**
249
+ * Apply background image to the card.
250
+ */
251
+ backgroundImage: _propTypes.default.shape({
252
+ // src is either a URI string or an object when used responsively to provide different image sources for different screen sizes
253
+ src: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]).isRequired,
254
+ alt: _propTypes.default.string,
255
+ resizeMode: _componentsBase.responsiveProps.getTypeOptionallyByViewport(_propTypes.default.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center']))
245
256
  })
246
257
  };
247
258
  var _default = Card;
@@ -117,6 +117,12 @@ Object.defineProperty(exports, "Divider", {
117
117
  return _componentsBase.Divider;
118
118
  }
119
119
  });
120
+ Object.defineProperty(exports, "DownloadApp", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _componentsBase.DownloadApp;
124
+ }
125
+ });
120
126
  Object.defineProperty(exports, "ExpandCollapse", {
121
127
  enumerable: true,
122
128
  get: function () {
@@ -129,6 +135,12 @@ Object.defineProperty(exports, "Feedback", {
129
135
  return _componentsBase.Feedback;
130
136
  }
131
137
  });
138
+ Object.defineProperty(exports, "FileUpload", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _componentsBase.FileUpload;
142
+ }
143
+ });
132
144
  Object.defineProperty(exports, "FlexGrid", {
133
145
  enumerable: true,
134
146
  get: function () {
@@ -297,6 +309,12 @@ Object.defineProperty(exports, "StepTracker", {
297
309
  return _componentsBase.StepTracker;
298
310
  }
299
311
  });
312
+ Object.defineProperty(exports, "TabBar", {
313
+ enumerable: true,
314
+ get: function () {
315
+ return _componentsBase.TabBar;
316
+ }
317
+ });
300
318
  Object.defineProperty(exports, "Tabs", {
301
319
  enumerable: true,
302
320
  get: function () {
@@ -114,7 +114,8 @@ Badge.propTypes = {
114
114
  variant: PropTypes.exact({
115
115
  outline: PropTypes.bool,
116
116
  purpose: PropTypes.oneOf(['offer', 'editorial']),
117
- alternative: PropTypes.bool
117
+ alternative: PropTypes.bool,
118
+ inverse: PropTypes.bool
118
119
  })
119
120
  };
120
121
  export default Badge;
@@ -71,6 +71,7 @@ const Card = /*#__PURE__*/React.forwardRef(function () {
71
71
  interactiveCard,
72
72
  onPress,
73
73
  dataSet,
74
+ backgroundImage,
74
75
  ...rest
75
76
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
76
77
  fullBleedContent: {
@@ -139,6 +140,7 @@ const Card = /*#__PURE__*/React.forwardRef(function () {
139
140
  padding: 'custom'
140
141
  },
141
142
  tokens: restOfTokens,
143
+ backgroundImage: backgroundImage,
142
144
  ...selectProps(rest),
143
145
  children: [interactiveCard !== null && interactiveCard !== void 0 && interactiveCard.body ? /*#__PURE__*/_jsx(PressableCardBase, {
144
146
  ref: ref,
@@ -235,6 +237,15 @@ Card.propTypes = {
235
237
  body: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
236
238
  tokens: getTokensPropType('Card'),
237
239
  variant: variantProp.propType
240
+ }),
241
+ /**
242
+ * Apply background image to the card.
243
+ */
244
+ backgroundImage: PropTypes.shape({
245
+ // src is either a URI string or an object when used responsively to provide different image sources for different screen sizes
246
+ src: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
247
+ alt: PropTypes.string,
248
+ resizeMode: responsiveProps.getTypeOptionallyByViewport(PropTypes.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center']))
238
249
  })
239
250
  };
240
251
  export default Card;
@@ -5,7 +5,7 @@ export {
5
5
  /**
6
6
  * Most base components should be re-exported as-is.
7
7
  */
8
- ActionCard, A11yText, ActivityIndicator, Autocomplete, Box, Button, BaseProvider, A11yInfoProvider, ViewportProvider, ThemeProvider, ButtonDropdown, ButtonGroup, ButtonLink, CardGroup, Carousel, CarouselTabs, Checkbox, CheckboxGroup, ChevronLink, ColourToggle, Divider, ExpandCollapse, Feedback, FlexGrid, Icon, InputLabel, InputSupports, Link, Listbox, Modal, MultiSelectFilter, Notification, Pagination, Portal, QuickLinks, QuickLinksFeature, Radio, RadioGroup, RadioCard, RadioCardGroup, Responsive, Search, Select, SideNav, Skeleton, SkipLink, Spacer, StackView, StackWrap, StepTracker, Status, Tabs, Tags, TextButton, TextArea, TextInput, Timeline, ToggleSwitch, ToggleSwitchGroup, TooltipButton, Tooltip, Typography, Validator,
8
+ ActionCard, A11yText, ActivityIndicator, Autocomplete, Box, Button, BaseProvider, A11yInfoProvider, ViewportProvider, ThemeProvider, ButtonDropdown, ButtonGroup, ButtonLink, CardGroup, Carousel, CarouselTabs, Checkbox, CheckboxGroup, ChevronLink, ColourToggle, Divider, DownloadApp, ExpandCollapse, Feedback, FlexGrid, FileUpload, Icon, InputLabel, InputSupports, Link, Listbox, Modal, MultiSelectFilter, Notification, Pagination, Portal, QuickLinks, QuickLinksFeature, Radio, RadioGroup, RadioCard, RadioCardGroup, Responsive, Search, Select, SideNav, Skeleton, SkipLink, Spacer, StackView, StackWrap, StepTracker, Status, Tabs, TabBar, Tags, TextButton, TextArea, TextInput, Timeline, ToggleSwitch, ToggleSwitchGroup, TooltipButton, Tooltip, Typography, Validator,
9
9
  /*
10
10
  * Most utilities exported from @telus-uds/components-base are for building systems, not apps.
11
11
  * Re-export only those utilities with a stable API and known use cases within apps / pages.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "dependencies": {
7
7
  "@gorhom/portal": "^1.0.14",
8
- "@telus-uds/components-base": "1.93.0",
8
+ "@telus-uds/components-base": "1.95.0",
9
9
  "@telus-uds/system-constants": "^1.3.0",
10
10
  "fscreen": "^1.2.0",
11
11
  "lodash.omit": "^4.5.0",
@@ -13,7 +13,7 @@
13
13
  "react-dates": "^21.8.0",
14
14
  "react-helmet-async": "^1.3.0",
15
15
  "react-moment-proptypes": "^1.8.1",
16
- "@telus-uds/system-theme-tokens": "^2.62.0",
16
+ "@telus-uds/system-theme-tokens": "^2.64.0",
17
17
  "prop-types": "^15.7.2",
18
18
  "lodash.throttle": "^4.1.1",
19
19
  "react-youtube": "^10.1.0",
@@ -83,5 +83,5 @@
83
83
  "skip": true
84
84
  },
85
85
  "types": "types/index.d.ts",
86
- "version": "2.39.1"
86
+ "version": "2.41.0"
87
87
  }
@@ -96,7 +96,8 @@ Badge.propTypes = {
96
96
  variant: PropTypes.exact({
97
97
  outline: PropTypes.bool,
98
98
  purpose: PropTypes.oneOf(['offer', 'editorial']),
99
- alternative: PropTypes.bool
99
+ alternative: PropTypes.bool,
100
+ inverse: PropTypes.bool
100
101
  })
101
102
  }
102
103
 
package/src/Card/Card.jsx CHANGED
@@ -76,6 +76,7 @@ const Card = React.forwardRef(
76
76
  interactiveCard,
77
77
  onPress,
78
78
  dataSet,
79
+ backgroundImage,
79
80
  ...rest
80
81
  } = {
81
82
  fullBleedContent: { position: null }
@@ -142,6 +143,7 @@ const Card = React.forwardRef(
142
143
  ref={ref}
143
144
  variant={{ ...variant, padding: 'custom' }}
144
145
  tokens={restOfTokens}
146
+ backgroundImage={backgroundImage}
145
147
  {...selectProps(rest)}
146
148
  >
147
149
  {interactiveCard?.body ? (
@@ -254,6 +256,17 @@ Card.propTypes = {
254
256
  body: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
255
257
  tokens: getTokensPropType('Card'),
256
258
  variant: variantProp.propType
259
+ }),
260
+ /**
261
+ * Apply background image to the card.
262
+ */
263
+ backgroundImage: PropTypes.shape({
264
+ // src is either a URI string or an object when used responsively to provide different image sources for different screen sizes
265
+ src: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
266
+ alt: PropTypes.string,
267
+ resizeMode: responsiveProps.getTypeOptionallyByViewport(
268
+ PropTypes.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center'])
269
+ )
257
270
  })
258
271
  }
259
272
 
@@ -26,9 +26,11 @@ export {
26
26
  ChevronLink,
27
27
  ColourToggle,
28
28
  Divider,
29
+ DownloadApp,
29
30
  ExpandCollapse,
30
31
  Feedback,
31
32
  FlexGrid,
33
+ FileUpload,
32
34
  Icon,
33
35
  InputLabel,
34
36
  InputSupports,
@@ -57,6 +59,7 @@ export {
57
59
  StepTracker,
58
60
  Status,
59
61
  Tabs,
62
+ TabBar,
60
63
  Tags,
61
64
  TextButton,
62
65
  TextArea,
@@ -18,6 +18,7 @@ export interface TypographyProps extends A11yProps, TextProps, ViewProps {
18
18
  tag?: 'blockquote' | 'code' | 'del' | 'em' | 'ins' | 'li' | 'strong' | 'label' | HeadingTag
19
19
  block?: boolean
20
20
  align?: TextAlign
21
+ strikeThrough?: boolean
21
22
  children?: ReactNode
22
23
  skeleton?: SkeletonProps
23
24
  }
package/types/common.d.ts CHANGED
@@ -154,7 +154,7 @@ export interface PressableState {
154
154
  }
155
155
 
156
156
  // TODO: Make this more specific:
157
- // https://telus.github.io/universal-design-system/components/allium/skeleton/#props
157
+ // https://telus.com/universal-design-system/components/allium/skeleton/#props
158
158
  export type SkeletonProps = Record<string, any>
159
159
 
160
160
  export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'