@telus-uds/components-base 2.5.0 → 3.0.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 (744) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/lib/cjs/A11yInfoProvider/index.js +73 -0
  3. package/lib/cjs/A11yText/index.js +75 -0
  4. package/lib/cjs/ActionCard/ActionCard.js +349 -0
  5. package/lib/cjs/ActionCard/index.js +9 -0
  6. package/lib/cjs/ActivityIndicator/Spinner.js +85 -0
  7. package/lib/cjs/ActivityIndicator/Spinner.native.js +151 -0
  8. package/lib/cjs/ActivityIndicator/index.js +51 -0
  9. package/lib/cjs/ActivityIndicator/shared.js +20 -0
  10. package/lib/cjs/Autocomplete/Autocomplete.js +480 -0
  11. package/lib/cjs/Autocomplete/Loading.js +42 -0
  12. package/lib/cjs/Autocomplete/Suggestions.js +71 -0
  13. package/lib/cjs/Autocomplete/constants.js +10 -0
  14. package/lib/cjs/Autocomplete/dictionary.js +18 -0
  15. package/lib/cjs/Autocomplete/index.js +9 -0
  16. package/lib/cjs/Badge/Badge.js +109 -0
  17. package/lib/cjs/Badge/index.js +9 -0
  18. package/lib/cjs/BaseProvider/HydrationContext.js +56 -0
  19. package/lib/cjs/BaseProvider/index.js +46 -0
  20. package/lib/cjs/Box/Box.js +385 -0
  21. package/lib/cjs/Box/backgroundImageStylesMap.js +100 -0
  22. package/lib/cjs/Box/index.js +9 -0
  23. package/lib/cjs/Button/Button.js +43 -0
  24. package/lib/cjs/Button/ButtonBase.js +353 -0
  25. package/lib/cjs/Button/ButtonDropdown.js +182 -0
  26. package/lib/cjs/Button/ButtonGroup.js +279 -0
  27. package/lib/cjs/Button/ButtonLink.js +57 -0
  28. package/lib/cjs/Button/index.js +34 -0
  29. package/lib/cjs/Button/propTypes.js +53 -0
  30. package/lib/cjs/Card/Card.js +334 -0
  31. package/lib/cjs/Card/CardBase.js +127 -0
  32. package/lib/cjs/Card/PressableCardBase.js +121 -0
  33. package/lib/cjs/Card/index.js +32 -0
  34. package/lib/cjs/CardGroup/CardGroup.js +219 -0
  35. package/lib/cjs/CardGroup/dictionary.js +14 -0
  36. package/lib/cjs/CardGroup/index.js +9 -0
  37. package/lib/cjs/Carousel/Carousel.js +1046 -0
  38. package/lib/cjs/Carousel/CarouselContext.js +59 -0
  39. package/lib/cjs/Carousel/CarouselFirstFocus/CarouselFirstFocus.js +57 -0
  40. package/lib/cjs/Carousel/CarouselItem/CarouselItem.js +185 -0
  41. package/lib/cjs/Carousel/CarouselItem/index.js +9 -0
  42. package/lib/cjs/Carousel/CarouselStepTracker/CarouselStepTracker.js +101 -0
  43. package/lib/cjs/Carousel/CarouselStepTracker/index.js +9 -0
  44. package/lib/cjs/Carousel/CarouselTabs/CarouselTabs.js +54 -0
  45. package/lib/cjs/Carousel/CarouselTabs/CarouselTabsPanel.js +95 -0
  46. package/lib/cjs/Carousel/CarouselTabs/CarouselTabsPanelItem.js +125 -0
  47. package/lib/cjs/Carousel/CarouselTabs/index.js +9 -0
  48. package/lib/cjs/Carousel/CarouselThumbnail.js +120 -0
  49. package/lib/cjs/Carousel/CarouselThumbnailNavigation.js +78 -0
  50. package/lib/cjs/Carousel/Constants.js +13 -0
  51. package/lib/cjs/Carousel/dictionary.js +28 -0
  52. package/lib/cjs/Carousel/index.js +36 -0
  53. package/lib/cjs/Checkbox/Checkbox.js +349 -0
  54. package/lib/cjs/Checkbox/CheckboxButton.js +171 -0
  55. package/lib/cjs/Checkbox/CheckboxGroup.js +249 -0
  56. package/lib/cjs/Checkbox/CheckboxInput.js +55 -0
  57. package/lib/cjs/Checkbox/CheckboxInput.native.js +11 -0
  58. package/lib/cjs/Checkbox/index.js +16 -0
  59. package/lib/cjs/CheckboxCard/CheckboxCard.js +191 -0
  60. package/lib/cjs/CheckboxCard/index.js +9 -0
  61. package/lib/cjs/CheckboxCardGroup/CheckboxCardGroup.js +215 -0
  62. package/lib/cjs/CheckboxCardGroup/index.js +9 -0
  63. package/lib/cjs/ColourToggle/ColourBubble.js +133 -0
  64. package/lib/cjs/ColourToggle/ColourToggle.js +98 -0
  65. package/lib/cjs/ColourToggle/index.js +9 -0
  66. package/lib/cjs/Divider/Divider.js +138 -0
  67. package/lib/cjs/Divider/index.js +9 -0
  68. package/lib/cjs/DownloadApp/DownloadApp.js +167 -0
  69. package/lib/cjs/DownloadApp/dictionary.js +16 -0
  70. package/lib/cjs/DownloadApp/index.js +9 -0
  71. package/lib/cjs/ExpandCollapse/Accordion.js +20 -0
  72. package/lib/cjs/ExpandCollapse/Control.js +170 -0
  73. package/lib/cjs/ExpandCollapse/ExpandCollapse.js +105 -0
  74. package/lib/cjs/ExpandCollapse/Panel.js +248 -0
  75. package/lib/cjs/ExpandCollapse/dictionary.js +16 -0
  76. package/lib/cjs/ExpandCollapse/index.js +19 -0
  77. package/lib/cjs/ExpandCollapseMini/ExpandCollapseMini.js +84 -0
  78. package/lib/cjs/ExpandCollapseMini/ExpandCollapseMiniControl.js +133 -0
  79. package/lib/cjs/ExpandCollapseMini/index.js +9 -0
  80. package/lib/cjs/Feedback/Feedback.js +167 -0
  81. package/lib/cjs/Feedback/index.js +9 -0
  82. package/lib/cjs/Fieldset/Fieldset.js +198 -0
  83. package/lib/cjs/Fieldset/FieldsetContainer.js +55 -0
  84. package/lib/cjs/Fieldset/FieldsetContainer.native.js +39 -0
  85. package/lib/cjs/Fieldset/Legend.js +29 -0
  86. package/lib/cjs/Fieldset/Legend.native.js +36 -0
  87. package/lib/cjs/Fieldset/cssReset.js +20 -0
  88. package/lib/cjs/Fieldset/index.js +9 -0
  89. package/lib/cjs/FileUpload/FileUpload.js +370 -0
  90. package/lib/cjs/FileUpload/NotificationContent.js +59 -0
  91. package/lib/cjs/FileUpload/dictionary.js +50 -0
  92. package/lib/cjs/FileUpload/index.js +9 -0
  93. package/lib/cjs/FlexGrid/Col/Col.js +264 -0
  94. package/lib/cjs/FlexGrid/Col/index.js +9 -0
  95. package/lib/cjs/FlexGrid/FlexGrid.js +165 -0
  96. package/lib/cjs/FlexGrid/Row/Row.js +188 -0
  97. package/lib/cjs/FlexGrid/Row/index.js +9 -0
  98. package/lib/cjs/FlexGrid/helpers/index.js +21 -0
  99. package/lib/cjs/FlexGrid/index.js +9 -0
  100. package/lib/cjs/FlexGrid/providers/GutterContext.js +10 -0
  101. package/lib/cjs/Footnote/Footnote.js +323 -0
  102. package/lib/cjs/Footnote/FootnoteLink.js +114 -0
  103. package/lib/cjs/Footnote/dictionary.js +18 -0
  104. package/lib/cjs/Footnote/index.js +11 -0
  105. package/lib/cjs/HorizontalScroll/HorizontalScroll.js +175 -0
  106. package/lib/cjs/HorizontalScroll/HorizontalScrollButton.js +86 -0
  107. package/lib/cjs/HorizontalScroll/ScrollViewEnd.js +53 -0
  108. package/lib/cjs/HorizontalScroll/ScrollViewEnd.native.js +32 -0
  109. package/lib/cjs/HorizontalScroll/dictionary.js +17 -0
  110. package/lib/cjs/HorizontalScroll/index.js +26 -0
  111. package/lib/cjs/HorizontalScroll/itemPositions.js +122 -0
  112. package/lib/cjs/Icon/Icon.js +101 -0
  113. package/lib/cjs/Icon/IconText.js +117 -0
  114. package/lib/cjs/Icon/index.js +24 -0
  115. package/lib/cjs/IconButton/IconButton.js +208 -0
  116. package/lib/cjs/IconButton/index.js +9 -0
  117. package/lib/cjs/InputLabel/InputLabel.js +184 -0
  118. package/lib/cjs/InputLabel/LabelContent.js +35 -0
  119. package/lib/cjs/InputLabel/LabelContent.native.js +26 -0
  120. package/lib/cjs/InputLabel/index.js +9 -0
  121. package/lib/cjs/InputSupports/InputSupports.js +140 -0
  122. package/lib/cjs/InputSupports/dictionary.js +18 -0
  123. package/lib/cjs/InputSupports/index.js +9 -0
  124. package/lib/cjs/InputSupports/useInputSupports.js +47 -0
  125. package/lib/cjs/Link/ChevronLink.js +73 -0
  126. package/lib/cjs/Link/InlinePressable.js +53 -0
  127. package/lib/cjs/Link/InlinePressable.native.js +93 -0
  128. package/lib/cjs/Link/Link.js +35 -0
  129. package/lib/cjs/Link/LinkBase.js +283 -0
  130. package/lib/cjs/Link/TextButton.js +48 -0
  131. package/lib/cjs/Link/index.js +34 -0
  132. package/lib/cjs/List/List.js +83 -0
  133. package/lib/cjs/List/ListItem.js +37 -0
  134. package/lib/cjs/List/ListItemBase.js +171 -0
  135. package/lib/cjs/List/ListItemContent.js +80 -0
  136. package/lib/cjs/List/ListItemMark.js +132 -0
  137. package/lib/cjs/List/PressableListItemBase.js +117 -0
  138. package/lib/cjs/List/index.js +23 -0
  139. package/lib/cjs/Listbox/GroupControl.js +112 -0
  140. package/lib/cjs/Listbox/Listbox.js +177 -0
  141. package/lib/cjs/Listbox/ListboxContext.js +11 -0
  142. package/lib/cjs/Listbox/ListboxGroup.js +133 -0
  143. package/lib/cjs/Listbox/ListboxItem.js +83 -0
  144. package/lib/cjs/Listbox/ListboxOverlay.js +87 -0
  145. package/lib/cjs/Listbox/PressableItem.js +146 -0
  146. package/lib/cjs/Listbox/index.js +9 -0
  147. package/lib/cjs/Modal/Modal.js +377 -0
  148. package/lib/cjs/Modal/ModalContent.js +205 -0
  149. package/lib/cjs/Modal/WebModal.js +83 -0
  150. package/lib/cjs/Modal/dictionary.js +15 -0
  151. package/lib/cjs/Modal/index.js +9 -0
  152. package/lib/cjs/MultiSelectFilter/ModalOverlay.js +162 -0
  153. package/lib/cjs/MultiSelectFilter/MultiSelectFilter.js +544 -0
  154. package/lib/cjs/MultiSelectFilter/dictionary.js +18 -0
  155. package/lib/cjs/MultiSelectFilter/index.js +9 -0
  156. package/lib/cjs/Notification/Notification.js +437 -0
  157. package/lib/cjs/Notification/dictionary.js +14 -0
  158. package/lib/cjs/Notification/index.js +9 -0
  159. package/lib/cjs/OrderedList/Item.js +166 -0
  160. package/lib/cjs/OrderedList/ItemBase.js +51 -0
  161. package/lib/cjs/OrderedList/OrderedList.js +70 -0
  162. package/lib/cjs/OrderedList/OrderedListBase.js +44 -0
  163. package/lib/cjs/OrderedList/index.js +9 -0
  164. package/lib/cjs/Pagination/PageButton.js +82 -0
  165. package/lib/cjs/Pagination/Pagination.js +226 -0
  166. package/lib/cjs/Pagination/SideButton.js +119 -0
  167. package/lib/cjs/Pagination/constants.js +9 -0
  168. package/lib/cjs/Pagination/dictionary.js +24 -0
  169. package/lib/cjs/Pagination/index.js +9 -0
  170. package/lib/cjs/Pagination/usePagination.js +83 -0
  171. package/lib/cjs/Portal/Portal.js +56 -0
  172. package/lib/cjs/Portal/Portal.native.js +8 -0
  173. package/lib/cjs/Portal/index.js +9 -0
  174. package/lib/cjs/PriceLockup/PriceLockup.js +230 -0
  175. package/lib/cjs/PriceLockup/index.js +9 -0
  176. package/lib/cjs/PriceLockup/utils/renderFootnoteContent.js +92 -0
  177. package/lib/cjs/PriceLockup/utils/renderFootnoteLinks.js +35 -0
  178. package/lib/cjs/PriceLockup/utils/renderPrice.js +146 -0
  179. package/lib/cjs/PriceLockup/utils/renderTypography.js +30 -0
  180. package/lib/cjs/ProductCard/ProductCard.js +237 -0
  181. package/lib/cjs/ProductCard/dictionary.js +44 -0
  182. package/lib/cjs/ProductCard/index.js +9 -0
  183. package/lib/cjs/ProductCardGroup/ProductCardGroup.js +77 -0
  184. package/lib/cjs/ProductCardGroup/index.js +9 -0
  185. package/lib/cjs/Progress/Progress.js +101 -0
  186. package/lib/cjs/Progress/ProgressBar.js +168 -0
  187. package/lib/cjs/Progress/ProgressBarBackground.js +49 -0
  188. package/lib/cjs/Progress/constants.js +10 -0
  189. package/lib/cjs/Progress/index.js +11 -0
  190. package/lib/cjs/QuickLinks/QuickLinks.js +83 -0
  191. package/lib/cjs/QuickLinks/QuickLinksCard.js +38 -0
  192. package/lib/cjs/QuickLinks/QuickLinksItem.js +56 -0
  193. package/lib/cjs/QuickLinks/index.js +11 -0
  194. package/lib/cjs/QuickLinksFeature/QuickLinksFeature.js +74 -0
  195. package/lib/cjs/QuickLinksFeature/QuickLinksFeatureItem.js +152 -0
  196. package/lib/cjs/QuickLinksFeature/index.js +11 -0
  197. package/lib/cjs/Radio/Radio.js +291 -0
  198. package/lib/cjs/Radio/RadioButton.js +191 -0
  199. package/lib/cjs/Radio/RadioGroup.js +262 -0
  200. package/lib/cjs/Radio/RadioInput.js +55 -0
  201. package/lib/cjs/Radio/RadioInput.native.js +11 -0
  202. package/lib/cjs/Radio/index.js +16 -0
  203. package/lib/cjs/RadioCard/RadioCard.js +219 -0
  204. package/lib/cjs/RadioCard/RadioCardGroup.js +266 -0
  205. package/lib/cjs/RadioCard/index.js +16 -0
  206. package/lib/cjs/Responsive/Responsive.js +70 -0
  207. package/lib/cjs/Responsive/ResponsiveProp.js +45 -0
  208. package/lib/cjs/Responsive/ResponsiveWithMediaQueryStyleSheet.js +75 -0
  209. package/lib/cjs/Responsive/index.js +9 -0
  210. package/lib/cjs/Search/Search.js +281 -0
  211. package/lib/cjs/Search/dictionary.js +18 -0
  212. package/lib/cjs/Search/index.js +9 -0
  213. package/lib/cjs/Select/Group.js +31 -0
  214. package/lib/cjs/Select/Group.native.js +23 -0
  215. package/lib/cjs/Select/Item.js +30 -0
  216. package/lib/cjs/Select/Item.native.js +8 -0
  217. package/lib/cjs/Select/Picker.js +103 -0
  218. package/lib/cjs/Select/Picker.native.js +130 -0
  219. package/lib/cjs/Select/Select.js +339 -0
  220. package/lib/cjs/Select/constants.js +13 -0
  221. package/lib/cjs/Select/index.js +13 -0
  222. package/lib/cjs/SideNav/Item.js +150 -0
  223. package/lib/cjs/SideNav/ItemContent.js +56 -0
  224. package/lib/cjs/SideNav/ItemsGroup.js +125 -0
  225. package/lib/cjs/SideNav/SideNav.js +139 -0
  226. package/lib/cjs/SideNav/index.js +13 -0
  227. package/lib/cjs/Skeleton/Skeleton.js +184 -0
  228. package/lib/cjs/Skeleton/index.js +9 -0
  229. package/lib/cjs/Skeleton/skeleton.constant.js +8 -0
  230. package/lib/cjs/Skeleton/skeletonWebAnimation.js +20 -0
  231. package/lib/cjs/Skeleton/useSkeletonNativeAnimation.js +35 -0
  232. package/lib/cjs/SkipLink/SkipLink.js +196 -0
  233. package/lib/cjs/SkipLink/index.js +9 -0
  234. package/lib/cjs/Spacer/Spacer.js +100 -0
  235. package/lib/cjs/Spacer/index.js +9 -0
  236. package/lib/cjs/StackView/StackView.js +133 -0
  237. package/lib/cjs/StackView/StackWrap.js +54 -0
  238. package/lib/cjs/StackView/StackWrap.native.js +10 -0
  239. package/lib/cjs/StackView/StackWrapBox.js +121 -0
  240. package/lib/cjs/StackView/StackWrapGap.js +68 -0
  241. package/lib/cjs/StackView/common.js +43 -0
  242. package/lib/cjs/StackView/getStackedContent.js +128 -0
  243. package/lib/cjs/StackView/index.js +23 -0
  244. package/lib/cjs/Status/Status.js +176 -0
  245. package/lib/cjs/Status/index.js +9 -0
  246. package/lib/cjs/StepTracker/Step.js +271 -0
  247. package/lib/cjs/StepTracker/StepTracker.js +220 -0
  248. package/lib/cjs/StepTracker/dictionary.js +36 -0
  249. package/lib/cjs/StepTracker/index.js +9 -0
  250. package/lib/cjs/TabBar/TabBar.js +132 -0
  251. package/lib/cjs/TabBar/TabBarItem.js +182 -0
  252. package/lib/cjs/TabBar/index.js +9 -0
  253. package/lib/cjs/Tabs/Tabs.js +188 -0
  254. package/lib/cjs/Tabs/TabsItem.js +245 -0
  255. package/lib/cjs/Tabs/index.js +9 -0
  256. package/lib/cjs/Tags/Tags.js +252 -0
  257. package/lib/cjs/Tags/index.js +9 -0
  258. package/lib/cjs/TextInput/TextArea.js +105 -0
  259. package/lib/cjs/TextInput/TextInput.js +86 -0
  260. package/lib/cjs/TextInput/TextInputBase.js +502 -0
  261. package/lib/cjs/TextInput/dictionary.js +18 -0
  262. package/lib/cjs/TextInput/index.js +20 -0
  263. package/lib/cjs/TextInput/propTypes.js +40 -0
  264. package/lib/cjs/ThemeProvider/ThemeProvider.js +91 -0
  265. package/lib/cjs/ThemeProvider/index.js +59 -0
  266. package/lib/cjs/ThemeProvider/useResponsiveThemeTokens.js +88 -0
  267. package/lib/cjs/ThemeProvider/useSetTheme.js +30 -0
  268. package/lib/cjs/ThemeProvider/useTheme.js +17 -0
  269. package/lib/cjs/ThemeProvider/useThemeTokens.js +118 -0
  270. package/lib/cjs/ThemeProvider/utils/index.js +27 -0
  271. package/lib/cjs/ThemeProvider/utils/styles.js +208 -0
  272. package/lib/cjs/ThemeProvider/utils/theme-tokens.js +173 -0
  273. package/lib/cjs/Timeline/Timeline.js +175 -0
  274. package/lib/cjs/Timeline/index.js +9 -0
  275. package/lib/cjs/ToggleSwitch/ToggleSwitch.js +286 -0
  276. package/lib/cjs/ToggleSwitch/ToggleSwitchGroup.js +215 -0
  277. package/lib/cjs/ToggleSwitch/index.js +20 -0
  278. package/lib/cjs/Tooltip/Backdrop.js +57 -0
  279. package/lib/cjs/Tooltip/Backdrop.native.js +46 -0
  280. package/lib/cjs/Tooltip/Tooltip.js +295 -0
  281. package/lib/cjs/Tooltip/Tooltip.native.js +370 -0
  282. package/lib/cjs/Tooltip/dictionary.js +14 -0
  283. package/lib/cjs/Tooltip/getTooltipPosition.js +175 -0
  284. package/lib/cjs/Tooltip/index.js +12 -0
  285. package/lib/cjs/Tooltip/shared.js +48 -0
  286. package/lib/cjs/TooltipButton/TooltipButton.js +97 -0
  287. package/lib/cjs/TooltipButton/index.js +9 -0
  288. package/lib/cjs/Typography/Typography.js +271 -0
  289. package/lib/cjs/Typography/index.js +9 -0
  290. package/lib/cjs/Validator/Validator.js +228 -0
  291. package/lib/cjs/Validator/index.js +9 -0
  292. package/lib/cjs/ViewportProvider/ViewportProvider.js +32 -0
  293. package/lib/cjs/ViewportProvider/index.js +22 -0
  294. package/lib/cjs/ViewportProvider/useViewport.js +10 -0
  295. package/lib/cjs/ViewportProvider/useViewportListener.js +43 -0
  296. package/lib/cjs/index.js +781 -0
  297. package/lib/cjs/server.js +40 -0
  298. package/lib/cjs/utils/BaseView/BaseView.js +47 -0
  299. package/lib/cjs/utils/BaseView/BaseView.native.js +12 -0
  300. package/lib/cjs/utils/BaseView/index.js +9 -0
  301. package/lib/cjs/utils/a11y/index.js +27 -0
  302. package/lib/cjs/utils/a11y/semantics.js +145 -0
  303. package/lib/cjs/utils/a11y/textSize.js +44 -0
  304. package/lib/cjs/utils/animation/index.js +13 -0
  305. package/lib/cjs/utils/animation/useVerticalExpandAnimation.js +92 -0
  306. package/lib/cjs/utils/children.js +121 -0
  307. package/lib/cjs/utils/containUniqueFields.js +30 -0
  308. package/lib/cjs/utils/convertFromMegaByteToByte.js +16 -0
  309. package/lib/cjs/utils/floating-ui/index.js +42 -0
  310. package/lib/cjs/utils/floating-ui/index.native.js +42 -0
  311. package/lib/cjs/utils/formatImageSource.js +33 -0
  312. package/lib/cjs/utils/hasOwnProperty.js +17 -0
  313. package/lib/cjs/utils/htmlAttrs.js +30 -0
  314. package/lib/cjs/utils/index.js +245 -0
  315. package/lib/cjs/utils/info/index.js +14 -0
  316. package/lib/cjs/utils/info/platform/index.js +18 -0
  317. package/lib/cjs/utils/info/platform/platform.android.js +7 -0
  318. package/lib/cjs/utils/info/platform/platform.ios.js +7 -0
  319. package/lib/cjs/utils/info/platform/platform.js +7 -0
  320. package/lib/cjs/utils/info/platform/platform.native.js +10 -0
  321. package/lib/cjs/utils/info/versions.js +12 -0
  322. package/lib/cjs/utils/input.js +193 -0
  323. package/lib/cjs/utils/pressability.js +122 -0
  324. package/lib/cjs/utils/props/a11yProps.js +315 -0
  325. package/lib/cjs/utils/props/clickProps.js +32 -0
  326. package/lib/cjs/utils/props/componentPropType.js +55 -0
  327. package/lib/cjs/utils/props/contentfulProps.js +29 -0
  328. package/lib/cjs/utils/props/copyPropTypes.js +9 -0
  329. package/lib/cjs/utils/props/getPropSelector.js +58 -0
  330. package/lib/cjs/utils/props/handlerProps.js +111 -0
  331. package/lib/cjs/utils/props/hrefAttrsProp.js +39 -0
  332. package/lib/cjs/utils/props/index.js +176 -0
  333. package/lib/cjs/utils/props/inputSupportsProps.js +87 -0
  334. package/lib/cjs/utils/props/linkProps.js +50 -0
  335. package/lib/cjs/utils/props/paddingProp.js +16 -0
  336. package/lib/cjs/utils/props/pressProps.js +49 -0
  337. package/lib/cjs/utils/props/rectProp.js +16 -0
  338. package/lib/cjs/utils/props/responsiveProps.js +35 -0
  339. package/lib/cjs/utils/props/selectSystemProps.js +29 -0
  340. package/lib/cjs/utils/props/spacingProps.js +63 -0
  341. package/lib/cjs/utils/props/textInputProps.js +194 -0
  342. package/lib/cjs/utils/props/textProps.js +67 -0
  343. package/lib/cjs/utils/props/tokens.js +140 -0
  344. package/lib/cjs/utils/props/variantProp.js +24 -0
  345. package/lib/cjs/utils/props/viewProps.js +28 -0
  346. package/lib/cjs/utils/ssr-media-query/create-stylesheet/create-stylesheet-mobile.js +55 -0
  347. package/lib/cjs/utils/ssr-media-query/create-stylesheet/index.android.js +9 -0
  348. package/lib/cjs/utils/ssr-media-query/create-stylesheet/index.ios.js +9 -0
  349. package/lib/cjs/utils/ssr-media-query/create-stylesheet/index.js +42 -0
  350. package/lib/cjs/utils/ssr-media-query/hash.js +19 -0
  351. package/lib/cjs/utils/ssr-media-query/index.js +18 -0
  352. package/lib/cjs/utils/ssr-media-query/utils/common.js +44 -0
  353. package/lib/cjs/utils/ssr-media-query/utils/create-declaration-block.js +23 -0
  354. package/lib/cjs/utils/ssr-media-query/utils/create-media-query-styles.js +66 -0
  355. package/lib/cjs/utils/ssr-media-query/utils/hyphenate-style-name.js +18 -0
  356. package/lib/cjs/utils/ssr-media-query/utils/inject.js +47 -0
  357. package/lib/cjs/utils/ssr.js +150 -0
  358. package/lib/cjs/utils/transformGradient.js +22 -0
  359. package/lib/cjs/utils/useCopy.js +48 -0
  360. package/lib/cjs/utils/useHash.js +44 -0
  361. package/lib/cjs/utils/useHash.native.js +12 -0
  362. package/lib/cjs/utils/useOverlaidPosition.js +242 -0
  363. package/lib/cjs/utils/useResponsiveProp.js +53 -0
  364. package/lib/cjs/utils/useSafeLayoutEffect.js +34 -0
  365. package/lib/cjs/utils/useScrollBlocking.js +55 -0
  366. package/lib/cjs/utils/useScrollBlocking.native.js +9 -0
  367. package/lib/cjs/utils/useSpacingScale.js +129 -0
  368. package/lib/cjs/utils/useUniqueId.js +17 -0
  369. package/lib/cjs/utils/withLinkRouter.js +89 -0
  370. package/lib/{Carousel → esm/Carousel}/Carousel.js +166 -107
  371. package/lib/{Carousel → esm/Carousel}/CarouselItem/CarouselItem.js +23 -6
  372. package/lib/esm/Carousel/Constants.js +7 -0
  373. package/lib/{TextInput → esm/TextInput}/TextInputBase.js +30 -1
  374. package/lib/package.json +88 -0
  375. package/package.json +13 -11
  376. package/src/Carousel/Carousel.jsx +228 -155
  377. package/src/Carousel/CarouselItem/CarouselItem.jsx +14 -4
  378. package/src/Carousel/Constants.js +4 -0
  379. package/src/TextInput/TextInputBase.jsx +30 -1
  380. package/lib/Carousel/Constants.js +0 -3
  381. /package/lib/{A11yInfoProvider → esm/A11yInfoProvider}/index.js +0 -0
  382. /package/lib/{A11yText → esm/A11yText}/index.js +0 -0
  383. /package/lib/{ActionCard → esm/ActionCard}/ActionCard.js +0 -0
  384. /package/lib/{ActionCard → esm/ActionCard}/index.js +0 -0
  385. /package/lib/{ActivityIndicator → esm/ActivityIndicator}/Spinner.js +0 -0
  386. /package/lib/{ActivityIndicator → esm/ActivityIndicator}/Spinner.native.js +0 -0
  387. /package/lib/{ActivityIndicator → esm/ActivityIndicator}/index.js +0 -0
  388. /package/lib/{ActivityIndicator → esm/ActivityIndicator}/shared.js +0 -0
  389. /package/lib/{Autocomplete → esm/Autocomplete}/Autocomplete.js +0 -0
  390. /package/lib/{Autocomplete → esm/Autocomplete}/Loading.js +0 -0
  391. /package/lib/{Autocomplete → esm/Autocomplete}/Suggestions.js +0 -0
  392. /package/lib/{Autocomplete → esm/Autocomplete}/constants.js +0 -0
  393. /package/lib/{Autocomplete → esm/Autocomplete}/dictionary.js +0 -0
  394. /package/lib/{Autocomplete → esm/Autocomplete}/index.js +0 -0
  395. /package/lib/{Badge → esm/Badge}/Badge.js +0 -0
  396. /package/lib/{Badge → esm/Badge}/index.js +0 -0
  397. /package/lib/{BaseProvider → esm/BaseProvider}/HydrationContext.js +0 -0
  398. /package/lib/{BaseProvider → esm/BaseProvider}/index.js +0 -0
  399. /package/lib/{Box → esm/Box}/Box.js +0 -0
  400. /package/lib/{Box → esm/Box}/backgroundImageStylesMap.js +0 -0
  401. /package/lib/{Box → esm/Box}/index.js +0 -0
  402. /package/lib/{Button → esm/Button}/Button.js +0 -0
  403. /package/lib/{Button → esm/Button}/ButtonBase.js +0 -0
  404. /package/lib/{Button → esm/Button}/ButtonDropdown.js +0 -0
  405. /package/lib/{Button → esm/Button}/ButtonGroup.js +0 -0
  406. /package/lib/{Button → esm/Button}/ButtonLink.js +0 -0
  407. /package/lib/{Button → esm/Button}/index.js +0 -0
  408. /package/lib/{Button → esm/Button}/propTypes.js +0 -0
  409. /package/lib/{Card → esm/Card}/Card.js +0 -0
  410. /package/lib/{Card → esm/Card}/CardBase.js +0 -0
  411. /package/lib/{Card → esm/Card}/PressableCardBase.js +0 -0
  412. /package/lib/{Card → esm/Card}/index.js +0 -0
  413. /package/lib/{CardGroup → esm/CardGroup}/CardGroup.js +0 -0
  414. /package/lib/{CardGroup → esm/CardGroup}/dictionary.js +0 -0
  415. /package/lib/{CardGroup → esm/CardGroup}/index.js +0 -0
  416. /package/lib/{Carousel → esm/Carousel}/CarouselContext.js +0 -0
  417. /package/lib/{Carousel → esm/Carousel}/CarouselFirstFocus/CarouselFirstFocus.js +0 -0
  418. /package/lib/{Carousel → esm/Carousel}/CarouselItem/index.js +0 -0
  419. /package/lib/{Carousel → esm/Carousel}/CarouselStepTracker/CarouselStepTracker.js +0 -0
  420. /package/lib/{Carousel → esm/Carousel}/CarouselStepTracker/index.js +0 -0
  421. /package/lib/{Carousel → esm/Carousel}/CarouselTabs/CarouselTabs.js +0 -0
  422. /package/lib/{Carousel → esm/Carousel}/CarouselTabs/CarouselTabsPanel.js +0 -0
  423. /package/lib/{Carousel → esm/Carousel}/CarouselTabs/CarouselTabsPanelItem.js +0 -0
  424. /package/lib/{Carousel → esm/Carousel}/CarouselTabs/index.js +0 -0
  425. /package/lib/{Carousel → esm/Carousel}/CarouselThumbnail.js +0 -0
  426. /package/lib/{Carousel → esm/Carousel}/CarouselThumbnailNavigation.js +0 -0
  427. /package/lib/{Carousel → esm/Carousel}/dictionary.js +0 -0
  428. /package/lib/{Carousel → esm/Carousel}/index.js +0 -0
  429. /package/lib/{Checkbox → esm/Checkbox}/Checkbox.js +0 -0
  430. /package/lib/{Checkbox → esm/Checkbox}/CheckboxButton.js +0 -0
  431. /package/lib/{Checkbox → esm/Checkbox}/CheckboxGroup.js +0 -0
  432. /package/lib/{Checkbox → esm/Checkbox}/CheckboxInput.js +0 -0
  433. /package/lib/{Checkbox → esm/Checkbox}/CheckboxInput.native.js +0 -0
  434. /package/lib/{Checkbox → esm/Checkbox}/index.js +0 -0
  435. /package/lib/{CheckboxCard → esm/CheckboxCard}/CheckboxCard.js +0 -0
  436. /package/lib/{CheckboxCard → esm/CheckboxCard}/index.js +0 -0
  437. /package/lib/{CheckboxCardGroup → esm/CheckboxCardGroup}/CheckboxCardGroup.js +0 -0
  438. /package/lib/{CheckboxCardGroup → esm/CheckboxCardGroup}/index.js +0 -0
  439. /package/lib/{ColourToggle → esm/ColourToggle}/ColourBubble.js +0 -0
  440. /package/lib/{ColourToggle → esm/ColourToggle}/ColourToggle.js +0 -0
  441. /package/lib/{ColourToggle → esm/ColourToggle}/index.js +0 -0
  442. /package/lib/{Divider → esm/Divider}/Divider.js +0 -0
  443. /package/lib/{Divider → esm/Divider}/index.js +0 -0
  444. /package/lib/{DownloadApp → esm/DownloadApp}/DownloadApp.js +0 -0
  445. /package/lib/{DownloadApp → esm/DownloadApp}/dictionary.js +0 -0
  446. /package/lib/{DownloadApp → esm/DownloadApp}/index.js +0 -0
  447. /package/lib/{ExpandCollapse → esm/ExpandCollapse}/Accordion.js +0 -0
  448. /package/lib/{ExpandCollapse → esm/ExpandCollapse}/Control.js +0 -0
  449. /package/lib/{ExpandCollapse → esm/ExpandCollapse}/ExpandCollapse.js +0 -0
  450. /package/lib/{ExpandCollapse → esm/ExpandCollapse}/Panel.js +0 -0
  451. /package/lib/{ExpandCollapse → esm/ExpandCollapse}/dictionary.js +0 -0
  452. /package/lib/{ExpandCollapse → esm/ExpandCollapse}/index.js +0 -0
  453. /package/lib/{ExpandCollapseMini → esm/ExpandCollapseMini}/ExpandCollapseMini.js +0 -0
  454. /package/lib/{ExpandCollapseMini → esm/ExpandCollapseMini}/ExpandCollapseMiniControl.js +0 -0
  455. /package/lib/{ExpandCollapseMini → esm/ExpandCollapseMini}/index.js +0 -0
  456. /package/lib/{Feedback → esm/Feedback}/Feedback.js +0 -0
  457. /package/lib/{Feedback → esm/Feedback}/index.js +0 -0
  458. /package/lib/{Fieldset → esm/Fieldset}/Fieldset.js +0 -0
  459. /package/lib/{Fieldset → esm/Fieldset}/FieldsetContainer.js +0 -0
  460. /package/lib/{Fieldset → esm/Fieldset}/FieldsetContainer.native.js +0 -0
  461. /package/lib/{Fieldset → esm/Fieldset}/Legend.js +0 -0
  462. /package/lib/{Fieldset → esm/Fieldset}/Legend.native.js +0 -0
  463. /package/lib/{Fieldset → esm/Fieldset}/cssReset.js +0 -0
  464. /package/lib/{Fieldset → esm/Fieldset}/index.js +0 -0
  465. /package/lib/{FileUpload → esm/FileUpload}/FileUpload.js +0 -0
  466. /package/lib/{FileUpload → esm/FileUpload}/NotificationContent.js +0 -0
  467. /package/lib/{FileUpload → esm/FileUpload}/dictionary.js +0 -0
  468. /package/lib/{FileUpload → esm/FileUpload}/index.js +0 -0
  469. /package/lib/{FlexGrid → esm/FlexGrid}/Col/Col.js +0 -0
  470. /package/lib/{FlexGrid → esm/FlexGrid}/Col/index.js +0 -0
  471. /package/lib/{FlexGrid → esm/FlexGrid}/FlexGrid.js +0 -0
  472. /package/lib/{FlexGrid → esm/FlexGrid}/Row/Row.js +0 -0
  473. /package/lib/{FlexGrid → esm/FlexGrid}/Row/index.js +0 -0
  474. /package/lib/{FlexGrid → esm/FlexGrid}/helpers/index.js +0 -0
  475. /package/lib/{FlexGrid → esm/FlexGrid}/index.js +0 -0
  476. /package/lib/{FlexGrid → esm/FlexGrid}/providers/GutterContext.js +0 -0
  477. /package/lib/{Footnote → esm/Footnote}/Footnote.js +0 -0
  478. /package/lib/{Footnote → esm/Footnote}/FootnoteLink.js +0 -0
  479. /package/lib/{Footnote → esm/Footnote}/dictionary.js +0 -0
  480. /package/lib/{Footnote → esm/Footnote}/index.js +0 -0
  481. /package/lib/{HorizontalScroll → esm/HorizontalScroll}/HorizontalScroll.js +0 -0
  482. /package/lib/{HorizontalScroll → esm/HorizontalScroll}/HorizontalScrollButton.js +0 -0
  483. /package/lib/{HorizontalScroll → esm/HorizontalScroll}/ScrollViewEnd.js +0 -0
  484. /package/lib/{HorizontalScroll → esm/HorizontalScroll}/ScrollViewEnd.native.js +0 -0
  485. /package/lib/{HorizontalScroll → esm/HorizontalScroll}/dictionary.js +0 -0
  486. /package/lib/{HorizontalScroll → esm/HorizontalScroll}/index.js +0 -0
  487. /package/lib/{HorizontalScroll → esm/HorizontalScroll}/itemPositions.js +0 -0
  488. /package/lib/{Icon → esm/Icon}/Icon.js +0 -0
  489. /package/lib/{Icon → esm/Icon}/IconText.js +0 -0
  490. /package/lib/{Icon → esm/Icon}/index.js +0 -0
  491. /package/lib/{IconButton → esm/IconButton}/IconButton.js +0 -0
  492. /package/lib/{IconButton → esm/IconButton}/index.js +0 -0
  493. /package/lib/{InputLabel → esm/InputLabel}/InputLabel.js +0 -0
  494. /package/lib/{InputLabel → esm/InputLabel}/LabelContent.js +0 -0
  495. /package/lib/{InputLabel → esm/InputLabel}/LabelContent.native.js +0 -0
  496. /package/lib/{InputLabel → esm/InputLabel}/index.js +0 -0
  497. /package/lib/{InputSupports → esm/InputSupports}/InputSupports.js +0 -0
  498. /package/lib/{InputSupports → esm/InputSupports}/dictionary.js +0 -0
  499. /package/lib/{InputSupports → esm/InputSupports}/index.js +0 -0
  500. /package/lib/{InputSupports → esm/InputSupports}/useInputSupports.js +0 -0
  501. /package/lib/{Link → esm/Link}/ChevronLink.js +0 -0
  502. /package/lib/{Link → esm/Link}/InlinePressable.js +0 -0
  503. /package/lib/{Link → esm/Link}/InlinePressable.native.js +0 -0
  504. /package/lib/{Link → esm/Link}/Link.js +0 -0
  505. /package/lib/{Link → esm/Link}/LinkBase.js +0 -0
  506. /package/lib/{Link → esm/Link}/TextButton.js +0 -0
  507. /package/lib/{Link → esm/Link}/index.js +0 -0
  508. /package/lib/{List → esm/List}/List.js +0 -0
  509. /package/lib/{List → esm/List}/ListItem.js +0 -0
  510. /package/lib/{List → esm/List}/ListItemBase.js +0 -0
  511. /package/lib/{List → esm/List}/ListItemContent.js +0 -0
  512. /package/lib/{List → esm/List}/ListItemMark.js +0 -0
  513. /package/lib/{List → esm/List}/PressableListItemBase.js +0 -0
  514. /package/lib/{List → esm/List}/index.js +0 -0
  515. /package/lib/{Listbox → esm/Listbox}/GroupControl.js +0 -0
  516. /package/lib/{Listbox → esm/Listbox}/Listbox.js +0 -0
  517. /package/lib/{Listbox → esm/Listbox}/ListboxContext.js +0 -0
  518. /package/lib/{Listbox → esm/Listbox}/ListboxGroup.js +0 -0
  519. /package/lib/{Listbox → esm/Listbox}/ListboxItem.js +0 -0
  520. /package/lib/{Listbox → esm/Listbox}/ListboxOverlay.js +0 -0
  521. /package/lib/{Listbox → esm/Listbox}/PressableItem.js +0 -0
  522. /package/lib/{Listbox → esm/Listbox}/index.js +0 -0
  523. /package/lib/{Modal → esm/Modal}/Modal.js +0 -0
  524. /package/lib/{Modal → esm/Modal}/ModalContent.js +0 -0
  525. /package/lib/{Modal → esm/Modal}/WebModal.js +0 -0
  526. /package/lib/{Modal → esm/Modal}/dictionary.js +0 -0
  527. /package/lib/{Modal → esm/Modal}/index.js +0 -0
  528. /package/lib/{MultiSelectFilter → esm/MultiSelectFilter}/ModalOverlay.js +0 -0
  529. /package/lib/{MultiSelectFilter → esm/MultiSelectFilter}/MultiSelectFilter.js +0 -0
  530. /package/lib/{MultiSelectFilter → esm/MultiSelectFilter}/dictionary.js +0 -0
  531. /package/lib/{MultiSelectFilter → esm/MultiSelectFilter}/index.js +0 -0
  532. /package/lib/{Notification → esm/Notification}/Notification.js +0 -0
  533. /package/lib/{Notification → esm/Notification}/dictionary.js +0 -0
  534. /package/lib/{Notification → esm/Notification}/index.js +0 -0
  535. /package/lib/{OrderedList → esm/OrderedList}/Item.js +0 -0
  536. /package/lib/{OrderedList → esm/OrderedList}/ItemBase.js +0 -0
  537. /package/lib/{OrderedList → esm/OrderedList}/OrderedList.js +0 -0
  538. /package/lib/{OrderedList → esm/OrderedList}/OrderedListBase.js +0 -0
  539. /package/lib/{OrderedList → esm/OrderedList}/index.js +0 -0
  540. /package/lib/{Pagination → esm/Pagination}/PageButton.js +0 -0
  541. /package/lib/{Pagination → esm/Pagination}/Pagination.js +0 -0
  542. /package/lib/{Pagination → esm/Pagination}/SideButton.js +0 -0
  543. /package/lib/{Pagination → esm/Pagination}/constants.js +0 -0
  544. /package/lib/{Pagination → esm/Pagination}/dictionary.js +0 -0
  545. /package/lib/{Pagination → esm/Pagination}/index.js +0 -0
  546. /package/lib/{Pagination → esm/Pagination}/usePagination.js +0 -0
  547. /package/lib/{Portal → esm/Portal}/Portal.js +0 -0
  548. /package/lib/{Portal → esm/Portal}/Portal.native.js +0 -0
  549. /package/lib/{Portal → esm/Portal}/index.js +0 -0
  550. /package/lib/{PriceLockup → esm/PriceLockup}/PriceLockup.js +0 -0
  551. /package/lib/{PriceLockup → esm/PriceLockup}/index.js +0 -0
  552. /package/lib/{PriceLockup → esm/PriceLockup}/utils/renderFootnoteContent.js +0 -0
  553. /package/lib/{PriceLockup → esm/PriceLockup}/utils/renderFootnoteLinks.js +0 -0
  554. /package/lib/{PriceLockup → esm/PriceLockup}/utils/renderPrice.js +0 -0
  555. /package/lib/{PriceLockup → esm/PriceLockup}/utils/renderTypography.js +0 -0
  556. /package/lib/{ProductCard → esm/ProductCard}/ProductCard.js +0 -0
  557. /package/lib/{ProductCard → esm/ProductCard}/dictionary.js +0 -0
  558. /package/lib/{ProductCard → esm/ProductCard}/index.js +0 -0
  559. /package/lib/{ProductCardGroup → esm/ProductCardGroup}/ProductCardGroup.js +0 -0
  560. /package/lib/{ProductCardGroup → esm/ProductCardGroup}/index.js +0 -0
  561. /package/lib/{Progress → esm/Progress}/Progress.js +0 -0
  562. /package/lib/{Progress → esm/Progress}/ProgressBar.js +0 -0
  563. /package/lib/{Progress → esm/Progress}/ProgressBarBackground.js +0 -0
  564. /package/lib/{Progress → esm/Progress}/constants.js +0 -0
  565. /package/lib/{Progress → esm/Progress}/index.js +0 -0
  566. /package/lib/{QuickLinks → esm/QuickLinks}/QuickLinks.js +0 -0
  567. /package/lib/{QuickLinks → esm/QuickLinks}/QuickLinksCard.js +0 -0
  568. /package/lib/{QuickLinks → esm/QuickLinks}/QuickLinksItem.js +0 -0
  569. /package/lib/{QuickLinks → esm/QuickLinks}/index.js +0 -0
  570. /package/lib/{QuickLinksFeature → esm/QuickLinksFeature}/QuickLinksFeature.js +0 -0
  571. /package/lib/{QuickLinksFeature → esm/QuickLinksFeature}/QuickLinksFeatureItem.js +0 -0
  572. /package/lib/{QuickLinksFeature → esm/QuickLinksFeature}/index.js +0 -0
  573. /package/lib/{Radio → esm/Radio}/Radio.js +0 -0
  574. /package/lib/{Radio → esm/Radio}/RadioButton.js +0 -0
  575. /package/lib/{Radio → esm/Radio}/RadioGroup.js +0 -0
  576. /package/lib/{Radio → esm/Radio}/RadioInput.js +0 -0
  577. /package/lib/{Radio → esm/Radio}/RadioInput.native.js +0 -0
  578. /package/lib/{Radio → esm/Radio}/index.js +0 -0
  579. /package/lib/{RadioCard → esm/RadioCard}/RadioCard.js +0 -0
  580. /package/lib/{RadioCard → esm/RadioCard}/RadioCardGroup.js +0 -0
  581. /package/lib/{RadioCard → esm/RadioCard}/index.js +0 -0
  582. /package/lib/{Responsive → esm/Responsive}/Responsive.js +0 -0
  583. /package/lib/{Responsive → esm/Responsive}/ResponsiveProp.js +0 -0
  584. /package/lib/{Responsive → esm/Responsive}/ResponsiveWithMediaQueryStyleSheet.js +0 -0
  585. /package/lib/{Responsive → esm/Responsive}/index.js +0 -0
  586. /package/lib/{Search → esm/Search}/Search.js +0 -0
  587. /package/lib/{Search → esm/Search}/dictionary.js +0 -0
  588. /package/lib/{Search → esm/Search}/index.js +0 -0
  589. /package/lib/{Select → esm/Select}/Group.js +0 -0
  590. /package/lib/{Select → esm/Select}/Group.native.js +0 -0
  591. /package/lib/{Select → esm/Select}/Item.js +0 -0
  592. /package/lib/{Select → esm/Select}/Item.native.js +0 -0
  593. /package/lib/{Select → esm/Select}/Picker.js +0 -0
  594. /package/lib/{Select → esm/Select}/Picker.native.js +0 -0
  595. /package/lib/{Select → esm/Select}/Select.js +0 -0
  596. /package/lib/{Select → esm/Select}/constants.js +0 -0
  597. /package/lib/{Select → esm/Select}/index.js +0 -0
  598. /package/lib/{SideNav → esm/SideNav}/Item.js +0 -0
  599. /package/lib/{SideNav → esm/SideNav}/ItemContent.js +0 -0
  600. /package/lib/{SideNav → esm/SideNav}/ItemsGroup.js +0 -0
  601. /package/lib/{SideNav → esm/SideNav}/SideNav.js +0 -0
  602. /package/lib/{SideNav → esm/SideNav}/index.js +0 -0
  603. /package/lib/{Skeleton → esm/Skeleton}/Skeleton.js +0 -0
  604. /package/lib/{Skeleton → esm/Skeleton}/index.js +0 -0
  605. /package/lib/{Skeleton → esm/Skeleton}/skeleton.constant.js +0 -0
  606. /package/lib/{Skeleton → esm/Skeleton}/skeletonWebAnimation.js +0 -0
  607. /package/lib/{Skeleton → esm/Skeleton}/useSkeletonNativeAnimation.js +0 -0
  608. /package/lib/{SkipLink → esm/SkipLink}/SkipLink.js +0 -0
  609. /package/lib/{SkipLink → esm/SkipLink}/index.js +0 -0
  610. /package/lib/{Spacer → esm/Spacer}/Spacer.js +0 -0
  611. /package/lib/{Spacer → esm/Spacer}/index.js +0 -0
  612. /package/lib/{StackView → esm/StackView}/StackView.js +0 -0
  613. /package/lib/{StackView → esm/StackView}/StackWrap.js +0 -0
  614. /package/lib/{StackView → esm/StackView}/StackWrap.native.js +0 -0
  615. /package/lib/{StackView → esm/StackView}/StackWrapBox.js +0 -0
  616. /package/lib/{StackView → esm/StackView}/StackWrapGap.js +0 -0
  617. /package/lib/{StackView → esm/StackView}/common.js +0 -0
  618. /package/lib/{StackView → esm/StackView}/getStackedContent.js +0 -0
  619. /package/lib/{StackView → esm/StackView}/index.js +0 -0
  620. /package/lib/{Status → esm/Status}/Status.js +0 -0
  621. /package/lib/{Status → esm/Status}/index.js +0 -0
  622. /package/lib/{StepTracker → esm/StepTracker}/Step.js +0 -0
  623. /package/lib/{StepTracker → esm/StepTracker}/StepTracker.js +0 -0
  624. /package/lib/{StepTracker → esm/StepTracker}/dictionary.js +0 -0
  625. /package/lib/{StepTracker → esm/StepTracker}/index.js +0 -0
  626. /package/lib/{TabBar → esm/TabBar}/TabBar.js +0 -0
  627. /package/lib/{TabBar → esm/TabBar}/TabBarItem.js +0 -0
  628. /package/lib/{TabBar → esm/TabBar}/index.js +0 -0
  629. /package/lib/{Tabs → esm/Tabs}/Tabs.js +0 -0
  630. /package/lib/{Tabs → esm/Tabs}/TabsItem.js +0 -0
  631. /package/lib/{Tabs → esm/Tabs}/index.js +0 -0
  632. /package/lib/{Tags → esm/Tags}/Tags.js +0 -0
  633. /package/lib/{Tags → esm/Tags}/index.js +0 -0
  634. /package/lib/{TextInput → esm/TextInput}/TextArea.js +0 -0
  635. /package/lib/{TextInput → esm/TextInput}/TextInput.js +0 -0
  636. /package/lib/{TextInput → esm/TextInput}/dictionary.js +0 -0
  637. /package/lib/{TextInput → esm/TextInput}/index.js +0 -0
  638. /package/lib/{TextInput → esm/TextInput}/propTypes.js +0 -0
  639. /package/lib/{ThemeProvider → esm/ThemeProvider}/ThemeProvider.js +0 -0
  640. /package/lib/{ThemeProvider → esm/ThemeProvider}/index.js +0 -0
  641. /package/lib/{ThemeProvider → esm/ThemeProvider}/useResponsiveThemeTokens.js +0 -0
  642. /package/lib/{ThemeProvider → esm/ThemeProvider}/useSetTheme.js +0 -0
  643. /package/lib/{ThemeProvider → esm/ThemeProvider}/useTheme.js +0 -0
  644. /package/lib/{ThemeProvider → esm/ThemeProvider}/useThemeTokens.js +0 -0
  645. /package/lib/{ThemeProvider → esm/ThemeProvider}/utils/index.js +0 -0
  646. /package/lib/{ThemeProvider → esm/ThemeProvider}/utils/styles.js +0 -0
  647. /package/lib/{ThemeProvider → esm/ThemeProvider}/utils/theme-tokens.js +0 -0
  648. /package/lib/{Timeline → esm/Timeline}/Timeline.js +0 -0
  649. /package/lib/{Timeline → esm/Timeline}/index.js +0 -0
  650. /package/lib/{ToggleSwitch → esm/ToggleSwitch}/ToggleSwitch.js +0 -0
  651. /package/lib/{ToggleSwitch → esm/ToggleSwitch}/ToggleSwitchGroup.js +0 -0
  652. /package/lib/{ToggleSwitch → esm/ToggleSwitch}/index.js +0 -0
  653. /package/lib/{Tooltip → esm/Tooltip}/Backdrop.js +0 -0
  654. /package/lib/{Tooltip → esm/Tooltip}/Backdrop.native.js +0 -0
  655. /package/lib/{Tooltip → esm/Tooltip}/Tooltip.js +0 -0
  656. /package/lib/{Tooltip → esm/Tooltip}/Tooltip.native.js +0 -0
  657. /package/lib/{Tooltip → esm/Tooltip}/dictionary.js +0 -0
  658. /package/lib/{Tooltip → esm/Tooltip}/getTooltipPosition.js +0 -0
  659. /package/lib/{Tooltip → esm/Tooltip}/index.js +0 -0
  660. /package/lib/{Tooltip → esm/Tooltip}/shared.js +0 -0
  661. /package/lib/{TooltipButton → esm/TooltipButton}/TooltipButton.js +0 -0
  662. /package/lib/{TooltipButton → esm/TooltipButton}/index.js +0 -0
  663. /package/lib/{Typography → esm/Typography}/Typography.js +0 -0
  664. /package/lib/{Typography → esm/Typography}/index.js +0 -0
  665. /package/lib/{Validator → esm/Validator}/Validator.js +0 -0
  666. /package/lib/{Validator → esm/Validator}/index.js +0 -0
  667. /package/lib/{ViewportProvider → esm/ViewportProvider}/ViewportProvider.js +0 -0
  668. /package/lib/{ViewportProvider → esm/ViewportProvider}/index.js +0 -0
  669. /package/lib/{ViewportProvider → esm/ViewportProvider}/useViewport.js +0 -0
  670. /package/lib/{ViewportProvider → esm/ViewportProvider}/useViewportListener.js +0 -0
  671. /package/lib/{index.js → esm/index.js} +0 -0
  672. /package/lib/{server.js → esm/server.js} +0 -0
  673. /package/lib/{utils → esm/utils}/BaseView/BaseView.js +0 -0
  674. /package/lib/{utils → esm/utils}/BaseView/BaseView.native.js +0 -0
  675. /package/lib/{utils → esm/utils}/BaseView/index.js +0 -0
  676. /package/lib/{utils → esm/utils}/a11y/index.js +0 -0
  677. /package/lib/{utils → esm/utils}/a11y/semantics.js +0 -0
  678. /package/lib/{utils → esm/utils}/a11y/textSize.js +0 -0
  679. /package/lib/{utils → esm/utils}/animation/index.js +0 -0
  680. /package/lib/{utils → esm/utils}/animation/useVerticalExpandAnimation.js +0 -0
  681. /package/lib/{utils → esm/utils}/children.js +0 -0
  682. /package/lib/{utils → esm/utils}/containUniqueFields.js +0 -0
  683. /package/lib/{utils → esm/utils}/convertFromMegaByteToByte.js +0 -0
  684. /package/lib/{utils → esm/utils}/floating-ui/index.js +0 -0
  685. /package/lib/{utils → esm/utils}/floating-ui/index.native.js +0 -0
  686. /package/lib/{utils → esm/utils}/formatImageSource.js +0 -0
  687. /package/lib/{utils → esm/utils}/hasOwnProperty.js +0 -0
  688. /package/lib/{utils → esm/utils}/htmlAttrs.js +0 -0
  689. /package/lib/{utils → esm/utils}/index.js +0 -0
  690. /package/lib/{utils → esm/utils}/info/index.js +0 -0
  691. /package/lib/{utils → esm/utils}/info/platform/index.js +0 -0
  692. /package/lib/{utils → esm/utils}/info/platform/platform.android.js +0 -0
  693. /package/lib/{utils → esm/utils}/info/platform/platform.ios.js +0 -0
  694. /package/lib/{utils → esm/utils}/info/platform/platform.js +0 -0
  695. /package/lib/{utils → esm/utils}/info/platform/platform.native.js +0 -0
  696. /package/lib/{utils → esm/utils}/info/versions.js +0 -0
  697. /package/lib/{utils → esm/utils}/input.js +0 -0
  698. /package/lib/{utils → esm/utils}/pressability.js +0 -0
  699. /package/lib/{utils → esm/utils}/props/a11yProps.js +0 -0
  700. /package/lib/{utils → esm/utils}/props/clickProps.js +0 -0
  701. /package/lib/{utils → esm/utils}/props/componentPropType.js +0 -0
  702. /package/lib/{utils → esm/utils}/props/contentfulProps.js +0 -0
  703. /package/lib/{utils → esm/utils}/props/copyPropTypes.js +0 -0
  704. /package/lib/{utils → esm/utils}/props/getPropSelector.js +0 -0
  705. /package/lib/{utils → esm/utils}/props/handlerProps.js +0 -0
  706. /package/lib/{utils → esm/utils}/props/hrefAttrsProp.js +0 -0
  707. /package/lib/{utils → esm/utils}/props/index.js +0 -0
  708. /package/lib/{utils → esm/utils}/props/inputSupportsProps.js +0 -0
  709. /package/lib/{utils → esm/utils}/props/linkProps.js +0 -0
  710. /package/lib/{utils → esm/utils}/props/paddingProp.js +0 -0
  711. /package/lib/{utils → esm/utils}/props/pressProps.js +0 -0
  712. /package/lib/{utils → esm/utils}/props/rectProp.js +0 -0
  713. /package/lib/{utils → esm/utils}/props/responsiveProps.js +0 -0
  714. /package/lib/{utils → esm/utils}/props/selectSystemProps.js +0 -0
  715. /package/lib/{utils → esm/utils}/props/spacingProps.js +0 -0
  716. /package/lib/{utils → esm/utils}/props/textInputProps.js +0 -0
  717. /package/lib/{utils → esm/utils}/props/textProps.js +0 -0
  718. /package/lib/{utils → esm/utils}/props/tokens.js +0 -0
  719. /package/lib/{utils → esm/utils}/props/variantProp.js +0 -0
  720. /package/lib/{utils → esm/utils}/props/viewProps.js +0 -0
  721. /package/lib/{utils → esm/utils}/ssr-media-query/create-stylesheet/create-stylesheet-mobile.js +0 -0
  722. /package/lib/{utils → esm/utils}/ssr-media-query/create-stylesheet/index.android.js +0 -0
  723. /package/lib/{utils → esm/utils}/ssr-media-query/create-stylesheet/index.ios.js +0 -0
  724. /package/lib/{utils → esm/utils}/ssr-media-query/create-stylesheet/index.js +0 -0
  725. /package/lib/{utils → esm/utils}/ssr-media-query/hash.js +0 -0
  726. /package/lib/{utils → esm/utils}/ssr-media-query/index.js +0 -0
  727. /package/lib/{utils → esm/utils}/ssr-media-query/utils/common.js +0 -0
  728. /package/lib/{utils → esm/utils}/ssr-media-query/utils/create-declaration-block.js +0 -0
  729. /package/lib/{utils → esm/utils}/ssr-media-query/utils/create-media-query-styles.js +0 -0
  730. /package/lib/{utils → esm/utils}/ssr-media-query/utils/hyphenate-style-name.js +0 -0
  731. /package/lib/{utils → esm/utils}/ssr-media-query/utils/inject.js +0 -0
  732. /package/lib/{utils → esm/utils}/ssr.js +0 -0
  733. /package/lib/{utils → esm/utils}/transformGradient.js +0 -0
  734. /package/lib/{utils → esm/utils}/useCopy.js +0 -0
  735. /package/lib/{utils → esm/utils}/useHash.js +0 -0
  736. /package/lib/{utils → esm/utils}/useHash.native.js +0 -0
  737. /package/lib/{utils → esm/utils}/useOverlaidPosition.js +0 -0
  738. /package/lib/{utils → esm/utils}/useResponsiveProp.js +0 -0
  739. /package/lib/{utils → esm/utils}/useSafeLayoutEffect.js +0 -0
  740. /package/lib/{utils → esm/utils}/useScrollBlocking.js +0 -0
  741. /package/lib/{utils → esm/utils}/useScrollBlocking.native.js +0 -0
  742. /package/lib/{utils → esm/utils}/useSpacingScale.js +0 -0
  743. /package/lib/{utils → esm/utils}/useUniqueId.js +0 -0
  744. /package/lib/{utils → esm/utils}/withLinkRouter.js +0 -0
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
9
+ var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
10
+ var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _ThemeProvider = require("../ThemeProvider");
13
+ var _utils = require("../utils");
14
+ var _Icon = _interopRequireDefault(require("../Icon"));
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
18
+ const selectInnerContainerStyles = _ref => {
19
+ let {
20
+ borderRadius,
21
+ width,
22
+ backgroundColor
23
+ } = _ref;
24
+ return {
25
+ borderRadius,
26
+ width,
27
+ backgroundColor
28
+ };
29
+ };
30
+ const selectIconTokens = _ref2 => {
31
+ let {
32
+ iconSize,
33
+ iconColor,
34
+ iconScale = 1
35
+ } = _ref2;
36
+ return {
37
+ size: iconSize,
38
+ color: iconColor,
39
+ scale: iconScale
40
+ };
41
+ };
42
+
43
+ /**
44
+ * `TooltipButton` is a helper component used as a default control for the `Tooltip` component.
45
+ * In fact though, it isn't actually a pressable - it's meant to be used as pressable's content.
46
+ * Due to this any interaction states (e.g. pressed, hover, etc.) has to be passed down to it as a prop.
47
+ */
48
+ const TooltipButton = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
49
+ let {
50
+ pressableState,
51
+ tokens,
52
+ variant,
53
+ ...rest
54
+ } = _ref3;
55
+ const themeTokens = (0, _ThemeProvider.useThemeTokens)('TooltipButton', tokens, variant, pressableState);
56
+ const {
57
+ icon: IconComponent
58
+ } = themeTokens;
59
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
60
+ style: [(0, _ThemeProvider.applyOuterBorder)(themeTokens), themeTokens.outerBorderWidth && {
61
+ margin: -themeTokens.outerBorderWidth
62
+ }, staticStyles.bubblePointerEvents],
63
+ ...selectProps(rest),
64
+ ref: ref,
65
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
66
+ style: selectInnerContainerStyles(themeTokens),
67
+ children: IconComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
68
+ icon: IconComponent,
69
+ tokens: selectIconTokens(themeTokens)
70
+ })
71
+ })
72
+ });
73
+ });
74
+ TooltipButton.displayName = 'TooltipButton';
75
+ const staticStyles = _StyleSheet.default.create({
76
+ bubblePointerEvents: {
77
+ ..._Platform.default.select({
78
+ web: {
79
+ pointerEvents: 'none'
80
+ }
81
+ })
82
+ }
83
+ });
84
+ TooltipButton.propTypes = {
85
+ ...selectedSystemPropTypes,
86
+ /**
87
+ * Used as appearances when resolving theme tokens.
88
+ */
89
+ pressableState: _propTypes.default.shape({
90
+ pressed: _propTypes.default.bool,
91
+ hover: _propTypes.default.bool,
92
+ focus: _propTypes.default.bool
93
+ }),
94
+ tokens: (0, _utils.getTokensPropType)('TooltipButton'),
95
+ variant: _utils.variantProp.propType
96
+ };
97
+ var _default = exports.default = TooltipButton;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _TooltipButton = _interopRequireDefault(require("./TooltipButton"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = _TooltipButton.default;
@@ -0,0 +1,271 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _Text = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Text"));
10
+ var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
11
+ var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
12
+ var _ThemeProvider = require("../ThemeProvider");
13
+ var _utils = require("../ThemeProvider/utils");
14
+ var _utils2 = require("../utils");
15
+ var _ViewportProvider = require("../ViewportProvider");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
+ /**
19
+ * @typedef {import('../utils/a11y/semantics').TextTag} TextTag
20
+ */const [selectContainerProps, selectedContainerPropTypes] = (0, _utils2.selectSystemProps)([_utils2.a11yProps, _utils2.viewProps]);
21
+ const [selectTextProps, selectedTextPropTypes] = (0, _utils2.selectSystemProps)([_utils2.textProps]);
22
+ const selectTextStyles = (_ref, themeOptions) => {
23
+ let {
24
+ fontWeight,
25
+ fontSize,
26
+ color,
27
+ lineHeight,
28
+ fontName,
29
+ textAlign,
30
+ textTransform,
31
+ letterSpacing,
32
+ textDecorationLine,
33
+ gradient
34
+ } = _ref;
35
+ return (0, _utils.applyTextStyles)({
36
+ fontWeight,
37
+ fontSize,
38
+ color,
39
+ lineHeight,
40
+ fontName,
41
+ themeOptions,
42
+ textAlign,
43
+ textTransform,
44
+ letterSpacing,
45
+ textDecorationLine,
46
+ gradient
47
+ });
48
+ };
49
+ const HALF_FONT_SIZE = 2;
50
+ const QUARTER_FONT_SIZE = 4;
51
+ const selectMobileSubSupStyles = (_ref2, type) => {
52
+ let {
53
+ fontSize
54
+ } = _ref2;
55
+ return {
56
+ fontSize: fontSize / HALF_FONT_SIZE,
57
+ lineHeight: fontSize,
58
+ position: 'relative',
59
+ top: type === 'sub' ? fontSize / QUARTER_FONT_SIZE : -fontSize / QUARTER_FONT_SIZE
60
+ };
61
+ };
62
+
63
+ // General-purpose flexible theme-neutral base component for text
64
+ const Typography = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
65
+ let {
66
+ children,
67
+ variant,
68
+ heading,
69
+ tag = typeof heading === 'string' ? heading : undefined,
70
+ accessibilityRole = heading === true ? 'header' : undefined,
71
+ block = false,
72
+ align = undefined,
73
+ tokens,
74
+ dataSet,
75
+ strikeThrough = false,
76
+ ...rest
77
+ } = _ref3;
78
+ const viewport = (0, _ViewportProvider.useViewport)();
79
+ const {
80
+ themeOptions
81
+ } = (0, _ThemeProvider.useTheme)();
82
+ const {
83
+ enableMediaQueryStyleSheet
84
+ } = themeOptions;
85
+ const useTokens = enableMediaQueryStyleSheet ? _ThemeProvider.useResponsiveThemeTokens : _ThemeProvider.useThemeTokens;
86
+ const themeTokens = useTokens('Typography', tokens, variant, !enableMediaQueryStyleSheet && {
87
+ viewport
88
+ });
89
+ const maxFontSizeMultiplier = enableMediaQueryStyleSheet ? (0, _utils2.getMaxFontMultiplier)(themeTokens[viewport]) : (0, _utils2.getMaxFontMultiplier)(themeTokens);
90
+ const textDecorationLine = strikeThrough ? 'line-through' : 'none';
91
+ const generateGradientString = gradientObj => {
92
+ let gradientStr = '';
93
+ const {
94
+ type,
95
+ angle,
96
+ stops: [stopOne, stopTwo],
97
+ specification
98
+ } = gradientObj;
99
+ if (type === 'radial') {
100
+ gradientStr = `radial-gradient(${specification}`;
101
+ gradientStr += `, ${stopOne.color} ${stopOne.stop * 100}%, ${stopTwo.color} ${stopTwo.stop * 100}%`;
102
+ } else if (type === 'linear') {
103
+ gradientStr = `linear-gradient(${angle}deg`;
104
+ if (angle === 135) {
105
+ gradientStr += `, ${stopOne.color}, 75%, ${stopTwo.color}`;
106
+ } else {
107
+ gradientStr += `, ${stopOne.color}, ${stopTwo.color}`;
108
+ }
109
+ }
110
+ gradientStr += ')';
111
+ return gradientStr;
112
+ };
113
+ const getStyleWithGradient = styles => {
114
+ return styles.gradient ? {
115
+ ...styles,
116
+ color: 'transparent',
117
+ backgroundImage: generateGradientString(styles.gradient),
118
+ backgroundClip: 'text'
119
+ } : styles;
120
+ };
121
+ let textStyles;
122
+ let mediaIds;
123
+ if (enableMediaQueryStyleSheet) {
124
+ const transformedThemeTokens = Object.entries(themeTokens).reduce((acc, _ref4) => {
125
+ let [vp, viewportTokens] = _ref4;
126
+ acc[vp] = selectTextStyles({
127
+ textAlign: align,
128
+ textDecorationLine,
129
+ ...viewportTokens
130
+ }, themeOptions);
131
+ if (themeTokens[vp].gradient) {
132
+ const tokensWithGradient = {
133
+ ...acc[vp],
134
+ color: 'transparent',
135
+ backgroundImage: generateGradientString(themeTokens[vp].gradient),
136
+ backgroundClip: 'text'
137
+ };
138
+ return {
139
+ ...acc,
140
+ [vp]: tokensWithGradient
141
+ };
142
+ }
143
+ return acc;
144
+ }, {});
145
+ const mediaQueryStyles = (0, _utils2.createMediaQueryStyles)(transformedThemeTokens);
146
+ const {
147
+ ids,
148
+ styles
149
+ } = _utils2.StyleSheet.create({
150
+ text: mediaQueryStyles
151
+ });
152
+ textStyles = styles.text;
153
+ mediaIds = ids.text;
154
+ } else {
155
+ textStyles = selectTextStyles({
156
+ textAlign: align,
157
+ textDecorationLine,
158
+ ...themeTokens
159
+ }, themeOptions);
160
+ }
161
+ const resolvedTextProps = {
162
+ ...selectTextProps(rest),
163
+ maxFontSizeMultiplier
164
+ };
165
+ const containerProps = {
166
+ accessibilityRole,
167
+ ...(0, _utils2.getA11yPropsFromHtmlTag)(tag, accessibilityRole),
168
+ ...selectContainerProps(rest)
169
+ };
170
+ const resetTagStyling = child => {
171
+ if (typeof child !== 'object' || !(child?.type === 'sub' || child?.type === 'sup')) {
172
+ return child;
173
+ }
174
+ const childStyles = child?.props?.style || {};
175
+ const supFontSize = childStyles.fontSize ?? themeTokens.superScriptFontSize;
176
+ const isMobile = _Platform.default.OS === 'ios' || _Platform.default.OS === 'android';
177
+ const isSubSup = child?.type === 'sub' || child?.type === 'sup';
178
+ const mobileStyles = isMobile && isSubSup ? selectMobileSubSupStyles(themeTokens, child?.type) : {};
179
+ const defaultStyles = !isMobile && isSubSup ? {
180
+ fontSize: supFontSize,
181
+ lineHeight: 0
182
+ } : {};
183
+ const sanitizedChild = /*#__PURE__*/_react.default.cloneElement(isMobile && isSubSup ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
184
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
185
+ style: [childStyles, mobileStyles],
186
+ children: child.props.children
187
+ })
188
+ }) : child, {
189
+ style: {
190
+ ...childStyles,
191
+ ...defaultStyles
192
+ }
193
+ });
194
+ return sanitizedChild;
195
+ };
196
+ const sanitizeChildren = () => {
197
+ if (Array.isArray(children)) {
198
+ return children.map(resetTagStyling);
199
+ }
200
+ return resetTagStyling(children);
201
+ };
202
+ const dataSetValue = mediaIds ? {
203
+ media: mediaIds,
204
+ ...dataSet
205
+ } : dataSet;
206
+ return block ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
207
+ ref: ref,
208
+ ...containerProps,
209
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
210
+ ...resolvedTextProps,
211
+ style: getStyleWithGradient(textStyles),
212
+ dataSet: dataSetValue,
213
+ children: sanitizeChildren(children)
214
+ })
215
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
216
+ ref: ref,
217
+ ...containerProps,
218
+ ...resolvedTextProps,
219
+ style: getStyleWithGradient(textStyles),
220
+ dataSet: dataSetValue,
221
+ children: sanitizeChildren(children)
222
+ });
223
+ });
224
+ Typography.displayName = 'Typography';
225
+ Typography.propTypes = {
226
+ ...selectedContainerPropTypes,
227
+ ...selectedTextPropTypes,
228
+ tokens: (0, _utils2.getTokensPropType)('Typography'),
229
+ variant: _utils2.variantProp.propType,
230
+ /**
231
+ * Renders the text with "text-decoration: 'line-through'" applied.
232
+ */
233
+ strikeThrough: _propTypes.default.bool,
234
+ /**
235
+ * Renders the text as a semantic heading. If a html heading tag is provided, uses that tag on Web.
236
+ *
237
+ * Does not affect styling: <Typography heading="h2"> will render a <h2> that looks like plain text.
238
+ * Use both `heading` and `variant` props to render semantic headings that look like headings.
239
+ *
240
+ * In native apps, if this is `true` or any html heading tag string and accessibilityRole prop
241
+ * is not defined, the accessibilityRole will default to "heading".
242
+ */
243
+ heading: _propTypes.default.oneOf([..._utils2.headingTags, true]),
244
+ /**
245
+ * Optional semantic HTML tag, to apply to the text on web. Does not change styling.
246
+ *
247
+ * `tag` and `heading` props set the same thing, so shouldn't be used together (`tag` overrides `heading`).
248
+ *
249
+ * In native apps, if a header tag is provided ("h1", "h2" etc) and accessibilityRole prop
250
+ * is not defined, the accessibilityRole will default to "heading".
251
+ */
252
+ tag: _propTypes.default.oneOf(_utils2.textTags),
253
+ /**
254
+ * If true, forces the element to behave as a View block even if nested in other text
255
+ */
256
+ block: _propTypes.default.bool,
257
+ /**
258
+ * Works the same as css text-align, note that RN doesn't support "start" or "end" (see https://reactnative.dev/docs/text-style-props#textalign)
259
+ * Justify is known to make text harder to read, especially for people with dyslexia (see https://developer.mozilla.org/en-US/docs/Web/CSS/text-align#accessibility_concerns)
260
+ */
261
+ align: _propTypes.default.oneOf(['auto', 'left', 'right', 'center', 'justify']),
262
+ /**
263
+ * Same children allowed as a React Native <Text> node
264
+ */
265
+ children: _propTypes.default.node,
266
+ /**
267
+ * Data attributes to be added to the element
268
+ */
269
+ dataSet: _propTypes.default.object
270
+ };
271
+ var _default = exports.default = Typography;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _Typography = _interopRequireDefault(require("./Typography"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = _Typography.default;
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
10
+ var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
11
+ var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
12
+ var _utils = require("../utils");
13
+ var _TextInput = require("../TextInput");
14
+ var _StackView = _interopRequireDefault(require("../StackView"));
15
+ var _InputSupports = _interopRequireDefault(require("../InputSupports"));
16
+ var _ThemeProvider = require("../ThemeProvider");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
+ const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.inputSupportsProps]);
20
+ const selectCodeTextInputTokens = _ref => {
21
+ let {
22
+ outerBorderColor,
23
+ outerBackgroundColor
24
+ } = _ref;
25
+ return {
26
+ outerBorderColor,
27
+ outerBackgroundColor,
28
+ icon: null
29
+ };
30
+ };
31
+ const Validator = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
32
+ let {
33
+ value = '',
34
+ inactive,
35
+ mask = '',
36
+ onChange,
37
+ tokens = {},
38
+ variant = {},
39
+ ...rest
40
+ } = _ref2;
41
+ const defaultRef = _react.default.useRef();
42
+ const codeRef = ref ?? defaultRef;
43
+ const {
44
+ supportsProps
45
+ } = selectProps(rest);
46
+ const strValidation = supportsProps.validation;
47
+ const [individualCodes, setIndividualCodes] = _react.default.useState({});
48
+ const [text, setText] = _react.default.useState(value);
49
+ const validatorsLength = 6;
50
+ const prefix = 'code';
51
+ const sufixValidation = 'Validation';
52
+ const [isHover, setIsHover] = _react.default.useState(false);
53
+ const handleMouseOver = () => {
54
+ setIsHover(true);
55
+ };
56
+ const handleMouseOut = () => {
57
+ setIsHover(false);
58
+ };
59
+ const themeTokens = (0, _ThemeProvider.useThemeTokens)('TextInput', tokens, variant, {
60
+ hover: isHover
61
+ });
62
+ const [codeReferences, singleCodes] = _react.default.useMemo(() => {
63
+ const codes = [];
64
+ const valueCodes = {};
65
+ for (let i = 0; validatorsLength && i < validatorsLength; i += 1) {
66
+ codes[prefix + i] = /*#__PURE__*/_react.default.createRef();
67
+ valueCodes[prefix + i] = '';
68
+ valueCodes[prefix + i + sufixValidation] = '';
69
+ }
70
+ return [codes, valueCodes];
71
+ }, []);
72
+ const handleSingleCodes = (codeId, val, validation) => {
73
+ singleCodes[codeId] = val;
74
+ singleCodes[codeId + sufixValidation] = validation;
75
+ /* eslint-disable no-unused-expressions */
76
+ setIndividualCodes({
77
+ ...individualCodes,
78
+ [codeId]: val
79
+ });
80
+ };
81
+ const changeDataMasking = boxElement => {
82
+ let charMasking = '';
83
+ const element = boxElement;
84
+ if (mask && mask.length === 1) charMasking = mask;else if (mask && mask.length > 1) charMasking = mask.substring(0, 1);
85
+ if (charMasking) element.value = charMasking;
86
+ };
87
+ const handleChangeCode = () => {
88
+ let code = '';
89
+ for (let i = 0; i < validatorsLength; i += 1) code += singleCodes[prefix + i];
90
+ if (typeof onChange === 'function') onChange(code, singleCodes);
91
+ };
92
+ const handleChangeCodeValues = (event, codeId, nextIndex) => {
93
+ const codeElement = codeReferences[codeId]?.current;
94
+ const val = event.nativeEvent?.value || event.target?.value;
95
+ if (Number(val).toString() === 'NaN') {
96
+ codeElement.value = singleCodes[codeId] ?? '';
97
+ return;
98
+ }
99
+ handleSingleCodes(codeId, codeElement?.value ?? singleCodes[codeId], 'success');
100
+ handleChangeCode();
101
+ if (nextIndex === validatorsLength) {
102
+ codeElement.blur();
103
+ changeDataMasking(codeElement);
104
+ return;
105
+ }
106
+ if (codeElement?.value?.length > 0) {
107
+ codeReferences[prefix + nextIndex].current.focus();
108
+ changeDataMasking(codeElement);
109
+ }
110
+ };
111
+ const handleKeyPress = (event, currentIndex, previousIndex) => {
112
+ if (!(event.keyCode === 8 || event.code === 'Backspace')) return;
113
+ if (currentIndex > 0) {
114
+ codeReferences[prefix + currentIndex].current.value = '';
115
+ codeReferences[prefix + previousIndex].current.focus();
116
+ }
117
+ handleSingleCodes(prefix + currentIndex, '', '');
118
+ handleChangeCode();
119
+ };
120
+ const getCodeComponents = () => {
121
+ const components = [];
122
+ for (let i = 0; validatorsLength && i < validatorsLength; i += 1) {
123
+ const codeId = prefix + i;
124
+ const codeInputProps = {
125
+ nativeID: codeId,
126
+ keyboardType: 'numeric',
127
+ ref: codeReferences[codeId] ?? null,
128
+ validation: strValidation || singleCodes[codeId + sufixValidation],
129
+ tokens: selectCodeTextInputTokens(themeTokens),
130
+ onFocus: () => codeReferences[codeId]?.current?.select() ?? null,
131
+ onKeyPress: event => handleKeyPress(event, i, i - 1),
132
+ onMouseOver: handleMouseOver,
133
+ onMouseOut: handleMouseOut,
134
+ inactive
135
+ };
136
+ codeInputProps.validation || delete codeInputProps.validation;
137
+ components.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
138
+ style: staticStyles.codeInputWidth,
139
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextInput.TextInput, {
140
+ ...codeInputProps
141
+ })
142
+ }, codeId));
143
+ }
144
+ return components;
145
+ };
146
+ _react.default.useEffect(() => {
147
+ /* eslint-disable no-unused-expressions */
148
+ if (Number(value).toString() !== 'NaN') setText(value);
149
+ }, [value]);
150
+
151
+ /* eslint-disable react-hooks/exhaustive-deps */
152
+ _react.default.useEffect(() => {
153
+ for (let i = 0; i < validatorsLength; i += 1) {
154
+ if (mask && text[i]) codeReferences[prefix + i].current.value = mask;else codeReferences[prefix + i].current.value = text[i] ?? '';
155
+ handleSingleCodes(prefix + i, text[i] ?? '', text[i] ? 'success' : '');
156
+ }
157
+ }, [text]);
158
+
159
+ /* eslint-disable react-hooks/exhaustive-deps */
160
+ _react.default.useEffect(() => {
161
+ const handlePasteCode = event => {
162
+ setText('');
163
+ const clipBoardText = event.clipboardData.getData('text');
164
+ if (Number(clipBoardText).toString() !== 'NaN') setText(clipBoardText);
165
+ };
166
+ const handleCopy = event => {
167
+ let clipBoardText = '';
168
+ for (let i = 0; i < validatorsLength; i += 1) singleCodes[prefix + i] && (clipBoardText += singleCodes[prefix + i]);
169
+ event.clipboardData.setData('text/plain', clipBoardText);
170
+ event.preventDefault();
171
+ };
172
+ if (_Platform.default.OS === 'web') {
173
+ for (let i = 0; i < validatorsLength; i += 1) {
174
+ codeReferences[prefix + i].current.addEventListener('paste', handlePasteCode);
175
+ codeReferences[prefix + i].current.addEventListener('copy', handleCopy);
176
+ codeReferences[prefix + i].current.addEventListener('input', event => handleChangeCodeValues(event, prefix + i, i + 1));
177
+ }
178
+ }
179
+ return () => {
180
+ if (_Platform.default.oldValue === 'web') {
181
+ for (let i = 0; i < validatorsLength; i += 1) {
182
+ codeReferences[prefix + i]?.current?.removeEventListener('paste', handlePasteCode);
183
+ codeReferences[prefix + i]?.current?.removeEventListener('copy', handleCopy);
184
+ codeReferences[prefix + i]?.current?.removeEventListener('input', event => handleChangeCodeValues(event, prefix + i, i + 1));
185
+ }
186
+ }
187
+ };
188
+ }, []);
189
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputSupports.default, {
190
+ ...supportsProps,
191
+ feedbackProps: {
192
+ ...rest?.feedbackProps,
193
+ showFeedbackIcon: true
194
+ },
195
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_StackView.default, {
196
+ space: 2,
197
+ direction: "row",
198
+ ref: codeRef,
199
+ children: getCodeComponents()
200
+ })
201
+ });
202
+ });
203
+ Validator.displayName = 'Validator';
204
+ Validator.propTypes = {
205
+ ...selectedSystemPropTypes,
206
+ /**
207
+ * The value is a 6-digit code, may be only numeric characters, non numeric character aren't renderize
208
+ */
209
+ value: _propTypes.default.string,
210
+ /**
211
+ * If true, the component is inactive and non editable.
212
+ */
213
+ inactive: _propTypes.default.bool,
214
+ /**
215
+ * Show masked characters and obscure the actual input. For example: '*'
216
+ */
217
+ mask: _propTypes.default.string,
218
+ /**
219
+ * Use to react upon input's value changes. Required when the `value` prop is set. Will receive the input's value as an argument.
220
+ */
221
+ onChange: _propTypes.default.func
222
+ };
223
+ var _default = exports.default = Validator;
224
+ const staticStyles = _StyleSheet.default.create({
225
+ codeInputWidth: {
226
+ width: 43
227
+ }
228
+ });
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _Validator = _interopRequireDefault(require("./Validator"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = _Validator.default;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _systemConstants = require("@telus-uds/system-constants");
10
+ var _useViewport = require("./useViewport");
11
+ var _useViewportListener = _interopRequireDefault(require("./useViewportListener"));
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /**
15
+ * Provides an up-to-date viewport value from system-constants, available via the `useViewport` hook
16
+ */const ViewportProvider = _ref => {
17
+ let {
18
+ children
19
+ } = _ref;
20
+ // Default to the smallest viewport for mobile-first SSR. On client side, this is updated
21
+ // by useViewportListener in a layout effect before anything is shown to the user.
22
+ const [viewport, setViewport] = _react.default.useState(_systemConstants.viewports.keys[0]);
23
+ (0, _useViewportListener.default)(setViewport);
24
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_useViewport.ViewportContext.Provider, {
25
+ value: viewport,
26
+ children: children
27
+ });
28
+ };
29
+ ViewportProvider.propTypes = {
30
+ children: _propTypes.default.node.isRequired
31
+ };
32
+ var _default = exports.default = ViewportProvider;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {};
7
+ exports.default = void 0;
8
+ var _ViewportProvider = _interopRequireDefault(require("./ViewportProvider"));
9
+ var _useViewport = require("./useViewport");
10
+ Object.keys(_useViewport).forEach(function (key) {
11
+ if (key === "default" || key === "__esModule") return;
12
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
+ if (key in exports && exports[key] === _useViewport[key]) return;
14
+ Object.defineProperty(exports, key, {
15
+ enumerable: true,
16
+ get: function () {
17
+ return _useViewport[key];
18
+ }
19
+ });
20
+ });
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
+ var _default = exports.default = _ViewportProvider.default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useViewport = exports.ViewportContext = void 0;
7
+ var _react = require("react");
8
+ const ViewportContext = exports.ViewportContext = /*#__PURE__*/(0, _react.createContext)({});
9
+ const useViewport = () => (0, _react.useContext)(ViewportContext);
10
+ exports.useViewport = useViewport;