@telus-uds/components-web 4.4.2 → 4.5.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 +23 -2
- package/lib/cjs/Card/Card.js +15 -2
- package/lib/esm/Card/Card.js +16 -3
- package/package.json +5 -5
- package/src/Card/Card.jsx +17 -3
- package/types/common.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 01 May 2025 20:07:44 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 4.5.0
|
|
8
|
+
|
|
9
|
+
Thu, 01 May 2025 20:07:44 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- `InputSupportsProps`: update tooltip type to enhance support to tooltip component (shivam.gupta3@telus.com)
|
|
14
|
+
- `Card`: add href and hrefAttrs props (guillermo.peitzner@telus.com)
|
|
15
|
+
- Bump @telus-uds/components-base to v3.7.0
|
|
16
|
+
- Bump @telus-uds/system-theme-tokens to v4.5.0
|
|
17
|
+
|
|
18
|
+
## 4.4.3
|
|
19
|
+
|
|
20
|
+
Thu, 24 Apr 2025 18:56:23 GMT
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- Update react dependencies to match valid versions (sergio.ramirez@telus.com)
|
|
25
|
+
- Bump @telus-uds/components-base to v3.6.0
|
|
26
|
+
- Bump @telus-uds/system-theme-tokens to v4.4.0
|
|
27
|
+
|
|
7
28
|
## 4.4.2
|
|
8
29
|
|
|
9
|
-
Tue, 08 Apr 2025 19:
|
|
30
|
+
Tue, 08 Apr 2025 19:36:14 GMT
|
|
10
31
|
|
|
11
32
|
### Patches
|
|
12
33
|
|
package/lib/cjs/Card/Card.js
CHANGED
|
@@ -153,6 +153,8 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
|
|
|
153
153
|
tokens: getThemeTokens,
|
|
154
154
|
dataSet: dataSet,
|
|
155
155
|
onPress: onPress,
|
|
156
|
+
href: interactiveCard?.href,
|
|
157
|
+
hrefAttrs: interactiveCard?.hrefAttrs,
|
|
156
158
|
...selectProps(rest),
|
|
157
159
|
children: typeof interactiveCard?.body === 'function' ? interactiveCard.body() : interactiveCard.body
|
|
158
160
|
}) : null, children || fullBleedContentPosition !== 'none' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
|
|
@@ -238,11 +240,18 @@ Card.propTypes = {
|
|
|
238
240
|
onPress: _propTypes.default.func,
|
|
239
241
|
/**
|
|
240
242
|
* Object to set interactive card's properties
|
|
243
|
+
* - body: The body of the interactive card, can be any renderable node
|
|
244
|
+
* - tokens: The tokens to be used for the interactive card
|
|
245
|
+
* - variant: The variant to be used for the interactive card
|
|
246
|
+
* - href: The href to be used for the interactive card
|
|
247
|
+
* - hrefAttrs: The href attributes to be used for the interactive card
|
|
241
248
|
*/
|
|
242
249
|
interactiveCard: _propTypes.default.shape({
|
|
243
250
|
body: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
244
251
|
tokens: (0, _componentsBase.getTokensPropType)('Card'),
|
|
245
|
-
variant: _componentsBase.variantProp.propType
|
|
252
|
+
variant: _componentsBase.variantProp.propType,
|
|
253
|
+
href: _propTypes.default.string,
|
|
254
|
+
hrefAttrs: _propTypes.default.shape(_componentsBase.hrefAttrsProp.types)
|
|
246
255
|
}),
|
|
247
256
|
/**
|
|
248
257
|
* Apply background image to the card.
|
|
@@ -252,6 +261,10 @@ Card.propTypes = {
|
|
|
252
261
|
src: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]).isRequired,
|
|
253
262
|
alt: _propTypes.default.string,
|
|
254
263
|
resizeMode: _componentsBase.responsiveProps.getTypeOptionallyByViewport(_propTypes.default.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center']))
|
|
255
|
-
})
|
|
264
|
+
}),
|
|
265
|
+
/**
|
|
266
|
+
* Data set for the card.
|
|
267
|
+
*/
|
|
268
|
+
dataSet: _propTypes.default.object
|
|
256
269
|
};
|
|
257
270
|
var _default = exports.default = Card;
|
package/lib/esm/Card/Card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Card as CardBase, getTokensPropType, paddingProp, responsiveProps, selectSystemProps, StackView, useThemeTokens, useThemeTokensCallback, variantProp, a11yProps, viewProps, PressableCardBase, useResponsiveProp } from '@telus-uds/components-base';
|
|
3
|
+
import { Card as CardBase, getTokensPropType, paddingProp, responsiveProps, selectSystemProps, StackView, useThemeTokens, useThemeTokensCallback, variantProp, a11yProps, viewProps, PressableCardBase, useResponsiveProp, hrefAttrsProp } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import CardContent from './CardContent';
|
|
6
6
|
import CardFooter from './CardFooter';
|
|
@@ -145,6 +145,8 @@ const Card = /*#__PURE__*/React.forwardRef(function () {
|
|
|
145
145
|
tokens: getThemeTokens,
|
|
146
146
|
dataSet: dataSet,
|
|
147
147
|
onPress: onPress,
|
|
148
|
+
href: interactiveCard?.href,
|
|
149
|
+
hrefAttrs: interactiveCard?.hrefAttrs,
|
|
148
150
|
...selectProps(rest),
|
|
149
151
|
children: typeof interactiveCard?.body === 'function' ? interactiveCard.body() : interactiveCard.body
|
|
150
152
|
}) : null, children || fullBleedContentPosition !== 'none' ? /*#__PURE__*/_jsxs(StackView, {
|
|
@@ -230,11 +232,18 @@ Card.propTypes = {
|
|
|
230
232
|
onPress: PropTypes.func,
|
|
231
233
|
/**
|
|
232
234
|
* Object to set interactive card's properties
|
|
235
|
+
* - body: The body of the interactive card, can be any renderable node
|
|
236
|
+
* - tokens: The tokens to be used for the interactive card
|
|
237
|
+
* - variant: The variant to be used for the interactive card
|
|
238
|
+
* - href: The href to be used for the interactive card
|
|
239
|
+
* - hrefAttrs: The href attributes to be used for the interactive card
|
|
233
240
|
*/
|
|
234
241
|
interactiveCard: PropTypes.shape({
|
|
235
242
|
body: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
236
243
|
tokens: getTokensPropType('Card'),
|
|
237
|
-
variant: variantProp.propType
|
|
244
|
+
variant: variantProp.propType,
|
|
245
|
+
href: PropTypes.string,
|
|
246
|
+
hrefAttrs: PropTypes.shape(hrefAttrsProp.types)
|
|
238
247
|
}),
|
|
239
248
|
/**
|
|
240
249
|
* Apply background image to the card.
|
|
@@ -244,6 +253,10 @@ Card.propTypes = {
|
|
|
244
253
|
src: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
|
|
245
254
|
alt: PropTypes.string,
|
|
246
255
|
resizeMode: responsiveProps.getTypeOptionallyByViewport(PropTypes.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center']))
|
|
247
|
-
})
|
|
256
|
+
}),
|
|
257
|
+
/**
|
|
258
|
+
* Data set for the card.
|
|
259
|
+
*/
|
|
260
|
+
dataSet: PropTypes.object
|
|
248
261
|
};
|
|
249
262
|
export default Card;
|
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": "^3.
|
|
8
|
+
"@telus-uds/components-base": "^3.7.0",
|
|
9
9
|
"@telus-uds/system-constants": "^3.0.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": "^4.
|
|
16
|
+
"@telus-uds/system-theme-tokens": "^4.5.0",
|
|
17
17
|
"prop-types": "^15.7.2",
|
|
18
18
|
"lodash.throttle": "^4.1.1",
|
|
19
19
|
"react-youtube": "^10.1.0",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"module": "lib/esm/index.js",
|
|
60
60
|
"name": "@telus-uds/components-web",
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"react": "
|
|
63
|
-
"react-dom": "
|
|
62
|
+
"react": ">=18.2.0 <19.0.0",
|
|
63
|
+
"react-dom": ">=18.2.0 <19.0.0",
|
|
64
64
|
"react-native-web": "^0.19.10",
|
|
65
65
|
"styled-components": "^5.3.0"
|
|
66
66
|
},
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"skip": true
|
|
83
83
|
},
|
|
84
84
|
"types": "types/index.d.ts",
|
|
85
|
-
"version": "4.
|
|
85
|
+
"version": "4.5.0"
|
|
86
86
|
}
|
package/src/Card/Card.jsx
CHANGED
|
@@ -13,7 +13,8 @@ import {
|
|
|
13
13
|
a11yProps,
|
|
14
14
|
viewProps,
|
|
15
15
|
PressableCardBase,
|
|
16
|
-
useResponsiveProp
|
|
16
|
+
useResponsiveProp,
|
|
17
|
+
hrefAttrsProp
|
|
17
18
|
} from '@telus-uds/components-base'
|
|
18
19
|
import styled from 'styled-components'
|
|
19
20
|
import CardContent from './CardContent'
|
|
@@ -152,6 +153,8 @@ const Card = React.forwardRef(
|
|
|
152
153
|
tokens={getThemeTokens}
|
|
153
154
|
dataSet={dataSet}
|
|
154
155
|
onPress={onPress}
|
|
156
|
+
href={interactiveCard?.href}
|
|
157
|
+
hrefAttrs={interactiveCard?.hrefAttrs}
|
|
155
158
|
{...selectProps(rest)}
|
|
156
159
|
>
|
|
157
160
|
{typeof interactiveCard?.body === 'function'
|
|
@@ -251,11 +254,18 @@ Card.propTypes = {
|
|
|
251
254
|
onPress: PropTypes.func,
|
|
252
255
|
/**
|
|
253
256
|
* Object to set interactive card's properties
|
|
257
|
+
* - body: The body of the interactive card, can be any renderable node
|
|
258
|
+
* - tokens: The tokens to be used for the interactive card
|
|
259
|
+
* - variant: The variant to be used for the interactive card
|
|
260
|
+
* - href: The href to be used for the interactive card
|
|
261
|
+
* - hrefAttrs: The href attributes to be used for the interactive card
|
|
254
262
|
*/
|
|
255
263
|
interactiveCard: PropTypes.shape({
|
|
256
264
|
body: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
257
265
|
tokens: getTokensPropType('Card'),
|
|
258
|
-
variant: variantProp.propType
|
|
266
|
+
variant: variantProp.propType,
|
|
267
|
+
href: PropTypes.string,
|
|
268
|
+
hrefAttrs: PropTypes.shape(hrefAttrsProp.types)
|
|
259
269
|
}),
|
|
260
270
|
/**
|
|
261
271
|
* Apply background image to the card.
|
|
@@ -267,7 +277,11 @@ Card.propTypes = {
|
|
|
267
277
|
resizeMode: responsiveProps.getTypeOptionallyByViewport(
|
|
268
278
|
PropTypes.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center'])
|
|
269
279
|
)
|
|
270
|
-
})
|
|
280
|
+
}),
|
|
281
|
+
/**
|
|
282
|
+
* Data set for the card.
|
|
283
|
+
*/
|
|
284
|
+
dataSet: PropTypes.object
|
|
271
285
|
}
|
|
272
286
|
|
|
273
287
|
export default Card
|
package/types/common.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
NativeSyntheticEvent,
|
|
6
6
|
TextLayoutEventData
|
|
7
7
|
} from './ReactNative'
|
|
8
|
+
import type { TooltipProps } from './Tooltip'
|
|
8
9
|
|
|
9
10
|
export interface A11yProps extends AccessibilityProps {}
|
|
10
11
|
|
|
@@ -14,7 +15,7 @@ export interface InputSupportsProps {
|
|
|
14
15
|
hint?: string
|
|
15
16
|
hintPosition?: 'inline' | 'below'
|
|
16
17
|
feedback?: string
|
|
17
|
-
tooltip?: string
|
|
18
|
+
tooltip?: TooltipProps | string
|
|
18
19
|
validation?: 'error' | 'success'
|
|
19
20
|
}
|
|
20
21
|
|