@workday/canvas-kit-docs 13.0.0-alpha.996-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 +270163 -169419
  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 +11 -0
  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 +70 -0
  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,55 @@
1
+ import {Flex} from '@workday/canvas-kit-react/layout';
2
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
3
+ import {system} from '@workday/canvas-tokens-web';
4
+ import {createStyles} from '@workday/canvas-kit-styling';
5
+
6
+ const contentTextStyles = createStyles({
7
+ margin: 0,
8
+ });
9
+
10
+ const contentListStyles = createStyles({
11
+ listStyle: 'inside',
12
+ marginInlineStart: 0,
13
+ marginBlockStart: system.space.x2,
14
+ marginBlockEnd: 0,
15
+ padding: 0,
16
+ });
17
+
18
+ export default () => {
19
+ return (
20
+ <Flex flexDirection={'column'} gap={system.space.x2}>
21
+ <InformationHighlight variant={'informational'}>
22
+ <InformationHighlight.Icon />
23
+ <InformationHighlight.Heading> Informational Highlight </InformationHighlight.Heading>
24
+ <InformationHighlight.Body>
25
+ <p className={contentTextStyles}>
26
+ This is a low-emphasis, informational callout. You should use this for nice-to-have
27
+ information, such as:
28
+ </p>
29
+ <ul className={contentListStyles}>
30
+ <li>tangential information or context</li>
31
+ <li>related features</li>
32
+ <li>additional opportunities</li>
33
+ </ul>
34
+ </InformationHighlight.Body>
35
+ <InformationHighlight.Link href="#hyperlink">Learn More</InformationHighlight.Link>
36
+ </InformationHighlight>
37
+ <InformationHighlight variant={'informational'} emphasis={'high'}>
38
+ <InformationHighlight.Icon />
39
+ <InformationHighlight.Heading> Informational Highlight </InformationHighlight.Heading>
40
+ <InformationHighlight.Body>
41
+ <p className={contentTextStyles}>
42
+ This is a high-emphasis, informational callout. You should use this for nice-to-have
43
+ information, such as:
44
+ </p>
45
+ <ul className={contentListStyles}>
46
+ <li>tangential information or context</li>
47
+ <li>related features</li>
48
+ <li>additional opportunities</li>
49
+ </ul>
50
+ </InformationHighlight.Body>
51
+ <InformationHighlight.Link href="#hyperlink">Learn More</InformationHighlight.Link>
52
+ </InformationHighlight>
53
+ </Flex>
54
+ );
55
+ };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import {Flex} from '@workday/canvas-kit-react/layout';
3
- import {InformationHighlight} from '@workday/canvas-kit-preview-react/InformationHighlight';
3
+ import {InformationHighlight} from '@workday/canvas-kit-preview-react/information-highlight';
4
4
  import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common';
5
5
  import {system} from '@workday/canvas-tokens-web';
6
6
  export default () => {
@@ -35,7 +35,7 @@ export default () => {
35
35
  };
36
36
 
37
37
  return (
38
- <>
38
+ <div>
39
39
  <div className={containerStyles}>
40
40
  {quote && <Text cs={{maxWidth: '60ch'}}>{quote}</Text>}
41
41
  <AriaLiveRegion>
@@ -46,7 +46,7 @@ export default () => {
46
46
  </AriaLiveRegion>
47
47
  </div>
48
48
  <SecondaryButton onClick={handleClick}>Generate Quote</SecondaryButton>
49
- </>
49
+ </div>
50
50
  );
51
51
  };
52
52
 
@@ -9,7 +9,7 @@ export default () => {
9
9
  return (
10
10
  <>
11
11
  <MultiSelect items={items} initialSelectedIds={['Olives', 'Onions', 'Pepperoni']}>
12
- <FormField orientation="horizontal">
12
+ <FormField orientation="horizontalStart">
13
13
  <FormField.Label>Toppings</FormField.Label>
14
14
  <FormField.Input
15
15
  as={MultiSelect.Input}
@@ -34,7 +34,7 @@ export default () => {
34
34
  >
35
35
  <main className={mainContentStyles}>
36
36
  <MultiSelect items={items} getId={i => i.id} getTextValue={i => i.text}>
37
- <FormField orientation="horizontal">
37
+ <FormField orientation="horizontalStart">
38
38
  <FormField.Label>Toppings</FormField.Label>
39
39
  <FormField.Input
40
40
  as={MultiSelect.Input}
@@ -41,7 +41,7 @@ export default () => {
41
41
  >
42
42
  <Flex gap="s" flexDirection="column">
43
43
  <MultiSelect items={items}>
44
- <FormField orientation="horizontal">
44
+ <FormField orientation="horizontalStart">
45
45
  <FormField.Label>Toppings</FormField.Label>
46
46
  <FormField.Input
47
47
  as={MultiSelect.Input}
@@ -21,7 +21,7 @@ const items = [
21
21
  export default () => {
22
22
  return (
23
23
  <MultiSelect items={items}>
24
- <FormField orientation="horizontal">
24
+ <FormField orientation="horizontalStart">
25
25
  <FormField.Label>Controls</FormField.Label>
26
26
  <FormField.Input
27
27
  as={MultiSelect.Input}
@@ -83,7 +83,7 @@ export default () => {
83
83
  >
84
84
  <main className={mainContentStyles}>
85
85
  <MultiSelect model={model}>
86
- <FormField orientation="horizontal">
86
+ <FormField orientation="horizontalStart">
87
87
  <FormField.Label>Fruits</FormField.Label>
88
88
  <FormField.Input
89
89
  as={MultiSelect.SearchInput}
@@ -6,6 +6,7 @@ import Basic from './examples/Basic';
6
6
  import WithCount from './examples/WithCount';
7
7
  import WithRemovable from './examples/WithRemovable';
8
8
  import WithList from './examples/WithList';
9
+ import CustomStyles from './examples/CustomStyles';
9
10
 
10
11
 
11
12
  # Canvas Kit Pill
@@ -27,7 +28,7 @@ information to help with scanning and organization.
27
28
 
28
29
  ### Basic Pills
29
30
 
30
- By default a Pill is considered interactive, therefore it's default variant is `default`.All leading
31
+ By default a Pill is considered interactive, therefore it's default variant is `default`. All leading
31
32
  elements (icons or avatars) are intended to be descriptive, helping support the label. Do not rely
32
33
  on the leading element to indicate the interaction behavior.
33
34
 
@@ -35,7 +36,11 @@ on the leading element to indicate the interaction behavior.
35
36
 
36
37
  You can render an icon inside the `Pill` with `Pill.Icon`. It will render a `plusIcon` by default,
37
38
  but it can be customized by providing an icon to the `icon` prop. Because it uses `SystemIcon` under
38
- the hood, you also have to all `SystemIconProps`.
39
+ the hood, you also have access to all `SystemIconProps`.
40
+
41
+ #### Accessibility
42
+
43
+ You must provide an `aria-label` to the `Pill.Icon` for proper accessibility.
39
44
 
40
45
  <ExampleCodeBlock code={Basic} />
41
46
 
@@ -49,19 +54,15 @@ You can render an avatar image inside the `Pill` with `Pill.Avatar`. It should a
49
54
  #### Count
50
55
 
51
56
  The count appears after the label. It is usually associated with the label. If you have a category,
52
- the count will dirrectly correlate to that category.
57
+ the count will directly correlate to that category.
53
58
 
54
59
  <ExampleCodeBlock code={WithCount} />
55
60
 
56
61
  ### Read Only
57
62
 
58
- If the `Pill` has `variant='readOnly'`, it will look like a read-only `Pill`. This is a
59
- non-interactive element that is used to display information.
63
+ The `readOnly` variant is a non-interactive element that is used to display information.
60
64
 
61
- > **_NOTE:_** `maxWidth` measures the width of the `Pill.Label` (or text) and not the width of the
62
- > entire `Pill`. By default, this `maxWidth` is set to `200px` and the text will be truncated with
63
- > an ellipsis and render an OverflowTooltip on hover and focus. This max width can be changed by
64
- > providing a `maxWidth` prop on the Pill.
65
+ You can define a read only `Pill` by providing a `variant='readOnly'` prop.
65
66
 
66
67
  <ExampleCodeBlock code={WithReadOnly} />
67
68
 
@@ -97,6 +98,14 @@ accordingly.
97
98
 
98
99
  <ExampleCodeBlock code={WithList} />
99
100
 
101
+ ### Custom Styles
102
+
103
+ `Pill` supports custom styling via the `cs` prop. For more information, check our
104
+ ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-how-to-customize-styles--docs)
105
+ or view the example below.
106
+
107
+ <ExampleCodeBlock code={CustomStyles} />
108
+
100
109
  ## Component API
101
110
 
102
111
  <SymbolDoc name="Pill" fileName="/preview-react/" />
@@ -2,24 +2,30 @@ import React from 'react';
2
2
 
3
3
  import {Pill} from '@workday/canvas-kit-preview-react/pill';
4
4
 
5
- import {Box, Flex} from '@workday/canvas-kit-react/layout';
6
5
  import {BodyText} from '@workday/canvas-kit-react/text';
6
+ import {createStyles} from '@workday/canvas-kit-styling';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+
9
+ const flexStyles = createStyles({
10
+ display: 'flex',
11
+ gap: system.space.x2,
12
+ });
7
13
 
8
14
  export default () => {
9
15
  const [text, setText] = React.useState('');
10
16
  return (
11
- <Box>
12
- <Flex gap="xxs">
17
+ <div>
18
+ <div className={flexStyles}>
13
19
  <Pill onClick={() => setText('The first pill is clicked!')}>
14
- <Pill.Icon />
20
+ <Pill.Icon aria-label="Add user" />
15
21
  <Pill.Label>Regina Skeltor</Pill.Label>
16
22
  </Pill>
17
- <Pill onClick={() => setText('The second pill is clicked!')} disabled>
18
- <Pill.Icon />
23
+ <Pill disabled>
24
+ <Pill.Icon aria-label="Add user" />
19
25
  <Pill.Label>Regina Skeltor</Pill.Label>
20
26
  </Pill>
21
- </Flex>
27
+ </div>
22
28
  <BodyText size="medium">{text}</BodyText>
23
- </Box>
29
+ </div>
24
30
  );
25
31
  };
@@ -0,0 +1,45 @@
1
+ import {Pill, pillCountStencil, pillStencil} from '@workday/canvas-kit-preview-react/pill';
2
+
3
+ import {createStencil} from '@workday/canvas-kit-styling';
4
+ import {base} from '@workday/canvas-tokens-web';
5
+ import {systemIconStencil} from '@workday/canvas-kit-react/icon';
6
+
7
+ const customPillStencil = createStencil({
8
+ base: {
9
+ [pillStencil.vars.background]: base.berrySmoothie300,
10
+ [pillStencil.vars.border]: base.berrySmoothie500,
11
+ [pillStencil.vars.label]: base.frenchVanilla100,
12
+ [systemIconStencil.vars.color]: base.frenchVanilla100,
13
+ [pillCountStencil.vars.backgroundColor]: base.berrySmoothie400,
14
+
15
+ '&:hover, &.hover': {
16
+ [pillStencil.vars.background]: base.berrySmoothie400,
17
+ [pillStencil.vars.label]: base.frenchVanilla100,
18
+ [pillCountStencil.vars.backgroundColor]: base.berrySmoothie500,
19
+ [systemIconStencil.vars.color]: base.frenchVanilla100,
20
+ },
21
+ '&:active, &.active': {
22
+ [pillStencil.vars.background]: base.berrySmoothie400,
23
+ [pillStencil.vars.label]: base.frenchVanilla100,
24
+ [systemIconStencil.vars.color]: base.frenchVanilla100,
25
+ [pillCountStencil.vars.backgroundColor]: base.berrySmoothie500,
26
+ },
27
+ '&:disabled, &.disabled': {
28
+ [pillStencil.vars.background]: base.berrySmoothie400,
29
+ [pillStencil.vars.label]: base.frenchVanilla100,
30
+ [systemIconStencil.vars.color]: base.frenchVanilla100,
31
+ },
32
+ },
33
+ });
34
+
35
+ export default () => {
36
+ return (
37
+ <div>
38
+ <Pill cs={customPillStencil()}>
39
+ <Pill.Icon aria-label="Add user" />
40
+ <Pill.Label>Custom Pill Color</Pill.Label>
41
+ <Pill.Count>10</Pill.Count>
42
+ </Pill>
43
+ </div>
44
+ );
45
+ };
@@ -3,24 +3,30 @@ import React from 'react';
3
3
  import {Pill} from '@workday/canvas-kit-preview-react/pill';
4
4
  // @ts-ignore: Cannot find module error
5
5
  import testAvatar from './test-avatar.png';
6
- import {Flex, Box} from '@workday/canvas-kit-react/layout';
7
6
  import {BodyText} from '@workday/canvas-kit-react/text';
7
+ import {createStyles} from '@workday/canvas-kit-styling';
8
+ import {system} from '@workday/canvas-tokens-web';
9
+
10
+ const flexStyles = createStyles({
11
+ display: 'flex',
12
+ gap: system.space.x2,
13
+ });
8
14
 
9
15
  export default () => {
10
16
  const [text, setText] = React.useState('');
11
17
  return (
12
- <Box>
13
- <Flex gap="xxs">
18
+ <div>
19
+ <div className={flexStyles}>
14
20
  <Pill onClick={() => setText('The first pill is clicked!')}>
15
- <Pill.Avatar url={testAvatar} />
16
- Regina Skeltor
21
+ <Pill.Avatar altText="Avatar" url={testAvatar} />
22
+ <Pill.Label>Regina Skeltor</Pill.Label>
17
23
  </Pill>
18
- <Pill onClick={() => setText('The second pill is clicked!')} disabled maxWidth={50}>
19
- <Pill.Avatar url={testAvatar} />
20
- Regina Skeltor
24
+ <Pill disabled>
25
+ <Pill.Avatar altText="Avatar" />
26
+ <Pill.Label>Regina Skeltor</Pill.Label>
21
27
  </Pill>
22
- </Flex>
28
+ </div>
23
29
  <BodyText size="medium">{text}</BodyText>
24
- </Box>
30
+ </div>
25
31
  );
26
32
  };
@@ -1,23 +1,29 @@
1
1
  import React from 'react';
2
2
  import {Pill} from '@workday/canvas-kit-preview-react/pill';
3
- import {Flex, Box} from '@workday/canvas-kit-react/layout';
4
3
  import {BodyText} from '@workday/canvas-kit-react/text';
4
+ import {createStyles} from '@workday/canvas-kit-styling';
5
+ import {system} from '@workday/canvas-tokens-web';
6
+
7
+ const flexStyles = createStyles({
8
+ display: 'flex',
9
+ gap: system.space.x2,
10
+ });
5
11
 
6
12
  export default () => {
7
13
  const [text, setText] = React.useState('');
8
14
  return (
9
- <Box>
10
- <Flex gap="xxs">
15
+ <div>
16
+ <div className={flexStyles}>
11
17
  <Pill onClick={() => setText('The first pill is clicked!')}>
12
18
  Shoes
13
19
  <Pill.Count>30</Pill.Count>
14
20
  </Pill>
15
- <Pill onClick={() => setText('The second pill is clicked!')} disabled>
21
+ <Pill disabled>
16
22
  Shoes
17
23
  <Pill.Count>30</Pill.Count>
18
24
  </Pill>
19
- </Flex>
25
+ </div>
20
26
  <BodyText size="medium">{text}</BodyText>
21
- </Box>
27
+ </div>
22
28
  );
23
29
  };
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
 
3
3
  import {Pill} from '@workday/canvas-kit-preview-react/pill';
4
- import {Flex} from '@workday/canvas-kit-react/layout';
4
+ import {createStyles} from '@workday/canvas-kit-styling';
5
+ import {system} from '@workday/canvas-tokens-web';
5
6
 
6
7
  const data = [
7
8
  'Shoes',
@@ -17,19 +18,28 @@ const data = [
17
18
  'Jewelry',
18
19
  ];
19
20
 
21
+ const flexWrapStyles = createStyles({
22
+ display: 'flex',
23
+ flexWrap: 'wrap',
24
+ gap: system.space.x2,
25
+ });
26
+
20
27
  export default () => {
21
28
  const [items, setItems] = React.useState(data);
22
29
 
23
30
  return (
24
- <Flex flexWrap="wrap">
31
+ <div className={flexWrapStyles}>
25
32
  {items.map((cat, index) => {
26
33
  return (
27
- <Pill key={index} variant="removable" marginBottom="xxs" marginInlineEnd="xxs">
34
+ <Pill key={index} variant="removable">
28
35
  <Pill.Label>{cat}</Pill.Label>
29
- <Pill.IconButton onClick={() => setItems(items.filter(i => i !== cat))} />
36
+ <Pill.IconButton
37
+ aria-label="Remove"
38
+ onClick={() => setItems(items.filter(i => i !== cat))}
39
+ />
30
40
  </Pill>
31
41
  );
32
42
  })}
33
- </Flex>
43
+ </div>
34
44
  );
35
45
  };
@@ -1,15 +1,18 @@
1
- import * as React from 'react';
2
-
3
1
  import {Pill} from '@workday/canvas-kit-preview-react/pill';
2
+ import {createStyles} from '@workday/canvas-kit-styling';
3
+ import {system} from '@workday/canvas-tokens-web';
4
4
 
5
- import {Flex} from '@workday/canvas-kit-react/layout';
5
+ const flexStyles = createStyles({
6
+ display: 'flex',
7
+ gap: system.space.x2,
8
+ });
6
9
 
7
10
  export default () => (
8
- <Flex gap="xxs" id="read-only-list">
11
+ <div className={flexStyles} id="read-only-list">
9
12
  <Pill variant="readOnly">Read-only</Pill>
10
13
  <Pill variant="readOnly" maxWidth={250}>
11
14
  Read-only but with super long text in case you want to read a paragraph in a Pill which we
12
15
  don't recommend
13
16
  </Pill>
14
- </Flex>
17
+ </div>
15
18
  );
@@ -3,29 +3,41 @@ import React from 'react';
3
3
  import {Pill} from '@workday/canvas-kit-preview-react/pill';
4
4
  // @ts-ignore: Cannot find module error
5
5
  import testAvatar from './test-avatar.png';
6
- import {Box, Flex} from '@workday/canvas-kit-react/layout';
7
6
  import {BodyText} from '@workday/canvas-kit-react/text';
7
+ import {system} from '@workday/canvas-tokens-web';
8
+ import {createStyles} from '@workday/canvas-kit-styling';
9
+
10
+ const flexStyles = createStyles({
11
+ display: 'flex',
12
+ gap: system.space.x2,
13
+ });
8
14
 
9
15
  export default () => {
10
16
  const [text, setText] = React.useState('');
11
17
  return (
12
- <Box>
13
- <Flex gap="xxs">
18
+ <div>
19
+ <div className={flexStyles}>
14
20
  <Pill variant="removable">
15
- Pink Shirts
16
- <Pill.IconButton onClick={() => setText('The first pill is clicked!')} />
21
+ <Pill.Label>Pink Shirts</Pill.Label>
22
+ <Pill.IconButton
23
+ aria-label="Remove"
24
+ onClick={() => setText('The first pill is clicked!')}
25
+ />
17
26
  </Pill>
18
27
  <Pill variant="removable">
19
- <Pill.Avatar url={testAvatar} />
20
- Carolyn Grimaldi
21
- <Pill.IconButton onClick={() => setText('The second pill is clicked!')} />
28
+ <Pill.Avatar altText="Avatar" url={testAvatar} />
29
+ <Pill.Label>Carolyn Grimaldi</Pill.Label>
30
+ <Pill.IconButton
31
+ aria-label="Remove"
32
+ onClick={() => setText('The second pill is clicked!')}
33
+ />
22
34
  </Pill>
23
35
  <Pill variant="removable" disabled>
24
36
  <Pill.Label>This is a category that should not exist because it is too long</Pill.Label>
25
- <Pill.IconButton />
37
+ <Pill.IconButton aria-label="Remove" />
26
38
  </Pill>
27
- </Flex>
39
+ </div>
28
40
  <BodyText size="medium">{text}</BodyText>
29
- </Box>
41
+ </div>
30
42
  );
31
43
  };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {SegmentedControl} from '@workday/canvas-kit-preview-react/segmented-control';
3
2
  import {
4
3
  gridIcon,
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {CanvasProvider, ContentDirection} from '@workday/canvas-kit-react/common';
3
2
  import {
4
3
  gridIcon,
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import {SegmentedControl} from '@workday/canvas-kit-preview-react/segmented-control';
3
2
  import {
4
3
  gridIcon,
@@ -7,7 +7,7 @@ import {controlComponent} from '../../../../../../utils/storybook';
7
7
 
8
8
  export default () => {
9
9
  return (
10
- <FormField orientation="horizontal" id="select-default-custom">
10
+ <FormField orientation="horizontalStart" id="select-default-custom">
11
11
  <FormField.Label>Label</FormField.Label>
12
12
  <FormField.Field>
13
13
  {controlComponent(
@@ -7,7 +7,7 @@ import {controlComponent} from '../../../../../../utils/storybook';
7
7
 
8
8
  export default () => {
9
9
  return (
10
- <FormField orientation="horizontal" id="select-default-simple">
10
+ <FormField orientation="horizontalStart" id="select-default-simple">
11
11
  <FormField.Label>Label</FormField.Label>
12
12
  <FormField.Field>
13
13
  {controlComponent(<FormField.Input as={Select} name="state" options={simpleOptions} />)}
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {hintText, options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {customOptions, customRenderOption, customRenderSelected} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {simpleOptions} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {hintText, options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {options} from '../storiesData';
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import {FormField} from '@workday/canvas-kit-react/form-field';
4
2
  import {Select} from '@workday/canvas-kit-preview-react/select';
5
3
  import {manyOptions} from '../storiesData';
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {SystemIcon} from '@workday/canvas-kit-react/icon';
3
2
  import {
4
3
  activityStreamIcon,
@@ -41,9 +41,12 @@ logic or styling for bidirecitonal support.
41
41
 
42
42
  ### Hidden Name
43
43
 
44
- `SidePanel` should always have an accessible label. Often this is the heading element with an `id`
45
- attribute. However, as seen in the example below, you can apply a `hidden` attribute to your label
46
- if you do not want it to be visible.
44
+ `SidePanel` must always have an accessible label for both the HTML `<section>` container and the
45
+ `ToggleButton`. The `labelProps` component must always be present in the DOM in order for the
46
+ `panelProps` and `controlProps` component labels to be assigned properly. A `hidden` attribute can
47
+ be applied to the `labelProps` component. In the example below, we are demonstrating the
48
+ `AccessibleHide` component that relies on CSS properties to visually hide text for screen readers
49
+ only.
47
50
 
48
51
  <ExampleCodeBlock code={HiddenName} />
49
52
 
@@ -60,6 +63,28 @@ used (this case is covered in the Examples section).
60
63
  Sometimes you'll want to control `SidePanel`'s' expand / collapse behavior from outside the
61
64
  component. In that case, you can use the `controlProps` supplied by the `useSidePanel` hook.
62
65
 
66
+ #### Notes about accessibility
67
+
68
+ The `controlProps` object delivers ARIA attributes to a component under the following assumptions:
69
+
70
+ 1. The control is an icon button that does not already have an accessible name
71
+ 2. The control appears at (or near) the top of the expandable content in the `SidePanel`
72
+
73
+ Spreading the `controlProps` onto an external control can introduce serious accessibility issues:
74
+
75
+ - `aria-labelledby` HTML `id` reference may become invalid when the SidePanel is collapsed, or when
76
+ the `labelProps` component isn't present in the DOM.
77
+ - `aria-labelledby` will change the name of `controlProps` component to the title of the
78
+ `SidePanel`. (This may be undesirable. For example, the "Show Side Panel" button will be
79
+ overwritten with the "Tasks Panel" heading.)
80
+ - `aria-expanded` won't make sense to screen reader users when the expanded `SidePanel` content
81
+ isn't logically following the control.
82
+ - `aria-controls` is unsupported by screen readers and will not allow users to navigate to the
83
+ controlled content.
84
+
85
+ In the following example, the `controlProps` click handler function is passed down to the
86
+ `SecondaryButton` and a toggle state was added to the button using the `aria-pressed` property.
87
+
63
88
  <ExampleCodeBlock code={ExternalControl} />
64
89
 
65
90
  ### Right Origin