@telus-uds/components-base 0.0.2-prerelease.4 → 0.0.2-prerelease.8

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 (447) hide show
  1. package/.ultra.cache.json +1 -0
  2. package/CHANGELOG.md +76 -0
  3. package/__fixtures__/Accessible.js +33 -0
  4. package/__fixtures__/Accessible.native.js +32 -0
  5. package/__fixtures__/testTheme.js +940 -54
  6. package/__tests__/ActivityIndicator/ActivityIndicator.test.jsx +1 -1
  7. package/__tests__/Button/ButtonBase.test.jsx +3 -32
  8. package/__tests__/Button/ButtonGroup.test.jsx +2 -2
  9. package/__tests__/Checkbox/Checkbox.test.jsx +94 -0
  10. package/__tests__/Checkbox/CheckboxGroup.test.jsx +247 -0
  11. package/__tests__/Divider/Divider.test.jsx +26 -5
  12. package/__tests__/Feedback/Feedback.test.jsx +42 -0
  13. package/__tests__/Icon/Icon.test.jsx +3 -3
  14. package/__tests__/InputSupports/InputSupports.test.jsx +50 -0
  15. package/__tests__/List/List.test.jsx +60 -0
  16. package/__tests__/Modal/Modal.test.jsx +47 -0
  17. package/__tests__/Notification/Notification.test.jsx +20 -0
  18. package/__tests__/Pagination/Pagination.test.jsx +2 -2
  19. package/__tests__/Progress/Progress.test.jsx +79 -0
  20. package/__tests__/Radio/Radio.test.jsx +87 -0
  21. package/__tests__/Radio/RadioGroup.test.jsx +221 -0
  22. package/__tests__/RadioCard/RadioCard.test.jsx +87 -0
  23. package/__tests__/RadioCard/RadioCardGroup.test.jsx +247 -0
  24. package/__tests__/Search/Search.test.jsx +72 -0
  25. package/__tests__/Select/Select.test.jsx +93 -0
  26. package/__tests__/Skeleton/Skeleton.test.jsx +61 -0
  27. package/__tests__/Spacer/Spacer.test.jsx +63 -0
  28. package/__tests__/StackView/StackView.test.jsx +216 -0
  29. package/__tests__/StackView/StackWrap.test.jsx +47 -0
  30. package/__tests__/StackView/getStackedContent.test.jsx +295 -0
  31. package/__tests__/StepTracker/StepTracker.test.jsx +94 -0
  32. package/__tests__/Tabs/Tabs.test.jsx +200 -0
  33. package/__tests__/Tags/Tags.test.jsx +328 -0
  34. package/__tests__/TextInput/TextArea.test.jsx +34 -0
  35. package/__tests__/TextInput/TextInputBase.test.jsx +120 -0
  36. package/__tests__/Tooltip/Tooltip.test.jsx +65 -0
  37. package/__tests__/Tooltip/getTooltipPosition.test.js +79 -0
  38. package/__tests__/utils/input.test.js +58 -0
  39. package/__tests__/utils/useCopy.test.js +42 -0
  40. package/__tests__/utils/useResponsiveProp.test.jsx +202 -0
  41. package/__tests__/utils/{spacing.test.jsx → useSpacingScale.test.jsx} +1 -1
  42. package/__tests__/utils/useUniqueId.test.js +31 -0
  43. package/babel.config.js +20 -0
  44. package/jest.config.js +8 -2
  45. package/lib/A11yInfoProvider/index.js +54 -26
  46. package/lib/A11yText/index.js +37 -14
  47. package/lib/ActivityIndicator/Spinner.js +78 -0
  48. package/lib/ActivityIndicator/Spinner.native.js +121 -87
  49. package/lib/ActivityIndicator/index.js +28 -12
  50. package/lib/ActivityIndicator/shared.js +27 -12
  51. package/lib/BaseProvider/index.js +34 -11
  52. package/lib/Box/Box.js +56 -28
  53. package/lib/Box/index.js +13 -2
  54. package/lib/Button/Button.js +38 -10
  55. package/lib/Button/ButtonBase.js +120 -109
  56. package/lib/Button/ButtonGroup.js +98 -99
  57. package/lib/Button/ButtonLink.js +41 -13
  58. package/lib/Button/index.js +31 -4
  59. package/lib/Button/propTypes.js +32 -9
  60. package/lib/Card/Card.js +36 -41
  61. package/lib/Card/CardBase.js +78 -0
  62. package/lib/Card/PressableCardBase.js +137 -0
  63. package/lib/Card/index.js +40 -2
  64. package/lib/Checkbox/Checkbox.js +344 -0
  65. package/lib/Checkbox/CheckboxGroup.js +231 -0
  66. package/lib/Checkbox/CheckboxInput.js +74 -0
  67. package/lib/Checkbox/CheckboxInput.native.js +14 -0
  68. package/lib/Checkbox/index.js +21 -0
  69. package/lib/Divider/Divider.js +81 -17
  70. package/lib/Divider/index.js +13 -2
  71. package/lib/ExpandCollapse/Accordion.js +20 -7
  72. package/lib/ExpandCollapse/Control.js +50 -27
  73. package/lib/ExpandCollapse/ExpandCollapse.js +41 -24
  74. package/lib/ExpandCollapse/Panel.js +75 -37
  75. package/lib/ExpandCollapse/index.js +25 -7
  76. package/lib/Feedback/Feedback.js +161 -0
  77. package/lib/Feedback/index.js +13 -0
  78. package/lib/Fieldset/Fieldset.js +160 -0
  79. package/lib/Fieldset/FieldsetContainer.js +41 -0
  80. package/lib/Fieldset/FieldsetContainer.native.js +33 -0
  81. package/lib/Fieldset/Legend.js +33 -0
  82. package/lib/Fieldset/Legend.native.js +43 -0
  83. package/lib/Fieldset/cssReset.js +21 -0
  84. package/lib/Fieldset/index.js +13 -0
  85. package/lib/FlexGrid/Col/Col.js +67 -38
  86. package/lib/FlexGrid/Col/index.js +13 -2
  87. package/lib/FlexGrid/FlexGrid.js +70 -45
  88. package/lib/FlexGrid/Row/Row.js +48 -27
  89. package/lib/FlexGrid/Row/index.js +13 -2
  90. package/lib/FlexGrid/helpers/index.js +9 -1
  91. package/lib/FlexGrid/index.js +13 -2
  92. package/lib/FlexGrid/providers/GutterContext.js +15 -3
  93. package/lib/Icon/Icon.js +52 -47
  94. package/lib/Icon/IconText.js +100 -0
  95. package/lib/Icon/index.js +31 -3
  96. package/lib/InputLabel/InputLabel.js +122 -0
  97. package/lib/InputLabel/LabelContent.js +31 -0
  98. package/lib/InputLabel/LabelContent.native.js +16 -0
  99. package/lib/InputLabel/index.js +13 -0
  100. package/lib/InputSupports/InputSupports.js +104 -0
  101. package/lib/InputSupports/index.js +13 -0
  102. package/lib/InputSupports/propTypes.js +66 -0
  103. package/lib/InputSupports/useInputSupports.js +41 -0
  104. package/lib/Link/ChevronLink.js +57 -15
  105. package/lib/Link/InlinePressable.js +50 -0
  106. package/lib/Link/InlinePressable.native.js +101 -0
  107. package/lib/Link/Link.js +30 -13
  108. package/lib/Link/LinkBase.js +121 -146
  109. package/lib/Link/TextButton.js +47 -17
  110. package/lib/Link/index.js +39 -4
  111. package/lib/List/List.js +80 -0
  112. package/lib/List/ListItem.js +237 -0
  113. package/lib/List/index.js +13 -0
  114. package/lib/Modal/Modal.js +226 -0
  115. package/lib/Modal/dictionary.js +16 -0
  116. package/lib/Modal/index.js +13 -0
  117. package/lib/Notification/Notification.js +200 -0
  118. package/lib/Notification/dictionary.js +15 -0
  119. package/lib/Notification/index.js +13 -0
  120. package/lib/Pagination/PageButton.js +45 -46
  121. package/lib/Pagination/Pagination.js +70 -40
  122. package/lib/Pagination/SideButton.js +74 -58
  123. package/lib/Pagination/dictionary.js +9 -2
  124. package/lib/Pagination/index.js +13 -2
  125. package/lib/Pagination/usePagination.js +12 -2
  126. package/lib/Progress/Progress.js +99 -0
  127. package/lib/Progress/ProgressBar.js +146 -0
  128. package/lib/Progress/ProgressBarBackground.js +57 -0
  129. package/lib/Progress/index.js +16 -0
  130. package/lib/Radio/Radio.js +292 -0
  131. package/lib/Radio/RadioButton.js +141 -0
  132. package/lib/Radio/RadioGroup.js +233 -0
  133. package/lib/Radio/RadioInput.js +76 -0
  134. package/lib/Radio/RadioInput.native.js +14 -0
  135. package/lib/Radio/index.js +21 -0
  136. package/lib/RadioCard/RadioCard.js +240 -0
  137. package/lib/RadioCard/RadioCardGroup.js +251 -0
  138. package/lib/RadioCard/index.js +21 -0
  139. package/lib/Search/Search.js +243 -0
  140. package/lib/Search/dictionary.js +19 -0
  141. package/lib/Search/index.js +13 -0
  142. package/lib/Select/Group.js +33 -0
  143. package/lib/Select/Group.native.js +25 -0
  144. package/lib/Select/Item.js +29 -0
  145. package/lib/Select/Item.native.js +19 -0
  146. package/lib/Select/Picker.js +79 -0
  147. package/lib/Select/Picker.native.js +115 -0
  148. package/lib/Select/Select.js +300 -0
  149. package/lib/Select/index.js +19 -0
  150. package/lib/SideNav/Item.js +54 -33
  151. package/lib/SideNav/ItemContent.js +41 -15
  152. package/lib/SideNav/ItemsGroup.js +46 -27
  153. package/lib/SideNav/SideNav.js +92 -69
  154. package/lib/SideNav/index.js +15 -1
  155. package/lib/Skeleton/Skeleton.js +137 -0
  156. package/lib/Skeleton/index.js +13 -0
  157. package/lib/Skeleton/skeleton.constant.js +12 -0
  158. package/lib/Skeleton/skeletonWebAnimation.js +27 -0
  159. package/lib/Skeleton/useSkeletonNativeAnimation.js +37 -0
  160. package/lib/Spacer/Spacer.js +117 -0
  161. package/lib/Spacer/index.js +13 -0
  162. package/lib/StackView/StackView.js +129 -0
  163. package/lib/StackView/StackWrap.js +55 -0
  164. package/lib/StackView/StackWrap.native.js +14 -0
  165. package/lib/StackView/StackWrapBox.js +112 -0
  166. package/lib/StackView/StackWrapGap.js +71 -0
  167. package/lib/StackView/common.js +45 -0
  168. package/lib/StackView/getStackedContent.js +141 -0
  169. package/lib/StackView/index.js +29 -0
  170. package/lib/StepTracker/Step.js +245 -0
  171. package/lib/StepTracker/StepTracker.js +197 -0
  172. package/lib/StepTracker/dictionary.js +17 -0
  173. package/lib/StepTracker/index.js +13 -0
  174. package/lib/Tabs/HorizontalScroll.js +199 -0
  175. package/lib/Tabs/ScrollViewEnd.js +66 -0
  176. package/lib/Tabs/ScrollViewEnd.native.js +41 -0
  177. package/lib/Tabs/Tabs.js +117 -0
  178. package/lib/Tabs/TabsItem.js +234 -0
  179. package/lib/Tabs/TabsScrollButton.js +121 -0
  180. package/lib/Tabs/dictionary.js +18 -0
  181. package/lib/Tabs/index.js +13 -0
  182. package/lib/Tabs/itemPositions.js +128 -0
  183. package/lib/Tags/Tags.js +250 -0
  184. package/lib/Tags/index.js +13 -0
  185. package/lib/TextInput/TextArea.js +109 -0
  186. package/lib/TextInput/TextInput.js +75 -0
  187. package/lib/TextInput/TextInputBase.js +252 -0
  188. package/lib/TextInput/index.js +23 -0
  189. package/lib/TextInput/propTypes.js +42 -0
  190. package/lib/ThemeProvider/ThemeProvider.js +38 -14
  191. package/lib/ThemeProvider/index.js +61 -6
  192. package/lib/ThemeProvider/useSetTheme.js +14 -5
  193. package/lib/ThemeProvider/useTheme.js +13 -4
  194. package/lib/ThemeProvider/useThemeTokens.js +86 -19
  195. package/lib/ThemeProvider/utils/index.js +31 -2
  196. package/lib/ThemeProvider/utils/styles.js +52 -16
  197. package/lib/ThemeProvider/utils/theme-tokens.js +94 -16
  198. package/lib/ToggleSwitch/ToggleSwitch.js +76 -52
  199. package/lib/ToggleSwitch/index.js +13 -2
  200. package/lib/Tooltip/Backdrop.js +56 -0
  201. package/lib/Tooltip/Backdrop.native.js +59 -0
  202. package/lib/Tooltip/Tooltip.js +357 -0
  203. package/lib/Tooltip/dictionary.js +15 -0
  204. package/lib/Tooltip/getTooltipPosition.js +172 -0
  205. package/lib/Tooltip/index.js +13 -0
  206. package/lib/TooltipButton/TooltipButton.js +83 -0
  207. package/lib/TooltipButton/index.js +13 -0
  208. package/lib/Typography/Typography.js +58 -47
  209. package/lib/Typography/index.js +13 -2
  210. package/lib/ViewportProvider/ViewportProvider.js +46 -0
  211. package/lib/ViewportProvider/index.js +22 -38
  212. package/lib/ViewportProvider/useViewport.js +15 -0
  213. package/lib/ViewportProvider/useViewportListener.js +57 -0
  214. package/lib/index.js +509 -19
  215. package/lib/utils/a11y/index.js +18 -0
  216. package/lib/utils/a11y/textSize.js +49 -0
  217. package/lib/utils/animation/index.js +15 -2
  218. package/lib/utils/animation/useVerticalExpandAnimation.js +28 -11
  219. package/lib/utils/children.js +87 -0
  220. package/lib/utils/index.js +163 -4
  221. package/lib/utils/info/index.js +19 -0
  222. package/lib/utils/info/platform/index.js +23 -0
  223. package/lib/utils/info/platform/platform.android.js +8 -0
  224. package/lib/utils/info/platform/platform.ios.js +8 -0
  225. package/lib/utils/info/platform/platform.js +8 -0
  226. package/lib/utils/info/platform/platform.native.js +11 -0
  227. package/lib/utils/info/versions.js +16 -0
  228. package/lib/utils/input.js +54 -34
  229. package/lib/utils/pressability.js +120 -0
  230. package/lib/utils/propTypes.js +269 -108
  231. package/lib/utils/useCopy.js +51 -0
  232. package/lib/utils/useHash.js +48 -0
  233. package/lib/utils/useHash.native.js +15 -0
  234. package/lib/utils/useResponsiveProp.js +59 -0
  235. package/lib/utils/{spacing/useSpacingScale.js → useSpacingScale.js} +45 -12
  236. package/lib/utils/useUniqueId.js +21 -0
  237. package/package.json +11 -8
  238. package/release-context.json +4 -4
  239. package/src/ActivityIndicator/{Spinner.web.jsx → Spinner.jsx} +0 -0
  240. package/src/Box/Box.jsx +13 -4
  241. package/src/Button/Button.jsx +9 -5
  242. package/src/Button/ButtonBase.jsx +74 -86
  243. package/src/Button/ButtonGroup.jsx +24 -41
  244. package/src/Button/ButtonLink.jsx +14 -4
  245. package/src/Button/propTypes.js +12 -2
  246. package/src/Card/Card.jsx +4 -30
  247. package/src/Card/CardBase.jsx +57 -0
  248. package/src/Card/PressableCardBase.jsx +112 -0
  249. package/src/Card/index.js +3 -0
  250. package/src/Checkbox/Checkbox.jsx +274 -0
  251. package/src/Checkbox/CheckboxGroup.jsx +196 -0
  252. package/src/Checkbox/CheckboxInput.jsx +55 -0
  253. package/src/Checkbox/CheckboxInput.native.jsx +6 -0
  254. package/src/Checkbox/index.js +5 -0
  255. package/src/Divider/Divider.jsx +38 -3
  256. package/src/ExpandCollapse/Control.jsx +1 -1
  257. package/src/Feedback/Feedback.jsx +108 -0
  258. package/src/Feedback/index.js +3 -0
  259. package/src/Fieldset/Fieldset.jsx +129 -0
  260. package/src/Fieldset/FieldsetContainer.jsx +22 -0
  261. package/src/Fieldset/FieldsetContainer.native.jsx +16 -0
  262. package/src/Fieldset/Legend.jsx +16 -0
  263. package/src/Fieldset/Legend.native.jsx +22 -0
  264. package/src/Fieldset/cssReset.js +14 -0
  265. package/src/Fieldset/index.js +3 -0
  266. package/src/Icon/Icon.jsx +23 -27
  267. package/src/Icon/IconText.jsx +63 -0
  268. package/src/Icon/index.js +3 -2
  269. package/src/InputLabel/InputLabel.jsx +106 -0
  270. package/src/InputLabel/LabelContent.jsx +13 -0
  271. package/src/InputLabel/LabelContent.native.jsx +6 -0
  272. package/src/InputLabel/index.js +3 -0
  273. package/src/InputSupports/InputSupports.jsx +75 -0
  274. package/src/InputSupports/index.js +3 -0
  275. package/src/InputSupports/propTypes.js +44 -0
  276. package/src/InputSupports/useInputSupports.js +30 -0
  277. package/src/Link/ChevronLink.jsx +28 -7
  278. package/src/Link/InlinePressable.jsx +37 -0
  279. package/src/Link/InlinePressable.native.jsx +73 -0
  280. package/src/Link/Link.jsx +17 -13
  281. package/src/Link/LinkBase.jsx +71 -146
  282. package/src/Link/TextButton.jsx +25 -11
  283. package/src/Link/index.js +2 -1
  284. package/src/List/List.jsx +47 -0
  285. package/src/List/ListItem.jsx +187 -0
  286. package/src/List/index.js +3 -0
  287. package/src/Modal/Modal.jsx +185 -0
  288. package/src/Modal/dictionary.js +9 -0
  289. package/src/Modal/index.js +3 -0
  290. package/src/Notification/Notification.jsx +149 -0
  291. package/src/Notification/dictionary.js +8 -0
  292. package/src/Notification/index.js +3 -0
  293. package/src/Pagination/PageButton.jsx +3 -17
  294. package/src/Pagination/SideButton.jsx +27 -38
  295. package/src/Progress/Progress.jsx +77 -0
  296. package/src/Progress/ProgressBar.jsx +110 -0
  297. package/src/Progress/ProgressBarBackground.jsx +34 -0
  298. package/src/Progress/index.js +6 -0
  299. package/src/Radio/Radio.jsx +233 -0
  300. package/src/Radio/RadioButton.jsx +131 -0
  301. package/src/Radio/RadioGroup.jsx +198 -0
  302. package/src/Radio/RadioInput.jsx +57 -0
  303. package/src/Radio/RadioInput.native.jsx +6 -0
  304. package/src/Radio/index.js +5 -0
  305. package/src/RadioCard/RadioCard.jsx +191 -0
  306. package/src/RadioCard/RadioCardGroup.jsx +211 -0
  307. package/src/RadioCard/index.js +5 -0
  308. package/src/Search/Search.jsx +204 -0
  309. package/src/Search/dictionary.js +12 -0
  310. package/src/Search/index.js +3 -0
  311. package/src/Select/Group.jsx +15 -0
  312. package/src/Select/Group.native.jsx +14 -0
  313. package/src/Select/Item.jsx +11 -0
  314. package/src/Select/Item.native.jsx +10 -0
  315. package/src/Select/Picker.jsx +67 -0
  316. package/src/Select/Picker.native.jsx +95 -0
  317. package/src/Select/Select.jsx +255 -0
  318. package/src/Select/index.js +8 -0
  319. package/src/SideNav/Item.jsx +2 -2
  320. package/src/Skeleton/Skeleton.jsx +98 -0
  321. package/src/Skeleton/index.js +3 -0
  322. package/src/Skeleton/skeleton.constant.js +3 -0
  323. package/src/Skeleton/skeletonWebAnimation.js +13 -0
  324. package/src/Skeleton/useSkeletonNativeAnimation.js +27 -0
  325. package/src/Spacer/Spacer.jsx +91 -0
  326. package/src/Spacer/index.js +3 -0
  327. package/src/StackView/StackView.jsx +111 -0
  328. package/src/StackView/StackWrap.jsx +41 -0
  329. package/src/StackView/StackWrap.native.jsx +4 -0
  330. package/src/StackView/StackWrapBox.jsx +94 -0
  331. package/src/StackView/StackWrapGap.jsx +49 -0
  332. package/src/StackView/common.jsx +28 -0
  333. package/src/StackView/getStackedContent.jsx +112 -0
  334. package/src/StackView/index.js +6 -0
  335. package/src/StepTracker/Step.jsx +202 -0
  336. package/src/StepTracker/StepTracker.jsx +163 -0
  337. package/src/StepTracker/dictionary.js +10 -0
  338. package/src/StepTracker/index.js +3 -0
  339. package/src/Tabs/HorizontalScroll.jsx +165 -0
  340. package/src/Tabs/ScrollViewEnd.jsx +53 -0
  341. package/src/Tabs/ScrollViewEnd.native.jsx +24 -0
  342. package/src/Tabs/Tabs.jsx +89 -0
  343. package/src/Tabs/TabsItem.jsx +204 -0
  344. package/src/Tabs/TabsScrollButton.jsx +100 -0
  345. package/src/Tabs/dictionary.js +11 -0
  346. package/src/Tabs/index.js +3 -0
  347. package/src/Tabs/itemPositions.js +101 -0
  348. package/src/Tags/Tags.jsx +207 -0
  349. package/src/Tags/index.js +3 -0
  350. package/src/TextInput/TextArea.jsx +78 -0
  351. package/src/TextInput/TextInput.jsx +52 -0
  352. package/src/TextInput/TextInputBase.jsx +210 -0
  353. package/src/TextInput/index.js +4 -0
  354. package/src/TextInput/propTypes.js +29 -0
  355. package/src/ThemeProvider/useThemeTokens.js +56 -5
  356. package/src/ThemeProvider/utils/styles.js +18 -5
  357. package/src/ThemeProvider/utils/theme-tokens.js +46 -5
  358. package/src/ToggleSwitch/ToggleSwitch.jsx +3 -4
  359. package/src/Tooltip/Backdrop.jsx +60 -0
  360. package/src/Tooltip/Backdrop.native.jsx +33 -0
  361. package/src/Tooltip/Tooltip.jsx +294 -0
  362. package/src/Tooltip/dictionary.js +8 -0
  363. package/src/Tooltip/getTooltipPosition.js +161 -0
  364. package/src/Tooltip/index.js +3 -0
  365. package/src/TooltipButton/TooltipButton.jsx +49 -0
  366. package/src/TooltipButton/index.js +3 -0
  367. package/src/Typography/Typography.jsx +10 -24
  368. package/src/ViewportProvider/ViewportProvider.jsx +21 -0
  369. package/src/ViewportProvider/index.jsx +2 -41
  370. package/src/ViewportProvider/useViewport.js +5 -0
  371. package/src/ViewportProvider/useViewportListener.js +43 -0
  372. package/src/index.js +34 -2
  373. package/src/utils/a11y/index.js +1 -0
  374. package/src/utils/a11y/textSize.js +30 -0
  375. package/src/utils/children.jsx +66 -0
  376. package/src/utils/index.js +11 -1
  377. package/src/utils/info/index.js +8 -0
  378. package/src/utils/info/platform/index.js +11 -0
  379. package/src/utils/info/platform/platform.android.js +1 -0
  380. package/src/utils/info/platform/platform.ios.js +1 -0
  381. package/src/utils/info/platform/platform.js +1 -0
  382. package/src/utils/info/platform/platform.native.js +4 -0
  383. package/src/utils/info/versions.js +6 -0
  384. package/src/utils/input.js +22 -13
  385. package/src/utils/pressability.js +96 -0
  386. package/src/utils/propTypes.js +195 -47
  387. package/src/utils/useCopy.js +39 -0
  388. package/src/utils/useHash.js +34 -0
  389. package/src/utils/useHash.native.js +6 -0
  390. package/src/utils/useResponsiveProp.js +50 -0
  391. package/src/utils/{spacing/useSpacingScale.js → useSpacingScale.js} +25 -10
  392. package/src/utils/useUniqueId.js +14 -0
  393. package/stories/A11yText/A11yText.stories.jsx +15 -13
  394. package/stories/ActivityIndicator/ActivityIndicator.stories.jsx +11 -2
  395. package/stories/Box/Box.stories.jsx +29 -2
  396. package/stories/Button/Button.stories.jsx +21 -20
  397. package/stories/Button/ButtonGroup.stories.jsx +2 -1
  398. package/stories/Button/ButtonLink.stories.jsx +6 -4
  399. package/stories/Card/Card.stories.jsx +13 -1
  400. package/stories/Checkbox/Checkbox.stories.jsx +94 -0
  401. package/stories/Divider/Divider.stories.jsx +26 -2
  402. package/stories/ExpandCollapse/ExpandCollapse.stories.jsx +74 -79
  403. package/stories/Feedback/Feedback.stories.jsx +96 -0
  404. package/stories/FlexGrid/01 FlexGrid.stories.jsx +20 -7
  405. package/stories/Icon/Icon.stories.jsx +15 -6
  406. package/stories/InputLabel/InputLabel.stories.jsx +42 -0
  407. package/stories/Link/ChevronLink.stories.jsx +20 -4
  408. package/stories/Link/Link.stories.jsx +39 -3
  409. package/stories/Link/TextButton.stories.jsx +24 -2
  410. package/stories/List/List.stories.jsx +117 -0
  411. package/stories/Modal/Modal.stories.jsx +29 -0
  412. package/stories/Notification/Notification.stories.jsx +82 -0
  413. package/stories/Pagination/Pagination.stories.jsx +28 -14
  414. package/stories/Progress/Progress.stories.jsx +93 -0
  415. package/stories/Radio/Radio.stories.jsx +100 -0
  416. package/stories/RadioCard/RadioCard.stories.jsx +98 -0
  417. package/stories/Search/Search.stories.jsx +16 -0
  418. package/stories/Select/Select.stories.jsx +55 -0
  419. package/stories/SideNav/SideNav.stories.jsx +17 -2
  420. package/stories/Skeleton/Skeleton.stories.jsx +36 -0
  421. package/stories/Spacer/Spacer.stories.jsx +38 -0
  422. package/stories/StackView/StackView.stories.jsx +75 -0
  423. package/stories/StackView/StackWrap.stories.jsx +64 -0
  424. package/stories/StepTracker/StepTracker.stories.jsx +71 -0
  425. package/stories/Tabs/Tabs.stories.jsx +97 -0
  426. package/stories/Tags/Tags.stories.jsx +69 -0
  427. package/stories/TextInput/TextArea.stories.jsx +100 -0
  428. package/stories/TextInput/TextInput.stories.jsx +103 -0
  429. package/stories/ToggleSwitch/ToggleSwitch.stories.jsx +16 -3
  430. package/stories/Tooltip/Tooltip.stories.jsx +81 -0
  431. package/stories/TooltipButton/TooltipButton.stories.jsx +11 -0
  432. package/stories/Typography/Typography.stories.jsx +12 -3
  433. package/stories/{platform-supports.web.jsx → platform-supports.jsx} +1 -1
  434. package/stories/supports.jsx +110 -14
  435. package/__fixtures__/accessible.icon.svg +0 -6
  436. package/babel.config.json +0 -8
  437. package/lib/ActivityIndicator/Spinner.web.js +0 -55
  438. package/lib/Pagination/useCopy.js +0 -10
  439. package/lib/config/svgr-icons-web.js +0 -9
  440. package/lib/config/svgr-icons.js +0 -52
  441. package/lib/utils/spacing/index.js +0 -2
  442. package/lib/utils/spacing/utils.js +0 -32
  443. package/src/Pagination/useCopy.js +0 -7
  444. package/src/config/svgr-icons-web.js +0 -11
  445. package/src/config/svgr-icons.js +0 -46
  446. package/src/utils/spacing/index.js +0 -3
  447. package/src/utils/spacing/utils.js +0 -28
@@ -1,22 +1,20 @@
1
- const {
2
- buttonAppearances,
3
- linkAppearances,
4
- sideNavItemAppearances,
5
- toggleSwitchAppearances
6
- } = require('@telus-uds/tools-theme')
7
- const { appearances: systemAppearances } = require('@telus-uds/system-constants')
1
+ import { appearances } from '@telus-uds/system-themes/schema'
8
2
 
9
3
  // This is a dev-only file so we don't need to make @telus-uds/palette-allium a dependency.
10
- // eslint-disable-next-line import/no-extraneous-dependencies
11
- const chevronLeft = require('@telus-uds/palette-allium/build/rn/icons/chevron-left.icon.svg')
12
- .default
13
- // eslint-disable-next-line import/no-extraneous-dependencies
14
- const chevronRight = require('@telus-uds/palette-allium/build/rn/icons/chevron-right.icon.svg')
15
- .default
4
+ /* eslint-disable-next-line import/no-extraneous-dependencies */
5
+ import {
6
+ ChevronLeft,
7
+ ChevronRight,
8
+ Checkmark,
9
+ Close,
10
+ Question,
11
+ SearchBold,
12
+ Times
13
+ } from '@telus-uds/palette-allium/build/rn/icons'
16
14
 
17
15
  const transparent = 'rgba(0, 0, 0, 0)'
18
16
 
19
- module.exports = {
17
+ export default {
20
18
  metadata: {
21
19
  name: 'test'
22
20
  },
@@ -112,7 +110,9 @@ module.exports = {
112
110
  values: [true],
113
111
  type: 'variant'
114
112
  },
115
- ...buttonAppearances
113
+ focus: appearances.Button.focus,
114
+ hover: appearances.Button.hover,
115
+ pressed: appearances.Button.pressed
116
116
  },
117
117
  tokens: {
118
118
  borderColor: '#0e6ac8',
@@ -123,12 +123,12 @@ module.exports = {
123
123
  outerBorderColor: transparent,
124
124
  outerBorderWidth: 4,
125
125
  outerBorderGap: 2,
126
- outerBorderRadius: 2,
127
126
 
128
127
  fontSize: 16,
129
128
  color: '#0e6ac8',
130
129
  lineHeight: 1.5,
131
130
  fontWeight: '600',
131
+ alignSelf: 'flex-start',
132
132
 
133
133
  backgroundColor: '#ffffff',
134
134
  opacity: 1,
@@ -137,12 +137,7 @@ module.exports = {
137
137
  paddingTop: 8,
138
138
  paddingBottom: 8,
139
139
 
140
- width: null,
141
-
142
- marginLeft: 0,
143
- marginRight: 0,
144
- marginTop: 0,
145
- marginBottom: 0
140
+ width: null
146
141
  },
147
142
  rules: [
148
143
  {
@@ -228,8 +223,7 @@ module.exports = {
228
223
  {
229
224
  if: { rounded: true },
230
225
  tokens: {
231
- borderRadius: 48,
232
- outerBorderRadius: 16
226
+ borderRadius: 48
233
227
  }
234
228
  },
235
229
  {
@@ -247,8 +241,7 @@ module.exports = {
247
241
  {
248
242
  if: { rounded: true, pressed: true },
249
243
  tokens: {
250
- borderRadius: 0,
251
- outerBorderRadius: 0
244
+ borderRadius: 0
252
245
  }
253
246
  },
254
247
  {
@@ -293,10 +286,72 @@ module.exports = {
293
286
  },
294
287
  ButtonGroup: {
295
288
  tokens: {
296
- gap: 8,
297
- direction: 'row'
289
+ space: 2,
290
+ direction: 'row',
291
+ alignItems: 'flex-start',
292
+ justifyContent: 'flex-start',
293
+ flexGrow: 1
298
294
  }
299
295
  },
296
+ ButtonGroupItem: {
297
+ appearances: {
298
+ focus: appearances.ButtonGroupItem.focus,
299
+ hover: appearances.ButtonGroupItem.hover,
300
+ pressed: appearances.ButtonGroupItem.pressed,
301
+ selected: appearances.ButtonGroupItem.selected
302
+ },
303
+ tokens: {
304
+ borderColor: '#0e6ac8',
305
+ borderWidth: 2,
306
+ borderRadius: 0,
307
+ shadow: null,
308
+
309
+ outerBorderColor: transparent,
310
+ outerBorderWidth: 4,
311
+ outerBorderGap: 2,
312
+
313
+ fontSize: 16,
314
+ color: '#0e6ac8',
315
+ lineHeight: 1.5,
316
+ fontWeight: '600',
317
+ alignSelf: 'flex-start',
318
+
319
+ backgroundColor: '#ffffff',
320
+ opacity: 1,
321
+ paddingLeft: 24,
322
+ paddingRight: 24,
323
+ paddingTop: 8,
324
+ paddingBottom: 8,
325
+
326
+ width: null
327
+ },
328
+ rules: [
329
+ {
330
+ if: { focus: true },
331
+ tokens: {
332
+ borderWidth: 4,
333
+ outerBorderColor: '#0e6ac8',
334
+ opacity: 0.5
335
+ }
336
+ },
337
+ {
338
+ if: { hover: true },
339
+ tokens: {
340
+ borderWidth: 6
341
+ }
342
+ },
343
+ {
344
+ if: { pressed: true },
345
+ tokens: {
346
+ borderWidth: 8
347
+ }
348
+ },
349
+ {
350
+ if: { selected: true },
351
+ tokens: { backgroundColor: '#0e6ac8', color: '#ffffff', opacity: 1 }
352
+ }
353
+ ]
354
+ },
300
355
  Card: {
301
356
  appearances: {
302
357
  background: {
@@ -307,9 +362,10 @@ module.exports = {
307
362
  values: ['narrow', 'intermediate', 'compact', 'custom'],
308
363
  type: 'variant'
309
364
  },
310
- viewport: systemAppearances.viewport
365
+ viewport: appearances.system.viewport
311
366
  },
312
367
  tokens: {
368
+ flex: 1,
313
369
  backgroundColor: '#ffffff',
314
370
  borderColor: '#666666',
315
371
  borderRadius: 6,
@@ -391,6 +447,85 @@ module.exports = {
391
447
  }
392
448
  ]
393
449
  },
450
+ Checkbox: {
451
+ appearances: {
452
+ error: appearances.Checkbox.error,
453
+ focus: appearances.Checkbox.focus,
454
+ inactive: appearances.Checkbox.inactive
455
+ },
456
+ tokens: {
457
+ containerBackgroundColor: transparent,
458
+ feedbackMarginBottom: 0,
459
+ feedbackMarginTop: 2,
460
+ feedbackPosition: 'bottom',
461
+ icon: Checkmark,
462
+ iconBackgroundColor: '#7c53a5',
463
+ iconColor: '#ffffff',
464
+ iconSize: 18,
465
+ inputBackgroundColor: '#ffffff',
466
+ inputBorderColor: '#676e73',
467
+ inputBorderRadius: 4,
468
+ inputBorderWidth: 1,
469
+ inputHeight: 20,
470
+ inputOutlineColor: null,
471
+ inputOutlineWidth: 0,
472
+ inputShadow: {
473
+ color: '#00000044',
474
+ offsetY: 1,
475
+ offsetX: 1,
476
+ spread: 0,
477
+ blur: 1,
478
+ inset: false
479
+ },
480
+ inputWidth: 20,
481
+ labelColor: '#414547',
482
+ labelFontSize: 18,
483
+ labelFontWeight: '500',
484
+ labelLineHeight: 1.5,
485
+ labelMarginLeft: 8
486
+ },
487
+ rules: [
488
+ {
489
+ if: { error: true },
490
+ tokens: {
491
+ inputBorderColor: '#e12339'
492
+ }
493
+ },
494
+ {
495
+ if: { focus: true },
496
+ tokens: {
497
+ inputBorderColor: '#7c53a5',
498
+ inputBorderWidth: 3
499
+ }
500
+ },
501
+ {
502
+ if: { inactive: true },
503
+ tokens: {
504
+ inputBorderColor: 'transparent',
505
+ inputBackgroundColor: '#e3e6e8',
506
+ iconBackgroundColor: '#e3e6e8',
507
+ iconColor: 'rgba(103, 110, 115, 1)',
508
+ labelColor: '#676e73'
509
+ }
510
+ }
511
+ ]
512
+ },
513
+ ChevronLink: {
514
+ appearances: {},
515
+ tokens: {
516
+ leftIcon: ChevronLeft,
517
+ rightIcon: ChevronRight,
518
+ iconDisplace: 4
519
+ }
520
+ },
521
+ CheckboxGroup: {
522
+ appearances: {},
523
+ tokens: {
524
+ fieldSpace: 2,
525
+ space: 2
526
+ },
527
+ rules: []
528
+ },
394
529
  Divider: {
395
530
  appearances: {
396
531
  weight: {
@@ -466,6 +601,348 @@ module.exports = {
466
601
  }
467
602
  ]
468
603
  },
604
+ Progress: {
605
+ appearances: {
606
+ size: { values: ['mini'], type: 'variant' }
607
+ },
608
+ tokens: {
609
+ backgroundColor: '#ffffff',
610
+ borderWidth: 1,
611
+ borderColor: '#f4f4f7',
612
+ borderRadius: 12,
613
+ height: 16
614
+ },
615
+ rules: [{ if: { size: 'mini' }, tokens: { height: 8 } }]
616
+ },
617
+ ProgressBar: {
618
+ appearances: {
619
+ inactive: appearances.ProgressBar.inactive,
620
+ negative: { values: [true], type: 'variant' }
621
+ },
622
+ tokens: {
623
+ backgroundColor: '#08804b',
624
+ borderRadius: 12,
625
+ outlineWidth: 1,
626
+ outlineColor: '#2b8000'
627
+ },
628
+ rules: [
629
+ {
630
+ if: { inactive: true },
631
+ tokens: {
632
+ backgroundColor: '#b2b9bf',
633
+ outlineColor: '#f4f4f7'
634
+ }
635
+ },
636
+ {
637
+ if: { negative: true },
638
+ tokens: {
639
+ backgroundColor: '#c12335',
640
+ outlineColor: '#c12335'
641
+ }
642
+ }
643
+ ]
644
+ },
645
+ RadioCardGroup: {
646
+ appearances: {
647
+ viewport: appearances.system.viewport
648
+ },
649
+ tokens: {
650
+ direction: 'column',
651
+ fieldSpace: 2,
652
+ space: 2
653
+ },
654
+ rules: [
655
+ {
656
+ if: {
657
+ viewport: ['lg', 'xl']
658
+ },
659
+ tokens: {
660
+ direction: 'row'
661
+ }
662
+ }
663
+ ]
664
+ },
665
+ RadioGroup: {
666
+ appearances: {},
667
+ tokens: {
668
+ fieldSpace: 2,
669
+ space: 2
670
+ },
671
+ rules: []
672
+ },
673
+ Modal: {
674
+ appearances: {},
675
+ tokens: {
676
+ backdropColor: 'rgba(0,0,0,0.5)',
677
+ backdropOpacity: 1,
678
+ maxWidth: 600,
679
+ containerPaddingLeft: 16,
680
+ containerPaddingRight: 16,
681
+ containerPaddingTop: 16,
682
+ containerPaddingBottom: 16,
683
+ backgroundColor: '#fff',
684
+ borderRadius: 4,
685
+ paddingLeft: 24,
686
+ paddingRight: 24,
687
+ paddingTop: 24,
688
+ paddingBottom: 24,
689
+
690
+ closeIcon: Close,
691
+ closeIconSize: 24,
692
+ closeIconColor: '#000'
693
+ },
694
+ rules: []
695
+ },
696
+ Search: {
697
+ appearances: {
698
+ focus: appearances.Search.focus,
699
+ hover: appearances.Search.hover,
700
+ inactive: appearances.Search.inactive
701
+ },
702
+ tokens: {
703
+ borderRadius: 32,
704
+ borderWidth: 1,
705
+ borderColor: '#00000044',
706
+ paddingTop: 6,
707
+ paddingBottom: 6,
708
+ paddingLeft: 16,
709
+ paddingRight: 6,
710
+ outerBorderWidth: 1,
711
+ outerBorderColor: transparent,
712
+ outerBorderRadius: 32,
713
+ buttonsGap: 2,
714
+ clearButtonIcon: Times,
715
+ submitButtonIcon: SearchBold
716
+ },
717
+ rules: [
718
+ {
719
+ if: { focus: true },
720
+ tokens: {
721
+ outerBorderColor: '#debc06'
722
+ }
723
+ },
724
+ {
725
+ if: { hover: true },
726
+ tokens: {
727
+ outerBorderColor: '#6666cc'
728
+ }
729
+ }
730
+ ]
731
+ },
732
+ SearchButton: {
733
+ appearances: {},
734
+ tokens: {},
735
+ rules: []
736
+ },
737
+ Notification: {
738
+ appearances: {},
739
+ tokens: {
740
+ dismissIcon: Close
741
+ },
742
+ rules: []
743
+ },
744
+ RadioCard: {
745
+ appearances: {
746
+ checked: appearances.Radio.checked,
747
+ error: appearances.Radio.error,
748
+ focus: appearances.Radio.focus,
749
+ hover: appearances.Radio.hover,
750
+ inactive: appearances.Radio.inactive
751
+ },
752
+ tokens: {
753
+ // Taken from Allium theme snapshot
754
+ flex: 1,
755
+ backgroundColor: '#ffffff',
756
+ borderColor: '#b2b9bf',
757
+ borderRadius: 6,
758
+ borderWidth: 1,
759
+ color: '#2c2e30',
760
+ contentSpace: 2,
761
+ fontSize: 20,
762
+ fontWeight: '500',
763
+ letterSpacing: 0,
764
+ lineHeight: 1.4,
765
+ outerBorderColor: transparent,
766
+ outerBorderGap: 0,
767
+ outerBorderWidth: 0,
768
+ paddingBottom: 16,
769
+ paddingLeft: 10,
770
+ paddingRight: 16,
771
+ paddingTop: 16,
772
+ radioCheckedBackgroundColor: '#7c53a5',
773
+ radioCheckedSize: 12,
774
+ radioInputBackgroundColor: '#ffffff',
775
+ radioInputBorderColor: '#676e73',
776
+ radioInputBorderWidth: 1,
777
+ radioInputOutlineColor: transparent,
778
+ radioInputOutlineWidth: 0,
779
+ radioInputSize: 20,
780
+ radioOuterBorderColor: transparent,
781
+ radioOuterBorderGap: 0,
782
+ radioOuterBorderWidth: 0,
783
+ radioSpace: 2,
784
+ minWidth: 288,
785
+ shadow: null,
786
+ textTransform: 'none'
787
+ },
788
+ rules: [
789
+ {
790
+ if: {
791
+ viewport: ['lg', 'xl']
792
+ },
793
+ tokens: {
794
+ fontSize: 24,
795
+ lineHeight: 1.33333333333,
796
+ paddingBottom: 24,
797
+ paddingLeft: 16,
798
+ paddingRight: 24,
799
+ paddingTop: 16
800
+ }
801
+ },
802
+ {
803
+ if: {
804
+ hover: true
805
+ },
806
+ tokens: {
807
+ borderColor: '#676e73',
808
+ outerBorderColor: '#e3e6e8',
809
+ outerBorderWidth: 2,
810
+ radioOuterBorderColor: '#e3e6e8',
811
+ radioOuterBorderWidth: 2
812
+ }
813
+ },
814
+ {
815
+ description: 'Pressed state matches hover state plus light grey background',
816
+ if: {
817
+ pressed: true
818
+ },
819
+ tokens: {
820
+ backgroundColor: '#f4f4f7',
821
+ borderColor: '#676e73',
822
+ outerBorderColor: '#e3e6e8',
823
+ outerBorderWidth: 2
824
+ }
825
+ },
826
+ {
827
+ if: {
828
+ focus: true
829
+ },
830
+ tokens: {
831
+ radioIputBorderColor: '#7c53a5',
832
+ radioInputBorderWidth: 3,
833
+ outerBorderColor: '#676e73',
834
+ outerBorderGap: 2,
835
+ outerBorderWidth: 2
836
+ }
837
+ },
838
+ {
839
+ if: {
840
+ inactive: true
841
+ },
842
+ tokens: {
843
+ backgroundColor: '#f4f4f7',
844
+ borderColor: 'transparent',
845
+ radioInputBackgroundColor: '#e3e6e8',
846
+ radioInputBorderColor: 'rgba(0, 0, 0, 0)',
847
+ labelColor: '#676e73'
848
+ }
849
+ },
850
+ {
851
+ if: {
852
+ error: true
853
+ },
854
+ tokens: {
855
+ borderColor: '#e12339',
856
+ color: '#e12339',
857
+ radioInputBorderColor: '#e12339'
858
+ }
859
+ }
860
+ ]
861
+ },
862
+ Tabs: {
863
+ appearances: {},
864
+ tokens: {
865
+ buttonClearance: 20,
866
+ gutter: 12,
867
+ nextIcon: ChevronRight,
868
+ previousIcon: ChevronLeft,
869
+ borderBottomWidth: 1,
870
+ borderBottomColor: '#ebefed',
871
+ space: 1
872
+ },
873
+ rules: []
874
+ },
875
+ TabsItem: {
876
+ appearances: {},
877
+ tokens: {
878
+ backgroundColor: transparent,
879
+ borderColor: transparent,
880
+ borderRadius: 0,
881
+ borderWidth: 0,
882
+ color: '#034045',
883
+ fontName: '',
884
+ fontScaleCap: 66,
885
+ fontSize: 14,
886
+ fontWeight: '700',
887
+ highlightBarBorderRadius: 0,
888
+ highlightBarBorderWidth: 0,
889
+ highlightBarHeight: 0,
890
+ highlightColor: transparent,
891
+ highlightTriangleSize: 0,
892
+ letterSpacing: 0,
893
+ lineHeight: 1,
894
+ maxWidth: 150,
895
+ paddingHorizontal: 16,
896
+ paddingVertical: 16,
897
+ space: 0,
898
+ textAlign: 'left',
899
+ textTransform: 'uppercase'
900
+ },
901
+ rules: [
902
+ {
903
+ if: { hover: true },
904
+ tokens: {
905
+ highlightBarHeight: 2,
906
+ highlightColor: '#81a0a2'
907
+ }
908
+ },
909
+ {
910
+ if: { focus: true },
911
+ tokens: {
912
+ borderColor: '#81a0a2',
913
+ borderWidth: 1
914
+ }
915
+ },
916
+ {
917
+ if: { pressed: true },
918
+ tokens: {
919
+ backgroundColor: '#ebefed'
920
+ }
921
+ },
922
+ {
923
+ if: { selected: true },
924
+ tokens: {
925
+ highlightBarHeight: 2,
926
+ highlightColor: '#034045',
927
+ highlightTriangleSize: 8
928
+ }
929
+ }
930
+ ]
931
+ },
932
+ TabsScrollButton: {
933
+ appearances: {},
934
+ tokens: {
935
+ backgroundColor: '#ffffff',
936
+ borderColor: '#81a0a2',
937
+ borderRadius: 12,
938
+ borderWidth: 1,
939
+ iconColor: '#81a0a2',
940
+ iconSize: 24,
941
+ padding: 0,
942
+ shadow: null
943
+ },
944
+ rules: []
945
+ },
469
946
  Typography: {
470
947
  appearances: {
471
948
  weight: {
@@ -497,15 +974,13 @@ module.exports = {
497
974
  values: [true],
498
975
  type: 'variant'
499
976
  },
500
- viewport: systemAppearances.viewport
977
+ viewport: appearances.system.viewport
501
978
  },
502
979
  tokens: {
503
980
  fontWeight: '400',
504
981
  fontSize: 16,
505
982
  color: '#2c2e30',
506
983
  lineHeight: 1.5,
507
- marginTop: 8,
508
- marginBottom: 8,
509
984
  fontScaleCap: 64
510
985
  },
511
986
  rules: [
@@ -730,8 +1205,7 @@ module.exports = {
730
1205
  values: [true],
731
1206
  type: 'state'
732
1207
  },
733
- iconPosition: linkAppearances.iconPosition,
734
- component: linkAppearances.component
1208
+ iconPosition: appearances.Link.iconPosition
735
1209
  },
736
1210
  tokens: {
737
1211
  color: '#0000ff',
@@ -739,8 +1213,6 @@ module.exports = {
739
1213
  blockFontWeight: '400',
740
1214
  blockFontSize: 16,
741
1215
  blockLineHeight: 1.5,
742
- blockMarginTop: 8,
743
- blockMarginBottom: 8,
744
1216
 
745
1217
  outerBorderColor: transparent,
746
1218
  outerBorderOutline: 'none',
@@ -751,9 +1223,7 @@ module.exports = {
751
1223
  textLineStyle: 'solid',
752
1224
 
753
1225
  iconSize: 18,
754
- iconGapBefore: 4,
755
- iconGapAfter: 4,
756
- iconScale: 1
1226
+ iconSpace: 1
757
1227
  },
758
1228
  rules: [
759
1229
  {
@@ -775,14 +1245,6 @@ module.exports = {
775
1245
  color: '#ff0000',
776
1246
  textLine: 'none'
777
1247
  }
778
- },
779
- {
780
- if: { component: 'ChevronLink', iconPosition: 'left' },
781
- tokens: { icon: chevronLeft }
782
- },
783
- {
784
- if: { component: 'ChevronLink', iconPosition: 'right' },
785
- tokens: { icon: chevronRight }
786
1248
  }
787
1249
  ]
788
1250
  },
@@ -832,10 +1294,73 @@ module.exports = {
832
1294
  }
833
1295
  ]
834
1296
  },
1297
+ Radio: {
1298
+ appearances: {
1299
+ checked: appearances.Radio.checked,
1300
+ error: appearances.Radio.error,
1301
+ focus: appearances.Radio.focus,
1302
+ hover: appearances.Radio.hover,
1303
+ inactive: appearances.Radio.inactive
1304
+ },
1305
+ tokens: {
1306
+ checkedBackgroundColor: '#7c53a5',
1307
+ checkedSize: 12,
1308
+ containerBackgroundColor: '#ffffff',
1309
+ containerBorderRadius: 12,
1310
+ containerOpacity: 1,
1311
+ containerPaddingBottom: 12,
1312
+ containerPaddingLeft: 18,
1313
+ containerPaddingRight: 18,
1314
+ containerPaddingTop: 12,
1315
+ containerShadow: null,
1316
+ descriptionFontSize: 14,
1317
+ descriptionLineHeight: 1.4,
1318
+ descriptionMarginLeft: null,
1319
+ inputBackgroundColor: '#ffffff',
1320
+ inputBorderColor: '#676e73',
1321
+ inputBorderWidth: 1,
1322
+ inputOutlineColor: null,
1323
+ inputOutlineWidth: 0,
1324
+ inputSize: 20,
1325
+ inputShadow: null,
1326
+ outerBorderWidth: 0,
1327
+ outerBorderColor: transparent,
1328
+ outerBorderGap: 0,
1329
+ labelColor: '#414547',
1330
+ labelFontName: '',
1331
+ labelFontSize: 18,
1332
+ labelFontWeight: '500',
1333
+ labelLineHeight: 1.5,
1334
+ labelMarginLeft: 8
1335
+ },
1336
+ rules: [
1337
+ {
1338
+ if: { error: true },
1339
+ tokens: {
1340
+ inputBorderColor: '#e12339'
1341
+ }
1342
+ },
1343
+ {
1344
+ if: { focus: true },
1345
+ tokens: {
1346
+ inputBorderColor: '#7c53a5',
1347
+ inputBorderWidth: 3
1348
+ }
1349
+ },
1350
+ {
1351
+ if: { inactive: true },
1352
+ tokens: {
1353
+ inputBorderColor: 'transparent',
1354
+ inputBackgroundColor: '#e3e6e8',
1355
+ labelColor: '#676e73'
1356
+ }
1357
+ }
1358
+ ]
1359
+ },
835
1360
  SideNav: {},
836
1361
  SideNavItem: {
837
1362
  appearances: {
838
- ...sideNavItemAppearances
1363
+ type: appearances.SideNavItem.type
839
1364
  },
840
1365
  rules: [
841
1366
  {
@@ -849,19 +1374,77 @@ module.exports = {
849
1374
  ]
850
1375
  },
851
1376
  SideNavItemsGroup: {},
1377
+ StackView: {
1378
+ tokens: {}
1379
+ },
1380
+ StepTracker: {
1381
+ appearances: {},
1382
+ tokens: {
1383
+ completedIcon: null,
1384
+ completedIconColor: '#ffffff',
1385
+ completedIconSize: 12,
1386
+ connectorColor: '#676e73',
1387
+ connectorHeight: 1,
1388
+ connectorMinWidth: 16,
1389
+ connectorCompletedHeight: 3,
1390
+ connectorCompletedColor: '#7c53a5',
1391
+ containerPaddingBottom: 0,
1392
+ containerPaddingLeft: 0,
1393
+ containerPaddingRight: 0,
1394
+ containerPaddingTop: 0,
1395
+ knobBackgroundColor: transparent,
1396
+ knobBorderWidth: 1,
1397
+ knobBorderColor: '#676e73',
1398
+ knobCompletedBackgroundColor: '#7c53a5',
1399
+ knobCompletedBorderColor: '#7c53a5',
1400
+ knobCompletedPaddingLeft: 1,
1401
+ knobCompletedPaddingTop: 1,
1402
+ knobCurrentBackgroundColor: transparent,
1403
+ knobCurrentBorderColor: '#7c53a5',
1404
+ knobCurrentBorderWidth: 2,
1405
+ knobCurrentInnerColor: '#7c53a5',
1406
+ knobCurrentInnerSize: 8,
1407
+ knobCurrentPaddingLeft: 2,
1408
+ knobCurrentPaddingTop: 2,
1409
+ knobSize: 16,
1410
+ labelColor: '#676e73',
1411
+ labelCurrentColor: '#7c53a5',
1412
+ labelCurrentFontWeight: '600',
1413
+ labelDirection: 'column',
1414
+ labelFontSize: 16,
1415
+ labelFontWeight: '400',
1416
+ labelFontName: '',
1417
+ labelGap: 0,
1418
+ labelLineHeight: 1.5,
1419
+ labelMarginTop: 8,
1420
+ labelPaddingLeft: 16,
1421
+ labelPaddingRight: 16,
1422
+ showStepLabel: false,
1423
+ showStepName: true,
1424
+ showStepTrackerLabel: true
1425
+ },
1426
+ rules: [
1427
+ {
1428
+ if: { viewport: ['lg', 'xl'] },
1429
+ tokens: {
1430
+ showStepLabel: true,
1431
+ showStepTrackerLabel: false
1432
+ }
1433
+ }
1434
+ ]
1435
+ },
852
1436
  ToggleSwitch: {
853
1437
  appearances: {
854
- focus: toggleSwitchAppearances.focus,
855
- hover: toggleSwitchAppearances.hover,
856
- pressed: toggleSwitchAppearances.pressed,
857
- inactive: toggleSwitchAppearances.inactive,
858
- selected: toggleSwitchAppearances.selected
1438
+ focus: appearances.ToggleSwitch.focus,
1439
+ hover: appearances.ToggleSwitch.hover,
1440
+ pressed: appearances.ToggleSwitch.pressed,
1441
+ inactive: appearances.ToggleSwitch.inactive,
1442
+ selected: appearances.ToggleSwitch.selected
859
1443
  },
860
1444
  tokens: {
861
1445
  outerBorderColor: '#000000',
862
1446
  outerBorderWidth: 2,
863
1447
  outerBorderGap: 2,
864
- outerBorderRadius: 8,
865
1448
  outerBackgroundColor: '#333333',
866
1449
  borderColor: '#666666',
867
1450
  borderWidth: 2,
@@ -872,6 +1455,7 @@ module.exports = {
872
1455
  paddingRight: 2,
873
1456
  paddingTop: 2,
874
1457
  paddingBottom: 2,
1458
+ alignSelf: 'flex-start',
875
1459
 
876
1460
  trackBorderWidth: 2,
877
1461
  trackBorderColor: '#bbbbbb',
@@ -923,6 +1507,308 @@ module.exports = {
923
1507
  tokens: { opacity: 0.4 }
924
1508
  }
925
1509
  ]
1510
+ },
1511
+ TextInput: {
1512
+ appearances: {
1513
+ validation: appearances.TextInput.validation,
1514
+ focus: appearances.TextInput.focus,
1515
+ hover: appearances.TextInput.hover,
1516
+ inactive: appearances.TextInput.inactive
1517
+ },
1518
+ tokens: {
1519
+ borderRadius: 4,
1520
+ borderWidth: 1,
1521
+ borderColor: '#00000044',
1522
+ paddingTop: 6,
1523
+ paddingBottom: 6,
1524
+ paddingLeft: 6,
1525
+ paddingRight: 6,
1526
+ outerBorderWidth: 1,
1527
+ outerBorderColor: transparent
1528
+ },
1529
+ rules: [
1530
+ {
1531
+ if: { validation: 'success' },
1532
+ tokens: {
1533
+ outerBorderColor: '#99ff99'
1534
+ }
1535
+ },
1536
+ {
1537
+ if: { validation: 'error' },
1538
+ tokens: {
1539
+ outerBorderColor: '#990000'
1540
+ }
1541
+ },
1542
+ {
1543
+ if: { focus: true },
1544
+ tokens: {
1545
+ outerBorderColor: '#debc06'
1546
+ }
1547
+ },
1548
+ {
1549
+ if: { hover: true },
1550
+ tokens: {
1551
+ outerBorderColor: '#6666cc'
1552
+ }
1553
+ },
1554
+ {
1555
+ if: { inactive: true },
1556
+ tokens: {
1557
+ outerBorderColor: transparent,
1558
+ backgroundColor: '#00000044'
1559
+ }
1560
+ }
1561
+ ]
1562
+ },
1563
+ InputLabel: {
1564
+ tokens: {
1565
+ gap: 20,
1566
+ hintFontSize: 12
1567
+ }
1568
+ },
1569
+ Feedback: {
1570
+ appearances: {
1571
+ validation: appearances.Feedback.validation
1572
+ },
1573
+ tokens: {
1574
+ borderColor: '#eee',
1575
+ borderWidth: 1,
1576
+ borderRadius: 3,
1577
+ titleFontSize: 16,
1578
+ contentFontSize: 14,
1579
+ paddingTop: 12,
1580
+ paddingBottom: 12,
1581
+ paddingLeft: 12,
1582
+ paddingRight: 12
1583
+ },
1584
+ rules: [
1585
+ { if: { validation: 'success' }, tokens: { color: 'green' } },
1586
+ { if: { validation: 'error' }, tokens: { color: 'red' } }
1587
+ ]
1588
+ },
1589
+ List: {
1590
+ appearances: {
1591
+ size: {
1592
+ values: ['large', 'small'],
1593
+ type: 'variant'
1594
+ },
1595
+ compact: {
1596
+ values: [true],
1597
+ type: 'variant'
1598
+ }
1599
+ },
1600
+ tokens: {
1601
+ interItemMargin: 8,
1602
+ interItemMarginWithDivider: 16,
1603
+ dividerColor: '#666666',
1604
+ dividerSize: 1,
1605
+ itemBulletContainerWidth: 16,
1606
+ itemBulletContainerAlign: 'center',
1607
+ itemBulletWidth: 4,
1608
+ itemBulletHeight: 4,
1609
+ itemBulletColor: '#6666cc',
1610
+ itemIconSize: 16,
1611
+ itemIconColor: '#6666cc',
1612
+ listGutter: 10,
1613
+ itemLineHeight: 1.5
1614
+ },
1615
+ rules: [
1616
+ {
1617
+ if: { size: 'large' },
1618
+ tokens: {
1619
+ itemFontSize: 20,
1620
+ itemLineHeight: 1.6,
1621
+ listGutter: 16
1622
+ }
1623
+ },
1624
+ {
1625
+ if: { size: 'small' },
1626
+ tokens: {
1627
+ itemFontSize: 14,
1628
+ itemLineHeight: 1.42857142857,
1629
+ listGutter: 10
1630
+ }
1631
+ },
1632
+ {
1633
+ if: { compact: true },
1634
+ tokens: {
1635
+ itemLineHeight: 1.25
1636
+ }
1637
+ },
1638
+ {
1639
+ if: { compact: true, size: 'small' },
1640
+ tokens: {
1641
+ itemLineHeight: 1.14285714286
1642
+ }
1643
+ },
1644
+ {
1645
+ if: { compact: true, size: 'large' },
1646
+ tokens: {
1647
+ itemLineHeight: 1.2
1648
+ }
1649
+ }
1650
+ ]
1651
+ },
1652
+ Tags: {
1653
+ space: 2,
1654
+ direction: 'row',
1655
+ alignItems: 'flex-start',
1656
+ justifyContent: 'flex-start',
1657
+ flexGrow: 1
1658
+ },
1659
+ TagsItem: {
1660
+ appearances: {
1661
+ focus: appearances.ButtonGroupItem.focus,
1662
+ hover: appearances.ButtonGroupItem.hover,
1663
+ pressed: appearances.ButtonGroupItem.pressed,
1664
+ selected: appearances.ButtonGroupItem.selected
1665
+ },
1666
+ tokens: {
1667
+ icon: Checkmark,
1668
+ iconSize: 16,
1669
+ iconColor: '#ffffff',
1670
+ iconTranslateX: 0,
1671
+ iconTranslateY: 0,
1672
+
1673
+ iconPosition: 'right',
1674
+ iconSpace: 2,
1675
+ iconBackground: '#ffffff',
1676
+ iconBorderRadius: 0,
1677
+ iconAlignSelf: 'center',
1678
+ iconPadding: 0,
1679
+
1680
+ borderColor: '#0e6ac8',
1681
+ borderWidth: 2,
1682
+ borderRadius: 0,
1683
+ shadow: null,
1684
+
1685
+ outerBorderColor: transparent,
1686
+ outerBorderWidth: 4,
1687
+ outerBorderGap: 2,
1688
+
1689
+ fontSize: 16,
1690
+ color: '#0e6ac8',
1691
+ lineHeight: 1.5,
1692
+ fontWeight: '600',
1693
+ alignSelf: 'flex-start',
1694
+
1695
+ backgroundColor: '#ffffff',
1696
+ opacity: 1,
1697
+ paddingLeft: 24,
1698
+ paddingRight: 24,
1699
+ paddingTop: 8,
1700
+ paddingBottom: 8,
1701
+
1702
+ width: null
1703
+ },
1704
+ rules: [
1705
+ {
1706
+ if: { focus: true },
1707
+ tokens: {
1708
+ borderWidth: 4,
1709
+ outerBorderColor: '#0e6ac8',
1710
+ opacity: 0.5
1711
+ }
1712
+ },
1713
+ {
1714
+ if: { hover: true },
1715
+ tokens: {
1716
+ borderWidth: 6
1717
+ }
1718
+ },
1719
+ {
1720
+ if: { pressed: true },
1721
+ tokens: {
1722
+ borderWidth: 8
1723
+ }
1724
+ },
1725
+ {
1726
+ if: { selected: true },
1727
+ tokens: {
1728
+ backgroundColor: '#0e6ac8',
1729
+ color: '#ffffff',
1730
+ opacity: 1,
1731
+ iconBackground: '#0e6ac8'
1732
+ }
1733
+ }
1734
+ ]
1735
+ },
1736
+ Tooltip: {
1737
+ tokens: {
1738
+ backgroundColor: 'black',
1739
+ color: 'white',
1740
+ paddingLeft: 4,
1741
+ paddingRight: 4,
1742
+ paddingTop: 4,
1743
+ paddingBottom: 4,
1744
+ arrowOffset: 4
1745
+ }
1746
+ },
1747
+ TooltipButton: {
1748
+ tokens: {
1749
+ icon: Question,
1750
+ iconColor: 'black',
1751
+ iconSize: 16
1752
+ }
1753
+ },
1754
+ TextArea: {},
1755
+ InputSupports: {},
1756
+ Skeleton: {
1757
+ tokens: {
1758
+ color: '#b2b9bf',
1759
+ radius: 100,
1760
+ size: 3,
1761
+ baseWidth: 40,
1762
+ characters: 10,
1763
+ spaceBetweenLines: 2,
1764
+ squareRadius: 4
1765
+ }
1766
+ },
1767
+ Select: {
1768
+ tokens: {
1769
+ borderRadius: 4,
1770
+ borderWidth: 1,
1771
+ borderColor: '#00000044',
1772
+ paddingTop: 6,
1773
+ paddingBottom: 6,
1774
+ paddingLeft: 6,
1775
+ paddingRight: 6,
1776
+ outerBorderWidth: 1,
1777
+ outerBorderColor: transparent
1778
+ },
1779
+ rules: [
1780
+ {
1781
+ if: { validation: 'success' },
1782
+ tokens: {
1783
+ outerBorderColor: '#99ff99'
1784
+ }
1785
+ },
1786
+ {
1787
+ if: { validation: 'error' },
1788
+ tokens: {
1789
+ outerBorderColor: '#990000'
1790
+ }
1791
+ },
1792
+ {
1793
+ if: { focus: true },
1794
+ tokens: {
1795
+ outerBorderColor: '#debc06'
1796
+ }
1797
+ },
1798
+ {
1799
+ if: { hover: true },
1800
+ tokens: {
1801
+ outerBorderColor: '#6666cc'
1802
+ }
1803
+ },
1804
+ {
1805
+ if: { inactive: true },
1806
+ tokens: {
1807
+ outerBorderColor: transparent,
1808
+ backgroundColor: '#00000044'
1809
+ }
1810
+ }
1811
+ ]
926
1812
  }
927
1813
  }
928
1814
  }