@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.
Files changed (122) hide show
  1. package/CHANGELOG.md +28 -2
  2. package/lib/Badge/Badge.js +19 -11
  3. package/lib/BlockQuote/BlockQuote.js +31 -17
  4. package/lib/Breadcrumbs/Breadcrumbs.js +23 -17
  5. package/lib/Breadcrumbs/Item/Item.js +6 -10
  6. package/lib/Callout/Callout.js +5 -6
  7. package/lib/Card/Card.js +5 -5
  8. package/lib/Card/CardContent.js +5 -6
  9. package/lib/Card/CardFooter.js +5 -6
  10. package/lib/Countdown/Countdown.js +5 -6
  11. package/lib/Countdown/Segment.js +6 -6
  12. package/lib/DatePicker/CalendarContainer.js +5 -5
  13. package/lib/DatePicker/DatePicker.js +12 -18
  14. package/lib/DatePicker/reactDatesCss.js +829 -2
  15. package/lib/Disclaimer/Disclaimer.js +5 -6
  16. package/lib/Footnote/Footnote.js +15 -39
  17. package/lib/Footnote/FootnoteLink.js +5 -6
  18. package/lib/NavigationBar/NavigationBar.js +73 -20
  19. package/lib/NavigationBar/NavigationItem.js +5 -6
  20. package/lib/OrderedList/Item.js +7 -11
  21. package/lib/OrderedList/ItemBase.js +5 -5
  22. package/lib/OrderedList/OrderedList.js +5 -6
  23. package/lib/OrderedList/OrderedListBase.js +5 -5
  24. package/lib/Paragraph/Paragraph.js +16 -8
  25. package/lib/PreviewCard/PreviewCard.js +7 -10
  26. package/lib/PriceLockup/PriceLockup.js +64 -54
  27. package/lib/Progress/ProgressBar.js +6 -6
  28. package/lib/QuantitySelector/QuantitySelector.js +1 -1
  29. package/lib/QuantitySelector/styles.js +18 -9
  30. package/lib/ResponsiveImage/ResponsiveImage.js +7 -1
  31. package/lib/Ribbon/Ribbon.js +57 -31
  32. package/lib/Span/Span.js +6 -7
  33. package/lib/Spinner/Spinner.js +8 -18
  34. package/lib/Spinner/SpinnerContent.js +5 -6
  35. package/lib/StoryCard/StoryCard.js +7 -10
  36. package/lib/Table/Cell.js +43 -12
  37. package/lib/Table/Table.js +15 -11
  38. package/lib/TermsAndConditions/ExpandCollapse.js +7 -13
  39. package/lib/TermsAndConditions/TermsAndConditions.js +9 -22
  40. package/lib/Testimonial/Testimonial.js +10 -26
  41. package/lib/Toast/Toast.js +64 -13
  42. package/lib/Video/ControlBar/ControlBar.js +8 -18
  43. package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +5 -6
  44. package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +7 -14
  45. package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +7 -14
  46. package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +6 -10
  47. package/lib/Video/MiddleControlButton/MiddleControlButton.js +5 -6
  48. package/lib/Video/Video.js +10 -26
  49. package/lib/VideoPicker/VideoPicker.js +44 -20
  50. package/lib/VideoPicker/VideoPickerThumbnail.js +52 -18
  51. package/lib/WaffleGrid/WaffleGrid.js +7 -14
  52. package/lib/WebVideo/WebVideo.js +9 -14
  53. package/lib/index.js +1 -1
  54. package/lib/shared/FullBleedContent/FullBleedContent.js +5 -5
  55. package/lib/shared/VideoSplash/SplashButton/SplashButton.js +6 -9
  56. package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +8 -17
  57. package/lib/shared/VideoSplash/VideoSplash.js +5 -6
  58. package/lib/utils/index.js +3 -1
  59. package/lib/utils/scrollToAnchor.js +19 -0
  60. package/lib/utils/ssr.js +4 -1
  61. package/lib/utils/theming/styled-components.js +26 -0
  62. package/package.json +3 -3
  63. package/src/Badge/Badge.jsx +3 -2
  64. package/src/BlockQuote/BlockQuote.jsx +3 -2
  65. package/src/Breadcrumbs/Breadcrumbs.jsx +23 -13
  66. package/src/Breadcrumbs/Item/Item.jsx +3 -2
  67. package/src/Callout/Callout.jsx +3 -2
  68. package/src/Card/Card.jsx +3 -1
  69. package/src/Card/CardContent.jsx +3 -2
  70. package/src/Card/CardFooter.jsx +3 -2
  71. package/src/Countdown/Countdown.jsx +3 -2
  72. package/src/Countdown/Segment.jsx +3 -1
  73. package/src/DatePicker/CalendarContainer.jsx +3 -1
  74. package/src/DatePicker/DatePicker.jsx +3 -2
  75. package/src/DatePicker/reactDatesCss.js +3 -1
  76. package/src/Disclaimer/Disclaimer.jsx +3 -2
  77. package/src/Footnote/Footnote.jsx +9 -2
  78. package/src/Footnote/FootnoteLink.jsx +3 -2
  79. package/src/NavigationBar/NavigationBar.jsx +55 -13
  80. package/src/NavigationBar/NavigationItem.jsx +3 -2
  81. package/src/OrderedList/Item.jsx +4 -3
  82. package/src/OrderedList/ItemBase.jsx +3 -1
  83. package/src/OrderedList/OrderedList.jsx +3 -2
  84. package/src/OrderedList/OrderedListBase.jsx +3 -1
  85. package/src/Paragraph/Paragraph.jsx +3 -2
  86. package/src/PreviewCard/PreviewCard.jsx +3 -1
  87. package/src/PriceLockup/PriceLockup.jsx +3 -2
  88. package/src/Progress/ProgressBar.jsx +3 -1
  89. package/src/QuantitySelector/QuantitySelector.jsx +1 -1
  90. package/src/QuantitySelector/styles.js +3 -1
  91. package/src/ResponsiveImage/ResponsiveImage.jsx +10 -3
  92. package/src/Ribbon/Ribbon.jsx +3 -2
  93. package/src/Span/Span.jsx +3 -2
  94. package/src/Spinner/Spinner.jsx +3 -2
  95. package/src/Spinner/SpinnerContent.jsx +3 -2
  96. package/src/StoryCard/StoryCard.jsx +3 -1
  97. package/src/Table/Cell.jsx +3 -1
  98. package/src/Table/Table.jsx +3 -2
  99. package/src/TermsAndConditions/ExpandCollapse.jsx +3 -1
  100. package/src/TermsAndConditions/TermsAndConditions.jsx +3 -2
  101. package/src/Testimonial/Testimonial.jsx +3 -2
  102. package/src/Toast/Toast.jsx +3 -2
  103. package/src/Video/ControlBar/ControlBar.jsx +3 -3
  104. package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +4 -3
  105. package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +3 -3
  106. package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +3 -3
  107. package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +3 -3
  108. package/src/Video/MiddleControlButton/MiddleControlButton.jsx +4 -3
  109. package/src/Video/Video.jsx +3 -2
  110. package/src/VideoPicker/VideoPicker.jsx +3 -2
  111. package/src/VideoPicker/VideoPickerThumbnail.jsx +3 -1
  112. package/src/WaffleGrid/WaffleGrid.jsx +3 -2
  113. package/src/WebVideo/WebVideo.jsx +4 -3
  114. package/src/index.js +1 -1
  115. package/src/shared/FullBleedContent/FullBleedContent.jsx +3 -2
  116. package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +3 -1
  117. package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +4 -2
  118. package/src/shared/VideoSplash/VideoSplash.jsx +3 -2
  119. package/src/utils/index.js +5 -1
  120. package/src/utils/scrollToAnchor.js +18 -0
  121. package/src/utils/ssr.js +2 -1
  122. package/src/utils/theming/styled-components.js +23 -0
@@ -1,112 +1,122 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { A11yText, Divider, selectSystemProps, Typography, useThemeTokens, useViewport, getTokensPropType } from '@telus-uds/components-base';
4
- import styled from 'styled-components';
5
4
  import FootnoteLink from '../Footnote/FootnoteLink';
6
5
  import getTypographyTokens from './tokens';
7
- import { htmlAttrs, warn } from '../utils';
6
+ import { htmlAttrs, warn, styledComponents } from '../utils';
8
7
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
+ const {
9
+ styled
10
+ } = styledComponents;
9
11
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
10
- const PriceLockupContainer = /*#__PURE__*/styled.div.withConfig({
11
- displayName: "PriceLockup__PriceLockupContainer",
12
- componentId: "components-web__sc-1x6duay-0"
13
- })(["align-items:", ";display:flex;flex-direction:column;width:fit-content;"], _ref => {
12
+ const PriceLockupContainer = styled.div`
13
+ align-items: ${_ref => {
14
14
  let {
15
15
  alignItemsText
16
16
  } = _ref;
17
17
  return alignItemsText;
18
- });
19
- const PriceContainer = /*#__PURE__*/styled.div.withConfig({
20
- displayName: "PriceLockup__PriceContainer",
21
- componentId: "components-web__sc-1x6duay-1"
22
- })(["display:flex;margin-bottom:", ";"], _ref2 => {
18
+ }};
19
+ display: flex;
20
+ flex-direction: column;
21
+ width: fit-content;
22
+ `;
23
+ const PriceContainer = styled.div`
24
+ display: flex;
25
+ margin-bottom: ${_ref2 => {
23
26
  let {
24
27
  priceMarginBottom
25
28
  } = _ref2;
26
29
  return priceMarginBottom;
27
- });
28
- const FootnoteContainer = /*#__PURE__*/styled.div.withConfig({
29
- displayName: "PriceLockup__FootnoteContainer",
30
- componentId: "components-web__sc-1x6duay-2"
31
- })(["display:flex;margin-top:", ";gap:", ";"], _ref3 => {
30
+ }};
31
+ `;
32
+ const FootnoteContainer = styled.div`
33
+ display: flex;
34
+ margin-top: ${_ref3 => {
32
35
  let {
33
36
  footnoteMarginTop
34
37
  } = _ref3;
35
38
  return footnoteMarginTop;
36
- }, _ref4 => {
39
+ }};
40
+ gap: ${_ref4 => {
37
41
  let {
38
42
  footnoteGap
39
43
  } = _ref4;
40
44
  return footnoteGap;
41
- });
42
- const BottomTextContainer = /*#__PURE__*/styled.div.withConfig({
43
- displayName: "PriceLockup__BottomTextContainer",
44
- componentId: "components-web__sc-1x6duay-3"
45
- })(["margin-top:", ";"], _ref5 => {
45
+ }};
46
+ `;
47
+ const BottomTextContainer = styled.div`
48
+ margin-top: ${_ref5 => {
46
49
  let {
47
50
  bottomTextMarginTop
48
51
  } = _ref5;
49
52
  return bottomTextMarginTop;
50
- });
51
- const BottomLinksContainer = /*#__PURE__*/styled.div.withConfig({
52
- displayName: "PriceLockup__BottomLinksContainer",
53
- componentId: "components-web__sc-1x6duay-4"
54
- })(["align-self:center;margin-left:", ";"], _ref6 => {
53
+ }};
54
+ `;
55
+ const BottomLinksContainer = styled.div`
56
+ align-self: center;
57
+ margin-left: ${_ref6 => {
55
58
  let {
56
59
  bottomLinksMarginLeft
57
60
  } = _ref6;
58
61
  return bottomLinksMarginLeft;
59
- });
60
- const TopTextContainer = /*#__PURE__*/styled.div.withConfig({
61
- displayName: "PriceLockup__TopTextContainer",
62
- componentId: "components-web__sc-1x6duay-5"
63
- })(["margin-bottom:", ";"], _ref7 => {
62
+ }};
63
+ `;
64
+ const TopTextContainer = styled.div`
65
+ margin-bottom: ${_ref7 => {
64
66
  let {
65
67
  topTextMarginBottom
66
68
  } = _ref7;
67
69
  return topTextMarginBottom;
68
- });
69
- const PriceTextContainer = /*#__PURE__*/styled.div.withConfig({
70
- displayName: "PriceLockup__PriceTextContainer",
71
- componentId: "components-web__sc-1x6duay-6"
72
- })(["display:flex;flex-direction:", ";"], _ref8 => {
70
+ }};
71
+ `;
72
+ const PriceTextContainer = styled.div`
73
+ display: flex;
74
+ flex-direction: ${_ref8 => {
73
75
  let {
74
76
  ratePosition
75
77
  } = _ref8;
76
78
  return ratePosition === 'bottom' ? 'column' : 'row';
77
- });
78
- const RateContainer = /*#__PURE__*/styled.div.withConfig({
79
- displayName: "PriceLockup__RateContainer",
80
- componentId: "components-web__sc-1x6duay-7"
81
- })(["display:flex;"]);
82
- const RateTextContainer = /*#__PURE__*/styled.div.withConfig({
83
- displayName: "PriceLockup__RateTextContainer",
84
- componentId: "components-web__sc-1x6duay-8"
85
- })(["align-self:", ";"], _ref9 => {
79
+ }};
80
+ `;
81
+ const RateContainer = styled.div`
82
+ display: flex;
83
+ `;
84
+ const RateTextContainer = styled.div`
85
+ align-self: ${_ref9 => {
86
86
  let {
87
87
  ratePosition
88
88
  } = _ref9;
89
89
  return ratePosition === 'bottom' ? 'flex-start' : 'flex-end';
90
- });
91
- const StrikeThroughContainer = /*#__PURE__*/styled.div.withConfig({
92
- displayName: "PriceLockup__StrikeThroughContainer",
93
- componentId: "components-web__sc-1x6duay-9"
94
- })(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"], _ref10 => {
90
+ }};
91
+ `;
92
+ const StrikeThroughContainer = styled.div`
93
+ display: flex;
94
+ position: relative;
95
+ align-items: center;
96
+ ::before {
97
+ content: '';
98
+ width: 100%;
99
+ top: ${_ref10 => {
95
100
  let {
96
101
  strikeThroughPosition
97
102
  } = _ref10;
98
103
  return `${strikeThroughPosition}px`;
99
- }, _ref11 => {
104
+ }};
105
+ height: ${_ref11 => {
100
106
  let {
101
107
  strikeThroughHeight
102
108
  } = _ref11;
103
109
  return `${strikeThroughHeight}px`;
104
- }, _ref12 => {
110
+ }};
111
+ background: ${_ref12 => {
105
112
  let {
106
113
  strikeThroughColor
107
114
  } = _ref12;
108
115
  return strikeThroughColor;
109
- });
116
+ }};
117
+ position: absolute;
118
+ }
119
+ `;
110
120
  const selectFootnoteLinkStyles = _ref13 => {
111
121
  let {
112
122
  footnoteLinkColor,
@@ -1,19 +1,19 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { getTokensPropType, Progress, selectSystemProps, useThemeTokens, a11yProps, viewProps, variantProp, applyShadowToken } from '@telus-uds/components-base';
4
- import styled from 'styled-components';
4
+ import { styledComponents } from '../utils';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ const {
7
+ styled
8
+ } = styledComponents;
5
9
 
6
10
  // Passes React Native-oriented system props through UDS Progress
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
11
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps]);
9
12
  const {
10
13
  Bar: ProgressBarBase
11
14
  } = Progress;
12
- const Gradient = /*#__PURE__*/styled.div.attrs({
15
+ const Gradient = styled.div.attrs({
13
16
  'data-testid': 'ProgressBar-Gradient'
14
- }).withConfig({
15
- displayName: "ProgressBar__Gradient",
16
- componentId: "components-web__sc-1vmzyq5-0"
17
17
  })(_ref => {
18
18
  let {
19
19
  gradient: {
@@ -78,7 +78,7 @@ const QuantitySelector = /*#__PURE__*/React.forwardRef((_ref, ref) => {
78
78
  setError(getCopy('errors').invalidCharacters);
79
79
  }
80
80
  };
81
- const renderLabel = () => label ? /*#__PURE__*/_jsx(InputLabel, {
81
+ const renderLabel = () => label || hint ? /*#__PURE__*/_jsx(InputLabel, {
82
82
  forId: id,
83
83
  label: label,
84
84
  hint: hint,
@@ -1,9 +1,18 @@
1
- import styled from 'styled-components';
2
- export const InputField = /*#__PURE__*/styled.div.withConfig({
3
- displayName: "styles__InputField",
4
- componentId: "components-web__sc-1lrz1xk-0"
5
- })(["order:1;text-align:center;z-index:10;input{text-align:center;}"]);
6
- export const InputWrapper = /*#__PURE__*/styled.div.withConfig({
7
- displayName: "styles__InputWrapper",
8
- componentId: "components-web__sc-1lrz1xk-1"
9
- })(["text-align:start;display:flex;flex-direction:row;flex-wrap:nowrap;"]);
1
+ import { styledComponents } from '../utils';
2
+ const {
3
+ styled
4
+ } = styledComponents;
5
+ export const InputField = styled.div`
6
+ order: 1;
7
+ text-align: center;
8
+ z-index: 10;
9
+ input {
10
+ text-align: center;
11
+ }
12
+ `;
13
+ export const InputWrapper = styled.div`
14
+ text-align: start;
15
+ display: flex;
16
+ flex-direction: row;
17
+ flex-wrap: nowrap;
18
+ `;
@@ -25,11 +25,13 @@ const ResponsiveImage = /*#__PURE__*/React.forwardRef((_ref, ref) => {
25
25
  fallbackSrc,
26
26
  alt,
27
27
  loading = 'eager',
28
+ dataSet,
28
29
  ...rest
29
30
  } = _ref;
30
31
  return /*#__PURE__*/_jsxs("picture", {
31
32
  ...selectProps(rest),
32
33
  ref: ref,
34
+ ...dataSet,
33
35
  children: [/*#__PURE__*/_jsx("source", {
34
36
  srcSet: xlSrc,
35
37
  media: `(min-width: ${viewports.map.get(viewports.xl)}px)`
@@ -89,6 +91,10 @@ ResponsiveImage.propTypes = {
89
91
  * @default 'eager'
90
92
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
91
93
  */
92
- loading: PropTypes.oneOf(['eager', 'lazy'])
94
+ loading: PropTypes.oneOf(['eager', 'lazy']),
95
+ /**
96
+ * The dataSet prop allows to pass data-* attributes element to the component.
97
+ */
98
+ dataSet: PropTypes.object
93
99
  };
94
100
  export default ResponsiveImage;
@@ -1,109 +1,135 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { selectSystemProps, Typography, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
4
- import styled from 'styled-components';
5
- import { htmlAttrs } from '../utils';
4
+ import { htmlAttrs, styledComponents } from '../utils';
6
5
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ const {
7
+ styled
8
+ } = styledComponents;
7
9
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
8
- const RibbonWrapper = /*#__PURE__*/styled.div.withConfig({
9
- displayName: "Ribbon__RibbonWrapper",
10
- componentId: "components-web__sc-186270k-0"
11
- })(["width:fit-content;position:", ";z-index:1;left:", ";top:", ";"], _ref => {
10
+ const RibbonWrapper = styled.div`
11
+ width: fit-content;
12
+ position: ${_ref => {
12
13
  let {
13
14
  left,
14
15
  top
15
16
  } = _ref;
16
17
  return left ?? top ? 'absolute' : 'relative';
17
- }, _ref2 => {
18
+ }};
19
+ z-index: 1;
20
+ left: ${_ref2 => {
18
21
  let {
19
22
  left
20
23
  } = _ref2;
21
24
  return left && `${left}px`;
22
- }, _ref3 => {
25
+ }};
26
+ top: ${_ref3 => {
23
27
  let {
24
28
  top
25
29
  } = _ref3;
26
30
  return top && `${top}px`;
27
- });
28
- const RibbonContainer = /*#__PURE__*/styled.div.withConfig({
29
- displayName: "Ribbon__RibbonContainer",
30
- componentId: "components-web__sc-186270k-1"
31
- })(["display:flex;justify-content:center;background:", ";padding:", ";border-radius:", ";width:fit-content;box-shadow:", ";border-bottom-right-radius:", ";border-bottom-left-radius:", ";"], _ref4 => {
31
+ }};
32
+ `;
33
+ const RibbonContainer = styled.div`
34
+ display: flex;
35
+ justify-content: center;
36
+ background: ${_ref4 => {
32
37
  let {
33
38
  backgroundColor
34
39
  } = _ref4;
35
40
  return backgroundColor;
36
- }, _ref5 => {
41
+ }};
42
+ padding: ${_ref5 => {
37
43
  let {
38
44
  padding
39
45
  } = _ref5;
40
46
  return `${padding}`;
41
- }, _ref6 => {
47
+ }};
48
+ border-radius: ${_ref6 => {
42
49
  let {
43
50
  borderRadius
44
51
  } = _ref6;
45
52
  return borderRadius;
46
- }, _ref7 => {
53
+ }};
54
+ width: fit-content;
55
+ box-shadow: ${_ref7 => {
47
56
  let {
48
57
  boxShadow,
49
58
  shouldWrap
50
59
  } = _ref7;
51
60
  return shouldWrap && boxShadow;
52
- }, _ref8 => {
61
+ }};
62
+ border-bottom-right-radius: ${_ref8 => {
53
63
  let {
54
64
  borderRadiusBottomLeft
55
65
  } = _ref8;
56
66
  return borderRadiusBottomLeft;
57
- }, _ref9 => {
67
+ }};
68
+ border-bottom-left-radius: ${_ref9 => {
58
69
  let {
59
70
  borderRadiusBottomRight
60
71
  } = _ref9;
61
72
  return borderRadiusBottomRight;
62
- });
63
- const RibbonCurve = /*#__PURE__*/styled.div.withConfig({
64
- displayName: "Ribbon__RibbonCurve",
65
- componentId: "components-web__sc-186270k-2"
66
- })(["background:", ";width:", ";height:", ";margin-top:-", ";border-radius:0 0 0 100%;position:relative;z-index:-1;overflow:hidden;&::after{content:'';border-bottom-left-radius:", ";position:absolute;height:", ";background:", ";width:", ";}"], _ref10 => {
73
+ }};
74
+ `;
75
+ const RibbonCurve = styled.div`
76
+ background: ${_ref10 => {
67
77
  let {
68
78
  curveBackgroundColor
69
79
  } = _ref10;
70
80
  return curveBackgroundColor;
71
- }, _ref11 => {
81
+ }};
82
+ width: ${_ref11 => {
72
83
  let {
73
84
  curveWidth
74
85
  } = _ref11;
75
86
  return curveWidth;
76
- }, _ref12 => {
87
+ }};
88
+ height: ${_ref12 => {
77
89
  let {
78
90
  curveHeight
79
91
  } = _ref12;
80
92
  return curveHeight;
81
- }, _ref13 => {
93
+ }};
94
+ margin-top: -${_ref13 => {
82
95
  let {
83
96
  curveMarginTop
84
97
  } = _ref13;
85
98
  return curveMarginTop;
86
- }, _ref14 => {
99
+ }};
100
+ border-radius: 0 0 0 100%;
101
+ position: relative;
102
+ z-index: -1;
103
+ overflow: hidden;
104
+ &::after {
105
+ content: '';
106
+ border-bottom-left-radius: ${_ref14 => {
87
107
  let {
88
108
  curveAfterRadius
89
109
  } = _ref14;
90
110
  return curveAfterRadius;
91
- }, _ref15 => {
111
+ }};
112
+ position: absolute;
113
+ height: ${_ref15 => {
92
114
  let {
93
115
  curveAfterHeight
94
116
  } = _ref15;
95
117
  return curveAfterHeight;
96
- }, _ref16 => {
118
+ }};
119
+ background: ${_ref16 => {
97
120
  let {
98
121
  curveAfterBackgroundColor
99
122
  } = _ref16;
100
123
  return curveAfterBackgroundColor;
101
- }, _ref17 => {
124
+ }};
125
+ width: ${_ref17 => {
102
126
  let {
103
127
  curveAfterWidth
104
128
  } = _ref17;
105
129
  return curveAfterWidth;
106
- });
130
+ }};
131
+ }
132
+ `;
107
133
  const Ribbon = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
108
134
  let {
109
135
  children,
package/lib/Span/Span.js CHANGED
@@ -1,19 +1,18 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import styled from 'styled-components';
4
3
  import { getTokensPropType, selectSystemProps } from '@telus-uds/components-base';
5
- import { htmlAttrs, useTypographyTheme } from '../utils';
4
+ import { htmlAttrs, useTypographyTheme, styledComponents } from '../utils';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
+ const {
7
+ styled
8
+ } = styledComponents;
7
9
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
8
- const StyledSpan = /*#__PURE__*/styled.span.withConfig({
9
- displayName: "Span__StyledSpan",
10
- componentId: "components-web__sc-o7sihn-0"
11
- })(["", "};"], _ref => {
10
+ const StyledSpan = styled.span`${_ref => {
12
11
  let {
13
12
  flex
14
13
  } = _ref;
15
14
  return flex ? 'display: inline-flex' : '';
16
- });
15
+ }}};`;
17
16
 
18
17
  /**
19
18
  * Text as an HTML ```<span>``` element.
@@ -1,17 +1,16 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import styled from 'styled-components';
4
3
  import { selectSystemProps, useScrollBlocking, useThemeTokens, getTokensPropType } from '@telus-uds/components-base';
5
4
  import { Portal } from '@gorhom/portal';
6
5
  import SpinnerContent from './SpinnerContent';
7
- import { htmlAttrs, media } from '../utils';
6
+ import { htmlAttrs, media, styledComponents } from '../utils';
8
7
  import { BACKDROP_OPACITY, BACKDROP_Z_INDEX } from './constants';
9
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const {
10
+ styled
11
+ } = styledComponents;
10
12
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
11
- const SpinnerContainer = /*#__PURE__*/styled.div.withConfig({
12
- displayName: "Spinner__SpinnerContainer",
13
- componentId: "components-web__sc-116rqck-0"
14
- })(_ref => {
13
+ const SpinnerContainer = styled.div(_ref => {
15
14
  let {
16
15
  inline,
17
16
  fullScreen
@@ -30,19 +29,13 @@ const SpinnerContainer = /*#__PURE__*/styled.div.withConfig({
30
29
  })
31
30
  };
32
31
  });
33
- const ContentOverlay = /*#__PURE__*/styled.div.withConfig({
34
- displayName: "Spinner__ContentOverlay",
35
- componentId: "components-web__sc-116rqck-1"
36
- })({
32
+ const ContentOverlay = styled.div({
37
33
  position: 'absolute',
38
34
  width: '100%',
39
35
  height: '100%',
40
36
  zIndex: BACKDROP_Z_INDEX
41
37
  });
42
- const FullscreenOverlay = /*#__PURE__*/styled.div.withConfig({
43
- displayName: "Spinner__FullscreenOverlay",
44
- componentId: "components-web__sc-116rqck-2"
45
- })(_ref2 => {
38
+ const FullscreenOverlay = styled.div(_ref2 => {
46
39
  let {
47
40
  fullScreenOverLayBackground
48
41
  } = _ref2;
@@ -56,10 +49,7 @@ const FullscreenOverlay = /*#__PURE__*/styled.div.withConfig({
56
49
  backgroundColor: fullScreenOverLayBackground
57
50
  };
58
51
  });
59
- const OpaqueContainer = /*#__PURE__*/styled.div.withConfig({
60
- displayName: "Spinner__OpaqueContainer",
61
- componentId: "components-web__sc-116rqck-3"
62
- })({
52
+ const OpaqueContainer = styled.div({
63
53
  opacity: BACKDROP_OPACITY
64
54
  });
65
55
  const recursiveMap = (children, fn) => React.Children.map(children, child => {
@@ -1,15 +1,14 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import styled from 'styled-components';
4
3
  import { ActivityIndicator, StackView, Typography, selectSystemProps } from '@telus-uds/components-base';
5
- import { htmlAttrs } from '../utils';
4
+ import { htmlAttrs, styledComponents } from '../utils';
6
5
  import { BACKDROP_Z_INDEX, LARGE } from './constants';
7
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ const {
8
+ styled
9
+ } = styledComponents;
8
10
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
9
- const Container = /*#__PURE__*/styled.div.withConfig({
10
- displayName: "SpinnerContent__Container",
11
- componentId: "components-web__sc-1c8bd8e-0"
12
- })(_ref => {
11
+ const Container = styled.div(_ref => {
13
12
  let {
14
13
  overlay
15
14
  } = _ref;
@@ -1,19 +1,19 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Box, Divider, PressableCardBase, selectSystemProps, Spacer, StackView, StackWrap, Typography, hrefAttrsProp, a11yProps, focusHandlerProps, viewProps, withLinkRouter, useThemeTokens, useThemeTokensCallback, getTokensPropType } from '@telus-uds/components-base';
4
- import styled from 'styled-components';
4
+ import { styledComponents } from '../utils';
5
5
  import FullBleedContent, { getFullBleedBorderRadius, useFullBleedContentProps } from '../shared/FullBleedContent';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ const {
8
+ styled
9
+ } = styledComponents;
6
10
 
7
11
  // Passes React Native-oriented system props through UDS PressableCardBase
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
12
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, focusHandlerProps, viewProps]);
10
13
 
11
14
  // Stop changes to the card's inner border width causing the size and
12
15
  // apparent position of the full bleed image to change.
13
- const FullBleedOffsetOuter = /*#__PURE__*/styled.div.withConfig({
14
- displayName: "StoryCard__FullBleedOffsetOuter",
15
- componentId: "components-web__sc-yhvivu-0"
16
- })(_ref => {
16
+ const FullBleedOffsetOuter = styled.div(_ref => {
17
17
  let {
18
18
  borderOffset
19
19
  } = _ref;
@@ -22,10 +22,7 @@ const FullBleedOffsetOuter = /*#__PURE__*/styled.div.withConfig({
22
22
  marginTop: borderOffset * 2
23
23
  };
24
24
  });
25
- const FullBleedOffsetInner = /*#__PURE__*/styled.div.withConfig({
26
- displayName: "StoryCard__FullBleedOffsetInner",
27
- componentId: "components-web__sc-yhvivu-1"
28
- })(_ref2 => {
25
+ const FullBleedOffsetInner = styled.div(_ref2 => {
29
26
  let {
30
27
  borderOffset
31
28
  } = _ref2;
package/lib/Table/Cell.js CHANGED
@@ -1,9 +1,13 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import styled, { css } from 'styled-components';
4
3
  import { Typography, useThemeTokens, applyShadowToken } from '@telus-uds/components-base';
4
+ import { styledComponents } from '../utils';
5
5
  import { useTableContext } from './Table';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
+ const {
8
+ styled,
9
+ css
10
+ } = styledComponents;
7
11
  const HEADER_TYPE = {
8
12
  HEADING: 'heading',
9
13
  SUBHEADING: 'subHeading',
@@ -15,9 +19,28 @@ const stickyStyles = _ref => {
15
19
  stickyBackgroundColor,
16
20
  type
17
21
  } = _ref;
18
- return css(["position:sticky;left:0;z-index:2;clip-path:inset(0 -8px 0 0);", " &::before{content:'';box-shadow:", ";position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;}"], type !== HEADER_TYPE.SUBHEADING && type !== HEADER_TYPE.HEADING ? `background-color: ${stickyBackgroundColor};` : undefined, cellStickyShadow);
22
+ return css`
23
+ position: sticky;
24
+ left: 0; // needed for sticky to work
25
+ z-index: 2;
26
+ clip-path: inset(0 -8px 0 0); // use clip path to cut off the shadow rendered below
27
+ // Override default cell background with stickyBackgroundColor with an exception to subheading and heading
28
+ ${type !== HEADER_TYPE.SUBHEADING && type !== HEADER_TYPE.HEADING ? `background-color: ${stickyBackgroundColor};` : undefined}
29
+ &::before {
30
+ // use a pseudo element for the sticky shadow, since we already use shadows for inner cells border
31
+ content: '';
32
+ box-shadow: ${cellStickyShadow};
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ right: 0;
37
+ bottom: 0;
38
+ pointer-events: none;
39
+ }
40
+ `;
19
41
  };
20
- const sharedStyles = /*#__PURE__*/css(["", ""], _ref2 => {
42
+ const sharedStyles = css`
43
+ ${_ref2 => {
21
44
  let {
22
45
  isSticky,
23
46
  align,
@@ -31,29 +54,37 @@ const sharedStyles = /*#__PURE__*/css(["", ""], _ref2 => {
31
54
  stickyBackgroundColor,
32
55
  type
33
56
  } = _ref2;
34
- return css(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";"], align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft, cellBackground, isSticky && stickyStyles({
57
+ return css`
58
+ text-align: ${align};
59
+ min-width: ${cellMinWidth}px;
60
+ padding: ${cellPaddingTop}px ${cellPaddingRight}px ${cellPaddingBottom}px ${cellPaddingLeft}px;
61
+ background-color: ${cellBackground};
62
+ ${isSticky && stickyStyles({
35
63
  type,
36
64
  cellStickyShadow,
37
65
  stickyBackgroundColor
38
- }));
39
- });
40
- const createStyledCell = htmlElement => styled[htmlElement].withConfig({
41
- displayName: "Cell__createStyledCell",
42
- componentId: "components-web__sc-ltgfic-0"
43
- })(["", ";box-shadow:", ";", ""], sharedStyles, _ref3 => {
66
+ })};
67
+ `;
68
+ }}
69
+ `;
70
+ const createStyledCell = htmlElement => styled[htmlElement]`
71
+ ${sharedStyles};
72
+ box-shadow: ${_ref3 => {
44
73
  let {
45
74
  cellBoxShadowColor,
46
75
  type
47
76
  } = _ref3;
48
77
  return type === HEADER_TYPE.HEADING ? `inset 0 1px 0 ${cellBoxShadowColor}, inset 0 -1px 0 ${cellBoxShadowColor}` : `inset 0 1px 0 ${cellBoxShadowColor}`;
49
- }, _ref4 => {
78
+ }};
79
+ ${_ref4 => {
50
80
  let {
51
81
  display
52
82
  } = _ref4;
53
83
  return display && `*:not(:empty) {
54
84
  display: ${display};
55
85
  }`;
56
- });
86
+ }}
87
+ `;
57
88
  const StyledHeaderCell = createStyledCell('th');
58
89
  const StyledDataCell = createStyledCell('td');
59
90
  const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {