@telus-uds/components-base 1.52.0 → 1.54.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 +34 -2
- package/component-docs.json +172 -21
- package/lib/Button/ButtonBase.js +17 -5
- package/lib/Card/CardBase.js +11 -2
- package/lib/Carousel/Carousel.js +15 -6
- package/lib/ExpandCollapse/Panel.js +65 -8
- package/lib/Modal/Modal.js +9 -3
- package/lib/SkipLink/SkipLink.js +19 -15
- package/lib/ToggleSwitch/ToggleSwitch.js +60 -22
- package/lib/TooltipButton/TooltipButton.js +3 -1
- package/lib/Typography/Typography.js +11 -2
- package/lib-module/Button/ButtonBase.js +17 -5
- package/lib-module/Card/CardBase.js +10 -2
- package/lib-module/Carousel/Carousel.js +15 -6
- package/lib-module/ExpandCollapse/Panel.js +64 -8
- package/lib-module/Modal/Modal.js +8 -3
- package/lib-module/SkipLink/SkipLink.js +19 -15
- package/lib-module/ToggleSwitch/ToggleSwitch.js +60 -22
- package/lib-module/TooltipButton/TooltipButton.js +3 -1
- package/lib-module/Typography/Typography.js +10 -2
- package/package.json +3 -3
- package/src/Button/ButtonBase.jsx +11 -1
- package/src/Card/CardBase.jsx +26 -15
- package/src/Carousel/Carousel.jsx +13 -6
- package/src/ExpandCollapse/Panel.jsx +55 -8
- package/src/Modal/Modal.jsx +8 -3
- package/src/SkipLink/SkipLink.jsx +12 -12
- package/src/ToggleSwitch/ToggleSwitch.jsx +26 -9
- package/src/TooltipButton/TooltipButton.jsx +9 -1
- package/src/Typography/Typography.jsx +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 07 Jul 2023 19:17:02 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.54.0
|
|
8
|
+
|
|
9
|
+
Fri, 07 Jul 2023 19:17:02 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Koodo changes to nav bar (akshay.pandey1@telus.com)
|
|
14
|
+
- Home Pro Icon added to telus (akshay.pandey1@telus.com)
|
|
15
|
+
- Added "content" prop to ExpandCollapsePanel (wlsdud194@hotmail.com)
|
|
16
|
+
- added capability to adjust superscript sizing with theme tokens (kyle.king2@telus.com)
|
|
17
|
+
- Standardized SkipLink (wlsdud194@hotmail.com)
|
|
18
|
+
- Bump @telus-uds/system-theme-tokens to v2.37.0
|
|
19
|
+
|
|
20
|
+
### Patches
|
|
21
|
+
|
|
22
|
+
- Fix an issue where `Modal` may crash on Android devices and also may not render longer content (shahzaibkhalidmalik@outlook.com)
|
|
23
|
+
- Tooltip margin adjusted to encompass the whole component (jislaseng@gmail.com)
|
|
24
|
+
|
|
25
|
+
## 1.53.0
|
|
26
|
+
|
|
27
|
+
Wed, 28 Jun 2023 23:27:23 GMT
|
|
28
|
+
|
|
29
|
+
### Minor changes
|
|
30
|
+
|
|
31
|
+
- added/ outline, adjusted space and adjust track width to ToggleSwitch (samuraix221@hotmail.com)
|
|
32
|
+
- Gradient token added to Card component (35577399+JoshHC@users.noreply.github.com)
|
|
33
|
+
- Bump @telus-uds/system-theme-tokens to v2.36.0
|
|
34
|
+
|
|
35
|
+
### Patches
|
|
36
|
+
|
|
37
|
+
- `Carousel` breaks when single `Carousel.Item` is rendered (shahzaibkhalidmalik@outlook.com)
|
|
38
|
+
|
|
7
39
|
## 1.52.0
|
|
8
40
|
|
|
9
|
-
Wed, 21 Jun 2023 20:
|
|
41
|
+
Wed, 21 Jun 2023 20:40:42 GMT
|
|
10
42
|
|
|
11
43
|
### Minor changes
|
|
12
44
|
|
package/component-docs.json
CHANGED
|
@@ -36,7 +36,11 @@
|
|
|
36
36
|
"pressableBorderTopColor": "color",
|
|
37
37
|
"pressablePaddingBottom": "size",
|
|
38
38
|
"titleColor": "color",
|
|
39
|
-
"subTitleColor": "color"
|
|
39
|
+
"subTitleColor": "color",
|
|
40
|
+
"outerBorderColor": "color",
|
|
41
|
+
"outerBorderGap": "size",
|
|
42
|
+
"outerBorderRadius": "radius",
|
|
43
|
+
"outerBorderWidth": "border"
|
|
40
44
|
},
|
|
41
45
|
"VideoPickerSlider": {
|
|
42
46
|
"previousIcon": "icon",
|
|
@@ -59,14 +63,10 @@
|
|
|
59
63
|
"lineHeight": "lineHeight"
|
|
60
64
|
},
|
|
61
65
|
"Table": {
|
|
62
|
-
"tablePaddingBottom": "size",
|
|
63
66
|
"cellMinWidth": "size",
|
|
64
|
-
"
|
|
65
|
-
"cellHeadingBoxShadowColor": "color",
|
|
67
|
+
"tablePaddingBottom": "size",
|
|
66
68
|
"cellBoxShadowColor": "color",
|
|
67
|
-
"cellSubheadingBackground": "color",
|
|
68
69
|
"cellBackground": "color",
|
|
69
|
-
"cellRowHeadingBackground": "color",
|
|
70
70
|
"cellStickyShadow": "shadow",
|
|
71
71
|
"cellPaddingTop": "size",
|
|
72
72
|
"cellPaddingRight": "size",
|
|
@@ -74,7 +74,9 @@
|
|
|
74
74
|
"cellPaddingBottom": "size",
|
|
75
75
|
"fontWeight": "fontWeight",
|
|
76
76
|
"fontName": "fontName",
|
|
77
|
-
"fontSize": "fontSize"
|
|
77
|
+
"fontSize": "fontSize",
|
|
78
|
+
"lineHeight": "lineHeight",
|
|
79
|
+
"stickyBackgroundColor": "color"
|
|
78
80
|
},
|
|
79
81
|
"Image": {
|
|
80
82
|
"borderRadius": "radius"
|
|
@@ -425,6 +427,7 @@
|
|
|
425
427
|
"flex": "integer",
|
|
426
428
|
"backgroundColor": "color",
|
|
427
429
|
"borderColor": "color",
|
|
430
|
+
"gradient": "gradient",
|
|
428
431
|
"borderRadius": "radius",
|
|
429
432
|
"borderWidth": "border",
|
|
430
433
|
"paddingBottom": "size",
|
|
@@ -618,6 +621,7 @@
|
|
|
618
621
|
"iconColor": "color",
|
|
619
622
|
"iconSize": "size",
|
|
620
623
|
"iconGap": "size",
|
|
624
|
+
"color": "color",
|
|
621
625
|
"iconPaddingTop": "size",
|
|
622
626
|
"iconPosition": "position",
|
|
623
627
|
"verticalAlign": "verticalAlign",
|
|
@@ -628,7 +632,9 @@
|
|
|
628
632
|
"paddingBottom": "size",
|
|
629
633
|
"borderWidth": "border",
|
|
630
634
|
"borderColor": "color",
|
|
631
|
-
"
|
|
635
|
+
"textLine": "textLine",
|
|
636
|
+
"fontSize": "fontSize",
|
|
637
|
+
"lineHeight": "lineHeight"
|
|
632
638
|
},
|
|
633
639
|
"ExpandCollapsePanel": {
|
|
634
640
|
"expandDuration": "duration",
|
|
@@ -642,7 +648,19 @@
|
|
|
642
648
|
"borderRadius": "radius",
|
|
643
649
|
"borderWidth": "border",
|
|
644
650
|
"expandDividerColor": "color",
|
|
645
|
-
"expandDividerWidth": "size"
|
|
651
|
+
"expandDividerWidth": "size",
|
|
652
|
+
"contentPanelBackgroundColor": "color",
|
|
653
|
+
"contentPanelPaddingLeft": "size",
|
|
654
|
+
"contentPanelPaddingRight": "size",
|
|
655
|
+
"contentPanelPaddingTop": "size",
|
|
656
|
+
"contentPanelPaddingBottom": "size",
|
|
657
|
+
"contentPanelBorderWidth": "border",
|
|
658
|
+
"contentPanelBorderColor": "color",
|
|
659
|
+
"contentPanelFontName": "fontName",
|
|
660
|
+
"contentPanelFontSize": "fontSize",
|
|
661
|
+
"contentPanelFontColor": "color",
|
|
662
|
+
"contentPanelFontWeight": "fontWeight",
|
|
663
|
+
"contentPanelLineHeight": "lineHeight"
|
|
646
664
|
},
|
|
647
665
|
"Feedback": {
|
|
648
666
|
"backgroundColor": "color",
|
|
@@ -1395,7 +1413,12 @@
|
|
|
1395
1413
|
"outlineWidth": "border",
|
|
1396
1414
|
"paddingHorizontal": "size",
|
|
1397
1415
|
"paddingVertical": "size",
|
|
1398
|
-
"borderRadius": "radius"
|
|
1416
|
+
"borderRadius": "radius",
|
|
1417
|
+
"textLine": "textLine",
|
|
1418
|
+
"fontName": "fontName",
|
|
1419
|
+
"fontWeight": "fontWeight",
|
|
1420
|
+
"fontSize": "fontSize",
|
|
1421
|
+
"lineHeight": "lineHeight"
|
|
1399
1422
|
},
|
|
1400
1423
|
"StoryCard": {
|
|
1401
1424
|
"outerBorderColor": "color",
|
|
@@ -1507,6 +1530,8 @@
|
|
|
1507
1530
|
"TermsAndConditions": {
|
|
1508
1531
|
"contentPaddingBottom": "size",
|
|
1509
1532
|
"contentPaddingLeft": "size",
|
|
1533
|
+
"contentBorderColor": "color",
|
|
1534
|
+
"contentMarginBottom": "size",
|
|
1510
1535
|
"mdContentPaddingBottom": "size",
|
|
1511
1536
|
"mdContentPaddingLeft": "size",
|
|
1512
1537
|
"orderedPadding": "size",
|
|
@@ -1533,13 +1558,20 @@
|
|
|
1533
1558
|
"expandTitleColor": "color",
|
|
1534
1559
|
"expandTitleFontSize": "size",
|
|
1535
1560
|
"expandTitleLineHeight": "lineHeight",
|
|
1561
|
+
"expandTitleFontName": "fontName",
|
|
1562
|
+
"expandTitleFontWeight": "fontWeight",
|
|
1536
1563
|
"expandTitleMarginX": "size",
|
|
1537
1564
|
"expandTitleMarginY": "size",
|
|
1565
|
+
"expandTitlePaddingLeft": "size",
|
|
1566
|
+
"expandTitleBorder": "border",
|
|
1567
|
+
"expandTitleBorderColor": "color",
|
|
1568
|
+
"expandTitleUnderline": "textLine",
|
|
1538
1569
|
"expandBaseBorderWidth": "border",
|
|
1539
1570
|
"expandContentPaddingBottom": "size",
|
|
1540
1571
|
"expandContentPaddingLeft": "size",
|
|
1541
1572
|
"expandContentPaddingRight": "size",
|
|
1542
1573
|
"expandContentPaddingTop": "size",
|
|
1574
|
+
"dividerColor": "color",
|
|
1543
1575
|
"icon": "icon"
|
|
1544
1576
|
},
|
|
1545
1577
|
"TextArea": {
|
|
@@ -1607,7 +1639,10 @@
|
|
|
1607
1639
|
"paddingBottom": "size",
|
|
1608
1640
|
"shadow": "shadow",
|
|
1609
1641
|
"alignSelf": "flexAlign",
|
|
1642
|
+
"space": "integer",
|
|
1610
1643
|
"icon": "icon",
|
|
1644
|
+
"trackHeight": "size",
|
|
1645
|
+
"outerBorderGapButton": "size",
|
|
1611
1646
|
"width": "size",
|
|
1612
1647
|
"trackBorderWidth": "border",
|
|
1613
1648
|
"trackBorderColor": "color",
|
|
@@ -1697,6 +1732,7 @@
|
|
|
1697
1732
|
},
|
|
1698
1733
|
"Typography": {
|
|
1699
1734
|
"fontName": "fontName",
|
|
1735
|
+
"superScriptFontSize": "fontSize",
|
|
1700
1736
|
"fontWeight": "fontWeight",
|
|
1701
1737
|
"fontSize": "fontSize",
|
|
1702
1738
|
"color": "color",
|
|
@@ -2130,6 +2166,19 @@
|
|
|
2130
2166
|
"type": "state"
|
|
2131
2167
|
}
|
|
2132
2168
|
},
|
|
2169
|
+
"ExpandCollapseMiniControl": {
|
|
2170
|
+
"focus": {
|
|
2171
|
+
"description": "Currently only web has good support for this. Applies when an interactive component's focus handler is triggered, such as keyboard tabbing or selection.",
|
|
2172
|
+
"values": [
|
|
2173
|
+
true,
|
|
2174
|
+
false
|
|
2175
|
+
],
|
|
2176
|
+
"type": "state",
|
|
2177
|
+
"platforms": [
|
|
2178
|
+
"rn"
|
|
2179
|
+
]
|
|
2180
|
+
}
|
|
2181
|
+
},
|
|
2133
2182
|
"ExpandCollapsePanel": {
|
|
2134
2183
|
"expanded": {
|
|
2135
2184
|
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
@@ -3133,6 +3182,45 @@
|
|
|
3133
3182
|
"type": "state"
|
|
3134
3183
|
}
|
|
3135
3184
|
},
|
|
3185
|
+
"VideoPickerThumbnail": {
|
|
3186
|
+
"focus": {
|
|
3187
|
+
"description": "Currently only web has good support for this. Applies when an interactive component's focus handler is triggered, such as keyboard tabbing or selection.",
|
|
3188
|
+
"values": [
|
|
3189
|
+
true,
|
|
3190
|
+
false
|
|
3191
|
+
],
|
|
3192
|
+
"type": "state",
|
|
3193
|
+
"platforms": [
|
|
3194
|
+
"rn"
|
|
3195
|
+
]
|
|
3196
|
+
},
|
|
3197
|
+
"hover": {
|
|
3198
|
+
"description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
|
|
3199
|
+
"values": [
|
|
3200
|
+
true,
|
|
3201
|
+
false
|
|
3202
|
+
],
|
|
3203
|
+
"type": "state",
|
|
3204
|
+
"platforms": [
|
|
3205
|
+
"rn"
|
|
3206
|
+
]
|
|
3207
|
+
},
|
|
3208
|
+
"pressed": {
|
|
3209
|
+
"description": "Applies while an interactive component is being physically pressed. Most visible on touchscreen taps; in React Native Web, this is visible on web mouse clicks only if the pressable is held down.",
|
|
3210
|
+
"values": [
|
|
3211
|
+
true,
|
|
3212
|
+
false
|
|
3213
|
+
],
|
|
3214
|
+
"type": "state"
|
|
3215
|
+
},
|
|
3216
|
+
"selected": {
|
|
3217
|
+
"description": "Applies while an interactive component is the currently selected one in a set of states or components, for example a button in a `ButtonGroup`.",
|
|
3218
|
+
"values": [
|
|
3219
|
+
true
|
|
3220
|
+
],
|
|
3221
|
+
"type": "state"
|
|
3222
|
+
}
|
|
3223
|
+
},
|
|
3136
3224
|
"SkipLink": {
|
|
3137
3225
|
"focus": {
|
|
3138
3226
|
"description": "Currently only web has good support for this. Applies when an interactive component's focus handler is triggered, such as keyboard tabbing or selection.",
|
|
@@ -3144,6 +3232,14 @@
|
|
|
3144
3232
|
"platforms": [
|
|
3145
3233
|
"rn"
|
|
3146
3234
|
]
|
|
3235
|
+
},
|
|
3236
|
+
"pressed": {
|
|
3237
|
+
"description": "Applies while an interactive component is being physically pressed. Most visible on touchscreen taps; in React Native Web, this is visible on web mouse clicks only if the pressable is held down.",
|
|
3238
|
+
"values": [
|
|
3239
|
+
true,
|
|
3240
|
+
false
|
|
3241
|
+
],
|
|
3242
|
+
"type": "state"
|
|
3147
3243
|
}
|
|
3148
3244
|
}
|
|
3149
3245
|
},
|
|
@@ -3199,8 +3295,11 @@
|
|
|
3199
3295
|
},
|
|
3200
3296
|
"fontSize": {
|
|
3201
3297
|
"default": 16,
|
|
3202
|
-
"nullable":
|
|
3203
|
-
"type": "Number"
|
|
3298
|
+
"nullable": true,
|
|
3299
|
+
"type": "Number|String|null",
|
|
3300
|
+
"values": {
|
|
3301
|
+
"none": null
|
|
3302
|
+
}
|
|
3204
3303
|
},
|
|
3205
3304
|
"lineHeight": {
|
|
3206
3305
|
"default": 1,
|
|
@@ -3584,7 +3683,19 @@
|
|
|
3584
3683
|
"borderRadius": "radius",
|
|
3585
3684
|
"borderWidth": "border",
|
|
3586
3685
|
"expandDividerColor": "color",
|
|
3587
|
-
"expandDividerWidth": "size"
|
|
3686
|
+
"expandDividerWidth": "size",
|
|
3687
|
+
"contentPanelBackgroundColor": "color",
|
|
3688
|
+
"contentPanelPaddingLeft": "size",
|
|
3689
|
+
"contentPanelPaddingRight": "size",
|
|
3690
|
+
"contentPanelPaddingTop": "size",
|
|
3691
|
+
"contentPanelPaddingBottom": "size",
|
|
3692
|
+
"contentPanelBorderWidth": "border",
|
|
3693
|
+
"contentPanelBorderColor": "color",
|
|
3694
|
+
"contentPanelFontName": "fontName",
|
|
3695
|
+
"contentPanelFontSize": "fontSize",
|
|
3696
|
+
"contentPanelFontColor": "color",
|
|
3697
|
+
"contentPanelFontWeight": "fontWeight",
|
|
3698
|
+
"contentPanelLineHeight": "lineHeight"
|
|
3588
3699
|
}
|
|
3589
3700
|
},
|
|
3590
3701
|
"required": false,
|
|
@@ -3601,7 +3712,7 @@
|
|
|
3601
3712
|
"type": {
|
|
3602
3713
|
"name": "func"
|
|
3603
3714
|
},
|
|
3604
|
-
"required":
|
|
3715
|
+
"required": false,
|
|
3605
3716
|
"description": "Function to call on pressing the panel's control, which should open or close the panel.\nIf Panel is a direct child of `ExpandCollapse`, this prop will be provided by the ExpandCollapse parent."
|
|
3606
3717
|
},
|
|
3607
3718
|
"onPress": {
|
|
@@ -3629,10 +3740,10 @@
|
|
|
3629
3740
|
"control": {
|
|
3630
3741
|
"type": {
|
|
3631
3742
|
"name": "custom",
|
|
3632
|
-
"raw": "ExpandCollapseControl.propTypes.children
|
|
3743
|
+
"raw": "ExpandCollapseControl.propTypes.children"
|
|
3633
3744
|
},
|
|
3634
3745
|
"required": false,
|
|
3635
|
-
"description": "The content inside the
|
|
3746
|
+
"description": "The content inside the control element that opens and closes the ExpandCollapse when pressed."
|
|
3636
3747
|
},
|
|
3637
3748
|
"controlTokens": {
|
|
3638
3749
|
"type": {
|
|
@@ -3670,6 +3781,13 @@
|
|
|
3670
3781
|
},
|
|
3671
3782
|
"required": false,
|
|
3672
3783
|
"description": "An optional ref to be attached to the control"
|
|
3784
|
+
},
|
|
3785
|
+
"content": {
|
|
3786
|
+
"type": {
|
|
3787
|
+
"name": "bool"
|
|
3788
|
+
},
|
|
3789
|
+
"required": false,
|
|
3790
|
+
"description": "A boolean prop to determine if the panel is a content panel or not. If true, the panel will not have a control"
|
|
3673
3791
|
}
|
|
3674
3792
|
},
|
|
3675
3793
|
"attributes": {
|
|
@@ -4112,6 +4230,7 @@
|
|
|
4112
4230
|
"flex": "integer",
|
|
4113
4231
|
"backgroundColor": "color",
|
|
4114
4232
|
"borderColor": "color",
|
|
4233
|
+
"gradient": "gradient",
|
|
4115
4234
|
"borderRadius": "radius",
|
|
4116
4235
|
"borderWidth": "border",
|
|
4117
4236
|
"paddingBottom": "size",
|
|
@@ -4527,7 +4646,19 @@
|
|
|
4527
4646
|
"borderRadius": "radius",
|
|
4528
4647
|
"borderWidth": "border",
|
|
4529
4648
|
"expandDividerColor": "color",
|
|
4530
|
-
"expandDividerWidth": "size"
|
|
4649
|
+
"expandDividerWidth": "size",
|
|
4650
|
+
"contentPanelBackgroundColor": "color",
|
|
4651
|
+
"contentPanelPaddingLeft": "size",
|
|
4652
|
+
"contentPanelPaddingRight": "size",
|
|
4653
|
+
"contentPanelPaddingTop": "size",
|
|
4654
|
+
"contentPanelPaddingBottom": "size",
|
|
4655
|
+
"contentPanelBorderWidth": "border",
|
|
4656
|
+
"contentPanelBorderColor": "color",
|
|
4657
|
+
"contentPanelFontName": "fontName",
|
|
4658
|
+
"contentPanelFontSize": "fontSize",
|
|
4659
|
+
"contentPanelFontColor": "color",
|
|
4660
|
+
"contentPanelFontWeight": "fontWeight",
|
|
4661
|
+
"contentPanelLineHeight": "lineHeight"
|
|
4531
4662
|
}
|
|
4532
4663
|
},
|
|
4533
4664
|
"required": false,
|
|
@@ -4544,7 +4675,7 @@
|
|
|
4544
4675
|
"type": {
|
|
4545
4676
|
"name": "func"
|
|
4546
4677
|
},
|
|
4547
|
-
"required":
|
|
4678
|
+
"required": false,
|
|
4548
4679
|
"description": "Function to call on pressing the panel's control, which should open or close the panel.\nIf Panel is a direct child of `ExpandCollapse`, this prop will be provided by the ExpandCollapse parent."
|
|
4549
4680
|
},
|
|
4550
4681
|
"onPress": {
|
|
@@ -4572,10 +4703,10 @@
|
|
|
4572
4703
|
"control": {
|
|
4573
4704
|
"type": {
|
|
4574
4705
|
"name": "custom",
|
|
4575
|
-
"raw": "ExpandCollapseControl.propTypes.children
|
|
4706
|
+
"raw": "ExpandCollapseControl.propTypes.children"
|
|
4576
4707
|
},
|
|
4577
4708
|
"required": false,
|
|
4578
|
-
"description": "The content inside the
|
|
4709
|
+
"description": "The content inside the control element that opens and closes the ExpandCollapse when pressed."
|
|
4579
4710
|
},
|
|
4580
4711
|
"controlTokens": {
|
|
4581
4712
|
"type": {
|
|
@@ -4613,6 +4744,13 @@
|
|
|
4613
4744
|
},
|
|
4614
4745
|
"required": false,
|
|
4615
4746
|
"description": "An optional ref to be attached to the control"
|
|
4747
|
+
},
|
|
4748
|
+
"content": {
|
|
4749
|
+
"type": {
|
|
4750
|
+
"name": "bool"
|
|
4751
|
+
},
|
|
4752
|
+
"required": false,
|
|
4753
|
+
"description": "A boolean prop to determine if the panel is a content panel or not. If true, the panel will not have a control"
|
|
4616
4754
|
}
|
|
4617
4755
|
},
|
|
4618
4756
|
"attributes": {
|
|
@@ -7909,6 +8047,7 @@
|
|
|
7909
8047
|
"flex": "integer",
|
|
7910
8048
|
"backgroundColor": "color",
|
|
7911
8049
|
"borderColor": "color",
|
|
8050
|
+
"gradient": "gradient",
|
|
7912
8051
|
"borderRadius": "radius",
|
|
7913
8052
|
"borderWidth": "border",
|
|
7914
8053
|
"paddingBottom": "size",
|
|
@@ -9494,7 +9633,12 @@
|
|
|
9494
9633
|
"outlineWidth": "border",
|
|
9495
9634
|
"paddingHorizontal": "size",
|
|
9496
9635
|
"paddingVertical": "size",
|
|
9497
|
-
"borderRadius": "radius"
|
|
9636
|
+
"borderRadius": "radius",
|
|
9637
|
+
"textLine": "textLine",
|
|
9638
|
+
"fontName": "fontName",
|
|
9639
|
+
"fontWeight": "fontWeight",
|
|
9640
|
+
"fontSize": "fontSize",
|
|
9641
|
+
"lineHeight": "lineHeight"
|
|
9498
9642
|
}
|
|
9499
9643
|
},
|
|
9500
9644
|
"required": false,
|
|
@@ -10921,6 +11065,7 @@
|
|
|
10921
11065
|
"name": "custom",
|
|
10922
11066
|
"raw": {
|
|
10923
11067
|
"fontName": "fontName",
|
|
11068
|
+
"superScriptFontSize": "fontSize",
|
|
10924
11069
|
"fontWeight": "fontWeight",
|
|
10925
11070
|
"fontSize": "fontSize",
|
|
10926
11071
|
"color": "color",
|
|
@@ -14702,7 +14847,10 @@
|
|
|
14702
14847
|
"paddingBottom": "size",
|
|
14703
14848
|
"shadow": "shadow",
|
|
14704
14849
|
"alignSelf": "flexAlign",
|
|
14850
|
+
"space": "integer",
|
|
14705
14851
|
"icon": "icon",
|
|
14852
|
+
"trackHeight": "size",
|
|
14853
|
+
"outerBorderGapButton": "size",
|
|
14706
14854
|
"width": "size",
|
|
14707
14855
|
"trackBorderWidth": "border",
|
|
14708
14856
|
"trackBorderColor": "color",
|
|
@@ -15028,7 +15176,10 @@
|
|
|
15028
15176
|
"paddingBottom": "size",
|
|
15029
15177
|
"shadow": "shadow",
|
|
15030
15178
|
"alignSelf": "flexAlign",
|
|
15179
|
+
"space": "integer",
|
|
15031
15180
|
"icon": "icon",
|
|
15181
|
+
"trackHeight": "size",
|
|
15182
|
+
"outerBorderGapButton": "size",
|
|
15032
15183
|
"width": "size",
|
|
15033
15184
|
"trackBorderWidth": "border",
|
|
15034
15185
|
"trackBorderColor": "color",
|
package/lib/Button/ButtonBase.js
CHANGED
|
@@ -232,19 +232,29 @@ const selectWebOnlyStyles = (inactive, themeTokens, _ref8) => {
|
|
|
232
232
|
});
|
|
233
233
|
};
|
|
234
234
|
|
|
235
|
-
const
|
|
235
|
+
const selectButtonStyles = _ref9 => {
|
|
236
|
+
let {
|
|
237
|
+
textAlign
|
|
238
|
+
} = _ref9;
|
|
239
|
+
return {
|
|
240
|
+
flexDirection: 'row',
|
|
241
|
+
justifyContent: textAlign
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
const selectItemIconTokens = _ref10 => {
|
|
236
246
|
let {
|
|
237
247
|
color,
|
|
238
248
|
iconColor,
|
|
239
249
|
iconSize
|
|
240
|
-
} =
|
|
250
|
+
} = _ref10;
|
|
241
251
|
return {
|
|
242
252
|
size: iconSize,
|
|
243
253
|
color: iconColor || color
|
|
244
254
|
};
|
|
245
255
|
};
|
|
246
256
|
|
|
247
|
-
const ButtonBase = /*#__PURE__*/(0, _react.forwardRef)((
|
|
257
|
+
const ButtonBase = /*#__PURE__*/(0, _react.forwardRef)((_ref11, ref) => {
|
|
248
258
|
let {
|
|
249
259
|
id,
|
|
250
260
|
href,
|
|
@@ -259,7 +269,7 @@ const ButtonBase = /*#__PURE__*/(0, _react.forwardRef)((_ref10, ref) => {
|
|
|
259
269
|
iconPosition = icon ? 'left' : undefined,
|
|
260
270
|
iconProps,
|
|
261
271
|
...rawRest
|
|
262
|
-
} =
|
|
272
|
+
} = _ref11;
|
|
263
273
|
|
|
264
274
|
const {
|
|
265
275
|
onPress,
|
|
@@ -308,6 +318,7 @@ const ButtonBase = /*#__PURE__*/(0, _react.forwardRef)((_ref10, ref) => {
|
|
|
308
318
|
|
|
309
319
|
const stretchStyles = themeTokens.width ? staticStyles.stretch : staticStyles.align;
|
|
310
320
|
const IconComponent = icon || themeTokens.icon;
|
|
321
|
+
const rowStyles = selectButtonStyles(themeTokens);
|
|
311
322
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
312
323
|
id: id,
|
|
313
324
|
style: [containerStyles, borderStyles, stretchStyles, staticStyles.row, _Platform.default.select({
|
|
@@ -315,7 +326,8 @@ const ButtonBase = /*#__PURE__*/(0, _react.forwardRef)((_ref10, ref) => {
|
|
|
315
326
|
maxWidth: '100%',
|
|
316
327
|
// ensure overflowing content wraps
|
|
317
328
|
// TODO: https://github.com/telus/universal-design-system/issues/487
|
|
318
|
-
transition: 'background-color 200ms, border-color 200ms'
|
|
329
|
+
transition: 'background-color 200ms, border-color 200ms',
|
|
330
|
+
...rowStyles
|
|
319
331
|
}
|
|
320
332
|
})],
|
|
321
333
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconText, {
|
package/lib/Card/CardBase.js
CHANGED
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
|
|
13
13
|
|
|
14
|
+
var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
|
|
15
|
+
|
|
14
16
|
var _ThemeProvider = require("../ThemeProvider");
|
|
15
17
|
|
|
16
18
|
var _utils = require("../utils");
|
|
@@ -39,7 +41,8 @@ const selectStyles = _ref => {
|
|
|
39
41
|
paddingRight,
|
|
40
42
|
paddingTop,
|
|
41
43
|
minWidth,
|
|
42
|
-
shadow
|
|
44
|
+
shadow,
|
|
45
|
+
gradient
|
|
43
46
|
} = _ref;
|
|
44
47
|
return {
|
|
45
48
|
flex,
|
|
@@ -52,7 +55,13 @@ const selectStyles = _ref => {
|
|
|
52
55
|
paddingRight,
|
|
53
56
|
paddingTop,
|
|
54
57
|
minWidth,
|
|
55
|
-
...(0, _ThemeProvider.applyShadowToken)(shadow)
|
|
58
|
+
...(0, _ThemeProvider.applyShadowToken)(shadow),
|
|
59
|
+
...(gradient && _Platform.default.OS === 'web' ? {
|
|
60
|
+
backgroundImage: `linear-gradient(${gradient.angle}deg, ${gradient.stops[0].color}, ${gradient.stops[1].color})`,
|
|
61
|
+
backgroundOrigin: `border-box`,
|
|
62
|
+
boxShadow: `inset 0 1000px white`,
|
|
63
|
+
border: `${borderWidth}px solid transparent`
|
|
64
|
+
} : {})
|
|
56
65
|
};
|
|
57
66
|
};
|
|
58
67
|
/**
|
package/lib/Carousel/Carousel.js
CHANGED
|
@@ -221,7 +221,12 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
221
221
|
dictionary: _dictionary.default,
|
|
222
222
|
copy
|
|
223
223
|
});
|
|
224
|
-
|
|
224
|
+
let childrenArray = (0, _utils.unpackFragment)(children); // if `Carousel` only has one `Carousel.Item`, convert this to a single-item array
|
|
225
|
+
|
|
226
|
+
if (!Array.isArray(childrenArray)) {
|
|
227
|
+
childrenArray = [childrenArray];
|
|
228
|
+
}
|
|
229
|
+
|
|
225
230
|
const systemProps = selectProps({ ...rest,
|
|
226
231
|
accessibilityRole,
|
|
227
232
|
accessibilityLabel,
|
|
@@ -364,12 +369,16 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
364
369
|
}, [fixOffsetAndGo]);
|
|
365
370
|
|
|
366
371
|
const isSwipeAllowed = _react.default.useCallback(() => {
|
|
372
|
+
if (childrenArray.length === 1) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
|
|
367
376
|
if (_Platform.default.OS === 'web') {
|
|
368
377
|
return !!(viewport === 'xs' || viewport === 'sm');
|
|
369
378
|
}
|
|
370
379
|
|
|
371
380
|
return true;
|
|
372
|
-
}, [viewport]);
|
|
381
|
+
}, [viewport, childrenArray.length]);
|
|
373
382
|
|
|
374
383
|
const panResponder = _react.default.useMemo(() => _PanResponder.default.create({
|
|
375
384
|
onPanResponderTerminationRequest: () => false,
|
|
@@ -507,7 +516,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
507
516
|
ref: ref,
|
|
508
517
|
...systemProps,
|
|
509
518
|
...containerProps,
|
|
510
|
-
children: [showPreviousNextNavigation && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
519
|
+
children: [showPreviousNextNavigation && childrenArray.length > 1 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
511
520
|
style: selectPreviousNextNavigationButtonStyles(previousNextNavigationButtonWidth, previousNextNavigationPosition, spaceBetweenSlideAndPreviousNextNavigation, isFirstSlide, isLastSlide, true),
|
|
512
521
|
testID: "previous-button-container",
|
|
513
522
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
@@ -517,7 +526,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
517
526
|
variant: previousNextIconButtonVariants,
|
|
518
527
|
accessibilityLabel: getCopyWithPlaceholders('iconButtonLabel').replace('%{targetStep}', activeIndex)
|
|
519
528
|
})
|
|
520
|
-
}), Boolean(skipLinkHref) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SkipLink.default, {
|
|
529
|
+
}) : null, Boolean(skipLinkHref) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SkipLink.default, {
|
|
521
530
|
ref: firstFocusRef,
|
|
522
531
|
href: skipLinkHref,
|
|
523
532
|
children: getCopyWithPlaceholders('skipLink')
|
|
@@ -554,7 +563,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
554
563
|
}, index.toFixed(2));
|
|
555
564
|
})
|
|
556
565
|
})
|
|
557
|
-
}), showPreviousNextNavigation && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
566
|
+
}), showPreviousNextNavigation && childrenArray.length > 1 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
558
567
|
style: selectPreviousNextNavigationButtonStyles(previousNextNavigationButtonWidth, previousNextNavigationPosition, spaceBetweenSlideAndPreviousNextNavigation, isFirstSlide, isLastSlide, false),
|
|
559
568
|
testID: "next-button-container",
|
|
560
569
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
@@ -564,7 +573,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
564
573
|
variant: previousNextIconButtonVariants,
|
|
565
574
|
accessibilityLabel: getCopyWithPlaceholders('iconButtonLabel').replace('%{targetStep}', activeIndex + 2)
|
|
566
575
|
})
|
|
567
|
-
})]
|
|
576
|
+
}) : null]
|
|
568
577
|
}), showPanelNavigation ? activePanelNavigation : null]
|
|
569
578
|
});
|
|
570
579
|
});
|