@telus-uds/components-base 3.0.0 → 3.2.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +38 -2
  2. package/lib/cjs/Carousel/Carousel.js +6 -7
  3. package/lib/cjs/ExpandCollapse/Panel.js +29 -7
  4. package/lib/cjs/Icon/Icon.js +5 -1
  5. package/lib/cjs/Link/LinkBase.js +1 -1
  6. package/lib/cjs/List/ListItemMark.js +6 -2
  7. package/lib/cjs/Modal/Modal.js +2 -4
  8. package/lib/cjs/Modal/ModalContent.js +1 -1
  9. package/lib/cjs/MultiSelectFilter/MultiSelectFilter.js +3 -1
  10. package/lib/cjs/Notification/Notification.js +15 -26
  11. package/lib/cjs/Tabs/TabsItem.js +6 -2
  12. package/lib/cjs/TextInput/TextInputBase.js +1 -30
  13. package/lib/cjs/Typography/Typography.js +1 -1
  14. package/lib/esm/Carousel/Carousel.js +6 -7
  15. package/lib/esm/ExpandCollapse/Panel.js +29 -7
  16. package/lib/esm/Icon/Icon.js +6 -2
  17. package/lib/esm/Link/LinkBase.js +1 -1
  18. package/lib/esm/List/ListItemMark.js +6 -2
  19. package/lib/esm/Modal/Modal.js +2 -4
  20. package/lib/esm/Modal/ModalContent.js +1 -1
  21. package/lib/esm/MultiSelectFilter/MultiSelectFilter.js +3 -1
  22. package/lib/esm/Notification/Notification.js +16 -27
  23. package/lib/esm/Tabs/TabsItem.js +6 -2
  24. package/lib/esm/TextInput/TextInputBase.js +1 -30
  25. package/lib/esm/Typography/Typography.js +1 -1
  26. package/lib/package.json +2 -2
  27. package/package.json +2 -2
  28. package/src/Carousel/Carousel.jsx +7 -7
  29. package/src/ExpandCollapse/Panel.jsx +44 -14
  30. package/src/Icon/Icon.jsx +4 -3
  31. package/src/Link/LinkBase.jsx +3 -1
  32. package/src/List/ListItemMark.jsx +9 -3
  33. package/src/Modal/Modal.jsx +2 -2
  34. package/src/Modal/ModalContent.jsx +1 -1
  35. package/src/MultiSelectFilter/MultiSelectFilter.jsx +3 -1
  36. package/src/Notification/Notification.jsx +14 -18
  37. package/src/Tabs/TabsItem.jsx +6 -2
  38. package/src/TextInput/TextInputBase.jsx +1 -30
  39. package/src/Typography/Typography.jsx +1 -1
  40. package/types/Listbox.d.ts +60 -0
  41. package/types/index.d.ts +3 -0
package/CHANGELOG.md CHANGED
@@ -1,12 +1,48 @@
1
1
  # Change Log - @telus-uds/components-base
2
2
 
3
- This log was last generated on Fri, 31 Jan 2025 20:49:19 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 14 Feb 2025 18:59:39 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 3.2.0
8
+
9
+ Fri, 14 Feb 2025 18:59:39 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `Link`: refactoring component for koodo brand (Mauricio.BatresMontejo@telus.com)
14
+ - Bump @telus-uds/system-theme-tokens to v4.2.0
15
+
16
+ ### Patches
17
+
18
+ - `Notification`: fix system variant (guillermo.peitzner@telus.com)
19
+ - `Typography`: add default value in text-align (sergio.ramirez@telus.com)
20
+ - `Modal`: Added space below the title when content is passed as a child. (Mauricio.BatresMontejo@telus.com)
21
+
22
+ ## 3.1.0
23
+
24
+ Mon, 10 Feb 2025 17:36:47 GMT
25
+
26
+ ### Minor changes
27
+
28
+ - `TabsItem`: Add new tokens & design (sergio.ramirez@telus.com)
29
+ - `Listbox`: Include export type members for component. (jaime.tuyuc@telus.com)
30
+ - Bump @telus-uds/system-theme-tokens to v4.1.0
31
+
32
+ ### Patches
33
+
34
+ - `Notification`: remove flex 1 as it was breaking notification on IOS (kristina.kirpichnikova@telus.com)
35
+ - Carousel: may throw a runtime error regarding `outline` property (shahzaibkhalidmalik@outlook.com)
36
+ - `Modal`: fix conditional platform rendering (guillermo.peitzner@telus.com)
37
+ - `ChevronLink`: fix icon resize on IOS after font size increase (kristina.kirpichnikova@telus.com)
38
+ - `ExpandCollapse`: Fix when have another ExpandCollapse nested (Mauricio.BatresMontejo@telus.com)
39
+ - `LinkBase`: fix icon alignment (guillermo.peitzner@telus.com)
40
+ - `TextInputBase`: fix rendering on mobile devices and default value rendering (guillermo.peitzner@telus.com)
41
+ - `MultiSelectFilter`: add token to modify icon color background (Mauricio.BatresMontejo@telus.com)
42
+
7
43
  ## 3.0.0
8
44
 
9
- Fri, 31 Jan 2025 20:49:19 GMT
45
+ Fri, 31 Jan 2025 20:53:28 GMT
10
46
 
11
47
  ### Major changes
12
48
 
@@ -41,12 +41,7 @@ const staticStyles = _StyleSheet.default.create({
41
41
  alignItems: 'center',
42
42
  position: 'relative',
43
43
  top: 0,
44
- left: 0,
45
- ..._Platform.default.select({
46
- web: {
47
- outline: 'none'
48
- }
49
- })
44
+ left: 0
50
45
  },
51
46
  animationControlButton: {
52
47
  position: 'absolute',
@@ -752,7 +747,11 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
752
747
  refocus: refocus,
753
748
  width: containerLayout.width,
754
749
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
755
- style: [staticStyles.root],
750
+ style: [staticStyles.root, {
751
+ ...(_Platform.default.OS === 'web' ? {
752
+ outline: 'none'
753
+ } : {})
754
+ }],
756
755
  onLayout: onContainerLayout,
757
756
  ref: ref,
758
757
  ...systemProps,
@@ -9,6 +9,8 @@ var _Animated = _interopRequireDefault(require("react-native-web/dist/cjs/export
9
9
  var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
10
10
  var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
11
11
  var _Text = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Text"));
12
+ var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
13
+ var _ScrollView = _interopRequireDefault(require("react-native-web/dist/cjs/exports/ScrollView"));
12
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
15
  var _airbnbPropTypes = _interopRequireDefault(require("airbnb-prop-types"));
14
16
  var _Control = _interopRequireDefault(require("./Control"));
@@ -127,7 +129,7 @@ const ExpandCollapsePanel = /*#__PURE__*/_react.default.forwardRef((_ref5, ref)
127
129
  expanded: isExpanded
128
130
  });
129
131
  const handleControlPress = event => {
130
- onToggle(panelId, event);
132
+ onToggle?.(panelId, event);
131
133
  if (onPress) onPress(panelId, event);
132
134
  };
133
135
  const onContainerLayout = event => {
@@ -149,7 +151,7 @@ const ExpandCollapsePanel = /*#__PURE__*/_react.default.forwardRef((_ref5, ref)
149
151
  const panelAccessibilityLabel = `${panelId} ${getCopy('panel')}`;
150
152
  const subPanelAccessibilityLabel = `${panelId} ${getCopy('subPanel')}`;
151
153
  return content ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
152
- style: selectContentPanelStyles(themeTokens),
154
+ style: [selectContentPanelStyles(themeTokens), staticStyles.panelContainer],
153
155
  accessibilityLabel: panelAccessibilityLabel,
154
156
  children: typeof children === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
155
157
  style: selectTextStyles(themeTokens),
@@ -158,7 +160,7 @@ const ExpandCollapsePanel = /*#__PURE__*/_react.default.forwardRef((_ref5, ref)
158
160
  }) : children
159
161
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
160
162
  ref: ref,
161
- style: themeTokens,
163
+ style: [themeTokens, staticStyles.container],
162
164
  accessibilityLabel: panelAccessibilityLabel,
163
165
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
164
166
  style: selectControlPanelStyles(themeTokens),
@@ -178,7 +180,7 @@ const ExpandCollapsePanel = /*#__PURE__*/_react.default.forwardRef((_ref5, ref)
178
180
  marginLeft: themeTokens.contentPaddingLeft,
179
181
  marginRight: themeTokens.contentPaddingRight
180
182
  }
181
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Animated.default.View, {
183
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Animated.default.ScrollView, {
182
184
  ref: animatedRef,
183
185
  style: animatedStyles,
184
186
  ...focusabilityProps,
@@ -187,12 +189,22 @@ const ExpandCollapsePanel = /*#__PURE__*/_react.default.forwardRef((_ref5, ref)
187
189
  style: {
188
190
  ..._Platform.default.select({
189
191
  default: {
190
- flex: 1
192
+ flex: 1,
193
+ overflow: 'hidden'
191
194
  },
192
- web: {}
195
+ web: {
196
+ overflow: 'hidden'
197
+ }
193
198
  })
194
199
  },
195
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
200
+ children: _Platform.default.OS === 'web' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
201
+ style: selectContainerStyles(themeTokens),
202
+ accessibilityLabel: subPanelAccessibilityLabel,
203
+ children: children
204
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollView.default, {
205
+ onContentSizeChange: (_, height) => {
206
+ setContainerHeight(height);
207
+ },
196
208
  style: selectContainerStyles(themeTokens),
197
209
  accessibilityLabel: subPanelAccessibilityLabel,
198
210
  children: children
@@ -202,6 +214,16 @@ const ExpandCollapsePanel = /*#__PURE__*/_react.default.forwardRef((_ref5, ref)
202
214
  });
203
215
  });
204
216
  ExpandCollapsePanel.displayName = 'ExpandCollapsePanel';
217
+ const staticStyles = _StyleSheet.default.create({
218
+ container: {
219
+ flex: 1,
220
+ justifyContent: 'flex-start'
221
+ },
222
+ panelContainer: {
223
+ flexGrow: 1,
224
+ alignSelf: 'stretch'
225
+ }
226
+ });
205
227
  ExpandCollapsePanel.propTypes = {
206
228
  ...selectedSystemPropTypes,
207
229
  variant: _utils.variantProp.propType,
@@ -7,6 +7,7 @@ exports.iconComponentPropTypes = exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
9
9
  var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
10
+ var _useWindowDimensions = _interopRequireDefault(require("react-native-web/dist/cjs/exports/useWindowDimensions"));
10
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
12
  var _ThemeProvider = require("../ThemeProvider");
12
13
  var _utils = require("../utils");
@@ -23,7 +24,10 @@ const Icon = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
23
24
  dataSet
24
25
  } = _ref;
25
26
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('Icon', tokens, variant);
26
- const size = scalesWithText ? (0, _utils.scaleWithText)(themeTokens.size) : themeTokens.size;
27
+ const {
28
+ fontScale
29
+ } = (0, _useWindowDimensions.default)();
30
+ const size = scalesWithText ? themeTokens.size * fontScale : themeTokens.size;
27
31
  const iconContent = /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
28
32
  title: accessibilityLabel,
29
33
  size: size,
@@ -103,7 +103,7 @@ const selectIconTokens = _ref5 => {
103
103
  * The base equation is: X/4 + Y/4 - 4 - |X - Y| = Z
104
104
  * where X = blockFontSize, Y = iconSize and Z = translateY
105
105
  */
106
- const translateY = iconTranslateY ?? blockFontSize / 4 + iconSize / 4 - 4 - Math.abs(iconSize - blockFontSize);
106
+ const translateY = iconTranslateY && iconTranslateY !== 0 ? iconTranslateY : blockFontSize / 4 + iconSize / 4 - 4 - Math.abs(iconSize - blockFontSize);
107
107
  return {
108
108
  color,
109
109
  translateX: iconTranslateX,
@@ -51,10 +51,12 @@ const selectBulletPositioningStyles = _ref3 => {
51
51
  const selectBulletContainerStyles = _ref4 => {
52
52
  let {
53
53
  itemBulletContainerWidth,
54
+ itemBulletContainerHeight,
54
55
  itemBulletContainerAlign
55
56
  } = _ref4;
56
57
  return {
57
58
  width: itemBulletContainerWidth,
59
+ height: itemBulletContainerHeight,
58
60
  alignItems: itemBulletContainerAlign
59
61
  };
60
62
  };
@@ -76,10 +78,11 @@ const ListItemMark = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
76
78
  const IconComponent = icon || /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
77
79
  const themeTokens = typeof tokens === 'function' ? tokens() : tokens;
78
80
  const sideItemContainerStyles = selectSideItemContainerStyles(themeTokens);
81
+ const bulletContainerStyles = selectBulletContainerStyles(themeTokens);
79
82
  if (icon) {
80
83
  const iconTokens = selectItemIconTokens(themeTokens);
81
84
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
82
- style: sideItemContainerStyles,
85
+ style: [sideItemContainerStyles, bulletContainerStyles],
83
86
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
84
87
  size: iconSize || iconTokens.size,
85
88
  color: iconColor || iconTokens.color
@@ -101,7 +104,8 @@ const ListItemMark = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
101
104
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
102
105
  icon: bulletIcon,
103
106
  tokens: {
104
- color: bulletColor
107
+ color: bulletColor,
108
+ size: themeTokens.itemIconSize
105
109
  }
106
110
  })
107
111
  })
@@ -230,12 +230,10 @@ const Modal = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
230
230
  confirmButtonVariant: confirmButtonVariant,
231
231
  cancelButtonText: cancelButtonText,
232
232
  cancelButtonType: cancelButtonType,
233
- children: _Platform.default !== 'web' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollView.default, {
233
+ children: _Platform.default.OS !== 'web' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollView.default, {
234
234
  style: selectScrollViewStyles,
235
235
  children: children
236
- }) : {
237
- children
238
- }
236
+ }) : children
239
237
  })]
240
238
  })
241
239
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TouchableWithoutFeedback.default, {
@@ -135,7 +135,7 @@ const ModalContent = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
135
135
  },
136
136
  children: subHeading
137
137
  })
138
- }), Boolean(bodyText && hasHeadingSection) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spacer.default, {
138
+ }), Boolean((bodyText || children) && hasHeadingSection) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Spacer.default, {
139
139
  space: 3
140
140
  })]
141
141
  }), bodyText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
@@ -112,6 +112,7 @@ const MultiSelectFilter = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) =>
112
112
  headerFontColor,
113
113
  headerFontSize,
114
114
  buttonDirection,
115
+ buttonIconBackgroundColor,
115
116
  headerFontWeight,
116
117
  headerLineHeight,
117
118
  subHeaderFontWeight,
@@ -155,7 +156,8 @@ const MultiSelectFilter = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) =>
155
156
  paddingTop: labelPaddingTop,
156
157
  paddingBottom: labelPaddingBottom,
157
158
  paddingLeft: labelPaddingLeft,
158
- paddingRight: labelPaddingRight
159
+ paddingRight: labelPaddingRight,
160
+ iconBackground: buttonIconBackgroundColor
159
161
  };
160
162
  const getButtonDropdownTokens = (0, _ThemeProvider.useThemeTokensCallback)('ButtonDropdown', dropdownTokens, variant);
161
163
  const getButtonTokens = buttonState => (0, _utils.selectTokens)('ButtonDropdown', getButtonDropdownTokens(buttonState));
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
9
- var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
10
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _systemConstants = require("@telus-uds/system-constants");
11
11
  var _ThemeProvider = require("../ThemeProvider");
12
12
  var _utils = require("../utils");
13
13
  var _IconButton = _interopRequireDefault(require("../IconButton"));
@@ -71,12 +71,12 @@ const selectDismissButtonContainerStyles = _ref4 => {
71
71
  };
72
72
  };
73
73
  const selectContentContainerStyle = (themeTokens, maxWidth, viewport, system) => ({
74
- maxWidth: viewport === 'xl' && system === true ? maxWidth : 'auto',
75
- minWidth: viewport === 'xl' && system === true ? maxWidth : 'auto',
74
+ maxWidth: viewport === 'xl' && system === true ? maxWidth : '100%',
75
+ width: '100%',
76
76
  paddingRight: themeTokens?.containerPaddingRight,
77
77
  paddingLeft: themeTokens?.containerPaddingLeft
78
78
  });
79
- const getMediaQueryStyles = (themeTokens, themeOptions, mediaIdsRef, dismissible, viewport, system) => {
79
+ const getMediaQueryStyles = (themeTokens, themeOptions, maxWidth, mediaIdsRef, dismissible, viewport, system) => {
80
80
  const transformedSelectContainerStyles = Object.entries(themeTokens).reduce((acc, _ref5) => {
81
81
  let [vp, viewportTokens] = _ref5;
82
82
  acc[vp] = selectContainerStyles({
@@ -90,7 +90,7 @@ const getMediaQueryStyles = (themeTokens, themeOptions, mediaIdsRef, dismissible
90
90
  styles: containerStyles
91
91
  } = _utils.StyleSheet.create({
92
92
  container: {
93
- flexDirection: system === true && viewport === 'xl' ? 'row' : 'inherit',
93
+ flexDirection: 'column',
94
94
  ...selectContainerMediaQueryStyles
95
95
  }
96
96
  });
@@ -102,22 +102,9 @@ const getMediaQueryStyles = (themeTokens, themeOptions, mediaIdsRef, dismissible
102
102
  flexDirection: 'row',
103
103
  flexShrink: 1,
104
104
  justifyContent: 'space-between',
105
- ...(0, _utils.createMediaQueryStyles)({
106
- xs: {
107
- maxWidth: themeOptions?.contentMaxWidth?.xs || '100%'
108
- },
109
- md: {
110
- maxWidth: themeOptions?.contentMaxWidth?.md || '100%'
111
- },
112
- lg: {
113
- maxWidth: themeOptions?.contentMaxWidth?.lg || '100%'
114
- },
115
- sm: {
116
- maxWidth: themeOptions?.contentMaxWidth?.sm || '100%'
117
- },
118
- xl: {
119
- maxWidth: themeOptions?.contentMaxWidth?.xl || '100%'
120
- }
105
+ ...selectContentContainerStyle(themeTokens, maxWidth, viewport, system),
106
+ ...(system && {
107
+ alignSelf: 'center'
121
108
  })
122
109
  }
123
110
  });
@@ -182,17 +169,19 @@ const getMediaQueryStyles = (themeTokens, themeOptions, mediaIdsRef, dismissible
182
169
  const getDefaultStyles = (themeTokens, themeOptions, maxWidth, dismissible, viewport, system) => ({
183
170
  containerStyles: {
184
171
  container: {
185
- flexDirection: system === true && viewport === 'xl' || _Platform.default.OS === 'android' ? 'row' : 'inherit',
172
+ flexDirection: 'column',
186
173
  ...selectContainerStyles(themeTokens)
187
174
  }
188
175
  },
189
176
  contentContainerStyles: {
190
177
  contentContainer: {
191
- flex: 1,
192
178
  flexDirection: 'row',
193
179
  flexShrink: 1,
194
180
  justifyContent: 'space-between',
195
- ...selectContentContainerStyle(themeTokens, maxWidth, viewport, system)
181
+ ...selectContentContainerStyle(themeTokens, maxWidth, viewport, system),
182
+ ...(system && {
183
+ alignSelf: 'center'
184
+ })
196
185
  }
197
186
  },
198
187
  staticContentContainerStyles: {
@@ -310,7 +299,7 @@ const Notification = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
310
299
  system: isSystemEnabled,
311
300
  viewport
312
301
  });
313
- const maxWidth = (0, _utils.useResponsiveProp)(themeOptions?.contentMaxWidth);
302
+ const maxWidth = _systemConstants.viewports.map.get(_systemConstants.viewports.xl);
314
303
  const notificationComponentRef = _react.default.useRef({
315
304
  containerStyles: {},
316
305
  contentContainerStyles: {},
@@ -332,7 +321,7 @@ const Notification = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
332
321
  selectDismissIconPropsIds: {}
333
322
  });
334
323
  if (enableMediaQueryStyleSheet) {
335
- notificationComponentRef.current = getMediaQueryStyles(themeTokens, themeOptions, mediaIdsRef, dismissible, viewport, isSystemEnabled);
324
+ notificationComponentRef.current = getMediaQueryStyles(themeTokens, themeOptions, maxWidth, mediaIdsRef, dismissible, viewport, isSystemEnabled);
336
325
  } else {
337
326
  notificationComponentRef.current = getDefaultStyles(themeTokens, themeOptions, maxWidth, dismissible, viewport, isSystemEnabled);
338
327
  }
@@ -68,7 +68,9 @@ const selectContainerStyles = _ref3 => {
68
68
  borderWidth = 0,
69
69
  borderRadius,
70
70
  paddingHorizontal = 0,
71
- paddingVertical = 0
71
+ paddingVertical = 0,
72
+ marginHorizontal = 0,
73
+ marginVertical = 0
72
74
  } = _ref3;
73
75
  return {
74
76
  backgroundColor,
@@ -76,7 +78,9 @@ const selectContainerStyles = _ref3 => {
76
78
  borderWidth,
77
79
  borderRadius,
78
80
  paddingHorizontal: paddingHorizontal - borderWidth,
79
- paddingVertical: paddingVertical - borderWidth
81
+ paddingVertical: paddingVertical - borderWidth,
82
+ marginHorizontal,
83
+ marginVertical
80
84
  };
81
85
  };
82
86
 
@@ -370,32 +370,6 @@ const TextInputBase = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
370
370
  ...themeTokens,
371
371
  height
372
372
  }, themeOptions, inactive, type, buttons?.length, themeTokens.buttonSize, buttonsGapSize, isPassword, iconLeftWidth, iconLeftGap, direction);
373
- const {
374
- minHeight = 0,
375
- maxHeight = Infinity
376
- } = nativeInputStyle;
377
- const [inputHeight, setInputHeight] = _react.default.useState(minHeight || 0);
378
-
379
- /* get the new height between the limits and update
380
- the state with the new height */
381
- const measureHeightWeb = _react.default.useCallback(() => {
382
- const el = inputRef.current;
383
- const scrollHeight = el.scrollHeight || 0;
384
- let newHeight = Math.max(scrollHeight, minHeight);
385
- newHeight = Math.min(newHeight, maxHeight);
386
- setInputHeight(newHeight);
387
- }, [inputRef, minHeight, maxHeight]);
388
-
389
- /* restores the height and the value first to then
390
- calculate the height correctly */
391
- _react.default.useEffect(() => {
392
- if (_Platform.default.OS === 'web' && inputRef.current) {
393
- const el = inputRef.current;
394
- el.style.height = 'auto';
395
- el.value = currentValue;
396
- measureHeightWeb();
397
- }
398
- }, [currentValue, measureHeightWeb, inputRef]);
399
373
  const shouldShowSubmitIcon = submitIcon && direction === 'left' && !inactive;
400
374
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
401
375
  style: selectOuterBorderStyles(themeTokens),
@@ -415,10 +389,7 @@ const TextInputBase = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
415
389
  ref: inputRef,
416
390
  keyboardType: isNumeric ? 'numeric' : 'default',
417
391
  inputMode: isNumeric ? 'numeric' : undefined,
418
- style: {
419
- ...nativeInputStyle,
420
- height: Math.max(inputHeight, minHeight)
421
- },
392
+ style: nativeInputStyle,
422
393
  secureTextEntry: isPassword && !showPassword,
423
394
  ...inputProps
424
395
  }), IconComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
@@ -69,7 +69,7 @@ const Typography = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
69
69
  tag = typeof heading === 'string' ? heading : undefined,
70
70
  accessibilityRole = heading === true ? 'header' : undefined,
71
71
  block = false,
72
- align = undefined,
72
+ align = _Platform.default.OS === 'web' ? 'inherit' : undefined,
73
73
  tokens,
74
74
  dataSet,
75
75
  strikeThrough = false,
@@ -34,12 +34,7 @@ const staticStyles = StyleSheet.create({
34
34
  alignItems: 'center',
35
35
  position: 'relative',
36
36
  top: 0,
37
- left: 0,
38
- ...Platform.select({
39
- web: {
40
- outline: 'none'
41
- }
42
- })
37
+ left: 0
43
38
  },
44
39
  animationControlButton: {
45
40
  position: 'absolute',
@@ -745,7 +740,11 @@ const Carousel = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
745
740
  refocus: refocus,
746
741
  width: containerLayout.width,
747
742
  children: [/*#__PURE__*/_jsxs(View, {
748
- style: [staticStyles.root],
743
+ style: [staticStyles.root, {
744
+ ...(Platform.OS === 'web' ? {
745
+ outline: 'none'
746
+ } : {})
747
+ }],
749
748
  onLayout: onContainerLayout,
750
749
  ref: ref,
751
750
  ...systemProps,
@@ -3,6 +3,8 @@ import Animated from "react-native-web/dist/exports/Animated";
3
3
  import Platform from "react-native-web/dist/exports/Platform";
4
4
  import View from "react-native-web/dist/exports/View";
5
5
  import Text from "react-native-web/dist/exports/Text";
6
+ import StyleSheet from "react-native-web/dist/exports/StyleSheet";
7
+ import ScrollView from "react-native-web/dist/exports/ScrollView";
6
8
  import PropTypes from 'prop-types';
7
9
  import ABBPropTypes from 'airbnb-prop-types';
8
10
  import ExpandCollapseControl from './Control';
@@ -120,7 +122,7 @@ const ExpandCollapsePanel = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
120
122
  expanded: isExpanded
121
123
  });
122
124
  const handleControlPress = event => {
123
- onToggle(panelId, event);
125
+ onToggle?.(panelId, event);
124
126
  if (onPress) onPress(panelId, event);
125
127
  };
126
128
  const onContainerLayout = event => {
@@ -142,7 +144,7 @@ const ExpandCollapsePanel = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
142
144
  const panelAccessibilityLabel = `${panelId} ${getCopy('panel')}`;
143
145
  const subPanelAccessibilityLabel = `${panelId} ${getCopy('subPanel')}`;
144
146
  return content ? /*#__PURE__*/_jsx(View, {
145
- style: selectContentPanelStyles(themeTokens),
147
+ style: [selectContentPanelStyles(themeTokens), staticStyles.panelContainer],
146
148
  accessibilityLabel: panelAccessibilityLabel,
147
149
  children: typeof children === 'string' ? /*#__PURE__*/_jsx(Text, {
148
150
  style: selectTextStyles(themeTokens),
@@ -151,7 +153,7 @@ const ExpandCollapsePanel = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
151
153
  }) : children
152
154
  }) : /*#__PURE__*/_jsxs(View, {
153
155
  ref: ref,
154
- style: themeTokens,
156
+ style: [themeTokens, staticStyles.container],
155
157
  accessibilityLabel: panelAccessibilityLabel,
156
158
  children: [/*#__PURE__*/_jsx(View, {
157
159
  style: selectControlPanelStyles(themeTokens),
@@ -171,7 +173,7 @@ const ExpandCollapsePanel = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
171
173
  marginLeft: themeTokens.contentPaddingLeft,
172
174
  marginRight: themeTokens.contentPaddingRight
173
175
  }
174
- }), /*#__PURE__*/_jsx(Animated.View, {
176
+ }), /*#__PURE__*/_jsx(Animated.ScrollView, {
175
177
  ref: animatedRef,
176
178
  style: animatedStyles,
177
179
  ...focusabilityProps,
@@ -180,12 +182,22 @@ const ExpandCollapsePanel = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
180
182
  style: {
181
183
  ...Platform.select({
182
184
  default: {
183
- flex: 1
185
+ flex: 1,
186
+ overflow: 'hidden'
184
187
  },
185
- web: {}
188
+ web: {
189
+ overflow: 'hidden'
190
+ }
186
191
  })
187
192
  },
188
- children: /*#__PURE__*/_jsx(View, {
193
+ children: Platform.OS === 'web' ? /*#__PURE__*/_jsx(View, {
194
+ style: selectContainerStyles(themeTokens),
195
+ accessibilityLabel: subPanelAccessibilityLabel,
196
+ children: children
197
+ }) : /*#__PURE__*/_jsx(ScrollView, {
198
+ onContentSizeChange: (_, height) => {
199
+ setContainerHeight(height);
200
+ },
189
201
  style: selectContainerStyles(themeTokens),
190
202
  accessibilityLabel: subPanelAccessibilityLabel,
191
203
  children: children
@@ -195,6 +207,16 @@ const ExpandCollapsePanel = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
195
207
  });
196
208
  });
197
209
  ExpandCollapsePanel.displayName = 'ExpandCollapsePanel';
210
+ const staticStyles = StyleSheet.create({
211
+ container: {
212
+ flex: 1,
213
+ justifyContent: 'flex-start'
214
+ },
215
+ panelContainer: {
216
+ flexGrow: 1,
217
+ alignSelf: 'stretch'
218
+ }
219
+ });
198
220
  ExpandCollapsePanel.propTypes = {
199
221
  ...selectedSystemPropTypes,
200
222
  variant: variantProp.propType,
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import Platform from "react-native-web/dist/exports/Platform";
3
3
  import View from "react-native-web/dist/exports/View";
4
+ import useWindowDimensions from "react-native-web/dist/exports/useWindowDimensions";
4
5
  import PropTypes from 'prop-types';
5
6
  import { useThemeTokens } from '../ThemeProvider';
6
- import { getTokensPropType, scaleWithText, variantProp } from '../utils';
7
+ import { getTokensPropType, variantProp } from '../utils';
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  const Icon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
9
10
  let {
@@ -16,7 +17,10 @@ const Icon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
16
17
  dataSet
17
18
  } = _ref;
18
19
  const themeTokens = useThemeTokens('Icon', tokens, variant);
19
- const size = scalesWithText ? scaleWithText(themeTokens.size) : themeTokens.size;
20
+ const {
21
+ fontScale
22
+ } = useWindowDimensions();
23
+ const size = scalesWithText ? themeTokens.size * fontScale : themeTokens.size;
20
24
  const iconContent = /*#__PURE__*/_jsx(IconComponent, {
21
25
  title: accessibilityLabel,
22
26
  size: size,
@@ -96,7 +96,7 @@ const selectIconTokens = _ref5 => {
96
96
  * The base equation is: X/4 + Y/4 - 4 - |X - Y| = Z
97
97
  * where X = blockFontSize, Y = iconSize and Z = translateY
98
98
  */
99
- const translateY = iconTranslateY ?? blockFontSize / 4 + iconSize / 4 - 4 - Math.abs(iconSize - blockFontSize);
99
+ const translateY = iconTranslateY && iconTranslateY !== 0 ? iconTranslateY : blockFontSize / 4 + iconSize / 4 - 4 - Math.abs(iconSize - blockFontSize);
100
100
  return {
101
101
  color,
102
102
  translateX: iconTranslateX,
@@ -44,10 +44,12 @@ const selectBulletPositioningStyles = _ref3 => {
44
44
  const selectBulletContainerStyles = _ref4 => {
45
45
  let {
46
46
  itemBulletContainerWidth,
47
+ itemBulletContainerHeight,
47
48
  itemBulletContainerAlign
48
49
  } = _ref4;
49
50
  return {
50
51
  width: itemBulletContainerWidth,
52
+ height: itemBulletContainerHeight,
51
53
  alignItems: itemBulletContainerAlign
52
54
  };
53
55
  };
@@ -69,10 +71,11 @@ const ListItemMark = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
69
71
  const IconComponent = icon || /*#__PURE__*/_jsx(_Fragment, {});
70
72
  const themeTokens = typeof tokens === 'function' ? tokens() : tokens;
71
73
  const sideItemContainerStyles = selectSideItemContainerStyles(themeTokens);
74
+ const bulletContainerStyles = selectBulletContainerStyles(themeTokens);
72
75
  if (icon) {
73
76
  const iconTokens = selectItemIconTokens(themeTokens);
74
77
  return /*#__PURE__*/_jsx(View, {
75
- style: sideItemContainerStyles,
78
+ style: [sideItemContainerStyles, bulletContainerStyles],
76
79
  children: /*#__PURE__*/_jsx(IconComponent, {
77
80
  size: iconSize || iconTokens.size,
78
81
  color: iconColor || iconTokens.color
@@ -94,7 +97,8 @@ const ListItemMark = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
94
97
  children: /*#__PURE__*/_jsx(Icon, {
95
98
  icon: bulletIcon,
96
99
  tokens: {
97
- color: bulletColor
100
+ color: bulletColor,
101
+ size: themeTokens.itemIconSize
98
102
  }
99
103
  })
100
104
  })
@@ -223,12 +223,10 @@ const Modal = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
223
223
  confirmButtonVariant: confirmButtonVariant,
224
224
  cancelButtonText: cancelButtonText,
225
225
  cancelButtonType: cancelButtonType,
226
- children: Platform !== 'web' ? /*#__PURE__*/_jsx(ScrollView, {
226
+ children: Platform.OS !== 'web' ? /*#__PURE__*/_jsx(ScrollView, {
227
227
  style: selectScrollViewStyles,
228
228
  children: children
229
- }) : {
230
- children
231
- }
229
+ }) : children
232
230
  })]
233
231
  })
234
232
  }), /*#__PURE__*/_jsx(TouchableWithoutFeedback, {