@telus-uds/components-web 3.1.0 → 3.2.1
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 +28 -2
- package/lib/Badge/Badge.js +19 -11
- package/lib/BlockQuote/BlockQuote.js +31 -17
- package/lib/Breadcrumbs/Breadcrumbs.js +23 -17
- package/lib/Breadcrumbs/Item/Item.js +6 -10
- package/lib/Callout/Callout.js +5 -6
- package/lib/Card/Card.js +5 -5
- package/lib/Card/CardContent.js +5 -6
- package/lib/Card/CardFooter.js +5 -6
- package/lib/Countdown/Countdown.js +5 -6
- package/lib/Countdown/Segment.js +6 -6
- package/lib/DatePicker/CalendarContainer.js +5 -5
- package/lib/DatePicker/DatePicker.js +12 -18
- package/lib/DatePicker/reactDatesCss.js +829 -2
- package/lib/Disclaimer/Disclaimer.js +5 -6
- package/lib/Footnote/Footnote.js +15 -39
- package/lib/Footnote/FootnoteLink.js +5 -6
- package/lib/NavigationBar/NavigationBar.js +73 -20
- package/lib/NavigationBar/NavigationItem.js +5 -6
- package/lib/OrderedList/Item.js +7 -11
- package/lib/OrderedList/ItemBase.js +5 -5
- package/lib/OrderedList/OrderedList.js +5 -6
- package/lib/OrderedList/OrderedListBase.js +5 -5
- package/lib/Paragraph/Paragraph.js +16 -8
- package/lib/PreviewCard/PreviewCard.js +7 -10
- package/lib/PriceLockup/PriceLockup.js +64 -54
- package/lib/Progress/ProgressBar.js +6 -6
- package/lib/QuantitySelector/QuantitySelector.js +1 -1
- package/lib/QuantitySelector/styles.js +18 -9
- package/lib/ResponsiveImage/ResponsiveImage.js +7 -1
- package/lib/Ribbon/Ribbon.js +57 -31
- package/lib/Span/Span.js +6 -7
- package/lib/Spinner/Spinner.js +8 -18
- package/lib/Spinner/SpinnerContent.js +5 -6
- package/lib/StoryCard/StoryCard.js +7 -10
- package/lib/Table/Cell.js +43 -12
- package/lib/Table/Table.js +15 -11
- package/lib/TermsAndConditions/ExpandCollapse.js +7 -13
- package/lib/TermsAndConditions/TermsAndConditions.js +9 -22
- package/lib/Testimonial/Testimonial.js +10 -26
- package/lib/Toast/Toast.js +64 -13
- package/lib/Video/ControlBar/ControlBar.js +8 -18
- package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +5 -6
- package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +7 -14
- package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +7 -14
- package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +6 -10
- package/lib/Video/MiddleControlButton/MiddleControlButton.js +5 -6
- package/lib/Video/Video.js +10 -26
- package/lib/VideoPicker/VideoPicker.js +44 -20
- package/lib/VideoPicker/VideoPickerThumbnail.js +52 -18
- package/lib/WaffleGrid/WaffleGrid.js +7 -14
- package/lib/WebVideo/WebVideo.js +9 -14
- package/lib/index.js +1 -1
- package/lib/shared/FullBleedContent/FullBleedContent.js +5 -5
- package/lib/shared/VideoSplash/SplashButton/SplashButton.js +6 -9
- package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +8 -17
- package/lib/shared/VideoSplash/VideoSplash.js +5 -6
- package/lib/utils/index.js +3 -1
- package/lib/utils/scrollToAnchor.js +19 -0
- package/lib/utils/ssr.js +4 -1
- package/lib/utils/theming/styled-components.js +26 -0
- package/package.json +3 -3
- package/src/Badge/Badge.jsx +3 -2
- package/src/BlockQuote/BlockQuote.jsx +3 -2
- package/src/Breadcrumbs/Breadcrumbs.jsx +23 -13
- package/src/Breadcrumbs/Item/Item.jsx +3 -2
- package/src/Callout/Callout.jsx +3 -2
- package/src/Card/Card.jsx +3 -1
- package/src/Card/CardContent.jsx +3 -2
- package/src/Card/CardFooter.jsx +3 -2
- package/src/Countdown/Countdown.jsx +3 -2
- package/src/Countdown/Segment.jsx +3 -1
- package/src/DatePicker/CalendarContainer.jsx +3 -1
- package/src/DatePicker/DatePicker.jsx +3 -2
- package/src/DatePicker/reactDatesCss.js +3 -1
- package/src/Disclaimer/Disclaimer.jsx +3 -2
- package/src/Footnote/Footnote.jsx +9 -2
- package/src/Footnote/FootnoteLink.jsx +3 -2
- package/src/NavigationBar/NavigationBar.jsx +55 -13
- package/src/NavigationBar/NavigationItem.jsx +3 -2
- package/src/OrderedList/Item.jsx +4 -3
- package/src/OrderedList/ItemBase.jsx +3 -1
- package/src/OrderedList/OrderedList.jsx +3 -2
- package/src/OrderedList/OrderedListBase.jsx +3 -1
- package/src/Paragraph/Paragraph.jsx +3 -2
- package/src/PreviewCard/PreviewCard.jsx +3 -1
- package/src/PriceLockup/PriceLockup.jsx +3 -2
- package/src/Progress/ProgressBar.jsx +3 -1
- package/src/QuantitySelector/QuantitySelector.jsx +1 -1
- package/src/QuantitySelector/styles.js +3 -1
- package/src/ResponsiveImage/ResponsiveImage.jsx +10 -3
- package/src/Ribbon/Ribbon.jsx +3 -2
- package/src/Span/Span.jsx +3 -2
- package/src/Spinner/Spinner.jsx +3 -2
- package/src/Spinner/SpinnerContent.jsx +3 -2
- package/src/StoryCard/StoryCard.jsx +3 -1
- package/src/Table/Cell.jsx +3 -1
- package/src/Table/Table.jsx +3 -2
- package/src/TermsAndConditions/ExpandCollapse.jsx +3 -1
- package/src/TermsAndConditions/TermsAndConditions.jsx +3 -2
- package/src/Testimonial/Testimonial.jsx +3 -2
- package/src/Toast/Toast.jsx +3 -2
- package/src/Video/ControlBar/ControlBar.jsx +3 -3
- package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +4 -3
- package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +3 -3
- package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +3 -3
- package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +3 -3
- package/src/Video/MiddleControlButton/MiddleControlButton.jsx +4 -3
- package/src/Video/Video.jsx +3 -2
- package/src/VideoPicker/VideoPicker.jsx +3 -2
- package/src/VideoPicker/VideoPickerThumbnail.jsx +3 -1
- package/src/WaffleGrid/WaffleGrid.jsx +3 -2
- package/src/WebVideo/WebVideo.jsx +4 -3
- package/src/index.js +1 -1
- package/src/shared/FullBleedContent/FullBleedContent.jsx +3 -2
- package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +3 -1
- package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +4 -2
- package/src/shared/VideoSplash/VideoSplash.jsx +3 -2
- package/src/utils/index.js +5 -1
- package/src/utils/scrollToAnchor.js +18 -0
- package/src/utils/ssr.js +2 -1
- package/src/utils/theming/styled-components.js +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This log was last generated on Thu, 19 Dec 2024 04:54:39 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 3.2.1
|
|
8
|
+
|
|
9
|
+
Thu, 19 Dec 2024 04:54:39 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- `List`: fix TELUS, Koodo & Public Mobile styles (sergio.ramirez@telus.com)
|
|
14
|
+
- `Breadcrumbs`: fix layout shift due to performance issues (guillermo.peitzner@telus.com)
|
|
15
|
+
- `styled-components` may break SSR in Next.js Pages Router app (shahzaibkhalidmalik@outlook.com)
|
|
16
|
+
- Bump @telus-uds/components-base to v2.3.0
|
|
17
|
+
- Bump @telus-uds/system-theme-tokens to v3.2.0
|
|
18
|
+
|
|
19
|
+
## 3.2.0
|
|
20
|
+
|
|
21
|
+
Fri, 06 Dec 2024 02:06:03 GMT
|
|
22
|
+
|
|
23
|
+
### Minor changes
|
|
24
|
+
|
|
25
|
+
- `NavigationBar`: enable hash navigation (guillermo.peitzner@telus.com)
|
|
26
|
+
- `ChevronLink`, `Search` & `ResponsiveImage`: new `dataSet` prop added to the components to allow the capability to pass data (35577399+JoshHC@users.noreply.github.com)
|
|
27
|
+
- Bump @telus-uds/components-base to v2.2.0
|
|
28
|
+
|
|
29
|
+
### Patches
|
|
30
|
+
|
|
31
|
+
- `QuantitySelector`: render hint when no label is provided (guillermo.peitzner@telus.com)
|
|
32
|
+
|
|
7
33
|
## 3.1.0
|
|
8
34
|
|
|
9
|
-
Mon, 02 Dec 2024 20:
|
|
35
|
+
Mon, 02 Dec 2024 20:29:26 GMT
|
|
10
36
|
|
|
11
37
|
### Minor changes
|
|
12
38
|
|
package/lib/Badge/Badge.js
CHANGED
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import { selectSystemProps, Typography, getTokensPropType, useThemeTokens } from '@telus-uds/components-base';
|
|
5
|
-
import { htmlAttrs, transformGradient } from '../utils';
|
|
4
|
+
import { htmlAttrs, transformGradient, styledComponents } from '../utils';
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const {
|
|
8
|
+
styled
|
|
9
|
+
} = styledComponents;
|
|
10
|
+
const BadgeContainer = styled.div`
|
|
11
|
+
background: ${_ref => {
|
|
12
12
|
let {
|
|
13
13
|
background
|
|
14
14
|
} = _ref;
|
|
15
15
|
return background;
|
|
16
|
-
}
|
|
16
|
+
}};
|
|
17
|
+
border: ${_ref2 => {
|
|
17
18
|
let {
|
|
18
19
|
border
|
|
19
20
|
} = _ref2;
|
|
20
21
|
return border;
|
|
21
|
-
}
|
|
22
|
+
}};
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
padding: ${_ref3 => {
|
|
22
26
|
let {
|
|
23
27
|
padding
|
|
24
28
|
} = _ref3;
|
|
25
29
|
return padding;
|
|
26
|
-
}
|
|
30
|
+
}};
|
|
31
|
+
border-radius: ${_ref4 => {
|
|
27
32
|
let {
|
|
28
33
|
radius
|
|
29
34
|
} = _ref4;
|
|
30
35
|
return radius;
|
|
31
|
-
}
|
|
36
|
+
}};
|
|
37
|
+
width: fit-content;
|
|
38
|
+
${_ref5 => {
|
|
32
39
|
let {
|
|
33
40
|
isOutlineOffer,
|
|
34
41
|
isAlternative,
|
|
@@ -40,7 +47,8 @@ const BadgeContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
40
47
|
-webkit-background-clip: text;
|
|
41
48
|
${gradient && '-webkit-text-fill-color: transparent;'}
|
|
42
49
|
}`;
|
|
43
|
-
}
|
|
50
|
+
}}
|
|
51
|
+
`;
|
|
44
52
|
const fontSizeMapping = {
|
|
45
53
|
12: 'micro',
|
|
46
54
|
14: 'small',
|
|
@@ -1,53 +1,67 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Link, selectSystemProps, StackView, Typography, useTheme, useThemeTokens, useResponsiveThemeTokens, createMediaQueryStyles, withLinkRouter, useViewport, getTokensPropType, StyleSheet } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
5
|
-
import { htmlAttrs, transformGradient } from '../utils';
|
|
4
|
+
import { htmlAttrs, transformGradient, styledComponents } from '../utils';
|
|
6
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
6
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const {
|
|
8
|
+
styled
|
|
9
|
+
} = styledComponents;
|
|
10
|
+
const BlockQuoteContainer = styled.blockquote`
|
|
11
|
+
margin: 0;
|
|
12
|
+
position: relative;
|
|
13
|
+
padding-left: ${_ref => {
|
|
12
14
|
let {
|
|
13
15
|
paddingLeft
|
|
14
16
|
} = _ref;
|
|
15
17
|
return `${paddingLeft}px`;
|
|
16
|
-
}
|
|
18
|
+
}};
|
|
19
|
+
padding-right: ${_ref2 => {
|
|
17
20
|
let {
|
|
18
21
|
paddingRight
|
|
19
22
|
} = _ref2;
|
|
20
23
|
return `${paddingRight}px`;
|
|
21
|
-
}
|
|
24
|
+
}};
|
|
25
|
+
padding-bottom: ${_ref3 => {
|
|
22
26
|
let {
|
|
23
27
|
paddingBottom
|
|
24
28
|
} = _ref3;
|
|
25
29
|
return `${paddingBottom}px`;
|
|
26
|
-
}
|
|
30
|
+
}};
|
|
31
|
+
padding-top: ${_ref4 => {
|
|
27
32
|
let {
|
|
28
33
|
paddingTop
|
|
29
34
|
} = _ref4;
|
|
30
35
|
return `${paddingTop}px`;
|
|
31
|
-
}
|
|
36
|
+
}};
|
|
37
|
+
&::before {
|
|
38
|
+
content: '';
|
|
39
|
+
left: 0;
|
|
40
|
+
top: 0;
|
|
41
|
+
position: absolute;
|
|
42
|
+
height: 100%;
|
|
43
|
+
width: ${_ref5 => {
|
|
32
44
|
let {
|
|
33
45
|
width
|
|
34
46
|
} = _ref5;
|
|
35
47
|
return `${width}px`;
|
|
36
|
-
}
|
|
48
|
+
}};
|
|
49
|
+
background: ${_ref6 => {
|
|
37
50
|
let {
|
|
38
51
|
backgroundGradient
|
|
39
52
|
} = _ref6;
|
|
40
53
|
return backgroundGradient && transformGradient(backgroundGradient);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
}};
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
const QuoteContainer = styled.div`
|
|
58
|
+
margin-bottom: ${_ref7 => {
|
|
46
59
|
let {
|
|
47
60
|
marginBottom
|
|
48
61
|
} = _ref7;
|
|
49
62
|
return `${marginBottom}px`;
|
|
50
|
-
}
|
|
63
|
+
}};
|
|
64
|
+
`;
|
|
51
65
|
const selectTitleHeadingTokens = themeTokens => ({
|
|
52
66
|
fontSize: themeTokens.titleHeadingFontSize,
|
|
53
67
|
fontName: themeTokens.titleHeadingFontName,
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React, { createElement as _createElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
3
|
import { Helmet, HelmetProvider } from 'react-helmet-async';
|
|
5
4
|
import { isEqual } from 'lodash';
|
|
6
5
|
import { componentPropType, selectSystemProps, unpackFragment, withLinkRouter, getTokensPropType, useThemeTokens, useViewport } from '@telus-uds/components-base';
|
|
7
|
-
import { htmlAttrs } from '../utils';
|
|
6
|
+
import { htmlAttrs, styledComponents } from '../utils';
|
|
8
7
|
import Item from './Item/Item';
|
|
9
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const {
|
|
11
|
+
styled
|
|
12
|
+
} = styledComponents;
|
|
13
|
+
const StyledList = styled.ol({
|
|
15
14
|
display: 'flex',
|
|
16
15
|
flexDirection: 'row',
|
|
17
16
|
flexWrap: 'wrap',
|
|
@@ -135,15 +134,9 @@ const Breadcrumbs = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
135
134
|
const [optionsHidden, setOptionsHidden] = React.useState(false);
|
|
136
135
|
const [itemsToBeRendered, setItemsToBeRendered] = React.useState([]);
|
|
137
136
|
const viewport = useViewport();
|
|
138
|
-
React.
|
|
139
|
-
if (optionsHidden) {
|
|
140
|
-
if (viewport !== 'xs' && !isEqual(itemsToBeRendered, activeRoutes)) {
|
|
141
|
-
setItemsToBeRendered(activeRoutes);
|
|
142
|
-
}
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
137
|
+
const newItems = React.useMemo(() => {
|
|
145
138
|
if (viewport === 'xs' && activeRoutes.length >= MAX_ITEMS_ON_XS_VIEWPORT) {
|
|
146
|
-
|
|
139
|
+
return [...activeRoutes.slice(0, 2), {
|
|
147
140
|
path: '#',
|
|
148
141
|
breadcrumbName: '...',
|
|
149
142
|
onPress: event => {
|
|
@@ -152,12 +145,25 @@ const Breadcrumbs = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
152
145
|
},
|
|
153
146
|
isExpander: true
|
|
154
147
|
}, activeRoutes[activeRoutes.length - 1]];
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
}
|
|
149
|
+
return activeRoutes;
|
|
150
|
+
}, [viewport, activeRoutes]);
|
|
151
|
+
React.useEffect(() => {
|
|
152
|
+
if (optionsHidden) {
|
|
153
|
+
if (viewport !== 'xs' && !isEqual(itemsToBeRendered, activeRoutes)) {
|
|
154
|
+
setItemsToBeRendered(activeRoutes);
|
|
155
|
+
}
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (viewport === 'xs' && activeRoutes.length >= MAX_ITEMS_ON_XS_VIEWPORT) {
|
|
159
|
+
if (!isEqual(itemsToBeRendered, newItems)) {
|
|
160
|
+
setItemsToBeRendered(newItems);
|
|
161
|
+
setOptionsHidden(true);
|
|
162
|
+
}
|
|
157
163
|
} else if (!isEqual(itemsToBeRendered, activeRoutes)) {
|
|
158
164
|
setItemsToBeRendered(activeRoutes);
|
|
159
165
|
}
|
|
160
|
-
}, [viewport, activeRoutes, optionsHidden, itemsToBeRendered]);
|
|
166
|
+
}, [viewport, activeRoutes, optionsHidden, itemsToBeRendered, newItems]);
|
|
161
167
|
const items = getItems(itemsToBeRendered, params, !children);
|
|
162
168
|
const themeTokens = useThemeTokens('Breadcrumbs', tokens, variant);
|
|
163
169
|
const metadata = /*#__PURE__*/_jsx(HelmetProvider, {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
3
|
import { Link, Typography, applyTextStyles, clickProps, selectSystemProps, useThemeTokens } from '@telus-uds/components-base';
|
|
5
|
-
import { htmlAttrs } from '../../utils';
|
|
4
|
+
import { htmlAttrs, styledComponents } from '../../utils';
|
|
6
5
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
6
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const {
|
|
8
|
+
styled
|
|
9
|
+
} = styledComponents;
|
|
10
|
+
const StyledItemContainer = styled.li({
|
|
12
11
|
display: 'inline-block',
|
|
13
12
|
paddingLeft: _ref => {
|
|
14
13
|
let {
|
|
@@ -25,10 +24,7 @@ const StyledItemContainer = /*#__PURE__*/styled.li.withConfig({
|
|
|
25
24
|
},
|
|
26
25
|
marginBottom: '8px'
|
|
27
26
|
});
|
|
28
|
-
const IconContainer =
|
|
29
|
-
displayName: "Item__IconContainer",
|
|
30
|
-
componentId: "components-web__sc-1rfdaul-1"
|
|
31
|
-
})({
|
|
27
|
+
const IconContainer = styled.span({
|
|
32
28
|
display: 'inline-block',
|
|
33
29
|
paddingLeft: _ref3 => {
|
|
34
30
|
let {
|
package/lib/Callout/Callout.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
3
|
import { Icon, selectSystemProps, Typography, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
|
|
5
|
-
import { htmlAttrs } from '../utils';
|
|
4
|
+
import { htmlAttrs, styledComponents } from '../utils';
|
|
6
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
6
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
7
|
+
const {
|
|
8
|
+
styled
|
|
9
|
+
} = styledComponents;
|
|
8
10
|
const getAlignment = (rounded, textAlignToFlex) => {
|
|
9
11
|
if (textAlignToFlex) {
|
|
10
12
|
switch (textAlignToFlex) {
|
|
@@ -30,10 +32,7 @@ const verticalAlignToFlex = verticalAlign => {
|
|
|
30
32
|
return 'top';
|
|
31
33
|
}
|
|
32
34
|
};
|
|
33
|
-
const CalloutContainer =
|
|
34
|
-
displayName: "Callout__CalloutContainer",
|
|
35
|
-
componentId: "components-web__sc-1a7ptx-0"
|
|
36
|
-
})(_ref => {
|
|
35
|
+
const CalloutContainer = styled.div(_ref => {
|
|
37
36
|
let {
|
|
38
37
|
rounded,
|
|
39
38
|
verticalAlign,
|
package/lib/Card/Card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Card as CardBase, getTokensPropType, paddingProp, responsiveProps, selectSystemProps, StackView, useThemeTokens, useThemeTokensCallback, variantProp, a11yProps, viewProps, PressableCardBase, useResponsiveProp } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import { styledComponents } from '../utils';
|
|
5
5
|
import CardContent from './CardContent';
|
|
6
6
|
import CardFooter from './CardFooter';
|
|
7
7
|
import FullBleedContent, { getFullBleedBorderRadius, useFullBleedContentProps } from '../shared/FullBleedContent';
|
|
@@ -10,6 +10,9 @@ import ConditionalWrapper from '../shared/ConditionalWrapper';
|
|
|
10
10
|
// Passes React Native-oriented system props through UDS Card
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps]);
|
|
13
|
+
const {
|
|
14
|
+
styled
|
|
15
|
+
} = styledComponents;
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* A basic card component, unstyled by default.
|
|
@@ -40,10 +43,7 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, vie
|
|
|
40
43
|
* ## Accessibility
|
|
41
44
|
* `Card` component accepts all the standard accessibility props.
|
|
42
45
|
*/
|
|
43
|
-
const DynamicWidthContainer =
|
|
44
|
-
displayName: "Card__DynamicWidthContainer",
|
|
45
|
-
componentId: "components-web__sc-1elbtwd-0"
|
|
46
|
-
})(_ref => {
|
|
46
|
+
const DynamicWidthContainer = styled.div(_ref => {
|
|
47
47
|
let {
|
|
48
48
|
width,
|
|
49
49
|
display,
|
package/lib/Card/CardContent.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { getTokensPropType, selectSystemProps, useThemeTokens, useViewport, variantProp } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
5
|
-
import { htmlAttrs } from '../utils';
|
|
4
|
+
import { htmlAttrs, styledComponents } from '../utils';
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const {
|
|
8
|
+
styled
|
|
9
|
+
} = styledComponents;
|
|
10
|
+
const CardContentContainer = styled.div(_ref => {
|
|
12
11
|
let {
|
|
13
12
|
borderRadius,
|
|
14
13
|
paddingBottom,
|
package/lib/Card/CardFooter.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { getTokensPropType, paddingProp, selectSystemProps, useThemeTokens, useViewport, variantProp } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
5
|
-
import { htmlAttrs } from '../utils';
|
|
4
|
+
import { htmlAttrs, styledComponents } from '../utils';
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const {
|
|
8
|
+
styled
|
|
9
|
+
} = styledComponents;
|
|
10
|
+
const CardFooterContainer = styled.div(_ref => {
|
|
12
11
|
let {
|
|
13
12
|
backgroundColor,
|
|
14
13
|
borderRadius,
|
|
@@ -2,19 +2,18 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
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
|
-
import styled from 'styled-components';
|
|
6
5
|
// Reading these from the RN palette since they will be used to generate
|
|
7
6
|
// the `Typography` tokens
|
|
8
|
-
import { htmlAttrs, transformGradient } from '../utils';
|
|
7
|
+
import { htmlAttrs, transformGradient, styledComponents } from '../utils';
|
|
9
8
|
import Segment from './Segment';
|
|
10
9
|
import useCountdown from './useCountdown';
|
|
11
10
|
import { countdownVariantPropType, dictionaryContentShape } from './types';
|
|
12
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const {
|
|
14
|
+
styled
|
|
15
|
+
} = styledComponents;
|
|
16
|
+
const Container = styled.div(_ref => {
|
|
18
17
|
let {
|
|
19
18
|
variant: {
|
|
20
19
|
feature,
|
package/lib/Countdown/Segment.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { StackView, Typography, useCopy } from '@telus-uds/components-base';
|
|
4
|
-
import
|
|
4
|
+
import { styledComponents } from '../utils';
|
|
5
5
|
import dictionary from './dictionary';
|
|
6
6
|
import { countdownVariantPropType, dictionaryContentShape } from './types';
|
|
7
7
|
// !TODO: put this back
|
|
8
8
|
import { SEGMENT_WIDTH_TO_FONT_SIZE_RATIO } from './constants';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const {
|
|
11
|
+
styled
|
|
12
|
+
} = styledComponents;
|
|
9
13
|
|
|
10
14
|
// Pads with zeros on the left if it's a single digit number
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
15
|
const pad = function (number) {
|
|
13
16
|
let segmentWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
14
17
|
return String(number).padStart(segmentWidth, '0');
|
|
15
18
|
};
|
|
16
|
-
const Container =
|
|
17
|
-
displayName: "Segment__Container",
|
|
18
|
-
componentId: "components-web__sc-yrh35y-0"
|
|
19
|
-
})(_ref => {
|
|
19
|
+
const Container = styled.div(_ref => {
|
|
20
20
|
let {
|
|
21
21
|
segmentFontSize,
|
|
22
22
|
segmentWidth = 2,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { styledComponents } from '../utils';
|
|
2
2
|
import defaultReactDatesCss from './reactDatesCss';
|
|
3
3
|
|
|
4
4
|
// calendarDayDefaultHeight and calendarDayDefaultWidth
|
|
5
5
|
// refer to circle size when selected, focused, or hovered and is passed with getResponsiveCircleSize in DatePicker
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const {
|
|
8
|
+
styled
|
|
9
|
+
} = styledComponents;
|
|
10
|
+
const CalendarContainer = styled.div(_ref => {
|
|
11
11
|
let {
|
|
12
12
|
daySize,
|
|
13
13
|
remainingTokens,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
3
|
import momentPropTypes from 'react-moment-proptypes';
|
|
5
4
|
import 'react-dates/initialize';
|
|
6
5
|
import { SingleDatePicker, DayPickerSingleDateController } from 'react-dates';
|
|
@@ -9,8 +8,11 @@ import moment from 'moment';
|
|
|
9
8
|
import { isUndefined, throttle } from 'lodash';
|
|
10
9
|
import CalendarContainer from './CalendarContainer';
|
|
11
10
|
import dictionary from './dictionary';
|
|
12
|
-
import { htmlAttrs } from '../utils';
|
|
11
|
+
import { htmlAttrs, styledComponents } from '../utils';
|
|
13
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
const {
|
|
14
|
+
styled
|
|
15
|
+
} = styledComponents;
|
|
14
16
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
15
17
|
const dateFormat = 'DD / MM / YYYY';
|
|
16
18
|
const dateFormatWithoutSpaces = 'DD/MM/YYYY';
|
|
@@ -30,24 +32,15 @@ const getResponsiveCircleSize = function () {
|
|
|
30
32
|
}
|
|
31
33
|
return inline ? 44 : 26;
|
|
32
34
|
};
|
|
33
|
-
const MonthCenterContainer =
|
|
34
|
-
displayName: "DatePicker__MonthCenterContainer",
|
|
35
|
-
componentId: "components-web__sc-mz8fi3-0"
|
|
36
|
-
})({
|
|
35
|
+
const MonthCenterContainer = styled.div({
|
|
37
36
|
display: 'flex',
|
|
38
37
|
justifyContent: 'center'
|
|
39
38
|
});
|
|
40
|
-
const DateInputWrapper =
|
|
41
|
-
displayName: "DatePicker__DateInputWrapper",
|
|
42
|
-
componentId: "components-web__sc-mz8fi3-1"
|
|
43
|
-
})({
|
|
39
|
+
const DateInputWrapper = styled.div({
|
|
44
40
|
display: 'flex',
|
|
45
41
|
flexDirection: 'column'
|
|
46
42
|
});
|
|
47
|
-
const PortalPositionedContainer =
|
|
48
|
-
displayName: "DatePicker__PortalPositionedContainer",
|
|
49
|
-
componentId: "components-web__sc-mz8fi3-2"
|
|
50
|
-
})({
|
|
43
|
+
const PortalPositionedContainer = styled.div({
|
|
51
44
|
position: 'absolute',
|
|
52
45
|
left: _ref => {
|
|
53
46
|
let {
|
|
@@ -252,10 +245,11 @@ const DatePicker = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
252
245
|
const viewport = useViewport();
|
|
253
246
|
const daySize = getResponsiveDaySize(inline, viewport);
|
|
254
247
|
const circleSize = getResponsiveCircleSize(inline, viewport);
|
|
255
|
-
const HiddenInputFieldContainer =
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
248
|
+
const HiddenInputFieldContainer = styled.div`
|
|
249
|
+
height: ${props => props.height};
|
|
250
|
+
width: ${props => props.width};
|
|
251
|
+
overflow: hidden;
|
|
252
|
+
`;
|
|
259
253
|
const {
|
|
260
254
|
hiddenInputFieldContainerHeight,
|
|
261
255
|
hiddenInputFieldContainerWidth,
|