@telus-uds/components-web 2.39.0 → 2.40.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,31 @@
1
1
  # Change Log - @telus-uds/components-web
2
2
 
3
- This log was last generated on Thu, 22 Aug 2024 18:17:39 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 16 Sep 2024 12:26:18 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.40.0
8
+
9
+ Mon, 16 Sep 2024 12:26:18 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `Card`: Add `backgroundImage` prop (<tony.eng@telus.com>)
14
+ - `FileUpload`: add component export (guillermo.peitzner@telus.com)
15
+ - Bump @telus-uds/components-base to v1.94.0
16
+ - Bump @telus-uds/system-theme-tokens to v2.63.0
17
+
18
+ ### Patches
19
+
20
+ - `Badge`: Add inverse for Badge propTypes (carlos.jeronimo@telus.com)
21
+
7
22
  ## 2.39.0
8
23
 
9
- Thu, 22 Aug 2024 18:17:39 GMT
24
+ Thu, 22 Aug 2024 18:25:10 GMT
10
25
 
11
26
  ### Minor changes
12
27
 
13
- - `Card`: `plain` variant added (35577399+JoshHC@users.noreply.github.com)
28
+ - `Card`: `plain` variant added (35577399+JoshHC@users.noreply.github.com)
14
29
  - `FullBleedContent`: add imgCol and position prop to allow for image size adjustment (<tony.eng@telus.com>)
15
30
  - `Card`: use ConditionalWrapper on CardContent and FullBleedContent to dynamically set width of full bleed image (<tony.eng@telus.com>)
16
31
  - Bump @telus-uds/components-base to v1.92.0
@@ -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;
@@ -129,6 +129,12 @@ Object.defineProperty(exports, "Feedback", {
129
129
  return _componentsBase.Feedback;
130
130
  }
131
131
  });
132
+ Object.defineProperty(exports, "FileUpload", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _componentsBase.FileUpload;
136
+ }
137
+ });
132
138
  Object.defineProperty(exports, "FlexGrid", {
133
139
  enumerable: true,
134
140
  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, 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, 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.92.0",
8
+ "@telus-uds/components-base": "1.94.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.63.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.0"
86
+ "version": "2.40.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
 
@@ -29,6 +29,7 @@ export {
29
29
  ExpandCollapse,
30
30
  Feedback,
31
31
  FlexGrid,
32
+ FileUpload,
32
33
  Icon,
33
34
  InputLabel,
34
35
  InputSupports,
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'