@workday/canvas-kit-preview-react 8.0.0 → 8.0.2

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 (354) hide show
  1. package/color-picker/README.md +1 -1
  2. package/color-picker/index.ts +1 -1
  3. package/color-picker/lib/ColorPicker.tsx +2 -3
  4. package/dist/commonjs/color-picker/index.d.ts +1 -1
  5. package/dist/commonjs/color-picker/index.d.ts.map +1 -1
  6. package/dist/commonjs/color-picker/index.js +2 -6
  7. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts +1 -2
  8. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
  9. package/dist/commonjs/color-picker/lib/ColorPicker.js +5 -4
  10. package/dist/commonjs/form-field/lib/FormField.d.ts +2 -11
  11. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
  12. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
  13. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
  14. package/dist/commonjs/form-field/lib/FormFieldHint.js +2 -3
  15. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
  16. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  17. package/dist/commonjs/form-field/lib/FormFieldLabel.js +3 -9
  18. package/dist/commonjs/index.d.ts +2 -1
  19. package/dist/commonjs/index.d.ts.map +1 -1
  20. package/dist/commonjs/index.js +2 -2
  21. package/dist/commonjs/menu/index.d.ts +1 -4
  22. package/dist/commonjs/menu/index.d.ts.map +1 -1
  23. package/dist/commonjs/menu/index.js +1 -9
  24. package/dist/commonjs/menu/lib/Menu.d.ts +37 -13
  25. package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
  26. package/dist/commonjs/menu/lib/Menu.js +43 -22
  27. package/dist/commonjs/menu/lib/MenuItem.d.ts +35 -14
  28. package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
  29. package/dist/commonjs/menu/lib/MenuItem.js +24 -9
  30. package/dist/commonjs/pill/lib/Pill.d.ts +0 -10
  31. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
  32. package/dist/commonjs/segmented-control/index.d.ts +3 -0
  33. package/dist/commonjs/segmented-control/index.d.ts.map +1 -0
  34. package/dist/commonjs/{breadcrumbs → segmented-control}/index.js +2 -5
  35. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +1004 -0
  36. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
  37. package/dist/commonjs/segmented-control/lib/SegmentedControl.js +22 -0
  38. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +103 -0
  39. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
  40. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +130 -0
  41. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +66 -0
  42. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
  43. package/dist/commonjs/{breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js → segmented-control/lib/SegmentedControlList.js} +21 -28
  44. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +60 -0
  45. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
  46. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +23 -0
  47. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1052 -0
  48. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
  49. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +74 -0
  50. package/dist/commonjs/select/index.d.ts +0 -3
  51. package/dist/commonjs/select/index.d.ts.map +1 -1
  52. package/dist/commonjs/select/index.js +0 -7
  53. package/dist/commonjs/select/lib/Select.d.ts +0 -1
  54. package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
  55. package/dist/commonjs/select/lib/Select.js +2 -6
  56. package/dist/commonjs/select/lib/SelectBase.d.ts +2 -2
  57. package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
  58. package/dist/commonjs/select/lib/SelectBase.js +6 -9
  59. package/dist/commonjs/select/lib/SelectMenu.d.ts +2 -2
  60. package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
  61. package/dist/commonjs/select/lib/SelectMenu.js +2 -2
  62. package/dist/commonjs/select/lib/SelectOption.d.ts +1 -2
  63. package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
  64. package/dist/commonjs/select/lib/SelectOption.js +2 -1
  65. package/dist/commonjs/side-panel/index.d.ts +0 -3
  66. package/dist/commonjs/side-panel/index.d.ts.map +1 -1
  67. package/dist/commonjs/side-panel/index.js +0 -7
  68. package/dist/commonjs/side-panel/lib/SidePanel.d.ts +1 -2
  69. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  70. package/dist/commonjs/side-panel/lib/SidePanel.js +3 -3
  71. package/dist/commonjs/status-indicator/index.d.ts +2 -0
  72. package/dist/commonjs/status-indicator/index.d.ts.map +1 -0
  73. package/dist/commonjs/status-indicator/index.js +13 -0
  74. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +42 -0
  75. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
  76. package/dist/commonjs/status-indicator/lib/StatusIndicator.js +55 -0
  77. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts +73 -0
  78. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
  79. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +98 -0
  80. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
  81. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
  82. package/dist/commonjs/{breadcrumbs/lib/Breadcrumbs/List/index.js → status-indicator/lib/StatusIndicatorLabel.js} +6 -6
  83. package/dist/commonjs/status-indicator/lib/hooks/index.d.ts +2 -0
  84. package/dist/commonjs/status-indicator/lib/hooks/index.d.ts.map +1 -0
  85. package/dist/commonjs/status-indicator/lib/hooks/index.js +13 -0
  86. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
  87. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
  88. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.js +34 -0
  89. package/dist/commonjs/text-area/lib/TextArea.d.ts +2 -11
  90. package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
  91. package/dist/commonjs/text-area/lib/TextAreaField.d.ts +1 -1
  92. package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
  93. package/dist/commonjs/text-area/lib/TextAreaField.js +15 -7
  94. package/dist/commonjs/text-input/lib/TextInput.d.ts +2 -11
  95. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
  96. package/dist/commonjs/text-input/lib/TextInputField.d.ts +1 -1
  97. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
  98. package/dist/commonjs/text-input/lib/TextInputField.js +14 -7
  99. package/dist/es6/color-picker/index.d.ts +1 -1
  100. package/dist/es6/color-picker/index.d.ts.map +1 -1
  101. package/dist/es6/color-picker/index.js +1 -1
  102. package/dist/es6/color-picker/lib/ColorPicker.d.ts +1 -2
  103. package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
  104. package/dist/es6/color-picker/lib/ColorPicker.js +2 -3
  105. package/dist/es6/form-field/lib/FormField.d.ts +2 -11
  106. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
  107. package/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
  108. package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
  109. package/dist/es6/form-field/lib/FormFieldHint.js +4 -5
  110. package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
  111. package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  112. package/dist/es6/form-field/lib/FormFieldLabel.js +5 -11
  113. package/dist/es6/index.d.ts +2 -1
  114. package/dist/es6/index.d.ts.map +1 -1
  115. package/dist/es6/index.js +2 -2
  116. package/dist/es6/menu/index.d.ts +1 -4
  117. package/dist/es6/menu/index.d.ts.map +1 -1
  118. package/dist/es6/menu/index.js +1 -4
  119. package/dist/es6/menu/lib/Menu.d.ts +37 -13
  120. package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
  121. package/dist/es6/menu/lib/Menu.js +42 -22
  122. package/dist/es6/menu/lib/MenuItem.d.ts +35 -14
  123. package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
  124. package/dist/es6/menu/lib/MenuItem.js +23 -9
  125. package/dist/es6/pill/lib/Pill.d.ts +6 -16
  126. package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
  127. package/dist/es6/pill/lib/PillAvatar.d.ts +1 -2
  128. package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -1
  129. package/dist/es6/pill/lib/PillIcon.d.ts +1 -2
  130. package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -1
  131. package/dist/es6/pill/lib/PillIconButton.d.ts +1 -2
  132. package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -1
  133. package/dist/es6/pill/lib/PillLabel.d.ts +1 -2
  134. package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -1
  135. package/dist/es6/pill/lib/usePillModel.d.ts +5 -5
  136. package/dist/es6/segmented-control/index.d.ts +3 -0
  137. package/dist/es6/segmented-control/index.d.ts.map +1 -0
  138. package/dist/es6/segmented-control/index.js +2 -0
  139. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +1004 -0
  140. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
  141. package/dist/es6/segmented-control/lib/SegmentedControl.js +16 -0
  142. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +103 -0
  143. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
  144. package/dist/es6/segmented-control/lib/SegmentedControlItem.js +108 -0
  145. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +66 -0
  146. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
  147. package/dist/es6/segmented-control/lib/SegmentedControlList.js +44 -0
  148. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +60 -0
  149. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
  150. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +20 -0
  151. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1052 -0
  152. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
  153. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +68 -0
  154. package/dist/es6/select/index.d.ts +0 -3
  155. package/dist/es6/select/index.d.ts.map +1 -1
  156. package/dist/es6/select/index.js +0 -3
  157. package/dist/es6/select/lib/Select.d.ts +0 -1
  158. package/dist/es6/select/lib/Select.d.ts.map +1 -1
  159. package/dist/es6/select/lib/Select.js +1 -2
  160. package/dist/es6/select/lib/SelectBase.d.ts +2 -2
  161. package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
  162. package/dist/es6/select/lib/SelectBase.js +3 -4
  163. package/dist/es6/select/lib/SelectMenu.d.ts +2 -2
  164. package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
  165. package/dist/es6/select/lib/SelectMenu.js +1 -2
  166. package/dist/es6/select/lib/SelectOption.d.ts +1 -2
  167. package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
  168. package/dist/es6/select/lib/SelectOption.js +1 -2
  169. package/dist/es6/side-panel/index.d.ts +0 -3
  170. package/dist/es6/side-panel/index.d.ts.map +1 -1
  171. package/dist/es6/side-panel/index.js +0 -3
  172. package/dist/es6/side-panel/lib/SidePanel.d.ts +1 -2
  173. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  174. package/dist/es6/side-panel/lib/SidePanel.js +1 -2
  175. package/dist/es6/status-indicator/index.d.ts +2 -0
  176. package/dist/es6/status-indicator/index.d.ts.map +1 -0
  177. package/dist/es6/status-indicator/index.js +1 -0
  178. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +42 -0
  179. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
  180. package/dist/es6/status-indicator/lib/StatusIndicator.js +49 -0
  181. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts +73 -0
  182. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
  183. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +92 -0
  184. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
  185. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
  186. package/dist/es6/{breadcrumbs/lib/Breadcrumbs/List/index.js → status-indicator/lib/StatusIndicatorLabel.js} +5 -5
  187. package/dist/es6/status-indicator/lib/hooks/index.d.ts +2 -0
  188. package/dist/es6/status-indicator/lib/hooks/index.d.ts.map +1 -0
  189. package/dist/es6/status-indicator/lib/hooks/index.js +1 -0
  190. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
  191. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
  192. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.js +31 -0
  193. package/dist/es6/text-area/lib/TextArea.d.ts +2 -11
  194. package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
  195. package/dist/es6/text-area/lib/TextAreaField.d.ts +1 -1
  196. package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
  197. package/dist/es6/text-area/lib/TextAreaField.js +15 -7
  198. package/dist/es6/text-input/lib/TextInput.d.ts +2 -11
  199. package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
  200. package/dist/es6/text-input/lib/TextInputField.d.ts +1 -1
  201. package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
  202. package/dist/es6/text-input/lib/TextInputField.js +14 -7
  203. package/form-field/lib/FormFieldHint.tsx +23 -30
  204. package/form-field/lib/FormFieldLabel.tsx +14 -24
  205. package/index.ts +2 -3
  206. package/menu/index.ts +1 -6
  207. package/menu/lib/Menu.tsx +74 -27
  208. package/menu/lib/MenuItem.tsx +51 -18
  209. package/package.json +7 -6
  210. package/segmented-control/LICENSE +126 -0
  211. package/segmented-control/README.md +6 -0
  212. package/segmented-control/index.ts +2 -0
  213. package/segmented-control/lib/SegmentedControl.tsx +21 -0
  214. package/segmented-control/lib/SegmentedControlItem.tsx +175 -0
  215. package/segmented-control/lib/SegmentedControlList.tsx +49 -0
  216. package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +37 -0
  217. package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +75 -0
  218. package/segmented-control/package.json +6 -0
  219. package/select/README.md +7 -7
  220. package/select/index.ts +0 -4
  221. package/select/lib/Select.tsx +1 -3
  222. package/select/lib/SelectBase.tsx +3 -5
  223. package/select/lib/SelectMenu.tsx +1 -3
  224. package/select/lib/SelectOption.tsx +1 -3
  225. package/side-panel/index.ts +0 -4
  226. package/side-panel/lib/SidePanel.tsx +1 -2
  227. package/{breadcrumbs → status-indicator}/LICENSE +1 -1
  228. package/status-indicator/README.md +12 -0
  229. package/status-indicator/index.ts +1 -0
  230. package/status-indicator/lib/StatusIndicator.tsx +49 -0
  231. package/status-indicator/lib/StatusIndicatorIcon.tsx +88 -0
  232. package/status-indicator/lib/StatusIndicatorLabel.tsx +28 -0
  233. package/status-indicator/lib/hooks/index.ts +1 -0
  234. package/status-indicator/lib/hooks/useStatusIndicatorModel.tsx +29 -0
  235. package/status-indicator/package.json +6 -0
  236. package/text-area/lib/TextAreaField.tsx +1 -1
  237. package/text-input/lib/TextInputField.tsx +1 -1
  238. package/breadcrumbs/README.md +0 -7
  239. package/breadcrumbs/index.ts +0 -5
  240. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx +0 -85
  241. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +0 -152
  242. package/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.tsx +0 -63
  243. package/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.ts +0 -109
  244. package/breadcrumbs/lib/Breadcrumbs/Dropdown/index.tsx +0 -38
  245. package/breadcrumbs/lib/Breadcrumbs/List/Collapsible.tsx +0 -66
  246. package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +0 -64
  247. package/breadcrumbs/lib/Breadcrumbs/List/Link.tsx +0 -88
  248. package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +0 -30
  249. package/breadcrumbs/lib/Breadcrumbs/List/hooks.ts +0 -114
  250. package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +0 -28
  251. package/breadcrumbs/lib/Breadcrumbs/List/styles.ts +0 -12
  252. package/breadcrumbs/lib/Breadcrumbs/Nav.tsx +0 -14
  253. package/breadcrumbs/lib/Breadcrumbs/hooks.ts +0 -13
  254. package/breadcrumbs/lib/Breadcrumbs/index.tsx +0 -15
  255. package/breadcrumbs/lib/Breadcrumbs/types.ts +0 -7
  256. package/breadcrumbs/package.json +0 -6
  257. package/dist/commonjs/breadcrumbs/index.d.ts +0 -5
  258. package/dist/commonjs/breadcrumbs/index.d.ts.map +0 -1
  259. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  260. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
  261. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -69
  262. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
  263. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
  264. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -94
  265. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  266. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
  267. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
  268. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
  269. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -77
  270. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  271. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
  272. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -37
  273. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  274. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
  275. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -78
  276. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  277. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
  278. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -49
  279. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  280. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
  281. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -66
  282. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
  283. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
  284. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -43
  285. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  286. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
  287. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -116
  288. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
  289. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
  290. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  291. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
  292. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -16
  293. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  294. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
  295. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.js +0 -34
  296. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  297. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
  298. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -12
  299. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
  300. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
  301. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.js +0 -17
  302. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  303. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
  304. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.js +0 -2
  305. package/dist/es6/breadcrumbs/index.d.ts +0 -5
  306. package/dist/es6/breadcrumbs/index.d.ts.map +0 -1
  307. package/dist/es6/breadcrumbs/index.js +0 -4
  308. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  309. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
  310. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -63
  311. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
  312. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
  313. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -87
  314. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  315. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
  316. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +0 -51
  317. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
  318. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
  319. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -72
  320. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  321. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
  322. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -30
  323. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  324. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
  325. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -55
  326. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  327. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
  328. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -42
  329. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  330. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
  331. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -59
  332. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
  333. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
  334. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -36
  335. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  336. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
  337. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -91
  338. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
  339. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
  340. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  341. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
  342. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -12
  343. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  344. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
  345. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.js +0 -27
  346. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  347. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
  348. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -8
  349. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
  350. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
  351. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.js +0 -14
  352. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  353. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
  354. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.js +0 -1
@@ -1,4 +1,4 @@
1
- export declare const FormFieldHint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", import("@workday/canvas-kit-react/layout").BorderShorthandStyleProps & import("@workday/canvas-kit-react/layout").BorderColorStyleProps & import("@workday/canvas-kit-react/layout").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout").BorderLineStyleProps & import("@workday/canvas-kit-react/layout").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").BorderLogicalStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/other").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStandardProps & import("@workday/canvas-kit-react/layout").PositionLogicalProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceStandardProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceLogicalProps, {
1
+ export declare const FormFieldHint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", Pick<import("@workday/canvas-kit-react/text").TypeLevelProps, "top" | "left" | "right" | "bottom" | "fill" | "children" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY" | "variant">, {
2
2
  state: {
3
3
  id: string;
4
4
  hasError: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldHint.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldHint.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,aAAa;;;;;;;EAsBxB,CAAC"}
1
+ {"version":3,"file":"FormFieldHint.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldHint.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;;;;;EAyBzB,CAAC"}
@@ -21,11 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React from 'react';
24
- import { createSubcomponent, useTheme, styled, } from '@workday/canvas-kit-react/common';
25
- import { space, type } from '@workday/canvas-kit-react/tokens';
26
- import { Box } from '@workday/canvas-kit-react/layout';
24
+ import { createSubcomponent, useTheme } from '@workday/canvas-kit-react/common';
25
+ import { space } from '@workday/canvas-kit-react/tokens';
27
26
  import { useFormFieldHint, useFormFieldModel } from './hooks';
28
- var StyledHint = styled(Box)(__assign({}, type.levels.subtext.medium));
27
+ import { Subtext } from '@workday/canvas-kit-react/text';
29
28
  export var FormFieldHint = createSubcomponent('p')({
30
29
  displayName: 'FormField.Hint',
31
30
  modelHook: useFormFieldModel,
@@ -37,5 +36,5 @@ export var FormFieldHint = createSubcomponent('p')({
37
36
  // If there is no hint text just skip rendering
38
37
  return null;
39
38
  }
40
- return (React.createElement(StyledHint, __assign({ as: Element, color: model.state.hasError ? theme.canvas.palette.error.main : undefined, marginY: space.xxs }, elemProps), children));
39
+ return (React.createElement(Subtext, __assign({ as: Element, size: "medium", color: model.state.hasError ? theme.canvas.palette.error.main : undefined, marginY: space.xxs }, elemProps), children));
41
40
  });
@@ -1,4 +1,4 @@
1
- export declare const FormFieldInput: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").BorderShorthandStyleProps & import("@workday/canvas-kit-react/layout").BorderColorStyleProps & import("@workday/canvas-kit-react/layout").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout").BorderLineStyleProps & import("@workday/canvas-kit-react/layout").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").BorderLogicalStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/other").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStandardProps & import("@workday/canvas-kit-react/layout").PositionLogicalProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceStandardProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceLogicalProps, {
1
+ export declare const FormFieldInput: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").CommonStyleProps, {
2
2
  state: {
3
3
  id: string;
4
4
  hasError: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,YAAY,EAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAM,MAAM,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAK3E,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAC9F;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAaD,eAAO,MAAM,cAAc;;;;;;;EAiBzB,CAAC"}
1
+ {"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,YAAY,EAAW,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAItE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAC9F;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;;;;;;;EAyBzB,CAAC"}
@@ -21,16 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React from 'react';
24
- import { createSubcomponent, useTheme, styled, } from '@workday/canvas-kit-react/common';
25
- import { Box, HStack } from '@workday/canvas-kit-react/layout';
26
- import { type } from '@workday/canvas-kit-react/tokens';
24
+ import { createSubcomponent, useTheme } from '@workday/canvas-kit-react/common';
25
+ import { HStack } from '@workday/canvas-kit-react/layout';
26
+ import { LabelText, Text } from '@workday/canvas-kit-react/text';
27
27
  import { useFormFieldLabel, useFormFieldModel } from './hooks';
28
- var StyledFormFieldLabel = styled('span')(__assign(__assign({}, type.levels.subtext.large), { fontWeight: type.properties.fontWeights.medium }));
29
- var StyledAsterisk = styled(Box)({
30
- fontSize: type.properties.fontSizes[20],
31
- fontWeight: type.properties.fontWeights.regular,
32
- textDecoration: 'unset',
33
- });
34
28
  export var FormFieldLabel = createSubcomponent('label')({
35
29
  displayName: 'FormField.Label',
36
30
  modelHook: useFormFieldModel,
@@ -39,6 +33,6 @@ export var FormFieldLabel = createSubcomponent('label')({
39
33
  var _b = _a.spacing, spacing = _b === void 0 ? 'xxxs' : _b, children = _a.children, elemProps = __rest(_a, ["spacing", "children"]);
40
34
  var theme = useTheme();
41
35
  return (React.createElement(HStack, __assign({ as: Element, spacing: spacing, minWidth: "180px" }, elemProps),
42
- React.createElement(StyledFormFieldLabel, null, children),
43
- model.state.isRequired && (React.createElement(StyledAsterisk, { as: "span", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
36
+ React.createElement(LabelText, { as: "span", fontWeight: "medium" }, children),
37
+ model.state.isRequired && (React.createElement(Text, { fontSize: 20, fontWeight: "regular", textDecoration: "unset", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
44
38
  });
@@ -1,10 +1,11 @@
1
- export * from './breadcrumbs';
2
1
  export * from './color-picker';
3
2
  export * from './form-field';
4
3
  export * from './menu';
5
4
  export * from './pill';
5
+ export * from './segmented-control';
6
6
  export * from './select';
7
7
  export * from './side-panel';
8
+ export * from './status-indicator';
8
9
  export * from './text-area';
9
10
  export * from './text-input';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
package/dist/es6/index.js CHANGED
@@ -1,10 +1,10 @@
1
- export * from './breadcrumbs';
2
1
  export * from './color-picker';
3
2
  export * from './form-field';
4
3
  export * from './menu';
5
4
  export * from './pill';
5
+ export * from './segmented-control';
6
6
  export * from './select';
7
7
  export * from './side-panel';
8
+ export * from './status-indicator';
8
9
  export * from './text-area';
9
10
  export * from './text-input';
10
- /// <reference types="@types/node" />
@@ -1,6 +1,3 @@
1
- import Menu, { MenuProps } from './lib/Menu';
2
- import MenuItem from './lib/MenuItem';
3
- export { Menu, MenuItem, MenuProps };
4
- export default Menu;
1
+ export * from './lib/Menu';
5
2
  export * from './lib/MenuItem';
6
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAC3C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAC,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
@@ -1,5 +1,2 @@
1
- import Menu from './lib/Menu';
2
- import MenuItem from './lib/MenuItem';
3
- export { Menu, MenuItem };
4
- export default Menu;
1
+ export * from './lib/Menu';
5
2
  export * from './lib/MenuItem';
@@ -1,18 +1,26 @@
1
1
  import * as React from 'react';
2
- import { MenuItemProps } from './MenuItem';
2
+ import { DeprecatedMenuItemProps } from './MenuItem';
3
3
  import { GrowthBehavior } from '@workday/canvas-kit-react/common';
4
- export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLUListElement> {
4
+ /**
5
+ * ### Deprecated Menu
6
+ *
7
+ * As of Canvas Kit v8, Menu is being soft-deprecated.
8
+ * It will be hard-deprecated (completely removed) in v9. Please see the
9
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
10
+ * for more information.
11
+ */
12
+ export interface DeprecatedMenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLUListElement> {
5
13
  /**
6
- * The MenuItem children of the Menu (must be at least one). Also accepts other components which share the same interface as `MenuItem`.
14
+ * The DeprecatedMenuItem children of the DeprecatedMenu (must be at least one). Also accepts other components which share the same interface as `DeprecatedMenuItem`.
7
15
  */
8
- children?: React.ReactElement<MenuItemProps> | React.ReactElement<MenuItemProps>[];
16
+ children?: React.ReactElement<DeprecatedMenuItemProps> | React.ReactElement<DeprecatedMenuItemProps>[];
9
17
  /**
10
- * If true, set the Menu to the open state. Useful for showing and hiding the Menu from a parent component such as a menu button.
18
+ * If true, set the DeprecatedMenu to the open state. Useful for showing and hiding the DeprecatedMenu from a parent component such as a menu button.
11
19
  * @default true
12
20
  */
13
21
  isOpen?: boolean;
14
22
  /**
15
- * The width of the Menu. If no value is provided, the Menu will collapse around its content.
23
+ * The width of the DeprecatedMenu. If no value is provided, the DeprecatedMenu will collapse around its content.
16
24
  */
17
25
  width?: number | string;
18
26
  /**
@@ -20,7 +28,7 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
20
28
  */
21
29
  onSelect?: () => void;
22
30
  /**
23
- * The function called when the Menu should close. This is called after a menu item is selected or if the escape shortcut key is used. This will not fire if the menu item sets `shouldClose` to false.
31
+ * The function called when the DeprecatedMenu should close. This is called after a menu item is selected or if the escape shortcut key is used. This will not fire if the menu item sets `shouldClose` to false.
24
32
  */
25
33
  onClose?: () => void;
26
34
  /**
@@ -28,24 +36,40 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
28
36
  */
29
37
  initialSelectedItem?: number;
30
38
  /**
31
- * The unique id of the Menu used for ARIA and HTML `id` attributes.
39
+ * The unique id of the DeprecatedMenu used for ARIA and HTML `id` attributes.
32
40
  */
33
41
  id?: string;
34
42
  /**
35
- * The HTML `id` of the element that labels the Menu. Often used with menu buttons.
43
+ * The HTML `id` of the element that labels the DeprecatedMenu. Often used with menu buttons.
36
44
  */
37
45
  'aria-labelledby'?: string;
38
46
  }
39
- export interface MenuState {
47
+ /**
48
+ * ### Deprecated Menu State
49
+ *
50
+ * As of Canvas Kit v8, Menu is being soft-deprecated.
51
+ * It will be hard-deprecated (completely removed) in v9. Please see the
52
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
53
+ * for more information.
54
+ */
55
+ export interface DeprecatedMenuState {
40
56
  selectedItemIndex: number;
41
57
  }
42
- export default class Menu extends React.Component<MenuProps, MenuState> {
58
+ /**
59
+ * ### Deprecated Menu
60
+ *
61
+ * As of Canvas Kit v8, this component is being soft-deprecated.
62
+ * It will be hard-deprecated (completely removed) in v9. Please see the
63
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
64
+ * for more information.
65
+ */
66
+ export declare class DeprecatedMenu extends React.Component<DeprecatedMenuProps, DeprecatedMenuState> {
43
67
  private id;
44
68
  private animateId;
45
69
  private menuRef;
46
70
  private firstCharacters;
47
- constructor(props: MenuProps);
48
- componentDidUpdate(prevProps: MenuProps): void;
71
+ constructor(props: DeprecatedMenuProps);
72
+ componentDidUpdate(prevProps: DeprecatedMenuProps): void;
49
73
  componentDidMount(): void;
50
74
  componentWillUnmount(): void;
51
75
  render(): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG,MAAM,WAAW,SAAU,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACvF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IACnF;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAaD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IACrE,OAAO,CAAC,EAAE,CAAsB;IAChC,OAAO,CAAC,SAAS,CAAU;IAE3B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,eAAe,CAAY;gBAEvB,KAAK,EAAE,SAAS;IAe5B,kBAAkB,CAAC,SAAS,EAAE,SAAS;IAevC,iBAAiB;IAKjB,oBAAoB;IAIb,MAAM;IAmDN,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,MAAM,CAQjE;IAEK,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,IAAI,CAE/D;IAEF,OAAO,CAAC,uBAAuB,CA4E7B;IAEF,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CA+BxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAC;AAGnD,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG;;;;;;;GAOG;AACH,MAAM,WAAW,mBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EACL,KAAK,CAAC,YAAY,CAAC,uBAAuB,CAAC,GAC3C,KAAK,CAAC,YAAY,CAAC,uBAAuB,CAAC,EAAE,CAAC;IAClD;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAaD;;;;;;;GAOG;AACH,qBAAa,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAC3F,OAAO,CAAC,EAAE,CAAsB;IAChC,OAAO,CAAC,SAAS,CAAU;IAE3B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,eAAe,CAAY;gBAEvB,KAAK,EAAE,mBAAmB;IAetC,kBAAkB,CAAC,SAAS,EAAE,mBAAmB;IAejD,iBAAiB;IAYjB,oBAAoB;IAIb,MAAM;IAyDN,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,MAAM,CAQjE;IAEK,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,IAAI,CAE/D;IAEF,OAAO,CAAC,uBAAuB,CA+E7B;IAEF,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CAkCxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
@@ -41,9 +41,17 @@ import { hideMouseFocus, generateUniqueId } from '@workday/canvas-kit-react/comm
41
41
  var List = styled('ul')(__assign({ background: commonColors.background, borderRadius: borderRadius.m, padding: 0, margin: space.xxs + " 0", '&:focus': {
42
42
  outline: 'none',
43
43
  } }, hideMouseFocus));
44
- var Menu = /** @class */ (function (_super) {
45
- __extends(Menu, _super);
46
- function Menu(props) {
44
+ /**
45
+ * ### Deprecated Menu
46
+ *
47
+ * As of Canvas Kit v8, this component is being soft-deprecated.
48
+ * It will be hard-deprecated (completely removed) in v9. Please see the
49
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
50
+ * for more information.
51
+ */
52
+ var DeprecatedMenu = /** @class */ (function (_super) {
53
+ __extends(DeprecatedMenu, _super);
54
+ function DeprecatedMenu(props) {
47
55
  var _this = _super.call(this, props) || this;
48
56
  _this.id = generateUniqueId();
49
57
  _this.getNormalizedItemIndex = function (index) {
@@ -65,9 +73,13 @@ var Menu = /** @class */ (function (_super) {
65
73
  var children = React.Children.toArray(_this.props.children);
66
74
  var nextSelectedIndex = 0;
67
75
  var isShortcut = false;
68
- var itemCount = children.length;
69
- var firstItem = 0;
70
- var lastItem = itemCount - 1;
76
+ var interactiveItems = children.filter(function (child) {
77
+ var _a, _b;
78
+ return !((_b = (_a = child) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.isHeader);
79
+ });
80
+ var interactiveItemCount = interactiveItems.length;
81
+ var firstIndex = 0;
82
+ var lastIndex = interactiveItemCount - 1;
71
83
  if (event.key.length === 1 && event.key.match(/\S/)) {
72
84
  var start = _this.state.selectedItemIndex + 1;
73
85
  var searchIndex = void 0;
@@ -87,17 +99,15 @@ var Menu = /** @class */ (function (_super) {
87
99
  switch (event.key) {
88
100
  case 'ArrowUp':
89
101
  case 'ArrowDown':
90
- case 'Down': // IE/Edge specific value
91
- case 'Up': // IE/Edge specific value
92
102
  var direction = event.key === 'ArrowUp' ? -1 : 1;
93
103
  isShortcut = true;
94
104
  var nextIndex = _this.state.selectedItemIndex + direction;
95
105
  nextSelectedIndex =
96
- nextIndex < 0 ? lastItem : nextIndex >= itemCount ? firstItem : nextIndex;
106
+ nextIndex < 0 ? lastIndex : nextIndex >= interactiveItemCount ? firstIndex : nextIndex;
97
107
  break;
98
108
  case 'Home':
99
109
  case 'End':
100
- var skipTo = event.key === 'Home' ? firstItem : lastItem;
110
+ var skipTo = event.key === 'Home' ? firstIndex : lastIndex;
101
111
  isShortcut = true;
102
112
  nextSelectedIndex = skipTo;
103
113
  break;
@@ -117,7 +127,7 @@ var Menu = /** @class */ (function (_super) {
117
127
  case ' ':
118
128
  case 'Enter':
119
129
  nextSelectedIndex = _this.state.selectedItemIndex;
120
- var child = children[_this.state.selectedItemIndex];
130
+ var child = interactiveItems[_this.state.selectedItemIndex];
121
131
  _this.handleClick(event, child.props);
122
132
  isShortcut = true;
123
133
  break;
@@ -133,7 +143,7 @@ var Menu = /** @class */ (function (_super) {
133
143
  _this.handleClick = function (event, menuItemProps) {
134
144
  /* istanbul ignore next line for coverage */
135
145
  if (menuItemProps.isDisabled) {
136
- // You should only hit this point if you are using a custom MenuItem implementation.
146
+ // You should only hit this point if you are using a custom DeprecatedMenuItem implementation.
137
147
  return;
138
148
  }
139
149
  if (menuItemProps.onClick) {
@@ -160,7 +170,7 @@ var Menu = /** @class */ (function (_super) {
160
170
  _this.setFirstCharacters = function () {
161
171
  var getFirstCharacter = function (child) {
162
172
  var character = '';
163
- if (!child || typeof child === 'boolean' || child === {}) {
173
+ if (!child || typeof child === 'boolean') {
164
174
  character = '';
165
175
  }
166
176
  else if (typeof child === 'string' || typeof child === 'number') {
@@ -186,6 +196,10 @@ var Menu = /** @class */ (function (_super) {
186
196
  return character;
187
197
  };
188
198
  var firstCharacters = React.Children.map(_this.props.children, function (child) {
199
+ var _a, _b;
200
+ if ((_b = (_a = child) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.isHeader) {
201
+ return;
202
+ }
189
203
  return getFirstCharacter(child);
190
204
  });
191
205
  _this.firstCharacters = firstCharacters;
@@ -216,7 +230,7 @@ var Menu = /** @class */ (function (_super) {
216
230
  };
217
231
  return _this;
218
232
  }
219
- Menu.prototype.componentDidUpdate = function (prevProps) {
233
+ DeprecatedMenu.prototype.componentDidUpdate = function (prevProps) {
220
234
  var _this = this;
221
235
  if (this.props.children !== prevProps.children) {
222
236
  this.setFirstCharacters();
@@ -231,33 +245,39 @@ var Menu = /** @class */ (function (_super) {
231
245
  }
232
246
  });
233
247
  };
234
- Menu.prototype.componentDidMount = function () {
248
+ DeprecatedMenu.prototype.componentDidMount = function () {
249
+ console.warn("This component is being deprecated and will be removed in Canvas Kit V9.\n\n For more information, please see the V8 upgrade guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page\n ");
235
250
  this.setFirstCharacters();
236
251
  this.setInitialSelectedItem();
237
252
  };
238
- Menu.prototype.componentWillUnmount = function () {
253
+ DeprecatedMenu.prototype.componentWillUnmount = function () {
239
254
  cancelAnimationFrame(this.animateId);
240
255
  };
241
- Menu.prototype.render = function () {
256
+ DeprecatedMenu.prototype.render = function () {
242
257
  var _this = this;
243
258
  // TODO: Standardize on prop spread location (see #150)
244
259
  var _a = this.props, _b = _a.id, id = _b === void 0 ? this.id : _b, _c = _a.isOpen, isOpen = _c === void 0 ? true : _c, children = _a.children, ariaLabelledby = _a["aria-labelledby"], grow = _a.grow, width = _a.width, onSelect = _a.onSelect, onClose = _a.onClose, initialSelectedItem = _a.initialSelectedItem, elemProps = __rest(_a, ["id", "isOpen", "children", 'aria-labelledby', "grow", "width", "onSelect", "onClose", "initialSelectedItem"]);
245
260
  var selectedItemIndex = this.state.selectedItemIndex;
246
261
  var cardWidth = grow ? '100%' : width;
262
+ var interactiveItemIndex = null;
247
263
  return (React.createElement(Card, { display: "inline-block", padding: space.zero, width: cardWidth, depth: 3 },
248
264
  React.createElement(Card.Body, null,
249
- React.createElement(List, __assign({ role: "menu", tabIndex: 0, id: id, "aria-labelledby": ariaLabelledby, "aria-activedescendant": id + "-" + selectedItemIndex, onKeyDown: this.handleKeyboardShortcuts, ref: this.menuRef }, elemProps), React.Children.map(children, function (menuItem, index) {
265
+ React.createElement(List, __assign({ role: "menu", tabIndex: 0, id: id, "aria-labelledby": ariaLabelledby, "aria-activedescendant": id + "-" + selectedItemIndex, onKeyDown: this.handleKeyboardShortcuts, ref: this.menuRef }, elemProps), React.Children.map(children, function (menuItem) {
250
266
  if (!React.isValidElement(menuItem)) {
251
267
  return;
252
268
  }
253
- var itemId = id + "-" + index;
269
+ var itemId;
270
+ if (!menuItem.props.isHeader) {
271
+ interactiveItemIndex = (interactiveItemIndex !== null && interactiveItemIndex !== void 0 ? interactiveItemIndex : -1) + 1;
272
+ itemId = id + "-" + interactiveItemIndex;
273
+ }
254
274
  return (React.createElement(React.Fragment, { key: itemId }, React.cloneElement(menuItem, {
255
275
  onClick: function (event) { return _this.handleClick(event, menuItem.props); },
256
276
  id: itemId,
257
- isFocused: selectedItemIndex === index,
277
+ isFocused: selectedItemIndex === interactiveItemIndex && !menuItem.props.isHeader,
258
278
  })));
259
279
  })))));
260
280
  };
261
- return Menu;
281
+ return DeprecatedMenu;
262
282
  }(React.Component));
263
- export default Menu;
283
+ export { DeprecatedMenu };
@@ -1,53 +1,74 @@
1
1
  import * as React from 'react';
2
2
  import { CanvasSystemIcon } from '@workday/design-assets-types';
3
- export interface MenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
3
+ /**
4
+ * ### Deprecated Menu Item Props
5
+ *
6
+ * As of Canvas Kit v8, Menu is being soft-deprecated.
7
+ * It will be hard-deprecated (completely removed) in v9. Please see the
8
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
9
+ * for more information.
10
+ */
11
+ export interface DeprecatedMenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
4
12
  /**
5
- * The function called when the MenuItem is clicked. If the item is a child of the Menu component, this callback will be decorated with the onSelect and onClose Menu callbacks. This callback will not fire if the item is disabled (see below).
13
+ * The function called when the DeprecatedMenuItem is clicked. If the item is a child of the DeprecatedMenu component, this callback will be decorated with the onSelect and onClose DeprecatedMenu callbacks. This callback will not fire if the item is disabled (see below).
6
14
  */
7
15
  onClick?: (event: React.MouseEvent) => void;
8
16
  /**
9
- * The unique id for the MenuItem used for ARIA attributes. If the item is a child of the `Menu` component, this property will be generated and overridden.
17
+ * The unique id for the DeprecatedMenuItem used for ARIA attributes. If the item is a child of the `DeprecatedMenu` component, this property will be generated and overridden.
10
18
  */
11
19
  id?: string;
12
20
  /**
13
- * The icon of the MenuItem. This icon is displayed before what you supplied for the children.
21
+ * The icon of the DeprecatedMenuItem. This icon is displayed before what you supplied for the children.
14
22
  */
15
23
  icon?: CanvasSystemIcon;
16
24
  /**
17
- * The secondary icon of the MenuItem. This icon is displayed after what you supplied for the children.
25
+ * The secondary icon of the DeprecatedMenuItem. This icon is displayed after what you supplied for the children.
18
26
  */
19
27
  secondaryIcon?: CanvasSystemIcon;
20
28
  /**
21
- * If true, render a top border on the MenuItem.
29
+ * If true, render a top border on the DeprecatedMenuItem.
22
30
  * @default false
23
31
  */
24
32
  hasDivider?: boolean;
25
33
  /**
26
- * If true, set the MenuItem to the disabled state so it is not clickable.
34
+ * If true, render a header to group data, this menu item will not be intractable.
35
+ * @default false
36
+ */
37
+ isHeader?: boolean;
38
+ /**
39
+ * If true, set the DeprecatedMenuItem to the disabled state so it is not clickable.
27
40
  * @default false
28
41
  */
29
42
  isDisabled?: boolean;
30
43
  /**
31
- * If true, set the MenuItem to be the currently selected item. If the item is a child of the Menu component, this property will be generated and overridden.
44
+ * If true, set the DeprecatedMenuItem to be the currently selected item. If the item is a child of the DeprecatedMenu component, this property will be generated and overridden.
32
45
  * @default false
33
46
  */
34
47
  isFocused?: boolean;
35
48
  /**
36
- * The role of the MenuItem. Use this to override the role of the item (e.g. you can use this element as an option in a Combobox).
49
+ * The role of the DeprecatedMenuItem. Use this to override the role of the item (e.g. you can use this element as an option in a Combobox).
37
50
  * @default menuItem
38
51
  */
39
52
  role?: string;
40
53
  /**
41
- * If true, allow the onClose Menu callback to be fired after the MenuItem has been clicked.
54
+ * If true, allow the onClose DeprecatedMenu callback to be fired after the DeprecatedMenuItem has been clicked.
42
55
  * @default true
43
56
  */
44
57
  shouldClose?: boolean;
45
58
  }
46
- declare class MenuItem extends React.Component<MenuItemProps> {
59
+ /**
60
+ * ### Deprecated Menu Item
61
+ *
62
+ * As of Canvas Kit v8, Menu is being soft-deprecated.
63
+ * It will be hard-deprecated (completely removed) in v9. Please see the
64
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
65
+ * for more information.
66
+ */
67
+ export declare class DeprecatedMenuItem extends React.Component<DeprecatedMenuItemProps> {
47
68
  ref: React.RefObject<HTMLLIElement>;
48
- componentDidUpdate: (prevProps: MenuItemProps) => void;
49
- render(): React.ReactNode;
69
+ componentDidMount(): void;
70
+ componentDidUpdate: (prevProps: DeprecatedMenuItemProps) => void;
71
+ render(): JSX.Element;
50
72
  private handleClick;
51
73
  }
52
- export default MenuItem;
53
74
  //# sourceMappingURL=MenuItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IAC1E;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAwLD,cAAM,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IACnD,GAAG,iCAAoC;IAEvC,kBAAkB,cAAe,aAAa,UAM5C;IAEF,MAAM,IAAI,KAAK,CAAC,SAAS;IAyCzB,OAAO,CAAC,WAAW,CAOjB;CACH;AAcD,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACpF;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA2LD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC;IAC9E,GAAG,iCAAoC;IAEvC,iBAAiB;IASjB,kBAAkB,cAAe,uBAAuB,UAMtD;IAEF,MAAM;IA2CN,OAAO,CAAC,WAAW,CAOjB;CACH"}
@@ -40,6 +40,9 @@ import { SystemIcon } from '@workday/canvas-kit-react/icon';
40
40
  var Item = styled('li')(__assign(__assign({}, type.levels.subtext.large), { padding: space.xxs + " " + space.s, height: space.xl, boxSizing: 'border-box', cursor: 'pointer', color: colors.blackPepper300, display: 'flex', flexDirection: 'row', alignItems: 'center', transition: 'background-color 80ms, color 80ms', '&:focus': {
41
41
  outline: 'none',
42
42
  } }), function (_a) {
43
+ var isHeader = _a.isHeader;
44
+ return { pointerEvents: isHeader ? 'none' : 'all' };
45
+ }, function (_a) {
43
46
  var _b;
44
47
  var isFocused = _a.isFocused, isDisabled = _a.isDisabled;
45
48
  if (!isFocused && !isDisabled) {
@@ -168,9 +171,17 @@ var scrollIntoViewIfNeeded = function (elem, centerIfNeeded) {
168
171
  }
169
172
  }
170
173
  };
171
- var MenuItem = /** @class */ (function (_super) {
172
- __extends(MenuItem, _super);
173
- function MenuItem() {
174
+ /**
175
+ * ### Deprecated Menu Item
176
+ *
177
+ * As of Canvas Kit v8, Menu is being soft-deprecated.
178
+ * It will be hard-deprecated (completely removed) in v9. Please see the
179
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
180
+ * for more information.
181
+ */
182
+ var DeprecatedMenuItem = /** @class */ (function (_super) {
183
+ __extends(DeprecatedMenuItem, _super);
184
+ function DeprecatedMenuItem() {
174
185
  var _this = _super !== null && _super.apply(this, arguments) || this;
175
186
  _this.ref = React.createRef();
176
187
  _this.componentDidUpdate = function (prevProps) {
@@ -190,19 +201,23 @@ var MenuItem = /** @class */ (function (_super) {
190
201
  };
191
202
  return _this;
192
203
  }
193
- MenuItem.prototype.render = function () {
194
- var _a = this.props, onClick = _a.onClick, children = _a.children, id = _a.id, icon = _a.icon, secondaryIcon = _a.secondaryIcon, hasDivider = _a.hasDivider, isDisabled = _a.isDisabled, isFocused = _a.isFocused, role = _a.role, elemProps = __rest(_a, ["onClick", "children", "id", "icon", "secondaryIcon", "hasDivider", "isDisabled", "isFocused", "role"]);
204
+ DeprecatedMenuItem.prototype.componentDidMount = function () {
205
+ console.warn("This component is being deprecated and will be removed in Canvas Kit V9.\n\n For more information, please see the V8 upgrade guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page\n ");
206
+ };
207
+ DeprecatedMenuItem.prototype.render = function () {
208
+ var _a = this.props, onClick = _a.onClick, children = _a.children, id = _a.id, icon = _a.icon, secondaryIcon = _a.secondaryIcon, hasDivider = _a.hasDivider, isDisabled = _a.isDisabled, isFocused = _a.isFocused, isHeader = _a.isHeader, role = _a.role, elemProps = __rest(_a, ["onClick", "children", "id", "icon", "secondaryIcon", "hasDivider", "isDisabled", "isFocused", "isHeader", "role"]);
195
209
  iconProps = setIconProps(icon, isDisabled, isFocused);
196
210
  secondaryIconProps = setIconProps(secondaryIcon, isDisabled, isFocused);
197
211
  return (React.createElement(React.Fragment, null,
198
212
  hasDivider && React.createElement(Divider, null),
199
- React.createElement(Item, __assign({ ref: this.ref, tabIndex: -1, id: id, role: role, onClick: this.handleClick, "aria-disabled": isDisabled ? true : undefined, isDisabled: !!isDisabled, isFocused: !!isFocused }, elemProps),
213
+ React.createElement(Item, __assign({ ref: this.ref, tabIndex: -1, id: id, role: isHeader ? 'presentation' : role, onClick: this.handleClick, "aria-disabled": isDisabled ? true : undefined, isDisabled: !!isDisabled, isFocused: !!isFocused, isHeader: !!isHeader }, elemProps),
200
214
  icon && iconProps && React.createElement(StyledSystemIcon, __assign({}, iconProps)),
201
215
  React.createElement(LabelContainer, null, children),
202
216
  secondaryIcon && secondaryIconProps && (React.createElement(SecondaryStyledSystemIcon, __assign({}, secondaryIconProps))))));
203
217
  };
204
- return MenuItem;
218
+ return DeprecatedMenuItem;
205
219
  }(React.Component));
220
+ export { DeprecatedMenuItem };
206
221
  /**
207
222
  * If we destructure props, shouldClose will be undefined because the value is only applied for the render method only.
208
223
  * We have to use defaultProps so that the value of shouldClose is applied for every method and therefore references in the Menu component.
@@ -210,8 +225,7 @@ var MenuItem = /** @class */ (function (_super) {
210
225
  */
211
226
  // TODO: Remove this ts-ignore when we convert to a functional component
212
227
  // @ts-ignore
213
- MenuItem.defaultProps = {
228
+ DeprecatedMenuItem.defaultProps = {
214
229
  shouldClose: true,
215
230
  role: 'menuitem',
216
231
  };
217
- export default MenuItem;