@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
@@ -11,26 +11,28 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
12
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, inputSupportsProps, viewProps]);
13
13
 
14
- const selectInputStyles = ({
15
- backgroundColor,
16
- color,
17
- borderWidth = 0,
18
- borderColor,
19
- borderRadius,
20
- paddingTop,
21
- paddingBottom,
22
- paddingLeft = 0,
23
- paddingRight,
24
- fontName,
25
- fontSize,
26
- fontWeight,
27
- lineHeight,
28
- icon,
29
- iconSize = 0,
30
- validationIcon,
31
- validationIconSize = 0,
32
- height
33
- }, inactive) => {
14
+ const selectInputStyles = (_ref, inactive) => {
15
+ let {
16
+ backgroundColor,
17
+ color,
18
+ borderWidth = 0,
19
+ borderColor,
20
+ borderRadius,
21
+ paddingTop,
22
+ paddingBottom,
23
+ paddingLeft = 0,
24
+ paddingRight,
25
+ fontName,
26
+ fontSize,
27
+ fontWeight,
28
+ lineHeight,
29
+ icon,
30
+ iconSize = 0,
31
+ validationIcon,
32
+ validationIconSize = 0,
33
+ height
34
+ } = _ref;
35
+
34
36
  // Subtract border width from padding so overall input width/height doesn't
35
37
  // jump around if the border width changes (avoiding NaN and negative padding)
36
38
  const offsetBorder = value => typeof value === 'number' ? Math.max(0, value - borderWidth) : value;
@@ -80,53 +82,68 @@ const selectInputStyles = ({
80
82
  };
81
83
  };
82
84
 
83
- const selectOuterBorderStyles = ({
84
- outerBackgroundColor,
85
- outerBorderWidth,
86
- outerBorderColor,
87
- borderRadius
88
- }) => ({
89
- background: outerBackgroundColor,
90
- ...applyOuterBorder({
91
- outerBorderColor,
85
+ const selectOuterBorderStyles = _ref2 => {
86
+ let {
87
+ outerBackgroundColor,
92
88
  outerBorderWidth,
89
+ outerBorderColor,
93
90
  borderRadius
94
- })
95
- });
91
+ } = _ref2;
92
+ return {
93
+ background: outerBackgroundColor,
94
+ ...applyOuterBorder({
95
+ outerBorderColor,
96
+ outerBorderWidth,
97
+ borderRadius
98
+ })
99
+ };
100
+ };
96
101
 
97
- const selectIconTokens = ({
98
- iconSize,
99
- iconColor
100
- }) => ({
101
- size: iconSize,
102
- color: iconColor
103
- });
102
+ const selectIconTokens = _ref3 => {
103
+ let {
104
+ iconSize,
105
+ iconColor
106
+ } = _ref3;
107
+ return {
108
+ size: iconSize,
109
+ color: iconColor
110
+ };
111
+ };
104
112
 
105
- const selectIconContainerStyles = ({
106
- paddingRight,
107
- paddingBottom
108
- }) => ({
109
- paddingRight,
110
- paddingBottom
111
- });
113
+ const selectIconContainerStyles = _ref4 => {
114
+ let {
115
+ paddingRight,
116
+ paddingBottom
117
+ } = _ref4;
118
+ return {
119
+ paddingRight,
120
+ paddingBottom
121
+ };
122
+ };
112
123
 
113
- const selectValidationIconTokens = ({
114
- validationIconSize,
115
- validationIconColor
116
- }) => ({
117
- size: validationIconSize,
118
- color: validationIconColor
119
- });
124
+ const selectValidationIconTokens = _ref5 => {
125
+ let {
126
+ validationIconSize,
127
+ validationIconColor
128
+ } = _ref5;
129
+ return {
130
+ size: validationIconSize,
131
+ color: validationIconColor
132
+ };
133
+ };
120
134
 
121
- const selectValidationIconContainerStyles = ({
122
- icon,
123
- iconSize = 0,
124
- paddingRight = 0,
125
- paddingBottom
126
- }) => ({
127
- paddingRight: icon ? paddingRight + iconSize : paddingRight,
128
- paddingBottom
129
- });
135
+ const selectValidationIconContainerStyles = _ref6 => {
136
+ let {
137
+ icon,
138
+ iconSize = 0,
139
+ paddingRight = 0,
140
+ paddingBottom
141
+ } = _ref6;
142
+ return {
143
+ paddingRight: icon ? paddingRight + iconSize : paddingRight,
144
+ paddingBottom
145
+ };
146
+ };
130
147
  /**
131
148
  * A basic form single-choice select component. Use in forms or individually to receive user's input.
132
149
  *
@@ -161,20 +178,21 @@ const selectValidationIconContainerStyles = ({
161
178
  */
162
179
 
163
180
 
164
- const Select = /*#__PURE__*/forwardRef(({
165
- value,
166
- initialValue,
167
- onChange,
168
- children,
169
- inactive,
170
- readOnly,
171
- placeholder,
172
- validation,
173
- tokens,
174
- variant,
175
- testID,
176
- ...rest
177
- }, ref) => {
181
+ const Select = /*#__PURE__*/forwardRef((_ref7, ref) => {
182
+ let {
183
+ value,
184
+ initialValue,
185
+ onChange,
186
+ children,
187
+ inactive,
188
+ readOnly,
189
+ placeholder,
190
+ validation,
191
+ tokens,
192
+ variant,
193
+ testID,
194
+ ...rest
195
+ } = _ref7;
178
196
  const {
179
197
  currentValue,
180
198
  setValue
@@ -212,44 +230,47 @@ const Select = /*#__PURE__*/forwardRef(({
212
230
  } = themeTokens;
213
231
  return /*#__PURE__*/_jsx(InputSupports, { ...supportsProps,
214
232
  ...selectedProps,
215
- children: ({
216
- inputId,
217
- ...props
218
- }) => /*#__PURE__*/_jsxs(View, {
219
- style: selectOuterBorderStyles(themeTokens),
220
- children: [/*#__PURE__*/_jsx(Picker, {
221
- ref: ref,
222
- style: selectInputStyles(themeTokens, inactive),
223
- onFocus: handleFocus,
224
- onBlur: handleBlur,
225
- onMouseOver: handleMouseOver,
226
- onMouseOut: handleMouseOut,
227
- onChange: setValue,
228
- value: currentValue,
229
- inactive: inactive,
230
- placeholder: placeholder !== undefined ? {
231
- label: placeholder,
232
- value: ''
233
- } : undefined,
234
- ...props,
235
- nativeID: inputId,
236
- testID: testID,
237
- children: children
238
- }), ValidationIconComponent && /*#__PURE__*/_jsx(View, {
239
- pointerEvents: "none",
240
- style: [staticStyles.iconContainer, selectValidationIconContainerStyles(themeTokens)],
241
- children: /*#__PURE__*/_jsx(ValidationIconComponent, { ...selectValidationIconTokens(themeTokens)
242
- })
243
- }), IconComponent && Platform.OS !== 'android' &&
244
- /*#__PURE__*/
245
- // we can't hide the default caret of a native picker on android
246
- _jsx(View, {
247
- pointerEvents: "none",
248
- style: [staticStyles.iconContainer, selectIconContainerStyles(themeTokens)],
249
- children: /*#__PURE__*/_jsx(IconComponent, { ...selectIconTokens(themeTokens)
250
- })
251
- })]
252
- })
233
+ children: _ref8 => {
234
+ let {
235
+ inputId,
236
+ ...props
237
+ } = _ref8;
238
+ return /*#__PURE__*/_jsxs(View, {
239
+ style: selectOuterBorderStyles(themeTokens),
240
+ children: [/*#__PURE__*/_jsx(Picker, {
241
+ ref: ref,
242
+ style: selectInputStyles(themeTokens, inactive),
243
+ onFocus: handleFocus,
244
+ onBlur: handleBlur,
245
+ onMouseOver: handleMouseOver,
246
+ onMouseOut: handleMouseOut,
247
+ onChange: setValue,
248
+ value: currentValue,
249
+ inactive: inactive,
250
+ placeholder: placeholder !== undefined ? {
251
+ label: placeholder,
252
+ value: ''
253
+ } : undefined,
254
+ ...props,
255
+ nativeID: inputId,
256
+ testID: testID,
257
+ children: children
258
+ }), ValidationIconComponent && /*#__PURE__*/_jsx(View, {
259
+ pointerEvents: "none",
260
+ style: [staticStyles.iconContainer, selectValidationIconContainerStyles(themeTokens)],
261
+ children: /*#__PURE__*/_jsx(ValidationIconComponent, { ...selectValidationIconTokens(themeTokens)
262
+ })
263
+ }), IconComponent && Platform.OS !== 'android' &&
264
+ /*#__PURE__*/
265
+ // we can't hide the default caret of a native picker on android
266
+ _jsx(View, {
267
+ pointerEvents: "none",
268
+ style: [staticStyles.iconContainer, selectIconContainerStyles(themeTokens)],
269
+ children: /*#__PURE__*/_jsx(IconComponent, { ...selectIconTokens(themeTokens)
270
+ })
271
+ })]
272
+ });
273
+ }
253
274
  });
254
275
  });
255
276
  Select.displayName = 'Select';
@@ -7,18 +7,19 @@ import ItemContent from './ItemContent';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, linkProps, viewProps]);
9
9
 
10
- function selectItemStyles({
11
- backgroundColor,
12
- borderColor,
13
- borderWidth,
14
- borderStyle,
15
- paddingLeft,
16
- paddingRight,
17
- paddingTop,
18
- paddingBottom,
19
- justifyContent,
20
- verticalAlign
21
- }) {
10
+ function selectItemStyles(_ref) {
11
+ let {
12
+ backgroundColor,
13
+ borderColor,
14
+ borderWidth,
15
+ borderStyle,
16
+ paddingLeft,
17
+ paddingRight,
18
+ paddingTop,
19
+ paddingBottom,
20
+ justifyContent,
21
+ verticalAlign
22
+ } = _ref;
22
23
  return {
23
24
  backgroundColor,
24
25
  borderTopColor: borderColor,
@@ -39,20 +40,22 @@ function selectItemStyles({
39
40
  */
40
41
 
41
42
 
42
- const Item = /*#__PURE__*/forwardRef(({
43
- children,
44
- itemId,
45
- groupId,
46
- onPress,
47
- isActive = false,
48
- isExpanded = false,
49
- tokens,
50
- variant,
51
- href,
52
- accessibilityRole = 'link',
53
- testID,
54
- ...props
55
- }, ref) => {
43
+ const Item = /*#__PURE__*/forwardRef((_ref2, ref) => {
44
+ let {
45
+ children,
46
+ itemId,
47
+ groupId,
48
+ onPress,
49
+ isActive = false,
50
+ isExpanded = false,
51
+ tokens,
52
+ variant,
53
+ href,
54
+ accessibilityRole = 'link',
55
+ testID,
56
+ ...props
57
+ } = _ref2;
58
+
56
59
  const handlePress = () => onPress(itemId, groupId);
57
60
 
58
61
  const {
@@ -68,13 +71,16 @@ const Item = /*#__PURE__*/forwardRef(({
68
71
  });
69
72
  const getTokens = useThemeTokensCallback('SideNavItem', tokens, variant);
70
73
 
71
- const getAppearanceState = ({
72
- hovered
73
- }) => ({
74
- hover: hovered,
75
- active: isActive,
76
- expanded: isExpanded
77
- });
74
+ const getAppearanceState = _ref3 => {
75
+ let {
76
+ hovered
77
+ } = _ref3;
78
+ return {
79
+ hover: hovered,
80
+ active: isActive,
81
+ expanded: isExpanded
82
+ };
83
+ };
78
84
 
79
85
  const getPressableStyle = pressableState => selectItemStyles(getTokens(getAppearanceState(pressableState)));
80
86
 
@@ -21,17 +21,20 @@ export function selectAccentStyles(tokens) {
21
21
  * Content inside an item or control in a SideNav, themed by the SideNavItem theme
22
22
  */
23
23
 
24
- const ItemContent = ({
25
- children,
26
- tokens
27
- }) => /*#__PURE__*/_jsxs(_Fragment, {
28
- children: [/*#__PURE__*/_jsx(Typography, {
29
- tokens: selectTokens('Typography', tokens),
30
- children: children
31
- }), /*#__PURE__*/_jsx(View, {
32
- style: [staticStyles.absolute, selectAccentStyles(tokens)]
33
- })]
34
- });
24
+ const ItemContent = _ref => {
25
+ let {
26
+ children,
27
+ tokens
28
+ } = _ref;
29
+ return /*#__PURE__*/_jsxs(_Fragment, {
30
+ children: [/*#__PURE__*/_jsx(Typography, {
31
+ tokens: selectTokens('Typography', tokens),
32
+ children: children
33
+ }), /*#__PURE__*/_jsx(View, {
34
+ style: [staticStyles.absolute, selectAccentStyles(tokens)]
35
+ })]
36
+ });
37
+ };
35
38
 
36
39
  ItemContent.propTypes = {
37
40
  tokens: getTokensPropType('SideNavItem'),
@@ -16,17 +16,19 @@ import { useThemeTokensCallback } from '../ThemeProvider';
16
16
  */
17
17
 
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
- const ItemsGroup = /*#__PURE__*/forwardRef(({
20
- children,
21
- label,
22
- openGroups,
23
- groupId,
24
- isActive = false,
25
- variant,
26
- tokens,
27
- itemTokens,
28
- onToggle
29
- }, ref) => {
19
+ const ItemsGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
20
+ let {
21
+ children,
22
+ label,
23
+ openGroups,
24
+ groupId,
25
+ isActive = false,
26
+ variant,
27
+ tokens,
28
+ itemTokens,
29
+ onToggle
30
+ } = _ref;
31
+
30
32
  // A SideNav control uses the same style and theme as SideNavItem, with a 'parent' variant,
31
33
  // plus control-specific tokens from the SideNavItemsGroup theme (e.g. open/close icon, etc).
32
34
  const getAppearance = appearance => ({ ...variant,
@@ -23,15 +23,16 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, vie
23
23
  - Allow the user to navigate between options frequently and efficiently
24
24
  */
25
25
 
26
- const SideNav = /*#__PURE__*/forwardRef(({
27
- children,
28
- variant = {},
29
- tokens,
30
- accordion = true,
31
- itemTokens,
32
- groupTokens,
33
- ...rest
34
- }, ref) => {
26
+ const SideNav = /*#__PURE__*/forwardRef((_ref, ref) => {
27
+ let {
28
+ children,
29
+ variant = {},
30
+ tokens,
31
+ accordion = true,
32
+ itemTokens,
33
+ groupTokens,
34
+ ...rest
35
+ } = _ref;
35
36
  const themeTokens = useThemeTokens('SideNav', tokens, variant);
36
37
  const [active, setActive] = useState({
37
38
  groupId: undefined,
@@ -54,19 +55,21 @@ const SideNav = /*#__PURE__*/forwardRef(({
54
55
  maxOpen: accordion ? 1 : null,
55
56
  style: selectBorderStyles(themeTokens),
56
57
  ...selectProps(rest),
57
- children: ({
58
- openIds,
59
- onToggle
60
- }) => {
58
+ children: _ref2 => {
59
+ let {
60
+ openIds,
61
+ onToggle
62
+ } = _ref2;
63
+
61
64
  const renderItem = (item, index, groupId) => {
62
65
  const {
63
- itemId = `item-${index}`,
66
+ itemId = "item-".concat(index),
64
67
  onPress
65
68
  } = item.props;
66
69
 
67
- const handlePress = (...args) => {
68
- onItemPress(...args);
69
- if (onPress) onPress(...args);
70
+ const handlePress = function () {
71
+ onItemPress(...arguments);
72
+ if (onPress) onPress(...arguments);
70
73
  };
71
74
 
72
75
  return /*#__PURE__*/_createElement(Item, { ...item.props,
@@ -88,7 +91,7 @@ const SideNav = /*#__PURE__*/forwardRef(({
88
91
 
89
92
  if (child.type === ItemsGroup) {
90
93
  const {
91
- groupId = `group-${index}`
94
+ groupId = "group-".concat(index)
92
95
  } = child.props;
93
96
  const isGroupActive = active.itemId !== undefined && active.groupId === groupId;
94
97
 
@@ -10,48 +10,61 @@ import skeletonWebAnimation from './skeletonWebAnimation';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps]);
12
12
 
13
- const selectSkeletonStyles = ({
14
- color,
15
- radius,
16
- fadeAnimation
17
- }) => ({
18
- backgroundColor: color,
19
- borderRadius: radius,
20
- ...fadeAnimation
21
- });
13
+ const selectSkeletonStyles = _ref => {
14
+ let {
15
+ color,
16
+ radius,
17
+ fadeAnimation
18
+ } = _ref;
19
+ return {
20
+ backgroundColor: color,
21
+ borderRadius: radius,
22
+ ...fadeAnimation
23
+ };
24
+ };
22
25
 
23
- const selectLineStyles = ({
24
- skeletonHeight,
25
- lineWidth
26
- }) => ({
27
- width: lineWidth,
28
- height: skeletonHeight
29
- });
26
+ const selectLineStyles = _ref2 => {
27
+ let {
28
+ skeletonHeight,
29
+ lineWidth
30
+ } = _ref2;
31
+ return {
32
+ width: lineWidth,
33
+ height: skeletonHeight
34
+ };
35
+ };
30
36
 
31
- const selectShapeStyles = ({
32
- skeletonHeight
33
- }) => ({
34
- height: skeletonHeight,
35
- width: skeletonHeight
36
- });
37
+ const selectShapeStyles = _ref3 => {
38
+ let {
39
+ skeletonHeight
40
+ } = _ref3;
41
+ return {
42
+ height: skeletonHeight,
43
+ width: skeletonHeight
44
+ };
45
+ };
37
46
 
38
- const selectSquareStyles = ({
39
- radius
40
- }) => ({
41
- borderRadius: radius
42
- });
47
+ const selectSquareStyles = _ref4 => {
48
+ let {
49
+ radius
50
+ } = _ref4;
51
+ return {
52
+ borderRadius: radius
53
+ };
54
+ };
43
55
 
44
- const Skeleton = /*#__PURE__*/forwardRef(({
45
- tokens,
46
- variant,
47
- size,
48
- sizeIndex = size,
49
- sizePixels,
50
- characters,
51
- lines,
52
- shape = 'line',
53
- ...rest
54
- }, ref) => {
56
+ const Skeleton = /*#__PURE__*/forwardRef((_ref5, ref) => {
57
+ let {
58
+ tokens,
59
+ variant,
60
+ size,
61
+ sizeIndex = size,
62
+ sizePixels,
63
+ characters,
64
+ lines,
65
+ shape = 'line',
66
+ ...rest
67
+ } = _ref5;
55
68
  const themeTokens = useThemeTokens('Skeleton', tokens, variant);
56
69
  const pixels = useResponsiveProp(sizePixels);
57
70
  const spacingScaleValue = typeof pixels === 'number' ? // Size by an exact number of pixels
@@ -101,12 +114,15 @@ const Skeleton = /*#__PURE__*/forwardRef(({
101
114
  });
102
115
  };
103
116
 
104
- const renderSkeleton = (index = 0) => /*#__PURE__*/_jsx(Animated.View, {
105
- testID: "skeleton",
106
- style: [selectSkeletonStyles({ ...themeTokens,
107
- fadeAnimation: getAnimationBaseOnPlatform()
108
- }), getStyledBasedOnShape()]
109
- }, `skeleton-${index + 1}`);
117
+ const renderSkeleton = function () {
118
+ let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
119
+ return /*#__PURE__*/_jsx(Animated.View, {
120
+ testID: "skeleton",
121
+ style: [selectSkeletonStyles({ ...themeTokens,
122
+ fadeAnimation: getAnimationBaseOnPlatform()
123
+ }), getStyledBasedOnShape()]
124
+ }, "skeleton-".concat(index + 1));
125
+ };
110
126
 
111
127
  return /*#__PURE__*/_jsx(StackView, {
112
128
  space: themeTokens.spaceBetweenLines,
@@ -1,6 +1,6 @@
1
1
  import { ANIMATION_DURATION, DEFAULT_OPACITY, OPACITY_STOP } from './skeleton.constant';
2
2
  export default {
3
- animationDuration: `${ANIMATION_DURATION}ms`,
3
+ animationDuration: "".concat(ANIMATION_DURATION, "ms"),
4
4
  animationTimingFunction: 'ease-in-out',
5
5
  animationDelay: '0.5s',
6
6
  animationIterationCount: 'infinite',
@@ -58,11 +58,12 @@ const selectSizeStyle = (size, direction) => ({
58
58
  */
59
59
 
60
60
 
61
- const Spacer = /*#__PURE__*/forwardRef(({
62
- space = 1,
63
- direction = 'column',
64
- ...rest
65
- }, ref) => {
61
+ const Spacer = /*#__PURE__*/forwardRef((_ref, ref) => {
62
+ let {
63
+ space = 1,
64
+ direction = 'column',
65
+ ...rest
66
+ } = _ref;
66
67
  const size = useSpacingScale(space);
67
68
  const sizeStyle = selectSizeStyle(size, direction);
68
69
  return /*#__PURE__*/_jsx(View, {