@telus-uds/components-web 2.19.4 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -2
- package/lib/Breadcrumbs/Breadcrumbs.js +1 -0
- package/lib/Countdown/Countdown.js +1 -0
- package/lib/DatePicker/DatePicker.js +2 -0
- package/lib/Disclaimer/Disclaimer.js +1 -4
- package/lib/Footnote/Footnote.js +1 -0
- package/lib/IconButton/IconButton.js +3 -1
- package/lib/Image/Image.js +2 -1
- package/lib/NavigationBar/NavigationBar.js +3 -1
- package/lib/OrderedList/OrderedList.js +2 -0
- package/lib/PreviewCard/PreviewCard.js +1 -0
- package/lib/Ribbon/Ribbon.js +2 -2
- package/lib/Spinner/Spinner.js +1 -0
- package/lib/StoryCard/StoryCard.js +1 -0
- package/lib/Table/Table.js +1 -0
- package/lib/TermsAndConditions/TermsAndConditions.js +7 -1
- package/lib/Testimonial/Testimonial.js +1 -0
- package/lib/Toast/Toast.js +2 -2
- package/lib/VideoPicker/VideoPicker.js +1 -0
- package/lib/WaffleGrid/WaffleGrid.js +5 -0
- package/lib-module/Breadcrumbs/Breadcrumbs.js +2 -1
- package/lib-module/Countdown/Countdown.js +2 -1
- package/lib-module/DatePicker/DatePicker.js +3 -1
- package/lib-module/Disclaimer/Disclaimer.js +2 -5
- package/lib-module/Footnote/Footnote.js +2 -1
- package/lib-module/IconButton/IconButton.js +4 -2
- package/lib-module/Image/Image.js +3 -2
- package/lib-module/NavigationBar/NavigationBar.js +4 -2
- package/lib-module/OrderedList/OrderedList.js +3 -1
- package/lib-module/PreviewCard/PreviewCard.js +2 -1
- package/lib-module/Ribbon/Ribbon.js +2 -2
- package/lib-module/Spinner/Spinner.js +2 -1
- package/lib-module/StoryCard/StoryCard.js +2 -1
- package/lib-module/Table/Table.js +2 -1
- package/lib-module/TermsAndConditions/TermsAndConditions.js +8 -2
- package/lib-module/Testimonial/Testimonial.js +2 -1
- package/lib-module/Toast/Toast.js +2 -2
- package/lib-module/VideoPicker/VideoPicker.js +2 -1
- package/lib-module/WaffleGrid/WaffleGrid.js +6 -1
- package/package.json +3 -4
- package/src/Breadcrumbs/Breadcrumbs.jsx +3 -1
- package/src/Countdown/Countdown.jsx +3 -1
- package/src/DatePicker/DatePicker.jsx +4 -1
- package/src/Disclaimer/Disclaimer.jsx +7 -4
- package/src/Footnote/Footnote.jsx +3 -1
- package/src/IconButton/IconButton.jsx +7 -2
- package/src/Image/Image.jsx +5 -2
- package/src/NavigationBar/NavigationBar.jsx +5 -2
- package/src/OrderedList/OrderedList.jsx +3 -2
- package/src/PreviewCard/PreviewCard.jsx +3 -1
- package/src/Ribbon/Ribbon.jsx +2 -2
- package/src/Spinner/Spinner.jsx +7 -1
- package/src/StoryCard/StoryCard.jsx +3 -1
- package/src/Table/Table.jsx +7 -1
- package/src/TermsAndConditions/TermsAndConditions.jsx +8 -2
- package/src/Testimonial/Testimonial.jsx +3 -1
- package/src/Toast/Toast.jsx +2 -2
- package/src/VideoPicker/VideoPicker.jsx +3 -1
- package/src/WaffleGrid/WaffleGrid.jsx +7 -1
- package/component-docs.json +0 -14218
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { Link, responsiveProps, selectSystemProps, useResponsiveProp, useThemeTokens, withLinkRouter, useViewport, Typography } from '@telus-uds/components-base';
|
|
4
|
+
import { Link, responsiveProps, selectSystemProps, useResponsiveProp, useThemeTokens, withLinkRouter, useViewport, Typography, getTokensPropType } from '@telus-uds/components-base';
|
|
5
5
|
import OrderedListBase from '../OrderedList/OrderedListBase';
|
|
6
6
|
import ItemBase from '../OrderedList/ItemBase';
|
|
7
7
|
import Image from '../Image';
|
|
@@ -146,6 +146,11 @@ WaffleGrid.propTypes = { ...selectedSystemPropTypes,
|
|
|
146
146
|
...withLinkRouter.propTypes
|
|
147
147
|
})).isRequired,
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Sets the tokens for WaffleGrid element.
|
|
151
|
+
*/
|
|
152
|
+
tokens: getTokensPropType('WaffleGrid'),
|
|
153
|
+
|
|
149
154
|
/**
|
|
150
155
|
* Row size, optionally depending on the viewport
|
|
151
156
|
*/
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
],
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@gorhom/portal": "^1.0.14",
|
|
8
|
-
"@telus-uds/components-base": "1.
|
|
8
|
+
"@telus-uds/components-base": "1.63.0",
|
|
9
9
|
"@telus-uds/system-constants": "^1.3.0",
|
|
10
10
|
"fscreen": "^1.2.0",
|
|
11
11
|
"lodash.omit": "^4.5.0",
|
|
@@ -48,11 +48,10 @@
|
|
|
48
48
|
"url": "git+https://github.com/telus/universal-design-system.git"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
|
-
"build": "npm run build:code
|
|
51
|
+
"build": "npm run build:code",
|
|
52
52
|
"build:main": "babel src -d lib",
|
|
53
53
|
"build:module": "babel src -d lib-module --env-name module",
|
|
54
54
|
"build:code": "npm run build:main && npm run build:module",
|
|
55
|
-
"build:docs": "babel-node --plugins=@telus-uds/babel-plugin-react-docgen generate-component-docs.js",
|
|
56
55
|
"format": "prettier --write .",
|
|
57
56
|
"lint": "telus-standard",
|
|
58
57
|
"lint:fix": "telus-standard --fix",
|
|
@@ -63,5 +62,5 @@
|
|
|
63
62
|
"skip": true
|
|
64
63
|
},
|
|
65
64
|
"types": "types/index.d.ts",
|
|
66
|
-
"version": "2.
|
|
65
|
+
"version": "2.20.0"
|
|
67
66
|
}
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
componentPropType,
|
|
9
9
|
selectSystemProps,
|
|
10
10
|
unpackFragment,
|
|
11
|
-
withLinkRouter
|
|
11
|
+
withLinkRouter,
|
|
12
|
+
getTokensPropType
|
|
12
13
|
} from '@telus-uds/components-base'
|
|
13
14
|
import { htmlAttrs } from '../utils'
|
|
14
15
|
import Item from './Item/Item'
|
|
@@ -187,6 +188,7 @@ const Breadcrumbs = ({
|
|
|
187
188
|
|
|
188
189
|
Breadcrumbs.propTypes = {
|
|
189
190
|
...selectedSystemPropTypes,
|
|
191
|
+
tokens: getTokensPropType('Breadcrumbs'),
|
|
190
192
|
...withLinkRouter.propTypes,
|
|
191
193
|
/**
|
|
192
194
|
* Base URL used to build structured data.
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
selectSystemProps,
|
|
9
9
|
useViewport,
|
|
10
10
|
useThemeTokens,
|
|
11
|
-
applyTextStyles
|
|
11
|
+
applyTextStyles,
|
|
12
|
+
getTokensPropType
|
|
12
13
|
} from '@telus-uds/components-base'
|
|
13
14
|
import { viewports } from '@telus-uds/system-constants'
|
|
14
15
|
import styled from 'styled-components'
|
|
@@ -139,6 +140,7 @@ Countdown.displayName = 'Countdown'
|
|
|
139
140
|
|
|
140
141
|
Countdown.propTypes = {
|
|
141
142
|
...selectedSystemPropTypes,
|
|
143
|
+
tokens: getTokensPropType('Countdown'),
|
|
142
144
|
/**
|
|
143
145
|
* Copy language identifier (`'en'` or `'fr'`) or a dictionary instance (an object with
|
|
144
146
|
* the following keys: days, day, hours, hour, minutes, minute, seconds, second)
|
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
useCopy,
|
|
13
13
|
useViewport,
|
|
14
14
|
useThemeTokens,
|
|
15
|
-
applyTextStyles
|
|
15
|
+
applyTextStyles,
|
|
16
|
+
getTokensPropType
|
|
16
17
|
} from '@telus-uds/components-base'
|
|
17
18
|
import moment from 'moment'
|
|
18
19
|
import { isUndefined } from 'lodash'
|
|
@@ -309,6 +310,7 @@ DatePicker.displayName = 'DatePicker'
|
|
|
309
310
|
|
|
310
311
|
DatePicker.propTypes = {
|
|
311
312
|
...selectedSystemPropTypes,
|
|
313
|
+
tokens: getTokensPropType('DatePicker'),
|
|
312
314
|
/**
|
|
313
315
|
* A unique identifier.
|
|
314
316
|
*/
|
|
@@ -393,6 +395,7 @@ DatePicker.defaultProps = {
|
|
|
393
395
|
onDateChange: () => {},
|
|
394
396
|
validation: undefined,
|
|
395
397
|
disabled: false,
|
|
398
|
+
tokens: undefined,
|
|
396
399
|
prevTestID: '',
|
|
397
400
|
nextTestID: ''
|
|
398
401
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import styled from 'styled-components'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
applyTextStyles,
|
|
6
|
+
selectSystemProps,
|
|
7
|
+
useThemeTokens,
|
|
8
|
+
getTokensPropType
|
|
9
|
+
} from '@telus-uds/components-base'
|
|
5
10
|
import { htmlAttrs } from '../utils'
|
|
6
11
|
|
|
7
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
@@ -30,9 +35,7 @@ const Disclaimer = ({ children, ...rest }) => {
|
|
|
30
35
|
|
|
31
36
|
Disclaimer.propTypes = {
|
|
32
37
|
...selectedSystemPropTypes,
|
|
33
|
-
|
|
34
|
-
* Children nodes that can be added
|
|
35
|
-
*/
|
|
38
|
+
tokens: getTokensPropType('Disclaimer'),
|
|
36
39
|
children: PropTypes.node.isRequired
|
|
37
40
|
}
|
|
38
41
|
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
useCopy,
|
|
10
10
|
useTheme,
|
|
11
11
|
useResponsiveProp,
|
|
12
|
-
useThemeTokens
|
|
12
|
+
useThemeTokens,
|
|
13
|
+
getTokensPropType
|
|
13
14
|
} from '@telus-uds/components-base'
|
|
14
15
|
|
|
15
16
|
import OrderedListBase from '../OrderedList/OrderedListBase'
|
|
@@ -536,6 +537,7 @@ const dictionaryContentShape = PropTypes.shape({
|
|
|
536
537
|
|
|
537
538
|
Footnote.propTypes = {
|
|
538
539
|
...selectedSystemPropTypes,
|
|
540
|
+
tokens: getTokensPropType('Footnote'),
|
|
539
541
|
/**
|
|
540
542
|
* The content.
|
|
541
543
|
*/
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
IconButton as IconButtonBase,
|
|
5
|
+
useThemeTokens,
|
|
6
|
+
getTokensPropType
|
|
7
|
+
} from '@telus-uds/components-base'
|
|
4
8
|
|
|
5
9
|
const IconButton = forwardRef(({ icon, action, tokens, variant = {}, ...iconButtonProps }, ref) => {
|
|
6
10
|
const variantWithAction = action && !variant.action ? { ...variant, action } : variant
|
|
@@ -36,6 +40,7 @@ IconButton.displayName = 'IconButton'
|
|
|
36
40
|
const propsWithoutIcon = ({ icon, ...props }) => props
|
|
37
41
|
IconButton.propTypes = {
|
|
38
42
|
...propsWithoutIcon(IconButtonBase.propTypes),
|
|
43
|
+
tokens: getTokensPropType('IconButton'),
|
|
39
44
|
/**
|
|
40
45
|
* To set the icon to a multi-brand compatabile icon
|
|
41
46
|
*/
|
|
@@ -47,6 +52,6 @@ IconButton.propTypes = {
|
|
|
47
52
|
icon: PropTypes.func
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
IconButton.defaultProps = { icon: null }
|
|
55
|
+
IconButton.defaultProps = { icon: null, tokens: {} }
|
|
51
56
|
|
|
52
57
|
export default IconButton
|
package/src/Image/Image.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import styled from 'styled-components'
|
|
4
|
-
import { selectSystemProps, useThemeTokens } from '@telus-uds/components-base'
|
|
4
|
+
import { selectSystemProps, useThemeTokens, getTokensPropType } from '@telus-uds/components-base'
|
|
5
5
|
import { htmlAttrs, warn } from '../utils'
|
|
6
6
|
|
|
7
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
@@ -67,6 +67,7 @@ Image.propTypes = {
|
|
|
67
67
|
/**
|
|
68
68
|
* The src attribute for the HTML img element.
|
|
69
69
|
*/
|
|
70
|
+
|
|
70
71
|
src: PropTypes.string.isRequired,
|
|
71
72
|
/**
|
|
72
73
|
* The alt attribute for the HTML img element. Setting this attribute to an empty string (alt="") indicates that this image is not a key part of the content, and that non-visual browsers may omit it from rendering.
|
|
@@ -89,7 +90,9 @@ Image.propTypes = {
|
|
|
89
90
|
/**
|
|
90
91
|
* Make image render as a circle or with rounded corners.
|
|
91
92
|
*/
|
|
92
|
-
rounded: PropTypes.oneOf(['circle', 'corners'])
|
|
93
|
+
rounded: PropTypes.oneOf(['circle', 'corners']),
|
|
94
|
+
|
|
95
|
+
tokens: getTokensPropType('Image')
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
export default Image
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
StackView,
|
|
6
6
|
Typography,
|
|
7
7
|
useResponsiveProp,
|
|
8
|
-
withLinkRouter
|
|
8
|
+
withLinkRouter,
|
|
9
|
+
getTokensPropType
|
|
9
10
|
} from '@telus-uds/components-base'
|
|
10
11
|
import styled from 'styled-components'
|
|
11
12
|
import { htmlAttrs } from '../utils'
|
|
@@ -162,6 +163,7 @@ NavigationBar.displayName = 'NavigationBar'
|
|
|
162
163
|
|
|
163
164
|
NavigationBar.propTypes = {
|
|
164
165
|
...selectedSystemPropTypes,
|
|
166
|
+
tokens: getTokensPropType('NavigationBar'),
|
|
165
167
|
...withLinkRouter.propTypes,
|
|
166
168
|
/**
|
|
167
169
|
* NavigationBar pages
|
|
@@ -219,7 +221,8 @@ NavigationBar.defaultProps = {
|
|
|
219
221
|
heading: undefined,
|
|
220
222
|
headingLevel: 'h1',
|
|
221
223
|
onChange: () => {},
|
|
222
|
-
accessibilityRole: ''
|
|
224
|
+
accessibilityRole: '',
|
|
225
|
+
tokens: {}
|
|
223
226
|
}
|
|
224
227
|
|
|
225
228
|
export default NavigationBar
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import styled from 'styled-components'
|
|
4
|
-
import { selectSystemProps, variantProp } from '@telus-uds/components-base'
|
|
4
|
+
import { selectSystemProps, getTokensPropType, variantProp } from '@telus-uds/components-base'
|
|
5
5
|
import { htmlAttrs } from '../utils'
|
|
6
6
|
import OrderedListBase from './OrderedListBase'
|
|
7
7
|
import Item from './Item'
|
|
@@ -45,6 +45,7 @@ OrderedList.displayName = 'OrderedList'
|
|
|
45
45
|
|
|
46
46
|
OrderedList.propTypes = {
|
|
47
47
|
...selectedSystemPropTypes,
|
|
48
|
+
tokens: getTokensPropType('OrderedList'),
|
|
48
49
|
/**
|
|
49
50
|
* A list of ordered items wrapped in `OrderedList.Item`.
|
|
50
51
|
*/
|
|
@@ -55,7 +56,7 @@ OrderedList.propTypes = {
|
|
|
55
56
|
start: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
56
57
|
variant: variantProp.propType
|
|
57
58
|
}
|
|
58
|
-
OrderedList.defaultProps = { start: 1, variant: {} }
|
|
59
|
+
OrderedList.defaultProps = { start: 1, tokens: {}, variant: {} }
|
|
59
60
|
|
|
60
61
|
OrderedList.Item = Item
|
|
61
62
|
|
|
@@ -15,7 +15,8 @@ import {
|
|
|
15
15
|
focusHandlerProps,
|
|
16
16
|
viewProps,
|
|
17
17
|
withLinkRouter,
|
|
18
|
-
useTheme
|
|
18
|
+
useTheme,
|
|
19
|
+
getTokensPropType
|
|
19
20
|
} from '@telus-uds/components-base'
|
|
20
21
|
import styled from 'styled-components'
|
|
21
22
|
import FullBleedContent, {
|
|
@@ -161,6 +162,7 @@ PreviewCard.AuthorDate = AuthorDate
|
|
|
161
162
|
|
|
162
163
|
PreviewCard.propTypes = {
|
|
163
164
|
...selectedSystemPropTypes,
|
|
165
|
+
tokens: getTokensPropType('PreviewCard'),
|
|
164
166
|
/**
|
|
165
167
|
* The URL of the story to be navigated to. Note that `Video` component does not play well when used within
|
|
166
168
|
* a `PreviewCard` with `href` prop set (the volume and progress sliders can be clicked but are not draggable).
|
package/src/Ribbon/Ribbon.jsx
CHANGED
|
@@ -138,6 +138,7 @@ const Ribbon = ({
|
|
|
138
138
|
|
|
139
139
|
Ribbon.propTypes = {
|
|
140
140
|
...selectedSystemPropTypes,
|
|
141
|
+
tokens: getTokensPropType('Ribbon'),
|
|
141
142
|
children: PropTypes.node,
|
|
142
143
|
/** show/hide the ribbon fold
|
|
143
144
|
* @deprecated please don't rely on `wrap` to turn off the wrapping (use `Badge` instead) as it will be removed in the future
|
|
@@ -146,8 +147,7 @@ Ribbon.propTypes = {
|
|
|
146
147
|
/** sets the left offset (triggers absolute positioning) */
|
|
147
148
|
left: PropTypes.number,
|
|
148
149
|
/** sets the top offset (triggers absolute positioning) */
|
|
149
|
-
top: PropTypes.number
|
|
150
|
-
tokens: getTokensPropType('Ribbon')
|
|
150
|
+
top: PropTypes.number
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
export default Ribbon
|
package/src/Spinner/Spinner.jsx
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import styled from 'styled-components'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
selectSystemProps,
|
|
6
|
+
useScrollBlocking,
|
|
7
|
+
useThemeTokens,
|
|
8
|
+
getTokensPropType
|
|
9
|
+
} from '@telus-uds/components-base'
|
|
5
10
|
import { Portal } from '@gorhom/portal'
|
|
6
11
|
import SpinnerContent from './SpinnerContent'
|
|
7
12
|
import { htmlAttrs, media } from '../utils'
|
|
@@ -156,6 +161,7 @@ const Spinner = ({
|
|
|
156
161
|
|
|
157
162
|
Spinner.propTypes = {
|
|
158
163
|
...selectedSystemPropTypes,
|
|
164
|
+
tokens: getTokensPropType('Spinner'),
|
|
159
165
|
/**
|
|
160
166
|
* Content to be overlaid while the spinner is active. Can be text, any HTML element,
|
|
161
167
|
* or any component.
|
|
@@ -16,7 +16,8 @@ import {
|
|
|
16
16
|
viewProps,
|
|
17
17
|
withLinkRouter,
|
|
18
18
|
useThemeTokens,
|
|
19
|
-
useThemeTokensCallback
|
|
19
|
+
useThemeTokensCallback,
|
|
20
|
+
getTokensPropType
|
|
20
21
|
} from '@telus-uds/components-base'
|
|
21
22
|
import styled from 'styled-components'
|
|
22
23
|
import FullBleedContent, {
|
|
@@ -151,6 +152,7 @@ StoryCard.displayName = 'StoryCard'
|
|
|
151
152
|
|
|
152
153
|
StoryCard.propTypes = {
|
|
153
154
|
...selectedSystemPropTypes,
|
|
155
|
+
tokens: getTokensPropType('StoryCard'),
|
|
154
156
|
/**
|
|
155
157
|
* The URL of the story to be navigated to. Note that `Video` component does not play well when used within
|
|
156
158
|
* a `StoryCard` with `href` prop set (the volume and progress sliders can be clicked but are not draggable).
|
package/src/Table/Table.jsx
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React, { useContext, useRef, useState } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import styled from 'styled-components'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
selectSystemProps,
|
|
6
|
+
useSafeLayoutEffect,
|
|
7
|
+
useThemeTokens,
|
|
8
|
+
getTokensPropType
|
|
9
|
+
} from '@telus-uds/components-base'
|
|
5
10
|
import throttle from 'lodash.throttle'
|
|
6
11
|
import { htmlAttrs } from '../utils'
|
|
7
12
|
|
|
@@ -100,6 +105,7 @@ const Table = ({
|
|
|
100
105
|
|
|
101
106
|
Table.propTypes = {
|
|
102
107
|
...selectedSystemPropTypes,
|
|
108
|
+
tokens: getTokensPropType('Table'),
|
|
103
109
|
children: PropTypes.node,
|
|
104
110
|
/**
|
|
105
111
|
* Sets text style
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
Typography,
|
|
9
9
|
useCopy,
|
|
10
10
|
useThemeTokens,
|
|
11
|
-
useViewport
|
|
11
|
+
useViewport,
|
|
12
|
+
getTokensPropType
|
|
12
13
|
} from '@telus-uds/components-base'
|
|
13
14
|
import ExpandCollapse from './ExpandCollapse'
|
|
14
15
|
import OrderedListBase from '../OrderedList/OrderedListBase'
|
|
@@ -168,6 +169,10 @@ TermsAndConditions.propTypes = {
|
|
|
168
169
|
nonIndexedTitle: PropTypes.string
|
|
169
170
|
})
|
|
170
171
|
]),
|
|
172
|
+
/**
|
|
173
|
+
* Sets the tokens for TermsAndConditions element.
|
|
174
|
+
*/
|
|
175
|
+
tokens: getTokensPropType('TermsAndConditions'),
|
|
171
176
|
/**
|
|
172
177
|
* An array of nodes, strings, or a combination to be displayed in an ordered list.
|
|
173
178
|
*
|
|
@@ -193,7 +198,8 @@ TermsAndConditions.defaultProps = {
|
|
|
193
198
|
copy: 'en',
|
|
194
199
|
indexedContent: [],
|
|
195
200
|
nonIndexedContent: [],
|
|
196
|
-
dictionary: defaultDictionary
|
|
201
|
+
dictionary: defaultDictionary,
|
|
202
|
+
tokens: {}
|
|
197
203
|
}
|
|
198
204
|
|
|
199
205
|
export default TermsAndConditions
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
selectSystemProps,
|
|
7
7
|
Typography,
|
|
8
8
|
useThemeTokens,
|
|
9
|
-
useViewport
|
|
9
|
+
useViewport,
|
|
10
|
+
getTokensPropType
|
|
10
11
|
} from '@telus-uds/components-base'
|
|
11
12
|
import Image from '../Image'
|
|
12
13
|
import { htmlAttrs } from '../utils'
|
|
@@ -198,6 +199,7 @@ const Testimonial = ({
|
|
|
198
199
|
|
|
199
200
|
Testimonial.propTypes = {
|
|
200
201
|
...selectedSystemPropTypes,
|
|
202
|
+
tokens: getTokensPropType('Testimonial'),
|
|
201
203
|
/**
|
|
202
204
|
* Testimonial content
|
|
203
205
|
*/
|
package/src/Toast/Toast.jsx
CHANGED
|
@@ -161,6 +161,7 @@ const Toast = ({ toast, copy, headline, link, tokens, variant = {}, ...rest }) =
|
|
|
161
161
|
|
|
162
162
|
Toast.propTypes = {
|
|
163
163
|
...selectedSystemPropTypes,
|
|
164
|
+
tokens: getTokensPropType('Toast'),
|
|
164
165
|
/**
|
|
165
166
|
* If true, the toast will be displayed
|
|
166
167
|
*/
|
|
@@ -181,8 +182,7 @@ Toast.propTypes = {
|
|
|
181
182
|
text: PropTypes.string.isRequired,
|
|
182
183
|
LinkRouter: withLinkRouter.propTypes?.LinkRouter,
|
|
183
184
|
linkRouterProps: withLinkRouter.propTypes?.linkRouterProps
|
|
184
|
-
})
|
|
185
|
-
tokens: getTokensPropType('Toast')
|
|
185
|
+
})
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
export default Toast
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
selectSystemProps,
|
|
6
6
|
StackView,
|
|
7
7
|
useThemeTokens,
|
|
8
|
-
useViewport
|
|
8
|
+
useViewport,
|
|
9
|
+
getTokensPropType
|
|
9
10
|
} from '@telus-uds/components-base'
|
|
10
11
|
|
|
11
12
|
import styled, { css } from 'styled-components'
|
|
@@ -141,6 +142,7 @@ const VideoPicker = ({
|
|
|
141
142
|
|
|
142
143
|
VideoPicker.propTypes = {
|
|
143
144
|
...selectedSystemPropTypes,
|
|
145
|
+
tokens: getTokensPropType('VideoPicker'),
|
|
144
146
|
/**
|
|
145
147
|
* Id of the currently selected video (defaults to the first video if not set).
|
|
146
148
|
*/
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
useThemeTokens,
|
|
10
10
|
withLinkRouter,
|
|
11
11
|
useViewport,
|
|
12
|
-
Typography
|
|
12
|
+
Typography,
|
|
13
|
+
getTokensPropType
|
|
13
14
|
} from '@telus-uds/components-base'
|
|
14
15
|
import OrderedListBase from '../OrderedList/OrderedListBase'
|
|
15
16
|
import ItemBase from '../OrderedList/ItemBase'
|
|
@@ -126,6 +127,7 @@ WaffleGrid.propTypes = {
|
|
|
126
127
|
* The text displayed under the image
|
|
127
128
|
*/
|
|
128
129
|
text: PropTypes.string,
|
|
130
|
+
|
|
129
131
|
/**
|
|
130
132
|
* Target URL
|
|
131
133
|
*/
|
|
@@ -133,6 +135,10 @@ WaffleGrid.propTypes = {
|
|
|
133
135
|
...withLinkRouter.propTypes
|
|
134
136
|
})
|
|
135
137
|
).isRequired,
|
|
138
|
+
/**
|
|
139
|
+
* Sets the tokens for WaffleGrid element.
|
|
140
|
+
*/
|
|
141
|
+
tokens: getTokensPropType('WaffleGrid'),
|
|
136
142
|
/**
|
|
137
143
|
* Row size, optionally depending on the viewport
|
|
138
144
|
*/
|