@workday/canvas-kit-docs 13.0.0-alpha.998-next.0 → 13.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 (296) hide show
  1. package/dist/es6/lib/ExampleCodeBlock.d.ts +1 -2
  2. package/dist/es6/lib/ExampleCodeBlock.d.ts.map +1 -1
  3. package/dist/es6/lib/ExampleCodeBlock.js +53 -28
  4. package/dist/es6/lib/MDXElements.d.ts +1 -2
  5. package/dist/es6/lib/MDXElements.d.ts.map +1 -1
  6. package/dist/es6/lib/MDXElements.js +6 -6
  7. package/dist/es6/lib/MoreTooltip.d.ts +1 -1
  8. package/dist/es6/lib/MoreTooltip.d.ts.map +1 -1
  9. package/dist/es6/lib/MoreTooltip.js +11 -12
  10. package/dist/es6/lib/Specifications.d.ts +1 -2
  11. package/dist/es6/lib/Specifications.d.ts.map +1 -1
  12. package/dist/es6/lib/Specifications.js +3 -20
  13. package/dist/es6/lib/StylePropsTable.d.ts +1 -2
  14. package/dist/es6/lib/StylePropsTable.d.ts.map +1 -1
  15. package/dist/es6/lib/StylePropsTable.js +6 -16
  16. package/dist/es6/lib/Table.d.ts.map +1 -1
  17. package/dist/es6/lib/Table.js +7 -7
  18. package/dist/es6/lib/Value.d.ts +3 -3
  19. package/dist/es6/lib/Value.d.ts.map +1 -1
  20. package/dist/es6/lib/Value.js +16 -51
  21. package/dist/es6/lib/docs.js +270155 -169429
  22. package/dist/es6/lib/stackblitzFiles/.eslintrc.cjs.txt +15 -0
  23. package/dist/es6/lib/stackblitzFiles/App.d.ts +2 -0
  24. package/dist/es6/lib/stackblitzFiles/App.d.ts.map +1 -0
  25. package/dist/es6/lib/stackblitzFiles/App.js +17 -0
  26. package/dist/es6/lib/stackblitzFiles/App.tsx +33 -0
  27. package/dist/es6/lib/stackblitzFiles/Demo.d.ts +2 -0
  28. package/dist/es6/lib/stackblitzFiles/Demo.d.ts.map +1 -0
  29. package/dist/es6/lib/stackblitzFiles/Demo.js +2 -0
  30. package/dist/es6/lib/stackblitzFiles/Demo.tsx +1 -0
  31. package/dist/es6/lib/stackblitzFiles/index.html +13 -0
  32. package/dist/es6/lib/stackblitzFiles/main.d.ts +4 -0
  33. package/dist/es6/lib/stackblitzFiles/main.d.ts.map +1 -0
  34. package/dist/es6/lib/stackblitzFiles/main.js +25 -0
  35. package/dist/es6/lib/stackblitzFiles/main.tsx +27 -0
  36. package/dist/es6/lib/stackblitzFiles/packageJSONFile.d.ts +2 -0
  37. package/dist/es6/lib/stackblitzFiles/packageJSONFile.d.ts.map +1 -0
  38. package/dist/es6/lib/stackblitzFiles/packageJSONFile.js +42 -0
  39. package/dist/es6/lib/stackblitzFiles/packageJSONFile.ts +42 -0
  40. package/dist/es6/lib/stackblitzFiles/tsconfig.json +26 -0
  41. package/dist/es6/lib/stackblitzFiles/tsconfig.node.json +12 -0
  42. package/dist/es6/lib/stackblitzFiles/vite-env.d.ts +1 -0
  43. package/dist/es6/lib/stackblitzFiles/vite.config.d.ts +4 -0
  44. package/dist/es6/lib/stackblitzFiles/vite.config.d.ts.map +1 -0
  45. package/dist/es6/lib/stackblitzFiles/vite.config.js +7 -0
  46. package/dist/es6/lib/stackblitzFiles/vite.config.ts +10 -0
  47. package/dist/es6/lib/widgetUtils.d.ts +5 -5
  48. package/dist/es6/lib/widgetUtils.d.ts.map +1 -1
  49. package/dist/es6/lib/widgetUtils.js +25 -54
  50. package/dist/es6/lib/widgets/array.js +2 -4
  51. package/dist/es6/lib/widgets/callExpression.js +2 -14
  52. package/dist/es6/lib/widgets/canvasColor.js +2 -2
  53. package/dist/es6/lib/widgets/component.js +2 -4
  54. package/dist/es6/lib/widgets/conditional.js +2 -12
  55. package/dist/es6/lib/widgets/enhancedComponent.js +15 -67
  56. package/dist/es6/lib/widgets/external.js +2 -4
  57. package/dist/es6/lib/widgets/function.js +7 -26
  58. package/dist/es6/lib/widgets/intersection.js +2 -3
  59. package/dist/es6/lib/widgets/model.js +3 -19
  60. package/dist/es6/lib/widgets/object.js +2 -2
  61. package/dist/es6/lib/widgets/parenthesis.js +2 -5
  62. package/dist/es6/lib/widgets/primitives.js +9 -27
  63. package/dist/es6/lib/widgets/qualifiedName.js +2 -5
  64. package/dist/es6/lib/widgets/symbol.js +2 -2
  65. package/dist/es6/lib/widgets/tuple.js +2 -5
  66. package/dist/es6/lib/widgets/typeParameter.js +2 -13
  67. package/dist/es6/lib/widgets/union.js +4 -10
  68. package/dist/es6/mdx/installBlock.d.ts +1 -2
  69. package/dist/es6/mdx/installBlock.d.ts.map +1 -1
  70. package/dist/es6/mdx/installBlock.js +2 -6
  71. package/dist/es6/mdx/style-props/examples/Background.d.ts +1 -2
  72. package/dist/es6/mdx/style-props/examples/Background.d.ts.map +1 -1
  73. package/dist/es6/mdx/style-props/examples/Background.js +2 -5
  74. package/dist/es6/mdx/style-props/examples/Border.d.ts +1 -2
  75. package/dist/es6/mdx/style-props/examples/Border.d.ts.map +1 -1
  76. package/dist/es6/mdx/style-props/examples/Border.js +2 -5
  77. package/dist/es6/mdx/style-props/examples/Color.d.ts +1 -2
  78. package/dist/es6/mdx/style-props/examples/Color.d.ts.map +1 -1
  79. package/dist/es6/mdx/style-props/examples/Color.js +2 -5
  80. package/dist/es6/mdx/style-props/examples/Depth.d.ts +1 -2
  81. package/dist/es6/mdx/style-props/examples/Depth.d.ts.map +1 -1
  82. package/dist/es6/mdx/style-props/examples/Depth.js +2 -5
  83. package/dist/es6/mdx/style-props/examples/Flex.d.ts +1 -2
  84. package/dist/es6/mdx/style-props/examples/Flex.d.ts.map +1 -1
  85. package/dist/es6/mdx/style-props/examples/Flex.js +2 -14
  86. package/dist/es6/mdx/style-props/examples/FlexItem.d.ts +1 -2
  87. package/dist/es6/mdx/style-props/examples/FlexItem.d.ts.map +1 -1
  88. package/dist/es6/mdx/style-props/examples/FlexItem.js +2 -13
  89. package/dist/es6/mdx/style-props/examples/Grid.d.ts +1 -2
  90. package/dist/es6/mdx/style-props/examples/Grid.d.ts.map +1 -1
  91. package/dist/es6/mdx/style-props/examples/Grid.js +2 -6
  92. package/dist/es6/mdx/style-props/examples/GridItem.d.ts +1 -2
  93. package/dist/es6/mdx/style-props/examples/GridItem.d.ts.map +1 -1
  94. package/dist/es6/mdx/style-props/examples/GridItem.js +2 -6
  95. package/dist/es6/mdx/style-props/examples/Layout.d.ts +1 -2
  96. package/dist/es6/mdx/style-props/examples/Layout.d.ts.map +1 -1
  97. package/dist/es6/mdx/style-props/examples/Layout.js +2 -5
  98. package/dist/es6/mdx/style-props/examples/Other.d.ts +1 -2
  99. package/dist/es6/mdx/style-props/examples/Other.d.ts.map +1 -1
  100. package/dist/es6/mdx/style-props/examples/Other.js +2 -5
  101. package/dist/es6/mdx/style-props/examples/Position.d.ts +1 -2
  102. package/dist/es6/mdx/style-props/examples/Position.d.ts.map +1 -1
  103. package/dist/es6/mdx/style-props/examples/Position.js +2 -5
  104. package/dist/es6/mdx/style-props/examples/Space.d.ts +1 -2
  105. package/dist/es6/mdx/style-props/examples/Space.d.ts.map +1 -1
  106. package/dist/es6/mdx/style-props/examples/Space.js +2 -8
  107. package/dist/es6/mdx/style-props/examples/Text.d.ts +1 -2
  108. package/dist/es6/mdx/style-props/examples/Text.d.ts.map +1 -1
  109. package/dist/es6/mdx/style-props/examples/Text.js +2 -5
  110. package/dist/es6/mdx/versionsTable.d.ts +1 -2
  111. package/dist/es6/mdx/versionsTable.d.ts.map +1 -1
  112. package/dist/es6/mdx/versionsTable.js +23 -49
  113. package/dist/es6/mdx/welcomePage.d.ts +1 -2
  114. package/dist/es6/mdx/welcomePage.d.ts.map +1 -1
  115. package/dist/es6/mdx/welcomePage.js +37 -49
  116. package/dist/mdx/12.0-UPGRADE-GUIDE.mdx +1 -1
  117. package/dist/mdx/13.0-UPGRADE-GUIDE.mdx +454 -0
  118. package/dist/mdx/CODEMODS.mdx +58 -0
  119. package/dist/mdx/CONTRIBUTING.mdx +8 -0
  120. package/dist/mdx/TESTING.mdx +34 -0
  121. package/dist/mdx/preview-react/_examples/mdx/{Forms.mdx → FormLibraryExample.mdx} +0 -2
  122. package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Basic.tsx +1 -1
  123. package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Body.tsx +1 -1
  124. package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Caution.tsx +1 -2
  125. package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Critical.tsx +5 -12
  126. package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/CustomIconCritical.tsx +1 -1
  127. package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/Heading.tsx +1 -1
  128. package/dist/mdx/preview-react/information-highlight/examples/Informational.tsx +55 -0
  129. package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/examples/RTL.tsx +1 -1
  130. package/dist/mdx/preview-react/loading-sparkles/examples/Basic.tsx +2 -2
  131. package/dist/mdx/preview-react/multi-select/examples/Basic.tsx +1 -1
  132. package/dist/mdx/preview-react/multi-select/examples/Complex.tsx +1 -1
  133. package/dist/mdx/preview-react/multi-select/examples/Controlled.tsx +1 -1
  134. package/dist/mdx/preview-react/multi-select/examples/Icons.tsx +1 -1
  135. package/dist/mdx/preview-react/multi-select/examples/Searching.tsx +1 -1
  136. package/dist/mdx/preview-react/pill/Pill.mdx +18 -9
  137. package/dist/mdx/preview-react/pill/examples/Basic.tsx +14 -8
  138. package/dist/mdx/preview-react/pill/examples/CustomStyles.tsx +45 -0
  139. package/dist/mdx/preview-react/pill/examples/WithAvatar.tsx +16 -10
  140. package/dist/mdx/preview-react/pill/examples/WithCount.tsx +12 -6
  141. package/dist/mdx/preview-react/pill/examples/WithList.tsx +15 -5
  142. package/dist/mdx/preview-react/pill/examples/WithReadOnly.tsx +8 -5
  143. package/dist/mdx/preview-react/pill/examples/WithRemovable.tsx +23 -11
  144. package/dist/mdx/preview-react/segmented-control/examples/Disabled.tsx +0 -1
  145. package/dist/mdx/preview-react/segmented-control/examples/RTL.tsx +0 -1
  146. package/dist/mdx/preview-react/segmented-control/examples/Vertical.tsx +0 -1
  147. package/dist/mdx/preview-react/select/examples/Left Label/DefaultWithCustomOptionsLeft.tsx +1 -1
  148. package/dist/mdx/preview-react/select/examples/Left Label/DefaultWithSimpleOptionsLeft.tsx +1 -1
  149. package/dist/mdx/preview-react/select/examples/Top Label/Alert.tsx +0 -2
  150. package/dist/mdx/preview-react/select/examples/Top Label/Default.tsx +0 -2
  151. package/dist/mdx/preview-react/select/examples/Top Label/DefaultWithCustomOptions.tsx +0 -2
  152. package/dist/mdx/preview-react/select/examples/Top Label/DefaultWithSimpleOptions.tsx +0 -2
  153. package/dist/mdx/preview-react/select/examples/Top Label/Disabled.tsx +0 -2
  154. package/dist/mdx/preview-react/select/examples/Top Label/Error.tsx +0 -2
  155. package/dist/mdx/preview-react/select/examples/Top Label/Grow.tsx +0 -2
  156. package/dist/mdx/preview-react/select/examples/Top Label/Scrollable.tsx +0 -2
  157. package/dist/mdx/preview-react/select/examples/storiesData.tsx +0 -1
  158. package/dist/mdx/preview-react/side-panel/SidePanel.mdx +28 -3
  159. package/dist/mdx/preview-react/side-panel/examples/AlwaysOpen.tsx +36 -17
  160. package/dist/mdx/preview-react/side-panel/examples/Basic.tsx +40 -34
  161. package/dist/mdx/preview-react/side-panel/examples/ExternalControl.tsx +47 -23
  162. package/dist/mdx/preview-react/side-panel/examples/HiddenName.tsx +24 -5
  163. package/dist/mdx/preview-react/side-panel/examples/OnExpandedChange.tsx +22 -6
  164. package/dist/mdx/preview-react/side-panel/examples/OnStateTransition.tsx +24 -9
  165. package/dist/mdx/preview-react/side-panel/examples/RightOrigin.tsx +39 -40
  166. package/dist/mdx/preview-react/side-panel/examples/Variant.tsx +36 -36
  167. package/dist/mdx/preview-react/text-area/examples/Alert.tsx +1 -4
  168. package/dist/mdx/preview-react/text-input/examples/Alert.tsx +1 -4
  169. package/dist/mdx/preview-react/text-input/examples/ThemedAlert.tsx +1 -4
  170. package/dist/mdx/react/_examples/Tooltips.mdx +15 -0
  171. package/dist/mdx/react/_examples/examples/Tooltips/ListOfUploadedFiles.tsx +38 -0
  172. package/dist/mdx/react/_examples/mdx/SidePanel.mdx +18 -1
  173. package/dist/mdx/react/_examples/mdx/examples/GlobalHeader.tsx +1 -1
  174. package/dist/mdx/react/_examples/mdx/examples/SidePanelWithNavigation.tsx +154 -116
  175. package/dist/mdx/react/_examples/mdx/examples/SidePanelWithOverlay.tsx +33 -15
  176. package/dist/mdx/react/_examples/mdx/examples/Table/WithSelectableRows.tsx +1 -1
  177. package/dist/mdx/react/action-bar/examples/Basic.tsx +0 -1
  178. package/dist/mdx/react/action-bar/examples/DeleteAction.tsx +0 -2
  179. package/dist/mdx/react/action-bar/examples/Icons.tsx +0 -2
  180. package/dist/mdx/react/avatar/avatar/examples/Basic.tsx +2 -3
  181. package/dist/mdx/react/avatar/avatar/examples/Button.tsx +3 -4
  182. package/dist/mdx/react/avatar/avatar/examples/CustomStyles.tsx +2 -3
  183. package/dist/mdx/react/avatar/avatar/examples/Image.tsx +7 -8
  184. package/dist/mdx/react/avatar/avatar/examples/LazyLoad.tsx +7 -2
  185. package/dist/mdx/react/avatar/avatar/examples/ObjectFit.tsx +9 -4
  186. package/dist/mdx/react/avatar/avatar/examples/Size.tsx +10 -11
  187. package/dist/mdx/react/avatar/avatar/examples/Variant.tsx +2 -3
  188. package/dist/mdx/react/banner/examples/Error.tsx +0 -2
  189. package/dist/mdx/react/banner/examples/Sticky.tsx +0 -1
  190. package/dist/mdx/react/banner/examples/StickyAnimation.tsx +42 -26
  191. package/dist/mdx/react/breadcrumbs/examples/Basic.tsx +0 -1
  192. package/dist/mdx/react/button/button/Button.mdx +5 -1
  193. package/dist/mdx/react/button/button/examples/CustomStyles.tsx +1 -3
  194. package/dist/mdx/react/button/button/examples/Delete.tsx +0 -2
  195. package/dist/mdx/react/button/button/examples/ExternalHyperlink.tsx +3 -3
  196. package/dist/mdx/react/button/button/examples/ExternalHyperlinkInverse.tsx +5 -1
  197. package/dist/mdx/react/button/button/examples/Hyperlink.tsx +0 -2
  198. package/dist/mdx/react/button/button/examples/Primary.tsx +0 -2
  199. package/dist/mdx/react/button/button/examples/ThemeOverrides.tsx +14 -17
  200. package/dist/mdx/react/collection/mdx/examples/MultiSelection.tsx +2 -1
  201. package/dist/mdx/react/collection/mdx/examples/Selection.tsx +2 -1
  202. package/dist/mdx/react/color-picker/color-preview/examples/Basic.tsx +0 -1
  203. package/dist/mdx/react/dialog/examples/DialogWithFallbackPlacements.tsx +0 -1
  204. package/dist/mdx/{labs-react → react}/expandable/Expandable.mdx +2 -2
  205. package/dist/mdx/{labs-react → react}/expandable/examples/Avatar.tsx +5 -7
  206. package/dist/mdx/{labs-react → react}/expandable/examples/Depth.tsx +1 -4
  207. package/dist/mdx/{labs-react → react}/expandable/examples/EndIcon.tsx +1 -3
  208. package/dist/mdx/{labs-react → react}/expandable/examples/HoistedModel.tsx +1 -1
  209. package/dist/mdx/{labs-react → react}/expandable/examples/LongTitle.tsx +2 -4
  210. package/dist/mdx/{labs-react → react}/expandable/examples/RTL.tsx +1 -3
  211. package/dist/mdx/{labs-react → react}/expandable/examples/StartIcon.tsx +1 -3
  212. package/dist/mdx/react/menu/Menu.mdx +34 -0
  213. package/dist/mdx/react/menu/examples/Grouping.tsx +32 -0
  214. package/dist/mdx/react/menu/examples/Icons.tsx +1 -1
  215. package/dist/mdx/react/menu/examples/Nested.tsx +49 -0
  216. package/dist/mdx/react/menu/examples/NestedDynamic.tsx +105 -0
  217. package/dist/mdx/react/modal/examples/Basic.tsx +0 -2
  218. package/dist/mdx/react/modal/examples/IframeTest.tsx +0 -1
  219. package/dist/mdx/react/modal/examples/ModalWithPopup.tsx +0 -1
  220. package/dist/mdx/react/modal/examples/StackedModals.tsx +0 -1
  221. package/dist/mdx/react/pagination/examples/CustomRange.tsx +0 -1
  222. package/dist/mdx/react/pagination/examples/GoToForm.tsx +0 -1
  223. package/dist/mdx/react/pagination/examples/JumpControls.tsx +0 -1
  224. package/dist/mdx/react/popup/examples/Basic.tsx +0 -2
  225. package/dist/mdx/react/popup/examples/CloseOnTargetHiddenTest.tsx +0 -1
  226. package/dist/mdx/react/popup/examples/ComboboxWithinPopup.tsx +0 -1
  227. package/dist/mdx/react/popup/examples/MultiplePopups.tsx +0 -2
  228. package/dist/mdx/react/popup/examples/PopupWithFallbackPlacements.tsx +0 -1
  229. package/dist/mdx/react/popup/examples/PopupWithNonHidablePopup.tsx +0 -1
  230. package/dist/mdx/react/popup/examples/ReturnFocusTest.tsx +8 -6
  231. package/dist/mdx/react/popup/examples/TooltipReturnFocus.tsx +0 -1
  232. package/dist/mdx/react/select/examples/Basic.tsx +1 -0
  233. package/dist/mdx/react/select/examples/MenuHeight.tsx +0 -1
  234. package/dist/mdx/react/table/Table.mdx +14 -1
  235. package/dist/mdx/react/table/examples/BaseHtmlTable.tsx +46 -0
  236. package/dist/mdx/react/tabs/examples/Basic.tsx +0 -1
  237. package/dist/mdx/react/tabs/examples/DisabledTab.tsx +0 -1
  238. package/dist/mdx/react/tabs/examples/DynamicTabs.tsx +3 -2
  239. package/dist/mdx/react/tabs/examples/NamedTabs.tsx +0 -1
  240. package/dist/mdx/react/tabs/examples/RightToLeft.tsx +0 -1
  241. package/dist/mdx/react/text-input/examples/Basic.tsx +0 -3
  242. package/dist/mdx/react/toast/examples/Basic.tsx +0 -2
  243. package/dist/mdx/react/toast/examples/ToastAlert.tsx +0 -2
  244. package/dist/mdx/react/toast/examples/ToastDialog.tsx +0 -2
  245. package/dist/mdx/react/tokens/Tokens.mdx +1 -1
  246. package/dist/mdx/react/tooltip/Tooltip.mdx +31 -1
  247. package/dist/mdx/react/tooltip/examples/Default.tsx +0 -2
  248. package/dist/mdx/react/tooltip/examples/DescribeType.tsx +0 -2
  249. package/dist/mdx/react/tooltip/examples/DescriptionType.tsx +20 -0
  250. package/dist/mdx/react/tooltip/examples/Muted.tsx +0 -2
  251. package/dist/mdx/react/tooltip/examples/Placements.tsx +14 -11
  252. package/dist/mdx/style-props/examples/Background.tsx +2 -3
  253. package/dist/mdx/style-props/examples/Border.tsx +2 -3
  254. package/dist/mdx/style-props/examples/Color.tsx +2 -3
  255. package/dist/mdx/style-props/examples/Depth.tsx +2 -3
  256. package/dist/mdx/style-props/examples/Flex.tsx +0 -1
  257. package/dist/mdx/style-props/examples/FlexItem.tsx +0 -1
  258. package/dist/mdx/style-props/examples/Grid.tsx +0 -1
  259. package/dist/mdx/style-props/examples/GridItem.tsx +0 -1
  260. package/dist/mdx/style-props/examples/Layout.tsx +0 -1
  261. package/dist/mdx/style-props/examples/Other.tsx +0 -1
  262. package/dist/mdx/style-props/examples/Position.tsx +2 -3
  263. package/dist/mdx/style-props/examples/Space.tsx +2 -3
  264. package/dist/mdx/style-props/examples/Text.tsx +0 -1
  265. package/lib/ExampleCodeBlock.tsx +57 -19
  266. package/lib/MDXElements.tsx +3 -3
  267. package/lib/StylePropsTable.tsx +1 -2
  268. package/lib/Table.tsx +0 -1
  269. package/lib/stackblitzFiles/.eslintrc.cjs.txt +15 -0
  270. package/lib/stackblitzFiles/App.tsx +33 -0
  271. package/lib/stackblitzFiles/Demo.tsx +1 -0
  272. package/lib/stackblitzFiles/index.html +13 -0
  273. package/lib/stackblitzFiles/main.tsx +27 -0
  274. package/lib/stackblitzFiles/packageJSONFile.ts +42 -0
  275. package/lib/stackblitzFiles/tsconfig.json +26 -0
  276. package/lib/stackblitzFiles/tsconfig.node.json +12 -0
  277. package/lib/stackblitzFiles/types/custom-imports.d.ts +13 -0
  278. package/lib/stackblitzFiles/vite-env.d.ts +1 -0
  279. package/lib/stackblitzFiles/vite.config.ts +10 -0
  280. package/lib/widgets/array.tsx +0 -2
  281. package/lib/widgets/canvasColor.tsx +0 -2
  282. package/lib/widgets/component.tsx +0 -2
  283. package/lib/widgets/conditional.tsx +0 -2
  284. package/lib/widgets/enhancedComponent.tsx +1 -1
  285. package/lib/widgets/external.tsx +3 -2
  286. package/lib/widgets/model.tsx +0 -2
  287. package/lib/widgets/parenthesis.tsx +0 -2
  288. package/lib/widgets/primitives.tsx +1 -5
  289. package/lib/widgets/qualifiedName.tsx +0 -2
  290. package/lib/widgets/symbol.tsx +0 -2
  291. package/lib/widgets/tuple.tsx +0 -2
  292. package/lib/widgets/typeParameter.tsx +0 -2
  293. package/package.json +8 -7
  294. package/dist/mdx/preview-react/InformationHighlight/examples/Informational.tsx +0 -27
  295. /package/dist/mdx/preview-react/{InformationHighlight → information-highlight}/InformationHighlight.mdx +0 -0
  296. /package/dist/mdx/{labs-react → react}/expandable/examples/test-avatar.png +0 -0
@@ -0,0 +1,15 @@
1
+ import {Tooltip} from '@workday/canvas-kit-react/tooltip';
2
+ import ListOfUploadedFiles from './examples/Tooltips/ListOfUploadedFiles';
3
+
4
+
5
+ # Accessible Tooltip Examples
6
+
7
+ ## Using descriptive tooltips for repeated text buttons
8
+
9
+ In this example, the "Delete" buttons are used repeatedly to reference the multiple files that have
10
+ been uploaded to the web app. The text buttons already have an accessible name (a.k.a. label)
11
+ derived from the button's inner text. The `describe` tooltip can be useful for providing more
12
+ in-context description for both low vision sighted users and screen reader users without overriding
13
+ the button name "Delete".
14
+
15
+ <ExampleCodeBlock code={ListOfUploadedFiles} />
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+
3
+ import {DeleteButton} from '@workday/canvas-kit-react/button';
4
+ import {Flex} from '@workday/canvas-kit-react/layout';
5
+ import {Heading, Text} from '@workday/canvas-kit-react/text';
6
+ import {Tooltip} from '@workday/canvas-kit-react/tooltip';
7
+ import {trashIcon} from '@workday/canvas-system-icons-web';
8
+
9
+ const files = ['Cover Letter.docx', 'Resume.docx', 'Portfolio.pptx', 'Portrait.png'];
10
+
11
+ const listStyles = {
12
+ alignItems: 'center',
13
+ width: '35rem',
14
+ };
15
+
16
+ const deleteBtnStyle = {
17
+ marginLeft: 'auto',
18
+ };
19
+
20
+ export default () => {
21
+ return (
22
+ <>
23
+ <Heading size="medium">Uploaded Files:</Heading>
24
+ <Flex as="ul" gap="1rem" flexDirection="column">
25
+ {files.map(i => (
26
+ <Flex as="li" style={listStyles}>
27
+ <Text>{i}</Text>
28
+ <Tooltip type="description" title={i}>
29
+ <DeleteButton icon={trashIcon} style={deleteBtnStyle}>
30
+ Delete
31
+ </DeleteButton>
32
+ </Tooltip>
33
+ </Flex>
34
+ ))}
35
+ </Flex>
36
+ </>
37
+ );
38
+ };
@@ -5,7 +5,24 @@ import WithOverlay from './examples/SidePanelWithOverlay';
5
5
 
6
6
  # Canvas Kit Examples
7
7
 
8
- ## Side Panel With Navigation
8
+ ## Side Panel As Navigation
9
+
10
+ This example demonstrates SidePanel as a navigation system that can be reduced into a "compact view"
11
+ to save horizontal space on screen. It combines semantic HTML nested list markup with Canvas Kit's
12
+ `<Expandable>` component to create an accordion. When in compact view, the Canvas Kit `<Menu>`
13
+ component is used to create the fly-out menus. Both of these components are implemented according to
14
+ the [W3C ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/patterns/) to provide a
15
+ wide range of support for accessibility.
16
+
17
+ - The `<SidePanel>` uses the `as` prop to render with a semantic HTML `<nav>` element
18
+ - The SidePanel's heading element with the `labelProps` must remain in the DOM even while the
19
+ component is in compact view, else the `aria-labelledby` reference for the toggle button will
20
+ become invalid. The `hidden` attribute is conditionally set on the heading based on the `expanded`
21
+ state of the SidePanel provided by the `useSidePanel` hook.
22
+ - The semantic HTML nested list markup helps support non-visual screen reader users understand the
23
+ nested hierarchy of the elements inside the expandable containers
24
+ - In the compact view, the `<Tooltip>` component is used to provide an accessible name to the icon
25
+ button menu targets
9
26
 
10
27
  <ExampleCodeBlock code={WithNavigation} />
11
28
 
@@ -149,7 +149,7 @@ export default () => {
149
149
  <TertiaryButton icon={inboxIcon} />
150
150
  </Tooltip>
151
151
  <Tooltip title="Profile">
152
- <Avatar />
152
+ <Avatar altText="Avatar" />
153
153
  </Tooltip>
154
154
  </GlobalHeader.Item>
155
155
  </GlobalHeader>
@@ -1,130 +1,168 @@
1
1
  import * as React from 'react';
2
- import {styled, StyledType} from '@workday/canvas-kit-react/common';
3
- import {colors, space, gradients, type} from '@workday/canvas-kit-react/tokens';
4
- import {SidePanel} from '@workday/canvas-kit-preview-react/side-panel';
5
- import {Flex, Box} from '@workday/canvas-kit-react/layout';
6
- import {BodyText, Subtext} from '@workday/canvas-kit-react/text';
7
- import {Expandable} from '@workday/canvas-kit-labs-react/expandable';
2
+ import {base, system} from '@workday/canvas-tokens-web';
3
+ import {SidePanel, useSidePanel} from '@workday/canvas-kit-preview-react/side-panel';
4
+ import {Flex} from '@workday/canvas-kit-react/layout';
5
+ import {Heading, Subtext, Text} from '@workday/canvas-kit-react/text';
6
+ import {Expandable} from '@workday/canvas-kit-react/expandable';
8
7
  import {SystemIcon} from '@workday/canvas-kit-react/icon';
9
- import {birthdayIcon, ribbonIcon} from '@workday/canvas-system-icons-web';
8
+ import {Hyperlink, TertiaryButton} from '@workday/canvas-kit-react/button';
9
+ import {Menu} from '@workday/canvas-kit-react/menu';
10
+ import {birthdayIcon, checkIcon, ribbonIcon} from '@workday/canvas-system-icons-web';
11
+ import {createStyles, px2rem} from '@workday/canvas-kit-styling';
12
+ import {Tooltip} from '../../../../tooltip';
10
13
 
11
- const StyledPanel = styled(SidePanel.as('nav'))({
12
- backgroundColor: colors.soap200,
13
- zIndex: 1,
14
- });
15
-
16
- const StyledExpandable = styled(Expandable.Target)({
17
- borderRadius: 0,
18
- ':hover': {
19
- backgroundColor: colors.soap500,
14
+ const data = {
15
+ bestsellers: {
16
+ icon: ribbonIcon,
17
+ title: 'Best Sellers',
18
+ subtitle: 'Award winning sweet treats',
19
+ items: ['Mango Coco Sago', 'Matcha Creme Pie', 'Key Lime Cheesecake', 'Tiramisu'],
20
20
  },
21
- });
22
-
23
- const StyledLink = styled(Subtext.as('a'))<StyledType>({
24
- color: colors.blackPepper300,
25
- ':hover': {
26
- backgroundColor: colors.soap500,
21
+ cakes: {
22
+ icon: birthdayIcon,
23
+ title: 'Custom Cakes',
24
+ subtitle: 'To celebrate your life milestones',
25
+ items: ['Anniversary', 'Birthday', 'Graduation', 'Wedding'],
27
26
  },
28
- });
27
+ };
28
+
29
+ const stylesOverride = {
30
+ navContainer: createStyles({
31
+ height: px2rem(800),
32
+ positio: 'relative',
33
+ backgroundColor: base.frenchVanilla100,
34
+ }),
35
+ accordionContainer: createStyles({
36
+ flexDirection: 'column',
37
+ rowGap: system.space.zero,
38
+ paddingInlineStart: system.space.zero,
39
+ }),
40
+ accordionIcon: createStyles({
41
+ verticalAlign: 'middle',
42
+ padding: system.space.x1,
43
+ }),
44
+ accordionSubText: createStyles({
45
+ margin: system.space.zero,
46
+ }),
47
+ listContainer: createStyles({
48
+ listStyle: 'none',
49
+ padding: system.space.x4,
50
+ paddingTop: system.space.x16,
51
+ flexDirection: 'column',
52
+ }),
53
+ links: createStyles({
54
+ textDecoration: 'none',
55
+ padding: system.space.x4,
56
+ }),
57
+ linkCheck: createStyles({
58
+ marginLeft: 'auto',
59
+ }),
60
+ flyOut: createStyles({
61
+ marginTop: '8rem',
62
+ }),
63
+ };
64
+
65
+ const Accordion = ({config}) => {
66
+ const [currentPage, setCurrentPage] = React.useState('');
29
67
 
30
- const cakes = [
31
- {value: 'Anniversary', linkValue: '#AnniversaryCakes'},
32
- {value: 'Birthday', linkValue: '#BirthdayCakes'},
33
- {value: 'Graduation', linkValue: '#GraduationCakes'},
34
- {value: 'Wedding', linkValue: 'WeddingCakes'},
35
- ];
68
+ const handleClick = e => {
69
+ e.preventDefault();
70
+ setCurrentPage(e.target.textContent);
71
+ };
36
72
 
37
- const bestsellers = [
38
- {value: 'Mango Coco Sago', linkValue: '#LemonRhubarbBars'},
39
- {value: 'Matcha Creme Pie', linkValue: '#MatchaCremePie'},
40
- {value: 'Key Lime Cheesecake', linkValue: '#KeyLimeCheesecake'},
41
- {value: 'Tiramisu', linkValue: '#Tiramisu'},
42
- ];
73
+ return (
74
+ <Expandable>
75
+ <Expandable.Target>
76
+ <SystemIcon cs={stylesOverride.accordionIcon} icon={config.icon} />
77
+ <Expandable.Title>
78
+ {config.title}
79
+ <Subtext size="medium" cs={stylesOverride.accordionSubText}>
80
+ {config.subtitle}
81
+ </Subtext>
82
+ </Expandable.Title>
83
+ <Expandable.Icon iconPosition="end" />
84
+ </Expandable.Target>
85
+ <Expandable.Content as="ul" cs={stylesOverride.listContainer}>
86
+ {config.items.map(i => {
87
+ return (
88
+ <li key={i}>
89
+ <Flex
90
+ as="a"
91
+ href="#"
92
+ aria-current={i === currentPage ? 'true' : undefined}
93
+ className={stylesOverride.links}
94
+ onClick={handleClick}
95
+ >
96
+ {i}
97
+ {i === currentPage && <SystemIcon icon={checkIcon} cs={stylesOverride.linkCheck} />}
98
+ </Flex>
99
+ </li>
100
+ );
101
+ })}
102
+ </Expandable.Content>
103
+ </Expandable>
104
+ );
105
+ };
43
106
 
44
- const gettingStarted = [
45
- 'Extended Systems',
46
- 'Canvas Glossary',
47
- 'Frequently Asked Questions',
48
- 'Canvas Support',
49
- ];
107
+ const IconButtonMenu = ({config}) => {
108
+ return (
109
+ <Menu>
110
+ <Tooltip title={config.title} placement="right">
111
+ <Menu.Target as={TertiaryButton}>
112
+ <SystemIcon icon={config.icon} />
113
+ </Menu.Target>
114
+ </Tooltip>
115
+ <Menu.Popper placement="right">
116
+ <Menu.Card cs={stylesOverride.flyOut}>
117
+ <Menu.List>
118
+ {config.items.map(i => (
119
+ <Menu.Item>{i}</Menu.Item>
120
+ ))}
121
+ </Menu.List>
122
+ </Menu.Card>
123
+ </Menu.Popper>
124
+ </Menu>
125
+ );
126
+ };
127
+
128
+ const CompactView = () => {
129
+ return (
130
+ <Flex as="ul" cs={stylesOverride.listContainer}>
131
+ <Flex.Item as="li">
132
+ <IconButtonMenu config={data.bestsellers} />
133
+ </Flex.Item>
134
+ <Flex.Item as="li">
135
+ <IconButtonMenu config={data.cakes} />
136
+ </Flex.Item>
137
+ </Flex>
138
+ );
139
+ };
140
+
141
+ const ExpandedView = () => {
142
+ return (
143
+ <Flex as="ul" cs={stylesOverride.accordionContainer}>
144
+ <Flex.Item as="li">
145
+ <Accordion config={data.bestsellers} />
146
+ </Flex.Item>
147
+ <Flex.Item as="li">
148
+ <Accordion config={data.cakes} />
149
+ </Flex.Item>
150
+ </Flex>
151
+ );
152
+ };
50
153
 
51
154
  export default () => {
155
+ const {expanded, panelProps, labelProps, controlProps} = useSidePanel();
156
+
52
157
  return (
53
- <Flex height={800} position="relative" backgroundColor="frenchVanilla100">
54
- <StyledPanel touched={true} variant="alternate">
55
- <Flex as="ul" flexDirection="column" rowGap="zero" paddingInlineStart="zero">
56
- <Flex.Item as="li" listStyle="none">
57
- <Expandable padding="zero">
58
- <StyledExpandable paddingTop="m" paddingBottom="xxs" paddingX="m" textAlign="center">
59
- <SystemIcon icon={ribbonIcon} paddingRight="s" />
60
- <Expandable.Title padding="zero">
61
- <BodyText size="small" fontWeight="bold" color="blackpepper300" marginY="zero">
62
- Bestsellers
63
- </BodyText>
64
- <Subtext size="medium" color="blackpepper300" marginY="zero">
65
- Award winning sweet treats
66
- </Subtext>
67
- </Expandable.Title>
68
- <Expandable.Icon iconPosition="end" />
69
- </StyledExpandable>
70
- <Expandable.Content paddingY="zero" paddingX="zero" as="ul">
71
- {bestsellers.map(item => {
72
- return (
73
- <li>
74
- <StyledLink
75
- size="large"
76
- display="flex"
77
- textDecoration="none"
78
- paddingLeft="xxl"
79
- paddingTop="xxs"
80
- paddingBottom="zero"
81
- href={item.linkValue}
82
- >
83
- {item.value}
84
- </StyledLink>
85
- </li>
86
- );
87
- })}
88
- </Expandable.Content>
89
- </Expandable>
90
- </Flex.Item>
91
- <Flex.Item as="li" listStyle="none">
92
- <Expandable padding="zero">
93
- <StyledExpandable paddingTop="m" paddingBottom="xxs" paddingX="m" textAlign="center">
94
- <SystemIcon icon={birthdayIcon} paddingRight="s" />
95
- <Expandable.Title padding="zero">
96
- <BodyText size="small" fontWeight="bold" color="blackpepper300" marginY="zero">
97
- Custom Cakes
98
- </BodyText>
99
- <Subtext size="medium" color="blackpepper300" marginY="zero">
100
- To celebrate your life milestones
101
- </Subtext>
102
- </Expandable.Title>
103
- <Expandable.Icon iconPosition="end" />
104
- </StyledExpandable>
105
- <Expandable.Content paddingY="zero" paddingX="zero" as="ul">
106
- {cakes.map(item => {
107
- return (
108
- <li>
109
- <StyledLink
110
- size="large"
111
- display="flex"
112
- textDecoration="none"
113
- paddingLeft="xxl"
114
- paddingTop="xxs"
115
- paddingBottom="zero"
116
- href={item.linkValue}
117
- >
118
- {item.value}
119
- </StyledLink>
120
- </li>
121
- );
122
- })}
123
- </Expandable.Content>
124
- </Expandable>
125
- </Flex.Item>
126
- </Flex>
127
- </StyledPanel>
158
+ <Flex cs={stylesOverride.navContainer}>
159
+ <SidePanel as="nav" {...panelProps}>
160
+ <Heading size="small" {...labelProps} hidden={!expanded ? true : undefined}>
161
+ Cake or Death Bakery
162
+ </Heading>
163
+ <SidePanel.ToggleButton {...controlProps} />
164
+ {expanded ? <ExpandedView /> : <CompactView />}
165
+ </SidePanel>
128
166
  </Flex>
129
167
  );
130
168
  };
@@ -1,28 +1,46 @@
1
1
  import * as React from 'react';
2
- import {styled} from '@workday/canvas-kit-react/common';
3
- import {depth} from '@workday/canvas-kit-react/tokens';
4
2
  import {SidePanel, useSidePanel} from '@workday/canvas-kit-preview-react/side-panel';
5
3
  import {Flex, Box} from '@workday/canvas-kit-react/layout';
6
- import {Text} from '@workday/canvas-kit-react/text';
4
+ import {Heading} from '@workday/canvas-kit-react/text';
5
+ import {createStyles, px2rem} from '@workday/canvas-kit-styling';
6
+ import {system, base} from '@workday/canvas-tokens-web';
7
7
 
8
- const StyledPanel = styled(SidePanel)({
9
- ...depth[6],
10
- zIndex: 1,
11
- });
8
+ const stylesOverride = {
9
+ panelContainer: createStyles({
10
+ height: px2rem(320),
11
+ backgroundColor: base.soap100,
12
+ position: 'relative',
13
+ }),
14
+ panelContent: createStyles({
15
+ alignItems: 'center',
16
+ paddingY: system.space.x4,
17
+ paddingX: system.space.x4,
18
+ }),
19
+ panel: createStyles({
20
+ zIndex: 1,
21
+ }),
22
+ overlay: createStyles({
23
+ position: 'absolute',
24
+ background: system.color.bg.overlay,
25
+ height: '100%',
26
+ width: '100%',
27
+ }),
28
+ };
12
29
 
13
30
  export default () => {
14
- const {labelProps} = useSidePanel();
31
+ const {expanded, panelProps, labelProps, controlProps} = useSidePanel();
15
32
 
16
33
  return (
17
- <Flex height={320} backgroundColor="soap100" position="relative">
18
- <StyledPanel touched={true} variant="alternate">
19
- <Flex alignItems="center" paddingY="s" paddingX="s">
20
- <Text as="h3" typeLevel="body.large" fontWeight="bold" color="licorice500">
34
+ <Flex cs={stylesOverride.panelContainer}>
35
+ <SidePanel className={stylesOverride.panel} {...panelProps} variant="alternate">
36
+ <Flex cs={stylesOverride.panelContainer}>
37
+ <Heading size="small" {...labelProps} hidden={!expanded ? true : undefined}>
21
38
  Alternate Panel
22
- </Text>
39
+ </Heading>
40
+ <SidePanel.ToggleButton {...controlProps} />
23
41
  </Flex>
24
- </StyledPanel>
25
- <Box position="absolute" background="rgba(0,0,0,0.65)" height="100%" width="100%" />
42
+ </SidePanel>
43
+ {expanded && <Box cs={stylesOverride.overlay} />}
26
44
  </Flex>
27
45
  );
28
46
  };
@@ -45,7 +45,7 @@ const SelectableRow = createComponent('tr')({
45
45
  <Checkbox checked={rowData.checked} onChange={onSelect} />
46
46
  </Tooltip>
47
47
  </Table.Cell>
48
- <Table.Cell cs={tableCellStyles} scope="row">
48
+ <Table.Cell as="th" cs={tableCellStyles} scope="row">
49
49
  {rowData.name}
50
50
  </Table.Cell>
51
51
  <Table.Cell cs={tableCellStyles}>{rowData.amount}</Table.Cell>
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {ActionBar} from '@workday/canvas-kit-react/action-bar';
3
2
  import {PrimaryButton} from '@workday/canvas-kit-react/button';
4
3
 
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {ActionBar} from '@workday/canvas-kit-react/action-bar';
4
2
  import {DeleteButton} from '@workday/canvas-kit-react/button';
5
3
 
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {ActionBar} from '@workday/canvas-kit-react/action-bar';
4
2
  import {notificationsIcon, alarmClockIcon} from '@workday/canvas-system-icons-web';
5
3
  import {PrimaryButton} from '@workday/canvas-kit-react/button';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {createStyles} from '@workday/canvas-kit-styling';
4
3
  import {system} from '@workday/canvas-tokens-web';
@@ -12,7 +11,7 @@ const containerStyles = createStyles({
12
11
 
13
12
  export default () => (
14
13
  <div className={containerStyles}>
15
- <Avatar onClick={handleAvatarButtonClick} />
16
- <Avatar as="div" />
14
+ <Avatar altText="Avatar" onClick={handleAvatarButtonClick} />
15
+ <Avatar altText="Avatar" as="div" />
17
16
  </div>
18
17
  );
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {createStyles} from '@workday/canvas-kit-styling';
4
3
  import {system} from '@workday/canvas-tokens-web';
@@ -14,8 +13,8 @@ const containerStyles = createStyles({
14
13
 
15
14
  export default () => (
16
15
  <div className={containerStyles}>
17
- <Avatar variant="dark" onClick={handleAvatarButtonClick} />
18
- <Avatar onClick={handleAvatarButtonClick} />
19
- <Avatar url={testAvatar} onClick={handleAvatarButtonClick} />
16
+ <Avatar altText="Avatar" variant="dark" onClick={handleAvatarButtonClick} />
17
+ <Avatar altText="Avatar" onClick={handleAvatarButtonClick} />
18
+ <Avatar altText="Avatar" url={testAvatar} onClick={handleAvatarButtonClick} />
20
19
  </div>
21
20
  );
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {createStencil, createStyles} from '@workday/canvas-kit-styling';
4
3
  import {base, system} from '@workday/canvas-tokens-web';
@@ -29,7 +28,7 @@ const containerStyles = createStyles({
29
28
 
30
29
  export default () => (
31
30
  <div className={containerStyles}>
32
- <Avatar as="div" {...customBlueAvatarStencil()} />
33
- <Avatar as="div" {...customGreenAvatarStencil()} />
31
+ <Avatar altText="Avatar" as="div" {...customBlueAvatarStencil()} />
32
+ <Avatar altText="Avatar" as="div" {...customGreenAvatarStencil()} />
34
33
  </div>
35
34
  );
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  // @ts-ignore: Cannot find module error
4
3
  import testAvatar from './test-avatar.png';
@@ -14,13 +13,13 @@ const containerStyles = createStyles({
14
13
  export default () => (
15
14
  <div className={containerStyles}>
16
15
  <h3>Working Images</h3>
17
- <Avatar size="extraExtraLarge" as="div" url={testAvatar} />
18
- <Avatar size="extraLarge" as="div" url={testAvatar} />
19
- <Avatar size="large" as="div" url={testAvatar} />
20
- <Avatar size="medium" as="div" url={testAvatar} />
21
- <Avatar size="small" as="div" url={testAvatar} />
22
- <Avatar size="extraSmall" as="div" url={testAvatar} />
16
+ <Avatar altText="Avatar" size="extraExtraLarge" as="div" url={testAvatar} />
17
+ <Avatar altText="Avatar" size="extraLarge" as="div" url={testAvatar} />
18
+ <Avatar altText="Avatar" size="large" as="div" url={testAvatar} />
19
+ <Avatar altText="Avatar" size="medium" as="div" url={testAvatar} />
20
+ <Avatar altText="Avatar" size="small" as="div" url={testAvatar} />
21
+ <Avatar altText="Avatar" size="extraSmall" as="div" url={testAvatar} />
23
22
  <h3>Broken Image</h3>
24
- <Avatar url="/fake/path/to/image.png" as="div" />
23
+ <Avatar altText="Avatar" url="/fake/path/to/image.png" as="div" />
25
24
  </div>
26
25
  );
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  // @ts-ignore: Cannot find module error
4
3
  import testAvatar from './test-avatar.png';
@@ -7,7 +6,13 @@ export default () => (
7
6
  <div className="story">
8
7
  {Array.from({length: 5}, (v, index) => (
9
8
  <>
10
- <Avatar key={index} as="div" size="medium" url={testAvatar + '?v=' + index} />
9
+ <Avatar
10
+ altText="Avatar"
11
+ key={index}
12
+ as="div"
13
+ size="medium"
14
+ url={testAvatar + '?v=' + index}
15
+ />
11
16
  <br />
12
17
  </>
13
18
  ))}
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {px2rem} from '@workday/canvas-kit-styling';
4
3
 
@@ -7,9 +6,10 @@ export default () => (
7
6
  <h3>Original Rectangle Image</h3>
8
7
  <img alt="" src="https://picsum.photos/id/237/300/200" />
9
8
  <h3>Object fit on a Rectangle Image</h3>
10
- <Avatar as="div" url="https://picsum.photos/id/237/300/200" />
9
+ <Avatar altText="Avatar" as="div" url="https://picsum.photos/id/237/300/200" />
11
10
  <h3>Object fit on a Rectangle Image using Dynamic Size</h3>
12
11
  <Avatar
12
+ altText="Avatar"
13
13
  as="div"
14
14
  size={px2rem(200)}
15
15
  url="https://picsum.photos/id/237/300/200"
@@ -18,8 +18,13 @@ export default () => (
18
18
  <h3>Original Square Image</h3>
19
19
  <img alt="" src="https://picsum.photos/id/237/300/300" />
20
20
  <h3>Object fit on a Square Image</h3>
21
- <Avatar as="div" url="https://picsum.photos/id/237/300/300" />
21
+ <Avatar altText="Avatar" as="div" url="https://picsum.photos/id/237/300/300" />
22
22
  <h3>Object fit on a Square Image using Dynamic Size</h3>
23
- <Avatar as="div" size={px2rem(200)} url="https://picsum.photos/id/237/300/300" />
23
+ <Avatar
24
+ altText="Avatar"
25
+ as="div"
26
+ size={px2rem(200)}
27
+ url="https://picsum.photos/id/237/300/300"
28
+ />
24
29
  </div>
25
30
  );
@@ -1,28 +1,27 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
  import {px2rem} from '@workday/canvas-kit-styling';
4
3
 
5
4
  export default () => (
6
5
  <div className="story">
7
6
  <h3>Extra-Extra Large</h3>
8
- <Avatar as="div" size="extraExtraLarge" />
7
+ <Avatar altText="Avatar" as="div" size="extraExtraLarge" />
9
8
  <h3>Extra Large</h3>
10
- <Avatar as="div" size="extraLarge" />
9
+ <Avatar altText="Avatar" as="div" size="extraLarge" />
11
10
  <h3>Large</h3>
12
- <Avatar as="div" size="large" />
11
+ <Avatar altText="Avatar" as="div" size="large" />
13
12
  <h3>Medium</h3>
14
- <Avatar as="div" size="medium" />
13
+ <Avatar altText="Avatar" as="div" size="medium" />
15
14
  <h3>Small</h3>
16
- <Avatar as="div" size="small" />
15
+ <Avatar altText="Avatar" as="div" size="small" />
17
16
  <h3>Extra Small</h3>
18
- <Avatar as="div" size="extraSmall" />
17
+ <Avatar altText="Avatar" as="div" size="extraSmall" />
19
18
  <h3>30px</h3>
20
- <Avatar as="div" size={px2rem(30)} />
19
+ <Avatar altText="Avatar" as="div" size={px2rem(30)} />
21
20
  <h3>40px</h3>
22
- <Avatar as="div" size={px2rem(40)} />
21
+ <Avatar altText="Avatar" as="div" size={px2rem(40)} />
23
22
  <h3>3rem</h3>
24
- <Avatar as="div" size="3rem" />
23
+ <Avatar altText="Avatar" as="div" size="3rem" />
25
24
  <h3>4rem</h3>
26
- <Avatar as="div" size="4rem" />
25
+ <Avatar altText="Avatar" as="div" size="4rem" />
27
26
  </div>
28
27
  );
@@ -1,11 +1,10 @@
1
- import React from 'react';
2
1
  import {Avatar} from '@workday/canvas-kit-react/avatar';
3
2
 
4
3
  export default () => (
5
4
  <div className="story">
6
5
  <h3>Light</h3>
7
- <Avatar as="div" size="medium" />
6
+ <Avatar altText="Avatar" as="div" size="medium" />
8
7
  <h3>Dark</h3>
9
- <Avatar as="div" size="medium" variant="dark" />
8
+ <Avatar altText="Avatar" as="div" size="medium" variant="dark" />
10
9
  </div>
11
10
  );