@telus-uds/components-base 1.8.1 → 1.8.4

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 (288) hide show
  1. package/CHANGELOG.md +35 -2
  2. package/component-docs.json +711 -669
  3. package/lib/A11yInfoProvider/index.js +4 -3
  4. package/lib/A11yText/index.js +6 -5
  5. package/lib/ActivityIndicator/Spinner.js +14 -13
  6. package/lib/ActivityIndicator/Spinner.native.js +10 -8
  7. package/lib/ActivityIndicator/index.js +6 -5
  8. package/lib/ActivityIndicator/shared.js +1 -1
  9. package/lib/BaseProvider/index.js +13 -10
  10. package/lib/Box/Box.js +20 -19
  11. package/lib/Button/Button.js +7 -6
  12. package/lib/Button/ButtonBase.js +97 -79
  13. package/lib/Button/ButtonGroup.js +34 -32
  14. package/lib/Button/ButtonLink.js +9 -7
  15. package/lib/Button/index.js +4 -4
  16. package/lib/Button/propTypes.js +1 -1
  17. package/lib/Card/Card.js +8 -7
  18. package/lib/Card/CardBase.js +35 -31
  19. package/lib/Card/PressableCardBase.js +14 -12
  20. package/lib/Checkbox/Checkbox.js +97 -83
  21. package/lib/Checkbox/CheckboxGroup.js +29 -27
  22. package/lib/Checkbox/CheckboxInput.js +12 -10
  23. package/lib/Divider/Divider.js +10 -9
  24. package/lib/ExpandCollapse/Control.js +42 -36
  25. package/lib/ExpandCollapse/ExpandCollapse.js +11 -10
  26. package/lib/ExpandCollapse/Panel.js +29 -40
  27. package/lib/Feedback/Feedback.js +48 -35
  28. package/lib/Fieldset/Fieldset.js +16 -15
  29. package/lib/Fieldset/FieldsetContainer.js +16 -13
  30. package/lib/Fieldset/FieldsetContainer.native.js +11 -8
  31. package/lib/Fieldset/Legend.js +10 -7
  32. package/lib/Fieldset/Legend.native.js +10 -7
  33. package/lib/FlexGrid/Col/Col.js +18 -17
  34. package/lib/FlexGrid/FlexGrid.js +15 -14
  35. package/lib/FlexGrid/Row/Row.js +13 -12
  36. package/lib/HorizontalScroll/HorizontalScroll.js +25 -20
  37. package/lib/HorizontalScroll/HorizontalScrollButton.js +18 -14
  38. package/lib/HorizontalScroll/ScrollViewEnd.js +6 -5
  39. package/lib/HorizontalScroll/ScrollViewEnd.native.js +12 -9
  40. package/lib/HorizontalScroll/itemPositions.js +19 -13
  41. package/lib/Icon/Icon.js +11 -10
  42. package/lib/Icon/IconText.js +8 -7
  43. package/lib/Icon/index.js +5 -5
  44. package/lib/IconButton/IconButton.js +50 -42
  45. package/lib/InputLabel/InputLabel.js +37 -30
  46. package/lib/InputLabel/LabelContent.js +12 -9
  47. package/lib/InputLabel/LabelContent.native.js +9 -6
  48. package/lib/InputSupports/InputSupports.js +11 -10
  49. package/lib/InputSupports/useInputSupports.js +7 -6
  50. package/lib/Link/ChevronLink.js +9 -8
  51. package/lib/Link/InlinePressable.js +13 -10
  52. package/lib/Link/InlinePressable.native.js +20 -16
  53. package/lib/Link/Link.js +10 -9
  54. package/lib/Link/LinkBase.js +96 -78
  55. package/lib/Link/TextButton.js +9 -8
  56. package/lib/List/List.js +20 -13
  57. package/lib/List/ListItem.js +103 -79
  58. package/lib/Modal/Modal.js +74 -60
  59. package/lib/Notification/Notification.js +46 -33
  60. package/lib/Pagination/PageButton.js +13 -12
  61. package/lib/Pagination/Pagination.js +43 -30
  62. package/lib/Pagination/SideButton.js +21 -18
  63. package/lib/Pagination/usePagination.js +7 -6
  64. package/lib/Progress/Progress.js +23 -19
  65. package/lib/Progress/ProgressBar.js +25 -21
  66. package/lib/Progress/ProgressBarBackground.js +7 -6
  67. package/lib/Radio/Radio.js +80 -69
  68. package/lib/Radio/RadioButton.js +63 -53
  69. package/lib/Radio/RadioGroup.js +30 -28
  70. package/lib/Radio/RadioInput.js +12 -10
  71. package/lib/RadioCard/RadioCard.js +16 -15
  72. package/lib/RadioCard/RadioCardGroup.js +30 -28
  73. package/lib/Search/Search.js +52 -32
  74. package/lib/Select/Group.js +5 -4
  75. package/lib/Select/Group.native.js +4 -3
  76. package/lib/Select/Item.js +10 -7
  77. package/lib/Select/Item.native.js +1 -9
  78. package/lib/Select/Picker.js +16 -15
  79. package/lib/Select/Picker.native.js +49 -38
  80. package/lib/Select/Select.js +134 -113
  81. package/lib/SideNav/Item.js +39 -33
  82. package/lib/SideNav/ItemContent.js +15 -12
  83. package/lib/SideNav/ItemsGroup.js +13 -11
  84. package/lib/SideNav/SideNav.js +21 -18
  85. package/lib/Skeleton/Skeleton.js +60 -44
  86. package/lib/Skeleton/skeleton.constant.js +1 -1
  87. package/lib/Skeleton/skeletonWebAnimation.js +1 -1
  88. package/lib/Spacer/Spacer.js +6 -5
  89. package/lib/StackView/StackView.js +12 -11
  90. package/lib/StackView/StackWrap.js +5 -3
  91. package/lib/StackView/StackWrapBox.js +12 -11
  92. package/lib/StackView/StackWrapGap.js +11 -10
  93. package/lib/StackView/common.js +14 -11
  94. package/lib/StackView/getStackedContent.js +10 -9
  95. package/lib/StackView/index.js +1 -1
  96. package/lib/StepTracker/Step.js +122 -103
  97. package/lib/StepTracker/StepTracker.js +48 -38
  98. package/lib/Tabs/Tabs.js +57 -27
  99. package/lib/Tabs/TabsItem.js +78 -68
  100. package/lib/Tags/Tags.js +68 -62
  101. package/lib/TextInput/TextArea.js +26 -20
  102. package/lib/TextInput/TextInput.js +20 -15
  103. package/lib/TextInput/TextInputBase.js +74 -62
  104. package/lib/TextInput/index.js +4 -4
  105. package/lib/ThemeProvider/ThemeProvider.js +6 -5
  106. package/lib/ThemeProvider/index.js +5 -5
  107. package/lib/ThemeProvider/useSetTheme.js +6 -3
  108. package/lib/ThemeProvider/useThemeTokens.js +7 -2
  109. package/lib/ThemeProvider/utils/styles.js +50 -43
  110. package/lib/ThemeProvider/utils/theme-tokens.js +33 -21
  111. package/lib/ToggleSwitch/ToggleSwitch.js +90 -74
  112. package/lib/ToggleSwitch/ToggleSwitchGroup.js +37 -35
  113. package/lib/Tooltip/Backdrop.js +6 -13
  114. package/lib/Tooltip/Backdrop.native.js +5 -4
  115. package/lib/Tooltip/Tooltip.js +81 -65
  116. package/lib/Tooltip/getTooltipPosition.js +29 -18
  117. package/lib/TooltipButton/TooltipButton.js +28 -21
  118. package/lib/Typography/Typography.js +37 -33
  119. package/lib/ViewportProvider/ViewportProvider.js +4 -3
  120. package/lib/ViewportProvider/useViewportListener.js +6 -3
  121. package/lib/index.js +54 -54
  122. package/lib/utils/a11y/semantics.js +5 -2
  123. package/lib/utils/a11y/textSize.js +8 -6
  124. package/lib/utils/animation/useVerticalExpandAnimation.js +46 -19
  125. package/lib/utils/children.js +4 -3
  126. package/lib/utils/index.js +10 -10
  127. package/lib/utils/input.js +28 -29
  128. package/lib/utils/pressability.js +36 -22
  129. package/lib/utils/props/clickProps.js +2 -1
  130. package/lib/utils/props/componentPropType.js +3 -3
  131. package/lib/utils/props/getPropSelector.js +6 -3
  132. package/lib/utils/props/handlerProps.js +25 -19
  133. package/lib/utils/props/hrefAttrsProp.js +14 -11
  134. package/lib/utils/props/index.js +12 -12
  135. package/lib/utils/props/inputSupportsProps.js +15 -12
  136. package/lib/utils/props/linkProps.js +7 -6
  137. package/lib/utils/props/pressProps.js +1 -1
  138. package/lib/utils/props/selectSystemProps.js +2 -2
  139. package/lib/utils/props/tokens.js +29 -15
  140. package/lib/utils/ssr.js +6 -2
  141. package/lib/utils/useCopy.js +6 -4
  142. package/lib/utils/useHash.js +2 -1
  143. package/lib/utils/useResponsiveProp.js +1 -1
  144. package/lib/utils/useSpacingScale.js +3 -1
  145. package/lib/utils/useUniqueId.js +3 -2
  146. package/lib/utils/withLinkRouter.js +6 -5
  147. package/lib-module/A11yInfoProvider/index.js +4 -3
  148. package/lib-module/A11yText/index.js +6 -5
  149. package/lib-module/ActivityIndicator/Spinner.js +14 -13
  150. package/lib-module/ActivityIndicator/Spinner.native.js +9 -8
  151. package/lib-module/ActivityIndicator/index.js +6 -5
  152. package/lib-module/BaseProvider/index.js +13 -10
  153. package/lib-module/Box/Box.js +20 -19
  154. package/lib-module/Button/Button.js +7 -6
  155. package/lib-module/Button/ButtonBase.js +96 -79
  156. package/lib-module/Button/ButtonGroup.js +34 -32
  157. package/lib-module/Button/ButtonLink.js +8 -7
  158. package/lib-module/Card/Card.js +8 -7
  159. package/lib-module/Card/CardBase.js +35 -31
  160. package/lib-module/Card/PressableCardBase.js +12 -11
  161. package/lib-module/Checkbox/Checkbox.js +97 -83
  162. package/lib-module/Checkbox/CheckboxGroup.js +29 -27
  163. package/lib-module/Checkbox/CheckboxInput.js +12 -10
  164. package/lib-module/Divider/Divider.js +10 -9
  165. package/lib-module/ExpandCollapse/Control.js +42 -36
  166. package/lib-module/ExpandCollapse/ExpandCollapse.js +11 -10
  167. package/lib-module/ExpandCollapse/Panel.js +29 -37
  168. package/lib-module/Feedback/Feedback.js +46 -33
  169. package/lib-module/Fieldset/Fieldset.js +16 -15
  170. package/lib-module/Fieldset/FieldsetContainer.js +16 -13
  171. package/lib-module/Fieldset/FieldsetContainer.native.js +11 -8
  172. package/lib-module/Fieldset/Legend.js +10 -7
  173. package/lib-module/Fieldset/Legend.native.js +10 -7
  174. package/lib-module/FlexGrid/Col/Col.js +18 -17
  175. package/lib-module/FlexGrid/FlexGrid.js +15 -14
  176. package/lib-module/FlexGrid/Row/Row.js +13 -12
  177. package/lib-module/HorizontalScroll/HorizontalScroll.js +24 -19
  178. package/lib-module/HorizontalScroll/HorizontalScrollButton.js +18 -14
  179. package/lib-module/HorizontalScroll/ScrollViewEnd.js +6 -5
  180. package/lib-module/HorizontalScroll/ScrollViewEnd.native.js +12 -9
  181. package/lib-module/HorizontalScroll/itemPositions.js +18 -12
  182. package/lib-module/Icon/Icon.js +10 -9
  183. package/lib-module/Icon/IconText.js +9 -7
  184. package/lib-module/IconButton/IconButton.js +48 -41
  185. package/lib-module/InputLabel/InputLabel.js +37 -30
  186. package/lib-module/InputLabel/LabelContent.js +12 -9
  187. package/lib-module/InputLabel/LabelContent.native.js +9 -6
  188. package/lib-module/InputSupports/InputSupports.js +11 -10
  189. package/lib-module/InputSupports/useInputSupports.js +7 -6
  190. package/lib-module/Link/ChevronLink.js +9 -8
  191. package/lib-module/Link/InlinePressable.js +13 -10
  192. package/lib-module/Link/InlinePressable.native.js +20 -16
  193. package/lib-module/Link/Link.js +10 -9
  194. package/lib-module/Link/LinkBase.js +94 -77
  195. package/lib-module/Link/TextButton.js +9 -8
  196. package/lib-module/List/List.js +20 -13
  197. package/lib-module/List/ListItem.js +103 -78
  198. package/lib-module/Modal/Modal.js +74 -60
  199. package/lib-module/Notification/Notification.js +46 -33
  200. package/lib-module/Pagination/PageButton.js +13 -12
  201. package/lib-module/Pagination/Pagination.js +43 -30
  202. package/lib-module/Pagination/SideButton.js +21 -18
  203. package/lib-module/Pagination/usePagination.js +7 -6
  204. package/lib-module/Progress/Progress.js +23 -19
  205. package/lib-module/Progress/ProgressBar.js +25 -21
  206. package/lib-module/Progress/ProgressBarBackground.js +7 -6
  207. package/lib-module/Radio/Radio.js +80 -69
  208. package/lib-module/Radio/RadioButton.js +62 -52
  209. package/lib-module/Radio/RadioGroup.js +30 -28
  210. package/lib-module/Radio/RadioInput.js +12 -10
  211. package/lib-module/RadioCard/RadioCard.js +16 -15
  212. package/lib-module/RadioCard/RadioCardGroup.js +30 -28
  213. package/lib-module/Search/Search.js +52 -32
  214. package/lib-module/Select/Group.js +5 -4
  215. package/lib-module/Select/Group.native.js +4 -3
  216. package/lib-module/Select/Item.js +10 -7
  217. package/lib-module/Select/Item.native.js +1 -7
  218. package/lib-module/Select/Picker.js +16 -15
  219. package/lib-module/Select/Picker.native.js +46 -36
  220. package/lib-module/Select/Select.js +134 -113
  221. package/lib-module/SideNav/Item.js +39 -33
  222. package/lib-module/SideNav/ItemContent.js +14 -11
  223. package/lib-module/SideNav/ItemsGroup.js +13 -11
  224. package/lib-module/SideNav/SideNav.js +21 -18
  225. package/lib-module/Skeleton/Skeleton.js +60 -44
  226. package/lib-module/Skeleton/skeletonWebAnimation.js +1 -1
  227. package/lib-module/Spacer/Spacer.js +6 -5
  228. package/lib-module/StackView/StackView.js +12 -11
  229. package/lib-module/StackView/StackWrap.js +5 -3
  230. package/lib-module/StackView/StackWrapBox.js +12 -11
  231. package/lib-module/StackView/StackWrapGap.js +11 -10
  232. package/lib-module/StackView/common.js +14 -11
  233. package/lib-module/StackView/getStackedContent.js +10 -9
  234. package/lib-module/StepTracker/Step.js +122 -103
  235. package/lib-module/StepTracker/StepTracker.js +48 -38
  236. package/lib-module/Tabs/Tabs.js +57 -27
  237. package/lib-module/Tabs/TabsItem.js +77 -68
  238. package/lib-module/Tags/Tags.js +68 -62
  239. package/lib-module/TextInput/TextArea.js +26 -20
  240. package/lib-module/TextInput/TextInput.js +19 -15
  241. package/lib-module/TextInput/TextInputBase.js +74 -62
  242. package/lib-module/ThemeProvider/ThemeProvider.js +5 -4
  243. package/lib-module/ThemeProvider/useSetTheme.js +6 -3
  244. package/lib-module/ThemeProvider/useThemeTokens.js +7 -2
  245. package/lib-module/ThemeProvider/utils/styles.js +48 -41
  246. package/lib-module/ThemeProvider/utils/theme-tokens.js +32 -20
  247. package/lib-module/ToggleSwitch/ToggleSwitch.js +90 -74
  248. package/lib-module/ToggleSwitch/ToggleSwitchGroup.js +37 -35
  249. package/lib-module/Tooltip/Backdrop.js +6 -13
  250. package/lib-module/Tooltip/Backdrop.native.js +5 -4
  251. package/lib-module/Tooltip/Tooltip.js +81 -65
  252. package/lib-module/Tooltip/getTooltipPosition.js +29 -18
  253. package/lib-module/TooltipButton/TooltipButton.js +28 -21
  254. package/lib-module/Typography/Typography.js +35 -31
  255. package/lib-module/ViewportProvider/ViewportProvider.js +4 -3
  256. package/lib-module/ViewportProvider/useViewportListener.js +6 -3
  257. package/lib-module/utils/a11y/semantics.js +4 -1
  258. package/lib-module/utils/a11y/textSize.js +7 -5
  259. package/lib-module/utils/animation/useVerticalExpandAnimation.js +47 -20
  260. package/lib-module/utils/children.js +4 -3
  261. package/lib-module/utils/input.js +28 -29
  262. package/lib-module/utils/pressability.js +35 -21
  263. package/lib-module/utils/props/clickProps.js +2 -1
  264. package/lib-module/utils/props/componentPropType.js +3 -3
  265. package/lib-module/utils/props/getPropSelector.js +6 -3
  266. package/lib-module/utils/props/handlerProps.js +24 -18
  267. package/lib-module/utils/props/hrefAttrsProp.js +14 -11
  268. package/lib-module/utils/props/inputSupportsProps.js +15 -12
  269. package/lib-module/utils/props/linkProps.js +7 -6
  270. package/lib-module/utils/props/selectSystemProps.js +2 -2
  271. package/lib-module/utils/props/tokens.js +27 -14
  272. package/lib-module/utils/ssr.js +5 -2
  273. package/lib-module/utils/useCopy.js +6 -4
  274. package/lib-module/utils/useHash.js +2 -1
  275. package/lib-module/utils/useSpacingScale.js +3 -1
  276. package/lib-module/utils/useUniqueId.js +3 -2
  277. package/lib-module/utils/withLinkRouter.js +6 -5
  278. package/package.json +13 -11
  279. package/src/ExpandCollapse/Panel.jsx +2 -19
  280. package/src/List/List.jsx +34 -19
  281. package/src/List/ListItem.jsx +12 -2
  282. package/src/Modal/Modal.jsx +2 -1
  283. package/src/Pagination/Pagination.jsx +3 -0
  284. package/src/Search/Search.jsx +11 -0
  285. package/src/Select/Item.native.jsx +0 -7
  286. package/src/Tabs/Tabs.jsx +24 -2
  287. package/src/Tabs/TabsItem.jsx +6 -5
  288. package/src/utils/animation/useVerticalExpandAnimation.js +47 -13
@@ -33,48 +33,61 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
33
33
 
34
34
  const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
35
35
 
36
- const selectSkeletonStyles = ({
37
- color,
38
- radius,
39
- fadeAnimation
40
- }) => ({
41
- backgroundColor: color,
42
- borderRadius: radius,
43
- ...fadeAnimation
44
- });
36
+ const selectSkeletonStyles = _ref => {
37
+ let {
38
+ color,
39
+ radius,
40
+ fadeAnimation
41
+ } = _ref;
42
+ return {
43
+ backgroundColor: color,
44
+ borderRadius: radius,
45
+ ...fadeAnimation
46
+ };
47
+ };
45
48
 
46
- const selectLineStyles = ({
47
- skeletonHeight,
48
- lineWidth
49
- }) => ({
50
- width: lineWidth,
51
- height: skeletonHeight
52
- });
49
+ const selectLineStyles = _ref2 => {
50
+ let {
51
+ skeletonHeight,
52
+ lineWidth
53
+ } = _ref2;
54
+ return {
55
+ width: lineWidth,
56
+ height: skeletonHeight
57
+ };
58
+ };
53
59
 
54
- const selectShapeStyles = ({
55
- skeletonHeight
56
- }) => ({
57
- height: skeletonHeight,
58
- width: skeletonHeight
59
- });
60
+ const selectShapeStyles = _ref3 => {
61
+ let {
62
+ skeletonHeight
63
+ } = _ref3;
64
+ return {
65
+ height: skeletonHeight,
66
+ width: skeletonHeight
67
+ };
68
+ };
60
69
 
61
- const selectSquareStyles = ({
62
- radius
63
- }) => ({
64
- borderRadius: radius
65
- });
70
+ const selectSquareStyles = _ref4 => {
71
+ let {
72
+ radius
73
+ } = _ref4;
74
+ return {
75
+ borderRadius: radius
76
+ };
77
+ };
66
78
 
67
- const Skeleton = /*#__PURE__*/(0, _react.forwardRef)(({
68
- tokens,
69
- variant,
70
- size,
71
- sizeIndex = size,
72
- sizePixels,
73
- characters,
74
- lines,
75
- shape = 'line',
76
- ...rest
77
- }, ref) => {
79
+ const Skeleton = /*#__PURE__*/(0, _react.forwardRef)((_ref5, ref) => {
80
+ let {
81
+ tokens,
82
+ variant,
83
+ size,
84
+ sizeIndex = size,
85
+ sizePixels,
86
+ characters,
87
+ lines,
88
+ shape = 'line',
89
+ ...rest
90
+ } = _ref5;
78
91
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('Skeleton', tokens, variant);
79
92
  const pixels = (0, _utils.useResponsiveProp)(sizePixels);
80
93
  const spacingScaleValue = typeof pixels === 'number' ? // Size by an exact number of pixels
@@ -124,12 +137,15 @@ const Skeleton = /*#__PURE__*/(0, _react.forwardRef)(({
124
137
  });
125
138
  };
126
139
 
127
- const renderSkeleton = (index = 0) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Animated.default.View, {
128
- testID: "skeleton",
129
- style: [selectSkeletonStyles({ ...themeTokens,
130
- fadeAnimation: getAnimationBaseOnPlatform()
131
- }), getStyledBasedOnShape()]
132
- }, `skeleton-${index + 1}`);
140
+ const renderSkeleton = function () {
141
+ let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
142
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Animated.default.View, {
143
+ testID: "skeleton",
144
+ style: [selectSkeletonStyles({ ...themeTokens,
145
+ fadeAnimation: getAnimationBaseOnPlatform()
146
+ }), getStyledBasedOnShape()]
147
+ }, "skeleton-".concat(index + 1));
148
+ };
133
149
 
134
150
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StackView.default, {
135
151
  space: themeTokens.spaceBetweenLines,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ANIMATION_DURATION = exports.OPACITY_STOP = exports.DEFAULT_OPACITY = void 0;
6
+ exports.OPACITY_STOP = exports.DEFAULT_OPACITY = exports.ANIMATION_DURATION = void 0;
7
7
  const DEFAULT_OPACITY = 1;
8
8
  exports.DEFAULT_OPACITY = DEFAULT_OPACITY;
9
9
  const OPACITY_STOP = 0.4;
@@ -8,7 +8,7 @@ exports.default = void 0;
8
8
  var _skeleton = require("./skeleton.constant");
9
9
 
10
10
  var _default = {
11
- animationDuration: `${_skeleton.ANIMATION_DURATION}ms`,
11
+ animationDuration: "".concat(_skeleton.ANIMATION_DURATION, "ms"),
12
12
  animationTimingFunction: 'ease-in-out',
13
13
  animationDelay: '0.5s',
14
14
  animationIterationCount: 'infinite',
@@ -76,11 +76,12 @@ const selectSizeStyle = (size, direction) => ({
76
76
  */
77
77
 
78
78
 
79
- const Spacer = /*#__PURE__*/(0, _react.forwardRef)(({
80
- space = 1,
81
- direction = 'column',
82
- ...rest
83
- }, ref) => {
79
+ const Spacer = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
80
+ let {
81
+ space = 1,
82
+ direction = 'column',
83
+ ...rest
84
+ } = _ref;
84
85
  const size = (0, _utils.useSpacingScale)(space);
85
86
  const sizeStyle = selectSizeStyle(size, direction);
86
87
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
@@ -75,17 +75,18 @@ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_u
75
75
  * semantic role but only on web, not within native apps).
76
76
  */
77
77
 
78
- const StackView = /*#__PURE__*/(0, _react.forwardRef)(({
79
- space = 1,
80
- divider,
81
- direction: directionProp = 'column',
82
- children,
83
- variant,
84
- tokens,
85
- tag,
86
- accessibilityRole,
87
- ...rest
88
- }, ref) => {
78
+ const StackView = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
79
+ let {
80
+ space = 1,
81
+ divider,
82
+ direction: directionProp = 'column',
83
+ children,
84
+ variant,
85
+ tokens,
86
+ tag,
87
+ accessibilityRole,
88
+ ...rest
89
+ } = _ref;
89
90
  const viewport = (0, _ViewportProvider.useViewport)();
90
91
  const direction = (0, _utils.useResponsiveProp)(directionProp, 'column');
91
92
  const selectedProps = selectProps({ ...(0, _utils.getA11yPropsFromHtmlTag)(tag, accessibilityRole),
@@ -22,10 +22,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
22
22
  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; }
23
23
 
24
24
  // In Jest/CI/SSR, global CSS isn't always available and doesn't always have .supports method
25
- const cssSupports = (...args) => {
25
+ const cssSupports = function () {
26
26
  var _window$CSS;
27
27
 
28
- return typeof window !== 'undefined' && typeof ((_window$CSS = window.CSS) === null || _window$CSS === void 0 ? void 0 : _window$CSS.supports) === 'function' && window.CSS.supports(...args);
28
+ return typeof window !== 'undefined' && typeof ((_window$CSS = window.CSS) === null || _window$CSS === void 0 ? void 0 : _window$CSS.supports) === 'function' && window.CSS.supports(...arguments);
29
29
  }; // CSS.supports needs an example of the type of value you intend to use.
30
30
  // Will be an integer appended `px` after hooks and JSX styles are resolved.
31
31
 
@@ -40,11 +40,13 @@ const exampleGapValue = '1px';
40
40
  */
41
41
 
42
42
  const StackWrap = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
43
+ var _props$gap;
44
+
43
45
  const {
44
46
  space
45
47
  } = props; // Don't apply separate gap if `null` or `undefined`, so can be unset in Storybook etc
46
48
 
47
- const gap = props.gap ?? space;
49
+ const gap = (_props$gap = props.gap) !== null && _props$gap !== void 0 ? _props$gap : space;
48
50
  const canUseCSSGap = _Platform.default.OS === 'web' && gap === space && cssSupports('gap', exampleGapValue);
49
51
  return canUseCSSGap ?
50
52
  /*#__PURE__*/
@@ -55,17 +55,18 @@ const spaceSides = {
55
55
  * between the container and the stacked children, and requires a negative margin on the container.
56
56
  */
57
57
 
58
- const StackWrapBox = /*#__PURE__*/(0, _react.forwardRef)(({
59
- space = 1,
60
- gap = space,
61
- direction: directionProp = 'row',
62
- children,
63
- tokens,
64
- variant,
65
- tag,
66
- accessibilityRole,
67
- ...rest
68
- }, ref) => {
58
+ const StackWrapBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
59
+ let {
60
+ space = 1,
61
+ gap = space,
62
+ direction: directionProp = 'row',
63
+ children,
64
+ tokens,
65
+ variant,
66
+ tag,
67
+ accessibilityRole,
68
+ ...rest
69
+ } = _ref;
69
70
  const viewport = (0, _ViewportProvider.useViewport)();
70
71
  const direction = (0, _utils.useResponsiveProp)(directionProp, 'row');
71
72
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('StackView', tokens, variant, {
@@ -41,16 +41,17 @@ const [selectProps] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.vi
41
41
  * default if `gap` prop is undefined)
42
42
  */
43
43
 
44
- const StackWrapGap = /*#__PURE__*/(0, _react.forwardRef)(({
45
- space = 1,
46
- tokens,
47
- variant,
48
- direction: directionProp = 'row',
49
- children,
50
- tag,
51
- accessibilityRole,
52
- ...rest
53
- }, ref) => {
44
+ const StackWrapGap = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
45
+ let {
46
+ space = 1,
47
+ tokens,
48
+ variant,
49
+ direction: directionProp = 'row',
50
+ children,
51
+ tag,
52
+ accessibilityRole,
53
+ ...rest
54
+ } = _ref;
54
55
  const viewport = (0, _ViewportProvider.useViewport)();
55
56
  const direction = (0, _utils.useResponsiveProp)(directionProp, 'row');
56
57
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('StackView', tokens, variant, {
@@ -9,17 +9,20 @@ var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/expo
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const selectFlexStyles = ({
13
- alignItems,
14
- justifyContent,
15
- flexGrow,
16
- flexShrink
17
- }) => ({
18
- alignItems,
19
- justifyContent,
20
- flexGrow,
21
- flexShrink
22
- });
12
+ const selectFlexStyles = _ref => {
13
+ let {
14
+ alignItems,
15
+ justifyContent,
16
+ flexGrow,
17
+ flexShrink
18
+ } = _ref;
19
+ return {
20
+ alignItems,
21
+ justifyContent,
22
+ flexGrow,
23
+ flexShrink
24
+ };
25
+ };
23
26
 
24
27
  exports.selectFlexStyles = selectFlexStyles;
25
28
 
@@ -47,13 +47,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
47
47
  * @param {boolean} [options.preserveFragments]
48
48
  * @returns {ReactElement[]}
49
49
  */
50
- const getStackedContent = (children, {
51
- divider,
52
- space,
53
- direction = 'column',
54
- box,
55
- preserveFragments = false
56
- }) => {
50
+ const getStackedContent = (children, _ref) => {
51
+ let {
52
+ divider,
53
+ space,
54
+ direction = 'column',
55
+ box,
56
+ preserveFragments = false
57
+ } = _ref;
57
58
  const boxProps = box && typeof box === 'object' ? box : {
58
59
  space
59
60
  };
@@ -64,7 +65,7 @@ const getStackedContent = (children, {
64
65
  const validChildren = _react.Children.toArray(topLevelChildren).filter(Boolean);
65
66
 
66
67
  const content = validChildren.reduce((newChildren, child, index) => {
67
- const boxID = `Stack-Box-${index}`;
68
+ const boxID = "Stack-Box-".concat(index);
68
69
  const item = box ?
69
70
  /*#__PURE__*/
70
71
  // If wrapped in Box, that Box needs a key.
@@ -74,7 +75,7 @@ const getStackedContent = (children, {
74
75
  testID: boxID
75
76
  }, child) : child;
76
77
  if (!index || !space && !divider) return [...newChildren, item];
77
- const testID = `Stack-${divider ? 'Divider' : 'Spacer'}-${index}`;
78
+ const testID = "Stack-".concat(divider ? 'Divider' : 'Spacer', "-").concat(index);
78
79
  const commonProps = {
79
80
  testID,
80
81
  key: testID,
@@ -9,13 +9,13 @@ Object.defineProperty(exports, "StackWrap", {
9
9
  return _StackWrap.default;
10
10
  }
11
11
  });
12
+ exports.default = void 0;
12
13
  Object.defineProperty(exports, "getStackedContent", {
13
14
  enumerable: true,
14
15
  get: function () {
15
16
  return _getStackedContent.default;
16
17
  }
17
18
  });
18
- exports.default = void 0;
19
19
 
20
20
  var _StackView = _interopRequireDefault(require("./StackView"));
21
21
 
@@ -29,105 +29,123 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
29
29
 
30
30
  const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
31
31
 
32
- const selectCompletedIconTokens = ({
33
- completedIconColor,
34
- completedIconSize
35
- }) => ({
36
- size: completedIconSize,
37
- color: completedIconColor
38
- });
32
+ const selectCompletedIconTokens = _ref => {
33
+ let {
34
+ completedIconColor,
35
+ completedIconSize
36
+ } = _ref;
37
+ return {
38
+ size: completedIconSize,
39
+ color: completedIconColor
40
+ };
41
+ };
39
42
 
40
- const selectConnectorStyles = ({
41
- connectorColor,
42
- connectorHeight,
43
- connectorMinWidth,
44
- connectorCompletedHeight,
45
- connectorCompletedColor
46
- }, isCompleted) => ({
47
- backgroundColor: connectorColor,
48
- height: connectorHeight,
49
- minWidth: connectorMinWidth,
50
- ...(isCompleted && {
51
- height: connectorCompletedHeight,
52
- backgroundColor: connectorCompletedColor
53
- })
54
- });
43
+ const selectConnectorStyles = (_ref2, isCompleted) => {
44
+ let {
45
+ connectorColor,
46
+ connectorHeight,
47
+ connectorMinWidth,
48
+ connectorCompletedHeight,
49
+ connectorCompletedColor
50
+ } = _ref2;
51
+ return {
52
+ backgroundColor: connectorColor,
53
+ height: connectorHeight,
54
+ minWidth: connectorMinWidth,
55
+ ...(isCompleted && {
56
+ height: connectorCompletedHeight,
57
+ backgroundColor: connectorCompletedColor
58
+ })
59
+ };
60
+ };
55
61
 
56
- const selectCurrentInnerStyles = ({
57
- knobCurrentInnerColor,
58
- knobCurrentInnerSize
59
- }) => ({
60
- backgroundColor: knobCurrentInnerColor,
61
- borderRadius: knobCurrentInnerSize / 2,
62
- height: knobCurrentInnerSize,
63
- width: knobCurrentInnerSize
64
- });
62
+ const selectCurrentInnerStyles = _ref3 => {
63
+ let {
64
+ knobCurrentInnerColor,
65
+ knobCurrentInnerSize
66
+ } = _ref3;
67
+ return {
68
+ backgroundColor: knobCurrentInnerColor,
69
+ borderRadius: knobCurrentInnerSize / 2,
70
+ height: knobCurrentInnerSize,
71
+ width: knobCurrentInnerSize
72
+ };
73
+ };
65
74
 
66
- const selectKnobStyles = ({
67
- knobBackgroundColor,
68
- knobBorderColor,
69
- knobBorderWidth,
70
- knobCompletedBackgroundColor,
71
- knobCompletedBorderColor,
72
- knobCompletedPaddingLeft,
73
- knobCompletedPaddingTop,
74
- knobCurrentBackgroundColor,
75
- knobCurrentBorderColor,
76
- knobCurrentBorderWidth,
77
- knobCurrentPaddingLeft,
78
- knobCurrentPaddingTop,
79
- knobSize
80
- }, isCompleted, isCurrent) => ({
81
- backgroundColor: knobBackgroundColor,
82
- borderColor: knobBorderColor,
83
- borderRadius: knobSize / 2,
84
- borderWidth: knobBorderWidth,
85
- height: knobSize,
86
- width: knobSize,
87
- ...(isCompleted && {
88
- backgroundColor: knobCompletedBackgroundColor,
89
- borderColor: knobCompletedBorderColor,
90
- paddingLeft: knobCompletedPaddingLeft,
91
- paddingTop: knobCompletedPaddingTop
92
- }),
93
- ...(isCurrent && {
94
- backgroundColor: knobCurrentBackgroundColor,
95
- borderColor: knobCurrentBorderColor,
96
- borderWidth: knobCurrentBorderWidth,
97
- paddingLeft: knobCurrentPaddingLeft,
98
- paddingTop: knobCurrentPaddingTop
99
- })
100
- });
75
+ const selectKnobStyles = (_ref4, isCompleted, isCurrent) => {
76
+ let {
77
+ knobBackgroundColor,
78
+ knobBorderColor,
79
+ knobBorderWidth,
80
+ knobCompletedBackgroundColor,
81
+ knobCompletedBorderColor,
82
+ knobCompletedPaddingLeft,
83
+ knobCompletedPaddingTop,
84
+ knobCurrentBackgroundColor,
85
+ knobCurrentBorderColor,
86
+ knobCurrentBorderWidth,
87
+ knobCurrentPaddingLeft,
88
+ knobCurrentPaddingTop,
89
+ knobSize
90
+ } = _ref4;
91
+ return {
92
+ backgroundColor: knobBackgroundColor,
93
+ borderColor: knobBorderColor,
94
+ borderRadius: knobSize / 2,
95
+ borderWidth: knobBorderWidth,
96
+ height: knobSize,
97
+ width: knobSize,
98
+ ...(isCompleted && {
99
+ backgroundColor: knobCompletedBackgroundColor,
100
+ borderColor: knobCompletedBorderColor,
101
+ paddingLeft: knobCompletedPaddingLeft,
102
+ paddingTop: knobCompletedPaddingTop
103
+ }),
104
+ ...(isCurrent && {
105
+ backgroundColor: knobCurrentBackgroundColor,
106
+ borderColor: knobCurrentBorderColor,
107
+ borderWidth: knobCurrentBorderWidth,
108
+ paddingLeft: knobCurrentPaddingLeft,
109
+ paddingTop: knobCurrentPaddingTop
110
+ })
111
+ };
112
+ };
101
113
 
102
- const selectLabelContainerStyles = ({
103
- labelDirection,
104
- labelGap,
105
- labelMarginTop,
106
- labelPaddingLeft,
107
- labelPaddingRight
108
- }) => ({
109
- marginTop: labelMarginTop,
110
- paddingLeft: labelPaddingLeft,
111
- paddingRight: labelPaddingRight,
112
- flexDirection: labelDirection,
113
- gap: labelGap
114
- });
114
+ const selectLabelContainerStyles = _ref5 => {
115
+ let {
116
+ labelDirection,
117
+ labelGap,
118
+ labelMarginTop,
119
+ labelPaddingLeft,
120
+ labelPaddingRight
121
+ } = _ref5;
122
+ return {
123
+ marginTop: labelMarginTop,
124
+ paddingLeft: labelPaddingLeft,
125
+ paddingRight: labelPaddingRight,
126
+ flexDirection: labelDirection,
127
+ gap: labelGap
128
+ };
129
+ };
115
130
 
116
- const selectLabelStyles = ({
117
- labelColor,
118
- labelCurrentColor,
119
- labelCurrentFontWeight,
120
- labelFontSize,
121
- labelFontWeight,
122
- labelFontName,
123
- labelLineHeight
124
- }, isCurrent) => (0, _ThemeProvider.applyTextStyles)({
125
- color: isCurrent ? labelCurrentColor : labelColor,
126
- fontSize: labelFontSize,
127
- lineHeight: labelLineHeight,
128
- fontWeight: isCurrent ? labelCurrentFontWeight : labelFontWeight,
129
- fontName: labelFontName
130
- });
131
+ const selectLabelStyles = (_ref6, isCurrent) => {
132
+ let {
133
+ labelColor,
134
+ labelCurrentColor,
135
+ labelCurrentFontWeight,
136
+ labelFontSize,
137
+ labelFontWeight,
138
+ labelFontName,
139
+ labelLineHeight
140
+ } = _ref6;
141
+ return (0, _ThemeProvider.applyTextStyles)({
142
+ color: isCurrent ? labelCurrentColor : labelColor,
143
+ fontSize: labelFontSize,
144
+ lineHeight: labelLineHeight,
145
+ fontWeight: isCurrent ? labelCurrentFontWeight : labelFontWeight,
146
+ fontName: labelFontName
147
+ });
148
+ };
131
149
 
132
150
  const getStepTestID = (isCompleted, isCurrent) => {
133
151
  let testID = 'StepTracker-Step';
@@ -145,15 +163,16 @@ const getStepTestID = (isCompleted, isCurrent) => {
145
163
  */
146
164
 
147
165
 
148
- const Step = ({
149
- label,
150
- name,
151
- status = 0,
152
- stepCount = 0,
153
- stepIndex = 0,
154
- tokens,
155
- ...rest
156
- }) => {
166
+ const Step = _ref7 => {
167
+ let {
168
+ label,
169
+ name,
170
+ status = 0,
171
+ stepCount = 0,
172
+ stepIndex = 0,
173
+ tokens,
174
+ ...rest
175
+ } = _ref7;
157
176
  const {
158
177
  completedIcon,
159
178
  showStepLabel,