@telus-uds/components-base 1.54.0 → 1.56.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 +31 -2
- package/component-docs.json +136 -54
- package/lib/Carousel/CarouselStepTracker/CarouselStepTracker.js +6 -2
- package/lib/Carousel/CarouselTabs/CarouselTabsPanel.js +9 -8
- package/lib/Carousel/CarouselThumbnail.js +53 -26
- package/lib/Carousel/CarouselThumbnailNavigation.js +15 -6
- package/lib/IconButton/IconButton.js +41 -7
- package/lib/InputLabel/InputLabel.js +2 -1
- package/lib/Link/LinkBase.js +3 -3
- package/lib/Select/Select.js +3 -2
- package/lib/ThemeProvider/utils/styles.js +18 -2
- package/lib/TooltipButton/TooltipButton.js +4 -2
- package/lib-module/Carousel/CarouselStepTracker/CarouselStepTracker.js +6 -2
- package/lib-module/Carousel/CarouselTabs/CarouselTabsPanel.js +9 -8
- package/lib-module/Carousel/CarouselThumbnail.js +51 -27
- package/lib-module/Carousel/CarouselThumbnailNavigation.js +13 -6
- package/lib-module/IconButton/IconButton.js +41 -7
- package/lib-module/InputLabel/InputLabel.js +2 -1
- package/lib-module/Link/LinkBase.js +3 -3
- package/lib-module/Select/Select.js +3 -2
- package/lib-module/ThemeProvider/utils/styles.js +19 -2
- package/lib-module/TooltipButton/TooltipButton.js +4 -2
- package/package.json +3 -3
- package/src/Carousel/CarouselStepTracker/CarouselStepTracker.jsx +10 -2
- package/src/Carousel/CarouselTabs/CarouselTabsPanel.jsx +5 -5
- package/src/Carousel/CarouselThumbnail.jsx +31 -25
- package/src/Carousel/CarouselThumbnailNavigation.jsx +8 -3
- package/src/IconButton/IconButton.jsx +50 -6
- package/src/InputLabel/InputLabel.jsx +4 -1
- package/src/Link/LinkBase.jsx +3 -4
- package/src/Select/Select.jsx +3 -2
- package/src/ThemeProvider/utils/styles.js +29 -2
- package/src/TooltipButton/TooltipButton.jsx +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on Fri,
|
|
3
|
+
This log was last generated on Fri, 21 Jul 2023 00:42:38 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.56.0
|
|
8
|
+
|
|
9
|
+
Fri, 21 Jul 2023 00:42:38 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Rebranded Box for Koodo (wlsdud194@hotmail.com)
|
|
14
|
+
- Branch updated with rebase for components base (35577399+JoshHC@users.noreply.github.com)
|
|
15
|
+
- space of 4px added between the validation and the chevron icons for select component (35577399+JoshHC@users.noreply.github.com)
|
|
16
|
+
- fix content shifting issue in Card component (kyle.king2@telus.com)
|
|
17
|
+
- Bump @telus-uds/system-theme-tokens to v2.39.0
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- fix stories for inverse variant icon (mauricio.batresmontejo@telus.com)
|
|
22
|
+
- rebrand inputlabel for koodo (mauricio.batresmontejo@telus.com)
|
|
23
|
+
|
|
24
|
+
## 1.55.0
|
|
25
|
+
|
|
26
|
+
Fri, 14 Jul 2023 19:47:50 GMT
|
|
27
|
+
|
|
28
|
+
### Minor changes
|
|
29
|
+
|
|
30
|
+
- Refactored IconButton to accomodate QuantitySelector standardization (wlsdud194@hotmail.com)
|
|
31
|
+
- Fixed test data and introduced background color token to base component. (akshay.pandey1@telus.com)
|
|
32
|
+
- Added use of CarouselThumbnail (kyle.king2@telus.com)
|
|
33
|
+
- Bump @telus-uds/system-constants to v1.3.0
|
|
34
|
+
- Bump @telus-uds/system-theme-tokens to v2.38.0
|
|
35
|
+
|
|
7
36
|
## 1.54.0
|
|
8
37
|
|
|
9
|
-
Fri, 07 Jul 2023 19:
|
|
38
|
+
Fri, 07 Jul 2023 19:26:41 GMT
|
|
10
39
|
|
|
11
40
|
### Minor changes
|
|
12
41
|
|
package/component-docs.json
CHANGED
|
@@ -172,17 +172,40 @@
|
|
|
172
172
|
"itemPadding": "size"
|
|
173
173
|
},
|
|
174
174
|
"QuantitySelector": {
|
|
175
|
-
"leftIcon": "icon",
|
|
176
|
-
"rightIcon": "icon",
|
|
177
|
-
"iconSize": "size",
|
|
178
|
-
"borderColor": "color",
|
|
179
175
|
"inputBorderColor": "color",
|
|
180
176
|
"inputBackgroundColor": "color",
|
|
181
|
-
"inputBorderWidth": "
|
|
177
|
+
"inputBorderWidth": "border",
|
|
182
178
|
"padding": "size",
|
|
183
|
-
"
|
|
179
|
+
"paddingLeft": "size",
|
|
180
|
+
"paddingRight": "size",
|
|
181
|
+
"paddingTop": "size",
|
|
182
|
+
"paddingBottom": "size",
|
|
184
183
|
"textColor": "color",
|
|
185
|
-
"
|
|
184
|
+
"inputWidth": "size",
|
|
185
|
+
"lineHeight": "lineHeight",
|
|
186
|
+
"fontSize": "fontSize"
|
|
187
|
+
},
|
|
188
|
+
"QuantitySelectorSideButton": {
|
|
189
|
+
"borderRadius": "radius",
|
|
190
|
+
"borderTopLeftRadius": "radius",
|
|
191
|
+
"borderTopRightRadius": "radius",
|
|
192
|
+
"borderBottomLeftRadius": "radius",
|
|
193
|
+
"borderBottomRightRadius": "radius",
|
|
194
|
+
"borderColor": "color",
|
|
195
|
+
"borderWidth": "border",
|
|
196
|
+
"borderLeftWidth": "border",
|
|
197
|
+
"borderRightWidth": "border",
|
|
198
|
+
"borderTopWidth": "border",
|
|
199
|
+
"borderBottomWidth": "border",
|
|
200
|
+
"padding": "size",
|
|
201
|
+
"paddingLeft": "size",
|
|
202
|
+
"paddingRight": "size",
|
|
203
|
+
"paddingTop": "size",
|
|
204
|
+
"paddingBottom": "size",
|
|
205
|
+
"iconColor": "color",
|
|
206
|
+
"iconSize": "size",
|
|
207
|
+
"icon": "icon",
|
|
208
|
+
"backgroundColor": "color"
|
|
186
209
|
},
|
|
187
210
|
"Footnote": {
|
|
188
211
|
"footnoteBackground": "color",
|
|
@@ -270,6 +293,7 @@
|
|
|
270
293
|
},
|
|
271
294
|
"Badge": {
|
|
272
295
|
"fontWeight": "fontWeight",
|
|
296
|
+
"fontSize": "fontSize",
|
|
273
297
|
"fontName": "fontName",
|
|
274
298
|
"backgroundColor": "color",
|
|
275
299
|
"borderColor": "color",
|
|
@@ -465,15 +489,19 @@
|
|
|
465
489
|
"showPanelTabs": "show",
|
|
466
490
|
"spaceBetweenSlideAndPreviousNextNavigation": "size",
|
|
467
491
|
"spaceBetweenSlideAndPanelNavigation": "size",
|
|
468
|
-
"
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
"
|
|
472
|
-
"
|
|
473
|
-
"
|
|
474
|
-
"
|
|
475
|
-
"
|
|
476
|
-
"
|
|
492
|
+
"stepTrackerCurrentBackgroundColor": "color"
|
|
493
|
+
},
|
|
494
|
+
"CarouselThumbnail": {
|
|
495
|
+
"alignItems": "flexAlign",
|
|
496
|
+
"borderColor": "color",
|
|
497
|
+
"borderRadius": "radius",
|
|
498
|
+
"borderWidth": "border",
|
|
499
|
+
"containerPaddingTop": "size",
|
|
500
|
+
"margin": "size",
|
|
501
|
+
"padding": "size",
|
|
502
|
+
"selectedBorderColor": "color",
|
|
503
|
+
"selectedBorderWidth": "border",
|
|
504
|
+
"size": "size"
|
|
477
505
|
},
|
|
478
506
|
"CarouselTabsPanelItem": {
|
|
479
507
|
"paddingLeft": "size",
|
|
@@ -739,6 +767,14 @@
|
|
|
739
767
|
"icon": "icon",
|
|
740
768
|
"backgroundColor": "color",
|
|
741
769
|
"borderRadius": "radius",
|
|
770
|
+
"borderTopLeftRadius": "radius",
|
|
771
|
+
"borderTopRightRadius": "radius",
|
|
772
|
+
"borderBottomLeftRadius": "radius",
|
|
773
|
+
"borderBottomRightRadius": "radius",
|
|
774
|
+
"borderTopWidth": "border",
|
|
775
|
+
"borderBottomWidth": "border",
|
|
776
|
+
"borderLeftWidth": "border",
|
|
777
|
+
"borderRightWidth": "border",
|
|
742
778
|
"borderColor": "color",
|
|
743
779
|
"borderWidth": "border",
|
|
744
780
|
"outerBorderWidth": "border",
|
|
@@ -1525,7 +1561,24 @@
|
|
|
1525
1561
|
"figcaptionGap": "size",
|
|
1526
1562
|
"textColor": "color",
|
|
1527
1563
|
"imageSize": "size",
|
|
1528
|
-
"icon": "icon"
|
|
1564
|
+
"icon": "icon",
|
|
1565
|
+
"iconFr": "icon",
|
|
1566
|
+
"testimonialFontSizeLarge": "fontSize",
|
|
1567
|
+
"testimonialLineHeightLarge": "lineHeight",
|
|
1568
|
+
"testimonialFontNameLarge": "fontName",
|
|
1569
|
+
"testimonialFontWeightLarge": "fontWeight",
|
|
1570
|
+
"testimonialFontSizeHeading": "fontSize",
|
|
1571
|
+
"testimonialLineHeightHeading": "lineHeight",
|
|
1572
|
+
"testimonialFontNameHeading": "fontName",
|
|
1573
|
+
"testimonialFontWeightHeading": "fontWeight",
|
|
1574
|
+
"authorFontSize": "fontSize",
|
|
1575
|
+
"authorLineHeight": "lineHeight",
|
|
1576
|
+
"authorFontName": "fontName",
|
|
1577
|
+
"authorFontWeight": "fontWeight",
|
|
1578
|
+
"additionalFontSize": "fontSize",
|
|
1579
|
+
"additionalLineHeight": "lineHeight",
|
|
1580
|
+
"additionalFontName": "fontName",
|
|
1581
|
+
"additionalFontWeight": "fontWeight"
|
|
1529
1582
|
},
|
|
1530
1583
|
"TermsAndConditions": {
|
|
1531
1584
|
"contentPaddingBottom": "size",
|
|
@@ -1613,6 +1666,7 @@
|
|
|
1613
1666
|
"animationPaddingBottomBefore": "size",
|
|
1614
1667
|
"animationPaddingBottomAfter": "size",
|
|
1615
1668
|
"animationPaddingTopBefore": "size",
|
|
1669
|
+
"padding": "size",
|
|
1616
1670
|
"animationPaddingTopAfter": "size",
|
|
1617
1671
|
"animationBackgroundColorBefore": "color",
|
|
1618
1672
|
"animationBackgroundColorAfter": "color",
|
|
@@ -1721,6 +1775,7 @@
|
|
|
1721
1775
|
},
|
|
1722
1776
|
"TooltipButton": {
|
|
1723
1777
|
"outerBorderColor": "color",
|
|
1778
|
+
"backgroundColor": "color",
|
|
1724
1779
|
"outerBorderWidth": "border",
|
|
1725
1780
|
"outerBorderGap": "size",
|
|
1726
1781
|
"borderRadius": "radius",
|
|
@@ -2023,6 +2078,38 @@
|
|
|
2023
2078
|
"type": "state"
|
|
2024
2079
|
}
|
|
2025
2080
|
},
|
|
2081
|
+
"CarouselThumbnail": {
|
|
2082
|
+
"focus": {
|
|
2083
|
+
"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.",
|
|
2084
|
+
"values": [
|
|
2085
|
+
true,
|
|
2086
|
+
false
|
|
2087
|
+
],
|
|
2088
|
+
"type": "state",
|
|
2089
|
+
"platforms": [
|
|
2090
|
+
"rn"
|
|
2091
|
+
]
|
|
2092
|
+
},
|
|
2093
|
+
"hover": {
|
|
2094
|
+
"description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
|
|
2095
|
+
"values": [
|
|
2096
|
+
true,
|
|
2097
|
+
false
|
|
2098
|
+
],
|
|
2099
|
+
"type": "state",
|
|
2100
|
+
"platforms": [
|
|
2101
|
+
"rn"
|
|
2102
|
+
]
|
|
2103
|
+
},
|
|
2104
|
+
"pressed": {
|
|
2105
|
+
"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.",
|
|
2106
|
+
"values": [
|
|
2107
|
+
true,
|
|
2108
|
+
false
|
|
2109
|
+
],
|
|
2110
|
+
"type": "state"
|
|
2111
|
+
}
|
|
2112
|
+
},
|
|
2026
2113
|
"Checkbox": {
|
|
2027
2114
|
"checked": {
|
|
2028
2115
|
"description": "Corresponds to a selected state for a checkbox or radio",
|
|
@@ -2161,7 +2248,8 @@
|
|
|
2161
2248
|
"expanded": {
|
|
2162
2249
|
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
2163
2250
|
"values": [
|
|
2164
|
-
true
|
|
2251
|
+
true,
|
|
2252
|
+
false
|
|
2165
2253
|
],
|
|
2166
2254
|
"type": "state"
|
|
2167
2255
|
}
|
|
@@ -2183,7 +2271,8 @@
|
|
|
2183
2271
|
"expanded": {
|
|
2184
2272
|
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
2185
2273
|
"values": [
|
|
2186
|
-
true
|
|
2274
|
+
true,
|
|
2275
|
+
false
|
|
2187
2276
|
],
|
|
2188
2277
|
"type": "state"
|
|
2189
2278
|
}
|
|
@@ -2336,7 +2425,8 @@
|
|
|
2336
2425
|
"expanded": {
|
|
2337
2426
|
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
2338
2427
|
"values": [
|
|
2339
|
-
true
|
|
2428
|
+
true,
|
|
2429
|
+
false
|
|
2340
2430
|
],
|
|
2341
2431
|
"type": "state"
|
|
2342
2432
|
},
|
|
@@ -2433,7 +2523,8 @@
|
|
|
2433
2523
|
"expanded": {
|
|
2434
2524
|
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
2435
2525
|
"values": [
|
|
2436
|
-
true
|
|
2526
|
+
true,
|
|
2527
|
+
false
|
|
2437
2528
|
],
|
|
2438
2529
|
"type": "state"
|
|
2439
2530
|
},
|
|
@@ -2886,7 +2977,8 @@
|
|
|
2886
2977
|
"expanded": {
|
|
2887
2978
|
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
2888
2979
|
"values": [
|
|
2889
|
-
true
|
|
2980
|
+
true,
|
|
2981
|
+
false
|
|
2890
2982
|
],
|
|
2891
2983
|
"type": "state"
|
|
2892
2984
|
},
|
|
@@ -2917,7 +3009,8 @@
|
|
|
2917
3009
|
"expanded": {
|
|
2918
3010
|
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
2919
3011
|
"values": [
|
|
2920
|
-
true
|
|
3012
|
+
true,
|
|
3013
|
+
false
|
|
2921
3014
|
],
|
|
2922
3015
|
"type": "state"
|
|
2923
3016
|
}
|
|
@@ -3099,7 +3192,8 @@
|
|
|
3099
3192
|
"expanded": {
|
|
3100
3193
|
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
3101
3194
|
"values": [
|
|
3102
|
-
true
|
|
3195
|
+
true,
|
|
3196
|
+
false
|
|
3103
3197
|
],
|
|
3104
3198
|
"type": "state"
|
|
3105
3199
|
}
|
|
@@ -3262,9 +3356,11 @@
|
|
|
3262
3356
|
},
|
|
3263
3357
|
"border": {
|
|
3264
3358
|
"default": 0,
|
|
3265
|
-
"nullable":
|
|
3359
|
+
"nullable": true,
|
|
3360
|
+
"type": "undefined|null",
|
|
3266
3361
|
"values": {
|
|
3267
|
-
"zero": 0
|
|
3362
|
+
"zero": 0,
|
|
3363
|
+
"none": null
|
|
3268
3364
|
}
|
|
3269
3365
|
},
|
|
3270
3366
|
"color": {
|
|
@@ -3281,6 +3377,7 @@
|
|
|
3281
3377
|
"nullable": true,
|
|
3282
3378
|
"type": "undefined|null",
|
|
3283
3379
|
"values": {
|
|
3380
|
+
"none": null,
|
|
3284
3381
|
"zero": 0,
|
|
3285
3382
|
"round": 99999999999999
|
|
3286
3383
|
}
|
|
@@ -6232,6 +6329,14 @@
|
|
|
6232
6329
|
"icon": "icon",
|
|
6233
6330
|
"backgroundColor": "color",
|
|
6234
6331
|
"borderRadius": "radius",
|
|
6332
|
+
"borderTopLeftRadius": "radius",
|
|
6333
|
+
"borderTopRightRadius": "radius",
|
|
6334
|
+
"borderBottomLeftRadius": "radius",
|
|
6335
|
+
"borderBottomRightRadius": "radius",
|
|
6336
|
+
"borderTopWidth": "border",
|
|
6337
|
+
"borderBottomWidth": "border",
|
|
6338
|
+
"borderLeftWidth": "border",
|
|
6339
|
+
"borderRightWidth": "border",
|
|
6235
6340
|
"borderColor": "color",
|
|
6236
6341
|
"borderWidth": "border",
|
|
6237
6342
|
"outerBorderWidth": "border",
|
|
@@ -6253,7 +6358,7 @@
|
|
|
6253
6358
|
"type": {
|
|
6254
6359
|
"name": "elementType"
|
|
6255
6360
|
},
|
|
6256
|
-
"required":
|
|
6361
|
+
"required": false,
|
|
6257
6362
|
"description": "Defines the icon to be rendered"
|
|
6258
6363
|
},
|
|
6259
6364
|
"href": {
|
|
@@ -10885,6 +10990,7 @@
|
|
|
10885
10990
|
"name": "custom",
|
|
10886
10991
|
"raw": {
|
|
10887
10992
|
"outerBorderColor": "color",
|
|
10993
|
+
"backgroundColor": "color",
|
|
10888
10994
|
"outerBorderWidth": "border",
|
|
10889
10995
|
"outerBorderGap": "size",
|
|
10890
10996
|
"borderRadius": "radius",
|
|
@@ -12315,15 +12421,7 @@
|
|
|
12315
12421
|
"showPanelTabs": "show",
|
|
12316
12422
|
"spaceBetweenSlideAndPreviousNextNavigation": "size",
|
|
12317
12423
|
"spaceBetweenSlideAndPanelNavigation": "size",
|
|
12318
|
-
"
|
|
12319
|
-
"thumbnailBorderRadius": "radius",
|
|
12320
|
-
"thumbnailBorderWidth": "border",
|
|
12321
|
-
"thumbnailContainerPaddingTop": "size",
|
|
12322
|
-
"thumbnailMargin": "size",
|
|
12323
|
-
"thumbnailPadding": "size",
|
|
12324
|
-
"thumbnailSelectedBorderColor": "color",
|
|
12325
|
-
"thumbnailSelectedBorderWidth": "border",
|
|
12326
|
-
"thumbnailSize": "size"
|
|
12424
|
+
"stepTrackerCurrentBackgroundColor": "color"
|
|
12327
12425
|
}
|
|
12328
12426
|
},
|
|
12329
12427
|
"required": false,
|
|
@@ -12684,15 +12782,7 @@
|
|
|
12684
12782
|
"showPanelTabs": "show",
|
|
12685
12783
|
"spaceBetweenSlideAndPreviousNextNavigation": "size",
|
|
12686
12784
|
"spaceBetweenSlideAndPanelNavigation": "size",
|
|
12687
|
-
"
|
|
12688
|
-
"thumbnailBorderRadius": "radius",
|
|
12689
|
-
"thumbnailBorderWidth": "border",
|
|
12690
|
-
"thumbnailContainerPaddingTop": "size",
|
|
12691
|
-
"thumbnailMargin": "size",
|
|
12692
|
-
"thumbnailPadding": "size",
|
|
12693
|
-
"thumbnailSelectedBorderColor": "color",
|
|
12694
|
-
"thumbnailSelectedBorderWidth": "border",
|
|
12695
|
-
"thumbnailSize": "size"
|
|
12785
|
+
"stepTrackerCurrentBackgroundColor": "color"
|
|
12696
12786
|
}
|
|
12697
12787
|
},
|
|
12698
12788
|
"required": false,
|
|
@@ -13098,15 +13188,7 @@
|
|
|
13098
13188
|
"showPanelTabs": "show",
|
|
13099
13189
|
"spaceBetweenSlideAndPreviousNextNavigation": "size",
|
|
13100
13190
|
"spaceBetweenSlideAndPanelNavigation": "size",
|
|
13101
|
-
"
|
|
13102
|
-
"thumbnailBorderRadius": "radius",
|
|
13103
|
-
"thumbnailBorderWidth": "border",
|
|
13104
|
-
"thumbnailContainerPaddingTop": "size",
|
|
13105
|
-
"thumbnailMargin": "size",
|
|
13106
|
-
"thumbnailPadding": "size",
|
|
13107
|
-
"thumbnailSelectedBorderColor": "color",
|
|
13108
|
-
"thumbnailSelectedBorderWidth": "border",
|
|
13109
|
-
"thumbnailSize": "size"
|
|
13191
|
+
"stepTrackerCurrentBackgroundColor": "color"
|
|
13110
13192
|
}
|
|
13111
13193
|
},
|
|
13112
13194
|
"required": false,
|
|
@@ -27,7 +27,10 @@ const CarouselStepTracker = _ref => {
|
|
|
27
27
|
activeIndex,
|
|
28
28
|
totalItems,
|
|
29
29
|
getCopyWithPlaceholders,
|
|
30
|
-
themeTokens
|
|
30
|
+
themeTokens: {
|
|
31
|
+
stepTrackerCurrentBackgroundColor,
|
|
32
|
+
...themeTokens
|
|
33
|
+
}
|
|
31
34
|
} = (0, _CarouselContext.useCarousel)();
|
|
32
35
|
const stackViewTokens = {
|
|
33
36
|
justifyContent: 'center'
|
|
@@ -35,7 +38,8 @@ const CarouselStepTracker = _ref => {
|
|
|
35
38
|
const stepTrackerTokens = {
|
|
36
39
|
showStepLabel: false,
|
|
37
40
|
showStepTrackerLabel: true,
|
|
38
|
-
|
|
41
|
+
// TODO: StepTracker 'isComplete'/'isCurrent' is incorrect, see line StepTracker/Step.jsx line 63, refactor incorrect values and remove this
|
|
42
|
+
knobCompletedBackgroundColor: stepTrackerCurrentBackgroundColor ?? 'none',
|
|
39
43
|
connectorCompletedColor: 'none',
|
|
40
44
|
connectorColor: 'none',
|
|
41
45
|
containerPaddingTop: themeTokens.spaceBetweenSlideAndPanelNavigation
|
|
@@ -39,19 +39,20 @@ const CarouselTabsPanel = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
39
39
|
} = (0, _CarouselContext.useCarousel)();
|
|
40
40
|
const nextFocusRef = (0, _react.useRef)();
|
|
41
41
|
const firstTabRef = (0, _react.useRef)();
|
|
42
|
-
const [isInverse, setIsInverse] = (0, _react.useState)(false);
|
|
43
|
-
// For now, this picks an Allium variant, and does nothing in brands that lack it.
|
|
44
|
-
// See similar comment in Carousel and https://github.com/telus/universal-design-system/issues/1549
|
|
45
|
-
|
|
46
|
-
const dividerVariant = {
|
|
47
|
-
decorative: true
|
|
48
|
-
};
|
|
42
|
+
const [isInverse, setIsInverse] = (0, _react.useState)(false);
|
|
49
43
|
const lastTabSelected = activeIndex === items.length - 1; // Get current select tab style
|
|
50
44
|
|
|
51
45
|
(0, _react.useEffect)(() => {
|
|
52
46
|
const [selectedVariantIsInverse] = items.filter((_, index) => index === activeIndex);
|
|
53
47
|
setIsInverse(selectedVariantIsInverse === null || selectedVariantIsInverse === void 0 ? void 0 : selectedVariantIsInverse.inverse);
|
|
54
|
-
}, [items, activeIndex]);
|
|
48
|
+
}, [items, activeIndex]); // TODO: figure out a better cross-brand way to specify subcomponent variants.
|
|
49
|
+
// For now, this picks an Allium variant, and does nothing in brands that lack it.
|
|
50
|
+
// See similar comment in Carousel and https://github.com/telus/universal-design-system/issues/1549
|
|
51
|
+
|
|
52
|
+
const dividerVariant = {
|
|
53
|
+
decorative: true,
|
|
54
|
+
inverse: isInverse
|
|
55
|
+
};
|
|
55
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
56
57
|
style: selectTabPanelStyle(),
|
|
57
58
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_StackView.default, {
|
|
@@ -15,29 +15,52 @@ var _Image = _interopRequireDefault(require("react-native-web/dist/cjs/exports/I
|
|
|
15
15
|
|
|
16
16
|
var _CarouselContext = require("./CarouselContext");
|
|
17
17
|
|
|
18
|
+
var _ThemeProvider = require("../ThemeProvider");
|
|
19
|
+
|
|
20
|
+
var _ViewportProvider = require("../ViewportProvider");
|
|
21
|
+
|
|
18
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
25
|
|
|
26
|
+
const selectPressableTokens = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
borderColor,
|
|
29
|
+
borderRadius,
|
|
30
|
+
borderWidth,
|
|
31
|
+
margin,
|
|
32
|
+
padding
|
|
33
|
+
} = _ref;
|
|
34
|
+
return {
|
|
35
|
+
borderColor,
|
|
36
|
+
borderRadius,
|
|
37
|
+
borderWidth,
|
|
38
|
+
margin,
|
|
39
|
+
padding
|
|
40
|
+
};
|
|
41
|
+
};
|
|
22
42
|
/**
|
|
23
43
|
* `Carousel.Thumbnail` is used to wrap the content of an individual slide and is suppsoed to be the
|
|
24
44
|
* only top-level component passed to the `Carousel`
|
|
25
45
|
*/
|
|
26
|
-
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
const CarouselThumbnail = _ref2 => {
|
|
27
49
|
let {
|
|
28
50
|
accessibilityLabel,
|
|
29
51
|
alt,
|
|
30
52
|
index,
|
|
31
53
|
src
|
|
32
|
-
} =
|
|
54
|
+
} = _ref2;
|
|
33
55
|
const {
|
|
34
56
|
activeIndex,
|
|
35
57
|
itemLabel,
|
|
36
58
|
totalItems,
|
|
37
59
|
getCopyWithPlaceholders,
|
|
38
|
-
goTo
|
|
39
|
-
themeTokens
|
|
60
|
+
goTo
|
|
40
61
|
} = (0, _CarouselContext.useCarousel)();
|
|
62
|
+
const getThumbnailTokens = (0, _ThemeProvider.useThemeTokensCallback)('CarouselThumbnail');
|
|
63
|
+
const viewport = (0, _ViewportProvider.useViewport)();
|
|
41
64
|
const thumbnailTitle = alt ?? getCopyWithPlaceholders('stepTrackerLabel').replace(/%\{itemLabel\}/g, itemLabel).replace(/%\{stepNumber\}/g, index).replace(/%\{stepCount\}/g, totalItems);
|
|
42
65
|
|
|
43
66
|
const handlePress = () => goTo(index);
|
|
@@ -48,37 +71,41 @@ const CarouselThumbnail = _ref => {
|
|
|
48
71
|
};
|
|
49
72
|
|
|
50
73
|
const {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} = themeTokens;
|
|
74
|
+
borderWidth,
|
|
75
|
+
padding,
|
|
76
|
+
selectedBorderColor,
|
|
77
|
+
selectedBorderWidth,
|
|
78
|
+
size
|
|
79
|
+
} = getThumbnailTokens({
|
|
80
|
+
viewport
|
|
81
|
+
});
|
|
60
82
|
const styles = {
|
|
61
|
-
pressable: {
|
|
62
|
-
borderColor: thumbnailBorderColor,
|
|
63
|
-
borderRadius: thumbnailBorderRadius,
|
|
64
|
-
borderWidth: thumbnailBorderWidth,
|
|
65
|
-
margin: thumbnailMargin,
|
|
66
|
-
padding: thumbnailPadding
|
|
67
|
-
},
|
|
68
83
|
image: {
|
|
69
|
-
height:
|
|
70
|
-
width:
|
|
84
|
+
height: size,
|
|
85
|
+
width: size
|
|
71
86
|
},
|
|
72
87
|
selected: {
|
|
73
|
-
borderColor:
|
|
74
|
-
borderWidth:
|
|
75
|
-
padding:
|
|
88
|
+
borderColor: selectedBorderColor,
|
|
89
|
+
borderWidth: selectedBorderWidth,
|
|
90
|
+
padding: padding - selectedBorderWidth + borderWidth
|
|
76
91
|
}
|
|
77
92
|
};
|
|
78
93
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Pressable.default, {
|
|
79
94
|
onKeyDown: handleKeyDown,
|
|
80
95
|
onPress: handlePress,
|
|
81
|
-
style:
|
|
96
|
+
style: _ref3 => {
|
|
97
|
+
let {
|
|
98
|
+
hovered,
|
|
99
|
+
pressed,
|
|
100
|
+
focused
|
|
101
|
+
} = _ref3;
|
|
102
|
+
const pressableStyles = selectPressableTokens(getThumbnailTokens({
|
|
103
|
+
hover: hovered,
|
|
104
|
+
pressed,
|
|
105
|
+
focus: focused
|
|
106
|
+
}));
|
|
107
|
+
return [pressableStyles, index === activeIndex && styles.selected];
|
|
108
|
+
},
|
|
82
109
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
|
|
83
110
|
accessibilityIgnoresInvertColors: true,
|
|
84
111
|
accessibilityLabel: accessibilityLabel ?? alt,
|
|
@@ -17,6 +17,10 @@ var _CarouselThumbnail = _interopRequireDefault(require("./CarouselThumbnail"));
|
|
|
17
17
|
|
|
18
18
|
var _StackView = require("../StackView");
|
|
19
19
|
|
|
20
|
+
var _ThemeProvider = require("../ThemeProvider");
|
|
21
|
+
|
|
22
|
+
var _ViewportProvider = require("../ViewportProvider");
|
|
23
|
+
|
|
20
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
25
|
|
|
22
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -29,9 +33,14 @@ const CarouselThumbnailNavigation = /*#__PURE__*/(0, _react.forwardRef)((_ref, r
|
|
|
29
33
|
let {
|
|
30
34
|
thumbnails = []
|
|
31
35
|
} = _ref;
|
|
36
|
+
const viewport = (0, _ViewportProvider.useViewport)();
|
|
37
|
+
const {
|
|
38
|
+
alignItems
|
|
39
|
+
} = (0, _ThemeProvider.useThemeTokens)('CarouselThumbnail', {}, {
|
|
40
|
+
viewport
|
|
41
|
+
});
|
|
32
42
|
const {
|
|
33
|
-
totalItems
|
|
34
|
-
themeTokens
|
|
43
|
+
totalItems
|
|
35
44
|
} = (0, _CarouselContext.useCarousel)();
|
|
36
45
|
|
|
37
46
|
if (thumbnails.length !== totalItems) {
|
|
@@ -39,15 +48,15 @@ const CarouselThumbnailNavigation = /*#__PURE__*/(0, _react.forwardRef)((_ref, r
|
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
const {
|
|
42
|
-
thumbnailContainerPaddingTop,
|
|
43
|
-
thumbnailMargin
|
|
44
|
-
} =
|
|
51
|
+
containerPaddingTop: thumbnailContainerPaddingTop,
|
|
52
|
+
margin: thumbnailMargin
|
|
53
|
+
} = (0, _ThemeProvider.useThemeTokens)('CarouselThumbnail');
|
|
45
54
|
const stackWrapTokens = {
|
|
46
55
|
justifyContent: 'flex-start'
|
|
47
56
|
};
|
|
48
57
|
const containerStyles = {
|
|
49
58
|
justifyContent: 'center',
|
|
50
|
-
alignItems
|
|
59
|
+
alignItems,
|
|
51
60
|
paddingTop: thumbnailContainerPaddingTop - thumbnailMargin
|
|
52
61
|
};
|
|
53
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|