@telus-uds/components-web 3.2.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 (116) hide show
  1. package/CHANGELOG.md +14 -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 +5 -6
  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/styles.js +18 -9
  29. package/lib/Ribbon/Ribbon.js +57 -31
  30. package/lib/Span/Span.js +6 -7
  31. package/lib/Spinner/Spinner.js +8 -18
  32. package/lib/Spinner/SpinnerContent.js +5 -6
  33. package/lib/StoryCard/StoryCard.js +7 -10
  34. package/lib/Table/Cell.js +43 -12
  35. package/lib/Table/Table.js +15 -11
  36. package/lib/TermsAndConditions/ExpandCollapse.js +7 -13
  37. package/lib/TermsAndConditions/TermsAndConditions.js +9 -22
  38. package/lib/Testimonial/Testimonial.js +10 -26
  39. package/lib/Toast/Toast.js +64 -13
  40. package/lib/Video/ControlBar/ControlBar.js +8 -18
  41. package/lib/Video/ControlBar/Controls/VideoButton/VideoButton.js +5 -6
  42. package/lib/Video/ControlBar/Controls/VideoMenu/VideoMenu.js +7 -14
  43. package/lib/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.js +7 -14
  44. package/lib/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.js +6 -10
  45. package/lib/Video/MiddleControlButton/MiddleControlButton.js +5 -6
  46. package/lib/Video/Video.js +10 -26
  47. package/lib/VideoPicker/VideoPicker.js +44 -20
  48. package/lib/VideoPicker/VideoPickerThumbnail.js +52 -18
  49. package/lib/WaffleGrid/WaffleGrid.js +7 -14
  50. package/lib/WebVideo/WebVideo.js +9 -14
  51. package/lib/index.js +1 -1
  52. package/lib/shared/FullBleedContent/FullBleedContent.js +5 -5
  53. package/lib/shared/VideoSplash/SplashButton/SplashButton.js +6 -9
  54. package/lib/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.js +8 -17
  55. package/lib/shared/VideoSplash/VideoSplash.js +5 -6
  56. package/lib/utils/index.js +2 -1
  57. package/lib/utils/ssr.js +4 -1
  58. package/lib/utils/theming/styled-components.js +26 -0
  59. package/package.json +3 -3
  60. package/src/Badge/Badge.jsx +3 -2
  61. package/src/BlockQuote/BlockQuote.jsx +3 -2
  62. package/src/Breadcrumbs/Breadcrumbs.jsx +23 -13
  63. package/src/Breadcrumbs/Item/Item.jsx +3 -2
  64. package/src/Callout/Callout.jsx +3 -2
  65. package/src/Card/Card.jsx +3 -1
  66. package/src/Card/CardContent.jsx +3 -2
  67. package/src/Card/CardFooter.jsx +3 -2
  68. package/src/Countdown/Countdown.jsx +3 -2
  69. package/src/Countdown/Segment.jsx +3 -1
  70. package/src/DatePicker/CalendarContainer.jsx +3 -1
  71. package/src/DatePicker/DatePicker.jsx +3 -2
  72. package/src/DatePicker/reactDatesCss.js +3 -1
  73. package/src/Disclaimer/Disclaimer.jsx +3 -2
  74. package/src/Footnote/Footnote.jsx +9 -2
  75. package/src/Footnote/FootnoteLink.jsx +3 -2
  76. package/src/NavigationBar/NavigationBar.jsx +3 -2
  77. package/src/NavigationBar/NavigationItem.jsx +3 -2
  78. package/src/OrderedList/Item.jsx +4 -3
  79. package/src/OrderedList/ItemBase.jsx +3 -1
  80. package/src/OrderedList/OrderedList.jsx +3 -2
  81. package/src/OrderedList/OrderedListBase.jsx +3 -1
  82. package/src/Paragraph/Paragraph.jsx +3 -2
  83. package/src/PreviewCard/PreviewCard.jsx +3 -1
  84. package/src/PriceLockup/PriceLockup.jsx +3 -2
  85. package/src/Progress/ProgressBar.jsx +3 -1
  86. package/src/QuantitySelector/styles.js +3 -1
  87. package/src/Ribbon/Ribbon.jsx +3 -2
  88. package/src/Span/Span.jsx +3 -2
  89. package/src/Spinner/Spinner.jsx +3 -2
  90. package/src/Spinner/SpinnerContent.jsx +3 -2
  91. package/src/StoryCard/StoryCard.jsx +3 -1
  92. package/src/Table/Cell.jsx +3 -1
  93. package/src/Table/Table.jsx +3 -2
  94. package/src/TermsAndConditions/ExpandCollapse.jsx +3 -1
  95. package/src/TermsAndConditions/TermsAndConditions.jsx +3 -2
  96. package/src/Testimonial/Testimonial.jsx +3 -2
  97. package/src/Toast/Toast.jsx +3 -2
  98. package/src/Video/ControlBar/ControlBar.jsx +3 -3
  99. package/src/Video/ControlBar/Controls/VideoButton/VideoButton.jsx +4 -3
  100. package/src/Video/ControlBar/Controls/VideoMenu/VideoMenu.jsx +3 -3
  101. package/src/Video/ControlBar/Controls/VideoProgressBar/VideoProgressBar.jsx +3 -3
  102. package/src/Video/ControlBar/Controls/VolumeSlider/VolumeSlider.jsx +3 -3
  103. package/src/Video/MiddleControlButton/MiddleControlButton.jsx +4 -3
  104. package/src/Video/Video.jsx +3 -2
  105. package/src/VideoPicker/VideoPicker.jsx +3 -2
  106. package/src/VideoPicker/VideoPickerThumbnail.jsx +3 -1
  107. package/src/WaffleGrid/WaffleGrid.jsx +3 -2
  108. package/src/WebVideo/WebVideo.jsx +4 -3
  109. package/src/index.js +1 -1
  110. package/src/shared/FullBleedContent/FullBleedContent.jsx +3 -2
  111. package/src/shared/VideoSplash/SplashButton/SplashButton.jsx +3 -1
  112. package/src/shared/VideoSplash/SplashButtonWithDetails/SplashButtonWithDetails.jsx +4 -2
  113. package/src/shared/VideoSplash/VideoSplash.jsx +3 -2
  114. package/src/utils/index.js +3 -1
  115. package/src/utils/ssr.js +2 -1
  116. package/src/utils/theming/styled-components.js +23 -0
@@ -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 {
5
4
  applyTextStyles,
6
5
  selectSystemProps,
@@ -9,7 +8,9 @@ import {
9
8
  variantProp
10
9
  } from '@telus-uds/components-base'
11
10
  import dictionary from './dictionary'
12
- import { htmlAttrs } from '../utils'
11
+ import { htmlAttrs, styledComponents } from '../utils'
12
+
13
+ const { styled } = styledComponents
13
14
 
14
15
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
15
16
 
@@ -9,12 +9,13 @@ import {
9
9
  useResponsiveProp,
10
10
  withLinkRouter
11
11
  } from '@telus-uds/components-base'
12
- import styled from 'styled-components'
13
- import { htmlAttrs, scrollToAnchor } from '../utils'
12
+ import { htmlAttrs, scrollToAnchor, styledComponents } from '../utils'
14
13
  import NavigationItem from './NavigationItem'
15
14
  import NavigationSubMenu from './NavigationSubMenu'
16
15
  import collapseItems from './collapseItems'
17
16
 
17
+ const { styled } = styledComponents
18
+
18
19
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
19
20
 
20
21
  const Heading = styled.div({
@@ -8,8 +8,9 @@ import {
8
8
  useThemeTokensCallback,
9
9
  getTokensPropType
10
10
  } from '@telus-uds/components-base'
11
- import styled from 'styled-components'
12
- import { htmlAttrs } from '../utils'
11
+ import { htmlAttrs, styledComponents } from '../utils'
12
+
13
+ const { styled } = styledComponents
13
14
 
14
15
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
15
16
 
@@ -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 {
5
4
  applyTextStyles,
6
5
  getTokensPropType,
@@ -12,9 +11,11 @@ import {
12
11
  wrapStringsInText
13
12
  } from '@telus-uds/components-base'
14
13
  import ItemBase from './ItemBase'
15
- import { htmlAttrs } from '../utils'
14
+ import { htmlAttrs, styledComponents } from '../utils'
16
15
  import { OL_COUNTER_NAME } from './constants'
17
16
 
17
+ const { styled } = styledComponents
18
+
18
19
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
19
20
 
20
21
  const selectItemTextStyles = (
@@ -70,7 +71,7 @@ const StyledItemBase = styled(ItemBase)(
70
71
  const ItemContent = styled.div({
71
72
  display: 'flex',
72
73
  flexDirection: 'column',
73
- gap: 5
74
+ gap: 0
74
75
  })
75
76
 
76
77
  const Item = React.forwardRef(
@@ -1,6 +1,8 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
3
+ import { styledComponents } from '../utils'
4
+
5
+ const { styled } = styledComponents
4
6
 
5
7
  const StyledItem = styled.li({
6
8
  display: 'flex'
@@ -1,12 +1,13 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
3
  import { getTokensPropType, selectSystemProps, variantProp } from '@telus-uds/components-base'
5
- import { htmlAttrs } from '../utils'
4
+ import { htmlAttrs, styledComponents } from '../utils'
6
5
  import OrderedListBase from './OrderedListBase'
7
6
  import Item from './Item'
8
7
  import { OL_COUNTER_NAME } from './constants'
9
8
 
9
+ const { styled } = styledComponents
10
+
10
11
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
11
12
 
12
13
  const StyledOrderedListBase = styled(OrderedListBase)(({ start }) => ({
@@ -1,8 +1,10 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
3
+ import { styledComponents } from '../utils'
4
4
  import ItemBase from './ItemBase'
5
5
 
6
+ const { styled } = styledComponents
7
+
6
8
  const StyledList = styled.ol({
7
9
  display: 'flex',
8
10
  flexDirection: 'column',
@@ -1,9 +1,10 @@
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
4
 
6
- import { htmlAttrs, useTypographyTheme } from '../utils'
5
+ import { htmlAttrs, useTypographyTheme, styledComponents } from '../utils'
6
+
7
+ const { styled } = styledComponents
7
8
 
8
9
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
9
10
 
@@ -17,13 +17,15 @@ import {
17
17
  useTheme,
18
18
  getTokensPropType
19
19
  } from '@telus-uds/components-base'
20
- import styled from 'styled-components'
20
+ import { styledComponents } from '../utils'
21
21
  import FullBleedContent, {
22
22
  getFullBleedBorderRadius,
23
23
  useFullBleedContentProps
24
24
  } from '../shared/FullBleedContent'
25
25
  import AuthorDate from './AuthorDate'
26
26
 
27
+ const { styled } = styledComponents
28
+
27
29
  // Passes React Native-oriented system props through UDS PressableCardBase
28
30
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([
29
31
  a11yProps,
@@ -9,10 +9,11 @@ import {
9
9
  useViewport,
10
10
  getTokensPropType
11
11
  } from '@telus-uds/components-base'
12
- import styled from 'styled-components'
13
12
  import FootnoteLink from '../Footnote/FootnoteLink'
14
13
  import getTypographyTokens from './tokens'
15
- import { htmlAttrs, warn } from '../utils'
14
+ import { htmlAttrs, warn, styledComponents } from '../utils'
15
+
16
+ const { styled } = styledComponents
16
17
 
17
18
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
18
19
 
@@ -10,7 +10,9 @@ import {
10
10
  variantProp,
11
11
  applyShadowToken
12
12
  } from '@telus-uds/components-base'
13
- import styled from 'styled-components'
13
+ import { styledComponents } from '../utils'
14
+
15
+ const { styled } = styledComponents
14
16
 
15
17
  // Passes React Native-oriented system props through UDS Progress
16
18
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps])
@@ -1,4 +1,6 @@
1
- import styled from 'styled-components'
1
+ import { styledComponents } from '../utils'
2
+
3
+ const { styled } = styledComponents
2
4
 
3
5
  export const InputField = styled.div`
4
6
  order: 1;
@@ -6,8 +6,9 @@ import {
6
6
  useThemeTokens,
7
7
  getTokensPropType
8
8
  } from '@telus-uds/components-base'
9
- import styled from 'styled-components'
10
- import { htmlAttrs } from '../utils'
9
+ import { htmlAttrs, styledComponents } from '../utils'
10
+
11
+ const { styled } = styledComponents
11
12
 
12
13
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
13
14
 
package/src/Span/Span.jsx CHANGED
@@ -1,9 +1,10 @@
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
4
 
6
- import { htmlAttrs, useTypographyTheme } from '../utils'
5
+ import { htmlAttrs, useTypographyTheme, styledComponents } from '../utils'
6
+
7
+ const { styled } = styledComponents
7
8
 
8
9
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
9
10
 
@@ -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 {
5
4
  selectSystemProps,
6
5
  useScrollBlocking,
@@ -9,9 +8,11 @@ import {
9
8
  } from '@telus-uds/components-base'
10
9
  import { Portal } from '@gorhom/portal'
11
10
  import SpinnerContent from './SpinnerContent'
12
- import { htmlAttrs, media } from '../utils'
11
+ import { htmlAttrs, media, styledComponents } from '../utils'
13
12
  import { BACKDROP_OPACITY, BACKDROP_Z_INDEX } from './constants'
14
13
 
14
+ const { styled } = styledComponents
15
+
15
16
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
16
17
 
17
18
  const SpinnerContainer = styled.div(({ inline, fullScreen }) => ({
@@ -1,15 +1,16 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
3
  import {
5
4
  ActivityIndicator,
6
5
  StackView,
7
6
  Typography,
8
7
  selectSystemProps
9
8
  } from '@telus-uds/components-base'
10
- import { htmlAttrs } from '../utils'
9
+ import { htmlAttrs, styledComponents } from '../utils'
11
10
  import { BACKDROP_Z_INDEX, LARGE } from './constants'
12
11
 
12
+ const { styled } = styledComponents
13
+
13
14
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
14
15
 
15
16
  const Container = styled.div(({ overlay }) => ({
@@ -18,12 +18,14 @@ import {
18
18
  useThemeTokensCallback,
19
19
  getTokensPropType
20
20
  } from '@telus-uds/components-base'
21
- import styled from 'styled-components'
21
+ import { styledComponents } from '../utils'
22
22
  import FullBleedContent, {
23
23
  getFullBleedBorderRadius,
24
24
  useFullBleedContentProps
25
25
  } from '../shared/FullBleedContent'
26
26
 
27
+ const { styled } = styledComponents
28
+
27
29
  // Passes React Native-oriented system props through UDS PressableCardBase
28
30
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([
29
31
  a11yProps,
@@ -1,9 +1,11 @@
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
 
7
+ const { styled, css } = styledComponents
8
+
7
9
  const HEADER_TYPE = {
8
10
  HEADING: 'heading',
9
11
  SUBHEADING: 'subHeading',
@@ -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 {
5
4
  selectSystemProps,
6
5
  useSafeLayoutEffect,
@@ -8,7 +7,9 @@ import {
8
7
  getTokensPropType
9
8
  } from '@telus-uds/components-base'
10
9
  import throttle from 'lodash.throttle'
11
- import { htmlAttrs } from '../utils'
10
+ import { htmlAttrs, styledComponents } from '../utils'
11
+
12
+ const { styled } = styledComponents
12
13
 
13
14
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
14
15
 
@@ -5,7 +5,9 @@ import {
5
5
  IconButton,
6
6
  useThemeTokensCallback
7
7
  } from '@telus-uds/components-base'
8
- import styled from 'styled-components'
8
+ import { styledComponents } from '../utils'
9
+
10
+ const { styled } = styledComponents
9
11
 
10
12
  const ExpandCollapseControl = styled.div({
11
13
  alignItems: 'center',
@@ -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 {
5
4
  Box,
6
5
  Divider,
@@ -17,9 +16,11 @@ import {
17
16
  } from '@telus-uds/components-base'
18
17
  import ExpandCollapse from './ExpandCollapse'
19
18
  import OrderedListBase from '../OrderedList/OrderedListBase'
20
- import { htmlAttrs, media, renderStructuredContent } from '../utils'
19
+ import { htmlAttrs, media, renderStructuredContent, styledComponents } from '../utils'
21
20
  import defaultDictionary from './dictionary'
22
21
 
22
+ const { styled } = styledComponents
23
+
23
24
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
24
25
 
25
26
  const ContentContainer = styled.div(({ tokens }) => ({
@@ -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 {
5
4
  Icon,
6
5
  selectSystemProps,
@@ -10,7 +9,9 @@ import {
10
9
  getTokensPropType
11
10
  } from '@telus-uds/components-base'
12
11
  import Image from '../Image'
13
- import { htmlAttrs } from '../utils'
12
+ import { htmlAttrs, styledComponents } from '../utils'
13
+
14
+ const { styled } = styledComponents
14
15
 
15
16
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
16
17
 
@@ -10,8 +10,9 @@ import {
10
10
  useViewport,
11
11
  getTokensPropType
12
12
  } from '@telus-uds/components-base'
13
- import styled, { keyframes, css } from 'styled-components'
14
- import { htmlAttrs } from '../utils'
13
+ import { htmlAttrs, styledComponents } from '../utils'
14
+
15
+ const { styled, css, keyframes } = styledComponents
15
16
 
16
17
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
17
18
 
@@ -1,7 +1,5 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
-
5
3
  import {
6
4
  StackView,
7
5
  useThemeTokens,
@@ -16,7 +14,9 @@ import VideoButton from './Controls/VideoButton/VideoButton'
16
14
  import VideoMenu from './Controls/VideoMenu/VideoMenu'
17
15
 
18
16
  import videoText from '../videoText'
19
- import { htmlAttrs } from '../../utils'
17
+ import { htmlAttrs, styledComponents } from '../../utils'
18
+
19
+ const { styled } = styledComponents
20
20
 
21
21
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
22
22
 
@@ -1,9 +1,10 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
-
5
3
  import { useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
6
- import { htmlAttrs } from '../../../../utils'
4
+
5
+ import { htmlAttrs, styledComponents } from '../../../../utils'
6
+
7
+ const { styled } = styledComponents
7
8
 
8
9
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
9
10
 
@@ -1,7 +1,5 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
-
5
3
  import {
6
4
  StackView,
7
5
  Typography,
@@ -11,7 +9,9 @@ import {
11
9
  } from '@telus-uds/components-base'
12
10
 
13
11
  import videoText from '../../../videoText'
14
- import { htmlAttrs } from '../../../../utils'
12
+ import { htmlAttrs, styledComponents } from '../../../../utils'
13
+
14
+ const { styled } = styledComponents
15
15
 
16
16
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
17
17
 
@@ -1,11 +1,11 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
-
5
3
  import { Typography, useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
6
4
 
7
5
  import videoText from '../../../videoText'
8
- import { htmlAttrs } from '../../../../utils'
6
+ import { htmlAttrs, styledComponents } from '../../../../utils'
7
+
8
+ const { styled } = styledComponents
9
9
 
10
10
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
11
11
 
@@ -1,12 +1,12 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
-
5
3
  import { Icon, useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
6
4
 
7
5
  import VideoButton from '../VideoButton/VideoButton'
8
6
  import videoText from '../../../videoText'
9
- import { htmlAttrs } from '../../../../utils'
7
+ import { htmlAttrs, styledComponents } from '../../../../utils'
8
+
9
+ const { styled } = styledComponents
10
10
 
11
11
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
12
12
 
@@ -1,9 +1,10 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
-
5
3
  import { useThemeTokens, selectSystemProps } from '@telus-uds/components-base'
6
- import { htmlAttrs } from '../../utils'
4
+
5
+ import { htmlAttrs, styledComponents } from '../../utils'
6
+
7
+ const { styled } = styledComponents
7
8
 
8
9
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
9
10
 
@@ -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 fscreen from 'fscreen'
5
4
  import {
6
5
  useThemeTokens,
@@ -10,12 +9,14 @@ import {
10
9
  } from '@telus-uds/components-base'
11
10
  import Spinner from '../Spinner'
12
11
 
13
- import { warn, htmlAttrs } from '../utils'
12
+ import { warn, htmlAttrs, styledComponents } from '../utils'
14
13
  import VideoSplash from '../shared/VideoSplash/VideoSplash'
15
14
  import MiddleControlButton from './MiddleControlButton/MiddleControlButton'
16
15
  import ControlBar from './ControlBar/ControlBar'
17
16
  import videoText from './videoText'
18
17
 
18
+ const { styled } = styledComponents
19
+
19
20
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
20
21
 
21
22
  // TODO: replace with the actual spinner component from UDS
@@ -9,12 +9,13 @@ import {
9
9
  getTokensPropType
10
10
  } from '@telus-uds/components-base'
11
11
 
12
- import styled, { css } from 'styled-components'
13
12
  import { VideoPropType } from './videoPropType'
14
13
  import VideoPickerThumbnail from './VideoPickerThumbnail'
15
14
  import VideoPickerPlayer from './VideoPickerPlayer'
16
15
  import VideoSlider from './VideoSlider'
17
- import { htmlAttrs } from '../utils'
16
+ import { htmlAttrs, styledComponents } from '../utils'
17
+
18
+ const { styled, css } = styledComponents
18
19
 
19
20
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
20
21
 
@@ -2,7 +2,6 @@ import React from 'react'
2
2
  import { Pressable, StyleSheet } from 'react-native-web'
3
3
  import PropTypes from 'prop-types'
4
4
  import { viewports } from '@telus-uds/system-constants'
5
- import styled from 'styled-components'
6
5
  import {
7
6
  StackView,
8
7
  Typography,
@@ -10,10 +9,13 @@ import {
10
9
  horizontalScrollUtils,
11
10
  useThemeTokensCallback
12
11
  } from '@telus-uds/components-base'
12
+ import { styledComponents } from '../utils'
13
13
  import { getTimestamp } from '../shared/VideoSplash/helpers'
14
14
  import { VideoPropType, RefPropType } from './videoPropType'
15
15
  import VideoSplash from '../shared/VideoSplash/VideoSplash'
16
16
 
17
+ const { styled } = styledComponents
18
+
17
19
  const { getItemPositionLayoutHandler, itemPositionsPropType } = horizontalScrollUtils
18
20
 
19
21
  // Use a React Native (web) outer container so it can take an onLayout callback, to
@@ -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 {
5
4
  Link,
6
5
  responsiveProps,
@@ -15,7 +14,9 @@ import {
15
14
  import OrderedListBase from '../OrderedList/OrderedListBase'
16
15
  import ItemBase from '../OrderedList/ItemBase'
17
16
  import Image from '../Image'
18
- import { htmlAttrs } from '../utils'
17
+ import { htmlAttrs, styledComponents } from '../utils'
18
+
19
+ const { styled } = styledComponents
19
20
 
20
21
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
21
22
 
@@ -2,11 +2,12 @@ import { selectSystemProps } from '@telus-uds/components-base'
2
2
  import PropTypes from 'prop-types'
3
3
  import React from 'react'
4
4
  import YouTube from 'react-youtube'
5
- import styled from 'styled-components'
6
5
  import VideoSplash from '../shared/VideoSplash/VideoSplash'
7
- import { htmlAttrs } from '../utils'
6
+ import { htmlAttrs, styledComponents } from '../utils'
8
7
  import { triggerInProgressVideoIntervals, YoutubePlayerState } from './utils'
9
8
 
9
+ const { styled } = styledComponents
10
+
10
11
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
11
12
 
12
13
  const StyledPlayerContainer = styled.div({
@@ -15,7 +16,7 @@ const StyledPlayerContainer = styled.div({
15
16
  outline: 'none'
16
17
  })
17
18
 
18
- const StyledYoutubePlayer = styled(YouTube)({
19
+ const StyledYoutubePlayer = styled((props) => <YouTube {...props} />)({
19
20
  position: 'absolute',
20
21
  top: 0,
21
22
  left: 0,
package/src/index.js CHANGED
@@ -37,6 +37,6 @@ export { default as NavigationBar } from './NavigationBar'
37
37
  export { default as Progress } from './Progress'
38
38
  export { default as SkeletonProvider } from './SkeletonProvider'
39
39
 
40
- export { ssrStyles } from './utils'
40
+ export { ssrStyles, styledComponents } from './utils'
41
41
 
42
42
  export * from './baseExports'
@@ -1,9 +1,10 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
-
3
+ import { styledComponents } from '../../utils'
5
4
  import ResponsiveImage from '../../ResponsiveImage'
6
5
 
6
+ const { styled } = styledComponents
7
+
7
8
  const selectFullBleedContentProps = ({
8
9
  alt,
9
10
  height,
@@ -1,9 +1,11 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
3
  import { useThemeTokens } from '@telus-uds/components-base'
4
+ import { styledComponents } from '../../../utils'
5
5
  import { getAriaLabel, getTimestamp } from '../helpers'
6
6
 
7
+ const { styled } = styledComponents
8
+
7
9
  const ButtonContainer = styled.button({
8
10
  background: 'none',
9
11
  border: 0,
@@ -1,10 +1,12 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
-
5
3
  import { Typography, useThemeTokens } from '@telus-uds/components-base'
4
+ import { styledComponents } from '../../../utils'
5
+
6
6
  import { getAriaLabel, getTimestamp } from '../helpers'
7
7
 
8
+ const { styled } = styledComponents
9
+
8
10
  const ButtonContainer = styled.button({
9
11
  background: 'none',
10
12
  border: 0,
@@ -1,12 +1,13 @@
1
1
  import React from 'react'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
4
3
  import { selectSystemProps, useViewport } from '@telus-uds/components-base'
5
4
  import { viewports } from '@telus-uds/system-constants'
6
5
  import SplashButton from './SplashButton/SplashButton'
7
6
  import SplashButtonWithDetails from './SplashButtonWithDetails/SplashButtonWithDetails'
8
7
  import videoText from '../../Video/videoText'
9
- import { htmlAttrs } from '../../utils'
8
+ import { htmlAttrs, styledComponents } from '../../utils'
9
+
10
+ const { styled } = styledComponents
10
11
 
11
12
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
12
13