@telus-uds/components-base 2.0.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/CHANGELOG.md +40 -2
  2. package/lib/A11yInfoProvider/index.js +0 -0
  3. package/lib/A11yText/index.js +0 -0
  4. package/lib/ActionCard/ActionCard.js +0 -0
  5. package/lib/ActionCard/index.js +0 -0
  6. package/lib/ActivityIndicator/Spinner.js +0 -0
  7. package/lib/ActivityIndicator/Spinner.native.js +0 -0
  8. package/lib/ActivityIndicator/index.js +0 -0
  9. package/lib/ActivityIndicator/shared.js +0 -0
  10. package/lib/Autocomplete/Autocomplete.js +0 -0
  11. package/lib/Autocomplete/Loading.js +0 -0
  12. package/lib/Autocomplete/Suggestions.js +0 -0
  13. package/lib/Autocomplete/constants.js +0 -0
  14. package/lib/Autocomplete/dictionary.js +0 -0
  15. package/lib/Autocomplete/index.js +0 -0
  16. package/lib/Badge/Badge.js +0 -0
  17. package/lib/Badge/index.js +0 -0
  18. package/lib/BaseProvider/HydrationContext.js +0 -0
  19. package/lib/BaseProvider/index.js +0 -0
  20. package/lib/Box/Box.js +0 -0
  21. package/lib/Box/backgroundImageStylesMap.js +0 -0
  22. package/lib/Box/index.js +0 -0
  23. package/lib/Button/Button.js +0 -0
  24. package/lib/Button/ButtonBase.js +0 -0
  25. package/lib/Button/ButtonDropdown.js +0 -0
  26. package/lib/Button/ButtonGroup.js +0 -0
  27. package/lib/Button/ButtonLink.js +0 -0
  28. package/lib/Button/index.js +0 -0
  29. package/lib/Button/propTypes.js +0 -0
  30. package/lib/Card/Card.js +0 -0
  31. package/lib/Card/CardBase.js +0 -0
  32. package/lib/Card/PressableCardBase.js +2 -1
  33. package/lib/Card/index.js +0 -0
  34. package/lib/CardGroup/CardGroup.js +0 -0
  35. package/lib/CardGroup/dictionary.js +0 -0
  36. package/lib/CardGroup/index.js +0 -0
  37. package/lib/Carousel/Carousel.js +121 -33
  38. package/lib/Carousel/CarouselContext.js +0 -0
  39. package/lib/Carousel/CarouselFirstFocus/CarouselFirstFocus.js +0 -0
  40. package/lib/Carousel/CarouselItem/CarouselItem.js +39 -24
  41. package/lib/Carousel/CarouselItem/index.js +0 -0
  42. package/lib/Carousel/CarouselStepTracker/CarouselStepTracker.js +41 -4
  43. package/lib/Carousel/CarouselStepTracker/index.js +0 -0
  44. package/lib/Carousel/CarouselTabs/CarouselTabs.js +0 -0
  45. package/lib/Carousel/CarouselTabs/CarouselTabsPanel.js +0 -0
  46. package/lib/Carousel/CarouselTabs/CarouselTabsPanelItem.js +0 -0
  47. package/lib/Carousel/CarouselTabs/index.js +0 -0
  48. package/lib/Carousel/CarouselThumbnail.js +0 -0
  49. package/lib/Carousel/CarouselThumbnailNavigation.js +0 -0
  50. package/lib/Carousel/Constants.js +3 -0
  51. package/lib/Carousel/dictionary.js +0 -0
  52. package/lib/Carousel/index.js +0 -0
  53. package/lib/Checkbox/Checkbox.js +0 -0
  54. package/lib/Checkbox/CheckboxButton.js +0 -0
  55. package/lib/Checkbox/CheckboxGroup.js +4 -2
  56. package/lib/Checkbox/CheckboxInput.js +0 -0
  57. package/lib/Checkbox/CheckboxInput.native.js +0 -0
  58. package/lib/Checkbox/index.js +0 -0
  59. package/lib/CheckboxCard/CheckboxCard.js +0 -0
  60. package/lib/CheckboxCard/index.js +0 -0
  61. package/lib/CheckboxCardGroup/CheckboxCardGroup.js +0 -0
  62. package/lib/CheckboxCardGroup/index.js +0 -0
  63. package/lib/ColourToggle/ColourBubble.js +0 -0
  64. package/lib/ColourToggle/ColourToggle.js +0 -0
  65. package/lib/ColourToggle/index.js +0 -0
  66. package/lib/Divider/Divider.js +0 -0
  67. package/lib/Divider/index.js +0 -0
  68. package/lib/DownloadApp/DownloadApp.js +0 -0
  69. package/lib/DownloadApp/dictionary.js +0 -0
  70. package/lib/DownloadApp/index.js +0 -0
  71. package/lib/ExpandCollapse/Accordion.js +0 -0
  72. package/lib/ExpandCollapse/Control.js +0 -0
  73. package/lib/ExpandCollapse/ExpandCollapse.js +0 -0
  74. package/lib/ExpandCollapse/Panel.js +0 -0
  75. package/lib/ExpandCollapse/dictionary.js +0 -0
  76. package/lib/ExpandCollapse/index.js +0 -0
  77. package/lib/Feedback/Feedback.js +0 -0
  78. package/lib/Feedback/index.js +0 -0
  79. package/lib/Fieldset/Fieldset.js +0 -0
  80. package/lib/Fieldset/FieldsetContainer.js +0 -0
  81. package/lib/Fieldset/FieldsetContainer.native.js +0 -0
  82. package/lib/Fieldset/Legend.js +0 -0
  83. package/lib/Fieldset/Legend.native.js +0 -0
  84. package/lib/Fieldset/cssReset.js +0 -0
  85. package/lib/Fieldset/index.js +0 -0
  86. package/lib/FileUpload/FileUpload.js +0 -0
  87. package/lib/FileUpload/NotificationContent.js +0 -0
  88. package/lib/FileUpload/dictionary.js +0 -0
  89. package/lib/FileUpload/index.js +0 -0
  90. package/lib/FlexGrid/Col/Col.js +0 -0
  91. package/lib/FlexGrid/Col/index.js +0 -0
  92. package/lib/FlexGrid/FlexGrid.js +0 -0
  93. package/lib/FlexGrid/Row/Row.js +0 -0
  94. package/lib/FlexGrid/Row/index.js +0 -0
  95. package/lib/FlexGrid/helpers/index.js +0 -0
  96. package/lib/FlexGrid/index.js +0 -0
  97. package/lib/FlexGrid/providers/GutterContext.js +0 -0
  98. package/lib/Footnote/Footnote.js +0 -0
  99. package/lib/Footnote/FootnoteLink.js +0 -0
  100. package/lib/Footnote/dictionary.js +0 -0
  101. package/lib/Footnote/index.js +0 -0
  102. package/lib/HorizontalScroll/HorizontalScroll.js +17 -13
  103. package/lib/HorizontalScroll/HorizontalScrollButton.js +0 -0
  104. package/lib/HorizontalScroll/ScrollViewEnd.js +0 -0
  105. package/lib/HorizontalScroll/ScrollViewEnd.native.js +0 -0
  106. package/lib/HorizontalScroll/dictionary.js +0 -0
  107. package/lib/HorizontalScroll/index.js +0 -0
  108. package/lib/HorizontalScroll/itemPositions.js +0 -0
  109. package/lib/Icon/Icon.js +1 -0
  110. package/lib/Icon/IconText.js +0 -0
  111. package/lib/Icon/index.js +0 -0
  112. package/lib/IconButton/IconButton.js +0 -0
  113. package/lib/IconButton/index.js +0 -0
  114. package/lib/InputLabel/InputLabel.js +0 -0
  115. package/lib/InputLabel/LabelContent.js +0 -0
  116. package/lib/InputLabel/LabelContent.native.js +0 -0
  117. package/lib/InputLabel/index.js +0 -0
  118. package/lib/InputSupports/InputSupports.js +3 -0
  119. package/lib/InputSupports/index.js +0 -0
  120. package/lib/InputSupports/useInputSupports.js +0 -0
  121. package/lib/Link/ChevronLink.js +0 -0
  122. package/lib/Link/InlinePressable.js +0 -0
  123. package/lib/Link/InlinePressable.native.js +0 -0
  124. package/lib/Link/Link.js +0 -0
  125. package/lib/Link/LinkBase.js +2 -2
  126. package/lib/Link/TextButton.js +0 -0
  127. package/lib/Link/index.js +0 -0
  128. package/lib/List/List.js +0 -0
  129. package/lib/List/ListItem.js +0 -0
  130. package/lib/List/ListItemBase.js +0 -0
  131. package/lib/List/ListItemContent.js +0 -0
  132. package/lib/List/ListItemMark.js +0 -0
  133. package/lib/List/PressableListItemBase.js +0 -0
  134. package/lib/List/index.js +0 -0
  135. package/lib/Listbox/GroupControl.js +0 -0
  136. package/lib/Listbox/Listbox.js +0 -0
  137. package/lib/Listbox/ListboxContext.js +0 -0
  138. package/lib/Listbox/ListboxGroup.js +0 -0
  139. package/lib/Listbox/ListboxItem.js +0 -0
  140. package/lib/Listbox/ListboxOverlay.js +0 -0
  141. package/lib/Listbox/PressableItem.js +2 -2
  142. package/lib/Listbox/index.js +0 -0
  143. package/lib/Modal/Modal.js +4 -0
  144. package/lib/Modal/ModalContent.js +27 -8
  145. package/lib/Modal/WebModal.js +0 -0
  146. package/lib/Modal/dictionary.js +0 -0
  147. package/lib/Modal/index.js +0 -0
  148. package/lib/MultiSelectFilter/ModalOverlay.js +0 -0
  149. package/lib/MultiSelectFilter/MultiSelectFilter.js +0 -0
  150. package/lib/MultiSelectFilter/dictionary.js +0 -0
  151. package/lib/MultiSelectFilter/index.js +0 -0
  152. package/lib/Notification/Notification.js +0 -0
  153. package/lib/Notification/dictionary.js +0 -0
  154. package/lib/Notification/index.js +0 -0
  155. package/lib/OrderedList/Item.js +0 -0
  156. package/lib/OrderedList/ItemBase.js +0 -0
  157. package/lib/OrderedList/OrderedList.js +0 -0
  158. package/lib/OrderedList/OrderedListBase.js +0 -0
  159. package/lib/OrderedList/index.js +0 -0
  160. package/lib/Pagination/PageButton.js +0 -0
  161. package/lib/Pagination/Pagination.js +0 -0
  162. package/lib/Pagination/SideButton.js +0 -0
  163. package/lib/Pagination/constants.js +0 -0
  164. package/lib/Pagination/dictionary.js +0 -0
  165. package/lib/Pagination/index.js +0 -0
  166. package/lib/Pagination/usePagination.js +0 -0
  167. package/lib/Portal/Portal.js +0 -0
  168. package/lib/Portal/Portal.native.js +0 -0
  169. package/lib/Portal/index.js +0 -0
  170. package/lib/PriceLockup/PriceLockup.js +0 -0
  171. package/lib/PriceLockup/index.js +0 -0
  172. package/lib/PriceLockup/utils/renderFootnoteContent.js +0 -0
  173. package/lib/PriceLockup/utils/renderFootnoteLinks.js +0 -0
  174. package/lib/PriceLockup/utils/renderPrice.js +0 -0
  175. package/lib/PriceLockup/utils/renderTypography.js +0 -0
  176. package/lib/ProductCard/ProductCard.js +0 -0
  177. package/lib/ProductCard/dictionary.js +0 -0
  178. package/lib/ProductCard/index.js +0 -0
  179. package/lib/ProductCardGroup/ProductCardGroup.js +0 -0
  180. package/lib/ProductCardGroup/index.js +0 -0
  181. package/lib/Progress/Progress.js +8 -2
  182. package/lib/Progress/ProgressBar.js +40 -12
  183. package/lib/Progress/ProgressBarBackground.js +4 -2
  184. package/lib/Progress/constants.js +4 -0
  185. package/lib/Progress/index.js +0 -0
  186. package/lib/QuickLinks/QuickLinks.js +0 -0
  187. package/lib/QuickLinks/QuickLinksCard.js +0 -0
  188. package/lib/QuickLinks/QuickLinksItem.js +0 -0
  189. package/lib/QuickLinks/index.js +0 -0
  190. package/lib/QuickLinksFeature/QuickLinksFeature.js +0 -0
  191. package/lib/QuickLinksFeature/QuickLinksFeatureItem.js +0 -0
  192. package/lib/QuickLinksFeature/index.js +0 -0
  193. package/lib/Radio/Radio.js +0 -0
  194. package/lib/Radio/RadioButton.js +0 -0
  195. package/lib/Radio/RadioGroup.js +0 -0
  196. package/lib/Radio/RadioInput.js +0 -0
  197. package/lib/Radio/RadioInput.native.js +0 -0
  198. package/lib/Radio/index.js +0 -0
  199. package/lib/RadioCard/RadioCard.js +0 -0
  200. package/lib/RadioCard/RadioCardGroup.js +0 -0
  201. package/lib/RadioCard/index.js +0 -0
  202. package/lib/Responsive/Responsive.js +0 -0
  203. package/lib/Responsive/ResponsiveProp.js +0 -0
  204. package/lib/Responsive/ResponsiveWithMediaQueryStyleSheet.js +0 -0
  205. package/lib/Responsive/index.js +0 -0
  206. package/lib/Search/Search.js +4 -2
  207. package/lib/Search/dictionary.js +0 -0
  208. package/lib/Search/index.js +0 -0
  209. package/lib/Select/Group.js +0 -0
  210. package/lib/Select/Group.native.js +0 -0
  211. package/lib/Select/Item.js +0 -0
  212. package/lib/Select/Item.native.js +0 -0
  213. package/lib/Select/Picker.js +0 -0
  214. package/lib/Select/Picker.native.js +1 -0
  215. package/lib/Select/Select.js +1 -4
  216. package/lib/Select/constants.js +0 -0
  217. package/lib/Select/index.js +0 -0
  218. package/lib/SideNav/Item.js +0 -0
  219. package/lib/SideNav/ItemContent.js +0 -0
  220. package/lib/SideNav/ItemsGroup.js +0 -0
  221. package/lib/SideNav/SideNav.js +0 -0
  222. package/lib/SideNav/index.js +0 -0
  223. package/lib/Skeleton/Skeleton.js +0 -0
  224. package/lib/Skeleton/index.js +0 -0
  225. package/lib/Skeleton/skeleton.constant.js +0 -0
  226. package/lib/Skeleton/skeletonWebAnimation.js +0 -0
  227. package/lib/Skeleton/useSkeletonNativeAnimation.js +0 -0
  228. package/lib/SkipLink/SkipLink.js +0 -0
  229. package/lib/SkipLink/index.js +0 -0
  230. package/lib/Spacer/Spacer.js +0 -0
  231. package/lib/Spacer/index.js +0 -0
  232. package/lib/StackView/StackView.js +0 -0
  233. package/lib/StackView/StackWrap.js +0 -0
  234. package/lib/StackView/StackWrap.native.js +0 -0
  235. package/lib/StackView/StackWrapBox.js +0 -0
  236. package/lib/StackView/StackWrapGap.js +0 -0
  237. package/lib/StackView/common.js +0 -0
  238. package/lib/StackView/getStackedContent.js +0 -0
  239. package/lib/StackView/index.js +0 -0
  240. package/lib/Status/Status.js +6 -2
  241. package/lib/Status/index.js +0 -0
  242. package/lib/StepTracker/Step.js +0 -0
  243. package/lib/StepTracker/StepTracker.js +0 -0
  244. package/lib/StepTracker/dictionary.js +0 -0
  245. package/lib/StepTracker/index.js +0 -0
  246. package/lib/TabBar/TabBar.js +0 -0
  247. package/lib/TabBar/TabBarItem.js +0 -0
  248. package/lib/TabBar/index.js +0 -0
  249. package/lib/Tabs/Tabs.js +0 -0
  250. package/lib/Tabs/TabsItem.js +0 -0
  251. package/lib/Tabs/index.js +0 -0
  252. package/lib/Tags/Tags.js +0 -0
  253. package/lib/Tags/index.js +0 -0
  254. package/lib/TextInput/TextArea.js +0 -0
  255. package/lib/TextInput/TextInput.js +0 -0
  256. package/lib/TextInput/TextInputBase.js +2 -2
  257. package/lib/TextInput/dictionary.js +0 -0
  258. package/lib/TextInput/index.js +0 -0
  259. package/lib/TextInput/propTypes.js +0 -0
  260. package/lib/ThemeProvider/ThemeProvider.js +0 -0
  261. package/lib/ThemeProvider/index.js +0 -0
  262. package/lib/ThemeProvider/useResponsiveThemeTokens.js +0 -0
  263. package/lib/ThemeProvider/useSetTheme.js +0 -0
  264. package/lib/ThemeProvider/useTheme.js +0 -0
  265. package/lib/ThemeProvider/useThemeTokens.js +0 -0
  266. package/lib/ThemeProvider/utils/index.js +0 -0
  267. package/lib/ThemeProvider/utils/styles.js +0 -0
  268. package/lib/ThemeProvider/utils/theme-tokens.js +0 -0
  269. package/lib/Timeline/Timeline.js +0 -0
  270. package/lib/Timeline/index.js +0 -0
  271. package/lib/ToggleSwitch/ToggleSwitch.js +0 -0
  272. package/lib/ToggleSwitch/ToggleSwitchGroup.js +0 -0
  273. package/lib/ToggleSwitch/index.js +0 -0
  274. package/lib/Tooltip/Backdrop.js +0 -0
  275. package/lib/Tooltip/Backdrop.native.js +0 -0
  276. package/lib/Tooltip/Tooltip.js +22 -13
  277. package/lib/Tooltip/Tooltip.native.js +24 -15
  278. package/lib/Tooltip/dictionary.js +0 -0
  279. package/lib/Tooltip/getTooltipPosition.js +0 -0
  280. package/lib/Tooltip/index.js +0 -0
  281. package/lib/Tooltip/shared.js +0 -0
  282. package/lib/TooltipButton/TooltipButton.js +0 -0
  283. package/lib/TooltipButton/index.js +0 -0
  284. package/lib/Typography/Typography.js +12 -0
  285. package/lib/Typography/index.js +0 -0
  286. package/lib/Validator/Validator.js +4 -0
  287. package/lib/Validator/index.js +0 -0
  288. package/lib/ViewportProvider/ViewportProvider.js +0 -0
  289. package/lib/ViewportProvider/index.js +0 -0
  290. package/lib/ViewportProvider/useViewport.js +0 -0
  291. package/lib/ViewportProvider/useViewportListener.js +0 -0
  292. package/lib/index.js +0 -0
  293. package/lib/server.js +0 -0
  294. package/lib/utils/BaseView/BaseView.js +0 -0
  295. package/lib/utils/BaseView/BaseView.native.js +0 -0
  296. package/lib/utils/BaseView/index.js +0 -0
  297. package/lib/utils/a11y/index.js +0 -0
  298. package/lib/utils/a11y/semantics.js +0 -0
  299. package/lib/utils/a11y/textSize.js +0 -0
  300. package/lib/utils/animation/index.js +0 -0
  301. package/lib/utils/animation/useVerticalExpandAnimation.js +0 -0
  302. package/lib/utils/children.js +0 -0
  303. package/lib/utils/containUniqueFields.js +0 -0
  304. package/lib/utils/convertFromMegaByteToByte.js +0 -0
  305. package/lib/utils/floating-ui/index.js +0 -0
  306. package/lib/utils/floating-ui/index.native.js +0 -0
  307. package/lib/utils/formatImageSource.js +0 -0
  308. package/lib/utils/hasOwnProperty.js +0 -0
  309. package/lib/utils/htmlAttrs.js +0 -0
  310. package/lib/utils/index.js +0 -0
  311. package/lib/utils/info/index.js +0 -0
  312. package/lib/utils/info/platform/index.js +0 -0
  313. package/lib/utils/info/platform/platform.android.js +0 -0
  314. package/lib/utils/info/platform/platform.ios.js +0 -0
  315. package/lib/utils/info/platform/platform.js +0 -0
  316. package/lib/utils/info/platform/platform.native.js +0 -0
  317. package/lib/utils/info/versions.js +0 -0
  318. package/lib/utils/input.js +0 -0
  319. package/lib/utils/pressability.js +0 -0
  320. package/lib/utils/props/a11yProps.js +0 -0
  321. package/lib/utils/props/clickProps.js +0 -0
  322. package/lib/utils/props/componentPropType.js +0 -0
  323. package/lib/utils/props/contentfulProps.js +22 -0
  324. package/lib/utils/props/copyPropTypes.js +0 -0
  325. package/lib/utils/props/getPropSelector.js +0 -0
  326. package/lib/utils/props/handlerProps.js +0 -0
  327. package/lib/utils/props/hrefAttrsProp.js +0 -0
  328. package/lib/utils/props/index.js +2 -1
  329. package/lib/utils/props/inputSupportsProps.js +0 -0
  330. package/lib/utils/props/linkProps.js +0 -0
  331. package/lib/utils/props/paddingProp.js +0 -0
  332. package/lib/utils/props/pressProps.js +0 -0
  333. package/lib/utils/props/rectProp.js +0 -0
  334. package/lib/utils/props/responsiveProps.js +0 -0
  335. package/lib/utils/props/selectSystemProps.js +0 -0
  336. package/lib/utils/props/spacingProps.js +0 -0
  337. package/lib/utils/props/textInputProps.js +0 -0
  338. package/lib/utils/props/textProps.js +0 -0
  339. package/lib/utils/props/tokens.js +0 -0
  340. package/lib/utils/props/variantProp.js +0 -0
  341. package/lib/utils/props/viewProps.js +0 -0
  342. package/lib/utils/ssr-media-query/create-stylesheet/create-stylesheet-mobile.js +0 -0
  343. package/lib/utils/ssr-media-query/create-stylesheet/index.android.js +0 -0
  344. package/lib/utils/ssr-media-query/create-stylesheet/index.ios.js +0 -0
  345. package/lib/utils/ssr-media-query/create-stylesheet/index.js +0 -0
  346. package/lib/utils/ssr-media-query/hash.js +0 -0
  347. package/lib/utils/ssr-media-query/index.js +0 -0
  348. package/lib/utils/ssr-media-query/utils/common.js +0 -0
  349. package/lib/utils/ssr-media-query/utils/create-declaration-block.js +0 -0
  350. package/lib/utils/ssr-media-query/utils/create-media-query-styles.js +0 -0
  351. package/lib/utils/ssr-media-query/utils/hyphenate-style-name.js +0 -0
  352. package/lib/utils/ssr-media-query/utils/inject.js +0 -0
  353. package/lib/utils/ssr.js +0 -0
  354. package/lib/utils/transformGradient.js +0 -0
  355. package/lib/utils/useCopy.js +0 -0
  356. package/lib/utils/useHash.js +0 -0
  357. package/lib/utils/useHash.native.js +0 -0
  358. package/lib/utils/useOverlaidPosition.js +0 -0
  359. package/lib/utils/useResponsiveProp.js +0 -0
  360. package/lib/utils/useSafeLayoutEffect.js +0 -0
  361. package/lib/utils/useScrollBlocking.js +0 -0
  362. package/lib/utils/useScrollBlocking.native.js +0 -0
  363. package/lib/utils/useSpacingScale.js +0 -0
  364. package/lib/utils/useUniqueId.js +0 -0
  365. package/lib/utils/withLinkRouter.js +0 -0
  366. package/package.json +2 -2
  367. package/src/Card/PressableCardBase.jsx +1 -1
  368. package/src/Carousel/Carousel.jsx +166 -34
  369. package/src/Carousel/CarouselItem/CarouselItem.jsx +56 -26
  370. package/src/Carousel/CarouselStepTracker/CarouselStepTracker.jsx +71 -37
  371. package/src/Carousel/Constants.js +3 -0
  372. package/src/Checkbox/CheckboxGroup.jsx +7 -3
  373. package/src/HorizontalScroll/HorizontalScroll.jsx +19 -15
  374. package/src/Icon/Icon.jsx +1 -0
  375. package/src/InputSupports/InputSupports.jsx +1 -0
  376. package/src/Link/LinkBase.jsx +8 -2
  377. package/src/Listbox/PressableItem.jsx +2 -2
  378. package/src/Modal/Modal.jsx +4 -0
  379. package/src/Modal/ModalContent.jsx +23 -7
  380. package/src/Progress/Progress.jsx +12 -2
  381. package/src/Progress/ProgressBar.jsx +48 -13
  382. package/src/Progress/ProgressBarBackground.jsx +4 -2
  383. package/src/Progress/constants.js +4 -0
  384. package/src/Search/Search.jsx +9 -3
  385. package/src/Select/Picker.native.jsx +1 -0
  386. package/src/Select/Select.jsx +8 -9
  387. package/src/Status/Status.jsx +2 -2
  388. package/src/TextInput/TextInputBase.jsx +2 -2
  389. package/src/Tooltip/Tooltip.jsx +6 -1
  390. package/src/Tooltip/Tooltip.native.jsx +7 -1
  391. package/src/Typography/Typography.jsx +12 -0
  392. package/src/Validator/Validator.jsx +7 -1
  393. package/src/utils/props/contentfulProps.js +24 -0
  394. package/src/utils/props/index.js +1 -0
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import View from "react-native-web/dist/exports/View";
4
+ import StyleSheet from "react-native-web/dist/exports/StyleSheet";
4
5
  import { applyShadowToken, useThemeTokens } from '../ThemeProvider';
5
6
  import { a11yProps, getTokensPropType, selectSystemProps, variantProp, viewProps } from '../utils';
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -64,7 +65,7 @@ const Progress = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
64
65
  const themeTokens = useThemeTokens('Progress', tokens, variant);
65
66
  return /*#__PURE__*/_jsx(View, {
66
67
  ref: ref,
67
- style: selectProgressStyles(themeTokens),
68
+ style: [staticStyles.progressContainer, selectProgressStyles(themeTokens)],
68
69
  ...selectProps(rest),
69
70
  children: children
70
71
  });
@@ -85,4 +86,9 @@ Progress.propTypes = {
85
86
  */
86
87
  variant: variantProp.propType
87
88
  };
88
- export default Progress;
89
+ export default Progress;
90
+ const staticStyles = StyleSheet.create({
91
+ progressContainer: {
92
+ position: 'relative'
93
+ }
94
+ });
@@ -6,9 +6,10 @@ import View from "react-native-web/dist/exports/View";
6
6
  import ProgressBarBackground from './ProgressBarBackground';
7
7
  import { applyShadowToken, useThemeTokens } from '../ThemeProvider';
8
8
  import { a11yProps, getTokensPropType, selectSystemProps, variantProp, viewProps } from '../utils';
9
+ import { MAX_PERCENT_VALUE, MIN_PERCENT_VALUE } from './constants';
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, viewProps]);
11
- const selectBarStyles = (_ref, percentage) => {
12
+ const selectBarStyles = (_ref, calculatedPercentage, barPosition) => {
12
13
  let {
13
14
  backgroundColor,
14
15
  borderRadius,
@@ -22,7 +23,8 @@ const selectBarStyles = (_ref, percentage) => {
22
23
  outlineWidth,
23
24
  outlineColor,
24
25
  ...applyShadowToken(shadow),
25
- width: `${percentage}%`
26
+ width: `${calculatedPercentage}%`,
27
+ left: `${barPosition}%`
26
28
  };
27
29
  };
28
30
 
@@ -67,27 +69,45 @@ const ProgressBar = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
67
69
  percentage = 0,
68
70
  tokens,
69
71
  variant,
72
+ offset = {
73
+ items: 0,
74
+ current: 1
75
+ },
70
76
  ...rest
71
77
  } = _ref2;
78
+ const {
79
+ items,
80
+ current
81
+ } = offset;
82
+ let calculatedPercentage = percentage;
83
+ let barPosition = MIN_PERCENT_VALUE;
84
+ const validItems = items > MIN_PERCENT_VALUE;
85
+ if (validItems) {
86
+ calculatedPercentage = MAX_PERCENT_VALUE / items;
87
+ barPosition = calculatedPercentage * (current < 1 ? MIN_PERCENT_VALUE : current - 1);
88
+ if (current > items) {
89
+ barPosition = calculatedPercentage * (items - 1);
90
+ }
91
+ }
72
92
  const themeTokens = useThemeTokens('ProgressBar', tokens, variant);
73
- if (percentage < 0) {
93
+ if (percentage < MIN_PERCENT_VALUE) {
74
94
  throw new Error('ProgressBar: `percentage` must be a positive number');
75
- } else if (percentage > 100) {
95
+ } else if (percentage > MAX_PERCENT_VALUE) {
76
96
  throw new Error('ProgressBar: `percentage` cannot exceed 100');
77
97
  }
78
98
  const selectedProps = selectProps({
79
99
  accessibilityRole: 'progressbar',
80
100
  accessibilityValue: {
81
- min: 0,
82
- max: 100,
83
- now: percentage,
84
- text: `${percentage}%`
101
+ min: MIN_PERCENT_VALUE,
102
+ max: MAX_PERCENT_VALUE,
103
+ now: calculatedPercentage.toFixed(2),
104
+ text: `${validItems ? (barPosition + calculatedPercentage).toFixed(2) : calculatedPercentage}%`
85
105
  },
86
106
  ...rest
87
107
  });
88
- return percentage > 0 ? /*#__PURE__*/_jsx(View, {
108
+ return percentage > MIN_PERCENT_VALUE || items ? /*#__PURE__*/_jsx(View, {
89
109
  ref: ref,
90
- style: [staticStyles.bar, selectBarStyles(themeTokens, percentage)],
110
+ style: [staticStyles.bar, selectBarStyles(themeTokens, calculatedPercentage, barPosition)],
91
111
  ...selectedProps,
92
112
  children: children ?? /*#__PURE__*/_jsx(ProgressBarBackground, {
93
113
  variant: variant
@@ -116,14 +136,22 @@ ProgressBar.propTypes = {
116
136
  /**
117
137
  * Progress bar variant.
118
138
  */
119
- variant: variantProp.propType
139
+ variant: variantProp.propType,
140
+ /**
141
+ * Using the offset object, the `items` will determine the total number of items.
142
+ * The `current` will determine the current position of the progress bar.
143
+ */
144
+ offset: PropTypes.shape({
145
+ items: PropTypes.number,
146
+ current: PropTypes.number
147
+ })
120
148
  };
121
149
  export default ProgressBar;
122
150
  const staticStyles = StyleSheet.create({
123
151
  bar: {
124
152
  height: '100%',
125
153
  overflow: 'hidden',
126
- position: 'absolute',
154
+ position: 'relative',
127
155
  ...Platform.select({
128
156
  web: {
129
157
  outlineStyle: 'solid'
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import ImageBackground from "react-native-web/dist/exports/ImageBackground";
3
3
  import StyleSheet from "react-native-web/dist/exports/StyleSheet";
4
+ import { INACTIVE_VARIANT, NEGATIVE_VARIANT } from './constants';
4
5
  import { variantProp } from '../utils';
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  const inactiveBackground = `%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='24'%3E%3Cdefs%3E%3Cpattern id='inactive' patternUnits='userSpaceOnUse' width='8' height='8'%3E%3Crect width='8' height='8' fill='rgba(255, 255, 255, 0)'%3E%3C/rect%3E%3Ccircle cx='4' cy='4' r='2' fill='rgba(0, 0, 0, 0.4)' stroke='rgba(0, 0, 0, 0.4)' stroke-width='0'%3E%3C/circle%3E%3Ccircle cx='0' cy='0' r='2' fill='rgba(0, 0, 0, 0.4)' stroke='rgba(0, 0, 0, 0.4)' stroke-width='0'%3E%3C/circle%3E%3Ccircle cx='0' cy='8' r='2' fill='rgba(0, 0, 0, 0.4)' stroke='rgba(0, 0, 0, 0.4)' stroke-width='0'%3E%3C/circle%3E%3Ccircle cx='8' cy='0' r='2' fill='rgba(0, 0, 0, 0.4)' stroke='rgba(0, 0, 0, 0.4)' stroke-width='0'%3E%3C/circle%3E%3Ccircle cx='8' cy='8' r='2' fill='rgba(0, 0, 0, 0.4)' stroke='rgba(0, 0, 0, 0.4)' stroke-width='0'%3E%3C/circle%3E%3C/pattern%3E%3C/defs%3E%3Cpath d='M 0 0 L 0 140 L 2000 2000 L 2000 0 Z' style='fill: url(&quot;%23inactive&quot;);'%3E%3C/path%3E%3C/svg%3E`;
@@ -10,9 +11,10 @@ const ProgressBarBackground = /*#__PURE__*/React.forwardRef((_ref, ref) => {
10
11
  variant
11
12
  } = _ref;
12
13
  let source = null;
13
- if (variant !== null && variant !== void 0 && variant.inactive) {
14
+ // TODO: Remove the `variant?.inactive` & `variant?.negative` to complete the deprecation
15
+ if (variant !== null && variant !== void 0 && variant.inactive || (variant === null || variant === void 0 ? void 0 : variant.style) === INACTIVE_VARIANT) {
14
16
  source = inactiveBackground;
15
- } else if (variant !== null && variant !== void 0 && variant.negative) {
17
+ } else if (variant !== null && variant !== void 0 && variant.negative || (variant === null || variant === void 0 ? void 0 : variant.style) === NEGATIVE_VARIANT) {
16
18
  source = negativeBackground;
17
19
  } else {
18
20
  return null;
@@ -0,0 +1,4 @@
1
+ export const MAX_PERCENT_VALUE = 100;
2
+ export const MIN_PERCENT_VALUE = 0;
3
+ export const INACTIVE_VARIANT = 'inactive';
4
+ export const NEGATIVE_VARIANT = 'negative';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import View from "react-native-web/dist/exports/View";
3
3
  import PropTypes from 'prop-types';
4
4
  import { useThemeTokens, useThemeTokensCallback } from '../ThemeProvider';
5
- import { a11yProps, getTokensPropType, selectSystemProps, selectTokens, useInputValue, useSpacingScale, textInputHandlerProps, textInputProps, variantProp, viewProps } from '../utils';
5
+ import { a11yProps, getTokensPropType, selectSystemProps, selectTokens, useInputValue, useSpacingScale, textInputHandlerProps, textInputProps, variantProp, viewProps, contentfulProps } from '../utils';
6
6
  import TextInputBase from '../TextInput/TextInputBase';
7
7
  import ButtonBase from '../Button/ButtonBase';
8
8
  import useCopy from '../utils/useCopy';
9
9
  import dictionary from './dictionary';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
- const [selectContainerProps, selectedContainerPropTypes] = selectSystemProps([a11yProps, viewProps]);
11
+ const [selectContainerProps, selectedContainerPropTypes] = selectSystemProps([a11yProps, viewProps, contentfulProps]);
12
12
  const [selectInputProps, selectedInputPropTypes] = selectSystemProps([textInputHandlerProps, textInputProps]);
13
13
  const selectInputTokens = _ref => {
14
14
  let {
@@ -73,6 +73,7 @@ const Search = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
73
73
  tokens,
74
74
  variant,
75
75
  nativeSubmitBtnID,
76
+ dataSet,
76
77
  ...rest
77
78
  } = _ref3;
78
79
  const {
@@ -132,6 +133,7 @@ const Search = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
132
133
  } = selectContainerProps(rest);
133
134
  return /*#__PURE__*/_jsx(View, {
134
135
  ...containerProps,
136
+ dataSet: dataSet,
135
137
  children: /*#__PURE__*/_jsx(TextInputBase, {
136
138
  nativeID: nativeID,
137
139
  testID: testID,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -89,6 +89,7 @@ const Picker = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
89
89
  items: items,
90
90
  value: value,
91
91
  onValueChange: handleChange,
92
+ useNativeAndroidPickerStyle: false,
92
93
  style: {
93
94
  inputIOS: style,
94
95
  inputAndroid: selectAndroidInputStyles(style)
@@ -266,10 +266,7 @@ const Select = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
266
266
  children: /*#__PURE__*/_jsx(ValidationIconComponent, {
267
267
  ...selectValidationIconTokens(themeTokens)
268
268
  })
269
- }), IconComponent && Platform.OS !== 'android' &&
270
- /*#__PURE__*/
271
- // we can't hide the default caret of a native picker on android
272
- _jsx(View, {
269
+ }), IconComponent && /*#__PURE__*/_jsx(View, {
273
270
  pointerEvents: "none",
274
271
  style: [staticStyles.iconContainer, selectIconContainerStyles(themeTokens)],
275
272
  children: /*#__PURE__*/_jsx(IconComponent, {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -55,12 +55,16 @@ const selectContainerStyles = _ref => {
55
55
  const selectIconProps = _ref2 => {
56
56
  let {
57
57
  icon,
58
- iconColor
58
+ iconColor,
59
+ iconSize,
60
+ iconPaddingTop
59
61
  } = _ref2;
60
62
  return {
61
63
  icon,
62
64
  tokens: {
63
- color: iconColor
65
+ color: iconColor,
66
+ paddingTop: iconPaddingTop,
67
+ size: iconSize
64
68
  },
65
69
  variant: {
66
70
  size: 'small'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/Tabs/Tabs.js CHANGED
File without changes
File without changes
package/lib/Tabs/index.js CHANGED
File without changes
package/lib/Tags/Tags.js CHANGED
File without changes
package/lib/Tags/index.js CHANGED
File without changes
File without changes
File without changes
@@ -308,7 +308,7 @@ const TextInputBase = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
308
308
  }
309
309
  if (isPassword) {
310
310
  textInputButtons === null || textInputButtons === void 0 || textInputButtons.unshift(/*#__PURE__*/_jsx(IconButton, {
311
- accessibilityLabel: !showPassword ? getCopy('hidePasswordAccessibilityLabel') : getCopy('showPasswordAccessibilityLabel'),
311
+ accessibilityLabel: showPassword ? getCopy('hidePasswordAccessibilityLabel') : getCopy('showPasswordAccessibilityLabel'),
312
312
  icon: !showPassword ? passwordShowButtonIcon : passwordHideButtonIcon,
313
313
  onPress: handleShowOrHide,
314
314
  variant: {
@@ -371,7 +371,7 @@ const TextInputBase = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
371
371
  children: /*#__PURE__*/_jsx(IconComponent, {
372
372
  ...selectIconTokens(themeTokens)
373
373
  })
374
- }), (buttons === null || buttons === void 0 ? void 0 : buttons.length) > 0 && /*#__PURE__*/_jsx(View, {
374
+ }), (buttons === null || buttons === void 0 ? void 0 : buttons.length) > 0 && !inactive && /*#__PURE__*/_jsx(View, {
375
375
  style: [staticStyles.buttonsContainer, selectButtonsContainerStyle(themeTokens)],
376
376
  children: /*#__PURE__*/_jsx(StackView, {
377
377
  direction: "row",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -41,30 +41,40 @@ const selectTooltipShadowStyles = _ref2 => {
41
41
  ...applyShadowToken(shadow)
42
42
  };
43
43
  };
44
- const selectMobileTooltipPositionStyles = _ref3 => {
44
+ const selectToolTipSizeStyles = _ref3 => {
45
+ let {
46
+ maxWidth,
47
+ minWidth
48
+ } = _ref3;
49
+ return {
50
+ maxWidth,
51
+ minWidth
52
+ };
53
+ };
54
+ const selectMobileTooltipPositionStyles = _ref4 => {
45
55
  let {
46
56
  top,
47
57
  left,
48
58
  position
49
- } = _ref3;
59
+ } = _ref4;
50
60
  return {
51
61
  top,
52
62
  left,
53
63
  position
54
64
  };
55
65
  };
56
- const selectMobileArrowStyles = (_ref4, _ref5) => {
66
+ const selectMobileArrowStyles = (_ref5, _ref6) => {
57
67
  let {
58
68
  backgroundColor,
59
69
  arrowWidth,
60
70
  arrowBorderRadius,
61
71
  shadow
62
- } = _ref4;
72
+ } = _ref5;
63
73
  let {
64
74
  placement,
65
75
  x: arrowX,
66
76
  y: arrowY
67
- } = _ref5;
77
+ } = _ref6;
68
78
  const staticSide = {
69
79
  top: 'bottom',
70
80
  right: 'left',
@@ -109,7 +119,7 @@ const defaultControl = (pressableState, variant) => /*#__PURE__*/_jsx(TooltipBut
109
119
  * - You may use one when the information is useful only to a small percentage of users (ie. tech savvy people wouldn't need this info).
110
120
  * - Tooltips may also be useful when vertical space is an issue.
111
121
  */
112
- const Tooltip = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
122
+ const Tooltip = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
113
123
  let {
114
124
  children,
115
125
  content,
@@ -121,7 +131,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
121
131
  inline = false,
122
132
  nativeID,
123
133
  ...rest
124
- } = _ref6;
134
+ } = _ref7;
125
135
  const [isOpen, setIsOpen] = React.useState(false);
126
136
  const arrowRef = React.useRef();
127
137
  const [tooltipDimensions, setTooltipDimensions] = React.useState(null);
@@ -162,19 +172,19 @@ const Tooltip = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
162
172
  setIsOpen(!isOpen);
163
173
  };
164
174
  const close = () => setIsOpen(false);
165
- const getPressableState = _ref7 => {
175
+ const getPressableState = _ref8 => {
166
176
  let {
167
177
  pressed,
168
178
  hovered,
169
179
  focused
170
- } = _ref7;
180
+ } = _ref8;
171
181
  return {
172
182
  pressed,
173
183
  hover: hovered,
174
184
  focus: focused
175
185
  };
176
186
  };
177
- const onTooltipLayout = _ref8 => {
187
+ const onTooltipLayout = _ref9 => {
178
188
  let {
179
189
  nativeEvent: {
180
190
  layout: {
@@ -182,7 +192,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
182
192
  height
183
193
  }
184
194
  }
185
- } = _ref8;
195
+ } = _ref9;
186
196
  if (tooltipDimensions === null || tooltipDimensions.width !== width || tooltipDimensions.height !== height) {
187
197
  setTooltipDimensions({
188
198
  width: Platform.select({
@@ -233,7 +243,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
233
243
  ref: floating,
234
244
  style: [selectTooltipShadowStyles(themeTokens), staticStyles.tooltip,
235
245
  // applied separately so that it doesn't cover the arrow
236
- selectMobileTooltipPositionStyles({
246
+ selectToolTipSizeStyles, selectMobileTooltipPositionStyles({
237
247
  position: strategy,
238
248
  top: y ?? 0,
239
249
  left: x ?? 0
@@ -269,7 +279,6 @@ const staticStyles = StyleSheet.create({
269
279
  },
270
280
  tooltip: {
271
281
  position: 'absolute',
272
- maxWidth: 240,
273
282
  top: 0,
274
283
  left: 0
275
284
  },