@telus-uds/components-web 3.0.1 → 3.1.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 +17 -2
- package/lib/Badge/Badge.js +0 -0
- package/lib/Badge/index.js +0 -0
- package/lib/BlockQuote/BlockQuote.js +56 -10
- package/lib/BlockQuote/index.js +0 -0
- package/lib/Breadcrumbs/Breadcrumbs.js +0 -0
- package/lib/Breadcrumbs/Item/Item.js +0 -0
- package/lib/Breadcrumbs/index.js +0 -0
- package/lib/Callout/Callout.js +0 -0
- package/lib/Callout/index.js +0 -0
- package/lib/Card/Card.js +0 -0
- package/lib/Card/CardContent.js +0 -0
- package/lib/Card/CardFooter.js +0 -0
- package/lib/Card/index.js +0 -0
- package/lib/Countdown/Countdown.js +78 -6
- package/lib/Countdown/Segment.js +6 -0
- package/lib/Countdown/constants.js +0 -0
- package/lib/Countdown/dictionary.js +0 -0
- package/lib/Countdown/index.js +0 -0
- package/lib/Countdown/types.js +0 -0
- package/lib/Countdown/useCountdown.js +0 -0
- package/lib/DatePicker/CalendarContainer.js +0 -0
- package/lib/DatePicker/DatePicker.js +0 -0
- package/lib/DatePicker/dictionary.js +0 -0
- package/lib/DatePicker/index.js +0 -0
- package/lib/DatePicker/reactDatesCss.js +0 -0
- package/lib/Disclaimer/Disclaimer.js +0 -0
- package/lib/Disclaimer/index.js +0 -0
- package/lib/ExpandCollapseMini/ExpandCollapseMini.js +0 -0
- package/lib/ExpandCollapseMini/ExpandCollapseMiniControl.js +0 -0
- package/lib/ExpandCollapseMini/index.js +0 -0
- package/lib/Footnote/Footnote.js +0 -0
- package/lib/Footnote/FootnoteLink.js +0 -0
- package/lib/Footnote/dictionary.js +0 -0
- package/lib/Footnote/index.js +0 -0
- package/lib/IconButton/IconButton.js +0 -0
- package/lib/IconButton/index.js +0 -0
- package/lib/Image/Image.js +0 -0
- package/lib/Image/index.js +0 -0
- package/lib/Image/server.js +0 -0
- package/lib/List/List.js +0 -0
- package/lib/List/ListItem.js +0 -0
- package/lib/List/index.js +0 -0
- package/lib/NavigationBar/NavigationBar.js +0 -0
- package/lib/NavigationBar/NavigationItem.js +0 -0
- package/lib/NavigationBar/NavigationSubMenu.js +0 -0
- package/lib/NavigationBar/collapseItems.js +0 -0
- package/lib/NavigationBar/index.js +0 -0
- package/lib/NavigationBar/resolveItemSelection.js +0 -0
- package/lib/OptimizeImage/OptimizeImage.js +0 -0
- package/lib/OptimizeImage/index.js +0 -0
- package/lib/OptimizeImage/utils/getFallbackUrl.js +0 -0
- package/lib/OptimizeImage/utils/getImageUrls.js +0 -0
- package/lib/OptimizeImage/utils/getOptimizedUrl.js +0 -0
- package/lib/OptimizeImage/utils/hasWebpSupport.js +0 -0
- package/lib/OptimizeImage/utils/index.js +0 -0
- package/lib/OptimizeImage/utils/isSvgUrl.js +0 -0
- package/lib/OrderedList/Item.js +0 -0
- package/lib/OrderedList/ItemBase.js +0 -0
- package/lib/OrderedList/OrderedList.js +0 -0
- package/lib/OrderedList/OrderedListBase.js +0 -0
- package/lib/OrderedList/constants.js +0 -0
- package/lib/OrderedList/index.js +0 -0
- package/lib/Paragraph/Paragraph.js +0 -0
- package/lib/Paragraph/index.js +0 -0
- package/lib/PreviewCard/AuthorDate.js +0 -0
- package/lib/PreviewCard/PreviewCard.js +0 -0
- package/lib/PreviewCard/index.js +0 -0
- package/lib/PriceLockup/PriceLockup.js +0 -0
- package/lib/PriceLockup/index.js +0 -0
- package/lib/PriceLockup/tokens.js +0 -0
- package/lib/Progress/ProgressBar.js +11 -1
- package/lib/Progress/index.js +0 -0
- package/lib/QuantitySelector/QuantitySelector.js +0 -0
- package/lib/QuantitySelector/SideButton.js +0 -0
- package/lib/QuantitySelector/dictionary.js +0 -0
- package/lib/QuantitySelector/index.js +0 -0
- package/lib/QuantitySelector/styles.js +0 -0
- package/lib/ResponsiveImage/ResponsiveImage.js +2 -2
- package/lib/ResponsiveImage/index.js +0 -0
- package/lib/Ribbon/Ribbon.js +0 -0
- package/lib/Ribbon/index.js +0 -0
- package/lib/SkeletonProvider/SkeletonImage.js +0 -0
- package/lib/SkeletonProvider/SkeletonProvider.js +0 -0
- package/lib/SkeletonProvider/SkeletonTypography.js +0 -0
- package/lib/SkeletonProvider/index.js +0 -0
- package/lib/Span/Span.js +0 -0
- package/lib/Span/index.js +0 -0
- package/lib/Spinner/Spinner.js +0 -0
- package/lib/Spinner/SpinnerContent.js +0 -0
- package/lib/Spinner/constants.js +0 -0
- package/lib/Spinner/index.js +0 -0
- package/lib/StoryCard/StoryCard.js +0 -0
- package/lib/StoryCard/index.js +0 -0
- package/lib/Table/Body.js +0 -0
- package/lib/Table/Cell.js +0 -0
- package/lib/Table/Header.js +0 -0
- package/lib/Table/Row.js +0 -0
- package/lib/Table/SubHeading.js +0 -0
- package/lib/Table/Table.js +0 -0
- package/lib/Table/index.js +0 -0
- package/lib/TermsAndConditions/ExpandCollapse.js +0 -0
- package/lib/TermsAndConditions/TermsAndConditions.js +0 -0
- package/lib/TermsAndConditions/dictionary.js +0 -0
- package/lib/TermsAndConditions/index.js +0 -0
- package/lib/Testimonial/Testimonial.js +0 -0
- package/lib/Testimonial/index.js +0 -0
- package/lib/Toast/Toast.js +0 -0
- package/lib/Toast/index.js +0 -0
- package/lib/Video/ControlBar/ControlBar.js +0 -0
- package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +0 -0
- package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +0 -0
- package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +3 -0
- package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +0 -0
- package/lib/Video/MiddleControlButton/MiddleControlButton.js +0 -0
- package/lib/Video/Video.js +0 -0
- package/lib/Video/index.js +0 -0
- package/lib/Video/videoText.js +0 -0
- package/lib/VideoPicker/VideoPicker.js +0 -0
- package/lib/VideoPicker/VideoPickerPlayer.js +0 -0
- package/lib/VideoPicker/VideoPickerThumbnail.js +0 -0
- package/lib/VideoPicker/VideoSlider.js +0 -0
- package/lib/VideoPicker/index.js +0 -0
- package/lib/VideoPicker/videoPropType.js +0 -0
- package/lib/WaffleGrid/WaffleGrid.js +0 -0
- package/lib/WaffleGrid/index.js +0 -0
- package/lib/WebVideo/WebVideo.js +0 -0
- package/lib/WebVideo/index.js +0 -0
- package/lib/WebVideo/utils/index.js +0 -0
- package/lib/baseExports.js +0 -0
- package/lib/index.js +0 -0
- package/lib/server.js +0 -0
- package/lib/shared/ConditionalWrapper/ConditionalWrapper.js +0 -0
- package/lib/shared/ConditionalWrapper/index.js +0 -0
- package/lib/shared/FullBleedContent/FullBleedContent.js +0 -0
- package/lib/shared/FullBleedContent/getFullBleedBorderRadius.js +0 -0
- package/lib/shared/FullBleedContent/index.js +0 -0
- package/lib/shared/FullBleedContent/useFullBleedContentProps.js +0 -0
- package/lib/shared/VideoSplash/SplashButton/SplashButton.js +0 -0
- package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +0 -0
- package/lib/shared/VideoSplash/VideoSplash.js +0 -0
- package/lib/shared/VideoSplash/helpers.js +0 -0
- package/lib/utils/index.js +2 -2
- package/lib/utils/isElementFocusable.js +0 -0
- package/lib/utils/logger.js +0 -0
- package/lib/utils/media.js +0 -0
- package/lib/utils/renderStructuredContent.js +0 -0
- package/lib/utils/ssr.js +0 -0
- package/lib/utils/theming/get-theme-from-server.js +0 -0
- package/lib/utils/theming/with-client-theme.js +0 -0
- package/lib/utils/theming/with-server-theme.js +0 -0
- package/lib/utils/transforms.js +0 -0
- package/lib/utils/useOverlaidPosition.js +0 -0
- package/lib/utils/useTypographyTheme.js +0 -0
- package/package.json +3 -3
- package/src/BlockQuote/BlockQuote.jsx +73 -11
- package/src/Countdown/Countdown.jsx +90 -6
- package/src/Countdown/Segment.jsx +8 -2
- package/src/Progress/ProgressBar.jsx +11 -2
- package/src/ResponsiveImage/ResponsiveImage.jsx +2 -2
- package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +5 -1
- package/src/utils/index.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
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, 02 Dec 2024 20:23:48 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 3.1.0
|
|
8
|
+
|
|
9
|
+
Mon, 02 Dec 2024 20:23:48 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- `Progress`: Added rules for `subtle` and `inverse` variants. Deprecated `inactive` and `negative` appearances and moved them to `style` appearances. Enabled `offset` object for controlling the position of the `ProgressBar` component. (jaime.tuyuc@telus.com)
|
|
14
|
+
- `Blockquote`: refactor to use media query stylesheet (Mauricio.BatresMontejo@telus.com)
|
|
15
|
+
- `CountDown`: refactor component to use media-query-stylesheet (Mauricio.BatresMontejo@telus.com)
|
|
16
|
+
- `ChevronLink`, `Search` & `ResponsiveImage`: new contentful props data-contentful-field-id and data-contentful-entry-id added to the components (35577399+JoshHC@users.noreply.github.com)
|
|
17
|
+
- `Modal`: update component to enable heading bottom border and content spacing (eduardo.pereira1@telus.com)
|
|
18
|
+
- `Video`: new tokens remainingTimestampMarginRight and remainingTimestampMarginLeft added to match with the visual design intention (35577399+JoshHC@users.noreply.github.com)
|
|
19
|
+
- Bump @telus-uds/components-base to v2.1.0
|
|
20
|
+
- Bump @telus-uds/system-theme-tokens to v3.1.0
|
|
21
|
+
|
|
7
22
|
## 3.0.1
|
|
8
23
|
|
|
9
|
-
Sat, 23 Nov 2024 01:
|
|
24
|
+
Sat, 23 Nov 2024 01:40:21 GMT
|
|
10
25
|
|
|
11
26
|
### Patches
|
|
12
27
|
|
package/lib/Badge/Badge.js
CHANGED
|
File without changes
|
package/lib/Badge/index.js
CHANGED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Link, selectSystemProps, StackView, Typography, useThemeTokens, withLinkRouter, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
3
|
+
import { Link, selectSystemProps, StackView, Typography, useTheme, useThemeTokens, useResponsiveThemeTokens, createMediaQueryStyles, withLinkRouter, useViewport, getTokensPropType, StyleSheet } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { htmlAttrs, transformGradient } from '../utils';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -48,6 +48,12 @@ const QuoteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
48
48
|
} = _ref7;
|
|
49
49
|
return `${marginBottom}px`;
|
|
50
50
|
});
|
|
51
|
+
const selectTitleHeadingTokens = themeTokens => ({
|
|
52
|
+
fontSize: themeTokens.titleHeadingFontSize,
|
|
53
|
+
fontName: themeTokens.titleHeadingFontName,
|
|
54
|
+
fontWeight: themeTokens.titleHeadingFontWeight,
|
|
55
|
+
lineHeight: themeTokens.titleHeadingLineHeight
|
|
56
|
+
});
|
|
51
57
|
const BlockQuote = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
52
58
|
let {
|
|
53
59
|
children,
|
|
@@ -62,6 +68,15 @@ const BlockQuote = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
|
62
68
|
...rest
|
|
63
69
|
} = _ref8;
|
|
64
70
|
const viewport = useViewport();
|
|
71
|
+
const {
|
|
72
|
+
themeOptions: {
|
|
73
|
+
enableMediaQueryStyleSheet
|
|
74
|
+
}
|
|
75
|
+
} = useTheme();
|
|
76
|
+
const useTokens = enableMediaQueryStyleSheet ? useResponsiveThemeTokens : useThemeTokens;
|
|
77
|
+
const themeTokens = useTokens('BlockQuote', tokens, variant, !enableMediaQueryStyleSheet && {
|
|
78
|
+
viewport
|
|
79
|
+
});
|
|
65
80
|
const {
|
|
66
81
|
color,
|
|
67
82
|
paddingTop,
|
|
@@ -83,16 +98,46 @@ const BlockQuote = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
|
83
98
|
linkFontName,
|
|
84
99
|
linkFontWeight,
|
|
85
100
|
linkLineHeight
|
|
86
|
-
} =
|
|
87
|
-
|
|
88
|
-
|
|
101
|
+
} = themeTokens;
|
|
102
|
+
let titleHeadingStyles;
|
|
103
|
+
let titleHeadingMediaIds;
|
|
104
|
+
if (enableMediaQueryStyleSheet) {
|
|
105
|
+
const {
|
|
106
|
+
transformedTitleHeadingThemeTokens
|
|
107
|
+
} = Object.entries(themeTokens).reduce((acc, _ref9) => {
|
|
108
|
+
let [vp, viewportTokens] = _ref9;
|
|
109
|
+
acc.transformedTitleHeadingThemeTokens[vp] = {
|
|
110
|
+
fontSize: viewportTokens.titleHeadingFontSize,
|
|
111
|
+
fontName: viewportTokens.titleHeadingFontName,
|
|
112
|
+
fontWeight: viewportTokens.titleHeadingFontWeight,
|
|
113
|
+
lineHeight: viewportTokens.titleHeadingLineHeight
|
|
114
|
+
};
|
|
115
|
+
return acc;
|
|
116
|
+
}, {
|
|
117
|
+
transformedTitleHeadingThemeTokens: {}
|
|
118
|
+
});
|
|
119
|
+
const titleHeadingMediaQueryStyles = createMediaQueryStyles(transformedTitleHeadingThemeTokens);
|
|
120
|
+
const {
|
|
121
|
+
ids,
|
|
122
|
+
styles
|
|
123
|
+
} = StyleSheet.create({
|
|
124
|
+
titleHeading: {
|
|
125
|
+
...selectTitleHeadingTokens(themeTokens[viewport]),
|
|
126
|
+
...titleHeadingMediaQueryStyles
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
titleHeadingStyles = styles.titleHeading;
|
|
130
|
+
titleHeadingMediaIds = ids.titleHeading;
|
|
131
|
+
} else {
|
|
132
|
+
titleHeadingStyles = {
|
|
133
|
+
fontSize: titleHeadingFontSize,
|
|
134
|
+
fontName: titleHeadingFontName,
|
|
135
|
+
fontWeight: titleHeadingFontWeight,
|
|
136
|
+
lineHeight: titleHeadingLineHeight
|
|
137
|
+
};
|
|
138
|
+
}
|
|
89
139
|
const mappedTextSize = textStyle === 'heading' ? 'h3' : textStyle;
|
|
90
|
-
const titleTokens = textStyle === 'heading' ? {
|
|
91
|
-
fontSize: titleHeadingFontSize,
|
|
92
|
-
fontName: titleHeadingFontName,
|
|
93
|
-
fontWeight: titleHeadingFontWeight,
|
|
94
|
-
lineHeight: titleHeadingLineHeight
|
|
95
|
-
} : {
|
|
140
|
+
const titleTokens = textStyle === 'heading' ? titleHeadingStyles : {
|
|
96
141
|
fontSize: titleFontSize,
|
|
97
142
|
fontName: titleFontName,
|
|
98
143
|
fontWeight: titleFontWeight,
|
|
@@ -134,6 +179,7 @@ const BlockQuote = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
|
134
179
|
color,
|
|
135
180
|
...titleTokens
|
|
136
181
|
},
|
|
182
|
+
media: titleHeadingMediaIds,
|
|
137
183
|
variant: {
|
|
138
184
|
size: mappedTextSize
|
|
139
185
|
},
|
package/lib/BlockQuote/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/Breadcrumbs/index.js
CHANGED
|
File without changes
|
package/lib/Callout/Callout.js
CHANGED
|
File without changes
|
package/lib/Callout/index.js
CHANGED
|
File without changes
|
package/lib/Card/Card.js
CHANGED
|
File without changes
|
package/lib/Card/CardContent.js
CHANGED
|
File without changes
|
package/lib/Card/CardFooter.js
CHANGED
|
File without changes
|
package/lib/Card/index.js
CHANGED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Spacer, StackView, Typography, selectSystemProps, useViewport, useThemeTokens, applyTextStyles, getTokensPropType } from '@telus-uds/components-base';
|
|
3
|
+
import { Spacer, StackView, Typography, selectSystemProps, useViewport, useTheme, useThemeTokens, useResponsiveThemeTokens, createMediaQueryStyles, applyTextStyles, getTokensPropType, StyleSheet } from '@telus-uds/components-base';
|
|
4
4
|
import { viewports } from '@telus-uds/system-constants';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
// Reading these from the RN palette since they will be used to generate
|
|
@@ -87,12 +87,82 @@ const Countdown = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
87
87
|
if (noDivider && !label) {
|
|
88
88
|
throw new Error('`noDivider` variant can only be used with `label` enabled!');
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const {
|
|
91
|
+
themeOptions
|
|
92
|
+
} = useTheme();
|
|
93
|
+
const {
|
|
94
|
+
enableMediaQueryStyleSheet
|
|
95
|
+
} = themeOptions;
|
|
96
|
+
const useTokens = enableMediaQueryStyleSheet ? useResponsiveThemeTokens : useThemeTokens;
|
|
97
|
+
const themeTokens = useTokens('Countdown', tokens, variant, !enableMediaQueryStyleSheet && {
|
|
91
98
|
viewport
|
|
92
99
|
});
|
|
93
100
|
const segmentFontSize = themeTokens.textFontSize;
|
|
94
101
|
const semanticGradient = themeTokens.containerGradient && transformGradient(themeTokens.containerGradient);
|
|
95
102
|
const mainTextTokens = getMainTextTokens(themeTokens);
|
|
103
|
+
const labelTokens = getLabelTokens(themeTokens);
|
|
104
|
+
let labelStyles;
|
|
105
|
+
let labelMediaIds;
|
|
106
|
+
let mainTextStyles;
|
|
107
|
+
let mainTextMediaIds;
|
|
108
|
+
let containerStyles;
|
|
109
|
+
let containerMediaIds;
|
|
110
|
+
if (enableMediaQueryStyleSheet) {
|
|
111
|
+
const {
|
|
112
|
+
transformedLabelThemeTokens,
|
|
113
|
+
transformedMainTextThemeTokens,
|
|
114
|
+
transformedContainerThemeTokens
|
|
115
|
+
} = Object.entries(themeTokens).reduce((acc, _ref4) => {
|
|
116
|
+
let [vp, viewportTokens] = _ref4;
|
|
117
|
+
acc.transformedLabelThemeTokens[vp] = {
|
|
118
|
+
fontSize: viewportTokens.labelFontSize,
|
|
119
|
+
lineHeight: viewportTokens.labelLineHeight
|
|
120
|
+
};
|
|
121
|
+
acc.transformedMainTextThemeTokens[vp] = {
|
|
122
|
+
fontSize: viewportTokens.textFontSize,
|
|
123
|
+
lineHeight: viewportTokens.textLineHeight
|
|
124
|
+
};
|
|
125
|
+
acc.transformedContainerThemeTokens[vp] = {
|
|
126
|
+
containerPaddingBottomTop: viewportTokens.containerPaddingBottomTop,
|
|
127
|
+
containerPaddingLeftRight: viewportTokens.containerPaddingLeftRight
|
|
128
|
+
};
|
|
129
|
+
return acc;
|
|
130
|
+
}, {
|
|
131
|
+
transformedLabelThemeTokens: {},
|
|
132
|
+
transformedMainTextThemeTokens: {},
|
|
133
|
+
transformedContainerThemeTokens: {}
|
|
134
|
+
});
|
|
135
|
+
const labelMediaQueryStyles = createMediaQueryStyles(transformedLabelThemeTokens);
|
|
136
|
+
const mainTestMediaQueryStyles = createMediaQueryStyles(transformedMainTextThemeTokens);
|
|
137
|
+
const containerMediaQueryStyles = createMediaQueryStyles(transformedContainerThemeTokens);
|
|
138
|
+
const {
|
|
139
|
+
ids,
|
|
140
|
+
styles
|
|
141
|
+
} = StyleSheet.create({
|
|
142
|
+
label: {
|
|
143
|
+
...themeTokens[viewport],
|
|
144
|
+
...labelMediaQueryStyles
|
|
145
|
+
},
|
|
146
|
+
mainText: {
|
|
147
|
+
...themeTokens[viewport],
|
|
148
|
+
...mainTestMediaQueryStyles
|
|
149
|
+
},
|
|
150
|
+
container: {
|
|
151
|
+
...themeTokens[viewport],
|
|
152
|
+
...containerMediaQueryStyles
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
labelStyles = getLabelTokens(styles.label);
|
|
156
|
+
labelMediaIds = ids.label;
|
|
157
|
+
mainTextStyles = getMainTextTokens(styles.mainText);
|
|
158
|
+
mainTextMediaIds = ids.mainText;
|
|
159
|
+
containerStyles = styles.container;
|
|
160
|
+
containerMediaIds = ids.container;
|
|
161
|
+
} else {
|
|
162
|
+
labelStyles = labelTokens;
|
|
163
|
+
mainTextStyles = mainTextTokens;
|
|
164
|
+
containerStyles = themeTokens;
|
|
165
|
+
}
|
|
96
166
|
const divider = noDivider === true ?
|
|
97
167
|
/*#__PURE__*/
|
|
98
168
|
// StackView-based subcontainer adds a 1-step space on the each side of the divider
|
|
@@ -103,11 +173,12 @@ const Countdown = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
103
173
|
tokens: mainTextTokens,
|
|
104
174
|
children: ":"
|
|
105
175
|
});
|
|
106
|
-
const labelTokens = getLabelTokens(themeTokens);
|
|
107
176
|
const segmentProps = {
|
|
108
177
|
copy,
|
|
109
|
-
labelTokens,
|
|
110
|
-
numberTokens:
|
|
178
|
+
labelTokens: labelStyles,
|
|
179
|
+
numberTokens: mainTextStyles,
|
|
180
|
+
labelMediaIds,
|
|
181
|
+
mainTextMediaIds,
|
|
111
182
|
segmentFontSize,
|
|
112
183
|
variant
|
|
113
184
|
};
|
|
@@ -119,8 +190,9 @@ const Countdown = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
119
190
|
variant: variant,
|
|
120
191
|
...selectProps(rest),
|
|
121
192
|
tabIndex: 0,
|
|
122
|
-
themeTokens:
|
|
193
|
+
themeTokens: containerStyles,
|
|
123
194
|
gradient: semanticGradient,
|
|
195
|
+
media: containerMediaIds,
|
|
124
196
|
children: /*#__PURE__*/_jsxs(StackView, {
|
|
125
197
|
direction: "row",
|
|
126
198
|
space: 1,
|
package/lib/Countdown/Segment.js
CHANGED
|
@@ -45,6 +45,8 @@ const Segment = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
45
45
|
labelTokens,
|
|
46
46
|
number,
|
|
47
47
|
numberTokens,
|
|
48
|
+
labelMediaIds,
|
|
49
|
+
mainTextMediaIds,
|
|
48
50
|
segmentWidth = 2,
|
|
49
51
|
variant = {}
|
|
50
52
|
} = _ref2;
|
|
@@ -70,9 +72,11 @@ const Segment = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
70
72
|
},
|
|
71
73
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
72
74
|
tokens: numberTokens,
|
|
75
|
+
media: mainTextMediaIds,
|
|
73
76
|
children: pad(number, segmentWidth)
|
|
74
77
|
}), label && /*#__PURE__*/_jsx(Typography, {
|
|
75
78
|
tokens: labelTokens,
|
|
79
|
+
media: labelMediaIds,
|
|
76
80
|
children: getCopy(number === 1 ? labelKey : `${labelKey}s`)
|
|
77
81
|
})]
|
|
78
82
|
})
|
|
@@ -90,6 +94,8 @@ Segment.propTypes = {
|
|
|
90
94
|
number: PropTypes.number,
|
|
91
95
|
numberTokens: PropTypes.object,
|
|
92
96
|
segmentWidth: PropTypes.number,
|
|
97
|
+
labelMediaIds: PropTypes.string,
|
|
98
|
+
mainTextMediaIds: PropTypes.string,
|
|
93
99
|
variant: countdownVariantPropType
|
|
94
100
|
};
|
|
95
101
|
export default Segment;
|
|
File without changes
|
|
File without changes
|
package/lib/Countdown/index.js
CHANGED
|
File without changes
|
package/lib/Countdown/types.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/DatePicker/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/Disclaimer/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/Footnote/Footnote.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/Footnote/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/IconButton/index.js
CHANGED
|
File without changes
|
package/lib/Image/Image.js
CHANGED
|
File without changes
|
package/lib/Image/index.js
CHANGED
|
File without changes
|
package/lib/Image/server.js
CHANGED
|
File without changes
|
package/lib/List/List.js
CHANGED
|
File without changes
|
package/lib/List/ListItem.js
CHANGED
|
File without changes
|
package/lib/List/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/OrderedList/Item.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/OrderedList/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/Paragraph/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/PreviewCard/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/PriceLockup/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -44,11 +44,13 @@ const Gradient = /*#__PURE__*/styled.div.attrs({
|
|
|
44
44
|
* `gradient` is being used here to provide gradient filling.
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
47
|
+
|
|
47
48
|
const ProgressBar = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
48
49
|
let {
|
|
49
50
|
percentage,
|
|
50
51
|
tokens,
|
|
51
52
|
variant,
|
|
53
|
+
offset,
|
|
52
54
|
...rest
|
|
53
55
|
} = _ref2;
|
|
54
56
|
const themeTokens = useThemeTokens('ProgressBar', tokens, variant);
|
|
@@ -58,6 +60,7 @@ const ProgressBar = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
58
60
|
tokens: tokens,
|
|
59
61
|
variant: variant,
|
|
60
62
|
ref: ref,
|
|
63
|
+
offset: offset,
|
|
61
64
|
...selectedProps,
|
|
62
65
|
children: themeTokens.gradient && /*#__PURE__*/_jsx(Gradient, {
|
|
63
66
|
...themeTokens
|
|
@@ -78,6 +81,13 @@ ProgressBar.propTypes = {
|
|
|
78
81
|
/**
|
|
79
82
|
* ProgressBar variant.
|
|
80
83
|
*/
|
|
81
|
-
variant: variantProp.propType
|
|
84
|
+
variant: variantProp.propType,
|
|
85
|
+
/**
|
|
86
|
+
* Offset position.
|
|
87
|
+
*/
|
|
88
|
+
offset: PropTypes.shape({
|
|
89
|
+
items: PropTypes.number,
|
|
90
|
+
current: PropTypes.number
|
|
91
|
+
})
|
|
82
92
|
};
|
|
83
93
|
export default ProgressBar;
|
package/lib/Progress/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { selectSystemProps } from '@telus-uds/components-base';
|
|
4
4
|
import { viewports } from '@telus-uds/system-constants';
|
|
5
|
-
import { htmlAttrs } from '../utils';
|
|
5
|
+
import { htmlAttrs, contentfulProps } from '../utils';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
7
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs, contentfulProps]);
|
|
8
8
|
const staticStyles = {
|
|
9
9
|
image: {
|
|
10
10
|
display: 'block',
|
|
File without changes
|
package/lib/Ribbon/Ribbon.js
CHANGED
|
File without changes
|
package/lib/Ribbon/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/Span/Span.js
CHANGED
|
File without changes
|
package/lib/Span/index.js
CHANGED
|
File without changes
|
package/lib/Spinner/Spinner.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/Spinner/constants.js
CHANGED
|
File without changes
|
package/lib/Spinner/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/StoryCard/index.js
CHANGED
|
File without changes
|
package/lib/Table/Body.js
CHANGED
|
File without changes
|
package/lib/Table/Cell.js
CHANGED
|
File without changes
|
package/lib/Table/Header.js
CHANGED
|
File without changes
|
package/lib/Table/Row.js
CHANGED
|
File without changes
|
package/lib/Table/SubHeading.js
CHANGED
|
File without changes
|
package/lib/Table/Table.js
CHANGED
|
File without changes
|
package/lib/Table/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/Testimonial/index.js
CHANGED
|
File without changes
|
package/lib/Toast/Toast.js
CHANGED
|
File without changes
|
package/lib/Toast/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -133,6 +133,8 @@ const VideoProgressBar = _ref5 => {
|
|
|
133
133
|
thumbBackground,
|
|
134
134
|
timestampMarginLeft,
|
|
135
135
|
timestampMarginRight,
|
|
136
|
+
remainingTimestampMarginLeft,
|
|
137
|
+
remainingTimestampMarginRight,
|
|
136
138
|
trackGradientStart,
|
|
137
139
|
trackGradientEnd,
|
|
138
140
|
rangeBackground
|
|
@@ -180,6 +182,7 @@ const VideoProgressBar = _ref5 => {
|
|
|
180
182
|
tabIndex: "-1",
|
|
181
183
|
...sharedProps
|
|
182
184
|
}), /*#__PURE__*/_jsx(StyledTimestamp, {
|
|
185
|
+
margin: `0 ${remainingTimestampMarginRight}px 0 ${remainingTimestampMarginLeft}px`,
|
|
183
186
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
184
187
|
variant: {
|
|
185
188
|
inverse: true
|
|
File without changes
|
|
File without changes
|
package/lib/Video/Video.js
CHANGED
|
File without changes
|
package/lib/Video/index.js
CHANGED
|
File without changes
|
package/lib/Video/videoText.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|