@telus-uds/components-base 1.61.0 → 1.62.1

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,29 @@
1
1
  # Change Log - @telus-uds/components-base
2
2
 
3
- This log was last generated on Tue, 12 Sep 2023 23:35:19 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 27 Sep 2023 20:45:15 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.62.1
8
+
9
+ Wed, 27 Sep 2023 20:45:15 GMT
10
+
11
+ ### Patches
12
+
13
+ - Clicking on any clickable area should bubble event to relevant `Pressable` element (shahzaibkhalidmalik@outlook.com)
14
+
15
+ ## 1.62.0
16
+
17
+ Fri, 15 Sep 2023 21:02:27 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - TextInputBase component changed to match with design intention for the IconButton (35577399+JoshHC@users.noreply.github.com)
22
+ - `Tooltip`: Add `onPress` callback function to be triggered when tooltip button is clicked (shahzaibkhalidmalik@outlook.com)
23
+
7
24
  ## 1.61.0
8
25
 
9
- Tue, 12 Sep 2023 23:35:19 GMT
26
+ Tue, 12 Sep 2023 23:39:14 GMT
10
27
 
11
28
  ### Minor changes
12
29
 
@@ -799,7 +799,9 @@
799
799
  "iconSize": "size",
800
800
  "iconScale": "iconScale",
801
801
  "iconTranslateX": "size",
802
- "iconTranslateY": "size"
802
+ "iconTranslateY": "size",
803
+ "height": "size",
804
+ "width": "size"
803
805
  },
804
806
  "Link": {
805
807
  "color": "color",
@@ -6410,6 +6412,17 @@
6410
6412
  "required": false,
6411
6413
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling."
6412
6414
  },
6415
+ "style": {
6416
+ "defaultValue": {
6417
+ "value": "{}",
6418
+ "computed": false
6419
+ },
6420
+ "type": {
6421
+ "name": "object"
6422
+ },
6423
+ "required": false,
6424
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}"
6425
+ },
6413
6426
  "variant": {
6414
6427
  "type": {
6415
6428
  "name": "objectOf",
@@ -6527,7 +6540,9 @@
6527
6540
  "iconSize": "size",
6528
6541
  "iconScale": "iconScale",
6529
6542
  "iconTranslateX": "size",
6530
- "iconTranslateY": "size"
6543
+ "iconTranslateY": "size",
6544
+ "height": "size",
6545
+ "width": "size"
6531
6546
  }
6532
6547
  },
6533
6548
  "required": false,
@@ -9718,28 +9733,6 @@
9718
9733
  "docs": {
9719
9734
  "description": "`SideNav.Item` is a navigational element that is used within `SideNav` or `SideNav.ItemsGroup`.\n\n This component can only be accessed as a name-spaced component: `SideNav.Item`.",
9720
9735
  "props": {
9721
- "isActive": {
9722
- "defaultValue": {
9723
- "value": "false",
9724
- "computed": false
9725
- },
9726
- "type": {
9727
- "name": "bool"
9728
- },
9729
- "required": false,
9730
- "description": "Set internally in `SideNav` render function."
9731
- },
9732
- "isExpanded": {
9733
- "defaultValue": {
9734
- "value": "false",
9735
- "computed": false
9736
- },
9737
- "type": {
9738
- "name": "bool"
9739
- },
9740
- "required": false,
9741
- "description": "Set internally in `SideNav.ItemsGroup` render function. Used to mark expanded `ItemsGroup` parent."
9742
- },
9743
9736
  "accessibilityRole": {
9744
9737
  "defaultValue": {
9745
9738
  "value": "'link'",
@@ -9749,7 +9742,7 @@
9749
9742
  "name": "string"
9750
9743
  },
9751
9744
  "required": false,
9752
- "description": "Accesibility Role"
9745
+ "description": ""
9753
9746
  },
9754
9747
  "children": {
9755
9748
  "type": {
@@ -9758,20 +9751,6 @@
9758
9751
  "required": true,
9759
9752
  "description": "Text content of the `Item`."
9760
9753
  },
9761
- "itemId": {
9762
- "type": {
9763
- "name": "string"
9764
- },
9765
- "required": false,
9766
- "description": "Set internally in `SideNav` render function - used to keep track of active item."
9767
- },
9768
- "groupId": {
9769
- "type": {
9770
- "name": "string"
9771
- },
9772
- "required": false,
9773
- "description": "Set internally in `SideNav` render function - used to keep track of expanded items groups."
9774
- },
9775
9754
  "onPress": {
9776
9755
  "type": {
9777
9756
  "name": "func"
@@ -9825,6 +9804,13 @@
9825
9804
  "required": false,
9826
9805
  "description": "On Web if href is passed, React Native Web maps this object's props to\n`rel`, `target` and `download` attrs."
9827
9806
  },
9807
+ "testID": {
9808
+ "type": {
9809
+ "name": "number"
9810
+ },
9811
+ "required": false,
9812
+ "description": ""
9813
+ },
9828
9814
  "tokens": {
9829
9815
  "type": {
9830
9816
  "name": "custom",
@@ -9872,13 +9858,6 @@
9872
9858
  },
9873
9859
  "required": false,
9874
9860
  "description": ""
9875
- },
9876
- "testID": {
9877
- "type": {
9878
- "name": "number"
9879
- },
9880
- "required": false,
9881
- "description": "test ID"
9882
9861
  }
9883
9862
  },
9884
9863
  "attributes": {
@@ -11291,6 +11270,17 @@
11291
11270
  "required": false,
11292
11271
  "description": "Select English or French copy for the accessible label."
11293
11272
  },
11273
+ "onPress": {
11274
+ "defaultValue": {
11275
+ "value": "() => {}",
11276
+ "computed": false
11277
+ },
11278
+ "type": {
11279
+ "name": "func"
11280
+ },
11281
+ "required": false,
11282
+ "description": "Callback function triggered when the tooltip is pressed."
11283
+ },
11294
11284
  "inline": {
11295
11285
  "defaultValue": {
11296
11286
  "value": "false",
@@ -11332,6 +11322,13 @@
11332
11322
  "required": false,
11333
11323
  "description": "The message. Can be raw text or text components."
11334
11324
  },
11325
+ "nativeID": {
11326
+ "type": {
11327
+ "name": "string"
11328
+ },
11329
+ "required": false,
11330
+ "description": "The `id` of the tooltip button."
11331
+ },
11335
11332
  "tokens": {
11336
11333
  "type": {
11337
11334
  "name": "custom",
@@ -11841,6 +11838,11 @@
11841
11838
  "name": "bool",
11842
11839
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
11843
11840
  "required": false
11841
+ },
11842
+ "style": {
11843
+ "name": "object",
11844
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}",
11845
+ "required": false
11844
11846
  }
11845
11847
  }
11846
11848
  },
@@ -12024,6 +12026,11 @@
12024
12026
  "name": "bool",
12025
12027
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
12026
12028
  "required": false
12029
+ },
12030
+ "style": {
12031
+ "name": "object",
12032
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}",
12033
+ "required": false
12027
12034
  }
12028
12035
  }
12029
12036
  },
@@ -12464,6 +12471,11 @@
12464
12471
  "name": "bool",
12465
12472
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
12466
12473
  "required": false
12474
+ },
12475
+ "style": {
12476
+ "name": "object",
12477
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}",
12478
+ "required": false
12467
12479
  }
12468
12480
  }
12469
12481
  },
@@ -14058,6 +14070,11 @@
14058
14070
  "name": "bool",
14059
14071
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
14060
14072
  "required": false
14073
+ },
14074
+ "style": {
14075
+ "name": "object",
14076
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}",
14077
+ "required": false
14061
14078
  }
14062
14079
  }
14063
14080
  },
@@ -14335,6 +14352,11 @@
14335
14352
  "name": "bool",
14336
14353
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
14337
14354
  "required": false
14355
+ },
14356
+ "style": {
14357
+ "name": "object",
14358
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}",
14359
+ "required": false
14338
14360
  }
14339
14361
  }
14340
14362
  },
package/lib/Icon/Icon.js CHANGED
@@ -32,6 +32,7 @@ const Icon = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
32
32
  variant,
33
33
  tokens,
34
34
  scalesWithText = false,
35
+ style = {},
35
36
  dataSet
36
37
  } = _ref;
37
38
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('Icon', tokens, variant);
@@ -48,7 +49,8 @@ const Icon = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
48
49
  // TODO: systematise animations.
49
50
  // https://github.com/telus/universal-design-system/issues/487
50
51
  transition: 'transform 200ms, color 200ms',
51
- transform: [themeTokens.scale ? `scale(${themeTokens.scale})` : '', themeTokens.translateX ? `translateX(${themeTokens.translateX}px)` : '', themeTokens.translateY ? `translateY(${themeTokens.translateY}px)` : ''].filter(exists => exists).join(' ')
52
+ transform: [themeTokens.scale ? `scale(${themeTokens.scale})` : '', themeTokens.translateX ? `translateX(${themeTokens.translateX}px)` : '', themeTokens.translateY ? `translateY(${themeTokens.translateY}px)` : ''].filter(exists => exists).join(' '),
53
+ ...style
52
54
  },
53
55
  dataSet: dataSet,
54
56
  children: iconContent
@@ -67,7 +69,18 @@ const iconComponentPropTypes = {
67
69
  /**
68
70
  * controls whether the icon size should be proportionate to any accessibility-related font scaling.
69
71
  */
70
- scalesWithText: _propTypes.default.bool
72
+ scalesWithText: _propTypes.default.bool,
73
+
74
+ /**
75
+ * Custom style object to be applied to the icon component.
76
+ * This is useful for overriding the default icon style but for cases where desires styles are not available as tokens.
77
+ *
78
+ * Note: This prop is only used in web.
79
+ *
80
+ * @example
81
+ * <Icon style={{ color: 'red' }}
82
+ */
83
+ style: _propTypes.default.object
71
84
  };
72
85
  exports.iconComponentPropTypes = iconComponentPropTypes;
73
86
  Icon.propTypes = { ...iconComponentPropTypes,
@@ -31,9 +31,17 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
31
31
 
32
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
33
 
34
+ // function to get the dimentionals of the conditionals
35
+ const getPasswordDimensions = (password, width, height) => {
36
+ return password ? {
37
+ width,
38
+ height
39
+ } : {};
40
+ };
41
+
34
42
  const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
35
43
 
36
- const selectOuterStyle = _ref => {
44
+ const selectOuterStyle = (_ref, password) => {
37
45
  let {
38
46
  backgroundColor,
39
47
  outerBorderWidth,
@@ -44,7 +52,9 @@ const selectOuterStyle = _ref => {
44
52
  borderTopRightRadius,
45
53
  borderBottomLeftRadius,
46
54
  borderBottomRightRadius,
47
- shadow
55
+ shadow,
56
+ width,
57
+ height
48
58
  } = _ref;
49
59
  return [{
50
60
  backgroundColor,
@@ -59,10 +69,13 @@ const selectOuterStyle = _ref => {
59
69
  outerBorderColor,
60
70
  outerBorderGap
61
71
  }),
72
+ ...getPasswordDimensions(password, width, height),
62
73
  ..._Platform.default.select({
63
74
  web: {
64
75
  outline: 'none',
65
- display: 'inline-flex'
76
+ display: 'inline-flex',
77
+ alignItems: 'center',
78
+ justifyContent: 'center'
66
79
  }
67
80
  })
68
81
  }, staticStyles.outer];
@@ -71,7 +84,7 @@ const selectOuterStyle = _ref => {
71
84
  const calculatePadding = (padding, borderWidth) => padding && Math.max(0, padding - borderWidth); // Stable size as border changes
72
85
 
73
86
 
74
- const selectInnerStyle = _ref2 => {
87
+ const selectInnerStyle = (_ref2, password) => {
75
88
  let {
76
89
  borderColor,
77
90
  borderWidth,
@@ -88,7 +101,9 @@ const selectInnerStyle = _ref2 => {
88
101
  paddingLeft,
89
102
  paddingRight,
90
103
  paddingTop,
91
- paddingBottom
104
+ paddingBottom,
105
+ width,
106
+ height
92
107
  } = _ref2;
93
108
  return {
94
109
  // Inner borders animate with the icon and should be treated like a themable feature of the icon
@@ -110,9 +125,13 @@ const selectInnerStyle = _ref2 => {
110
125
  paddingBottom: calculatePadding(paddingBottom, borderBottomWidth),
111
126
  ..._Platform.default.select({
112
127
  web: {
113
- pointerEvents: 'none'
128
+ pointerEvents: 'none',
129
+ display: 'inline-flex',
130
+ alignItems: 'center',
131
+ justifyContent: 'center'
114
132
  }
115
- })
133
+ }),
134
+ ...getPasswordDimensions(password, width, height)
116
135
  };
117
136
  };
118
137
  /**
@@ -158,7 +177,7 @@ const IconButton = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
158
177
 
159
178
  const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('IconButton', tokens, variant);
160
179
 
161
- const getOuterStyle = pressableState => selectOuterStyle(getTokens((0, _utils.resolvePressableState)(pressableState)));
180
+ const getOuterStyle = pressableState => selectOuterStyle(getTokens((0, _utils.resolvePressableState)(pressableState), variant.password));
162
181
 
163
182
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Pressable.default, {
164
183
  ref: ref,
@@ -171,7 +190,7 @@ const IconButton = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
171
190
  children: pressableState => {
172
191
  const themeTokens = getTokens((0, _utils.resolvePressableState)(pressableState));
173
192
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
174
- style: selectInnerStyle(themeTokens),
193
+ style: selectInnerStyle(themeTokens, variant.password),
175
194
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
176
195
  icon: IconComponent || themeTokens.icon,
177
196
  title: selectedProps.accessibilityLabel,
@@ -225,10 +225,11 @@ const LinkBase = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
225
225
  iconPosition: iconPosition,
226
226
  space: iconSpace,
227
227
  iconProps: { ...iconProps,
228
- tokens: iconTokens
228
+ tokens: iconTokens,
229
+ style: staticStyles.bubblePointerEvents
229
230
  },
230
231
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
231
- style: [textStyles, blockTextStyles, staticStyles.baseline],
232
+ style: [textStyles, blockTextStyles, staticStyles.baseline, staticStyles.bubblePointerEvents],
232
233
  children: typeof children === 'function' ? children(linkState) : children
233
234
  })
234
235
  });
@@ -287,6 +288,12 @@ const staticStyles = _StyleSheet.default.create({
287
288
  },
288
289
  baseline: {
289
290
  alignSelf: 'baseline'
291
+ },
292
+ bubblePointerEvents: { ..._Platform.default.select({
293
+ web: {
294
+ pointerEvents: 'none'
295
+ }
296
+ })
290
297
  }
291
298
  });
292
299
 
@@ -138,13 +138,13 @@ Item.propTypes = { ...selectedSystemPropTypes,
138
138
  children: _propTypes.default.node.isRequired,
139
139
 
140
140
  /**
141
- *
141
+ * @ignore
142
142
  * Set internally in `SideNav` render function - used to keep track of active item.
143
143
  */
144
144
  itemId: _propTypes.default.string,
145
145
 
146
146
  /**
147
- *
147
+ * @ignore
148
148
  * Set internally in `SideNav` render function - used to keep track of expanded items groups.
149
149
  */
150
150
  groupId: _propTypes.default.string,
@@ -158,28 +158,20 @@ Item.propTypes = { ...selectedSystemPropTypes,
158
158
  hrefAttrs: _propTypes.default.shape(_utils.hrefAttrsProp.types),
159
159
 
160
160
  /**
161
- *
161
+ * @ignore
162
162
  * Set internally in `SideNav` render function.
163
163
  */
164
164
  isActive: _propTypes.default.bool,
165
165
 
166
166
  /**
167
- *
167
+ * @ignore
168
168
  * Set internally in `SideNav.ItemsGroup` render function. Used to mark expanded `ItemsGroup` parent.
169
169
  */
170
170
  isExpanded: _propTypes.default.bool,
171
- tokens: (0, _utils.getTokensPropType)('SideNavItem'),
172
- variant: _utils.variantProp.propType,
173
-
174
- /**
175
- * Accesibility Role
176
- */
177
171
  accessibilityRole: _propTypes.default.string,
178
-
179
- /**
180
- * test ID
181
- */
182
- testID: _propTypes.default.number
172
+ testID: _propTypes.default.number,
173
+ tokens: (0, _utils.getTokensPropType)('SideNavItem'),
174
+ variant: _utils.variantProp.propType
183
175
  };
184
176
  var _default = Item;
185
177
  exports.default = _default;
@@ -295,7 +295,12 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
295
295
  variant: {
296
296
  compact: true,
297
297
  password: true,
298
- inactive: !!variant.inactive
298
+ inactive: variant.inactive,
299
+ size: 'large'
300
+ },
301
+ tokens: {
302
+ width: 40,
303
+ height: 40
299
304
  }
300
305
  }, !showPassword ? 'hide' : 'show'));
301
306
  }
@@ -149,9 +149,11 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
149
149
  content,
150
150
  position = 'auto',
151
151
  copy = 'en',
152
+ onPress = () => {},
152
153
  tokens,
153
154
  variant,
154
155
  inline = false,
156
+ nativeID,
155
157
  ...rest
156
158
  } = _ref6;
157
159
  const [isOpen, setIsOpen] = (0, _react.useState)(false);
@@ -189,7 +191,10 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
189
191
  });
190
192
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('Tooltip', tokens, variant);
191
193
 
192
- const toggleIsOpen = () => setIsOpen(!isOpen);
194
+ const toggleIsOpen = () => {
195
+ onPress();
196
+ setIsOpen(!isOpen);
197
+ };
193
198
 
194
199
  const close = () => setIsOpen(false);
195
200
 
@@ -261,6 +266,7 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
261
266
  hitSlop: pressableHitSlop,
262
267
  accessibilityLabel: getCopy('a11yText'),
263
268
  accessibilityRole: "button",
269
+ nativeID: nativeID,
264
270
  children: typeof control === 'function' ? pressableState => control(getPressableState(pressableState), variant) : control
265
271
  }), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
266
272
  ref: floating,
@@ -178,9 +178,11 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
178
178
  content,
179
179
  position = 'auto',
180
180
  copy = 'en',
181
+ onPress = () => {},
181
182
  tokens,
182
183
  variant,
183
184
  inline = false,
185
+ nativeID,
184
186
  ...rest
185
187
  } = _ref6;
186
188
  const [isOpen, setIsOpen] = (0, _react.useState)(false);
@@ -209,7 +211,10 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
209
211
  return () => subscription === null || subscription === void 0 ? void 0 : subscription.remove();
210
212
  });
211
213
 
212
- const toggleIsOpen = () => setIsOpen(!isOpen);
214
+ const toggleIsOpen = () => {
215
+ onPress();
216
+ setIsOpen(!isOpen);
217
+ };
213
218
 
214
219
  const close = () => setIsOpen(false);
215
220
 
@@ -313,6 +318,7 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)((_ref6, ref) => {
313
318
  hitSlop: pressableHitSlop,
314
319
  accessibilityLabel: getCopy('a11yText'),
315
320
  accessibilityRole: "button",
321
+ nativeID: nativeID,
316
322
  children: typeof control === 'function' ? pressableState => control(getPressableState(pressableState), variant) : control
317
323
  }), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
318
324
  onPress: close,
@@ -37,6 +37,16 @@ const propTypes = {
37
37
  * Display tooltip icon button as an inline element.
38
38
  */
39
39
  inline: _propTypes.default.bool,
40
+
41
+ /**
42
+ * Callback function triggered when the tooltip is pressed.
43
+ */
44
+ onPress: _propTypes.default.func,
45
+
46
+ /**
47
+ * The `id` of the tooltip button.
48
+ */
49
+ nativeID: _propTypes.default.string,
40
50
  tokens: (0, _utils.getTokensPropType)('Tooltip'),
41
51
  variant: _utils.variantProp.propType
42
52
  };
@@ -9,6 +9,10 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
11
11
 
12
+ var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
13
+
14
+ var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
15
+
12
16
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
17
 
14
18
  var _ThemeProvider = require("../ThemeProvider");
@@ -69,7 +73,7 @@ const TooltipButton = _ref3 => {
69
73
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
70
74
  style: [(0, _ThemeProvider.applyOuterBorder)(themeTokens), themeTokens.outerBorderWidth && {
71
75
  margin: -themeTokens.outerBorderWidth
72
- }],
76
+ }, staticStyles.bubblePointerEvents],
73
77
  ...selectProps(rest),
74
78
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
75
79
  style: selectInnerContainerStyles(themeTokens),
@@ -81,6 +85,15 @@ const TooltipButton = _ref3 => {
81
85
  });
82
86
  };
83
87
 
88
+ const staticStyles = _StyleSheet.default.create({
89
+ bubblePointerEvents: { ..._Platform.default.select({
90
+ web: {
91
+ pointerEvents: 'none'
92
+ }
93
+ })
94
+ }
95
+ });
96
+
84
97
  TooltipButton.propTypes = { ...selectedSystemPropTypes,
85
98
 
86
99
  /**
@@ -12,6 +12,7 @@ const Icon = /*#__PURE__*/forwardRef((_ref, ref) => {
12
12
  variant,
13
13
  tokens,
14
14
  scalesWithText = false,
15
+ style = {},
15
16
  dataSet
16
17
  } = _ref;
17
18
  const themeTokens = useThemeTokens('Icon', tokens, variant);
@@ -30,7 +31,8 @@ const Icon = /*#__PURE__*/forwardRef((_ref, ref) => {
30
31
  // TODO: systematise animations.
31
32
  // https://github.com/telus/universal-design-system/issues/487
32
33
  transition: 'transform 200ms, color 200ms',
33
- transform: [themeTokens.scale ? `scale(${themeTokens.scale})` : '', themeTokens.translateX ? `translateX(${themeTokens.translateX}px)` : '', themeTokens.translateY ? `translateY(${themeTokens.translateY}px)` : ''].filter(exists => exists).join(' ')
34
+ transform: [themeTokens.scale ? `scale(${themeTokens.scale})` : '', themeTokens.translateX ? `translateX(${themeTokens.translateX}px)` : '', themeTokens.translateY ? `translateY(${themeTokens.translateY}px)` : ''].filter(exists => exists).join(' '),
35
+ ...style
34
36
  },
35
37
  dataSet: dataSet,
36
38
  children: iconContent
@@ -49,7 +51,18 @@ export const iconComponentPropTypes = {
49
51
  /**
50
52
  * controls whether the icon size should be proportionate to any accessibility-related font scaling.
51
53
  */
52
- scalesWithText: PropTypes.bool
54
+ scalesWithText: PropTypes.bool,
55
+
56
+ /**
57
+ * Custom style object to be applied to the icon component.
58
+ * This is useful for overriding the default icon style but for cases where desires styles are not available as tokens.
59
+ *
60
+ * Note: This prop is only used in web.
61
+ *
62
+ * @example
63
+ * <Icon style={{ color: 'red' }}
64
+ */
65
+ style: PropTypes.object
53
66
  };
54
67
  Icon.propTypes = { ...iconComponentPropTypes,
55
68