@telus-uds/components-web 2.23.0 → 2.25.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 CHANGED
@@ -1,12 +1,42 @@
1
1
  # Change Log - @telus-uds/components-web
2
2
 
3
- This log was last generated on Fri, 10 Nov 2023 22:28:25 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 18 Nov 2023 02:25:11 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.25.0
8
+
9
+ Sat, 18 Nov 2023 02:25:11 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - added onPlay, onPause and onEnd callbacks for youtube video analytics (kristina.kirpichnikova@telus.com)
14
+ - Bump @telus-uds/components-base to v1.69.0
15
+ - Bump @telus-uds/system-theme-tokens to v2.46.0
16
+
17
+ ### Patches
18
+
19
+ - `TermsAndConditions`: Fix unexpected state handling in `ExpandCollapse.Panel` (shahzaibkhalidmalik@outlook.com)
20
+ - adding types for Countdown component (jacqui.koroll@telus.com)
21
+
22
+ ## 2.24.0
23
+
24
+ Wed, 15 Nov 2023 18:45:58 GMT
25
+
26
+ ### Minor changes
27
+
28
+ - refactor badge component for multiplatform (guillermo.peitzner@telus.com)
29
+ - Changes to improve alignment in list (35577399+JoshHC@users.noreply.github.com)
30
+ - Bump @telus-uds/components-base to v1.68.0
31
+ - Bump @telus-uds/system-theme-tokens to v2.45.0
32
+
33
+ ### Patches
34
+
35
+ - corrected type for ssrStyles (kyle.king2@telus.com)
36
+
7
37
  ## 2.23.0
8
38
 
9
- Fri, 10 Nov 2023 22:28:25 GMT
39
+ Fri, 10 Nov 2023 22:37:27 GMT
10
40
 
11
41
  ### Minor changes
12
42
 
@@ -11,7 +11,7 @@ var _componentsBase = require("@telus-uds/components-base");
11
11
  var _utils = require("../utils");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
14
+ const [, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
15
15
  const BadgeContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
16
16
  displayName: "Badge__BadgeContainer",
17
17
  componentId: "components-web__sc-tsiuo2-0"
@@ -61,14 +61,10 @@ const Badge = _ref6 => {
61
61
  borderColor,
62
62
  borderRadius,
63
63
  borderWidth,
64
- color,
65
64
  paddingLeft,
66
65
  paddingRight,
67
66
  paddingTop,
68
- paddingBottom,
69
- fontName,
70
- fontWeight,
71
- fontSize
67
+ paddingBottom
72
68
  } = (0, _componentsBase.useThemeTokens)('Badge', tokens, variant);
73
69
  const semanticGradient = gradient && (0, _utils.transformGradient)(gradient);
74
70
  const {
@@ -83,31 +79,18 @@ const Badge = _ref6 => {
83
79
  } else if (purpose === 'offer' && gradient) {
84
80
  background = semanticGradient;
85
81
  }
86
- const fontSizeMapping = {
87
- 12: 'micro',
88
- 14: 'small',
89
- 16: 'h6'
90
- };
91
82
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeContainer, {
92
83
  isOutlineOffer: isOutlineOffer,
93
84
  isAlternative: alternative,
94
85
  padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
95
86
  radius: `${borderRadius}px`,
96
87
  background: background,
97
- fontName: fontName,
98
- fontWeight: fontWeight,
99
88
  gradient: semanticGradient,
100
89
  border: `${borderWidth}px solid ${borderColor}`,
101
- ...selectProps(rest),
102
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
103
- tokens: {
104
- fontName,
105
- fontWeight,
106
- color
107
- },
108
- variant: {
109
- size: fontSizeMapping[fontSize]
110
- },
90
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Badge, {
91
+ tokens: tokens,
92
+ variant: variant,
93
+ ...rest,
111
94
  children: children
112
95
  })
113
96
  });
@@ -72,7 +72,6 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
72
72
  expandTitleBorderColor,
73
73
  expandTitleUnderline
74
74
  } = getTokens();
75
- const [isExpanded, setIsExpanded] = (0, _react.useState)(false);
76
75
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse, {
77
76
  tokens: {
78
77
  borderWidth: expandBaseBorderWidth
@@ -100,7 +99,6 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
100
99
  } = getTokens({
101
100
  expanded
102
101
  });
103
- setIsExpanded(expanded);
104
102
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ExpandCollapseControl, {
105
103
  ref: ref,
106
104
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseIconContainer, {
@@ -125,7 +123,7 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
125
123
  borderColor: contentBorderColor,
126
124
  marginBottom: contentMarginBottom
127
125
  },
128
- children: isExpanded ? children : null
126
+ children: children
129
127
  })
130
128
  });
131
129
  });
@@ -4,17 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = exports.VideoProps = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
7
+ var _componentsBase = require("@telus-uds/components-base");
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+ var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactYoutube = _interopRequireDefault(require("react-youtube"));
11
- var _componentsBase = require("@telus-uds/components-base");
11
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
12
12
  var _VideoSplash = _interopRequireDefault(require("../shared/VideoSplash/VideoSplash"));
13
13
  var _utils = require("../utils");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
  const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemProps)([_utils.htmlAttrs]);
19
19
  const StyledPlayerContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
20
20
  displayName: "WebVideo__StyledPlayerContainer",
@@ -61,6 +61,9 @@ const WebVideo = _ref => {
61
61
  beginMuted = false,
62
62
  videoLength,
63
63
  copy,
64
+ onPlay,
65
+ onPause,
66
+ onEnd,
64
67
  onStart = () => {},
65
68
  ...rest
66
69
  } = _ref;
@@ -91,7 +94,10 @@ const WebVideo = _ref => {
91
94
  rel: 0
92
95
  }
93
96
  },
94
- onReady: initializeYoutubePlayer
97
+ onReady: initializeYoutubePlayer,
98
+ onPlay: onPlay,
99
+ onPause: onPause,
100
+ onEnd: onEnd
95
101
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoSplash.default, {
96
102
  poster: posterSrc || `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`,
97
103
  videoLength: videoLength,
@@ -136,7 +142,19 @@ const VideoProps = {
136
142
  /**
137
143
  * A function to be run when the play button is pressed on the video splash screen and the video is ready to play.
138
144
  */
139
- onStart: _propTypes.default.func
145
+ onStart: _propTypes.default.func,
146
+ /**
147
+ * A function to be run when the video is played.
148
+ */
149
+ onPlay: _propTypes.default.func,
150
+ /**
151
+ * A function to be run when the video is paused.
152
+ */
153
+ onPause: _propTypes.default.func,
154
+ /**
155
+ * A function to be run when the video ends.
156
+ */
157
+ onEnd: _propTypes.default.func
140
158
  };
141
159
  exports.VideoProps = VideoProps;
142
160
  WebVideo.propTypes = VideoProps;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import PropTypes from 'prop-types';
4
- import { selectSystemProps, Typography, getTokensPropType, useThemeTokens } from '@telus-uds/components-base';
4
+ import { selectSystemProps, getTokensPropType, useThemeTokens, Badge as BaseBadge } from '@telus-uds/components-base';
5
5
  import { htmlAttrs, transformGradient } from '../utils';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
- const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
7
+ const [, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
8
8
  const BadgeContainer = /*#__PURE__*/styled.div.withConfig({
9
9
  displayName: "Badge__BadgeContainer",
10
10
  componentId: "components-web__sc-tsiuo2-0"
@@ -54,14 +54,10 @@ const Badge = _ref6 => {
54
54
  borderColor,
55
55
  borderRadius,
56
56
  borderWidth,
57
- color,
58
57
  paddingLeft,
59
58
  paddingRight,
60
59
  paddingTop,
61
- paddingBottom,
62
- fontName,
63
- fontWeight,
64
- fontSize
60
+ paddingBottom
65
61
  } = useThemeTokens('Badge', tokens, variant);
66
62
  const semanticGradient = gradient && transformGradient(gradient);
67
63
  const {
@@ -76,31 +72,18 @@ const Badge = _ref6 => {
76
72
  } else if (purpose === 'offer' && gradient) {
77
73
  background = semanticGradient;
78
74
  }
79
- const fontSizeMapping = {
80
- 12: 'micro',
81
- 14: 'small',
82
- 16: 'h6'
83
- };
84
75
  return /*#__PURE__*/_jsx(BadgeContainer, {
85
76
  isOutlineOffer: isOutlineOffer,
86
77
  isAlternative: alternative,
87
78
  padding: `${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`,
88
79
  radius: `${borderRadius}px`,
89
80
  background: background,
90
- fontName: fontName,
91
- fontWeight: fontWeight,
92
81
  gradient: semanticGradient,
93
82
  border: `${borderWidth}px solid ${borderColor}`,
94
- ...selectProps(rest),
95
- children: /*#__PURE__*/_jsx(Typography, {
96
- tokens: {
97
- fontName,
98
- fontWeight,
99
- color
100
- },
101
- variant: {
102
- size: fontSizeMapping[fontSize]
103
- },
83
+ children: /*#__PURE__*/_jsx(BaseBadge, {
84
+ tokens: tokens,
85
+ variant: variant,
86
+ ...rest,
104
87
  children: children
105
88
  })
106
89
  });
@@ -1,4 +1,4 @@
1
- import React, { useState, forwardRef } from 'react';
1
+ import React, { forwardRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { ExpandCollapse as ExpandCollapseBase, IconButton, useThemeTokensCallback } from '@telus-uds/components-base';
4
4
  import styled from 'styled-components';
@@ -64,7 +64,6 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
64
64
  expandTitleBorderColor,
65
65
  expandTitleUnderline
66
66
  } = getTokens();
67
- const [isExpanded, setIsExpanded] = useState(false);
68
67
  return /*#__PURE__*/_jsx(ExpandCollapseBase, {
69
68
  tokens: {
70
69
  borderWidth: expandBaseBorderWidth
@@ -92,7 +91,6 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
92
91
  } = getTokens({
93
92
  expanded
94
93
  });
95
- setIsExpanded(expanded);
96
94
  return /*#__PURE__*/_jsxs(ExpandCollapseControl, {
97
95
  ref: ref,
98
96
  children: [/*#__PURE__*/_jsx(ExpandCollapseIconContainer, {
@@ -117,7 +115,7 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
117
115
  borderColor: contentBorderColor,
118
116
  marginBottom: contentMarginBottom
119
117
  },
120
- children: isExpanded ? children : null
118
+ children: children
121
119
  })
122
120
  });
123
121
  });
@@ -1,8 +1,8 @@
1
- import React, { useState } from 'react';
1
+ import { selectSystemProps } from '@telus-uds/components-base';
2
2
  import PropTypes from 'prop-types';
3
- import styled from 'styled-components';
3
+ import React, { useState } from 'react';
4
4
  import YouTube from 'react-youtube';
5
- import { selectSystemProps } from '@telus-uds/components-base';
5
+ import styled from 'styled-components';
6
6
  import VideoSplash from '../shared/VideoSplash/VideoSplash';
7
7
  import { htmlAttrs } from '../utils';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -52,6 +52,9 @@ const WebVideo = _ref => {
52
52
  beginMuted = false,
53
53
  videoLength,
54
54
  copy,
55
+ onPlay,
56
+ onPause,
57
+ onEnd,
55
58
  onStart = () => {},
56
59
  ...rest
57
60
  } = _ref;
@@ -82,7 +85,10 @@ const WebVideo = _ref => {
82
85
  rel: 0
83
86
  }
84
87
  },
85
- onReady: initializeYoutubePlayer
88
+ onReady: initializeYoutubePlayer,
89
+ onPlay: onPlay,
90
+ onPause: onPause,
91
+ onEnd: onEnd
86
92
  }) : /*#__PURE__*/_jsx(VideoSplash, {
87
93
  poster: posterSrc || `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`,
88
94
  videoLength: videoLength,
@@ -127,7 +133,19 @@ export const VideoProps = {
127
133
  /**
128
134
  * A function to be run when the play button is pressed on the video splash screen and the video is ready to play.
129
135
  */
130
- onStart: PropTypes.func
136
+ onStart: PropTypes.func,
137
+ /**
138
+ * A function to be run when the video is played.
139
+ */
140
+ onPlay: PropTypes.func,
141
+ /**
142
+ * A function to be run when the video is paused.
143
+ */
144
+ onPause: PropTypes.func,
145
+ /**
146
+ * A function to be run when the video ends.
147
+ */
148
+ onEnd: PropTypes.func
131
149
  };
132
150
  WebVideo.propTypes = VideoProps;
133
151
  export default WebVideo;
package/package.json CHANGED
@@ -5,14 +5,14 @@
5
5
  ],
6
6
  "dependencies": {
7
7
  "@gorhom/portal": "^1.0.14",
8
- "@telus-uds/components-base": "1.67.1",
8
+ "@telus-uds/components-base": "1.69.0",
9
9
  "@telus-uds/system-constants": "^1.3.0",
10
10
  "fscreen": "^1.2.0",
11
11
  "lodash.omit": "^4.5.0",
12
12
  "react-dates": "^21.8.0",
13
13
  "react-helmet-async": "^1.3.0",
14
14
  "react-moment-proptypes": "^1.8.1",
15
- "@telus-uds/system-theme-tokens": "^2.44.1",
15
+ "@telus-uds/system-theme-tokens": "^2.46.0",
16
16
  "prop-types": "^15.7.2",
17
17
  "lodash.throttle": "^4.1.1",
18
18
  "react-youtube": "^10.1.0",
@@ -62,5 +62,5 @@
62
62
  "skip": true
63
63
  },
64
64
  "types": "types/index.d.ts",
65
- "version": "2.23.0"
65
+ "version": "2.25.0"
66
66
  }
@@ -3,13 +3,13 @@ import styled from 'styled-components'
3
3
  import PropTypes from 'prop-types'
4
4
  import {
5
5
  selectSystemProps,
6
- Typography,
7
6
  getTokensPropType,
8
- useThemeTokens
7
+ useThemeTokens,
8
+ Badge as BaseBadge
9
9
  } from '@telus-uds/components-base'
10
10
  import { htmlAttrs, transformGradient } from '../utils'
11
11
 
12
- const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
12
+ const [, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
13
13
 
14
14
  const BadgeContainer = styled.div`
15
15
  background: ${({ background }) => background};
@@ -36,14 +36,10 @@ const Badge = ({ children, tokens, variant = {}, ...rest }) => {
36
36
  borderColor,
37
37
  borderRadius,
38
38
  borderWidth,
39
- color,
40
39
  paddingLeft,
41
40
  paddingRight,
42
41
  paddingTop,
43
- paddingBottom,
44
- fontName,
45
- fontWeight,
46
- fontSize
42
+ paddingBottom
47
43
  } = useThemeTokens('Badge', tokens, variant)
48
44
 
49
45
  const semanticGradient = gradient && transformGradient(gradient)
@@ -57,12 +53,6 @@ const Badge = ({ children, tokens, variant = {}, ...rest }) => {
57
53
  background = semanticGradient
58
54
  }
59
55
 
60
- const fontSizeMapping = {
61
- 12: 'micro',
62
- 14: 'small',
63
- 16: 'h6'
64
- }
65
-
66
56
  return (
67
57
  <BadgeContainer
68
58
  isOutlineOffer={isOutlineOffer}
@@ -70,18 +60,12 @@ const Badge = ({ children, tokens, variant = {}, ...rest }) => {
70
60
  padding={`${paddingTop}px ${paddingRight}px ${paddingBottom}px ${paddingLeft}px`}
71
61
  radius={`${borderRadius}px`}
72
62
  background={background}
73
- fontName={fontName}
74
- fontWeight={fontWeight}
75
63
  gradient={semanticGradient}
76
64
  border={`${borderWidth}px solid ${borderColor}`}
77
- {...selectProps(rest)}
78
65
  >
79
- <Typography
80
- tokens={{ fontName, fontWeight, color }}
81
- variant={{ size: fontSizeMapping[fontSize] }}
82
- >
66
+ <BaseBadge tokens={tokens} variant={variant} {...rest}>
83
67
  {children}
84
- </Typography>
68
+ </BaseBadge>
85
69
  </BadgeContainer>
86
70
  )
87
71
  }
@@ -1,4 +1,4 @@
1
- import React, { useState, forwardRef } from 'react'
1
+ import React, { forwardRef } from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import {
4
4
  ExpandCollapse as ExpandCollapseBase,
@@ -47,8 +47,6 @@ const ExpandCollapse = forwardRef(
47
47
  expandTitleBorderColor,
48
48
  expandTitleUnderline
49
49
  } = getTokens()
50
- const [isExpanded, setIsExpanded] = useState(false)
51
-
52
50
  return (
53
51
  <ExpandCollapseBase
54
52
  tokens={{
@@ -72,7 +70,6 @@ const ExpandCollapse = forwardRef(
72
70
  control={(pressableState) => {
73
71
  const { expanded } = pressableState || {}
74
72
  const { icon } = getTokens({ expanded })
75
- setIsExpanded(expanded)
76
73
 
77
74
  return (
78
75
  <ExpandCollapseControl ref={ref}>
@@ -95,7 +92,7 @@ const ExpandCollapse = forwardRef(
95
92
  marginBottom: contentMarginBottom
96
93
  }}
97
94
  >
98
- {isExpanded ? children : null}
95
+ {children}
99
96
  </ExpandCollapseBase.Panel>
100
97
  )}
101
98
  </ExpandCollapseBase>
@@ -1,8 +1,8 @@
1
- import React, { useState } from 'react'
1
+ import { selectSystemProps } from '@telus-uds/components-base'
2
2
  import PropTypes from 'prop-types'
3
- import styled from 'styled-components'
3
+ import React, { useState } from 'react'
4
4
  import YouTube from 'react-youtube'
5
- import { selectSystemProps } from '@telus-uds/components-base'
5
+ import styled from 'styled-components'
6
6
  import VideoSplash from '../shared/VideoSplash/VideoSplash'
7
7
  import { htmlAttrs } from '../utils'
8
8
 
@@ -41,6 +41,9 @@ const WebVideo = ({
41
41
  beginMuted = false,
42
42
  videoLength,
43
43
  copy,
44
+ onPlay,
45
+ onPause,
46
+ onEnd,
44
47
  onStart = () => {},
45
48
  ...rest
46
49
  }) => {
@@ -74,6 +77,9 @@ const WebVideo = ({
74
77
  }
75
78
  }}
76
79
  onReady={initializeYoutubePlayer}
80
+ onPlay={onPlay}
81
+ onPause={onPause}
82
+ onEnd={onEnd}
77
83
  />
78
84
  ) : (
79
85
  <VideoSplash
@@ -123,7 +129,22 @@ export const VideoProps = {
123
129
  /**
124
130
  * A function to be run when the play button is pressed on the video splash screen and the video is ready to play.
125
131
  */
126
- onStart: PropTypes.func
132
+ onStart: PropTypes.func,
133
+
134
+ /**
135
+ * A function to be run when the video is played.
136
+ */
137
+ onPlay: PropTypes.func,
138
+
139
+ /**
140
+ * A function to be run when the video is paused.
141
+ */
142
+ onPause: PropTypes.func,
143
+
144
+ /**
145
+ * A function to be run when the video ends.
146
+ */
147
+ onEnd: PropTypes.func
127
148
  }
128
149
 
129
150
  WebVideo.propTypes = VideoProps
@@ -0,0 +1,53 @@
1
+ import type { ComponentType } from 'react'
2
+ import type { HTMLAttrs } from './common'
3
+
4
+ interface CountdownVariant {
5
+ label?: boolean
6
+ noDivider?: boolean
7
+ large?: boolean
8
+ feature?: boolean
9
+ inverse?: boolean
10
+ }
11
+
12
+ interface GradientStop {
13
+ color: string
14
+ stop: number
15
+ }
16
+
17
+ interface ContainerGradient {
18
+ angle: number
19
+ stops: GradientStop[]
20
+ type: string
21
+ }
22
+
23
+ interface CountdownTokens {
24
+ containerBorderRadius?: string | number
25
+ containerGradient?: ContainerGradient
26
+ containerBorderWidth?: string | number
27
+ containerBorderColor?: string
28
+ containerInverseBorder?: string | number
29
+ containerInverseBorderColor?: string
30
+ inverseBorderColor?: string
31
+ containerPaddingBottomTop?: string | number
32
+ containerPaddingLeftRight?: string | number
33
+ labelBorderColor?: string
34
+ labelLineHeight?: number
35
+ textLineHeight?: number
36
+ labelFontSize?: number
37
+ textFontSize?: number
38
+ labelFontName?: string
39
+ textTimerFontName?: string
40
+ labelFontWeight?: string | number
41
+ textTimerFontWeight?: string | number
42
+ }
43
+
44
+ export interface CountdownProps extends HTMLAttrs {
45
+ tokens?: CountdownTokens
46
+ targetTime: Date | string
47
+ copy?: string
48
+ variant?: CountdownVariant
49
+ }
50
+
51
+ declare const Countdown: ComponentType<CountdownProps>
52
+
53
+ export default Countdown
package/types/index.d.ts CHANGED
@@ -17,6 +17,9 @@ export type { BoxProps } from './Box'
17
17
  export { default as Breadcrumbs } from './Breadcrumbs'
18
18
  export type { BreadcrumbsProps, BreadcrumbRouteProps } from './Breadcrumbs'
19
19
 
20
+ export { default as Countdown } from './Countdown'
21
+ export type { CountdownProps } from './Countdown'
22
+
20
23
  export { default as MultiSelectFilter } from './MultiSelectFilter'
21
24
  export type { MultiSelectFilterProps } from './MultiSelectFilter'
22
25
 
@@ -75,7 +78,7 @@ declare const WaffleGrid: ComponentType<Props>
75
78
  export { default as WebVideo } from './WebVideo'
76
79
  export type { WebVideoProps } from './WebVideo'
77
80
 
78
- declare const ssrStyles: (appName: string) => {
81
+ declare const ssrStyles: (appName?: string) => {
79
82
  renderApp: (App: ComponentType<Props>, props: Props) => ReactElement<Props>
80
83
  getStyles: (...existingStyles: any[]) => any[]
81
84
  }