@telus-uds/components-web 4.14.0 → 4.16.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 +31 -1
- package/lib/cjs/Card/Card.js +197 -37
- package/lib/cjs/Card/CardContent.js +4 -2
- package/lib/cjs/NavigationBar/NavigationBar.js +7 -1
- package/lib/cjs/NavigationBar/NavigationSubMenu.js +5 -1
- package/lib/cjs/shared/FullBleedContent/FullBleedContent.js +16 -2
- package/lib/cjs/shared/FullBleedContent/useFullBleedContentProps.js +1 -1
- package/lib/esm/Card/Card.js +198 -38
- package/lib/esm/Card/CardContent.js +4 -2
- package/lib/esm/NavigationBar/NavigationBar.js +8 -2
- package/lib/esm/NavigationBar/NavigationSubMenu.js +5 -1
- package/lib/esm/shared/FullBleedContent/FullBleedContent.js +16 -2
- package/lib/esm/shared/FullBleedContent/useFullBleedContentProps.js +1 -1
- package/package.json +3 -3
- package/src/Card/Card.jsx +248 -54
- package/src/Card/CardContent.jsx +4 -2
- package/src/NavigationBar/NavigationBar.jsx +9 -2
- package/src/NavigationBar/NavigationSubMenu.jsx +5 -1
- package/src/shared/FullBleedContent/FullBleedContent.jsx +22 -7
- package/src/shared/FullBleedContent/useFullBleedContentProps.js +1 -1
- package/types/Listbox.d.ts +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 12 Jan 2026 14:55:22 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 4.16.0
|
|
8
|
+
|
|
9
|
+
Mon, 12 Jan 2026 14:55:22 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- `IconButton`: Update the UI to match the design intention, add an inactive prop and selected variant (guillermo.peitzner@telus.com)
|
|
14
|
+
- Bump @telus-uds/components-base to v3.25.0
|
|
15
|
+
- Bump @telus-uds/system-theme-tokens to v4.18.0
|
|
16
|
+
|
|
17
|
+
### Patches
|
|
18
|
+
|
|
19
|
+
- `NavigationBar`: fix sub-menus navigation on mobile (guillermo.peitzner@telus.com)
|
|
20
|
+
- `Card`: fix prop imgCol prevents contentAlign to work (sergio.ramirez@telus.com)
|
|
21
|
+
|
|
22
|
+
## 4.15.0
|
|
23
|
+
|
|
24
|
+
Fri, 12 Dec 2025 05:37:21 GMT
|
|
25
|
+
|
|
26
|
+
### Minor changes
|
|
27
|
+
|
|
28
|
+
- `Card`: interative mode added for FullBleedContent (35577399+JoshHC@users.noreply.github.com)
|
|
29
|
+
- `Listbox & NavigationBar`: add `secondLevel` variant (sergio.ramirez@telus.com)
|
|
30
|
+
- Bump @telus-uds/components-base to v3.24.0
|
|
31
|
+
- Bump @telus-uds/system-theme-tokens to v4.17.0
|
|
32
|
+
|
|
33
|
+
### Patches
|
|
34
|
+
|
|
35
|
+
- `Card`: problem with hover when overriding the background color fixed (josue.higueroscalderon@telus.com)
|
|
36
|
+
|
|
7
37
|
## 4.14.0
|
|
8
38
|
|
|
9
39
|
Wed, 19 Nov 2025 05:51:40 GMT
|
package/lib/cjs/Card/Card.js
CHANGED
|
@@ -18,6 +18,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
19
|
// Passes React Native-oriented system props through UDS Card
|
|
20
20
|
const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_componentsBase.a11yProps, _componentsBase.viewProps]);
|
|
21
|
+
const GRID_COLUMNS = 12;
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* A basic card component, unstyled by default.
|
|
@@ -49,6 +50,7 @@ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemP
|
|
|
49
50
|
* `Card` component accepts all the standard accessibility props.
|
|
50
51
|
*/
|
|
51
52
|
const DynamicWidthContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
53
|
+
shouldForwardProp: prop => !['marginTop', 'marginBottom', 'marginLeft', 'marginRight', 'height', 'alignSelf'].includes(prop),
|
|
52
54
|
displayName: "Card__DynamicWidthContainer",
|
|
53
55
|
componentId: "components-web__sc-1elbtwd-0"
|
|
54
56
|
})(_ref => {
|
|
@@ -56,13 +58,23 @@ const DynamicWidthContainer = /*#__PURE__*/_styledComponents.default.div.withCon
|
|
|
56
58
|
width,
|
|
57
59
|
display,
|
|
58
60
|
borderRadius,
|
|
59
|
-
overflow
|
|
61
|
+
overflow,
|
|
62
|
+
marginTop,
|
|
63
|
+
marginBottom,
|
|
64
|
+
marginLeft,
|
|
65
|
+
marginRight,
|
|
66
|
+
alignSelf
|
|
60
67
|
} = _ref;
|
|
61
68
|
return {
|
|
62
69
|
width,
|
|
63
70
|
display,
|
|
64
71
|
borderRadius,
|
|
65
|
-
overflow
|
|
72
|
+
overflow,
|
|
73
|
+
marginTop,
|
|
74
|
+
marginBottom,
|
|
75
|
+
marginLeft,
|
|
76
|
+
marginRight,
|
|
77
|
+
alignSelf
|
|
66
78
|
};
|
|
67
79
|
});
|
|
68
80
|
const Card = /*#__PURE__*/_react.default.forwardRef(function () {
|
|
@@ -85,6 +97,14 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
|
|
|
85
97
|
}
|
|
86
98
|
};
|
|
87
99
|
let ref = arguments.length > 1 ? arguments[1] : undefined;
|
|
100
|
+
const {
|
|
101
|
+
hrefAttrs: cardLevelHrefAttrs,
|
|
102
|
+
rest: restWithoutHrefAttrs
|
|
103
|
+
} = _componentsBase.hrefAttrsProp.bundle(rest);
|
|
104
|
+
const {
|
|
105
|
+
href: cardLevelHref,
|
|
106
|
+
...restProps
|
|
107
|
+
} = restWithoutHrefAttrs;
|
|
88
108
|
const {
|
|
89
109
|
contentStackAlign,
|
|
90
110
|
contentStackDirection,
|
|
@@ -93,18 +113,52 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
|
|
|
93
113
|
fullBleedContentChildrenAlign
|
|
94
114
|
} = (0, _FullBleedContent.useFullBleedContentProps)(fullBleedContent);
|
|
95
115
|
const {
|
|
96
|
-
imgCol
|
|
116
|
+
imgCol,
|
|
117
|
+
interactive: fullBleedInteractive,
|
|
118
|
+
onPress: fullBleedOnPress,
|
|
119
|
+
href: fullBleedHref,
|
|
120
|
+
hrefAttrs: fullBleedHrefAttrs,
|
|
121
|
+
...fullBleedContentPropsClean
|
|
97
122
|
} = fullBleedContentProps;
|
|
123
|
+
const effectiveFullBleedOnPress = fullBleedOnPress || onPress;
|
|
124
|
+
const effectiveFullBleedHref = fullBleedHref || cardLevelHref;
|
|
125
|
+
const effectiveFullBleedHrefAttrs = fullBleedHrefAttrs || cardLevelHrefAttrs;
|
|
98
126
|
|
|
99
127
|
// If the card has rounded corners and a full bleed image, we need to apply
|
|
100
128
|
// those corners on the image as well, but partially
|
|
129
|
+
const allThemeTokens = (0, _componentsBase.useThemeTokens)('Card', tokens, variant);
|
|
101
130
|
const {
|
|
102
131
|
borderRadius
|
|
103
|
-
} =
|
|
132
|
+
} = allThemeTokens;
|
|
133
|
+
const cardBaseBorderWidth = allThemeTokens.borderWidth;
|
|
134
|
+
const pressableBorderWidth = (0, _componentsBase.useThemeTokens)('Card', {}, {
|
|
135
|
+
...variant,
|
|
136
|
+
interactive: true
|
|
137
|
+
}).borderWidth;
|
|
138
|
+
const marginOffset = `${-(cardBaseBorderWidth + pressableBorderWidth) / 2}px`;
|
|
104
139
|
const getThemeTokens = (0, _componentsBase.useThemeTokensCallback)('Card', interactiveCard?.tokens, {
|
|
105
140
|
interactive: true,
|
|
106
141
|
...(interactiveCard?.variant || {})
|
|
107
142
|
});
|
|
143
|
+
const {
|
|
144
|
+
backgroundColor: _,
|
|
145
|
+
...tokensWithoutBg
|
|
146
|
+
} = tokens;
|
|
147
|
+
const getFullBleedInteractiveTokens = (0, _componentsBase.useThemeTokensCallback)('Card', tokensWithoutBg, {
|
|
148
|
+
...variant,
|
|
149
|
+
interactive: true
|
|
150
|
+
});
|
|
151
|
+
const getFullBleedInteractiveCardTokens = cardState => ({
|
|
152
|
+
...getFullBleedInteractiveTokens(cardState),
|
|
153
|
+
paddingTop: 0,
|
|
154
|
+
paddingBottom: 0,
|
|
155
|
+
paddingLeft: 0,
|
|
156
|
+
paddingRight: 0,
|
|
157
|
+
// Suppress gradient if interactiveCard.body exists to avoid border duplication
|
|
158
|
+
...(interactiveCard?.body ? {
|
|
159
|
+
gradient: undefined
|
|
160
|
+
} : {})
|
|
161
|
+
});
|
|
108
162
|
const hasFooter = Boolean(footer);
|
|
109
163
|
const fullBleedBorderRadius = (0, _FullBleedContent.getFullBleedBorderRadius)(borderRadius, fullBleedContentPosition, hasFooter);
|
|
110
164
|
|
|
@@ -112,32 +166,38 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
|
|
|
112
166
|
// card content will adapt to the size of image to add up to 100% width of card width
|
|
113
167
|
// pass as props to ConditionalWrapper
|
|
114
168
|
const imgColCurrentViewport = (0, _componentsBase.useResponsiveProp)(imgCol);
|
|
115
|
-
const maxCol =
|
|
169
|
+
const maxCol = GRID_COLUMNS;
|
|
116
170
|
const fullBleedImageWidth = `${imgColCurrentViewport / maxCol * 100}%`;
|
|
117
171
|
const adaptiveContentWidth = `${(maxCol - imgColCurrentViewport) / maxCol * 100}%`;
|
|
118
172
|
const isImageWidthAdjustable = imgCol && (fullBleedContentPosition === 'left' || fullBleedContentPosition === 'right');
|
|
119
173
|
const contentWrapperStyleProps = {
|
|
120
174
|
width: adaptiveContentWidth,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
display: imgColCurrentViewport === 0 ? 'none' : undefined
|
|
175
|
+
...(imgColCurrentViewport >= maxCol && {
|
|
176
|
+
display: 'none'
|
|
177
|
+
}),
|
|
178
|
+
...(fullBleedContentChildrenAlign && {
|
|
179
|
+
alignSelf: fullBleedContentChildrenAlign
|
|
180
|
+
})
|
|
128
181
|
};
|
|
129
182
|
const columnFlex = {
|
|
130
183
|
flexGrow: interactiveCard?.body ? 0 : 1,
|
|
131
184
|
flexShrink: 1,
|
|
132
185
|
justifyContent: 'space-between'
|
|
133
186
|
};
|
|
134
|
-
const {
|
|
135
|
-
|
|
136
|
-
paddingBottom,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
187
|
+
const cardBaseTokens = Object.fromEntries(Object.entries(tokens).filter(_ref2 => {
|
|
188
|
+
let [key] = _ref2;
|
|
189
|
+
return !['paddingTop', 'paddingBottom', 'paddingLeft', 'paddingRight', ...(backgroundImage ? ['backgroundColor'] : [])].includes(key);
|
|
190
|
+
}));
|
|
191
|
+
const imageWrapperStyleProps = {
|
|
192
|
+
width: fullBleedImageWidth,
|
|
193
|
+
...(imgColCurrentViewport >= maxCol && {
|
|
194
|
+
borderRadius,
|
|
195
|
+
overflow: 'hidden'
|
|
196
|
+
}),
|
|
197
|
+
...(imgColCurrentViewport === 0 && {
|
|
198
|
+
display: 'none'
|
|
199
|
+
})
|
|
200
|
+
};
|
|
141
201
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.Card, {
|
|
142
202
|
ref: ref,
|
|
143
203
|
variant: {
|
|
@@ -146,23 +206,102 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
|
|
|
146
206
|
},
|
|
147
207
|
tokens: cardBaseTokens,
|
|
148
208
|
backgroundImage: backgroundImage,
|
|
149
|
-
onPress: onPress,
|
|
209
|
+
onPress: fullBleedInteractive ? undefined : onPress,
|
|
150
210
|
...(interactiveCard?.selectionType && {
|
|
151
|
-
interactiveCard
|
|
211
|
+
interactiveCard,
|
|
212
|
+
id: rest.id
|
|
152
213
|
}),
|
|
153
|
-
...selectProps(
|
|
154
|
-
children: [interactiveCard?.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
214
|
+
...selectProps(restProps),
|
|
215
|
+
children: [interactiveCard?.selectionType && children ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardContent.default, {
|
|
216
|
+
tokens: tokens,
|
|
217
|
+
variant: variant,
|
|
218
|
+
withFooter: hasFooter,
|
|
219
|
+
children: children
|
|
220
|
+
}) : null, interactiveCard?.body && !interactiveCard.selectionType ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
221
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.PressableCardBase, {
|
|
222
|
+
ref: ref,
|
|
223
|
+
tokens: getThemeTokens,
|
|
224
|
+
dataSet: dataSet,
|
|
225
|
+
onPress: onPress,
|
|
226
|
+
href: interactiveCard?.href,
|
|
227
|
+
hrefAttrs: interactiveCard?.hrefAttrs,
|
|
228
|
+
...selectProps(restProps),
|
|
229
|
+
children: cardState => /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
230
|
+
children: typeof interactiveCard?.body === 'function' ? interactiveCard.body(cardState) : interactiveCard.body
|
|
231
|
+
})
|
|
232
|
+
}), children && fullBleedContentPosition === 'none' && !fullBleedInteractive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardContent.default, {
|
|
233
|
+
tokens: tokens,
|
|
234
|
+
variant: variant,
|
|
235
|
+
withFooter: hasFooter,
|
|
236
|
+
children: children
|
|
237
|
+
}) : null]
|
|
238
|
+
}) : null, fullBleedInteractive ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
239
|
+
style: {
|
|
240
|
+
marginTop: marginOffset,
|
|
241
|
+
marginBottom: marginOffset,
|
|
242
|
+
marginLeft: marginOffset,
|
|
243
|
+
marginRight: marginOffset
|
|
244
|
+
},
|
|
245
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.PressableCardBase, {
|
|
246
|
+
ref: ref,
|
|
247
|
+
tokens: getFullBleedInteractiveCardTokens,
|
|
248
|
+
dataSet: dataSet,
|
|
249
|
+
onPress: effectiveFullBleedOnPress,
|
|
250
|
+
href: effectiveFullBleedHref,
|
|
251
|
+
hrefAttrs: effectiveFullBleedHrefAttrs,
|
|
252
|
+
...selectProps(restProps),
|
|
253
|
+
children: cardState => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
|
|
254
|
+
direction: contentStackDirection,
|
|
255
|
+
tokens: {
|
|
256
|
+
...columnFlex,
|
|
257
|
+
alignItems: contentStackAlign
|
|
258
|
+
},
|
|
259
|
+
space: 0,
|
|
260
|
+
children: [children ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConditionalWrapper.default, {
|
|
261
|
+
WrapperComponent: DynamicWidthContainer,
|
|
262
|
+
wrapperProps: contentWrapperStyleProps,
|
|
263
|
+
condition: isImageWidthAdjustable,
|
|
264
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardContent.default, {
|
|
265
|
+
tokens: {
|
|
266
|
+
...tokensWithoutBg,
|
|
267
|
+
...(backgroundImage ? {} : {
|
|
268
|
+
backgroundColor: 'transparent'
|
|
269
|
+
}),
|
|
270
|
+
...(!isImageWidthAdjustable && fullBleedContentChildrenAlign && {
|
|
271
|
+
alignSelf: fullBleedContentChildrenAlign
|
|
272
|
+
})
|
|
273
|
+
},
|
|
274
|
+
variant: variant,
|
|
275
|
+
withFooter: hasFooter,
|
|
276
|
+
children: children
|
|
277
|
+
})
|
|
278
|
+
}) : null, fullBleedContentPosition !== 'none' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConditionalWrapper.default, {
|
|
279
|
+
WrapperComponent: DynamicWidthContainer,
|
|
280
|
+
wrapperProps: imageWrapperStyleProps,
|
|
281
|
+
condition: isImageWidthAdjustable,
|
|
282
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullBleedContent.default, {
|
|
283
|
+
borderRadius: fullBleedBorderRadius,
|
|
284
|
+
...fullBleedContentPropsClean,
|
|
285
|
+
position: fullBleedContentPosition,
|
|
286
|
+
cardState: cardState
|
|
287
|
+
})
|
|
288
|
+
})]
|
|
289
|
+
})
|
|
164
290
|
})
|
|
165
|
-
}) : null,
|
|
291
|
+
}) : null, !fullBleedInteractive && !interactiveCard?.body && fullBleedContentPosition === 'none' && children ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardContent.default, {
|
|
292
|
+
tokens: {
|
|
293
|
+
...tokens,
|
|
294
|
+
...(backgroundImage ? {
|
|
295
|
+
backgroundColor: 'transparent'
|
|
296
|
+
} : {}),
|
|
297
|
+
...(fullBleedContentChildrenAlign && {
|
|
298
|
+
alignSelf: fullBleedContentChildrenAlign
|
|
299
|
+
})
|
|
300
|
+
},
|
|
301
|
+
variant: variant,
|
|
302
|
+
withFooter: hasFooter,
|
|
303
|
+
children: children
|
|
304
|
+
}) : null, !fullBleedInteractive && fullBleedContentPosition !== 'none' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.StackView, {
|
|
166
305
|
direction: contentStackDirection,
|
|
167
306
|
tokens: {
|
|
168
307
|
...columnFlex,
|
|
@@ -176,7 +315,7 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
|
|
|
176
315
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardContent.default, {
|
|
177
316
|
tokens: {
|
|
178
317
|
...tokens,
|
|
179
|
-
...(fullBleedContentChildrenAlign && {
|
|
318
|
+
...(!isImageWidthAdjustable && fullBleedContentChildrenAlign && {
|
|
180
319
|
alignSelf: fullBleedContentChildrenAlign
|
|
181
320
|
})
|
|
182
321
|
},
|
|
@@ -184,14 +323,15 @@ const Card = /*#__PURE__*/_react.default.forwardRef(function () {
|
|
|
184
323
|
withFooter: hasFooter,
|
|
185
324
|
children: children
|
|
186
325
|
})
|
|
187
|
-
}) : null,
|
|
326
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConditionalWrapper.default, {
|
|
188
327
|
WrapperComponent: DynamicWidthContainer,
|
|
189
328
|
wrapperProps: imageWrapperStyleProps,
|
|
190
329
|
condition: isImageWidthAdjustable,
|
|
191
330
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullBleedContent.default, {
|
|
192
331
|
borderRadius: fullBleedBorderRadius,
|
|
193
|
-
...
|
|
194
|
-
position: fullBleedContentPosition
|
|
332
|
+
...fullBleedContentPropsClean,
|
|
333
|
+
position: fullBleedContentPosition,
|
|
334
|
+
cardState: undefined
|
|
195
335
|
})
|
|
196
336
|
})]
|
|
197
337
|
}) : null, footer && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardFooter.default, {
|
|
@@ -208,6 +348,26 @@ const PositionedFullBleedContentPropType = _propTypes.default.shape({
|
|
|
208
348
|
position: _componentsBase.responsiveProps.getTypeOptionallyByViewport(_propTypes.default.oneOf(positionValues)).isRequired,
|
|
209
349
|
align: _componentsBase.responsiveProps.getTypeOptionallyByViewport(_propTypes.default.oneOf(alignValues)),
|
|
210
350
|
contentAlign: _componentsBase.responsiveProps.getTypeOptionallyByViewport(_propTypes.default.oneOf(alignValues)),
|
|
351
|
+
/**
|
|
352
|
+
* Make the full bleed content interactive.
|
|
353
|
+
* When true, the entire card (including the full bleed content) becomes interactive.
|
|
354
|
+
*/
|
|
355
|
+
interactive: _propTypes.default.bool,
|
|
356
|
+
/**
|
|
357
|
+
* Function to call when the full bleed content is pressed.
|
|
358
|
+
* If not provided, falls back to the Card's onPress prop for backward compatibility.
|
|
359
|
+
*/
|
|
360
|
+
onPress: _propTypes.default.func,
|
|
361
|
+
/**
|
|
362
|
+
* URL to navigate to when the full bleed content is pressed.
|
|
363
|
+
* If not provided, falls back to the Card's href prop for backward compatibility.
|
|
364
|
+
*/
|
|
365
|
+
href: _propTypes.default.string,
|
|
366
|
+
/**
|
|
367
|
+
* Additional attributes for the href link.
|
|
368
|
+
* If not provided, falls back to the Card's hrefAttrs prop for backward compatibility.
|
|
369
|
+
*/
|
|
370
|
+
hrefAttrs: _propTypes.default.shape(_componentsBase.hrefAttrsProp.types),
|
|
211
371
|
// eslint-disable-next-line react/forbid-foreign-prop-types
|
|
212
372
|
..._FullBleedContent.default.propTypes
|
|
213
373
|
});
|
|
@@ -28,7 +28,8 @@ const CardContentContainer = /*#__PURE__*/_styledComponents.default.div.withConf
|
|
|
28
28
|
contentFlexShrink: flexShrink,
|
|
29
29
|
contentJustifyContent: justifyContent,
|
|
30
30
|
borderWidth,
|
|
31
|
-
alignSelf
|
|
31
|
+
alignSelf,
|
|
32
|
+
backgroundColor
|
|
32
33
|
} = _ref;
|
|
33
34
|
return {
|
|
34
35
|
// We need to make sure to have sharp corners on the bottom
|
|
@@ -47,7 +48,8 @@ const CardContentContainer = /*#__PURE__*/_styledComponents.default.div.withConf
|
|
|
47
48
|
flexGrow,
|
|
48
49
|
flexShrink,
|
|
49
50
|
justifyContent,
|
|
50
|
-
alignSelf
|
|
51
|
+
alignSelf,
|
|
52
|
+
backgroundColor
|
|
51
53
|
};
|
|
52
54
|
});
|
|
53
55
|
|
|
@@ -45,6 +45,7 @@ const NavigationBar = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
45
45
|
LinkRouter,
|
|
46
46
|
linkRouterProps,
|
|
47
47
|
tokens,
|
|
48
|
+
variant,
|
|
48
49
|
...rest
|
|
49
50
|
} = _ref;
|
|
50
51
|
const {
|
|
@@ -211,6 +212,7 @@ const NavigationBar = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
211
212
|
},
|
|
212
213
|
items: scrollableNestedItems,
|
|
213
214
|
tokens: tokens,
|
|
215
|
+
variant: variant,
|
|
214
216
|
selected: itemId === currentValue,
|
|
215
217
|
itemsContainerRef: itemsRef,
|
|
216
218
|
...itemRest,
|
|
@@ -279,6 +281,10 @@ NavigationBar.propTypes = {
|
|
|
279
281
|
/**
|
|
280
282
|
* Accesibility role for stackview
|
|
281
283
|
*/
|
|
282
|
-
accessibilityRole: _propTypes.default.string
|
|
284
|
+
accessibilityRole: _propTypes.default.string,
|
|
285
|
+
/**
|
|
286
|
+
* Variant configuration
|
|
287
|
+
*/
|
|
288
|
+
variant: _componentsBase.variantProp.propType
|
|
283
289
|
};
|
|
284
290
|
var _default = exports.default = NavigationBar;
|
|
@@ -22,6 +22,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
22
|
id,
|
|
23
23
|
isOpen = false,
|
|
24
24
|
tokens = {},
|
|
25
|
+
variant = {},
|
|
25
26
|
label,
|
|
26
27
|
onClick,
|
|
27
28
|
selectedId,
|
|
@@ -125,6 +126,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
125
126
|
isReady: isReady,
|
|
126
127
|
onLayout: onTargetLayout,
|
|
127
128
|
ref: openOverlayRef,
|
|
129
|
+
variant: variant,
|
|
128
130
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Listbox, {
|
|
129
131
|
items: items,
|
|
130
132
|
firstItemRef: targetRef,
|
|
@@ -132,6 +134,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
132
134
|
selectedId: selectedId,
|
|
133
135
|
LinkRouter: LinkRouter,
|
|
134
136
|
linkRouterProps: linkRouterProps,
|
|
137
|
+
variant: variant,
|
|
135
138
|
ref: itemsContainerRef || ref
|
|
136
139
|
})
|
|
137
140
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -159,6 +162,7 @@ NavigationSubMenu.propTypes = {
|
|
|
159
162
|
openOverlayRef: _propTypes.default.object,
|
|
160
163
|
LinkRouter: _propTypes.default.elementType,
|
|
161
164
|
linkRouterProps: _propTypes.default.object,
|
|
162
|
-
itemsContainerRef: _propTypes.default.object
|
|
165
|
+
itemsContainerRef: _propTypes.default.object,
|
|
166
|
+
variant: _propTypes.default.object
|
|
163
167
|
};
|
|
164
168
|
var _default = exports.default = NavigationSubMenu;
|
|
@@ -46,14 +46,19 @@ const FullBleedContentContainer = /*#__PURE__*/_styledComponents.default.div.wit
|
|
|
46
46
|
borderBottomLeftRadius,
|
|
47
47
|
borderBottomRightRadius,
|
|
48
48
|
borderTopLeftRadius,
|
|
49
|
-
borderTopRightRadius
|
|
49
|
+
borderTopRightRadius,
|
|
50
|
+
opacity,
|
|
51
|
+
transform
|
|
50
52
|
} = _ref2;
|
|
51
53
|
return {
|
|
52
54
|
overflow: 'hidden',
|
|
53
55
|
borderBottomLeftRadius,
|
|
54
56
|
borderBottomRightRadius,
|
|
55
57
|
borderTopLeftRadius,
|
|
56
|
-
borderTopRightRadius
|
|
58
|
+
borderTopRightRadius,
|
|
59
|
+
opacity,
|
|
60
|
+
transform,
|
|
61
|
+
transition: 'opacity 0.2s ease, transform 0.2s ease'
|
|
57
62
|
};
|
|
58
63
|
});
|
|
59
64
|
|
|
@@ -66,6 +71,7 @@ const FullBleedContent = _ref3 => {
|
|
|
66
71
|
let {
|
|
67
72
|
borderRadius,
|
|
68
73
|
content,
|
|
74
|
+
cardState,
|
|
69
75
|
...rest
|
|
70
76
|
} = _ref3;
|
|
71
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FullBleedContentContainer, {
|
|
@@ -89,6 +95,14 @@ FullBleedContent.propTypes = {
|
|
|
89
95
|
* Custom JSX to be used for rendering the content (defaults to `ResponsiveImage` receiving other props).
|
|
90
96
|
*/
|
|
91
97
|
content: _propTypes.default.node,
|
|
98
|
+
/**
|
|
99
|
+
* Card state object containing interactive states (hovered, pressed, focused).
|
|
100
|
+
*/
|
|
101
|
+
cardState: _propTypes.default.shape({
|
|
102
|
+
hovered: _propTypes.default.bool,
|
|
103
|
+
pressed: _propTypes.default.bool,
|
|
104
|
+
focused: _propTypes.default.bool
|
|
105
|
+
}),
|
|
92
106
|
/**
|
|
93
107
|
* Image source.
|
|
94
108
|
*/
|
|
@@ -52,7 +52,7 @@ const useFullBleedContentProps = fullBleedContent => {
|
|
|
52
52
|
const contentStackDirection = getContentStackDirection(fullBleedContentPosition);
|
|
53
53
|
const fullBleedContentAlign = (0, _componentsBase.useResponsiveProp)(fullBleedContentAlignProp, 'stretch');
|
|
54
54
|
const contentStackAlign = getContentStackAlign(fullBleedContentAlign);
|
|
55
|
-
const fullBleedContentChildrenAlign = (0, _componentsBase.useResponsiveProp)(fullBleedContentChildrenAlignProp,
|
|
55
|
+
const fullBleedContentChildrenAlign = (0, _componentsBase.useResponsiveProp)(fullBleedContentChildrenAlignProp, fullBleedContentAlign);
|
|
56
56
|
return {
|
|
57
57
|
contentStackAlign,
|
|
58
58
|
contentStackDirection,
|