@workday/canvas-kit-preview-react 8.0.0-alpha.253-next.22 → 8.0.0-alpha.428-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 (315) hide show
  1. package/color-picker/lib/ColorPicker.tsx +1 -1
  2. package/dist/commonjs/color-picker/lib/ColorPicker.js +25 -48
  3. package/dist/commonjs/color-picker/lib/parts/ColorReset.js +32 -23
  4. package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +26 -39
  5. package/dist/commonjs/form-field/lib/FormField.d.ts +4 -10
  6. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
  7. package/dist/commonjs/form-field/lib/FormField.js +10 -33
  8. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
  9. package/dist/commonjs/form-field/lib/FormFieldHint.js +8 -31
  10. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
  11. package/dist/commonjs/form-field/lib/FormFieldInput.js +6 -17
  12. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +2 -8
  13. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  14. package/dist/commonjs/form-field/lib/FormFieldLabel.js +8 -31
  15. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +3 -5
  16. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  17. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +4 -5
  18. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +3 -5
  19. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  20. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +5 -6
  21. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +3 -5
  22. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  23. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +4 -5
  24. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
  25. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  26. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +9 -19
  27. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
  28. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  29. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +5 -5
  30. package/dist/commonjs/menu/lib/Menu.d.ts +16 -9
  31. package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
  32. package/dist/commonjs/menu/lib/Menu.js +108 -132
  33. package/dist/commonjs/menu/lib/MenuItem.d.ts +17 -7
  34. package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
  35. package/dist/commonjs/menu/lib/MenuItem.js +111 -114
  36. package/dist/commonjs/pill/lib/Pill.d.ts +103 -5
  37. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
  38. package/dist/commonjs/pill/lib/Pill.js +158 -64
  39. package/dist/commonjs/pill/lib/PillAvatar.js +6 -17
  40. package/dist/commonjs/pill/lib/PillCount.js +7 -30
  41. package/dist/commonjs/pill/lib/PillIcon.js +8 -31
  42. package/dist/commonjs/pill/lib/PillIconButton.js +13 -36
  43. package/dist/commonjs/pill/lib/PillLabel.js +10 -33
  44. package/dist/commonjs/pill/lib/usePillModel.js +8 -16
  45. package/dist/commonjs/segmented-control/index.d.ts +2 -0
  46. package/dist/commonjs/segmented-control/index.d.ts.map +1 -1
  47. package/dist/commonjs/segmented-control/index.js +4 -0
  48. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +267 -82
  49. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
  50. package/dist/commonjs/segmented-control/lib/SegmentedControl.js +42 -7
  51. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +9 -5
  52. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -1
  53. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +24 -49
  54. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +71 -2
  55. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
  56. package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +15 -40
  57. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +28 -9
  58. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -1
  59. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +8 -10
  60. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +233 -83
  61. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -1
  62. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +33 -32
  63. package/dist/commonjs/select/lib/Select.js +147 -187
  64. package/dist/commonjs/select/lib/SelectBase.js +106 -101
  65. package/dist/commonjs/select/lib/SelectMenu.js +53 -84
  66. package/dist/commonjs/select/lib/SelectOption.js +33 -47
  67. package/dist/commonjs/select/lib/scrolling.js +6 -7
  68. package/dist/commonjs/select/lib/utils.js +4 -4
  69. package/dist/commonjs/side-panel/lib/SidePanel.d.ts +13 -26
  70. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  71. package/dist/commonjs/side-panel/lib/SidePanel.js +95 -133
  72. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
  73. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
  74. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +65 -0
  75. package/dist/commonjs/side-panel/lib/hooks.d.ts +20 -0
  76. package/dist/commonjs/side-panel/lib/hooks.d.ts.map +1 -1
  77. package/dist/commonjs/side-panel/lib/hooks.js +40 -21
  78. package/dist/commonjs/status-indicator/index.d.ts +2 -0
  79. package/dist/commonjs/status-indicator/index.d.ts.map +1 -1
  80. package/dist/commonjs/status-indicator/index.js +4 -0
  81. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +32 -8
  82. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
  83. package/dist/commonjs/status-indicator/lib/StatusIndicator.js +37 -35
  84. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts +10 -0
  85. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -1
  86. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +11 -23
  87. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +5 -28
  88. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.js +6 -15
  89. package/dist/commonjs/table/index.d.ts +2 -0
  90. package/dist/commonjs/table/index.d.ts.map +1 -0
  91. package/dist/commonjs/{text-area/lib/hooks → table}/index.js +1 -1
  92. package/dist/commonjs/table/lib/Table.d.ts +207 -0
  93. package/dist/commonjs/table/lib/Table.d.ts.map +1 -0
  94. package/dist/commonjs/table/lib/Table.js +229 -0
  95. package/dist/commonjs/table/lib/TableBody.d.ts +2 -0
  96. package/dist/commonjs/table/lib/TableBody.d.ts.map +1 -0
  97. package/dist/commonjs/table/lib/TableBody.js +35 -0
  98. package/dist/commonjs/table/lib/TableCaption.d.ts +2 -0
  99. package/dist/commonjs/table/lib/TableCaption.d.ts.map +1 -0
  100. package/dist/commonjs/table/lib/TableCaption.js +16 -0
  101. package/dist/commonjs/table/lib/TableCell.d.ts +2 -0
  102. package/dist/commonjs/table/lib/TableCell.d.ts.map +1 -0
  103. package/dist/commonjs/table/lib/TableCell.js +16 -0
  104. package/dist/commonjs/table/lib/TableFooter.d.ts +2 -0
  105. package/dist/commonjs/table/lib/TableFooter.d.ts.map +1 -0
  106. package/dist/commonjs/table/lib/TableFooter.js +15 -0
  107. package/dist/commonjs/table/lib/TableHead.d.ts +2 -0
  108. package/dist/commonjs/table/lib/TableHead.d.ts.map +1 -0
  109. package/dist/commonjs/table/lib/TableHead.js +23 -0
  110. package/dist/commonjs/table/lib/TableHeader.d.ts +2 -0
  111. package/dist/commonjs/table/lib/TableHeader.d.ts.map +1 -0
  112. package/dist/commonjs/table/lib/TableHeader.js +16 -0
  113. package/dist/commonjs/table/lib/TableRow.d.ts +2 -0
  114. package/dist/commonjs/table/lib/TableRow.d.ts.map +1 -0
  115. package/dist/commonjs/table/lib/TableRow.js +19 -0
  116. package/dist/commonjs/text-area/lib/TextArea.d.ts +2 -2
  117. package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
  118. package/dist/commonjs/text-area/lib/TextArea.js +9 -33
  119. package/dist/commonjs/text-area/lib/TextAreaField.d.ts +1 -1
  120. package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
  121. package/dist/commonjs/text-area/lib/TextAreaField.js +12 -36
  122. package/dist/commonjs/text-input/lib/TextInput.d.ts +4 -4
  123. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
  124. package/dist/commonjs/text-input/lib/TextInput.js +9 -33
  125. package/dist/commonjs/text-input/lib/TextInputField.d.ts +1 -1
  126. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
  127. package/dist/commonjs/text-input/lib/TextInputField.js +13 -25
  128. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +3 -5
  129. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  130. package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +3 -3
  131. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
  132. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  133. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +2 -1
  134. package/dist/es6/color-picker/lib/ColorPicker.js +16 -39
  135. package/dist/es6/color-picker/lib/parts/ColorReset.js +27 -18
  136. package/dist/es6/color-picker/lib/parts/SwatchBook.js +21 -34
  137. package/dist/es6/form-field/lib/FormField.d.ts +4 -10
  138. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
  139. package/dist/es6/form-field/lib/FormField.js +5 -28
  140. package/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
  141. package/dist/es6/form-field/lib/FormFieldHint.js +4 -27
  142. package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
  143. package/dist/es6/form-field/lib/FormFieldInput.js +3 -14
  144. package/dist/es6/form-field/lib/FormFieldLabel.d.ts +2 -8
  145. package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  146. package/dist/es6/form-field/lib/FormFieldLabel.js +5 -28
  147. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +3 -5
  148. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  149. package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +2 -3
  150. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +3 -5
  151. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  152. package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +3 -4
  153. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +3 -5
  154. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  155. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +2 -3
  156. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
  157. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  158. package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +9 -19
  159. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
  160. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  161. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.js +4 -4
  162. package/dist/es6/menu/lib/Menu.d.ts +16 -9
  163. package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
  164. package/dist/es6/menu/lib/Menu.js +103 -128
  165. package/dist/es6/menu/lib/MenuItem.d.ts +17 -7
  166. package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
  167. package/dist/es6/menu/lib/MenuItem.js +107 -111
  168. package/dist/es6/pill/lib/Pill.d.ts +103 -5
  169. package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
  170. package/dist/es6/pill/lib/Pill.js +149 -55
  171. package/dist/es6/pill/lib/PillAvatar.js +3 -14
  172. package/dist/es6/pill/lib/PillCount.js +4 -27
  173. package/dist/es6/pill/lib/PillIcon.js +3 -26
  174. package/dist/es6/pill/lib/PillIconButton.js +7 -30
  175. package/dist/es6/pill/lib/PillLabel.js +5 -28
  176. package/dist/es6/pill/lib/usePillModel.js +8 -16
  177. package/dist/es6/segmented-control/index.d.ts +2 -0
  178. package/dist/es6/segmented-control/index.d.ts.map +1 -1
  179. package/dist/es6/segmented-control/index.js +2 -0
  180. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +267 -82
  181. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
  182. package/dist/es6/segmented-control/lib/SegmentedControl.js +38 -3
  183. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +9 -5
  184. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -1
  185. package/dist/es6/segmented-control/lib/SegmentedControlItem.js +17 -42
  186. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +71 -2
  187. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
  188. package/dist/es6/segmented-control/lib/SegmentedControlList.js +9 -34
  189. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +28 -9
  190. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -1
  191. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +5 -7
  192. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +233 -83
  193. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -1
  194. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +31 -30
  195. package/dist/es6/select/lib/Select.js +144 -184
  196. package/dist/es6/select/lib/SelectBase.js +99 -94
  197. package/dist/es6/select/lib/SelectMenu.js +49 -80
  198. package/dist/es6/select/lib/SelectOption.js +30 -44
  199. package/dist/es6/select/lib/scrolling.js +6 -7
  200. package/dist/es6/select/lib/utils.js +4 -4
  201. package/dist/es6/side-panel/lib/SidePanel.d.ts +13 -26
  202. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  203. package/dist/es6/side-panel/lib/SidePanel.js +93 -130
  204. package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
  205. package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
  206. package/dist/es6/side-panel/lib/SidePanelToggleButton.js +43 -0
  207. package/dist/es6/side-panel/lib/hooks.d.ts +20 -0
  208. package/dist/es6/side-panel/lib/hooks.d.ts.map +1 -1
  209. package/dist/es6/side-panel/lib/hooks.js +37 -18
  210. package/dist/es6/status-indicator/index.d.ts +2 -0
  211. package/dist/es6/status-indicator/index.d.ts.map +1 -1
  212. package/dist/es6/status-indicator/index.js +2 -0
  213. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +32 -8
  214. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
  215. package/dist/es6/status-indicator/lib/StatusIndicator.js +33 -31
  216. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts +10 -0
  217. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -1
  218. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +6 -18
  219. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +3 -26
  220. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.js +6 -15
  221. package/dist/es6/table/index.d.ts +2 -0
  222. package/dist/es6/table/index.d.ts.map +1 -0
  223. package/dist/es6/table/index.js +1 -0
  224. package/dist/es6/table/lib/Table.d.ts +207 -0
  225. package/dist/es6/table/lib/Table.d.ts.map +1 -0
  226. package/dist/es6/table/lib/Table.js +223 -0
  227. package/dist/es6/table/lib/TableBody.d.ts +2 -0
  228. package/dist/es6/table/lib/TableBody.d.ts.map +1 -0
  229. package/dist/es6/table/lib/TableBody.js +29 -0
  230. package/dist/es6/table/lib/TableCaption.d.ts +2 -0
  231. package/dist/es6/table/lib/TableCaption.d.ts.map +1 -0
  232. package/dist/es6/table/lib/TableCaption.js +10 -0
  233. package/dist/es6/table/lib/TableCell.d.ts +2 -0
  234. package/dist/es6/table/lib/TableCell.d.ts.map +1 -0
  235. package/dist/es6/table/lib/TableCell.js +10 -0
  236. package/dist/es6/table/lib/TableFooter.d.ts +2 -0
  237. package/dist/es6/table/lib/TableFooter.d.ts.map +1 -0
  238. package/dist/es6/table/lib/TableFooter.js +9 -0
  239. package/dist/es6/table/lib/TableHead.d.ts +2 -0
  240. package/dist/es6/table/lib/TableHead.d.ts.map +1 -0
  241. package/dist/es6/table/lib/TableHead.js +17 -0
  242. package/dist/es6/table/lib/TableHeader.d.ts +2 -0
  243. package/dist/es6/table/lib/TableHeader.d.ts.map +1 -0
  244. package/dist/es6/table/lib/TableHeader.js +10 -0
  245. package/dist/es6/table/lib/TableRow.d.ts +2 -0
  246. package/dist/es6/table/lib/TableRow.d.ts.map +1 -0
  247. package/dist/es6/table/lib/TableRow.js +13 -0
  248. package/dist/es6/text-area/lib/TextArea.d.ts +2 -2
  249. package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
  250. package/dist/es6/text-area/lib/TextArea.js +7 -31
  251. package/dist/es6/text-area/lib/TextAreaField.d.ts +1 -1
  252. package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
  253. package/dist/es6/text-area/lib/TextAreaField.js +9 -33
  254. package/dist/es6/text-input/lib/TextInput.d.ts +4 -4
  255. package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
  256. package/dist/es6/text-input/lib/TextInput.js +7 -31
  257. package/dist/es6/text-input/lib/TextInputField.d.ts +1 -1
  258. package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
  259. package/dist/es6/text-input/lib/TextInputField.js +12 -24
  260. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +3 -5
  261. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  262. package/dist/es6/text-input/lib/hooks/useTextInputField.js +1 -1
  263. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
  264. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  265. package/dist/es6/text-input/lib/hooks/useTextInputModel.js +2 -1
  266. package/form-field/lib/FormField.tsx +5 -10
  267. package/form-field/lib/FormFieldLabel.tsx +6 -11
  268. package/form-field/lib/hooks/useFormFieldModel.tsx +1 -3
  269. package/form-field/lib/hooks/useFormFieldOrientation.tsx +6 -6
  270. package/menu/lib/Menu.tsx +16 -9
  271. package/menu/lib/MenuItem.tsx +19 -8
  272. package/package.json +4 -5
  273. package/pill/lib/Pill.tsx +109 -10
  274. package/pill/lib/PillCount.tsx +1 -1
  275. package/pill/lib/PillIcon.tsx +1 -1
  276. package/segmented-control/index.ts +2 -0
  277. package/segmented-control/lib/SegmentedControl.tsx +36 -0
  278. package/segmented-control/lib/SegmentedControlList.tsx +1 -1
  279. package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +1 -5
  280. package/side-panel/lib/SidePanel.tsx +119 -169
  281. package/side-panel/lib/SidePanelToggleButton.tsx +78 -0
  282. package/side-panel/lib/hooks.ts +20 -0
  283. package/status-indicator/index.ts +2 -0
  284. package/status-indicator/lib/StatusIndicator.tsx +32 -6
  285. package/status-indicator/lib/StatusIndicatorIcon.tsx +1 -1
  286. package/table/LICENSE +51 -0
  287. package/table/README.md +5 -0
  288. package/table/index.ts +1 -0
  289. package/table/lib/Table.tsx +236 -0
  290. package/table/lib/TableBody.tsx +35 -0
  291. package/table/lib/TableCaption.tsx +22 -0
  292. package/table/lib/TableCell.tsx +27 -0
  293. package/table/lib/TableFooter.tsx +14 -0
  294. package/table/lib/TableHead.tsx +23 -0
  295. package/table/lib/TableHeader.tsx +28 -0
  296. package/table/lib/TableRow.tsx +26 -0
  297. package/table/package.json +6 -0
  298. package/text-area/lib/TextArea.tsx +9 -6
  299. package/text-area/lib/TextAreaField.tsx +6 -2
  300. package/text-input/lib/TextInput.tsx +9 -6
  301. package/text-input/lib/TextInputField.tsx +9 -5
  302. package/text-input/lib/hooks/useTextInputModel.ts +1 -0
  303. package/dist/commonjs/text-area/lib/hooks/index.d.ts +0 -2
  304. package/dist/commonjs/text-area/lib/hooks/index.d.ts.map +0 -1
  305. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
  306. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
  307. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.js +0 -5
  308. package/dist/es6/text-area/lib/hooks/index.d.ts +0 -2
  309. package/dist/es6/text-area/lib/hooks/index.d.ts.map +0 -1
  310. package/dist/es6/text-area/lib/hooks/index.js +0 -1
  311. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
  312. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
  313. package/dist/es6/text-area/lib/hooks/useTextAreaModel.js +0 -2
  314. package/text-area/lib/hooks/index.ts +0 -1
  315. package/text-area/lib/hooks/useTextAreaModel.ts +0 -3
@@ -1,31 +1,26 @@
1
1
  import React from 'react';
2
2
 
3
- import {createSubcomponent, ExtractProps, useTheme} from '@workday/canvas-kit-react/common';
4
- import {HStack, StackSpacing} from '@workday/canvas-kit-react/layout';
3
+ import {createSubcomponent, useTheme} from '@workday/canvas-kit-react/common';
4
+ import {Flex, FlexProps} from '@workday/canvas-kit-react/layout';
5
5
  import {LabelText, Text} from '@workday/canvas-kit-react/text';
6
6
  import {useFormFieldLabel, useFormFieldModel} from './hooks';
7
7
 
8
- export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
8
+ export interface FormFieldLabelProps extends FlexProps {
9
9
  /**
10
10
  * The text of the label.
11
11
  */
12
12
  children: React.ReactNode;
13
- /**
14
- * When the input is required, this is spacing between label and asterisk.
15
- * @default xxxs
16
- */
17
- spacing?: StackSpacing;
18
13
  }
19
14
 
20
15
  export const FormFieldLabel = createSubcomponent('label')({
21
16
  displayName: 'FormField.Label',
22
17
  modelHook: useFormFieldModel,
23
18
  elemPropsHook: useFormFieldLabel,
24
- })<FormFieldLabelProps>(({spacing = 'xxxs', children, ...elemProps}, Element, model) => {
19
+ })<FormFieldLabelProps>(({gap = 'xxxs', children, ...elemProps}, Element, model) => {
25
20
  const theme = useTheme();
26
21
 
27
22
  return (
28
- <HStack as={Element} spacing={spacing} minWidth="180px" {...elemProps}>
23
+ <Flex as={Element} gap={gap} minWidth="180px" {...elemProps}>
29
24
  <LabelText as="span" fontWeight="medium">
30
25
  {children}
31
26
  </LabelText>
@@ -40,6 +35,6 @@ export const FormFieldLabel = createSubcomponent('label')({
40
35
  *
41
36
  </Text>
42
37
  )}
43
- </HStack>
38
+ </Flex>
44
39
  );
45
40
  });
@@ -5,7 +5,6 @@ export const useFormFieldModel = createModelHook({
5
5
  /**
6
6
  * Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
7
7
  * `required` set to true, and usually some subcomponents will have a error color applied.
8
- * @default false
9
8
  */
10
9
  hasError: false,
11
10
  /**
@@ -16,13 +15,12 @@ export const useFormFieldModel = createModelHook({
16
15
  * - `FormField.Hint` will set `id` to `hint-${id}`
17
16
  *
18
17
  * If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
19
- * @default `useUniqueId()`
18
+ * @default {useUniqueId}
20
19
  */
21
20
  id: '',
22
21
  /**
23
22
  * Optional flag to denote if this field is required. When true the `FormField.Input` will have
24
23
  * `required` set to true, and an asterisk will be appended to the `FormField.Label`.
25
- * @default false
26
24
  */
27
25
  isRequired: false,
28
26
  },
@@ -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
  }
package/menu/lib/Menu.tsx CHANGED
@@ -9,8 +9,8 @@ import {hideMouseFocus, GrowthBehavior, generateUniqueId} from '@workday/canvas-
9
9
  /**
10
10
  * ### Deprecated Menu
11
11
  *
12
- * As of Canvas Kit v8, Menu is being soft-deprecated.
13
- * It will be hard-deprecated (completely removed) in v9. Please see the
12
+ * As of Canvas Kit v8, Menu is being deprecated.
13
+ * It will be removed in v10. Please see the
14
14
  * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
15
15
  * for more information.
16
16
  */
@@ -57,8 +57,8 @@ export interface DeprecatedMenuProps
57
57
  /**
58
58
  * ### Deprecated Menu State
59
59
  *
60
- * As of Canvas Kit v8, Menu is being soft-deprecated.
61
- * It will be hard-deprecated (completely removed) in v9. Please see the
60
+ * As of Canvas Kit v8, Menu is being deprecated.
61
+ * It will be removed in v10. Please see the
62
62
  * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
63
63
  * for more information.
64
64
  */
@@ -78,12 +78,19 @@ const List = styled('ul')({
78
78
  });
79
79
 
80
80
  /**
81
- * ### Deprecated Menu
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.
82
85
  *
83
- * As of Canvas Kit v8, this component is being soft-deprecated.
84
- * It will be hard-deprecated (completely removed) in v9. Please see the
85
- * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
86
- * for more information.
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
87
94
  */
88
95
  export class DeprecatedMenu extends React.Component<DeprecatedMenuProps, DeprecatedMenuState> {
89
96
  private id = generateUniqueId();
@@ -14,8 +14,8 @@ import {SystemIcon, SystemIconProps} from '@workday/canvas-kit-react/icon';
14
14
  /**
15
15
  * ### Deprecated Menu Item Props
16
16
  *
17
- * As of Canvas Kit v8, Menu is being soft-deprecated.
18
- * It will be hard-deprecated (completely removed) in v9. Please see the
17
+ * As of Canvas Kit v8, Menu is being deprecated.
18
+ * It will be removed in v10. Please see the
19
19
  * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
20
20
  * for more information.
21
21
  */
@@ -254,12 +254,22 @@ const scrollIntoViewIfNeeded = (elem: HTMLElement, centerIfNeeded = true): void
254
254
  };
255
255
 
256
256
  /**
257
- * ### Deprecated Menu Item
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:
258
260
  *
259
- * As of Canvas Kit v8, Menu is being soft-deprecated.
260
- * It will be hard-deprecated (completely removed) in v9. Please see the
261
- * [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
262
- * for more information.
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
263
273
  */
264
274
  export class DeprecatedMenuItem extends React.Component<DeprecatedMenuItemProps> {
265
275
  ref = React.createRef<HTMLLIElement>();
@@ -301,12 +311,13 @@ export class DeprecatedMenuItem extends React.Component<DeprecatedMenuItemProps>
301
311
 
302
312
  return (
303
313
  <>
304
- {hasDivider && <Divider />}
314
+ {hasDivider && <Divider aria-hidden="true" />}
305
315
  <Item
306
316
  ref={this.ref}
307
317
  tabIndex={-1}
308
318
  id={id}
309
319
  role={isHeader ? 'presentation' : role}
320
+ aria-hidden={isHeader ? true : undefined}
310
321
  onClick={this.handleClick}
311
322
  aria-disabled={isDisabled ? true : undefined}
312
323
  isDisabled={!!isDisabled}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-preview-react",
3
- "version": "8.0.0-alpha.253-next.22+7350b9a5",
3
+ "version": "8.0.0-alpha.428-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,21 +41,20 @@
41
41
  "workday"
42
42
  ],
43
43
  "peerDependencies": {
44
- "react": "^17.0 || ^18.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": "^8.0.0-alpha.253-next.22+7350b9a5",
49
+ "@workday/canvas-kit-react": "^8.0.0-alpha.428-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": "^8.0.0-alpha.253-next.22+7350b9a5",
56
55
  "formik": "^2.2.9",
57
56
  "react-hook-form": "7.36.1",
58
57
  "yup": "^0.32.11"
59
58
  },
60
- "gitHead": "7350b9a521c0c710ec18a027afd8442dc92dd875"
59
+ "gitHead": "2c79134aa48ef0efde9cdf883b529b8157337a28"
61
60
  }
package/pill/lib/Pill.tsx CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  styled,
10
10
  StyledType,
11
11
  } from '@workday/canvas-kit-react/common';
12
- import {BoxProps, boxStyleFn, HStack, Stack} from '@workday/canvas-kit-react/layout';
12
+ import {BoxProps, boxStyleFn, Flex} from '@workday/canvas-kit-react/layout';
13
13
  import {borderRadius, colors, space, type} from '@workday/canvas-kit-react/tokens';
14
14
 
15
15
  import {usePillModel} from './usePillModel';
@@ -160,14 +160,113 @@ const StyledNonInteractivePill = styled(StyledBasePill)<StyledType>({
160
160
  position: 'relative',
161
161
  });
162
162
 
163
+ /**
164
+ * By default, a `Pill` renders an interactive element that accepts subcomponents. By "interactive"
165
+ * we mean that the Pill container is a focusable element (a `<button>`). All leading elements
166
+ * (icons or avatars) are intended to be descriptive, helping support the label. They should not
167
+ * receive focus.
168
+ *
169
+ * `Pill` is the container component. It also provides a React context model for its subcomponents.
170
+ * Based on the `variant` prop this component will render different styled `Pill`s.
171
+ *
172
+ * Example of read only:
173
+ *
174
+ * ```tsx
175
+ * <Pill variant="readOnly">This is a read only</Pill>
176
+ * ```
177
+ *
178
+ * Example of interactive:
179
+ *
180
+ * ```tsx
181
+ * <Pill onClick={() => console.log('clicked')}>
182
+ * <Pill.Avatar /> Regina Skeltor
183
+ * </Pill>
184
+ * ```
185
+ *
186
+ * Example of removable:
187
+ *
188
+ * ```tsx
189
+ * <Pill variant="removable">
190
+ * <Pill.Avatar /> Regina Skeltor
191
+ * <Pill.IconButton onClick={() => console.log('clicked')} />
192
+ * </Pill>
193
+ * ```
194
+ *
195
+ * If you set the `Pill` `variant` to `removable`, it will render a `<span>` element. You can then
196
+ * provide a `Pill.IconButton` that acts as the focus target. This creates a smaller, more
197
+ * intentional click target that prevents users from accidentally deleting an item.
198
+ *
199
+ * ```tsx
200
+ * <Pill variant="removable">
201
+ * Shoes
202
+ * <Pill.IconButton onClick={() => console.log('handle remove')} />
203
+ * </Pill>
204
+ * ```
205
+ */
163
206
  export const Pill = createContainer('button')({
207
+ displayName: 'Pill',
164
208
  modelHook: usePillModel,
165
209
  subComponents: {
166
- Icon: PillIcon,
210
+ /**
211
+ * This component renders an avatar. It supports all props of the `Avatar` component.
212
+ *
213
+ * ```tsx
214
+ * <Pill variant="removable">
215
+ * <Pill.Avatar url={avatarUrl} />
216
+ * Regina Skeltor
217
+ * <Pill.IconButton onClick={() => console.log('handle remove')} />
218
+ * </Pill>
219
+ * ```
220
+ */
167
221
  Avatar: PillAvatar,
222
+ /**
223
+ * This component renders its `children` as the count.
224
+ *
225
+ * ```tsx
226
+ * <Pill onClick={() => console.warn('clicked')}>
227
+ * Shoes
228
+ * <Pill.Count>30</Pill.Count>
229
+ * </Pill>
230
+ * ```
231
+ */
168
232
  Count: PillCount,
169
- Label: PillLabel,
233
+ /**
234
+ * This component renders an `icon`. It not be used with the `default` styling – not `readOnly`
235
+ * or `removable` variants. By default it renders a `plusIcon` but it can be overridden by
236
+ * providing an icon to the `icon` prop.
237
+ *
238
+ * ```tsx
239
+ * <Pill onClick={() => console.warn('clicked')}>
240
+ * <Pill.Icon />
241
+ * <Pill.Label>Regina Skeltor</Pill.Label>
242
+ * </Pill>
243
+ * ```
244
+ */
245
+ Icon: PillIcon,
246
+ /**
247
+ * This component renders a custom icon button. It is only intended to be used with the
248
+ * `removable` variant. By default, it renders a `xSmallIcon` but can be overridden by providing
249
+ * an icon to the `icon` prop.
250
+ *
251
+ * ```tsx
252
+ * <Pill variant="removable">
253
+ * Pink Shirts
254
+ * <Pill.IconButton onClick={() => console.warn('clicked')} />
255
+ * </Pill>
256
+ * ```
257
+ */
170
258
  IconButton: PillIconButton,
259
+ /**
260
+ * This component renders a `<span>` that automatically handles overflow by rendering a tooltip.
261
+ * There's no need to use this component directly since the overflow is handled for you automatically.
262
+ *
263
+ * ```tsx
264
+ * <Pill variant="readOnly">
265
+ * <Pill.Label>Read-only</Pill.Label>
266
+ * </Pill>
267
+ * ```
268
+ */
269
+ Label: PillLabel,
171
270
  },
172
271
  })<PillProps>(({variant = 'default', maxWidth, ...elemProps}, Element, model) => {
173
272
  return (
@@ -190,18 +289,18 @@ export const Pill = createContainer('button')({
190
289
  {...elemProps}
191
290
  disabled={model.state.disabled}
192
291
  >
193
- <HStack spacing="xxxs" display="inline-flex" alignItems="center">
292
+ <Flex gap="xxxs" display="inline-flex" alignItems="center">
194
293
  {React.Children.map(elemProps.children, (child, index) => {
195
294
  if (typeof child === 'string') {
196
295
  return <PillLabel key={index}>{child}</PillLabel>;
197
296
  }
198
297
  return (
199
- <Stack.Item key={index} display="inline-flex">
298
+ <Flex.Item key={index} display="inline-flex">
200
299
  {child}
201
- </Stack.Item>
300
+ </Flex.Item>
202
301
  );
203
302
  })}
204
- </HStack>
303
+ </Flex>
205
304
  </StyledBasePill>
206
305
  )}
207
306
  {variant === 'removable' && (
@@ -211,14 +310,14 @@ export const Pill = createContainer('button')({
211
310
  variant={variant}
212
311
  {...elemProps}
213
312
  >
214
- <HStack spacing="xxxs" display="inline-flex" alignItems="center" justifyContent="center">
313
+ <Flex gap="xxxs" display="inline-flex" alignItems="center" justifyContent="center">
215
314
  {React.Children.map(elemProps.children, (child, index) => {
216
315
  if (typeof child === 'string') {
217
316
  return <PillLabel key={index}>{child}</PillLabel>;
218
317
  }
219
- return <Stack.Item key={index}>{child}</Stack.Item>;
318
+ return <Flex.Item key={index}>{child}</Flex.Item>;
220
319
  })}
221
- </HStack>
320
+ </Flex>
222
321
  </StyledNonInteractivePill>
223
322
  )}
224
323
  </>
@@ -25,7 +25,7 @@ export const PillCount = createComponent('span')({
25
25
  height={22}
26
26
  minWidth={22}
27
27
  padding={`0 ${space.xxxs}`}
28
- marginInlineEnd={`-${space.xxs}`} // Remove padding from HStack on the right side
28
+ marginInlineEnd={`-${space.xxs}`} // Remove excess margin at the end
29
29
  marginInlineStart={`${space.xxxs}`}
30
30
  backgroundColor={colors.soap500}
31
31
  data-count="ck-pill-count"
@@ -21,7 +21,7 @@ export const PillIcon = createSubcomponent('span')({
21
21
  })<PillIconProps>(({size, icon, ...elemProps}, Element) => {
22
22
  return (
23
23
  <SystemIcon
24
- marginInlineStart={`-${space.xxxs}`} // remove padding on the left from HStack
24
+ marginInlineStart={`-${space.xxxs}`} // remove excess margin from the start
25
25
  display="flex"
26
26
  as={Element}
27
27
  size={20}
@@ -1,2 +1,4 @@
1
1
  export * from './lib/SegmentedControl';
2
2
  export * from './lib/hooks/useSegmentedControlModel';
3
+ export * from './lib/hooks/useSegmentedControlItem';
4
+ export {useSegmentedControlList} from './lib/SegmentedControlList';
@@ -9,11 +9,47 @@ export interface SegmentedControlProps {
9
9
  children: React.ReactNode;
10
10
  }
11
11
 
12
+ /**
13
+ * `SegmentedControl` is a container component that is responsible for creating a
14
+ * {@link SegmentedControlModel} and sharing it with its subcomponents using React context. It does
15
+ * not represent a real element.
16
+ *
17
+ * ```tsx
18
+ * <SegmentedControl items={[]}>{Child components}</SegmentedControl>
19
+ * ```
20
+ *
21
+ * Alternatively, you may pass in a model using the [hoisted model
22
+ * pattern](/getting-started/for-developers/resources/compound-components/#configuring-a-model).
23
+ *
24
+ * ```tsx
25
+ * const model = useSegmentedControlModel({
26
+ * items: [],
27
+ * });
28
+ *
29
+ * <SegmentedControl model={model}>{Child components}</SegmentedControl>;
30
+ * ```
31
+ */
12
32
  export const SegmentedControl = createContainer()({
13
33
  displayName: 'SegmentedControl',
14
34
  modelHook: useSegmentedControlModel,
15
35
  subComponents: {
36
+ /**
37
+ * `SegmentedControl.List` renders {@link Grid} under the hood. It is a container for
38
+ * {@link SegmentedControlItem SegmentedControl.Item} subcomponents.
39
+ *
40
+ * ```tsx
41
+ * <SegmentedControl.List>{SegmentedControl.Items}</SegmentedControl.List>
42
+ * ```
43
+ */
16
44
  List: SegmentedControlList,
45
+ /**
46
+ * `SegmentedControl.Item` is a `button` element built on `BaseButton`. `SegmentedControl.Item`
47
+ * has a `data-id` prop to handle `onSelect` properly.
48
+ *
49
+ * ```tsx
50
+ * <SegmentedControl.Item data-id="table">Table</SegmentedControl.Item>
51
+ * ```
52
+ */
17
53
  Item: SegmentedControlItem,
18
54
  },
19
55
  })<SegmentedControlProps>(({children}) => {
@@ -15,7 +15,7 @@ export interface SegmentedControlListProps<T = any>
15
15
  children: ((item: T) => React.ReactNode) | React.ReactNode;
16
16
  }
17
17
 
18
- const useSegmentedControlList = createElemPropsHook(useSegmentedControlModel)(
18
+ export const useSegmentedControlList = createElemPropsHook(useSegmentedControlModel)(
19
19
  ({state: {orientation, disabled, items}}) => {
20
20
  const directionName = orientation === 'vertical' ? 'Row' : 'Column';
21
21
  return {
@@ -11,11 +11,7 @@ import {useSegmentedControlModel} from './useSegmentedControlModel';
11
11
  export const useSegmentedControlItem = composeHooks(
12
12
  useListItemSelect,
13
13
  createElemPropsHook(useSegmentedControlModel)(
14
- (
15
- model,
16
- _?: React.Ref<HTMLElement>,
17
- elemProps: {'data-id'?: string; children?: React.ReactNode} = {}
18
- ) => {
14
+ (model, _, elemProps: {'data-id'?: string; children?: React.ReactNode} = {}) => {
19
15
  const name = elemProps['data-id'] || '';
20
16
  const selected = !!name && isSelected(name, model.state);
21
17