@workday/canvas-kit-preview-react 7.1.4 → 7.2.0-427-next.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 (541) 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 +3 -4
  4. package/color-picker/package.json +2 -1
  5. package/dist/commonjs/color-picker/index.d.ts +1 -1
  6. package/dist/commonjs/color-picker/index.d.ts.map +1 -1
  7. package/dist/commonjs/color-picker/index.js +2 -6
  8. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts +1 -2
  9. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
  10. package/dist/commonjs/color-picker/lib/ColorPicker.js +28 -50
  11. package/dist/commonjs/color-picker/lib/parts/ColorReset.js +32 -23
  12. package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +26 -39
  13. package/dist/commonjs/form-field/lib/FormField.d.ts +4 -19
  14. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
  15. package/dist/commonjs/form-field/lib/FormField.js +10 -33
  16. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
  17. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
  18. package/dist/commonjs/form-field/lib/FormFieldHint.js +8 -32
  19. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
  20. package/dist/commonjs/form-field/lib/FormFieldInput.js +6 -17
  21. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +2 -8
  22. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  23. package/dist/commonjs/form-field/lib/FormFieldLabel.js +10 -39
  24. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +3 -5
  25. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  26. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +4 -5
  27. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +3 -5
  28. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  29. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +5 -6
  30. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +3 -5
  31. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  32. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +4 -5
  33. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
  34. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  35. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +9 -19
  36. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
  37. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  38. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +5 -5
  39. package/dist/commonjs/index.d.ts +2 -1
  40. package/dist/commonjs/index.d.ts.map +1 -1
  41. package/dist/commonjs/index.js +2 -2
  42. package/dist/commonjs/menu/index.d.ts +1 -4
  43. package/dist/commonjs/menu/index.d.ts.map +1 -1
  44. package/dist/commonjs/menu/index.js +1 -9
  45. package/dist/commonjs/menu/lib/Menu.d.ts +44 -13
  46. package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
  47. package/dist/commonjs/menu/lib/Menu.js +127 -130
  48. package/dist/commonjs/menu/lib/MenuItem.d.ts +45 -14
  49. package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
  50. package/dist/commonjs/menu/lib/MenuItem.js +118 -106
  51. package/dist/commonjs/pill/lib/Pill.d.ts +101 -13
  52. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
  53. package/dist/commonjs/pill/lib/Pill.js +158 -64
  54. package/dist/commonjs/pill/lib/PillAvatar.js +6 -17
  55. package/dist/commonjs/pill/lib/PillCount.js +7 -30
  56. package/dist/commonjs/pill/lib/PillIcon.js +8 -31
  57. package/dist/commonjs/pill/lib/PillIconButton.js +13 -36
  58. package/dist/commonjs/pill/lib/PillLabel.js +10 -33
  59. package/dist/commonjs/pill/lib/usePillModel.js +8 -16
  60. package/dist/commonjs/segmented-control/index.d.ts +5 -0
  61. package/dist/commonjs/segmented-control/index.d.ts.map +1 -0
  62. package/dist/commonjs/segmented-control/index.js +18 -0
  63. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +1189 -0
  64. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
  65. package/dist/commonjs/segmented-control/lib/SegmentedControl.js +57 -0
  66. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +107 -0
  67. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
  68. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +105 -0
  69. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +135 -0
  70. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
  71. package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +41 -0
  72. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +79 -0
  73. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
  74. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +21 -0
  75. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1202 -0
  76. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
  77. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +75 -0
  78. package/dist/commonjs/select/index.d.ts +0 -3
  79. package/dist/commonjs/select/index.d.ts.map +1 -1
  80. package/dist/commonjs/select/index.js +0 -7
  81. package/dist/commonjs/select/lib/Select.d.ts +0 -1
  82. package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
  83. package/dist/commonjs/select/lib/Select.js +147 -191
  84. package/dist/commonjs/select/lib/SelectBase.d.ts +2 -2
  85. package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
  86. package/dist/commonjs/select/lib/SelectBase.js +109 -107
  87. package/dist/commonjs/select/lib/SelectMenu.d.ts +2 -2
  88. package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
  89. package/dist/commonjs/select/lib/SelectMenu.js +55 -86
  90. package/dist/commonjs/select/lib/SelectOption.d.ts +1 -2
  91. package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
  92. package/dist/commonjs/select/lib/SelectOption.js +35 -48
  93. package/dist/commonjs/select/lib/scrolling.js +6 -7
  94. package/dist/commonjs/select/lib/utils.js +4 -4
  95. package/dist/commonjs/side-panel/index.d.ts +0 -3
  96. package/dist/commonjs/side-panel/index.d.ts.map +1 -1
  97. package/dist/commonjs/side-panel/index.js +0 -7
  98. package/dist/commonjs/side-panel/lib/SidePanel.d.ts +13 -27
  99. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  100. package/dist/commonjs/side-panel/lib/SidePanel.js +95 -133
  101. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
  102. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
  103. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +65 -0
  104. package/dist/commonjs/side-panel/lib/hooks.d.ts +20 -0
  105. package/dist/commonjs/side-panel/lib/hooks.d.ts.map +1 -1
  106. package/dist/commonjs/side-panel/lib/hooks.js +40 -21
  107. package/dist/commonjs/status-indicator/index.d.ts +4 -0
  108. package/dist/commonjs/status-indicator/index.d.ts.map +1 -0
  109. package/dist/commonjs/status-indicator/index.js +17 -0
  110. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +66 -0
  111. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
  112. package/dist/commonjs/status-indicator/lib/StatusIndicator.js +57 -0
  113. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts +83 -0
  114. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
  115. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +86 -0
  116. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
  117. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
  118. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +15 -0
  119. package/dist/commonjs/status-indicator/lib/hooks/index.d.ts +2 -0
  120. package/dist/commonjs/status-indicator/lib/hooks/index.d.ts.map +1 -0
  121. package/dist/commonjs/{breadcrumbs → status-indicator/lib/hooks}/index.js +1 -5
  122. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
  123. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
  124. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.js +25 -0
  125. package/dist/commonjs/table/index.d.ts +2 -0
  126. package/dist/commonjs/table/index.d.ts.map +1 -0
  127. package/dist/commonjs/{text-area/lib/hooks → table}/index.js +1 -1
  128. package/dist/commonjs/table/lib/Table.d.ts +207 -0
  129. package/dist/commonjs/table/lib/Table.d.ts.map +1 -0
  130. package/dist/commonjs/table/lib/Table.js +229 -0
  131. package/dist/commonjs/table/lib/TableBody.d.ts +2 -0
  132. package/dist/commonjs/table/lib/TableBody.d.ts.map +1 -0
  133. package/dist/commonjs/table/lib/TableBody.js +35 -0
  134. package/dist/commonjs/table/lib/TableCaption.d.ts +2 -0
  135. package/dist/commonjs/table/lib/TableCaption.d.ts.map +1 -0
  136. package/dist/commonjs/table/lib/TableCaption.js +16 -0
  137. package/dist/commonjs/table/lib/TableCell.d.ts +2 -0
  138. package/dist/commonjs/table/lib/TableCell.d.ts.map +1 -0
  139. package/dist/commonjs/table/lib/TableCell.js +16 -0
  140. package/dist/commonjs/table/lib/TableFooter.d.ts +2 -0
  141. package/dist/commonjs/table/lib/TableFooter.d.ts.map +1 -0
  142. package/dist/commonjs/table/lib/TableFooter.js +15 -0
  143. package/dist/commonjs/table/lib/TableHead.d.ts +2 -0
  144. package/dist/commonjs/table/lib/TableHead.d.ts.map +1 -0
  145. package/dist/commonjs/table/lib/TableHead.js +23 -0
  146. package/dist/commonjs/table/lib/TableHeader.d.ts +2 -0
  147. package/dist/commonjs/table/lib/TableHeader.d.ts.map +1 -0
  148. package/dist/commonjs/table/lib/TableHeader.js +16 -0
  149. package/dist/commonjs/table/lib/TableRow.d.ts +2 -0
  150. package/dist/commonjs/table/lib/TableRow.d.ts.map +1 -0
  151. package/dist/commonjs/table/lib/TableRow.js +19 -0
  152. package/dist/commonjs/text-area/lib/TextArea.d.ts +3 -12
  153. package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
  154. package/dist/commonjs/text-area/lib/TextArea.js +9 -33
  155. package/dist/commonjs/text-area/lib/TextAreaField.d.ts +2 -2
  156. package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
  157. package/dist/commonjs/text-area/lib/TextAreaField.js +25 -41
  158. package/dist/commonjs/text-input/lib/TextInput.d.ts +5 -14
  159. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
  160. package/dist/commonjs/text-input/lib/TextInput.js +9 -33
  161. package/dist/commonjs/text-input/lib/TextInputField.d.ts +2 -2
  162. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
  163. package/dist/commonjs/text-input/lib/TextInputField.js +25 -30
  164. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +3 -5
  165. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  166. package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +3 -3
  167. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
  168. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  169. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +2 -1
  170. package/dist/es6/color-picker/index.d.ts +1 -1
  171. package/dist/es6/color-picker/index.d.ts.map +1 -1
  172. package/dist/es6/color-picker/index.js +1 -1
  173. package/dist/es6/color-picker/lib/ColorPicker.d.ts +1 -2
  174. package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
  175. package/dist/es6/color-picker/lib/ColorPicker.js +17 -41
  176. package/dist/es6/color-picker/lib/parts/ColorReset.js +27 -18
  177. package/dist/es6/color-picker/lib/parts/SwatchBook.js +21 -34
  178. package/dist/es6/form-field/lib/FormField.d.ts +4 -19
  179. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
  180. package/dist/es6/form-field/lib/FormField.js +5 -28
  181. package/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
  182. package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
  183. package/dist/es6/form-field/lib/FormFieldHint.js +7 -31
  184. package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
  185. package/dist/es6/form-field/lib/FormFieldInput.js +3 -14
  186. package/dist/es6/form-field/lib/FormFieldLabel.d.ts +2 -8
  187. package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  188. package/dist/es6/form-field/lib/FormFieldLabel.js +9 -38
  189. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +3 -5
  190. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  191. package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +2 -3
  192. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +3 -5
  193. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  194. package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +3 -4
  195. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +3 -5
  196. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  197. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +2 -3
  198. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
  199. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  200. package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +9 -19
  201. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
  202. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  203. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.js +4 -4
  204. package/dist/es6/index.d.ts +2 -1
  205. package/dist/es6/index.d.ts.map +1 -1
  206. package/dist/es6/index.js +2 -2
  207. package/dist/es6/menu/index.d.ts +1 -4
  208. package/dist/es6/menu/index.d.ts.map +1 -1
  209. package/dist/es6/menu/index.js +1 -4
  210. package/dist/es6/menu/lib/Menu.d.ts +44 -13
  211. package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
  212. package/dist/es6/menu/lib/Menu.js +120 -125
  213. package/dist/es6/menu/lib/MenuItem.d.ts +45 -14
  214. package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
  215. package/dist/es6/menu/lib/MenuItem.js +112 -102
  216. package/dist/es6/pill/lib/Pill.d.ts +107 -19
  217. package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
  218. package/dist/es6/pill/lib/Pill.js +149 -55
  219. package/dist/es6/pill/lib/PillAvatar.d.ts +1 -2
  220. package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -1
  221. package/dist/es6/pill/lib/PillAvatar.js +3 -14
  222. package/dist/es6/pill/lib/PillCount.js +4 -27
  223. package/dist/es6/pill/lib/PillIcon.d.ts +1 -2
  224. package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -1
  225. package/dist/es6/pill/lib/PillIcon.js +3 -26
  226. package/dist/es6/pill/lib/PillIconButton.d.ts +1 -2
  227. package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -1
  228. package/dist/es6/pill/lib/PillIconButton.js +7 -30
  229. package/dist/es6/pill/lib/PillLabel.d.ts +1 -2
  230. package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -1
  231. package/dist/es6/pill/lib/PillLabel.js +5 -28
  232. package/dist/es6/pill/lib/usePillModel.d.ts +5 -5
  233. package/dist/es6/pill/lib/usePillModel.js +8 -16
  234. package/dist/es6/segmented-control/index.d.ts +5 -0
  235. package/dist/es6/segmented-control/index.d.ts.map +1 -0
  236. package/dist/es6/segmented-control/index.js +4 -0
  237. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +1189 -0
  238. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
  239. package/dist/es6/segmented-control/lib/SegmentedControl.js +51 -0
  240. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +107 -0
  241. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
  242. package/dist/es6/segmented-control/lib/SegmentedControlItem.js +83 -0
  243. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +135 -0
  244. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
  245. package/dist/es6/segmented-control/lib/SegmentedControlList.js +19 -0
  246. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +79 -0
  247. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
  248. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +18 -0
  249. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1202 -0
  250. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
  251. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +69 -0
  252. package/dist/es6/select/index.d.ts +0 -3
  253. package/dist/es6/select/index.d.ts.map +1 -1
  254. package/dist/es6/select/index.js +0 -3
  255. package/dist/es6/select/lib/Select.d.ts +0 -1
  256. package/dist/es6/select/lib/Select.d.ts.map +1 -1
  257. package/dist/es6/select/lib/Select.js +145 -186
  258. package/dist/es6/select/lib/SelectBase.d.ts +2 -2
  259. package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
  260. package/dist/es6/select/lib/SelectBase.js +101 -97
  261. package/dist/es6/select/lib/SelectMenu.d.ts +2 -2
  262. package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
  263. package/dist/es6/select/lib/SelectMenu.js +49 -81
  264. package/dist/es6/select/lib/SelectOption.d.ts +1 -2
  265. package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
  266. package/dist/es6/select/lib/SelectOption.js +30 -45
  267. package/dist/es6/select/lib/scrolling.js +6 -7
  268. package/dist/es6/select/lib/utils.js +4 -4
  269. package/dist/es6/side-panel/index.d.ts +0 -3
  270. package/dist/es6/side-panel/index.d.ts.map +1 -1
  271. package/dist/es6/side-panel/index.js +0 -3
  272. package/dist/es6/side-panel/lib/SidePanel.d.ts +13 -27
  273. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  274. package/dist/es6/side-panel/lib/SidePanel.js +93 -131
  275. package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
  276. package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
  277. package/dist/es6/side-panel/lib/SidePanelToggleButton.js +43 -0
  278. package/dist/es6/side-panel/lib/hooks.d.ts +20 -0
  279. package/dist/es6/side-panel/lib/hooks.d.ts.map +1 -1
  280. package/dist/es6/side-panel/lib/hooks.js +37 -18
  281. package/dist/es6/status-indicator/index.d.ts +4 -0
  282. package/dist/es6/status-indicator/index.d.ts.map +1 -0
  283. package/dist/es6/status-indicator/index.js +3 -0
  284. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +66 -0
  285. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
  286. package/dist/es6/status-indicator/lib/StatusIndicator.js +51 -0
  287. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts +83 -0
  288. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
  289. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +80 -0
  290. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
  291. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
  292. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +9 -0
  293. package/dist/es6/status-indicator/lib/hooks/index.d.ts +2 -0
  294. package/dist/es6/status-indicator/lib/hooks/index.d.ts.map +1 -0
  295. package/dist/es6/status-indicator/lib/hooks/index.js +1 -0
  296. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
  297. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
  298. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.js +22 -0
  299. package/dist/es6/table/index.d.ts +2 -0
  300. package/dist/es6/table/index.d.ts.map +1 -0
  301. package/dist/es6/table/index.js +1 -0
  302. package/dist/es6/table/lib/Table.d.ts +207 -0
  303. package/dist/es6/table/lib/Table.d.ts.map +1 -0
  304. package/dist/es6/table/lib/Table.js +223 -0
  305. package/dist/es6/table/lib/TableBody.d.ts +2 -0
  306. package/dist/es6/table/lib/TableBody.d.ts.map +1 -0
  307. package/dist/es6/table/lib/TableBody.js +29 -0
  308. package/dist/es6/table/lib/TableCaption.d.ts +2 -0
  309. package/dist/es6/table/lib/TableCaption.d.ts.map +1 -0
  310. package/dist/es6/table/lib/TableCaption.js +10 -0
  311. package/dist/es6/table/lib/TableCell.d.ts +2 -0
  312. package/dist/es6/table/lib/TableCell.d.ts.map +1 -0
  313. package/dist/es6/table/lib/TableCell.js +10 -0
  314. package/dist/es6/table/lib/TableFooter.d.ts +2 -0
  315. package/dist/es6/table/lib/TableFooter.d.ts.map +1 -0
  316. package/dist/es6/table/lib/TableFooter.js +9 -0
  317. package/dist/es6/table/lib/TableHead.d.ts +2 -0
  318. package/dist/es6/table/lib/TableHead.d.ts.map +1 -0
  319. package/dist/es6/table/lib/TableHead.js +17 -0
  320. package/dist/es6/table/lib/TableHeader.d.ts +2 -0
  321. package/dist/es6/table/lib/TableHeader.d.ts.map +1 -0
  322. package/dist/es6/table/lib/TableHeader.js +10 -0
  323. package/dist/es6/table/lib/TableRow.d.ts +2 -0
  324. package/dist/es6/table/lib/TableRow.d.ts.map +1 -0
  325. package/dist/es6/table/lib/TableRow.js +13 -0
  326. package/dist/es6/text-area/lib/TextArea.d.ts +3 -12
  327. package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
  328. package/dist/es6/text-area/lib/TextArea.js +7 -31
  329. package/dist/es6/text-area/lib/TextAreaField.d.ts +2 -2
  330. package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
  331. package/dist/es6/text-area/lib/TextAreaField.js +22 -38
  332. package/dist/es6/text-input/lib/TextInput.d.ts +5 -14
  333. package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
  334. package/dist/es6/text-input/lib/TextInput.js +7 -31
  335. package/dist/es6/text-input/lib/TextInputField.d.ts +2 -2
  336. package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
  337. package/dist/es6/text-input/lib/TextInputField.js +24 -29
  338. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +3 -5
  339. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  340. package/dist/es6/text-input/lib/hooks/useTextInputField.js +1 -1
  341. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
  342. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  343. package/dist/es6/text-input/lib/hooks/useTextInputModel.js +2 -1
  344. package/form-field/lib/FormField.tsx +5 -10
  345. package/form-field/lib/FormFieldHint.tsx +23 -30
  346. package/form-field/lib/FormFieldLabel.tsx +18 -33
  347. package/form-field/lib/hooks/useFormFieldModel.tsx +1 -3
  348. package/form-field/lib/hooks/useFormFieldOrientation.tsx +6 -6
  349. package/form-field/package.json +2 -1
  350. package/index.ts +2 -3
  351. package/menu/index.ts +1 -6
  352. package/menu/lib/Menu.tsx +81 -27
  353. package/menu/lib/MenuItem.tsx +63 -19
  354. package/menu/package.json +2 -1
  355. package/package.json +6 -6
  356. package/pill/lib/Pill.tsx +109 -10
  357. package/pill/lib/PillCount.tsx +1 -1
  358. package/pill/lib/PillIcon.tsx +1 -1
  359. package/pill/package.json +2 -1
  360. package/segmented-control/LICENSE +126 -0
  361. package/segmented-control/README.md +6 -0
  362. package/segmented-control/index.ts +4 -0
  363. package/segmented-control/lib/SegmentedControl.tsx +57 -0
  364. package/segmented-control/lib/SegmentedControlItem.tsx +175 -0
  365. package/segmented-control/lib/SegmentedControlList.tsx +49 -0
  366. package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +33 -0
  367. package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +75 -0
  368. package/segmented-control/package.json +6 -0
  369. package/select/README.md +7 -7
  370. package/select/index.ts +0 -4
  371. package/select/lib/Select.tsx +1 -3
  372. package/select/lib/SelectBase.tsx +3 -5
  373. package/select/lib/SelectMenu.tsx +1 -3
  374. package/select/lib/SelectOption.tsx +1 -3
  375. package/select/package.json +2 -1
  376. package/side-panel/index.ts +0 -4
  377. package/side-panel/lib/SidePanel.tsx +119 -170
  378. package/side-panel/lib/SidePanelToggleButton.tsx +78 -0
  379. package/side-panel/lib/hooks.ts +20 -0
  380. package/side-panel/package.json +2 -1
  381. package/status-indicator/LICENSE +52 -0
  382. package/status-indicator/README.md +12 -0
  383. package/status-indicator/index.ts +3 -0
  384. package/status-indicator/lib/StatusIndicator.tsx +75 -0
  385. package/status-indicator/lib/StatusIndicatorIcon.tsx +88 -0
  386. package/status-indicator/lib/StatusIndicatorLabel.tsx +28 -0
  387. package/status-indicator/lib/hooks/index.ts +1 -0
  388. package/status-indicator/lib/hooks/useStatusIndicatorModel.tsx +29 -0
  389. package/status-indicator/package.json +6 -0
  390. package/{breadcrumbs → table}/LICENSE +0 -1
  391. package/table/README.md +5 -0
  392. package/table/index.ts +1 -0
  393. package/table/lib/Table.tsx +236 -0
  394. package/table/lib/TableBody.tsx +35 -0
  395. package/table/lib/TableCaption.tsx +22 -0
  396. package/table/lib/TableCell.tsx +27 -0
  397. package/table/lib/TableFooter.tsx +14 -0
  398. package/table/lib/TableHead.tsx +23 -0
  399. package/table/lib/TableHeader.tsx +28 -0
  400. package/table/lib/TableRow.tsx +26 -0
  401. package/table/package.json +6 -0
  402. package/text-area/lib/TextArea.tsx +9 -6
  403. package/text-area/lib/TextAreaField.tsx +7 -3
  404. package/text-area/package.json +2 -1
  405. package/text-input/lib/TextInput.tsx +9 -6
  406. package/text-input/lib/TextInputField.tsx +10 -6
  407. package/text-input/lib/hooks/useTextInputModel.ts +1 -0
  408. package/text-input/package.json +2 -1
  409. package/breadcrumbs/README.md +0 -7
  410. package/breadcrumbs/index.ts +0 -5
  411. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx +0 -85
  412. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +0 -152
  413. package/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.tsx +0 -63
  414. package/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.ts +0 -109
  415. package/breadcrumbs/lib/Breadcrumbs/Dropdown/index.tsx +0 -38
  416. package/breadcrumbs/lib/Breadcrumbs/List/Collapsible.tsx +0 -66
  417. package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +0 -64
  418. package/breadcrumbs/lib/Breadcrumbs/List/Link.tsx +0 -88
  419. package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +0 -30
  420. package/breadcrumbs/lib/Breadcrumbs/List/hooks.ts +0 -114
  421. package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +0 -28
  422. package/breadcrumbs/lib/Breadcrumbs/List/styles.ts +0 -12
  423. package/breadcrumbs/lib/Breadcrumbs/Nav.tsx +0 -14
  424. package/breadcrumbs/lib/Breadcrumbs/hooks.ts +0 -13
  425. package/breadcrumbs/lib/Breadcrumbs/index.tsx +0 -15
  426. package/breadcrumbs/lib/Breadcrumbs/types.ts +0 -7
  427. package/breadcrumbs/package.json +0 -5
  428. package/dist/commonjs/breadcrumbs/index.d.ts +0 -5
  429. package/dist/commonjs/breadcrumbs/index.d.ts.map +0 -1
  430. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  431. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
  432. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -69
  433. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
  434. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
  435. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -94
  436. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  437. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
  438. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +0 -73
  439. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
  440. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
  441. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -77
  442. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  443. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
  444. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -37
  445. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  446. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
  447. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -78
  448. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  449. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
  450. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -49
  451. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  452. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
  453. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -66
  454. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
  455. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
  456. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -43
  457. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  458. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
  459. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -116
  460. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
  461. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
  462. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +0 -38
  463. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  464. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
  465. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -16
  466. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  467. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
  468. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.js +0 -34
  469. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  470. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
  471. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -12
  472. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
  473. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
  474. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.js +0 -17
  475. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  476. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
  477. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.js +0 -2
  478. package/dist/commonjs/text-area/lib/hooks/index.d.ts +0 -2
  479. package/dist/commonjs/text-area/lib/hooks/index.d.ts.map +0 -1
  480. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
  481. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
  482. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.js +0 -5
  483. package/dist/es6/breadcrumbs/index.d.ts +0 -5
  484. package/dist/es6/breadcrumbs/index.d.ts.map +0 -1
  485. package/dist/es6/breadcrumbs/index.js +0 -4
  486. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  487. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
  488. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -63
  489. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
  490. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
  491. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -87
  492. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  493. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
  494. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +0 -51
  495. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
  496. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
  497. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -72
  498. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  499. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
  500. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -30
  501. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  502. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
  503. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -55
  504. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  505. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
  506. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -42
  507. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  508. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
  509. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -59
  510. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
  511. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
  512. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -36
  513. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  514. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
  515. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -91
  516. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
  517. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
  518. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +0 -32
  519. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  520. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
  521. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -12
  522. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  523. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
  524. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.js +0 -27
  525. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  526. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
  527. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -8
  528. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
  529. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
  530. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.js +0 -14
  531. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  532. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
  533. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.js +0 -1
  534. package/dist/es6/text-area/lib/hooks/index.d.ts +0 -2
  535. package/dist/es6/text-area/lib/hooks/index.d.ts.map +0 -1
  536. package/dist/es6/text-area/lib/hooks/index.js +0 -1
  537. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
  538. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
  539. package/dist/es6/text-area/lib/hooks/useTextAreaModel.js +0 -2
  540. package/text-area/lib/hooks/index.ts +0 -1
  541. package/text-area/lib/hooks/useTextAreaModel.ts +0 -3
@@ -1,4 +1,4 @@
1
- import {StackSpacing, StackProps} from '@workday/canvas-kit-react/layout';
1
+ import {FlexProps} from '@workday/canvas-kit-react/layout';
2
2
  import {space} from '@workday/canvas-kit-react/tokens';
3
3
 
4
4
  /**
@@ -6,21 +6,21 @@ import {space} from '@workday/canvas-kit-react/tokens';
6
6
  */
7
7
  export const useFormFieldOrientation = (orientation: 'horizontal' | 'vertical') => {
8
8
  let layoutProps: {
9
- flexDirection: StackProps['flexDirection'];
10
- alignItems: StackProps['alignItems'];
11
- spacing: StackSpacing;
9
+ flexDirection: FlexProps['flexDirection'];
10
+ alignItems: FlexProps['alignItems'];
11
+ gap: FlexProps['gap'];
12
12
  };
13
13
 
14
14
  if (orientation === 'horizontal') {
15
15
  layoutProps = {
16
16
  flexDirection: 'row',
17
- spacing: space.l,
17
+ gap: space.l,
18
18
  alignItems: 'center',
19
19
  };
20
20
  } else {
21
21
  layoutProps = {
22
22
  flexDirection: 'column',
23
- spacing: space.xxxs,
23
+ gap: space.xxxs,
24
24
  alignItems: 'flex-start',
25
25
  };
26
26
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "main": "../dist/commonjs/form-field",
3
3
  "module": "../dist/es6/form-field",
4
- "sideEffects": false
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/form-field"
5
6
  }
package/index.ts CHANGED
@@ -1,11 +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
-
11
- /// <reference types="@types/node" />
package/menu/index.ts CHANGED
@@ -1,7 +1,2 @@
1
- import Menu, {MenuProps} from './lib/Menu';
2
- import MenuItem from './lib/MenuItem';
3
-
4
- export {Menu, MenuItem, MenuProps};
5
-
6
- export default Menu;
1
+ export * from './lib/Menu';
7
2
  export * from './lib/MenuItem';
package/menu/lib/Menu.tsx CHANGED
@@ -1,23 +1,35 @@
1
1
  import * as React from 'react';
2
2
  import styled from '@emotion/styled';
3
3
 
4
- import {MenuItemProps} from './MenuItem';
4
+ import {DeprecatedMenuItemProps} from './MenuItem';
5
5
  import {Card} from '@workday/canvas-kit-react/card';
6
6
  import {commonColors, space, borderRadius} from '@workday/canvas-kit-react/tokens';
7
7
  import {hideMouseFocus, GrowthBehavior, generateUniqueId} from '@workday/canvas-kit-react/common';
8
8
 
9
- export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLUListElement> {
9
+ /**
10
+ * ### Deprecated Menu
11
+ *
12
+ * As of Canvas Kit v8, Menu is being deprecated.
13
+ * It will be removed in v10. Please see the
14
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
15
+ * for more information.
16
+ */
17
+ export interface DeprecatedMenuProps
18
+ extends GrowthBehavior,
19
+ React.HTMLAttributes<HTMLUListElement> {
10
20
  /**
11
- * The MenuItem children of the Menu (must be at least one). Also accepts other components which share the same interface as `MenuItem`.
21
+ * The DeprecatedMenuItem children of the DeprecatedMenu (must be at least one). Also accepts other components which share the same interface as `DeprecatedMenuItem`.
12
22
  */
13
- children?: React.ReactElement<MenuItemProps> | React.ReactElement<MenuItemProps>[];
23
+ children?:
24
+ | React.ReactElement<DeprecatedMenuItemProps>
25
+ | React.ReactElement<DeprecatedMenuItemProps>[];
14
26
  /**
15
- * 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.
27
+ * 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.
16
28
  * @default true
17
29
  */
18
30
  isOpen?: boolean;
19
31
  /**
20
- * The width of the Menu. If no value is provided, the Menu will collapse around its content.
32
+ * The width of the DeprecatedMenu. If no value is provided, the DeprecatedMenu will collapse around its content.
21
33
  */
22
34
  width?: number | string;
23
35
  /**
@@ -25,7 +37,7 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
25
37
  */
26
38
  onSelect?: () => void;
27
39
  /**
28
- * 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.
40
+ * 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.
29
41
  */
30
42
  onClose?: () => void;
31
43
  /**
@@ -33,16 +45,24 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
33
45
  */
34
46
  initialSelectedItem?: number;
35
47
  /**
36
- * The unique id of the Menu used for ARIA and HTML `id` attributes.
48
+ * The unique id of the DeprecatedMenu used for ARIA and HTML `id` attributes.
37
49
  */
38
50
  id?: string;
39
51
  /**
40
- * The HTML `id` of the element that labels the Menu. Often used with menu buttons.
52
+ * The HTML `id` of the element that labels the DeprecatedMenu. Often used with menu buttons.
41
53
  */
42
54
  'aria-labelledby'?: string;
43
55
  }
44
56
 
45
- export interface MenuState {
57
+ /**
58
+ * ### Deprecated Menu State
59
+ *
60
+ * As of Canvas Kit v8, Menu is being deprecated.
61
+ * It will be removed in v10. Please see the
62
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
63
+ * for more information.
64
+ */
65
+ export interface DeprecatedMenuState {
46
66
  selectedItemIndex: number;
47
67
  }
48
68
 
@@ -57,14 +77,29 @@ const List = styled('ul')({
57
77
  ...hideMouseFocus,
58
78
  });
59
79
 
60
- export default class Menu extends React.Component<MenuProps, MenuState> {
80
+ /**
81
+ * As of Canvas Kit v8, Menu is being deprecated.
82
+ * It will be removed in v10. Please see the [upgrade
83
+ * guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for
84
+ * more information.
85
+ *
86
+ * `DeprecatedMenu` renders a styled `<ul role="menu">` element within a {@link Card} and follows
87
+ * the [Active Menu
88
+ * pattern](https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-actions-active-descendant.html)
89
+ * using `aria-activedescendant`.
90
+ *
91
+ * Undocumented props are spread to the underlying `<ul>` element.
92
+ *
93
+ * @deprecated
94
+ */
95
+ export class DeprecatedMenu extends React.Component<DeprecatedMenuProps, DeprecatedMenuState> {
61
96
  private id = generateUniqueId();
62
97
  private animateId!: number;
63
98
 
64
99
  private menuRef: React.RefObject<HTMLUListElement>;
65
100
  private firstCharacters!: string[];
66
101
 
67
- constructor(props: MenuProps) {
102
+ constructor(props: DeprecatedMenuProps) {
68
103
  super(props);
69
104
  this.menuRef = React.createRef();
70
105
 
@@ -79,7 +114,7 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
79
114
  };
80
115
  }
81
116
 
82
- componentDidUpdate(prevProps: MenuProps) {
117
+ componentDidUpdate(prevProps: DeprecatedMenuProps) {
83
118
  if (this.props.children !== prevProps.children) {
84
119
  this.setFirstCharacters();
85
120
  this.setInitialSelectedItem();
@@ -95,6 +130,13 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
95
130
  }
96
131
 
97
132
  componentDidMount() {
133
+ console.warn(
134
+ `This component is being deprecated and will be removed in Canvas Kit V9.\n
135
+ For more information, please see the V8 upgrade guide:\n
136
+ https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page
137
+ `
138
+ );
139
+
98
140
  this.setFirstCharacters();
99
141
  this.setInitialSelectedItem();
100
142
  }
@@ -119,6 +161,7 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
119
161
  } = this.props;
120
162
  const {selectedItemIndex} = this.state;
121
163
  const cardWidth = grow ? '100%' : width;
164
+ let interactiveItemIndex: number | null = null;
122
165
 
123
166
  return (
124
167
  <Card display="inline-block" padding={space.zero} width={cardWidth} depth={3}>
@@ -133,17 +176,22 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
133
176
  ref={this.menuRef}
134
177
  {...elemProps}
135
178
  >
136
- {React.Children.map(children, (menuItem, index) => {
179
+ {React.Children.map(children, menuItem => {
137
180
  if (!React.isValidElement(menuItem)) {
138
181
  return;
139
182
  }
140
- const itemId = `${id}-${index}`;
183
+ let itemId;
184
+ if (!menuItem.props.isHeader) {
185
+ interactiveItemIndex = (interactiveItemIndex ?? -1) + 1;
186
+ itemId = `${id}-${interactiveItemIndex}`;
187
+ }
141
188
  return (
142
189
  <React.Fragment key={itemId}>
143
190
  {React.cloneElement(menuItem, {
144
191
  onClick: (event: React.MouseEvent) => this.handleClick(event, menuItem.props),
145
192
  id: itemId,
146
- isFocused: selectedItemIndex === index,
193
+ isFocused:
194
+ selectedItemIndex === interactiveItemIndex && !menuItem.props.isHeader,
147
195
  })}
148
196
  </React.Fragment>
149
197
  );
@@ -175,9 +223,12 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
175
223
  const children = React.Children.toArray(this.props.children);
176
224
  let nextSelectedIndex = 0;
177
225
  let isShortcut = false;
178
- const itemCount = children.length;
179
- const firstItem = 0;
180
- const lastItem = itemCount - 1;
226
+ const interactiveItems = children.filter(child => {
227
+ return !(child as React.ReactElement<DeprecatedMenuItemProps>)?.props?.isHeader;
228
+ });
229
+ const interactiveItemCount = interactiveItems.length;
230
+ const firstIndex = 0;
231
+ const lastIndex = interactiveItemCount - 1;
181
232
 
182
233
  if (event.key.length === 1 && event.key.match(/\S/)) {
183
234
  let start = this.state.selectedItemIndex + 1;
@@ -197,18 +248,16 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
197
248
  switch (event.key) {
198
249
  case 'ArrowUp':
199
250
  case 'ArrowDown':
200
- case 'Down': // IE/Edge specific value
201
- case 'Up': // IE/Edge specific value
202
251
  const direction = event.key === 'ArrowUp' ? -1 : 1;
203
252
  isShortcut = true;
204
253
  const nextIndex = this.state.selectedItemIndex + direction;
205
254
  nextSelectedIndex =
206
- nextIndex < 0 ? lastItem : nextIndex >= itemCount ? firstItem : nextIndex;
255
+ nextIndex < 0 ? lastIndex : nextIndex >= interactiveItemCount ? firstIndex : nextIndex;
207
256
  break;
208
257
 
209
258
  case 'Home':
210
259
  case 'End':
211
- const skipTo = event.key === 'Home' ? firstItem : lastItem;
260
+ const skipTo = event.key === 'Home' ? firstIndex : lastIndex;
212
261
  isShortcut = true;
213
262
  nextSelectedIndex = skipTo;
214
263
  break;
@@ -231,7 +280,9 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
231
280
  case ' ':
232
281
  case 'Enter':
233
282
  nextSelectedIndex = this.state.selectedItemIndex;
234
- const child = children[this.state.selectedItemIndex] as React.ReactElement<MenuItemProps>;
283
+ const child = interactiveItems[this.state.selectedItemIndex] as React.ReactElement<
284
+ DeprecatedMenuItemProps
285
+ >;
235
286
  this.handleClick(event, child.props);
236
287
  isShortcut = true;
237
288
  break;
@@ -248,11 +299,11 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
248
299
 
249
300
  private handleClick = (
250
301
  event: React.MouseEvent | React.KeyboardEvent,
251
- menuItemProps: MenuItemProps
302
+ menuItemProps: DeprecatedMenuItemProps
252
303
  ): void => {
253
304
  /* istanbul ignore next line for coverage */
254
305
  if (menuItemProps.isDisabled) {
255
- // You should only hit this point if you are using a custom MenuItem implementation.
306
+ // You should only hit this point if you are using a custom DeprecatedMenuItem implementation.
256
307
  return;
257
308
  }
258
309
  if (menuItemProps.onClick) {
@@ -284,7 +335,7 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
284
335
  private setFirstCharacters = (): void => {
285
336
  const getFirstCharacter = (child: React.ReactNode): string => {
286
337
  let character = '';
287
- if (!child || typeof child === 'boolean' || child === {}) {
338
+ if (!child || typeof child === 'boolean') {
288
339
  character = '';
289
340
  } else if (typeof child === 'string' || typeof child === 'number') {
290
341
  character = child
@@ -308,6 +359,9 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
308
359
  };
309
360
 
310
361
  const firstCharacters = React.Children.map(this.props.children, child => {
362
+ if ((child as React.ReactElement<DeprecatedMenuItemProps>)?.props?.isHeader) {
363
+ return;
364
+ }
311
365
  return getFirstCharacter(child);
312
366
  });
313
367
 
@@ -11,51 +11,64 @@ import {
11
11
  import {CanvasSystemIcon} from '@workday/design-assets-types';
12
12
  import {SystemIcon, SystemIconProps} from '@workday/canvas-kit-react/icon';
13
13
 
14
- export interface MenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
14
+ /**
15
+ * ### Deprecated Menu Item Props
16
+ *
17
+ * As of Canvas Kit v8, Menu is being deprecated.
18
+ * It will be removed in v10. Please see the
19
+ * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
20
+ * for more information.
21
+ */
22
+ export interface DeprecatedMenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
15
23
  /**
16
- * 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).
24
+ * 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).
17
25
  */
18
26
  onClick?: (event: React.MouseEvent) => void;
19
27
  /**
20
- * 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.
28
+ * 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.
21
29
  */
22
30
  id?: string;
23
31
  /**
24
- * The icon of the MenuItem. This icon is displayed before what you supplied for the children.
32
+ * The icon of the DeprecatedMenuItem. This icon is displayed before what you supplied for the children.
25
33
  */
26
34
  icon?: CanvasSystemIcon;
27
35
  /**
28
- * The secondary icon of the MenuItem. This icon is displayed after what you supplied for the children.
36
+ * The secondary icon of the DeprecatedMenuItem. This icon is displayed after what you supplied for the children.
29
37
  */
30
38
  secondaryIcon?: CanvasSystemIcon;
31
39
  /**
32
- * If true, render a top border on the MenuItem.
40
+ * If true, render a top border on the DeprecatedMenuItem.
33
41
  * @default false
34
42
  */
35
43
  hasDivider?: boolean;
36
44
  /**
37
- * If true, set the MenuItem to the disabled state so it is not clickable.
45
+ * If true, render a header to group data, this menu item will not be intractable.
46
+ * @default false
47
+ */
48
+ isHeader?: boolean;
49
+ /**
50
+ * If true, set the DeprecatedMenuItem to the disabled state so it is not clickable.
38
51
  * @default false
39
52
  */
40
53
  isDisabled?: boolean;
41
54
  /**
42
- * 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.
55
+ * 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.
43
56
  * @default false
44
57
  */
45
58
  isFocused?: boolean;
46
59
  /**
47
- * 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).
60
+ * 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).
48
61
  * @default menuItem
49
62
  */
50
63
  role?: string;
51
64
  /**
52
- * If true, allow the onClose Menu callback to be fired after the MenuItem has been clicked.
65
+ * If true, allow the onClose DeprecatedMenu callback to be fired after the DeprecatedMenuItem has been clicked.
53
66
  * @default true
54
67
  */
55
68
  shouldClose?: boolean;
56
69
  }
57
70
 
58
- const Item = styled('li')<Pick<MenuItemProps, 'isDisabled' | 'isFocused'>>(
71
+ const Item = styled('li')<Pick<DeprecatedMenuItemProps, 'isDisabled' | 'isFocused' | 'isHeader'>>(
59
72
  {
60
73
  ...type.levels.subtext.large,
61
74
  padding: `${space.xxs} ${space.s}`,
@@ -71,6 +84,9 @@ const Item = styled('li')<Pick<MenuItemProps, 'isDisabled' | 'isFocused'>>(
71
84
  outline: 'none',
72
85
  },
73
86
  },
87
+ ({isHeader}) => {
88
+ return {pointerEvents: isHeader ? 'none' : 'all'};
89
+ },
74
90
  ({isFocused, isDisabled}) => {
75
91
  if (!isFocused && !isDisabled) {
76
92
  return {
@@ -237,10 +253,37 @@ const scrollIntoViewIfNeeded = (elem: HTMLElement, centerIfNeeded = true): void
237
253
  }
238
254
  };
239
255
 
240
- class MenuItem extends React.Component<MenuItemProps> {
256
+ /**
257
+ * `DeprecatedMenuItem` renders an `<li>` element with the correct attributes to ensure it is
258
+ * accessible. If you choose to implement your own custom menu items, be sure to use semantic `<li>`
259
+ * elements with the following attributes:
260
+ *
261
+ * - `role="menuitem"`
262
+ * - `tabindex={-1}`
263
+ * - `id`s following this pattern: `${MenuId}-${index}`
264
+ *
265
+ * As of Canvas Kit v8, Menu is being deprecated.
266
+ * It will be removed in v10. Please see the [upgrade
267
+ * guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for
268
+ * more information.
269
+ *
270
+ * Undocumented props are spread to the underlying `<li>` element.
271
+ *
272
+ * @deprecated
273
+ */
274
+ export class DeprecatedMenuItem extends React.Component<DeprecatedMenuItemProps> {
241
275
  ref = React.createRef<HTMLLIElement>();
242
276
 
243
- componentDidUpdate = (prevProps: MenuItemProps) => {
277
+ componentDidMount() {
278
+ console.warn(
279
+ `This component is being deprecated and will be removed in Canvas Kit V9.\n
280
+ For more information, please see the V8 upgrade guide:\n
281
+ https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page
282
+ `
283
+ );
284
+ }
285
+
286
+ componentDidUpdate = (prevProps: DeprecatedMenuItemProps) => {
244
287
  if (!prevProps.isFocused && this.props.isFocused) {
245
288
  if (this.ref.current) {
246
289
  scrollIntoViewIfNeeded(this.ref.current);
@@ -248,7 +291,7 @@ class MenuItem extends React.Component<MenuItemProps> {
248
291
  }
249
292
  };
250
293
 
251
- render(): React.ReactNode {
294
+ render() {
252
295
  const {
253
296
  onClick,
254
297
  children,
@@ -258,6 +301,7 @@ class MenuItem extends React.Component<MenuItemProps> {
258
301
  hasDivider,
259
302
  isDisabled,
260
303
  isFocused,
304
+ isHeader,
261
305
  role,
262
306
  ...elemProps
263
307
  } = this.props;
@@ -267,16 +311,18 @@ class MenuItem extends React.Component<MenuItemProps> {
267
311
 
268
312
  return (
269
313
  <>
270
- {hasDivider && <Divider />}
314
+ {hasDivider && <Divider aria-hidden="true" />}
271
315
  <Item
272
316
  ref={this.ref}
273
317
  tabIndex={-1}
274
318
  id={id}
275
- role={role}
319
+ role={isHeader ? 'presentation' : role}
320
+ aria-hidden={isHeader ? true : undefined}
276
321
  onClick={this.handleClick}
277
322
  aria-disabled={isDisabled ? true : undefined}
278
323
  isDisabled={!!isDisabled}
279
324
  isFocused={!!isFocused}
325
+ isHeader={!!isHeader}
280
326
  {...elemProps}
281
327
  >
282
328
  {icon && iconProps && <StyledSystemIcon {...iconProps} />}
@@ -306,9 +352,7 @@ class MenuItem extends React.Component<MenuItemProps> {
306
352
  */
307
353
  // TODO: Remove this ts-ignore when we convert to a functional component
308
354
  // @ts-ignore
309
- MenuItem.defaultProps = {
355
+ DeprecatedMenuItem.defaultProps = {
310
356
  shouldClose: true,
311
357
  role: 'menuitem',
312
358
  };
313
-
314
- export default MenuItem;
package/menu/package.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "main": "../dist/commonjs/menu",
3
3
  "module": "../dist/es6/menu",
4
- "sideEffects": false
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/menu"
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-preview-react",
3
- "version": "7.1.4",
3
+ "version": "7.2.0-427-next.2+2c79134a",
4
4
  "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -41,20 +41,20 @@
41
41
  "workday"
42
42
  ],
43
43
  "peerDependencies": {
44
- "react": "^16.8 || ^17.0"
44
+ "react": ">=16.14"
45
45
  },
46
46
  "dependencies": {
47
47
  "@emotion/react": "^11.7.1",
48
48
  "@emotion/styled": "^11.6.0",
49
- "@workday/canvas-kit-react": "^7.1.4",
49
+ "@workday/canvas-kit-react": "^7.2.0-427-next.2+2c79134a",
50
50
  "@workday/canvas-system-icons-web": "^3.0.0",
51
51
  "@workday/design-assets-types": "^0.2.8"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@workday/canvas-accent-icons-web": "^3.0.0",
55
- "@workday/canvas-kit-labs-react": "^7.1.4",
56
55
  "formik": "^2.2.9",
57
- "yup": "^0.31.1"
56
+ "react-hook-form": "7.36.1",
57
+ "yup": "^0.32.11"
58
58
  },
59
- "gitHead": "6c20e6b9755afa86a865f4e90c24a4a52ea9e481"
59
+ "gitHead": "2c79134aa48ef0efde9cdf883b529b8157337a28"
60
60
  }