@telus-uds/components-base 1.37.0 → 1.39.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 +24 -2
- package/component-docs.json +289 -19
- package/lib/ActivityIndicator/Spinner.js +1 -0
- package/lib/Button/Button.js +8 -1
- package/lib/Button/ButtonLink.js +8 -1
- package/lib/Link/ChevronLink.js +5 -2
- package/lib/Link/LinkBase.js +3 -8
- package/lib/List/ListItem.js +3 -10
- package/lib/List/ListItemBase.js +25 -4
- package/lib/index.js +7 -0
- package/lib-module/ActivityIndicator/Spinner.js +1 -0
- package/lib-module/Button/Button.js +7 -1
- package/lib-module/Button/ButtonLink.js +7 -1
- package/lib-module/Link/ChevronLink.js +5 -2
- package/lib-module/Link/LinkBase.js +3 -8
- package/lib-module/List/ListItem.js +3 -10
- package/lib-module/List/ListItemBase.js +24 -5
- package/lib-module/index.js +1 -1
- package/package.json +2 -2
- package/src/ActivityIndicator/Spinner.jsx +1 -0
- package/src/Button/Button.jsx +4 -1
- package/src/Button/ButtonLink.jsx +4 -1
- package/src/Link/ChevronLink.jsx +14 -4
- package/src/Link/LinkBase.jsx +2 -3
- package/src/List/ListItem.jsx +1 -3
- package/src/List/ListItemBase.jsx +20 -4
- package/src/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon,
|
|
3
|
+
This log was last generated on Mon, 01 May 2023 22:02:12 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.39.0
|
|
8
|
+
|
|
9
|
+
Mon, 01 May 2023 22:02:12 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- added adjustments to IconText (kyle.king2@telus.com)
|
|
14
|
+
- list component standardization (akshay.pandey1@telus.com)
|
|
15
|
+
- Bump @telus-uds/system-theme-tokens to v2.24.0
|
|
16
|
+
|
|
17
|
+
## 1.38.0
|
|
18
|
+
|
|
19
|
+
Thu, 27 Apr 2023 14:41:57 GMT
|
|
20
|
+
|
|
21
|
+
### Minor changes
|
|
22
|
+
|
|
23
|
+
- add a new button variant to support responsive width across the different viewports (guillermo.peitzner@telus.com)
|
|
24
|
+
- export use theme call back (mauricio.batresmontejo@telus.com)
|
|
25
|
+
- standarization of activity indicator (ignacio.cuyun@telus.com)
|
|
26
|
+
- conditionally render Icon based on it being defined (kyle.king2@telus.com)
|
|
27
|
+
- Bump @telus-uds/system-theme-tokens to v2.23.0
|
|
28
|
+
|
|
7
29
|
## 1.37.0
|
|
8
30
|
|
|
9
|
-
Mon, 24 Apr 2023 21:
|
|
31
|
+
Mon, 24 Apr 2023 21:42:02 GMT
|
|
10
32
|
|
|
11
33
|
### Minor changes
|
|
12
34
|
|
package/component-docs.json
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": {
|
|
3
3
|
"components": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
4
|
+
"SplashButton": {
|
|
5
|
+
"playIcon": "icon",
|
|
6
|
+
"playIconColor": "color",
|
|
7
|
+
"buttonContentBackground": "color",
|
|
8
|
+
"buttonContentChildrenBackground": "color"
|
|
9
|
+
},
|
|
10
|
+
"SplashButtonWithDetails": {
|
|
11
|
+
"playIcon": "icon",
|
|
12
|
+
"playIconColor": "color",
|
|
13
|
+
"buttonContentBackground": "color",
|
|
14
|
+
"buttonContentChildrenBackground": "color",
|
|
15
|
+
"buttonBackground": "color",
|
|
16
|
+
"buttonBorderColor": "color",
|
|
17
|
+
"buttonRadius": "radius",
|
|
18
|
+
"buttonLeftPosition": "size",
|
|
19
|
+
"buttonBottomPosition": "size",
|
|
20
|
+
"buttonMinHeight": "size",
|
|
21
|
+
"buttonPaddingLeft": "size",
|
|
22
|
+
"buttonPaddingRight": "size",
|
|
23
|
+
"detailsContainerPadding": "size",
|
|
24
|
+
"playIconContainerBackground": "color"
|
|
21
25
|
},
|
|
22
26
|
"Table": {
|
|
23
27
|
"tablePaddingBottom": "size",
|
|
@@ -41,6 +45,69 @@
|
|
|
41
45
|
"size": "size",
|
|
42
46
|
"thickness": "border"
|
|
43
47
|
},
|
|
48
|
+
"Video": {
|
|
49
|
+
"borderColor": "color",
|
|
50
|
+
"pauseIcon": "icon",
|
|
51
|
+
"replayIcon": "icon",
|
|
52
|
+
"playIcon": "icon"
|
|
53
|
+
},
|
|
54
|
+
"VideoMiddleControlButton": {
|
|
55
|
+
"width": "size",
|
|
56
|
+
"height": "size",
|
|
57
|
+
"background": "color",
|
|
58
|
+
"iconColor": "color"
|
|
59
|
+
},
|
|
60
|
+
"VideoControlBar": {
|
|
61
|
+
"paddingTop": "size",
|
|
62
|
+
"paddingBottom": "size",
|
|
63
|
+
"paddingLeft": "size",
|
|
64
|
+
"paddingRight": "size",
|
|
65
|
+
"paddingLeftCompactMode": "size",
|
|
66
|
+
"paddingRightCompactMode": "size",
|
|
67
|
+
"menuBottom": "size",
|
|
68
|
+
"menuRight": "size",
|
|
69
|
+
"menuMarginLeft": "size",
|
|
70
|
+
"captionsIcon": "icon",
|
|
71
|
+
"settingsIcon": "icon",
|
|
72
|
+
"minimizeIcon": "icon",
|
|
73
|
+
"maximizeIcon": "icon"
|
|
74
|
+
},
|
|
75
|
+
"VideoButton": {
|
|
76
|
+
"color": "color"
|
|
77
|
+
},
|
|
78
|
+
"VideoMenu": {
|
|
79
|
+
"padding": "size",
|
|
80
|
+
"background": "color",
|
|
81
|
+
"checkMarkWidth": "size",
|
|
82
|
+
"checkMarkHeight": "size",
|
|
83
|
+
"checkMarkSelectedColor": "color",
|
|
84
|
+
"checkMarkHoverColor": "color",
|
|
85
|
+
"checkMarkFocusColor": "color",
|
|
86
|
+
"checkMarkUnselectedColor": "color",
|
|
87
|
+
"checkMarkIcon": "icon"
|
|
88
|
+
},
|
|
89
|
+
"VideoProgressBar": {
|
|
90
|
+
"thumbHeight": "size",
|
|
91
|
+
"thumbWidth": "size",
|
|
92
|
+
"thumbBackground": "color",
|
|
93
|
+
"timestampMarginLeft": "size",
|
|
94
|
+
"timestampMarginRight": "size",
|
|
95
|
+
"trackGradientStart": "color",
|
|
96
|
+
"trackGradientEnd": "color",
|
|
97
|
+
"rangeBackground": "color"
|
|
98
|
+
},
|
|
99
|
+
"VideoVolumeSlider": {
|
|
100
|
+
"marginLeft": "size",
|
|
101
|
+
"marginRight": "size",
|
|
102
|
+
"thumbHeight": "size",
|
|
103
|
+
"thumbWidth": "size",
|
|
104
|
+
"thumbBackground": "color",
|
|
105
|
+
"trackGradientStart": "color",
|
|
106
|
+
"trackGradientEnd": "color",
|
|
107
|
+
"rangeBackground": "color",
|
|
108
|
+
"mutedIcon": "icon",
|
|
109
|
+
"unmutedIcon": "icon"
|
|
110
|
+
},
|
|
44
111
|
"Callout": {
|
|
45
112
|
"background": "color",
|
|
46
113
|
"gap": "size",
|
|
@@ -61,6 +128,19 @@
|
|
|
61
128
|
"itemBorderColor": "color",
|
|
62
129
|
"itemPadding": "size"
|
|
63
130
|
},
|
|
131
|
+
"QuantitySelector": {
|
|
132
|
+
"leftIcon": "icon",
|
|
133
|
+
"rightIcon": "icon",
|
|
134
|
+
"iconSize": "size",
|
|
135
|
+
"borderColor": "color",
|
|
136
|
+
"inputBorderColor": "color",
|
|
137
|
+
"inputBackgroundColor": "color",
|
|
138
|
+
"inputBorderWidth": "size",
|
|
139
|
+
"padding": "size",
|
|
140
|
+
"backgroundColor": "color",
|
|
141
|
+
"textColor": "color",
|
|
142
|
+
"iconColor": "color"
|
|
143
|
+
},
|
|
64
144
|
"Footnote": {
|
|
65
145
|
"footnoteBackground": "color",
|
|
66
146
|
"footnoteBorderTopSizeMd": "border",
|
|
@@ -334,7 +414,7 @@
|
|
|
334
414
|
"labelMarginLeft": "size"
|
|
335
415
|
},
|
|
336
416
|
"ChevronLink": {
|
|
337
|
-
"
|
|
417
|
+
"fontSize": "fontSize",
|
|
338
418
|
"textLineHeight": "lineHeight",
|
|
339
419
|
"color": "color",
|
|
340
420
|
"outerBorderColor": "color",
|
|
@@ -1089,6 +1169,26 @@
|
|
|
1089
1169
|
"paddingVertical": "size",
|
|
1090
1170
|
"borderRadius": "radius"
|
|
1091
1171
|
},
|
|
1172
|
+
"StoryCard": {
|
|
1173
|
+
"outerBorderColor": "color",
|
|
1174
|
+
"outerBorderGap": "size",
|
|
1175
|
+
"outerBorderWidth": "border",
|
|
1176
|
+
"flex": "integer",
|
|
1177
|
+
"backgroundColor": "color",
|
|
1178
|
+
"borderColor": "color",
|
|
1179
|
+
"borderRadius": "radius",
|
|
1180
|
+
"borderWidth": "border",
|
|
1181
|
+
"paddingBottom": "size",
|
|
1182
|
+
"paddingLeft": "size",
|
|
1183
|
+
"paddingRight": "size",
|
|
1184
|
+
"paddingTop": "size",
|
|
1185
|
+
"minWidth": "size",
|
|
1186
|
+
"shadow": "shadow",
|
|
1187
|
+
"contentAlignItems": "flexAlign",
|
|
1188
|
+
"contentJustifyContent": "flexJustifyContent",
|
|
1189
|
+
"contentFlexGrow": "integer",
|
|
1190
|
+
"contentFlexShrink": "integer"
|
|
1191
|
+
},
|
|
1092
1192
|
"Tabs": {
|
|
1093
1193
|
"nextIcon": "icon",
|
|
1094
1194
|
"previousIcon": "icon",
|
|
@@ -1166,6 +1266,55 @@
|
|
|
1166
1266
|
"outerBorderGap": "size",
|
|
1167
1267
|
"outerBackgroundColor": "color"
|
|
1168
1268
|
},
|
|
1269
|
+
"Testimonial": {
|
|
1270
|
+
"testimonialContainerGap": "size",
|
|
1271
|
+
"quoteContainerGap": "size",
|
|
1272
|
+
"iconColor": "color",
|
|
1273
|
+
"dividerBorder": "border",
|
|
1274
|
+
"dividerBackgroundColor": "color",
|
|
1275
|
+
"figcaptionGap": "size",
|
|
1276
|
+
"textColor": "color",
|
|
1277
|
+
"imageSize": "size",
|
|
1278
|
+
"icon": "icon"
|
|
1279
|
+
},
|
|
1280
|
+
"TermsAndConditions": {
|
|
1281
|
+
"contentPaddingBottom": "size",
|
|
1282
|
+
"contentPaddingLeft": "size",
|
|
1283
|
+
"mdContentPaddingBottom": "size",
|
|
1284
|
+
"mdContentPaddingLeft": "size",
|
|
1285
|
+
"orderedPadding": "size",
|
|
1286
|
+
"unorderedPadding": "size",
|
|
1287
|
+
"listFontName": "fontName",
|
|
1288
|
+
"listFontWeight": "fontWeight",
|
|
1289
|
+
"listFontSize": "fontSize",
|
|
1290
|
+
"listLineHeight": "lineHeight",
|
|
1291
|
+
"listColor": "color",
|
|
1292
|
+
"listMarginBottom": "size",
|
|
1293
|
+
"listMarginLeft": "size",
|
|
1294
|
+
"titleColor": "color",
|
|
1295
|
+
"titleFontSize": "fontSize",
|
|
1296
|
+
"titleLineHeight": "lineHeight",
|
|
1297
|
+
"titlePaddingLeft": "size",
|
|
1298
|
+
"expandIconContainerBorder": "border",
|
|
1299
|
+
"expandIconContainerBorderColor": "color",
|
|
1300
|
+
"expandIconContainerHeight": "size",
|
|
1301
|
+
"expandIconContainerMarginX": "size",
|
|
1302
|
+
"expandIconContainerMarginY": "size",
|
|
1303
|
+
"expandIconContainerWidth": "size",
|
|
1304
|
+
"expandIconContainerAlignItems": "flexAlign",
|
|
1305
|
+
"expandIconContainerJustifyContent": "flexJustifyContent",
|
|
1306
|
+
"expandTitleColor": "color",
|
|
1307
|
+
"expandTitleFontSize": "size",
|
|
1308
|
+
"expandTitleLineHeight": "lineHeight",
|
|
1309
|
+
"expandTitleMarginX": "size",
|
|
1310
|
+
"expandTitleMarginY": "size",
|
|
1311
|
+
"expandBaseBorderWidth": "border",
|
|
1312
|
+
"expandContentPaddingBottom": "size",
|
|
1313
|
+
"expandContentPaddingLeft": "size",
|
|
1314
|
+
"expandContentPaddingRight": "size",
|
|
1315
|
+
"expandContentPaddingTop": "size",
|
|
1316
|
+
"icon": "icon"
|
|
1317
|
+
},
|
|
1169
1318
|
"TextArea": {
|
|
1170
1319
|
"minLines": "integer",
|
|
1171
1320
|
"maxLines": "integer"
|
|
@@ -1197,6 +1346,22 @@
|
|
|
1197
1346
|
"iconSize": "size",
|
|
1198
1347
|
"iconColor": "color"
|
|
1199
1348
|
},
|
|
1349
|
+
"Toast": {
|
|
1350
|
+
"containerBackgroundColor": "color",
|
|
1351
|
+
"containerGap": "size",
|
|
1352
|
+
"animationHeightBefore": "size",
|
|
1353
|
+
"animationHeightAfter": "size",
|
|
1354
|
+
"animationPaddingBottomBefore": "size",
|
|
1355
|
+
"animationPaddingBottomAfter": "size",
|
|
1356
|
+
"animationPaddingTopBefore": "size",
|
|
1357
|
+
"animationPaddingTopAfter": "size",
|
|
1358
|
+
"animationBackgroundColorBefore": "color",
|
|
1359
|
+
"animationBackgroundColorAfter": "color",
|
|
1360
|
+
"animationColorBefore": "color",
|
|
1361
|
+
"animationColorAfter": "color",
|
|
1362
|
+
"animationDivColorBefore": "color",
|
|
1363
|
+
"animationDivColorAfter": "color"
|
|
1364
|
+
},
|
|
1200
1365
|
"ToggleSwitch": {
|
|
1201
1366
|
"borderColor": "color",
|
|
1202
1367
|
"borderWidth": "border",
|
|
@@ -1304,6 +1469,22 @@
|
|
|
1304
1469
|
"fontScaleCap": "fontSize",
|
|
1305
1470
|
"letterSpacing": "letterSpacing"
|
|
1306
1471
|
},
|
|
1472
|
+
"Countdown": {
|
|
1473
|
+
"containerBorderRadius": "radius",
|
|
1474
|
+
"containerGradient": "gradient",
|
|
1475
|
+
"containerInverseBorder": "border",
|
|
1476
|
+
"containerInverseBorderColor": "color",
|
|
1477
|
+
"containerPaddingBottomTop": "size",
|
|
1478
|
+
"containerPaddingLeftRight": "size",
|
|
1479
|
+
"inverseBorderColor": "color",
|
|
1480
|
+
"labelBorderColor": "color",
|
|
1481
|
+
"textFontSize": "fontSize",
|
|
1482
|
+
"textLineHeight": "lineHeight",
|
|
1483
|
+
"labelFontSize": "fontSize",
|
|
1484
|
+
"labelLineHeight": "lineHeight",
|
|
1485
|
+
"textTimerFontWeight": "fontWeight",
|
|
1486
|
+
"textTimerFontName": "fontName"
|
|
1487
|
+
},
|
|
1307
1488
|
"Skeleton": {
|
|
1308
1489
|
"color": "color",
|
|
1309
1490
|
"size": "size",
|
|
@@ -1328,6 +1509,18 @@
|
|
|
1328
1509
|
"type": "state"
|
|
1329
1510
|
}
|
|
1330
1511
|
},
|
|
1512
|
+
"SplashButton": {
|
|
1513
|
+
"hover": {
|
|
1514
|
+
"description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
|
|
1515
|
+
"values": [
|
|
1516
|
+
true
|
|
1517
|
+
],
|
|
1518
|
+
"type": "state",
|
|
1519
|
+
"platforms": [
|
|
1520
|
+
"rn"
|
|
1521
|
+
]
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1331
1524
|
"Button": {
|
|
1332
1525
|
"focus": {
|
|
1333
1526
|
"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.",
|
|
@@ -1967,6 +2160,41 @@
|
|
|
1967
2160
|
"type": "state"
|
|
1968
2161
|
}
|
|
1969
2162
|
},
|
|
2163
|
+
"QuantitySelector": {
|
|
2164
|
+
"focus": {
|
|
2165
|
+
"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.",
|
|
2166
|
+
"values": [
|
|
2167
|
+
true
|
|
2168
|
+
],
|
|
2169
|
+
"type": "state",
|
|
2170
|
+
"platforms": [
|
|
2171
|
+
"rn"
|
|
2172
|
+
]
|
|
2173
|
+
},
|
|
2174
|
+
"hover": {
|
|
2175
|
+
"description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
|
|
2176
|
+
"values": [
|
|
2177
|
+
true
|
|
2178
|
+
],
|
|
2179
|
+
"type": "state",
|
|
2180
|
+
"platforms": [
|
|
2181
|
+
"rn"
|
|
2182
|
+
]
|
|
2183
|
+
},
|
|
2184
|
+
"disabled": {
|
|
2185
|
+
"values": [
|
|
2186
|
+
true
|
|
2187
|
+
],
|
|
2188
|
+
"type": "state"
|
|
2189
|
+
},
|
|
2190
|
+
"pressed": {
|
|
2191
|
+
"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.",
|
|
2192
|
+
"values": [
|
|
2193
|
+
true
|
|
2194
|
+
],
|
|
2195
|
+
"type": "state"
|
|
2196
|
+
}
|
|
2197
|
+
},
|
|
1970
2198
|
"Radio": {
|
|
1971
2199
|
"checked": {
|
|
1972
2200
|
"description": "Corresponds to a selected state for a checkbox or radio",
|
|
@@ -2219,6 +2447,35 @@
|
|
|
2219
2447
|
"type": "state"
|
|
2220
2448
|
}
|
|
2221
2449
|
},
|
|
2450
|
+
"StoryCard": {
|
|
2451
|
+
"focus": {
|
|
2452
|
+
"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.",
|
|
2453
|
+
"values": [
|
|
2454
|
+
true
|
|
2455
|
+
],
|
|
2456
|
+
"type": "state",
|
|
2457
|
+
"platforms": [
|
|
2458
|
+
"rn"
|
|
2459
|
+
]
|
|
2460
|
+
},
|
|
2461
|
+
"hover": {
|
|
2462
|
+
"description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
|
|
2463
|
+
"values": [
|
|
2464
|
+
true
|
|
2465
|
+
],
|
|
2466
|
+
"type": "state",
|
|
2467
|
+
"platforms": [
|
|
2468
|
+
"rn"
|
|
2469
|
+
]
|
|
2470
|
+
},
|
|
2471
|
+
"pressed": {
|
|
2472
|
+
"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.",
|
|
2473
|
+
"values": [
|
|
2474
|
+
true
|
|
2475
|
+
],
|
|
2476
|
+
"type": "state"
|
|
2477
|
+
}
|
|
2478
|
+
},
|
|
2222
2479
|
"TabsItem": {
|
|
2223
2480
|
"focus": {
|
|
2224
2481
|
"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.",
|
|
@@ -2332,6 +2589,15 @@
|
|
|
2332
2589
|
"type": "state"
|
|
2333
2590
|
}
|
|
2334
2591
|
},
|
|
2592
|
+
"TermsAndConditions": {
|
|
2593
|
+
"expanded": {
|
|
2594
|
+
"description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
|
|
2595
|
+
"values": [
|
|
2596
|
+
true
|
|
2597
|
+
],
|
|
2598
|
+
"type": "state"
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2335
2601
|
"ToggleSwitch": {
|
|
2336
2602
|
"focus": {
|
|
2337
2603
|
"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.",
|
|
@@ -12542,10 +12808,14 @@
|
|
|
12542
12808
|
"description": ""
|
|
12543
12809
|
},
|
|
12544
12810
|
"tokens": {
|
|
12811
|
+
"defaultValue": {
|
|
12812
|
+
"value": "{}",
|
|
12813
|
+
"computed": false
|
|
12814
|
+
},
|
|
12545
12815
|
"type": {
|
|
12546
12816
|
"name": "custom",
|
|
12547
12817
|
"raw": {
|
|
12548
|
-
"
|
|
12818
|
+
"fontSize": "fontSize",
|
|
12549
12819
|
"textLineHeight": "lineHeight",
|
|
12550
12820
|
"color": "color",
|
|
12551
12821
|
"outerBorderColor": "color",
|
|
@@ -70,6 +70,7 @@ const Spinner = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
70
70
|
r: "20",
|
|
71
71
|
strokeDasharray: reduceMotion ? MAX_SVG_LENGTH : [MIN_SVG_LENGTH, SVG_CIRCUMFERENCE],
|
|
72
72
|
strokeDashoffset: 0,
|
|
73
|
+
vectorEffect: "non-scaling-stroke",
|
|
73
74
|
children: reduceMotion ? null : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
74
75
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("animate", {
|
|
75
76
|
attributeName: "stroke-dashoffset",
|
package/lib/Button/Button.js
CHANGED
|
@@ -15,6 +15,8 @@ var _ThemeProvider = require("../ThemeProvider");
|
|
|
15
15
|
|
|
16
16
|
var _props = require("../utils/props");
|
|
17
17
|
|
|
18
|
+
var _ViewportProvider = require("../ViewportProvider");
|
|
19
|
+
|
|
18
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -30,7 +32,12 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
30
32
|
variant,
|
|
31
33
|
...props
|
|
32
34
|
} = _ref;
|
|
33
|
-
const
|
|
35
|
+
const viewport = (0, _ViewportProvider.useViewport)();
|
|
36
|
+
const buttonVariant = {
|
|
37
|
+
viewport,
|
|
38
|
+
...variant
|
|
39
|
+
};
|
|
40
|
+
const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('Button', tokens, buttonVariant);
|
|
34
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonBase.default, { ...props,
|
|
35
42
|
tokens: getTokens,
|
|
36
43
|
accessibilityRole: accessibilityRole,
|
package/lib/Button/ButtonLink.js
CHANGED
|
@@ -15,6 +15,8 @@ var _props = require("../utils/props");
|
|
|
15
15
|
|
|
16
16
|
var _ThemeProvider = require("../ThemeProvider");
|
|
17
17
|
|
|
18
|
+
var _ViewportProvider = require("../ViewportProvider");
|
|
19
|
+
|
|
18
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -41,7 +43,12 @@ const ButtonLink = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
41
43
|
rest
|
|
42
44
|
} = _props.hrefAttrsProp.bundle(props);
|
|
43
45
|
|
|
44
|
-
const
|
|
46
|
+
const viewport = (0, _ViewportProvider.useViewport)();
|
|
47
|
+
const buttonVariant = {
|
|
48
|
+
viewport,
|
|
49
|
+
...variant
|
|
50
|
+
};
|
|
51
|
+
const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('Button', tokens, buttonVariant);
|
|
45
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonBase.default, {
|
|
46
53
|
ref: ref,
|
|
47
54
|
accessibilityRole: accessibilityRole,
|
package/lib/Link/ChevronLink.js
CHANGED
|
@@ -33,7 +33,7 @@ const ChevronLink = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
33
33
|
let {
|
|
34
34
|
direction = 'right',
|
|
35
35
|
children,
|
|
36
|
-
tokens,
|
|
36
|
+
tokens = {},
|
|
37
37
|
variant,
|
|
38
38
|
dataSet,
|
|
39
39
|
...linkProps
|
|
@@ -47,10 +47,13 @@ const ChevronLink = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
47
47
|
iconDisplace,
|
|
48
48
|
height,
|
|
49
49
|
textLineHeight,
|
|
50
|
+
fontSize,
|
|
50
51
|
...otherTokens
|
|
51
52
|
} = getChevronTokens(linkState);
|
|
52
|
-
|
|
53
|
+
const linkTokens = (0, _utils.selectTokens)('Link', otherTokens);
|
|
54
|
+
return { ...linkTokens,
|
|
53
55
|
height,
|
|
56
|
+
blockFontSize: tokens.fontSize ?? fontSize,
|
|
54
57
|
textLineHeight,
|
|
55
58
|
icon: direction === 'right' ? rightIcon : leftIcon,
|
|
56
59
|
iconTranslateX: iconDisplace * (direction === 'right' ? 1 : -1) || 0
|
package/lib/Link/LinkBase.js
CHANGED
|
@@ -204,15 +204,10 @@ const LinkBase = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
|
|
|
204
204
|
,
|
|
205
205
|
ref: ref,
|
|
206
206
|
style: linkState => {
|
|
207
|
-
const
|
|
208
|
-
height,
|
|
209
|
-
...themeTokens
|
|
210
|
-
} = resolveLinkTokens(linkState);
|
|
207
|
+
const themeTokens = resolveLinkTokens(linkState);
|
|
211
208
|
const outerBorderStyles = selectOuterBorderStyles(themeTokens);
|
|
212
209
|
const decorationStyles = selectDecorationStyles(themeTokens);
|
|
213
|
-
return [
|
|
214
|
-
height
|
|
215
|
-
} : {}, outerBorderStyles, blockLeftStyle, decorationStyles, hasIcon && staticStyles.rowContainer];
|
|
210
|
+
return [outerBorderStyles, blockLeftStyle, decorationStyles, hasIcon && staticStyles.rowContainer];
|
|
216
211
|
},
|
|
217
212
|
children: linkState => {
|
|
218
213
|
const themeTokens = resolveLinkTokens(linkState);
|
|
@@ -278,7 +273,7 @@ const staticStyles = _StyleSheet.default.create({
|
|
|
278
273
|
justifyContent: 'flex-start'
|
|
279
274
|
},
|
|
280
275
|
baseline: {
|
|
281
|
-
alignSelf: '
|
|
276
|
+
alignSelf: 'baseline'
|
|
282
277
|
}
|
|
283
278
|
});
|
|
284
279
|
|
package/lib/List/ListItem.js
CHANGED
|
@@ -9,8 +9,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _ListItemBase = _interopRequireDefault(require("./ListItemBase"));
|
|
11
11
|
|
|
12
|
-
var _Typography = _interopRequireDefault(require("../Typography"));
|
|
13
|
-
|
|
14
12
|
var _ThemeProvider = require("../ThemeProvider");
|
|
15
13
|
|
|
16
14
|
var _utils = require("../utils");
|
|
@@ -35,17 +33,12 @@ const ListItem = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
35
33
|
...listItemProps
|
|
36
34
|
} = _ref;
|
|
37
35
|
const themeTokens = (0, _ThemeProvider.useThemeTokens)('List', tokens, variant);
|
|
38
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemBase.default, {
|
|
39
37
|
tokens: themeTokens,
|
|
40
38
|
ref: ref,
|
|
41
39
|
...listItemProps,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
size: 'h4',
|
|
45
|
-
bold: true
|
|
46
|
-
},
|
|
47
|
-
children: title
|
|
48
|
-
}), children]
|
|
40
|
+
title: title,
|
|
41
|
+
children: children
|
|
49
42
|
});
|
|
50
43
|
});
|
|
51
44
|
ListItem.displayName = 'ListItem';
|
package/lib/List/ListItemBase.js
CHANGED
|
@@ -21,6 +21,8 @@ var _ListItemContent = _interopRequireDefault(require("./ListItemContent"));
|
|
|
21
21
|
|
|
22
22
|
var _ListItemMark = _interopRequireDefault(require("./ListItemMark"));
|
|
23
23
|
|
|
24
|
+
var _Typography = _interopRequireDefault(require("../Typography"));
|
|
25
|
+
|
|
24
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -66,6 +68,7 @@ const ListItemBase = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
66
68
|
iconSize,
|
|
67
69
|
showDivider,
|
|
68
70
|
children,
|
|
71
|
+
title,
|
|
69
72
|
isLastItem,
|
|
70
73
|
accessibilityRole = _Platform.default.select({
|
|
71
74
|
web: 'listitem',
|
|
@@ -105,15 +108,30 @@ const ListItemBase = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
105
108
|
iconColor,
|
|
106
109
|
iconSize,
|
|
107
110
|
isLastItem
|
|
108
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
111
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
112
|
+
style: [{
|
|
113
|
+
flexDirection: 'row',
|
|
114
|
+
flex: 'wrap'
|
|
115
|
+
}, !title && {
|
|
116
|
+
alignItems: 'center'
|
|
117
|
+
}],
|
|
109
118
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemMark.default, {
|
|
110
119
|
tokens: tokens,
|
|
111
120
|
icon: icon,
|
|
112
121
|
iconColor: iconColor,
|
|
113
122
|
iconSize: iconSize
|
|
114
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
115
|
-
|
|
116
|
-
children:
|
|
123
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
124
|
+
style: staticStyles.titleAndContentContainer,
|
|
125
|
+
children: [Boolean(title) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
126
|
+
variant: {
|
|
127
|
+
size: 'h4',
|
|
128
|
+
bold: true
|
|
129
|
+
},
|
|
130
|
+
children: title
|
|
131
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemContent.default, {
|
|
132
|
+
tokens: tokens,
|
|
133
|
+
children: children
|
|
134
|
+
})]
|
|
117
135
|
})]
|
|
118
136
|
})
|
|
119
137
|
});
|
|
@@ -123,6 +141,9 @@ ListItemBase.displayName = 'ListItem';
|
|
|
123
141
|
const staticStyles = _StyleSheet.default.create({
|
|
124
142
|
itemContainer: {
|
|
125
143
|
flexDirection: 'row'
|
|
144
|
+
},
|
|
145
|
+
titleAndContentContainer: {
|
|
146
|
+
flexDirection: 'column'
|
|
126
147
|
}
|
|
127
148
|
});
|
|
128
149
|
|
package/lib/index.js
CHANGED
|
@@ -60,6 +60,7 @@ var _exportNames = {
|
|
|
60
60
|
useTheme: true,
|
|
61
61
|
useSetTheme: true,
|
|
62
62
|
useThemeTokens: true,
|
|
63
|
+
useThemeTokensCallback: true,
|
|
63
64
|
getThemeTokens: true,
|
|
64
65
|
applyOuterBorder: true,
|
|
65
66
|
applyTextStyles: true,
|
|
@@ -426,6 +427,12 @@ Object.defineProperty(exports, "useThemeTokens", {
|
|
|
426
427
|
return _ThemeProvider.useThemeTokens;
|
|
427
428
|
}
|
|
428
429
|
});
|
|
430
|
+
Object.defineProperty(exports, "useThemeTokensCallback", {
|
|
431
|
+
enumerable: true,
|
|
432
|
+
get: function () {
|
|
433
|
+
return _ThemeProvider.useThemeTokensCallback;
|
|
434
|
+
}
|
|
435
|
+
});
|
|
429
436
|
Object.defineProperty(exports, "useViewport", {
|
|
430
437
|
enumerable: true,
|
|
431
438
|
get: function () {
|
|
@@ -57,6 +57,7 @@ const Spinner = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
57
57
|
r: "20",
|
|
58
58
|
strokeDasharray: reduceMotion ? MAX_SVG_LENGTH : [MIN_SVG_LENGTH, SVG_CIRCUMFERENCE],
|
|
59
59
|
strokeDashoffset: 0,
|
|
60
|
+
vectorEffect: "non-scaling-stroke",
|
|
60
61
|
children: reduceMotion ? null : /*#__PURE__*/_jsxs(_Fragment, {
|
|
61
62
|
children: [/*#__PURE__*/_jsx("animate", {
|
|
62
63
|
attributeName: "stroke-dashoffset",
|
|
@@ -3,6 +3,7 @@ import ButtonBase from './ButtonBase';
|
|
|
3
3
|
import buttonPropTypes, { textAndA11yText } from './propTypes';
|
|
4
4
|
import { useThemeTokensCallback } from '../ThemeProvider';
|
|
5
5
|
import { a11yProps } from '../utils/props';
|
|
6
|
+
import { useViewport } from '../ViewportProvider';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
8
9
|
let {
|
|
@@ -11,7 +12,12 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
11
12
|
variant,
|
|
12
13
|
...props
|
|
13
14
|
} = _ref;
|
|
14
|
-
const
|
|
15
|
+
const viewport = useViewport();
|
|
16
|
+
const buttonVariant = {
|
|
17
|
+
viewport,
|
|
18
|
+
...variant
|
|
19
|
+
};
|
|
20
|
+
const getTokens = useThemeTokensCallback('Button', tokens, buttonVariant);
|
|
15
21
|
return /*#__PURE__*/_jsx(ButtonBase, { ...props,
|
|
16
22
|
tokens: getTokens,
|
|
17
23
|
accessibilityRole: accessibilityRole,
|
|
@@ -3,6 +3,7 @@ import ButtonBase from './ButtonBase';
|
|
|
3
3
|
import buttonPropTypes, { textAndA11yText } from './propTypes';
|
|
4
4
|
import { a11yProps, hrefAttrsProp, linkProps } from '../utils/props';
|
|
5
5
|
import { useThemeTokensCallback } from '../ThemeProvider';
|
|
6
|
+
import { useViewport } from '../ViewportProvider';
|
|
6
7
|
/**
|
|
7
8
|
* `ButtonLink` is a component with the semantics and behaviour of a link, but with the visual appearance of a button.
|
|
8
9
|
* ButtonLink is a block-level component and should not be used inline.
|
|
@@ -21,7 +22,12 @@ const ButtonLink = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
21
22
|
hrefAttrs,
|
|
22
23
|
rest
|
|
23
24
|
} = hrefAttrsProp.bundle(props);
|
|
24
|
-
const
|
|
25
|
+
const viewport = useViewport();
|
|
26
|
+
const buttonVariant = {
|
|
27
|
+
viewport,
|
|
28
|
+
...variant
|
|
29
|
+
};
|
|
30
|
+
const getTokens = useThemeTokensCallback('Button', tokens, buttonVariant);
|
|
25
31
|
return /*#__PURE__*/_jsx(ButtonBase, {
|
|
26
32
|
ref: ref,
|
|
27
33
|
accessibilityRole: accessibilityRole,
|
|
@@ -15,7 +15,7 @@ const ChevronLink = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
15
15
|
let {
|
|
16
16
|
direction = 'right',
|
|
17
17
|
children,
|
|
18
|
-
tokens,
|
|
18
|
+
tokens = {},
|
|
19
19
|
variant,
|
|
20
20
|
dataSet,
|
|
21
21
|
...linkProps
|
|
@@ -29,10 +29,13 @@ const ChevronLink = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
29
29
|
iconDisplace,
|
|
30
30
|
height,
|
|
31
31
|
textLineHeight,
|
|
32
|
+
fontSize,
|
|
32
33
|
...otherTokens
|
|
33
34
|
} = getChevronTokens(linkState);
|
|
34
|
-
|
|
35
|
+
const linkTokens = selectTokens('Link', otherTokens);
|
|
36
|
+
return { ...linkTokens,
|
|
35
37
|
height,
|
|
38
|
+
blockFontSize: tokens.fontSize ?? fontSize,
|
|
36
39
|
textLineHeight,
|
|
37
40
|
icon: direction === 'right' ? rightIcon : leftIcon,
|
|
38
41
|
iconTranslateX: iconDisplace * (direction === 'right' ? 1 : -1) || 0
|
|
@@ -176,15 +176,10 @@ const LinkBase = /*#__PURE__*/forwardRef((_ref6, ref) => {
|
|
|
176
176
|
,
|
|
177
177
|
ref: ref,
|
|
178
178
|
style: linkState => {
|
|
179
|
-
const
|
|
180
|
-
height,
|
|
181
|
-
...themeTokens
|
|
182
|
-
} = resolveLinkTokens(linkState);
|
|
179
|
+
const themeTokens = resolveLinkTokens(linkState);
|
|
183
180
|
const outerBorderStyles = selectOuterBorderStyles(themeTokens);
|
|
184
181
|
const decorationStyles = selectDecorationStyles(themeTokens);
|
|
185
|
-
return [
|
|
186
|
-
height
|
|
187
|
-
} : {}, outerBorderStyles, blockLeftStyle, decorationStyles, hasIcon && staticStyles.rowContainer];
|
|
182
|
+
return [outerBorderStyles, blockLeftStyle, decorationStyles, hasIcon && staticStyles.rowContainer];
|
|
188
183
|
},
|
|
189
184
|
children: linkState => {
|
|
190
185
|
const themeTokens = resolveLinkTokens(linkState);
|
|
@@ -249,7 +244,7 @@ const staticStyles = StyleSheet.create({
|
|
|
249
244
|
justifyContent: 'flex-start'
|
|
250
245
|
},
|
|
251
246
|
baseline: {
|
|
252
|
-
alignSelf: '
|
|
247
|
+
alignSelf: 'baseline'
|
|
253
248
|
}
|
|
254
249
|
});
|
|
255
250
|
export default withLinkRouter(LinkBase);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import ListItemBase from './ListItemBase';
|
|
3
|
-
import Typography from '../Typography';
|
|
4
3
|
import { useThemeTokens } from '../ThemeProvider';
|
|
5
4
|
import { variantProp } from '../utils';
|
|
6
5
|
/**
|
|
@@ -8,7 +7,6 @@ import { variantProp } from '../utils';
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
10
|
const ListItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
13
11
|
let {
|
|
14
12
|
tokens,
|
|
@@ -18,17 +16,12 @@ const ListItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
18
16
|
...listItemProps
|
|
19
17
|
} = _ref;
|
|
20
18
|
const themeTokens = useThemeTokens('List', tokens, variant);
|
|
21
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/_jsx(ListItemBase, {
|
|
22
20
|
tokens: themeTokens,
|
|
23
21
|
ref: ref,
|
|
24
22
|
...listItemProps,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
size: 'h4',
|
|
28
|
-
bold: true
|
|
29
|
-
},
|
|
30
|
-
children: title
|
|
31
|
-
}), children]
|
|
23
|
+
title: title,
|
|
24
|
+
children: children
|
|
32
25
|
});
|
|
33
26
|
});
|
|
34
27
|
ListItem.displayName = 'ListItem';
|
|
@@ -6,8 +6,8 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { a11yProps, getTokensPropType, selectSystemProps, variantProp, viewProps } from '../utils';
|
|
7
7
|
import ListItemContent from './ListItemContent';
|
|
8
8
|
import ListItemMark from './ListItemMark';
|
|
9
|
+
import Typography from '../Typography';
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps]);
|
|
13
13
|
|
|
@@ -46,6 +46,7 @@ const ListItemBase = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
46
46
|
iconSize,
|
|
47
47
|
showDivider,
|
|
48
48
|
children,
|
|
49
|
+
title,
|
|
49
50
|
isLastItem,
|
|
50
51
|
accessibilityRole = Platform.select({
|
|
51
52
|
web: 'listitem',
|
|
@@ -85,15 +86,30 @@ const ListItemBase = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
85
86
|
iconColor,
|
|
86
87
|
iconSize,
|
|
87
88
|
isLastItem
|
|
88
|
-
}) : /*#__PURE__*/_jsxs(
|
|
89
|
+
}) : /*#__PURE__*/_jsxs(View, {
|
|
90
|
+
style: [{
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
flex: 'wrap'
|
|
93
|
+
}, !title && {
|
|
94
|
+
alignItems: 'center'
|
|
95
|
+
}],
|
|
89
96
|
children: [/*#__PURE__*/_jsx(ListItemMark, {
|
|
90
97
|
tokens: tokens,
|
|
91
98
|
icon: icon,
|
|
92
99
|
iconColor: iconColor,
|
|
93
100
|
iconSize: iconSize
|
|
94
|
-
}), /*#__PURE__*/
|
|
95
|
-
|
|
96
|
-
children:
|
|
101
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
102
|
+
style: staticStyles.titleAndContentContainer,
|
|
103
|
+
children: [Boolean(title) && /*#__PURE__*/_jsx(Typography, {
|
|
104
|
+
variant: {
|
|
105
|
+
size: 'h4',
|
|
106
|
+
bold: true
|
|
107
|
+
},
|
|
108
|
+
children: title
|
|
109
|
+
}), /*#__PURE__*/_jsx(ListItemContent, {
|
|
110
|
+
tokens: tokens,
|
|
111
|
+
children: children
|
|
112
|
+
})]
|
|
97
113
|
})]
|
|
98
114
|
})
|
|
99
115
|
});
|
|
@@ -102,6 +118,9 @@ ListItemBase.displayName = 'ListItem';
|
|
|
102
118
|
const staticStyles = StyleSheet.create({
|
|
103
119
|
itemContainer: {
|
|
104
120
|
flexDirection: 'row'
|
|
121
|
+
},
|
|
122
|
+
titleAndContentContainer: {
|
|
123
|
+
flexDirection: 'column'
|
|
105
124
|
}
|
|
106
125
|
});
|
|
107
126
|
ListItemBase.propTypes = { ...selectedSystemPropTypes,
|
package/lib-module/index.js
CHANGED
|
@@ -54,6 +54,6 @@ export { default as BaseProvider } from './BaseProvider';
|
|
|
54
54
|
export { useHydrationContext } from './BaseProvider/HydrationContext';
|
|
55
55
|
export { default as Validator } from './Validator';
|
|
56
56
|
export { default as ViewportProvider, useViewport, ViewportContext } from './ViewportProvider';
|
|
57
|
-
export { default as ThemeProvider, useTheme, useSetTheme, useThemeTokens, getThemeTokens, applyOuterBorder, applyTextStyles, applyShadowToken } from './ThemeProvider';
|
|
57
|
+
export { default as ThemeProvider, useTheme, useSetTheme, useThemeTokens, useThemeTokensCallback, getThemeTokens, applyOuterBorder, applyTextStyles, applyShadowToken } from './ThemeProvider';
|
|
58
58
|
export * from './utils';
|
|
59
59
|
export { Portal } from '@gorhom/portal';
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@floating-ui/react-native": "^0.8.1",
|
|
12
12
|
"@gorhom/portal": "^1.0.14",
|
|
13
13
|
"@telus-uds/system-constants": "^1.2.0",
|
|
14
|
-
"@telus-uds/system-theme-tokens": "^2.
|
|
14
|
+
"@telus-uds/system-theme-tokens": "^2.24.0",
|
|
15
15
|
"airbnb-prop-types": "^2.16.0",
|
|
16
16
|
"lodash.debounce": "^4.0.8",
|
|
17
17
|
"lodash.merge": "^4.6.2",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"standard-engine": {
|
|
73
73
|
"skip": true
|
|
74
74
|
},
|
|
75
|
-
"version": "1.
|
|
75
|
+
"version": "1.39.0"
|
|
76
76
|
}
|
|
@@ -53,6 +53,7 @@ const Spinner = forwardRef(({ size, color, thickness, label, isStatic = false },
|
|
|
53
53
|
r="20"
|
|
54
54
|
strokeDasharray={reduceMotion ? MAX_SVG_LENGTH : [MIN_SVG_LENGTH, SVG_CIRCUMFERENCE]}
|
|
55
55
|
strokeDashoffset={0}
|
|
56
|
+
vectorEffect="non-scaling-stroke"
|
|
56
57
|
>
|
|
57
58
|
{reduceMotion ? null : (
|
|
58
59
|
<>
|
package/src/Button/Button.jsx
CHANGED
|
@@ -4,9 +4,12 @@ import ButtonBase from './ButtonBase'
|
|
|
4
4
|
import buttonPropTypes, { textAndA11yText } from './propTypes'
|
|
5
5
|
import { useThemeTokensCallback } from '../ThemeProvider'
|
|
6
6
|
import { a11yProps } from '../utils/props'
|
|
7
|
+
import { useViewport } from '../ViewportProvider'
|
|
7
8
|
|
|
8
9
|
const Button = forwardRef(({ accessibilityRole = 'button', tokens, variant, ...props }, ref) => {
|
|
9
|
-
const
|
|
10
|
+
const viewport = useViewport()
|
|
11
|
+
const buttonVariant = { viewport, ...variant }
|
|
12
|
+
const getTokens = useThemeTokensCallback('Button', tokens, buttonVariant)
|
|
10
13
|
return (
|
|
11
14
|
<ButtonBase {...props} tokens={getTokens} accessibilityRole={accessibilityRole} ref={ref} />
|
|
12
15
|
)
|
|
@@ -3,6 +3,7 @@ import ButtonBase from './ButtonBase'
|
|
|
3
3
|
import buttonPropTypes, { textAndA11yText } from './propTypes'
|
|
4
4
|
import { a11yProps, hrefAttrsProp, linkProps } from '../utils/props'
|
|
5
5
|
import { useThemeTokensCallback } from '../ThemeProvider'
|
|
6
|
+
import { useViewport } from '../ViewportProvider'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* `ButtonLink` is a component with the semantics and behaviour of a link, but with the visual appearance of a button.
|
|
@@ -11,7 +12,9 @@ import { useThemeTokensCallback } from '../ThemeProvider'
|
|
|
11
12
|
const ButtonLink = forwardRef(
|
|
12
13
|
({ accessibilityRole = 'link', tokens, variant, dataSet, ...props }, ref) => {
|
|
13
14
|
const { hrefAttrs, rest } = hrefAttrsProp.bundle(props)
|
|
14
|
-
const
|
|
15
|
+
const viewport = useViewport()
|
|
16
|
+
const buttonVariant = { viewport, ...variant }
|
|
17
|
+
const getTokens = useThemeTokensCallback('Button', tokens, buttonVariant)
|
|
15
18
|
return (
|
|
16
19
|
<ButtonBase
|
|
17
20
|
ref={ref}
|
package/src/Link/ChevronLink.jsx
CHANGED
|
@@ -12,14 +12,24 @@ import LinkBase from './LinkBase'
|
|
|
12
12
|
* ChevronLink is not intended to be deeply themable; variants passed to ChevronLink are forwarded to Link.
|
|
13
13
|
*/
|
|
14
14
|
const ChevronLink = forwardRef(
|
|
15
|
-
({ direction = 'right', children, tokens, variant, dataSet, ...linkProps }, ref) => {
|
|
15
|
+
({ direction = 'right', children, tokens = {}, variant, dataSet, ...linkProps }, ref) => {
|
|
16
16
|
const getChevronTokens = useThemeTokensCallback('ChevronLink', tokens, variant)
|
|
17
17
|
const applyChevronTokens = (linkState) => {
|
|
18
|
-
const {
|
|
19
|
-
|
|
18
|
+
const {
|
|
19
|
+
leftIcon,
|
|
20
|
+
rightIcon,
|
|
21
|
+
iconDisplace,
|
|
22
|
+
height,
|
|
23
|
+
textLineHeight,
|
|
24
|
+
fontSize,
|
|
25
|
+
...otherTokens
|
|
26
|
+
} = getChevronTokens(linkState)
|
|
27
|
+
const linkTokens = selectTokens('Link', otherTokens)
|
|
28
|
+
|
|
20
29
|
return {
|
|
21
|
-
...
|
|
30
|
+
...linkTokens,
|
|
22
31
|
height,
|
|
32
|
+
blockFontSize: tokens.fontSize ?? fontSize,
|
|
23
33
|
textLineHeight,
|
|
24
34
|
icon: direction === 'right' ? rightIcon : leftIcon,
|
|
25
35
|
iconTranslateX: iconDisplace * (direction === 'right' ? 1 : -1) || 0
|
package/src/Link/LinkBase.jsx
CHANGED
|
@@ -150,12 +150,11 @@ const LinkBase = forwardRef(
|
|
|
150
150
|
inlineFlex={hasIcon} // assuming links without icons should be inline (even if they are long)
|
|
151
151
|
ref={ref}
|
|
152
152
|
style={(linkState) => {
|
|
153
|
-
const
|
|
153
|
+
const themeTokens = resolveLinkTokens(linkState)
|
|
154
154
|
const outerBorderStyles = selectOuterBorderStyles(themeTokens)
|
|
155
155
|
const decorationStyles = selectDecorationStyles(themeTokens)
|
|
156
156
|
|
|
157
157
|
return [
|
|
158
|
-
height ? { height } : {},
|
|
159
158
|
outerBorderStyles,
|
|
160
159
|
blockLeftStyle,
|
|
161
160
|
decorationStyles,
|
|
@@ -226,7 +225,7 @@ const staticStyles = StyleSheet.create({
|
|
|
226
225
|
justifyContent: 'flex-start'
|
|
227
226
|
},
|
|
228
227
|
baseline: {
|
|
229
|
-
alignSelf: '
|
|
228
|
+
alignSelf: 'baseline'
|
|
230
229
|
}
|
|
231
230
|
})
|
|
232
231
|
|
package/src/List/ListItem.jsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
2
|
|
|
3
3
|
import ListItemBase from './ListItemBase'
|
|
4
|
-
import Typography from '../Typography'
|
|
5
4
|
import { useThemeTokens } from '../ThemeProvider'
|
|
6
5
|
import { variantProp } from '../utils'
|
|
7
6
|
|
|
@@ -11,8 +10,7 @@ import { variantProp } from '../utils'
|
|
|
11
10
|
const ListItem = forwardRef(({ tokens, variant, children, title, ...listItemProps }, ref) => {
|
|
12
11
|
const themeTokens = useThemeTokens('List', tokens, variant)
|
|
13
12
|
return (
|
|
14
|
-
<ListItemBase tokens={themeTokens} ref={ref} {...listItemProps}>
|
|
15
|
-
{Boolean(title) && <Typography variant={{ size: 'h4', bold: true }}>{title}</Typography>}
|
|
13
|
+
<ListItemBase tokens={themeTokens} ref={ref} {...listItemProps} title={title}>
|
|
16
14
|
{children}
|
|
17
15
|
</ListItemBase>
|
|
18
16
|
)
|
|
@@ -5,6 +5,7 @@ import { a11yProps, getTokensPropType, selectSystemProps, variantProp, viewProps
|
|
|
5
5
|
|
|
6
6
|
import ListItemContent from './ListItemContent'
|
|
7
7
|
import ListItemMark from './ListItemMark'
|
|
8
|
+
import Typography from '../Typography'
|
|
8
9
|
|
|
9
10
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps])
|
|
10
11
|
|
|
@@ -31,6 +32,7 @@ const ListItemBase = forwardRef(
|
|
|
31
32
|
iconSize,
|
|
32
33
|
showDivider,
|
|
33
34
|
children,
|
|
35
|
+
title,
|
|
34
36
|
isLastItem,
|
|
35
37
|
accessibilityRole = Platform.select({ web: 'listitem', default: undefined }),
|
|
36
38
|
...rest
|
|
@@ -69,10 +71,23 @@ const ListItemBase = forwardRef(
|
|
|
69
71
|
{typeof children === 'function' ? (
|
|
70
72
|
children({ tokens, icon, iconColor, iconSize, isLastItem })
|
|
71
73
|
) : (
|
|
72
|
-
|
|
74
|
+
<View
|
|
75
|
+
style={[
|
|
76
|
+
{
|
|
77
|
+
flexDirection: 'row',
|
|
78
|
+
flex: 'wrap'
|
|
79
|
+
},
|
|
80
|
+
!title && { alignItems: 'center' }
|
|
81
|
+
]}
|
|
82
|
+
>
|
|
73
83
|
<ListItemMark tokens={tokens} icon={icon} iconColor={iconColor} iconSize={iconSize} />
|
|
74
|
-
<
|
|
75
|
-
|
|
84
|
+
<View style={staticStyles.titleAndContentContainer}>
|
|
85
|
+
{Boolean(title) && (
|
|
86
|
+
<Typography variant={{ size: 'h4', bold: true }}>{title}</Typography>
|
|
87
|
+
)}
|
|
88
|
+
<ListItemContent tokens={tokens}>{children}</ListItemContent>
|
|
89
|
+
</View>
|
|
90
|
+
</View>
|
|
76
91
|
)}
|
|
77
92
|
</View>
|
|
78
93
|
)
|
|
@@ -83,7 +98,8 @@ ListItemBase.displayName = 'ListItem'
|
|
|
83
98
|
const staticStyles = StyleSheet.create({
|
|
84
99
|
itemContainer: {
|
|
85
100
|
flexDirection: 'row'
|
|
86
|
-
}
|
|
101
|
+
},
|
|
102
|
+
titleAndContentContainer: { flexDirection: 'column' }
|
|
87
103
|
})
|
|
88
104
|
|
|
89
105
|
ListItemBase.propTypes = {
|