@telus-uds/components-base 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/.turbo/turbo-build.log +5 -2
  2. package/CHANGELOG.json +38 -0
  3. package/CHANGELOG.md +15 -2
  4. package/__tests__/ActivityIndicator/ActivityIndicator.test.jsx +35 -0
  5. package/__tests__/ActivityIndicator/__snapshots__/ActivityIndicator.test.jsx.snap +287 -0
  6. package/babel.config.js +27 -5
  7. package/component-docs.json +88 -424
  8. package/lib/A11yText/index.js +5 -4
  9. package/lib/ActivityIndicator/Spinner.js +46 -37
  10. package/lib/ActivityIndicator/Spinner.native.js +26 -15
  11. package/lib/Box/Box.js +4 -4
  12. package/lib/Button/ButtonBase.js +7 -8
  13. package/lib/Card/Card.js +5 -4
  14. package/lib/Card/PressableCardBase.js +6 -11
  15. package/lib/Checkbox/Checkbox.js +4 -6
  16. package/lib/Divider/Divider.js +12 -11
  17. package/lib/ExpandCollapse/Control.js +7 -7
  18. package/lib/ExpandCollapse/ExpandCollapse.js +6 -2
  19. package/lib/ExpandCollapse/Panel.js +6 -7
  20. package/lib/Feedback/Feedback.js +6 -5
  21. package/lib/Fieldset/Fieldset.js +1 -3
  22. package/lib/HorizontalScroll/HorizontalScroll.js +5 -6
  23. package/lib/IconButton/IconButton.js +6 -6
  24. package/lib/InputLabel/InputLabel.js +7 -2
  25. package/lib/InputSupports/InputSupports.js +2 -2
  26. package/lib/Link/LinkBase.js +5 -6
  27. package/lib/List/List.js +4 -6
  28. package/lib/List/ListItem.js +6 -2
  29. package/lib/Modal/Modal.js +6 -2
  30. package/lib/Notification/Notification.js +7 -2
  31. package/lib/Pagination/Pagination.js +8 -3
  32. package/lib/Progress/Progress.js +5 -4
  33. package/lib/Progress/ProgressBar.js +8 -7
  34. package/lib/Radio/Radio.js +4 -6
  35. package/lib/Radio/RadioButton.js +6 -3
  36. package/lib/Radio/RadioGroup.js +7 -2
  37. package/lib/RadioCard/RadioCard.js +4 -4
  38. package/lib/RadioCard/RadioCardGroup.js +9 -6
  39. package/lib/Search/Search.js +7 -2
  40. package/lib/Select/Select.js +10 -9
  41. package/lib/SideNav/Item.js +7 -7
  42. package/lib/SideNav/SideNav.js +7 -3
  43. package/lib/Skeleton/Skeleton.js +6 -2
  44. package/lib/Spacer/Spacer.js +7 -18
  45. package/lib/StackView/StackView.js +7 -7
  46. package/lib/StackView/StackWrapBox.js +6 -7
  47. package/lib/StackView/StackWrapGap.js +6 -5
  48. package/lib/StepTracker/Step.js +7 -3
  49. package/lib/StepTracker/StepTracker.js +7 -7
  50. package/lib/Tabs/Tabs.js +6 -2
  51. package/lib/Tabs/TabsItem.js +6 -5
  52. package/lib/Tags/Tags.js +5 -6
  53. package/lib/TextInput/TextArea.js +13 -14
  54. package/lib/TextInput/TextInput.js +13 -14
  55. package/lib/TextInput/TextInputBase.js +5 -3
  56. package/lib/ToggleSwitch/ToggleSwitch.js +10 -9
  57. package/lib/ToggleSwitch/ToggleSwitchGroup.js +5 -7
  58. package/lib/Tooltip/Tooltip.js +7 -2
  59. package/lib/TooltipButton/TooltipButton.js +7 -2
  60. package/lib/Typography/Typography.js +8 -6
  61. package/lib/index.js +7 -0
  62. package/lib/utils/children.js +5 -1
  63. package/lib/utils/index.js +14 -0
  64. package/lib/utils/props/index.js +9 -0
  65. package/lib/{InputSupports/propTypes.js → utils/props/inputSupportsProps.js} +2 -3
  66. package/lib/utils/ssr.js +51 -0
  67. package/lib-module/A11yInfoProvider/index.js +62 -0
  68. package/lib-module/A11yText/index.js +55 -0
  69. package/lib-module/ActivityIndicator/Spinner.js +76 -0
  70. package/lib-module/ActivityIndicator/Spinner.native.js +143 -0
  71. package/lib-module/ActivityIndicator/index.js +40 -0
  72. package/lib-module/ActivityIndicator/shared.js +12 -0
  73. package/lib-module/BaseProvider/index.js +26 -0
  74. package/lib-module/Box/Box.js +243 -0
  75. package/lib-module/Box/index.js +2 -0
  76. package/lib-module/Button/Button.js +25 -0
  77. package/lib-module/Button/ButtonBase.js +254 -0
  78. package/lib-module/Button/ButtonGroup.js +164 -0
  79. package/lib-module/Button/ButtonLink.js +39 -0
  80. package/lib-module/Button/index.js +4 -0
  81. package/lib-module/Button/propTypes.js +36 -0
  82. package/lib-module/Card/Card.js +83 -0
  83. package/lib-module/Card/CardBase.js +62 -0
  84. package/lib-module/Card/PressableCardBase.js +113 -0
  85. package/lib-module/Card/index.js +4 -0
  86. package/lib-module/Checkbox/Checkbox.js +321 -0
  87. package/lib-module/Checkbox/CheckboxGroup.js +218 -0
  88. package/lib-module/Checkbox/CheckboxInput.js +58 -0
  89. package/lib-module/Checkbox/CheckboxInput.native.js +6 -0
  90. package/lib-module/Checkbox/index.js +3 -0
  91. package/lib-module/Divider/Divider.js +123 -0
  92. package/lib-module/Divider/index.js +2 -0
  93. package/lib-module/ExpandCollapse/Accordion.js +15 -0
  94. package/lib-module/ExpandCollapse/Control.js +130 -0
  95. package/lib-module/ExpandCollapse/ExpandCollapse.js +94 -0
  96. package/lib-module/ExpandCollapse/Panel.js +158 -0
  97. package/lib-module/ExpandCollapse/index.js +7 -0
  98. package/lib-module/Feedback/Feedback.js +144 -0
  99. package/lib-module/Feedback/index.js +2 -0
  100. package/lib-module/Fieldset/Fieldset.js +145 -0
  101. package/lib-module/Fieldset/FieldsetContainer.js +29 -0
  102. package/lib-module/Fieldset/FieldsetContainer.native.js +20 -0
  103. package/lib-module/Fieldset/Legend.js +21 -0
  104. package/lib-module/Fieldset/Legend.native.js +28 -0
  105. package/lib-module/Fieldset/cssReset.js +14 -0
  106. package/lib-module/Fieldset/index.js +2 -0
  107. package/lib-module/FlexGrid/Col/Col.js +265 -0
  108. package/lib-module/FlexGrid/Col/index.js +2 -0
  109. package/lib-module/FlexGrid/FlexGrid.js +147 -0
  110. package/lib-module/FlexGrid/Row/Row.js +177 -0
  111. package/lib-module/FlexGrid/Row/index.js +2 -0
  112. package/lib-module/FlexGrid/helpers/index.js +18 -0
  113. package/lib-module/FlexGrid/index.js +2 -0
  114. package/lib-module/FlexGrid/providers/GutterContext.js +3 -0
  115. package/lib-module/HorizontalScroll/HorizontalScroll.js +171 -0
  116. package/lib-module/HorizontalScroll/HorizontalScrollButton.js +102 -0
  117. package/lib-module/HorizontalScroll/ScrollViewEnd.js +47 -0
  118. package/lib-module/HorizontalScroll/ScrollViewEnd.native.js +24 -0
  119. package/lib-module/HorizontalScroll/dictionary.js +11 -0
  120. package/lib-module/HorizontalScroll/index.js +11 -0
  121. package/lib-module/HorizontalScroll/itemPositions.js +106 -0
  122. package/lib-module/Icon/Icon.js +61 -0
  123. package/lib-module/Icon/IconText.js +81 -0
  124. package/lib-module/Icon/index.js +4 -0
  125. package/lib-module/IconButton/IconButton.js +115 -0
  126. package/lib-module/IconButton/index.js +2 -0
  127. package/lib-module/InputLabel/InputLabel.js +131 -0
  128. package/lib-module/InputLabel/LabelContent.js +24 -0
  129. package/lib-module/InputLabel/LabelContent.native.js +16 -0
  130. package/lib-module/InputLabel/index.js +2 -0
  131. package/lib-module/InputSupports/InputSupports.js +88 -0
  132. package/lib-module/InputSupports/index.js +2 -0
  133. package/lib-module/InputSupports/useInputSupports.js +31 -0
  134. package/lib-module/Link/ChevronLink.js +51 -0
  135. package/lib-module/Link/InlinePressable.js +37 -0
  136. package/lib-module/Link/InlinePressable.native.js +85 -0
  137. package/lib-module/Link/Link.js +27 -0
  138. package/lib-module/Link/LinkBase.js +210 -0
  139. package/lib-module/Link/TextButton.js +43 -0
  140. package/lib-module/Link/index.js +5 -0
  141. package/lib-module/List/List.js +55 -0
  142. package/lib-module/List/ListItem.js +213 -0
  143. package/lib-module/List/index.js +5 -0
  144. package/lib-module/Modal/Modal.js +208 -0
  145. package/lib-module/Modal/dictionary.js +9 -0
  146. package/lib-module/Modal/index.js +2 -0
  147. package/lib-module/Notification/Notification.js +196 -0
  148. package/lib-module/Notification/dictionary.js +8 -0
  149. package/lib-module/Notification/index.js +2 -0
  150. package/lib-module/Pagination/PageButton.js +65 -0
  151. package/lib-module/Pagination/Pagination.js +140 -0
  152. package/lib-module/Pagination/SideButton.js +103 -0
  153. package/lib-module/Pagination/dictionary.js +18 -0
  154. package/lib-module/Pagination/index.js +2 -0
  155. package/lib-module/Pagination/usePagination.js +72 -0
  156. package/lib-module/Progress/Progress.js +85 -0
  157. package/lib-module/Progress/ProgressBar.js +134 -0
  158. package/lib-module/Progress/ProgressBarBackground.js +41 -0
  159. package/lib-module/Progress/index.js +4 -0
  160. package/lib-module/Radio/Radio.js +263 -0
  161. package/lib-module/Radio/RadioButton.js +128 -0
  162. package/lib-module/Radio/RadioGroup.js +225 -0
  163. package/lib-module/Radio/RadioInput.js +60 -0
  164. package/lib-module/Radio/RadioInput.native.js +6 -0
  165. package/lib-module/Radio/index.js +3 -0
  166. package/lib-module/RadioCard/RadioCard.js +218 -0
  167. package/lib-module/RadioCard/RadioCardGroup.js +232 -0
  168. package/lib-module/RadioCard/index.js +3 -0
  169. package/lib-module/Search/Search.js +233 -0
  170. package/lib-module/Search/dictionary.js +12 -0
  171. package/lib-module/Search/index.js +2 -0
  172. package/lib-module/Select/Group.js +20 -0
  173. package/lib-module/Select/Group.native.js +14 -0
  174. package/lib-module/Select/Item.js +17 -0
  175. package/lib-module/Select/Item.native.js +9 -0
  176. package/lib-module/Select/Picker.js +67 -0
  177. package/lib-module/Select/Picker.native.js +110 -0
  178. package/lib-module/Select/Select.js +317 -0
  179. package/lib-module/Select/index.js +6 -0
  180. package/lib-module/SideNav/Item.js +139 -0
  181. package/lib-module/SideNav/ItemContent.js +45 -0
  182. package/lib-module/SideNav/ItemsGroup.js +115 -0
  183. package/lib-module/SideNav/SideNav.js +133 -0
  184. package/lib-module/SideNav/index.js +1 -0
  185. package/lib-module/Skeleton/Skeleton.js +117 -0
  186. package/lib-module/Skeleton/index.js +2 -0
  187. package/lib-module/Skeleton/skeleton.constant.js +3 -0
  188. package/lib-module/Skeleton/skeletonWebAnimation.js +18 -0
  189. package/lib-module/Skeleton/useSkeletonNativeAnimation.js +24 -0
  190. package/lib-module/Spacer/Spacer.js +97 -0
  191. package/lib-module/Spacer/index.js +2 -0
  192. package/lib-module/StackView/StackView.js +124 -0
  193. package/lib-module/StackView/StackWrap.js +48 -0
  194. package/lib-module/StackView/StackWrap.native.js +3 -0
  195. package/lib-module/StackView/StackWrapBox.js +114 -0
  196. package/lib-module/StackView/StackWrapGap.js +58 -0
  197. package/lib-module/StackView/common.js +32 -0
  198. package/lib-module/StackView/getStackedContent.js +123 -0
  199. package/lib-module/StackView/index.js +5 -0
  200. package/lib-module/StepTracker/Step.js +229 -0
  201. package/lib-module/StepTracker/StepTracker.js +175 -0
  202. package/lib-module/StepTracker/dictionary.js +10 -0
  203. package/lib-module/StepTracker/index.js +2 -0
  204. package/lib-module/Tabs/Tabs.js +113 -0
  205. package/lib-module/Tabs/TabsItem.js +215 -0
  206. package/lib-module/Tabs/index.js +2 -0
  207. package/lib-module/Tags/Tags.js +238 -0
  208. package/lib-module/Tags/index.js +2 -0
  209. package/lib-module/TextInput/TextArea.js +88 -0
  210. package/lib-module/TextInput/TextInput.js +60 -0
  211. package/lib-module/TextInput/TextInputBase.js +233 -0
  212. package/lib-module/TextInput/index.js +3 -0
  213. package/lib-module/TextInput/propTypes.js +31 -0
  214. package/lib-module/ThemeProvider/ThemeProvider.js +35 -0
  215. package/lib-module/ThemeProvider/index.js +6 -0
  216. package/lib-module/ThemeProvider/useSetTheme.js +22 -0
  217. package/lib-module/ThemeProvider/useTheme.js +14 -0
  218. package/lib-module/ThemeProvider/useThemeTokens.js +105 -0
  219. package/lib-module/ThemeProvider/utils/index.js +2 -0
  220. package/lib-module/ThemeProvider/utils/styles.js +174 -0
  221. package/lib-module/ThemeProvider/utils/theme-tokens.js +151 -0
  222. package/lib-module/ToggleSwitch/ToggleSwitch.js +224 -0
  223. package/lib-module/ToggleSwitch/ToggleSwitchGroup.js +202 -0
  224. package/lib-module/ToggleSwitch/index.js +3 -0
  225. package/lib-module/Tooltip/Backdrop.js +52 -0
  226. package/lib-module/Tooltip/Backdrop.native.js +43 -0
  227. package/lib-module/Tooltip/Tooltip.js +332 -0
  228. package/lib-module/Tooltip/dictionary.js +8 -0
  229. package/lib-module/Tooltip/getTooltipPosition.js +164 -0
  230. package/lib-module/Tooltip/index.js +2 -0
  231. package/lib-module/TooltipButton/TooltipButton.js +71 -0
  232. package/lib-module/TooltipButton/index.js +2 -0
  233. package/lib-module/Typography/Typography.js +118 -0
  234. package/lib-module/Typography/index.js +2 -0
  235. package/lib-module/ViewportProvider/ViewportProvider.js +28 -0
  236. package/lib-module/ViewportProvider/index.js +3 -0
  237. package/lib-module/ViewportProvider/useViewport.js +3 -0
  238. package/lib-module/ViewportProvider/useViewportListener.js +43 -0
  239. package/lib-module/index.js +48 -0
  240. package/lib-module/utils/a11y/index.js +2 -0
  241. package/lib-module/utils/a11y/semantics.js +154 -0
  242. package/lib-module/utils/a11y/textSize.js +34 -0
  243. package/lib-module/utils/animation/index.js +2 -0
  244. package/lib-module/utils/animation/useVerticalExpandAnimation.js +49 -0
  245. package/lib-module/utils/children.js +118 -0
  246. package/lib-module/utils/index.js +15 -0
  247. package/lib-module/utils/info/index.js +7 -0
  248. package/lib-module/utils/info/platform/index.js +11 -0
  249. package/lib-module/utils/info/platform/platform.android.js +1 -0
  250. package/lib-module/utils/info/platform/platform.ios.js +1 -0
  251. package/lib-module/utils/info/platform/platform.js +1 -0
  252. package/lib-module/utils/info/platform/platform.native.js +4 -0
  253. package/lib-module/utils/info/versions.js +5 -0
  254. package/lib-module/utils/input.js +180 -0
  255. package/lib-module/utils/pressability.js +97 -0
  256. package/lib-module/utils/props/a11yProps.js +140 -0
  257. package/lib-module/utils/props/clickProps.js +25 -0
  258. package/lib-module/utils/props/componentPropType.js +63 -0
  259. package/lib-module/utils/props/copyPropTypes.js +2 -0
  260. package/lib-module/utils/props/getPropSelector.js +6 -0
  261. package/lib-module/utils/props/hrefAttrsProp.js +30 -0
  262. package/lib-module/utils/props/index.js +16 -0
  263. package/lib-module/utils/props/inputSupportsProps.js +54 -0
  264. package/lib-module/utils/props/linkProps.js +47 -0
  265. package/lib-module/utils/props/paddingProp.js +9 -0
  266. package/lib-module/utils/props/pressProps.js +42 -0
  267. package/lib-module/utils/props/rectProp.js +9 -0
  268. package/lib-module/utils/props/responsiveProps.js +30 -0
  269. package/lib-module/utils/props/selectSystemProps.js +24 -0
  270. package/lib-module/utils/props/spacingProps.js +56 -0
  271. package/lib-module/utils/props/tokens.js +120 -0
  272. package/lib-module/utils/props/variantProp.js +18 -0
  273. package/lib-module/utils/props/viewProps.js +22 -0
  274. package/lib-module/utils/ssr.js +35 -0
  275. package/lib-module/utils/useCopy.js +42 -0
  276. package/lib-module/utils/useHash.js +44 -0
  277. package/lib-module/utils/useHash.native.js +7 -0
  278. package/lib-module/utils/useResponsiveProp.js +47 -0
  279. package/lib-module/utils/useSpacingScale.js +123 -0
  280. package/lib-module/utils/useUniqueId.js +12 -0
  281. package/lib-module/utils/withLinkRouter.js +82 -0
  282. package/package.json +9 -5
  283. package/src/A11yText/index.jsx +7 -3
  284. package/src/ActivityIndicator/Spinner.jsx +56 -44
  285. package/src/ActivityIndicator/Spinner.native.jsx +20 -12
  286. package/src/Box/Box.jsx +10 -9
  287. package/src/Button/ButtonBase.jsx +9 -8
  288. package/src/Card/Card.jsx +7 -4
  289. package/src/Card/PressableCardBase.jsx +12 -12
  290. package/src/Checkbox/Checkbox.jsx +12 -5
  291. package/src/Divider/Divider.jsx +17 -10
  292. package/src/ExpandCollapse/Control.jsx +12 -7
  293. package/src/ExpandCollapse/ExpandCollapse.jsx +13 -3
  294. package/src/ExpandCollapse/Panel.jsx +15 -5
  295. package/src/Feedback/Feedback.jsx +13 -3
  296. package/src/Fieldset/Fieldset.jsx +1 -1
  297. package/src/HorizontalScroll/HorizontalScroll.jsx +12 -5
  298. package/src/IconButton/IconButton.jsx +12 -8
  299. package/src/InputLabel/InputLabel.jsx +16 -2
  300. package/src/InputSupports/InputSupports.jsx +1 -1
  301. package/src/Link/LinkBase.jsx +10 -9
  302. package/src/List/List.jsx +12 -5
  303. package/src/List/ListItem.jsx +16 -2
  304. package/src/Modal/Modal.jsx +63 -50
  305. package/src/Notification/Notification.jsx +17 -3
  306. package/src/Pagination/Pagination.jsx +10 -3
  307. package/src/Progress/Progress.jsx +5 -3
  308. package/src/Progress/ProgressBar.jsx +8 -6
  309. package/src/Radio/Radio.jsx +13 -5
  310. package/src/Radio/RadioButton.jsx +13 -3
  311. package/src/Radio/RadioGroup.jsx +14 -2
  312. package/src/RadioCard/RadioCard.jsx +9 -6
  313. package/src/RadioCard/RadioCardGroup.jsx +16 -4
  314. package/src/Search/Search.jsx +15 -3
  315. package/src/Select/Select.jsx +21 -7
  316. package/src/SideNav/Item.jsx +15 -7
  317. package/src/SideNav/SideNav.jsx +13 -2
  318. package/src/Skeleton/Skeleton.jsx +55 -43
  319. package/src/Spacer/Spacer.jsx +8 -16
  320. package/src/StackView/StackView.jsx +13 -12
  321. package/src/StackView/StackWrapBox.jsx +12 -12
  322. package/src/StackView/StackWrapGap.jsx +9 -7
  323. package/src/StepTracker/Step.jsx +7 -4
  324. package/src/StepTracker/StepTracker.jsx +8 -8
  325. package/src/Tabs/Tabs.jsx +16 -3
  326. package/src/Tabs/TabsItem.jsx +13 -9
  327. package/src/Tags/Tags.jsx +20 -5
  328. package/src/TextInput/TextArea.jsx +20 -8
  329. package/src/TextInput/TextInput.jsx +20 -8
  330. package/src/TextInput/TextInputBase.jsx +13 -3
  331. package/src/ToggleSwitch/ToggleSwitch.jsx +16 -5
  332. package/src/ToggleSwitch/ToggleSwitchGroup.jsx +14 -6
  333. package/src/Tooltip/Tooltip.jsx +13 -3
  334. package/src/TooltipButton/TooltipButton.jsx +6 -4
  335. package/src/Typography/Typography.jsx +10 -6
  336. package/src/index.js +1 -1
  337. package/src/utils/children.jsx +2 -1
  338. package/src/utils/index.js +1 -0
  339. package/src/utils/props/index.js +1 -0
  340. package/src/{InputSupports/propTypes.js → utils/props/inputSupportsProps.js} +2 -4
  341. package/src/utils/ssr.js +35 -0
  342. package/release-context.json +0 -7
package/lib/Tabs/Tabs.js CHANGED
@@ -29,6 +29,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
29
29
 
30
30
  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; }
31
31
 
32
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
32
33
  const {
33
34
  selectHorizontalScrollTokens,
34
35
  useItemPositions
@@ -48,7 +49,8 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(({
48
49
  onChange,
49
50
  items = [],
50
51
  LinkRouter,
51
- linkRouterProps
52
+ linkRouterProps,
53
+ ...rest
52
54
  }, ref) => {
53
55
  const {
54
56
  space,
@@ -77,6 +79,7 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(({
77
79
  tokens: selectHorizontalScrollTokens(themeTokens),
78
80
  scrollButtonTokens: scrollButtonTokens,
79
81
  accessibilityRole: "tablist",
82
+ ...selectProps(rest),
80
83
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_StackView.default, {
81
84
  space: space,
82
85
  direction: "row",
@@ -113,7 +116,8 @@ const Tabs = /*#__PURE__*/(0, _react.forwardRef)(({
113
116
  });
114
117
  });
115
118
  Tabs.displayName = 'Tabs';
116
- Tabs.propTypes = { ..._utils.withLinkRouter.PropTypes,
119
+ Tabs.propTypes = { ...selectedSystemPropTypes,
120
+ ..._utils.withLinkRouter.PropTypes,
117
121
  items: _propTypes.default.arrayOf(_propTypes.default.shape({ ..._utils.withLinkRouter.PropTypes,
118
122
  href: _propTypes.default.string,
119
123
  label: _propTypes.default.string,
@@ -35,6 +35,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
35
35
 
36
36
  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; }
37
37
 
38
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
38
39
  const {
39
40
  itemPositionsPropType,
40
41
  getItemPositionLayoutHandler
@@ -148,11 +149,11 @@ const TabsItem = /*#__PURE__*/(0, _react.forwardRef)(({
148
149
  if (onPress) onPress(...args);
149
150
  if (openHref) openHref(...args);
150
151
  } : undefined;
151
- const a11y = {
152
+ const selectedProps = selectProps({
152
153
  accessibilityRole,
153
154
  accessibilityState,
154
- ..._utils.a11yProps.select(rest)
155
- };
155
+ ...rest
156
+ });
156
157
  (0, _react.useEffect)(() => {
157
158
  // If this is selected while off-screen, scroll it into view
158
159
  if (selected) {
@@ -173,7 +174,7 @@ const TabsItem = /*#__PURE__*/(0, _react.forwardRef)(({
173
174
  href: href,
174
175
  style: getPressableStyle,
175
176
  onLayout: handleLayout,
176
- ...a11y,
177
+ ...selectedProps,
177
178
  children: pressableState => {
178
179
  const {
179
180
  space,
@@ -211,7 +212,7 @@ const TabsItem = /*#__PURE__*/(0, _react.forwardRef)(({
211
212
  });
212
213
  });
213
214
  TabsItem.displayName = 'TabsItem';
214
- TabsItem.propTypes = { ..._utils.a11yProps.propTypes,
215
+ TabsItem.propTypes = { ...selectedSystemPropTypes,
215
216
  tokens: (0, _utils.getTokensPropType)('TabsItem'),
216
217
  variant: _utils.variantProp.propType,
217
218
  onPress: _propTypes.default.func,
package/lib/Tags/Tags.js CHANGED
@@ -41,6 +41,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
41
41
 
42
42
  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; }
43
43
 
44
+ const [selectProps, selectedSystemPropTypes] = (0, _props.selectSystemProps)([_props.a11yProps, _props.pressProps, _props.viewProps]);
45
+
44
46
  const selectIconTextTokens = ({
45
47
  icon,
46
48
  iconPosition,
@@ -116,16 +118,14 @@ const Tags = /*#__PURE__*/(0, _react.forwardRef)(({
116
118
  onChange,
117
119
  readOnly
118
120
  });
119
-
120
- const a11y = _props.a11yProps.select({
121
+ const selectedProps = selectProps({
121
122
  accessibilityRole,
122
123
  ...rest
123
124
  });
124
-
125
125
  const itemA11yRole = 'checkbox';
126
126
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StackView.StackWrap, {
127
127
  ref: ref,
128
- ...a11y,
128
+ ...selectedProps,
129
129
  space: space,
130
130
  direction: direction,
131
131
  tokens: stackTokens,
@@ -202,8 +202,7 @@ const Tags = /*#__PURE__*/(0, _react.forwardRef)(({
202
202
  });
203
203
  });
204
204
  Tags.displayName = 'Tags';
205
- Tags.propTypes = { ..._props.a11yProps.propTypes,
206
- ..._props.pressProps.propTypes,
205
+ Tags.propTypes = { ...selectedSystemPropTypes,
207
206
  tokens: (0, _props.getTokensPropType)('Tags'),
208
207
  variant: _props.variantProp.propType,
209
208
 
@@ -17,9 +17,7 @@ var _TextInputBase = _interopRequireDefault(require("./TextInputBase"));
17
17
 
18
18
  var _ThemeProvider = require("../ThemeProvider");
19
19
 
20
- var _propTypes = _interopRequireDefault(require("../InputSupports/propTypes"));
21
-
22
- var _propTypes2 = _interopRequireDefault(require("./propTypes"));
20
+ var _propTypes = _interopRequireDefault(require("./propTypes"));
23
21
 
24
22
  var _jsxRuntime = require("react/jsx-runtime");
25
23
 
@@ -29,6 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
29
27
 
30
28
  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; }
31
29
 
30
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.inputSupportsProps, _utils.viewProps]);
32
31
  /**
33
32
  * Use to collect long-form information such as product feedback or support queries.
34
33
  * Due to React Native's implementation of `TextInput` it's not possible to access the current value by passing a ref.
@@ -53,10 +52,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
53
52
  * or an indicator that the field is optional.
54
53
  * It is a more usable and accessible option than the HTML `placeholder` attribute.
55
54
  */
55
+
56
56
  const TextArea = /*#__PURE__*/(0, _react.forwardRef)(({
57
57
  tokens,
58
58
  variant = {},
59
- ...remainingProps
59
+ ...rest
60
60
  }, ref) => {
61
61
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('TextArea', tokens, variant);
62
62
  const [inputHeight, setInputHeight] = (0, _react.useState)(); // adjust the text area's height as new lines are added to the content
@@ -76,10 +76,9 @@ const TextArea = /*#__PURE__*/(0, _react.forwardRef)(({
76
76
 
77
77
  const {
78
78
  props: supportsProps,
79
- rest
80
- } = _propTypes.default.select(remainingProps);
81
-
82
- const inputProps = { ...rest,
79
+ ...selectedProps
80
+ } = selectProps(rest);
81
+ const inputProps = { ...selectedProps,
83
82
  variant: { ...variant,
84
83
  validation: supportsProps.validation
85
84
  },
@@ -90,19 +89,19 @@ const TextArea = /*#__PURE__*/(0, _react.forwardRef)(({
90
89
  };
91
90
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputSupports.default, { ...supportsProps,
92
91
  children: ({
93
- a11yProps,
94
- inputId
92
+ inputId,
93
+ ...props
95
94
  }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextInputBase.default, {
96
95
  ref: ref,
97
96
  ...inputProps,
98
- ...a11yProps,
99
- nativeID: inputId
97
+ nativeID: inputId,
98
+ ...props
100
99
  })
101
100
  });
102
101
  });
103
102
  TextArea.displayName = 'TextArea';
104
- TextArea.propTypes = { ..._propTypes.default.types,
105
- ..._propTypes2.default,
103
+ TextArea.propTypes = { ...selectedSystemPropTypes,
104
+ ..._propTypes.default,
106
105
  tokens: (0, _utils.getTokensPropType)('TextArea', 'TextInput'),
107
106
  // TODO: support both TextArea and TextInput tokens
108
107
  variant: _utils.variantProp.propType
@@ -13,9 +13,7 @@ var _InputSupports = _interopRequireDefault(require("../InputSupports"));
13
13
 
14
14
  var _TextInputBase = _interopRequireDefault(require("./TextInputBase"));
15
15
 
16
- var _propTypes = _interopRequireDefault(require("../InputSupports/propTypes"));
17
-
18
- var _propTypes2 = _interopRequireDefault(require("./propTypes"));
16
+ var _propTypes = _interopRequireDefault(require("./propTypes"));
19
17
 
20
18
  var _jsxRuntime = require("react/jsx-runtime");
21
19
 
@@ -25,6 +23,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
25
23
 
26
24
  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; }
27
25
 
26
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.inputSupportsProps, _utils.viewProps]);
28
27
  /**
29
28
  * A basic text input component. Use in forms or individually to receive user's input.
30
29
  * Due to React Native's implementation of `TextInput` it's not possible to access the current value by passing a ref.
@@ -43,17 +42,17 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
43
42
  * supported props and <a href="https://reactnative.dev/docs/textinput" target="_blank">React Native Web documentation</a> for
44
43
  * their implementation on the web.
45
44
  */
45
+
46
46
  const TextInput = /*#__PURE__*/(0, _react.forwardRef)(({
47
47
  tokens,
48
48
  variant = {},
49
- ...remainingProps
49
+ ...rest
50
50
  }, ref) => {
51
51
  const {
52
52
  props: supportsProps,
53
- rest
54
- } = _propTypes.default.select(remainingProps);
55
-
56
- const inputProps = { ...rest,
53
+ ...selectedProps
54
+ } = selectProps(rest);
55
+ const inputProps = { ...selectedProps,
57
56
  tokens,
58
57
  variant: { ...variant,
59
58
  validation: supportsProps.validation
@@ -61,19 +60,19 @@ const TextInput = /*#__PURE__*/(0, _react.forwardRef)(({
61
60
  };
62
61
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputSupports.default, { ...supportsProps,
63
62
  children: ({
64
- a11yProps,
65
- inputId
63
+ inputId,
64
+ ...props
66
65
  }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextInputBase.default, {
67
66
  ref: ref,
68
67
  ...inputProps,
69
- ...a11yProps,
70
- nativeID: inputId
68
+ nativeID: inputId,
69
+ ...props
71
70
  })
72
71
  });
73
72
  });
74
73
  TextInput.displayName = 'TextInput';
75
- TextInput.propTypes = { ..._propTypes.default.types,
76
- ..._propTypes2.default,
74
+ TextInput.propTypes = { ...selectedSystemPropTypes,
75
+ ..._propTypes.default,
77
76
  tokens: (0, _utils.getTokensPropType)('TextInput'),
78
77
  variant: _utils.variantProp.propType
79
78
  };
@@ -29,6 +29,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
29
29
 
30
30
  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; }
31
31
 
32
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
33
+
32
34
  const selectInputStyles = ({
33
35
  backgroundColor,
34
36
  color,
@@ -144,7 +146,7 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(({
144
146
  onMouseOut,
145
147
  tokens,
146
148
  variant = {},
147
- ...remainingProps
149
+ ...rest
148
150
  }, ref) => {
149
151
  const [isFocused, setIsFocused] = (0, _react.useState)(false);
150
152
 
@@ -198,7 +200,7 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(({
198
200
  const {
199
201
  icon: IconComponent
200
202
  } = themeTokens;
201
- const inputProps = { ...remainingProps,
203
+ const inputProps = { ...selectProps(rest),
202
204
  editable: !inactive,
203
205
  onFocus: handleFocus,
204
206
  onBlur: handleBlur,
@@ -229,7 +231,7 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(({
229
231
  });
230
232
  });
231
233
  TextInputBase.displayName = 'TextInputBase';
232
- TextInputBase.propTypes = {
234
+ TextInputBase.propTypes = { ...selectedSystemPropTypes,
233
235
  value: _propTypes.default.string,
234
236
  height: _propTypes.default.number,
235
237
  initialValue: _propTypes.default.string,
@@ -23,12 +23,10 @@ var _StackView = _interopRequireDefault(require("../StackView"));
23
23
 
24
24
  var _ThemeProvider = require("../ThemeProvider");
25
25
 
26
- var _props = require("../utils/props");
26
+ var _utils = require("../utils");
27
27
 
28
28
  var _input = require("../utils/input");
29
29
 
30
- var _utils = require("../utils");
31
-
32
30
  var _jsxRuntime = require("react/jsx-runtime");
33
31
 
34
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -37,7 +35,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
37
35
 
38
36
  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; }
39
37
 
40
- const selectButtonTokens = tokens => (0, _props.selectTokens)('Button', { ...tokens,
38
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.pressProps, _utils.viewProps]);
39
+
40
+ const selectButtonTokens = tokens => (0, _utils.selectTokens)('Button', { ...tokens,
41
41
  // Width tokens are applied to our inner track. Disable Button width token so it wraps our track width.
42
42
  width: null
43
43
  }); // Map and rename icon-specific tokens to name used within Icon
@@ -117,7 +117,8 @@ const ToggleSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
117
117
  tooltip,
118
118
  variant,
119
119
  accessibilityRole = 'switch',
120
- accessibilityLabel = label
120
+ accessibilityLabel = label,
121
+ ...rest
121
122
  }, ref) => {
122
123
  const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('ToggleSwitch', tokens, variant);
123
124
  const themeTokens = getTokens();
@@ -159,6 +160,7 @@ const ToggleSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
159
160
  checked: currentValue
160
161
  },
161
162
  onPress: handlePress,
163
+ ...selectProps(rest),
162
164
  children: buttonState => {
163
165
  const stateTokens = getTokens(buttonState);
164
166
  const IconComponent = stateTokens.icon;
@@ -188,10 +190,9 @@ const ToggleSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
188
190
  });
189
191
  });
190
192
  ToggleSwitch.displayName = 'ToggleSwitch';
191
- ToggleSwitch.propTypes = { ..._props.a11yProps.propTypes,
192
- ..._props.pressProps.propTypes,
193
- tokens: (0, _props.getTokensPropType)('ToggleSwitch'),
194
- variant: _props.variantProp.propType,
193
+ ToggleSwitch.propTypes = { ...selectedSystemPropTypes,
194
+ tokens: (0, _utils.getTokensPropType)('ToggleSwitch'),
195
+ variant: _utils.variantProp.propType,
195
196
 
196
197
  /**
197
198
  * If this is a "controlled" component and a parent handles its selected state,
@@ -35,6 +35,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
35
35
 
36
36
  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; }
37
37
 
38
+ const [selectProps, selectedSystemPropTypes] = (0, _props.selectSystemProps)([_props.a11yProps, _props.pressProps, _props.viewProps]);
38
39
  const ToggleSwitchGroup = /*#__PURE__*/(0, _react.forwardRef)(({
39
40
  variant,
40
41
  tokens,
@@ -76,13 +77,11 @@ const ToggleSwitchGroup = /*#__PURE__*/(0, _react.forwardRef)(({
76
77
  onChange,
77
78
  readOnly
78
79
  });
79
-
80
- const a11y = _props.a11yProps.select({
80
+ const selectedProps = selectProps({
81
81
  accessibilityRole,
82
82
  ...rest
83
83
  });
84
-
85
- const itemA11yRole = a11y.accessibilityRole === 'radiogroup' ? 'radio' : 'switch';
84
+ const itemA11yRole = selectedProps.accessibilityRole === 'radiogroup' ? 'radio' : 'switch';
86
85
  const toggleSwitches = items.map(({
87
86
  label,
88
87
  id = label,
@@ -128,7 +127,7 @@ const ToggleSwitchGroup = /*#__PURE__*/(0, _react.forwardRef)(({
128
127
  feedback: feedback,
129
128
  inactive: inactive,
130
129
  validation: validation,
131
- ...a11y,
130
+ ...selectedProps,
132
131
  children: (0, _StackView.getStackedContent)(toggleSwitches, {
133
132
  space,
134
133
  direction: 'column'
@@ -136,8 +135,7 @@ const ToggleSwitchGroup = /*#__PURE__*/(0, _react.forwardRef)(({
136
135
  });
137
136
  });
138
137
  ToggleSwitchGroup.displayName = 'ToggleSwitchGroup';
139
- ToggleSwitchGroup.propTypes = { ..._props.a11yProps.propTypes,
140
- ..._props.pressProps.propTypes,
138
+ ToggleSwitchGroup.propTypes = { ...selectedSystemPropTypes,
141
139
  tokens: (0, _props.getTokensPropType)('ToggleSwitchGroup'),
142
140
  variant: _props.variantProp.propType,
143
141
 
@@ -43,6 +43,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
43
43
 
44
44
  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; }
45
45
 
46
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
47
+
46
48
  const selectTooltipStyles = ({
47
49
  backgroundColor,
48
50
  paddingTop,
@@ -167,7 +169,8 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)(({
167
169
  position = 'auto',
168
170
  copy = 'en',
169
171
  tokens,
170
- variant
172
+ variant,
173
+ ...rest
171
174
  }, ref) => {
172
175
  const [isOpen, setIsOpen] = (0, _react.useState)(false);
173
176
  const controlRef = (0, _react.useRef)();
@@ -280,6 +283,7 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)(({
280
283
  } : undefined;
281
284
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
282
285
  style: staticStyles.container,
286
+ ...selectProps(rest),
283
287
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Pressable.default, {
284
288
  onPress: toggleIsOpen,
285
289
  ref: controlRef,
@@ -312,7 +316,8 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)(({
312
316
  });
313
317
  });
314
318
  Tooltip.displayName = 'Tooltip';
315
- Tooltip.propTypes = {
319
+ Tooltip.propTypes = { ...selectedSystemPropTypes,
320
+
316
321
  /**
317
322
  * Used to render the control (i.e. tooltip trigger). If a render function is used it will receive the
318
323
  * pressable state and tooltip variant as an argument.
@@ -21,6 +21,8 @@ var _jsxRuntime = require("react/jsx-runtime");
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
25
+
24
26
  const selectInnerContainerStyles = ({
25
27
  borderRadius,
26
28
  width
@@ -49,7 +51,8 @@ const selectIconTokens = ({
49
51
  const TooltipButton = ({
50
52
  pressableState,
51
53
  tokens,
52
- variant
54
+ variant,
55
+ ...rest
53
56
  }) => {
54
57
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('TooltipButton', tokens, variant, pressableState);
55
58
  const {
@@ -57,6 +60,7 @@ const TooltipButton = ({
57
60
  } = themeTokens;
58
61
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
59
62
  style: (0, _ThemeProvider.applyOuterBorder)(themeTokens),
63
+ ...selectProps(rest),
60
64
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
61
65
  style: selectInnerContainerStyles(themeTokens),
62
66
  children: IconComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
@@ -67,7 +71,8 @@ const TooltipButton = ({
67
71
  });
68
72
  };
69
73
 
70
- TooltipButton.propTypes = {
74
+ TooltipButton.propTypes = { ...selectedSystemPropTypes,
75
+
71
76
  /**
72
77
  * Used as appearances when resolving theme tokens.
73
78
  */
@@ -32,6 +32,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
32
32
  /**
33
33
  * @typedef {import('../utils/a11y/semantics').TextTag} TextTag
34
34
  */
35
+ const [selectProps, selectedSystemPropTypes] = (0, _utils2.selectSystemProps)([_utils2.a11yProps, _utils2.viewProps]);
36
+
35
37
  const selectTextStyles = ({
36
38
  fontWeight,
37
39
  fontSize,
@@ -76,24 +78,24 @@ const Typography = /*#__PURE__*/(0, _react.forwardRef)(({
76
78
  dataSet,
77
79
  maxFontSizeMultiplier: (0, _utils2.getMaxFontMultiplier)(themeTokens)
78
80
  };
79
- const a11y = { ...(0, _utils2.getA11yPropsFromHtmlTag)(tag, accessibilityRole),
80
- ..._utils2.a11yProps.select(rest)
81
- };
81
+ const selectedProps = selectProps({ ...(0, _utils2.getA11yPropsFromHtmlTag)(tag, accessibilityRole),
82
+ ...rest
83
+ });
82
84
  return block ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
83
85
  ref: ref,
84
- ...a11y,
86
+ ...selectedProps,
85
87
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, { ...textProps,
86
88
  children: children
87
89
  })
88
90
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
89
91
  ref: ref,
90
92
  ...textProps,
91
- ...a11y,
93
+ ...selectedProps,
92
94
  children: children
93
95
  });
94
96
  });
95
97
  Typography.displayName = 'Typography';
96
- Typography.propTypes = { ..._utils2.a11yProps.types,
98
+ Typography.propTypes = { ...selectedSystemPropTypes,
97
99
  tokens: (0, _utils2.getTokensPropType)('Typography'),
98
100
  variant: _utils2.variantProp.propType,
99
101
 
package/lib/index.js CHANGED
@@ -46,6 +46,7 @@ var _exportNames = {
46
46
  BaseProvider: true,
47
47
  ViewportProvider: true,
48
48
  useViewport: true,
49
+ ViewportContext: true,
49
50
  ThemeProvider: true,
50
51
  useTheme: true,
51
52
  useSetTheme: true,
@@ -304,6 +305,12 @@ Object.defineProperty(exports, "useViewport", {
304
305
  return _ViewportProvider.useViewport;
305
306
  }
306
307
  });
308
+ Object.defineProperty(exports, "ViewportContext", {
309
+ enumerable: true,
310
+ get: function () {
311
+ return _ViewportProvider.ViewportContext;
312
+ }
313
+ });
307
314
  Object.defineProperty(exports, "ThemeProvider", {
308
315
  enumerable: true,
309
316
  get: function () {
@@ -67,7 +67,11 @@ exports.unpackFragment = unpackFragment;
67
67
  const isStringOrNumber = child => typeof child === 'string' || typeof child === 'number'; // Wrap an A11yText with neighouring text strings so it doesn't split them into multiple <Text>s
68
68
 
69
69
 
70
- const isWrapable = child => isStringOrNumber(child) || child.type === _A11yText.default;
70
+ const isWrapable = child => {
71
+ var _child$type;
72
+
73
+ return isStringOrNumber(child) || child.type === _A11yText.default || ((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) === 'FootnoteLink';
74
+ };
71
75
 
72
76
  const combineKeys = childrenArray => childrenArray.reduce((newKey, child) => `${newKey}${child.key || ''}`, ''); // Group wrappable children for one `<Text>` parent, merging adjacent text nodes
73
77
 
@@ -165,6 +165,20 @@ var _useUniqueId = _interopRequireDefault(require("./useUniqueId"));
165
165
 
166
166
  var _withLinkRouter = _interopRequireDefault(require("./withLinkRouter"));
167
167
 
168
+ var _ssr = require("./ssr");
169
+
170
+ Object.keys(_ssr).forEach(function (key) {
171
+ if (key === "default" || key === "__esModule") return;
172
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
173
+ if (key in exports && exports[key] === _ssr[key]) return;
174
+ Object.defineProperty(exports, key, {
175
+ enumerable: true,
176
+ get: function () {
177
+ return _ssr[key];
178
+ }
179
+ });
180
+ });
181
+
168
182
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
169
183
 
170
184
  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; }
@@ -9,6 +9,7 @@ var _exportNames = {
9
9
  copyPropTypes: true,
10
10
  componentPropType: true,
11
11
  hrefAttrsProp: true,
12
+ inputSupportsProps: true,
12
13
  linkProps: true,
13
14
  pressProps: true,
14
15
  paddingProp: true,
@@ -49,6 +50,12 @@ Object.defineProperty(exports, "hrefAttrsProp", {
49
50
  return _hrefAttrsProp.default;
50
51
  }
51
52
  });
53
+ Object.defineProperty(exports, "inputSupportsProps", {
54
+ enumerable: true,
55
+ get: function () {
56
+ return _inputSupportsProps.default;
57
+ }
58
+ });
52
59
  Object.defineProperty(exports, "linkProps", {
53
60
  enumerable: true,
54
61
  get: function () {
@@ -128,6 +135,8 @@ var _componentPropType = _interopRequireDefault(require("./componentPropType"));
128
135
 
129
136
  var _hrefAttrsProp = _interopRequireDefault(require("./hrefAttrsProp"));
130
137
 
138
+ var _inputSupportsProps = _interopRequireDefault(require("./inputSupportsProps"));
139
+
131
140
  var _linkProps = _interopRequireDefault(require("./linkProps"));
132
141
 
133
142
  var _pressProps = _interopRequireDefault(require("./pressProps"));
@@ -9,7 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const inputSupportProps = {
12
+ var _default = {
13
13
  types: {
14
14
  /**
15
15
  * The input label.
@@ -59,8 +59,7 @@ const inputSupportProps = {
59
59
  tooltip,
60
60
  validation
61
61
  },
62
- rest
62
+ ...rest
63
63
  })
64
64
  };
65
- var _default = inputSupportProps;
66
65
  exports.default = _default;