@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.
- package/CHANGELOG.md +14 -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 +5 -6
- 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/styles.js +18 -9
- 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 +2 -1
- 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 +3 -2
- 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/styles.js +3 -1
- 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 +3 -1
- package/src/utils/ssr.js +2 -1
- package/src/utils/theming/styled-components.js +23 -0
package/src/utils/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import isElementFocusable from './isElementFocusable'
|
|
|
8
8
|
import renderStructuredContent from './renderStructuredContent'
|
|
9
9
|
import useOverlaidPosition from './useOverlaidPosition'
|
|
10
10
|
import scrollToAnchor from './scrollToAnchor'
|
|
11
|
+
import styledComponents from './theming/styled-components'
|
|
11
12
|
|
|
12
13
|
export {
|
|
13
14
|
deprecate,
|
|
@@ -21,5 +22,6 @@ export {
|
|
|
21
22
|
ssrStyles,
|
|
22
23
|
isElementFocusable,
|
|
23
24
|
useOverlaidPosition,
|
|
24
|
-
scrollToAnchor
|
|
25
|
+
scrollToAnchor,
|
|
26
|
+
styledComponents
|
|
25
27
|
}
|
package/src/utils/ssr.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServerStyleSheet } from 'styled-components'
|
|
2
1
|
import { ssrStyles as baseSsrStyles } from '@telus-uds/components-base'
|
|
2
|
+
import styledComponents from './theming/styled-components'
|
|
3
3
|
/**
|
|
4
4
|
* Returns object with `renderApp` and `getStyles` functions.
|
|
5
5
|
* Weave these into your app's server-side render process:
|
|
@@ -21,6 +21,7 @@ const ssrStyles = (
|
|
|
21
21
|
appName = 'Allium app',
|
|
22
22
|
{ styleGetters = [], collectStyles = (renderedApp) => renderedApp } = {}
|
|
23
23
|
) => {
|
|
24
|
+
const { ServerStyleSheet } = styledComponents
|
|
24
25
|
const sheet = new ServerStyleSheet()
|
|
25
26
|
const getStyledComponentsStyles = () => {
|
|
26
27
|
const styles = sheet.getStyleElement()
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Currently, `styled` is only available as the default export in `styled-components`.
|
|
3
|
+
* In transpiled/CommonJS environments, that works as expected, but it breaks server-side ESM usage of `styled-components`.
|
|
4
|
+
*
|
|
5
|
+
* To make `styled-components` work server-side, instead of:
|
|
6
|
+
*
|
|
7
|
+
* import styled from 'styled-components';
|
|
8
|
+
*
|
|
9
|
+
* We must write:
|
|
10
|
+
*
|
|
11
|
+
* import styledWrapper from 'styled-components';
|
|
12
|
+
* const styled = styledWrapper.default;
|
|
13
|
+
*
|
|
14
|
+
* This approach is confusing and not a viable option for code that should run in both browser and server.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import _styled, { css, keyframes, createGlobalStyle, ServerStyleSheet } from 'styled-components'
|
|
18
|
+
|
|
19
|
+
const styled = typeof _styled === 'function' ? _styled : _styled.default
|
|
20
|
+
|
|
21
|
+
const styledComponents = { styled, css, keyframes, createGlobalStyle, ServerStyleSheet }
|
|
22
|
+
|
|
23
|
+
export default styledComponents
|