@telus-uds/components-web 2.28.0 → 2.29.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 +16 -2
- package/lib/DatePicker/DatePicker.js +1 -1
- package/lib/Footnote/Footnote.js +12 -4
- package/lib-module/DatePicker/DatePicker.js +1 -1
- package/lib-module/Footnote/Footnote.js +12 -4
- package/package.json +3 -3
- package/src/DatePicker/DatePicker.jsx +1 -1
- package/src/Footnote/Footnote.jsx +19 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 18 Jan 2024 22:43:26 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.29.0
|
|
8
|
+
|
|
9
|
+
Thu, 18 Jan 2024 22:43:26 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- prop for footer to handle mobile (ben@mcloughlin.dev)
|
|
14
|
+
- Bump @telus-uds/components-base to v1.74.0
|
|
15
|
+
- Bump @telus-uds/system-theme-tokens to v2.50.0
|
|
16
|
+
|
|
17
|
+
### Patches
|
|
18
|
+
|
|
19
|
+
- fix hardcorded french label from datepicker (guillermo.peitzner@telus.com)
|
|
20
|
+
|
|
7
21
|
## 2.28.0
|
|
8
22
|
|
|
9
|
-
Mon, 08 Jan 2024 20:
|
|
23
|
+
Mon, 08 Jan 2024 20:16:06 GMT
|
|
10
24
|
|
|
11
25
|
### Minor changes
|
|
12
26
|
|
|
@@ -323,7 +323,7 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
323
323
|
onChange: onChangeInput,
|
|
324
324
|
tooltip: tooltip,
|
|
325
325
|
hintPosition: hintPosition,
|
|
326
|
-
label: ((_dictionary$copy = _dictionary.default[copy]) === null || _dictionary$copy === void 0 ? void 0 : _dictionary$copy.roleDescription)
|
|
326
|
+
label: label ?? ((_dictionary$copy = _dictionary.default[copy]) === null || _dictionary$copy === void 0 ? void 0 : _dictionary$copy.roleDescription),
|
|
327
327
|
value: inputText,
|
|
328
328
|
validation: validation,
|
|
329
329
|
inactive: disabled,
|
package/lib/Footnote/Footnote.js
CHANGED
|
@@ -30,7 +30,8 @@ const StyledFootnote = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
30
30
|
footnoteBackground,
|
|
31
31
|
isVisible,
|
|
32
32
|
footnoteBorderTop,
|
|
33
|
-
isScrollable
|
|
33
|
+
isScrollable,
|
|
34
|
+
isMobileFullScreen
|
|
34
35
|
} = _ref;
|
|
35
36
|
return {
|
|
36
37
|
position: 'fixed',
|
|
@@ -49,7 +50,7 @@ const StyledFootnote = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
49
50
|
},
|
|
50
51
|
zIndex: 99999,
|
|
51
52
|
visibility: isVisible ? 'visible' : 'hidden',
|
|
52
|
-
...(0, _utils.media)().from('md').css({
|
|
53
|
+
...(0, _utils.media)().from(isMobileFullScreen ? 'md' : 'xs').css({
|
|
53
54
|
top: 'auto',
|
|
54
55
|
bottom: 0,
|
|
55
56
|
height: 'auto',
|
|
@@ -262,6 +263,7 @@ const Footnote = props => {
|
|
|
262
263
|
isOpen,
|
|
263
264
|
tokens,
|
|
264
265
|
variant = {},
|
|
266
|
+
isMobileFullScreen = true,
|
|
265
267
|
dictionary = _dictionary.default,
|
|
266
268
|
...rest
|
|
267
269
|
} = props;
|
|
@@ -507,6 +509,7 @@ const Footnote = props => {
|
|
|
507
509
|
footnoteBackground: footnoteBackground,
|
|
508
510
|
footnoteBorderTop: `${footnoteBorderTopSizeMd}px solid ${footnoteBorderColorMd}`,
|
|
509
511
|
isScrollable: isScrollable,
|
|
512
|
+
isMobileFullScreen: isMobileFullScreen,
|
|
510
513
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ContentContainer, {
|
|
511
514
|
maxWidth: maxWidth,
|
|
512
515
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledFootnoteHeader, {
|
|
@@ -609,13 +612,18 @@ Footnote.propTypes = {
|
|
|
609
612
|
dictionary: _propTypes.default.shape({
|
|
610
613
|
en: dictionaryContentShape,
|
|
611
614
|
fr: dictionaryContentShape
|
|
612
|
-
})
|
|
615
|
+
}),
|
|
616
|
+
/**
|
|
617
|
+
* A boolean flag used to disable isMobileFullScreen of Footnote for mobile view
|
|
618
|
+
*/
|
|
619
|
+
isMobileFullScreen: _propTypes.default.bool
|
|
613
620
|
};
|
|
614
621
|
Footnote.defaultProps = {
|
|
615
622
|
isOpen: false,
|
|
616
623
|
number: undefined,
|
|
617
624
|
content: undefined,
|
|
618
|
-
copy: 'en'
|
|
625
|
+
copy: 'en',
|
|
626
|
+
isMobileFullScreen: true
|
|
619
627
|
};
|
|
620
628
|
var _default = Footnote;
|
|
621
629
|
exports.default = _default;
|
|
@@ -316,7 +316,7 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
316
316
|
onChange: onChangeInput,
|
|
317
317
|
tooltip: tooltip,
|
|
318
318
|
hintPosition: hintPosition,
|
|
319
|
-
label: ((_dictionary$copy = dictionary[copy]) === null || _dictionary$copy === void 0 ? void 0 : _dictionary$copy.roleDescription)
|
|
319
|
+
label: label ?? ((_dictionary$copy = dictionary[copy]) === null || _dictionary$copy === void 0 ? void 0 : _dictionary$copy.roleDescription),
|
|
320
320
|
value: inputText,
|
|
321
321
|
validation: validation,
|
|
322
322
|
inactive: disabled,
|
|
@@ -22,7 +22,8 @@ const StyledFootnote = /*#__PURE__*/styled.div.withConfig({
|
|
|
22
22
|
footnoteBackground,
|
|
23
23
|
isVisible,
|
|
24
24
|
footnoteBorderTop,
|
|
25
|
-
isScrollable
|
|
25
|
+
isScrollable,
|
|
26
|
+
isMobileFullScreen
|
|
26
27
|
} = _ref;
|
|
27
28
|
return {
|
|
28
29
|
position: 'fixed',
|
|
@@ -41,7 +42,7 @@ const StyledFootnote = /*#__PURE__*/styled.div.withConfig({
|
|
|
41
42
|
},
|
|
42
43
|
zIndex: 99999,
|
|
43
44
|
visibility: isVisible ? 'visible' : 'hidden',
|
|
44
|
-
...media().from('md').css({
|
|
45
|
+
...media().from(isMobileFullScreen ? 'md' : 'xs').css({
|
|
45
46
|
top: 'auto',
|
|
46
47
|
bottom: 0,
|
|
47
48
|
height: 'auto',
|
|
@@ -254,6 +255,7 @@ const Footnote = props => {
|
|
|
254
255
|
isOpen,
|
|
255
256
|
tokens,
|
|
256
257
|
variant = {},
|
|
258
|
+
isMobileFullScreen = true,
|
|
257
259
|
dictionary = defaultDictionary,
|
|
258
260
|
...rest
|
|
259
261
|
} = props;
|
|
@@ -499,6 +501,7 @@ const Footnote = props => {
|
|
|
499
501
|
footnoteBackground: footnoteBackground,
|
|
500
502
|
footnoteBorderTop: `${footnoteBorderTopSizeMd}px solid ${footnoteBorderColorMd}`,
|
|
501
503
|
isScrollable: isScrollable,
|
|
504
|
+
isMobileFullScreen: isMobileFullScreen,
|
|
502
505
|
children: /*#__PURE__*/_jsxs(ContentContainer, {
|
|
503
506
|
maxWidth: maxWidth,
|
|
504
507
|
children: [/*#__PURE__*/_jsx(StyledFootnoteHeader, {
|
|
@@ -601,12 +604,17 @@ Footnote.propTypes = {
|
|
|
601
604
|
dictionary: PropTypes.shape({
|
|
602
605
|
en: dictionaryContentShape,
|
|
603
606
|
fr: dictionaryContentShape
|
|
604
|
-
})
|
|
607
|
+
}),
|
|
608
|
+
/**
|
|
609
|
+
* A boolean flag used to disable isMobileFullScreen of Footnote for mobile view
|
|
610
|
+
*/
|
|
611
|
+
isMobileFullScreen: PropTypes.bool
|
|
605
612
|
};
|
|
606
613
|
Footnote.defaultProps = {
|
|
607
614
|
isOpen: false,
|
|
608
615
|
number: undefined,
|
|
609
616
|
content: undefined,
|
|
610
|
-
copy: 'en'
|
|
617
|
+
copy: 'en',
|
|
618
|
+
isMobileFullScreen: true
|
|
611
619
|
};
|
|
612
620
|
export default Footnote;
|
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.74.0",
|
|
9
9
|
"@telus-uds/system-constants": "^1.3.0",
|
|
10
10
|
"fscreen": "^1.2.0",
|
|
11
11
|
"lodash.omit": "^4.5.0",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"react-dates": "^21.8.0",
|
|
14
14
|
"react-helmet-async": "^1.3.0",
|
|
15
15
|
"react-moment-proptypes": "^1.8.1",
|
|
16
|
-
"@telus-uds/system-theme-tokens": "^2.
|
|
16
|
+
"@telus-uds/system-theme-tokens": "^2.50.0",
|
|
17
17
|
"prop-types": "^15.7.2",
|
|
18
18
|
"lodash.throttle": "^4.1.1",
|
|
19
19
|
"react-youtube": "^10.1.0",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"skip": true
|
|
84
84
|
},
|
|
85
85
|
"types": "types/index.d.ts",
|
|
86
|
-
"version": "2.
|
|
86
|
+
"version": "2.29.0"
|
|
87
87
|
}
|
|
@@ -288,7 +288,7 @@ const DatePicker = forwardRef(
|
|
|
288
288
|
onChange={onChangeInput}
|
|
289
289
|
tooltip={tooltip}
|
|
290
290
|
hintPosition={hintPosition}
|
|
291
|
-
label={dictionary[copy]?.roleDescription
|
|
291
|
+
label={label ?? dictionary[copy]?.roleDescription}
|
|
292
292
|
value={inputText}
|
|
293
293
|
validation={validation}
|
|
294
294
|
inactive={disabled}
|
|
@@ -26,7 +26,7 @@ const GlobalBodyScrollLock = createGlobalStyle({
|
|
|
26
26
|
})
|
|
27
27
|
|
|
28
28
|
const StyledFootnote = styled.div(
|
|
29
|
-
({ footnoteBackground, isVisible, footnoteBorderTop, isScrollable }) => ({
|
|
29
|
+
({ footnoteBackground, isVisible, footnoteBorderTop, isScrollable, isMobileFullScreen }) => ({
|
|
30
30
|
position: 'fixed',
|
|
31
31
|
overflowY: isVisible && isScrollable ? 'scroll' : 'hidden',
|
|
32
32
|
top: 0,
|
|
@@ -43,13 +43,15 @@ const StyledFootnote = styled.div(
|
|
|
43
43
|
},
|
|
44
44
|
zIndex: 99999,
|
|
45
45
|
visibility: isVisible ? 'visible' : 'hidden',
|
|
46
|
-
...media()
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
...media()
|
|
47
|
+
.from(isMobileFullScreen ? 'md' : 'xs')
|
|
48
|
+
.css({
|
|
49
|
+
top: 'auto',
|
|
50
|
+
bottom: 0,
|
|
51
|
+
height: 'auto',
|
|
52
|
+
maxHeight: '50vh',
|
|
53
|
+
borderTop: footnoteBorderTop
|
|
54
|
+
})
|
|
53
55
|
}),
|
|
54
56
|
({ isOpen }) => {
|
|
55
57
|
if (isOpen) {
|
|
@@ -217,6 +219,7 @@ const Footnote = (props) => {
|
|
|
217
219
|
isOpen,
|
|
218
220
|
tokens,
|
|
219
221
|
variant = {},
|
|
222
|
+
isMobileFullScreen = true,
|
|
220
223
|
dictionary = defaultDictionary,
|
|
221
224
|
...rest
|
|
222
225
|
} = props
|
|
@@ -488,6 +491,7 @@ const Footnote = (props) => {
|
|
|
488
491
|
footnoteBackground={footnoteBackground}
|
|
489
492
|
footnoteBorderTop={`${footnoteBorderTopSizeMd}px solid ${footnoteBorderColorMd}`}
|
|
490
493
|
isScrollable={isScrollable}
|
|
494
|
+
isMobileFullScreen={isMobileFullScreen}
|
|
491
495
|
>
|
|
492
496
|
<ContentContainer maxWidth={maxWidth}>
|
|
493
497
|
<StyledFootnoteHeader ref={headerRef} viewport={viewport}>
|
|
@@ -588,14 +592,19 @@ Footnote.propTypes = {
|
|
|
588
592
|
dictionary: PropTypes.shape({
|
|
589
593
|
en: dictionaryContentShape,
|
|
590
594
|
fr: dictionaryContentShape
|
|
591
|
-
})
|
|
595
|
+
}),
|
|
596
|
+
/**
|
|
597
|
+
* A boolean flag used to disable isMobileFullScreen of Footnote for mobile view
|
|
598
|
+
*/
|
|
599
|
+
isMobileFullScreen: PropTypes.bool
|
|
592
600
|
}
|
|
593
601
|
|
|
594
602
|
Footnote.defaultProps = {
|
|
595
603
|
isOpen: false,
|
|
596
604
|
number: undefined,
|
|
597
605
|
content: undefined,
|
|
598
|
-
copy: 'en'
|
|
606
|
+
copy: 'en',
|
|
607
|
+
isMobileFullScreen: true
|
|
599
608
|
}
|
|
600
609
|
|
|
601
610
|
export default Footnote
|