@telus-uds/components-base 1.36.0 → 1.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,33 @@
1
1
  # Change Log - @telus-uds/components-base
2
2
 
3
- This log was last generated on Thu, 20 Apr 2023 19:05:54 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 27 Apr 2023 14:32:16 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.38.0
8
+
9
+ Thu, 27 Apr 2023 14:32:16 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - add a new button variant to support responsive width across the different viewports (guillermo.peitzner@telus.com)
14
+ - export use theme call back (mauricio.batresmontejo@telus.com)
15
+ - standarization of activity indicator (ignacio.cuyun@telus.com)
16
+ - conditionally render Icon based on it being defined (kyle.king2@telus.com)
17
+ - Bump @telus-uds/system-theme-tokens to v2.23.0
18
+
19
+ ## 1.37.0
20
+
21
+ Mon, 24 Apr 2023 21:42:02 GMT
22
+
23
+ ### Minor changes
24
+
25
+ - conditionally render Icon based on it being defined (kyle.king2@telus.com)
26
+ - Bump @telus-uds/system-theme-tokens to v2.22.0
27
+
7
28
  ## 1.36.0
8
29
 
9
- Thu, 20 Apr 2023 19:05:54 GMT
30
+ Thu, 20 Apr 2023 19:13:33 GMT
10
31
 
11
32
  ### Minor changes
12
33
 
@@ -1,23 +1,27 @@
1
1
  {
2
2
  "schema": {
3
3
  "components": {
4
- "Toast": {
5
- "containerBackgroundColor": "color",
6
- "containerGap": "size",
7
- "animationHeightBefore": "size",
8
- "animationHeightAfter": "size",
9
- "animationPaddingBottomBefore": "size",
10
- "animationPaddingBottomAfter": "size",
11
- "animationPaddingTopBefore": "size",
12
- "animationPaddingTopAfter": "size",
13
- "animationBackgroundColorBefore": "color",
14
- "animationBackgroundColorAfter": "color",
15
- "animationColorBefore": "color",
16
- "animationColorAfter": "color",
17
- "animationDivColorBefore": "color",
18
- "animationDivColorAfter": "color",
19
- "animationFillColorBefore": "color",
20
- "animationFillColorAfter": "color"
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",
@@ -119,6 +199,16 @@
119
199
  "paddingTop": "size",
120
200
  "paddingBottom": "size"
121
201
  },
202
+ "BlockQuote": {
203
+ "color": "color",
204
+ "backgroundGradient": "gradient",
205
+ "paddingLeft": "size",
206
+ "paddingRight": "size",
207
+ "paddingTop": "size",
208
+ "paddingBottom": "size",
209
+ "marginBottom": "size",
210
+ "width": "size"
211
+ },
122
212
  "Box": {
123
213
  "backgroundColor": "color",
124
214
  "gradient": "gradient"
@@ -496,6 +586,7 @@
496
586
  "space": "integer"
497
587
  },
498
588
  "IconButton": {
589
+ "icon": "icon",
499
590
  "backgroundColor": "color",
500
591
  "borderRadius": "radius",
501
592
  "borderColor": "color",
@@ -550,6 +641,38 @@
550
641
  "itemIconColor": "color",
551
642
  "listGutter": "size"
552
643
  },
644
+ "ListBox": {
645
+ "groupBorderRadius": "radius",
646
+ "groupBorderWidth": "border",
647
+ "groupFontSize": "size",
648
+ "groupFontName": "fontName",
649
+ "groupFontWeight": "fontWeight",
650
+ "groupColor": "color",
651
+ "groupBorderColor": "color",
652
+ "groupBackgroundColor": "color",
653
+ "groupPaddingTop": "size",
654
+ "groupPaddingBottom": "size",
655
+ "groupPaddingLeft": "size",
656
+ "groupPaddingRight": "size",
657
+ "groupIcon": "icon",
658
+ "itemDisplay": "show",
659
+ "itemFontName": "fontName",
660
+ "itemFontWeight": "fontWeight",
661
+ "itemFontSize": "size",
662
+ "itemPaddingTop": "size",
663
+ "itemPaddingBottom": "size",
664
+ "itemPaddingLeft": "size",
665
+ "itemPaddingRight": "size",
666
+ "itemColor": "color",
667
+ "itemBackgroundColor": "color",
668
+ "itemBorderBackgroundColor": "color",
669
+ "itemBorderLeftColor": "color",
670
+ "itemBorderLeftWidth": "border",
671
+ "itemBorderWidth": "border",
672
+ "itemTextDecoration": "textLine",
673
+ "itemOutline": "border",
674
+ "shadow": "shadow"
675
+ },
553
676
  "OrderedList": {
554
677
  "headerFontWeight": "fontWeight",
555
678
  "headerFontName": "fontName",
@@ -1046,6 +1169,26 @@
1046
1169
  "paddingVertical": "size",
1047
1170
  "borderRadius": "radius"
1048
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
+ },
1049
1192
  "Tabs": {
1050
1193
  "nextIcon": "icon",
1051
1194
  "previousIcon": "icon",
@@ -1123,6 +1266,55 @@
1123
1266
  "outerBorderGap": "size",
1124
1267
  "outerBackgroundColor": "color"
1125
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
+ },
1126
1318
  "TextArea": {
1127
1319
  "minLines": "integer",
1128
1320
  "maxLines": "integer"
@@ -1154,6 +1346,24 @@
1154
1346
  "iconSize": "size",
1155
1347
  "iconColor": "color"
1156
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
+ "animationFillColorBefore": "color",
1365
+ "animationFillColorAfter": "color"
1366
+ },
1157
1367
  "ToggleSwitch": {
1158
1368
  "borderColor": "color",
1159
1369
  "borderWidth": "border",
@@ -1261,6 +1471,22 @@
1261
1471
  "fontScaleCap": "fontSize",
1262
1472
  "letterSpacing": "letterSpacing"
1263
1473
  },
1474
+ "Countdown": {
1475
+ "containerBorderRadius": "radius",
1476
+ "containerGradient": "gradient",
1477
+ "containerInverseBorder": "border",
1478
+ "containerInverseBorderColor": "color",
1479
+ "containerPaddingBottomTop": "size",
1480
+ "containerPaddingLeftRight": "size",
1481
+ "inverseBorderColor": "color",
1482
+ "labelBorderColor": "color",
1483
+ "textFontSize": "fontSize",
1484
+ "textLineHeight": "lineHeight",
1485
+ "labelFontSize": "fontSize",
1486
+ "labelLineHeight": "lineHeight",
1487
+ "textTimerFontWeight": "fontWeight",
1488
+ "textTimerFontName": "fontName"
1489
+ },
1264
1490
  "Skeleton": {
1265
1491
  "color": "color",
1266
1492
  "size": "size",
@@ -1285,6 +1511,18 @@
1285
1511
  "type": "state"
1286
1512
  }
1287
1513
  },
1514
+ "SplashButton": {
1515
+ "hover": {
1516
+ "description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
1517
+ "values": [
1518
+ true
1519
+ ],
1520
+ "type": "state",
1521
+ "platforms": [
1522
+ "rn"
1523
+ ]
1524
+ }
1525
+ },
1288
1526
  "Button": {
1289
1527
  "focus": {
1290
1528
  "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.",
@@ -1714,6 +1952,56 @@
1714
1952
  "type": "state"
1715
1953
  }
1716
1954
  },
1955
+ "ListBox": {
1956
+ "focus": {
1957
+ "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.",
1958
+ "values": [
1959
+ true
1960
+ ],
1961
+ "type": "state",
1962
+ "platforms": [
1963
+ "rn"
1964
+ ]
1965
+ },
1966
+ "hover": {
1967
+ "description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
1968
+ "values": [
1969
+ true
1970
+ ],
1971
+ "type": "state",
1972
+ "platforms": [
1973
+ "rn"
1974
+ ]
1975
+ },
1976
+ "pressed": {
1977
+ "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.",
1978
+ "values": [
1979
+ true
1980
+ ],
1981
+ "type": "state"
1982
+ },
1983
+ "expanded": {
1984
+ "description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
1985
+ "values": [
1986
+ true
1987
+ ],
1988
+ "type": "state"
1989
+ },
1990
+ "current": {
1991
+ "description": "When the current item is selected",
1992
+ "values": [
1993
+ true
1994
+ ],
1995
+ "type": "state"
1996
+ },
1997
+ "isChild": {
1998
+ "description": "when the item is child of another child",
1999
+ "values": [
2000
+ true
2001
+ ],
2002
+ "type": "state"
2003
+ }
2004
+ },
1717
2005
  "Modal": {
1718
2006
  "maxWidth": {
1719
2007
  "description": "Whether a modal should expand responsively to the maximum of 8 layout columns width",
@@ -1874,6 +2162,41 @@
1874
2162
  "type": "state"
1875
2163
  }
1876
2164
  },
2165
+ "QuantitySelector": {
2166
+ "focus": {
2167
+ "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.",
2168
+ "values": [
2169
+ true
2170
+ ],
2171
+ "type": "state",
2172
+ "platforms": [
2173
+ "rn"
2174
+ ]
2175
+ },
2176
+ "hover": {
2177
+ "description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
2178
+ "values": [
2179
+ true
2180
+ ],
2181
+ "type": "state",
2182
+ "platforms": [
2183
+ "rn"
2184
+ ]
2185
+ },
2186
+ "disabled": {
2187
+ "values": [
2188
+ true
2189
+ ],
2190
+ "type": "state"
2191
+ },
2192
+ "pressed": {
2193
+ "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.",
2194
+ "values": [
2195
+ true
2196
+ ],
2197
+ "type": "state"
2198
+ }
2199
+ },
1877
2200
  "Radio": {
1878
2201
  "checked": {
1879
2202
  "description": "Corresponds to a selected state for a checkbox or radio",
@@ -2126,6 +2449,35 @@
2126
2449
  "type": "state"
2127
2450
  }
2128
2451
  },
2452
+ "StoryCard": {
2453
+ "focus": {
2454
+ "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.",
2455
+ "values": [
2456
+ true
2457
+ ],
2458
+ "type": "state",
2459
+ "platforms": [
2460
+ "rn"
2461
+ ]
2462
+ },
2463
+ "hover": {
2464
+ "description": "Currently web only. Applies when an interactive component's hover handler is triggered, such as on mouseover.",
2465
+ "values": [
2466
+ true
2467
+ ],
2468
+ "type": "state",
2469
+ "platforms": [
2470
+ "rn"
2471
+ ]
2472
+ },
2473
+ "pressed": {
2474
+ "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.",
2475
+ "values": [
2476
+ true
2477
+ ],
2478
+ "type": "state"
2479
+ }
2480
+ },
2129
2481
  "TabsItem": {
2130
2482
  "focus": {
2131
2483
  "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.",
@@ -2239,6 +2591,15 @@
2239
2591
  "type": "state"
2240
2592
  }
2241
2593
  },
2594
+ "TermsAndConditions": {
2595
+ "expanded": {
2596
+ "description": "Applies when an ExpandCollapse panel is open and the content inside is visible",
2597
+ "values": [
2598
+ true
2599
+ ],
2600
+ "type": "state"
2601
+ }
2602
+ },
2242
2603
  "ToggleSwitch": {
2243
2604
  "focus": {
2244
2605
  "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.",
@@ -5155,14 +5516,11 @@
5155
5516
  "docs": {
5156
5517
  "description": "A pressable themeless base component that handles pressable states and passes tokens\nbased on these to an outer border and a base Card component. Not intended to be used in\napps or sites directly: build themed components on top of this.",
5157
5518
  "props": {
5158
- "accessibilityRole": {
5519
+ "variant": {
5159
5520
  "defaultValue": {
5160
- "value": "href ? 'link' : 'button'",
5521
+ "value": "{}",
5161
5522
  "computed": false
5162
5523
  },
5163
- "required": false
5164
- },
5165
- "variant": {
5166
5524
  "type": {
5167
5525
  "name": "objectOf",
5168
5526
  "value": {
@@ -5183,10 +5541,18 @@
5183
5541
  "required": false,
5184
5542
  "description": ""
5185
5543
  },
5544
+ "accessibilityRole": {
5545
+ "defaultValue": {
5546
+ "value": "href ? 'link' : 'button'",
5547
+ "computed": false
5548
+ },
5549
+ "required": false
5550
+ },
5186
5551
  "tokens": {
5187
5552
  "type": {
5188
5553
  "name": "custom",
5189
5554
  "raw": {
5555
+ "icon": "icon",
5190
5556
  "backgroundColor": "color",
5191
5557
  "borderRadius": "radius",
5192
5558
  "borderColor": "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",
@@ -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 getTokens = (0, _ThemeProvider.useThemeTokensCallback)('Button', tokens, variant);
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,
@@ -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 getTokens = (0, _ThemeProvider.useThemeTokensCallback)('Button', tokens, variant);
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,
@@ -86,7 +86,7 @@ const selectInnerStyle = _ref2 => {
86
86
  const IconButton = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
87
87
  let {
88
88
  tokens,
89
- variant,
89
+ variant = {},
90
90
  icon: IconComponent,
91
91
  href,
92
92
  hrefAttrs,
@@ -134,7 +134,8 @@ const IconButton = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
134
134
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
135
135
  icon: IconComponent,
136
136
  title: selectedProps.accessibilityLabel,
137
- tokens: (0, _utils.selectTokens)('Icon', themeTokens, 'icon')
137
+ tokens: (0, _utils.selectTokens)('Icon', themeTokens, 'icon'),
138
+ variant: variant
138
139
  })
139
140
  });
140
141
  }
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 getTokens = useThemeTokensCallback('Button', tokens, variant);
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 getTokens = useThemeTokensCallback('Button', tokens, variant);
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,
@@ -63,7 +63,7 @@ const selectInnerStyle = _ref2 => {
63
63
  const IconButton = /*#__PURE__*/forwardRef((_ref3, ref) => {
64
64
  let {
65
65
  tokens,
66
- variant,
66
+ variant = {},
67
67
  icon: IconComponent,
68
68
  href,
69
69
  hrefAttrs,
@@ -109,7 +109,8 @@ const IconButton = /*#__PURE__*/forwardRef((_ref3, ref) => {
109
109
  children: /*#__PURE__*/_jsx(Icon, {
110
110
  icon: IconComponent,
111
111
  title: selectedProps.accessibilityLabel,
112
- tokens: selectTokens('Icon', themeTokens, 'icon')
112
+ tokens: selectTokens('Icon', themeTokens, 'icon'),
113
+ variant: variant
113
114
  })
114
115
  });
115
116
  }
@@ -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.21.0",
14
+ "@telus-uds/system-theme-tokens": "^2.23.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.36.0"
75
+ "version": "1.38.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
  <>
@@ -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 getTokens = useThemeTokensCallback('Button', tokens, variant)
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 getTokens = useThemeTokensCallback('Button', tokens, variant)
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}
@@ -54,7 +54,7 @@ const IconButton = forwardRef(
54
54
  (
55
55
  {
56
56
  tokens,
57
- variant,
57
+ variant = {},
58
58
  icon: IconComponent,
59
59
  href,
60
60
  hrefAttrs,
@@ -93,6 +93,7 @@ const IconButton = forwardRef(
93
93
  icon={IconComponent}
94
94
  title={selectedProps.accessibilityLabel}
95
95
  tokens={selectTokens('Icon', themeTokens, 'icon')}
96
+ variant={variant}
96
97
  />
97
98
  </View>
98
99
  )
package/src/index.js CHANGED
@@ -60,6 +60,7 @@ export {
60
60
  useTheme,
61
61
  useSetTheme,
62
62
  useThemeTokens,
63
+ useThemeTokensCallback,
63
64
  getThemeTokens,
64
65
  applyOuterBorder,
65
66
  applyTextStyles,