@workday/canvas-kit-preview-react 7.1.5 → 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 (533) 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/dist/commonjs/color-picker/index.d.ts +1 -1
  5. package/dist/commonjs/color-picker/index.d.ts.map +1 -1
  6. package/dist/commonjs/color-picker/index.js +2 -6
  7. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts +1 -2
  8. package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
  9. package/dist/commonjs/color-picker/lib/ColorPicker.js +28 -50
  10. package/dist/commonjs/color-picker/lib/parts/ColorReset.js +32 -23
  11. package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +26 -39
  12. package/dist/commonjs/form-field/lib/FormField.d.ts +4 -19
  13. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
  14. package/dist/commonjs/form-field/lib/FormField.js +10 -33
  15. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
  16. package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
  17. package/dist/commonjs/form-field/lib/FormFieldHint.js +8 -32
  18. package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
  19. package/dist/commonjs/form-field/lib/FormFieldInput.js +6 -17
  20. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +2 -8
  21. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  22. package/dist/commonjs/form-field/lib/FormFieldLabel.js +10 -39
  23. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +3 -5
  24. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  25. package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +4 -5
  26. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +3 -5
  27. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  28. package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +5 -6
  29. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +3 -5
  30. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  31. package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +4 -5
  32. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
  33. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  34. package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +9 -19
  35. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
  36. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  37. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +5 -5
  38. package/dist/commonjs/index.d.ts +2 -1
  39. package/dist/commonjs/index.d.ts.map +1 -1
  40. package/dist/commonjs/index.js +2 -2
  41. package/dist/commonjs/menu/index.d.ts +1 -4
  42. package/dist/commonjs/menu/index.d.ts.map +1 -1
  43. package/dist/commonjs/menu/index.js +1 -9
  44. package/dist/commonjs/menu/lib/Menu.d.ts +44 -13
  45. package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
  46. package/dist/commonjs/menu/lib/Menu.js +127 -130
  47. package/dist/commonjs/menu/lib/MenuItem.d.ts +45 -14
  48. package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
  49. package/dist/commonjs/menu/lib/MenuItem.js +118 -106
  50. package/dist/commonjs/pill/lib/Pill.d.ts +101 -13
  51. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
  52. package/dist/commonjs/pill/lib/Pill.js +158 -64
  53. package/dist/commonjs/pill/lib/PillAvatar.js +6 -17
  54. package/dist/commonjs/pill/lib/PillCount.js +7 -30
  55. package/dist/commonjs/pill/lib/PillIcon.js +8 -31
  56. package/dist/commonjs/pill/lib/PillIconButton.js +13 -36
  57. package/dist/commonjs/pill/lib/PillLabel.js +10 -33
  58. package/dist/commonjs/pill/lib/usePillModel.js +8 -16
  59. package/dist/commonjs/segmented-control/index.d.ts +5 -0
  60. package/dist/commonjs/segmented-control/index.d.ts.map +1 -0
  61. package/dist/commonjs/segmented-control/index.js +18 -0
  62. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +1189 -0
  63. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
  64. package/dist/commonjs/segmented-control/lib/SegmentedControl.js +57 -0
  65. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +107 -0
  66. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
  67. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +105 -0
  68. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +135 -0
  69. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
  70. package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +41 -0
  71. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +79 -0
  72. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
  73. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +21 -0
  74. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1202 -0
  75. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
  76. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +75 -0
  77. package/dist/commonjs/select/index.d.ts +0 -3
  78. package/dist/commonjs/select/index.d.ts.map +1 -1
  79. package/dist/commonjs/select/index.js +0 -7
  80. package/dist/commonjs/select/lib/Select.d.ts +0 -1
  81. package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
  82. package/dist/commonjs/select/lib/Select.js +147 -191
  83. package/dist/commonjs/select/lib/SelectBase.d.ts +2 -2
  84. package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
  85. package/dist/commonjs/select/lib/SelectBase.js +109 -107
  86. package/dist/commonjs/select/lib/SelectMenu.d.ts +2 -2
  87. package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
  88. package/dist/commonjs/select/lib/SelectMenu.js +55 -86
  89. package/dist/commonjs/select/lib/SelectOption.d.ts +1 -2
  90. package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
  91. package/dist/commonjs/select/lib/SelectOption.js +35 -48
  92. package/dist/commonjs/select/lib/scrolling.js +6 -7
  93. package/dist/commonjs/select/lib/utils.js +4 -4
  94. package/dist/commonjs/side-panel/index.d.ts +0 -3
  95. package/dist/commonjs/side-panel/index.d.ts.map +1 -1
  96. package/dist/commonjs/side-panel/index.js +0 -7
  97. package/dist/commonjs/side-panel/lib/SidePanel.d.ts +13 -27
  98. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  99. package/dist/commonjs/side-panel/lib/SidePanel.js +95 -133
  100. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
  101. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
  102. package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +65 -0
  103. package/dist/commonjs/side-panel/lib/hooks.d.ts +20 -0
  104. package/dist/commonjs/side-panel/lib/hooks.d.ts.map +1 -1
  105. package/dist/commonjs/side-panel/lib/hooks.js +40 -21
  106. package/dist/commonjs/status-indicator/index.d.ts +4 -0
  107. package/dist/commonjs/status-indicator/index.d.ts.map +1 -0
  108. package/dist/commonjs/status-indicator/index.js +17 -0
  109. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +66 -0
  110. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
  111. package/dist/commonjs/status-indicator/lib/StatusIndicator.js +57 -0
  112. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts +83 -0
  113. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
  114. package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +86 -0
  115. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
  116. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
  117. package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +15 -0
  118. package/dist/commonjs/status-indicator/lib/hooks/index.d.ts +2 -0
  119. package/dist/commonjs/status-indicator/lib/hooks/index.d.ts.map +1 -0
  120. package/dist/commonjs/{breadcrumbs → status-indicator/lib/hooks}/index.js +1 -5
  121. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
  122. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
  123. package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.js +25 -0
  124. package/dist/commonjs/table/index.d.ts +2 -0
  125. package/dist/commonjs/table/index.d.ts.map +1 -0
  126. package/dist/commonjs/{text-area/lib/hooks → table}/index.js +1 -1
  127. package/dist/commonjs/table/lib/Table.d.ts +207 -0
  128. package/dist/commonjs/table/lib/Table.d.ts.map +1 -0
  129. package/dist/commonjs/table/lib/Table.js +229 -0
  130. package/dist/commonjs/table/lib/TableBody.d.ts +2 -0
  131. package/dist/commonjs/table/lib/TableBody.d.ts.map +1 -0
  132. package/dist/commonjs/table/lib/TableBody.js +35 -0
  133. package/dist/commonjs/table/lib/TableCaption.d.ts +2 -0
  134. package/dist/commonjs/table/lib/TableCaption.d.ts.map +1 -0
  135. package/dist/commonjs/table/lib/TableCaption.js +16 -0
  136. package/dist/commonjs/table/lib/TableCell.d.ts +2 -0
  137. package/dist/commonjs/table/lib/TableCell.d.ts.map +1 -0
  138. package/dist/commonjs/table/lib/TableCell.js +16 -0
  139. package/dist/commonjs/table/lib/TableFooter.d.ts +2 -0
  140. package/dist/commonjs/table/lib/TableFooter.d.ts.map +1 -0
  141. package/dist/commonjs/table/lib/TableFooter.js +15 -0
  142. package/dist/commonjs/table/lib/TableHead.d.ts +2 -0
  143. package/dist/commonjs/table/lib/TableHead.d.ts.map +1 -0
  144. package/dist/commonjs/table/lib/TableHead.js +23 -0
  145. package/dist/commonjs/table/lib/TableHeader.d.ts +2 -0
  146. package/dist/commonjs/table/lib/TableHeader.d.ts.map +1 -0
  147. package/dist/commonjs/table/lib/TableHeader.js +16 -0
  148. package/dist/commonjs/table/lib/TableRow.d.ts +2 -0
  149. package/dist/commonjs/table/lib/TableRow.d.ts.map +1 -0
  150. package/dist/commonjs/table/lib/TableRow.js +19 -0
  151. package/dist/commonjs/text-area/lib/TextArea.d.ts +3 -12
  152. package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
  153. package/dist/commonjs/text-area/lib/TextArea.js +9 -33
  154. package/dist/commonjs/text-area/lib/TextAreaField.d.ts +2 -2
  155. package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
  156. package/dist/commonjs/text-area/lib/TextAreaField.js +25 -41
  157. package/dist/commonjs/text-input/lib/TextInput.d.ts +5 -14
  158. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
  159. package/dist/commonjs/text-input/lib/TextInput.js +9 -33
  160. package/dist/commonjs/text-input/lib/TextInputField.d.ts +2 -2
  161. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
  162. package/dist/commonjs/text-input/lib/TextInputField.js +25 -30
  163. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +3 -5
  164. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  165. package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +3 -3
  166. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
  167. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  168. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +2 -1
  169. package/dist/es6/color-picker/index.d.ts +1 -1
  170. package/dist/es6/color-picker/index.d.ts.map +1 -1
  171. package/dist/es6/color-picker/index.js +1 -1
  172. package/dist/es6/color-picker/lib/ColorPicker.d.ts +1 -2
  173. package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
  174. package/dist/es6/color-picker/lib/ColorPicker.js +17 -41
  175. package/dist/es6/color-picker/lib/parts/ColorReset.js +27 -18
  176. package/dist/es6/color-picker/lib/parts/SwatchBook.js +21 -34
  177. package/dist/es6/form-field/lib/FormField.d.ts +4 -19
  178. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
  179. package/dist/es6/form-field/lib/FormField.js +5 -28
  180. package/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
  181. package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
  182. package/dist/es6/form-field/lib/FormFieldHint.js +7 -31
  183. package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
  184. package/dist/es6/form-field/lib/FormFieldInput.js +3 -14
  185. package/dist/es6/form-field/lib/FormFieldLabel.d.ts +2 -8
  186. package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  187. package/dist/es6/form-field/lib/FormFieldLabel.js +9 -38
  188. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +3 -5
  189. package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
  190. package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +2 -3
  191. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +3 -5
  192. package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
  193. package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +3 -4
  194. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +3 -5
  195. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
  196. package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +2 -3
  197. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
  198. package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
  199. package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +9 -19
  200. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
  201. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  202. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.js +4 -4
  203. package/dist/es6/index.d.ts +2 -1
  204. package/dist/es6/index.d.ts.map +1 -1
  205. package/dist/es6/index.js +2 -2
  206. package/dist/es6/menu/index.d.ts +1 -4
  207. package/dist/es6/menu/index.d.ts.map +1 -1
  208. package/dist/es6/menu/index.js +1 -4
  209. package/dist/es6/menu/lib/Menu.d.ts +44 -13
  210. package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
  211. package/dist/es6/menu/lib/Menu.js +120 -125
  212. package/dist/es6/menu/lib/MenuItem.d.ts +45 -14
  213. package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
  214. package/dist/es6/menu/lib/MenuItem.js +112 -102
  215. package/dist/es6/pill/lib/Pill.d.ts +107 -19
  216. package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
  217. package/dist/es6/pill/lib/Pill.js +149 -55
  218. package/dist/es6/pill/lib/PillAvatar.d.ts +1 -2
  219. package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -1
  220. package/dist/es6/pill/lib/PillAvatar.js +3 -14
  221. package/dist/es6/pill/lib/PillCount.js +4 -27
  222. package/dist/es6/pill/lib/PillIcon.d.ts +1 -2
  223. package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -1
  224. package/dist/es6/pill/lib/PillIcon.js +3 -26
  225. package/dist/es6/pill/lib/PillIconButton.d.ts +1 -2
  226. package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -1
  227. package/dist/es6/pill/lib/PillIconButton.js +7 -30
  228. package/dist/es6/pill/lib/PillLabel.d.ts +1 -2
  229. package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -1
  230. package/dist/es6/pill/lib/PillLabel.js +5 -28
  231. package/dist/es6/pill/lib/usePillModel.d.ts +5 -5
  232. package/dist/es6/pill/lib/usePillModel.js +8 -16
  233. package/dist/es6/segmented-control/index.d.ts +5 -0
  234. package/dist/es6/segmented-control/index.d.ts.map +1 -0
  235. package/dist/es6/segmented-control/index.js +4 -0
  236. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +1189 -0
  237. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
  238. package/dist/es6/segmented-control/lib/SegmentedControl.js +51 -0
  239. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +107 -0
  240. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
  241. package/dist/es6/segmented-control/lib/SegmentedControlItem.js +83 -0
  242. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +135 -0
  243. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
  244. package/dist/es6/segmented-control/lib/SegmentedControlList.js +19 -0
  245. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +79 -0
  246. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
  247. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +18 -0
  248. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1202 -0
  249. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
  250. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +69 -0
  251. package/dist/es6/select/index.d.ts +0 -3
  252. package/dist/es6/select/index.d.ts.map +1 -1
  253. package/dist/es6/select/index.js +0 -3
  254. package/dist/es6/select/lib/Select.d.ts +0 -1
  255. package/dist/es6/select/lib/Select.d.ts.map +1 -1
  256. package/dist/es6/select/lib/Select.js +145 -186
  257. package/dist/es6/select/lib/SelectBase.d.ts +2 -2
  258. package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
  259. package/dist/es6/select/lib/SelectBase.js +101 -97
  260. package/dist/es6/select/lib/SelectMenu.d.ts +2 -2
  261. package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
  262. package/dist/es6/select/lib/SelectMenu.js +49 -81
  263. package/dist/es6/select/lib/SelectOption.d.ts +1 -2
  264. package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
  265. package/dist/es6/select/lib/SelectOption.js +30 -45
  266. package/dist/es6/select/lib/scrolling.js +6 -7
  267. package/dist/es6/select/lib/utils.js +4 -4
  268. package/dist/es6/side-panel/index.d.ts +0 -3
  269. package/dist/es6/side-panel/index.d.ts.map +1 -1
  270. package/dist/es6/side-panel/index.js +0 -3
  271. package/dist/es6/side-panel/lib/SidePanel.d.ts +13 -27
  272. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  273. package/dist/es6/side-panel/lib/SidePanel.js +93 -131
  274. package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
  275. package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
  276. package/dist/es6/side-panel/lib/SidePanelToggleButton.js +43 -0
  277. package/dist/es6/side-panel/lib/hooks.d.ts +20 -0
  278. package/dist/es6/side-panel/lib/hooks.d.ts.map +1 -1
  279. package/dist/es6/side-panel/lib/hooks.js +37 -18
  280. package/dist/es6/status-indicator/index.d.ts +4 -0
  281. package/dist/es6/status-indicator/index.d.ts.map +1 -0
  282. package/dist/es6/status-indicator/index.js +3 -0
  283. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +66 -0
  284. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
  285. package/dist/es6/status-indicator/lib/StatusIndicator.js +51 -0
  286. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts +83 -0
  287. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
  288. package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +80 -0
  289. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
  290. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
  291. package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +9 -0
  292. package/dist/es6/status-indicator/lib/hooks/index.d.ts +2 -0
  293. package/dist/es6/status-indicator/lib/hooks/index.d.ts.map +1 -0
  294. package/dist/es6/status-indicator/lib/hooks/index.js +1 -0
  295. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
  296. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
  297. package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.js +22 -0
  298. package/dist/es6/table/index.d.ts +2 -0
  299. package/dist/es6/table/index.d.ts.map +1 -0
  300. package/dist/es6/table/index.js +1 -0
  301. package/dist/es6/table/lib/Table.d.ts +207 -0
  302. package/dist/es6/table/lib/Table.d.ts.map +1 -0
  303. package/dist/es6/table/lib/Table.js +223 -0
  304. package/dist/es6/table/lib/TableBody.d.ts +2 -0
  305. package/dist/es6/table/lib/TableBody.d.ts.map +1 -0
  306. package/dist/es6/table/lib/TableBody.js +29 -0
  307. package/dist/es6/table/lib/TableCaption.d.ts +2 -0
  308. package/dist/es6/table/lib/TableCaption.d.ts.map +1 -0
  309. package/dist/es6/table/lib/TableCaption.js +10 -0
  310. package/dist/es6/table/lib/TableCell.d.ts +2 -0
  311. package/dist/es6/table/lib/TableCell.d.ts.map +1 -0
  312. package/dist/es6/table/lib/TableCell.js +10 -0
  313. package/dist/es6/table/lib/TableFooter.d.ts +2 -0
  314. package/dist/es6/table/lib/TableFooter.d.ts.map +1 -0
  315. package/dist/es6/table/lib/TableFooter.js +9 -0
  316. package/dist/es6/table/lib/TableHead.d.ts +2 -0
  317. package/dist/es6/table/lib/TableHead.d.ts.map +1 -0
  318. package/dist/es6/table/lib/TableHead.js +17 -0
  319. package/dist/es6/table/lib/TableHeader.d.ts +2 -0
  320. package/dist/es6/table/lib/TableHeader.d.ts.map +1 -0
  321. package/dist/es6/table/lib/TableHeader.js +10 -0
  322. package/dist/es6/table/lib/TableRow.d.ts +2 -0
  323. package/dist/es6/table/lib/TableRow.d.ts.map +1 -0
  324. package/dist/es6/table/lib/TableRow.js +13 -0
  325. package/dist/es6/text-area/lib/TextArea.d.ts +3 -12
  326. package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
  327. package/dist/es6/text-area/lib/TextArea.js +7 -31
  328. package/dist/es6/text-area/lib/TextAreaField.d.ts +2 -2
  329. package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
  330. package/dist/es6/text-area/lib/TextAreaField.js +22 -38
  331. package/dist/es6/text-input/lib/TextInput.d.ts +5 -14
  332. package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
  333. package/dist/es6/text-input/lib/TextInput.js +7 -31
  334. package/dist/es6/text-input/lib/TextInputField.d.ts +2 -2
  335. package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
  336. package/dist/es6/text-input/lib/TextInputField.js +24 -29
  337. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +3 -5
  338. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
  339. package/dist/es6/text-input/lib/hooks/useTextInputField.js +1 -1
  340. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
  341. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
  342. package/dist/es6/text-input/lib/hooks/useTextInputModel.js +2 -1
  343. package/form-field/lib/FormField.tsx +5 -10
  344. package/form-field/lib/FormFieldHint.tsx +23 -30
  345. package/form-field/lib/FormFieldLabel.tsx +18 -33
  346. package/form-field/lib/hooks/useFormFieldModel.tsx +1 -3
  347. package/form-field/lib/hooks/useFormFieldOrientation.tsx +6 -6
  348. package/index.ts +2 -3
  349. package/menu/index.ts +1 -6
  350. package/menu/lib/Menu.tsx +81 -27
  351. package/menu/lib/MenuItem.tsx +63 -19
  352. package/package.json +6 -6
  353. package/pill/lib/Pill.tsx +109 -10
  354. package/pill/lib/PillCount.tsx +1 -1
  355. package/pill/lib/PillIcon.tsx +1 -1
  356. package/segmented-control/LICENSE +126 -0
  357. package/segmented-control/README.md +6 -0
  358. package/segmented-control/index.ts +4 -0
  359. package/segmented-control/lib/SegmentedControl.tsx +57 -0
  360. package/segmented-control/lib/SegmentedControlItem.tsx +175 -0
  361. package/segmented-control/lib/SegmentedControlList.tsx +49 -0
  362. package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +33 -0
  363. package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +75 -0
  364. package/segmented-control/package.json +6 -0
  365. package/select/README.md +7 -7
  366. package/select/index.ts +0 -4
  367. package/select/lib/Select.tsx +1 -3
  368. package/select/lib/SelectBase.tsx +3 -5
  369. package/select/lib/SelectMenu.tsx +1 -3
  370. package/select/lib/SelectOption.tsx +1 -3
  371. package/side-panel/index.ts +0 -4
  372. package/side-panel/lib/SidePanel.tsx +119 -170
  373. package/side-panel/lib/SidePanelToggleButton.tsx +78 -0
  374. package/side-panel/lib/hooks.ts +20 -0
  375. package/status-indicator/LICENSE +52 -0
  376. package/status-indicator/README.md +12 -0
  377. package/status-indicator/index.ts +3 -0
  378. package/status-indicator/lib/StatusIndicator.tsx +75 -0
  379. package/status-indicator/lib/StatusIndicatorIcon.tsx +88 -0
  380. package/status-indicator/lib/StatusIndicatorLabel.tsx +28 -0
  381. package/status-indicator/lib/hooks/index.ts +1 -0
  382. package/status-indicator/lib/hooks/useStatusIndicatorModel.tsx +29 -0
  383. package/status-indicator/package.json +6 -0
  384. package/{breadcrumbs → table}/LICENSE +0 -1
  385. package/table/README.md +5 -0
  386. package/table/index.ts +1 -0
  387. package/table/lib/Table.tsx +236 -0
  388. package/table/lib/TableBody.tsx +35 -0
  389. package/table/lib/TableCaption.tsx +22 -0
  390. package/table/lib/TableCell.tsx +27 -0
  391. package/table/lib/TableFooter.tsx +14 -0
  392. package/table/lib/TableHead.tsx +23 -0
  393. package/table/lib/TableHeader.tsx +28 -0
  394. package/table/lib/TableRow.tsx +26 -0
  395. package/table/package.json +6 -0
  396. package/text-area/lib/TextArea.tsx +9 -6
  397. package/text-area/lib/TextAreaField.tsx +7 -3
  398. package/text-input/lib/TextInput.tsx +9 -6
  399. package/text-input/lib/TextInputField.tsx +10 -6
  400. package/text-input/lib/hooks/useTextInputModel.ts +1 -0
  401. package/breadcrumbs/README.md +0 -7
  402. package/breadcrumbs/index.ts +0 -5
  403. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx +0 -85
  404. package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +0 -152
  405. package/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.tsx +0 -63
  406. package/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.ts +0 -109
  407. package/breadcrumbs/lib/Breadcrumbs/Dropdown/index.tsx +0 -38
  408. package/breadcrumbs/lib/Breadcrumbs/List/Collapsible.tsx +0 -66
  409. package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +0 -64
  410. package/breadcrumbs/lib/Breadcrumbs/List/Link.tsx +0 -88
  411. package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +0 -30
  412. package/breadcrumbs/lib/Breadcrumbs/List/hooks.ts +0 -114
  413. package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +0 -28
  414. package/breadcrumbs/lib/Breadcrumbs/List/styles.ts +0 -12
  415. package/breadcrumbs/lib/Breadcrumbs/Nav.tsx +0 -14
  416. package/breadcrumbs/lib/Breadcrumbs/hooks.ts +0 -13
  417. package/breadcrumbs/lib/Breadcrumbs/index.tsx +0 -15
  418. package/breadcrumbs/lib/Breadcrumbs/types.ts +0 -7
  419. package/breadcrumbs/package.json +0 -6
  420. package/dist/commonjs/breadcrumbs/index.d.ts +0 -5
  421. package/dist/commonjs/breadcrumbs/index.d.ts.map +0 -1
  422. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  423. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
  424. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -69
  425. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
  426. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
  427. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -94
  428. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  429. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
  430. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +0 -73
  431. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
  432. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
  433. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -77
  434. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  435. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
  436. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -37
  437. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  438. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
  439. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -78
  440. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  441. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
  442. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -49
  443. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  444. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
  445. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -66
  446. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
  447. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
  448. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -43
  449. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  450. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
  451. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -116
  452. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
  453. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
  454. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +0 -38
  455. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  456. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
  457. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -16
  458. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  459. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
  460. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.js +0 -34
  461. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  462. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
  463. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -12
  464. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
  465. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
  466. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.js +0 -17
  467. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  468. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
  469. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.js +0 -2
  470. package/dist/commonjs/text-area/lib/hooks/index.d.ts +0 -2
  471. package/dist/commonjs/text-area/lib/hooks/index.d.ts.map +0 -1
  472. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
  473. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
  474. package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.js +0 -5
  475. package/dist/es6/breadcrumbs/index.d.ts +0 -5
  476. package/dist/es6/breadcrumbs/index.d.ts.map +0 -1
  477. package/dist/es6/breadcrumbs/index.js +0 -4
  478. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
  479. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
  480. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -63
  481. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
  482. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
  483. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -87
  484. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
  485. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
  486. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +0 -51
  487. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
  488. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
  489. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -72
  490. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
  491. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
  492. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -30
  493. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
  494. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
  495. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -55
  496. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
  497. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
  498. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -42
  499. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
  500. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
  501. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -59
  502. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
  503. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
  504. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -36
  505. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
  506. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
  507. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -91
  508. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
  509. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
  510. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +0 -32
  511. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
  512. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
  513. package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -12
  514. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
  515. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
  516. package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.js +0 -27
  517. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
  518. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
  519. package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -8
  520. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
  521. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
  522. package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.js +0 -14
  523. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
  524. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
  525. package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.js +0 -1
  526. package/dist/es6/text-area/lib/hooks/index.d.ts +0 -2
  527. package/dist/es6/text-area/lib/hooks/index.d.ts.map +0 -1
  528. package/dist/es6/text-area/lib/hooks/index.js +0 -1
  529. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
  530. package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
  531. package/dist/es6/text-area/lib/hooks/useTextAreaModel.js +0 -2
  532. package/text-area/lib/hooks/index.ts +0 -1
  533. package/text-area/lib/hooks/useTextAreaModel.ts +0 -3
@@ -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}
@@ -0,0 +1,126 @@
1
+ Apache License, Version 2.0 Apache License Version 2.0, January 2004
2
+
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and
8
+ distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the
9
+ copyright owner or entity authorized by the copyright owner that is granting the License. "Legal
10
+ Entity" shall mean the union of the acting entity and all other entities that control, are
11
+ controlled by, or are under common control with that entity. For the purposes of this definition,
12
+ "control" means (i) the power, direct or indirect, to cause the direction or management of such
13
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
14
+ outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an
15
+ individual or Legal Entity exercising permissions granted by this License. "Source" form shall
16
+ mean the preferred form for making modifications, including but not limited to software source
17
+ code, documentation source, and configuration files. "Object" form shall mean any form resulting
18
+ from mechanical transformation or translation of a Source form, including but not limited to
19
+ compiled object code, generated documentation, and conversions to other media types. "Work" shall
20
+ mean the work of authorship, whether in Source or Object form, made available under the License,
21
+ as indicated by a copyright notice that is included in or attached to the work (an example is
22
+ provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or
23
+ Object form, that is based on (or derived from) the Work and for which the editorial revisions,
24
+ annotations, elaborations, or other modifications represent, as a whole, an original work of
25
+ authorship. For the purposes of this License, Derivative Works shall not include works that
26
+ remain separable from, or merely link (or bind by name) to the interfaces of, the Work and
27
+ Derivative Works thereof. "Contribution" shall mean any work of authorship, including the
28
+ original version of the Work and any modifications or additions to that Work or Derivative Works
29
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright
30
+ owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner.
31
+ For the purposes of this definition, "submitted" means any form of electronic, verbal, or written
32
+ communication sent to the Licensor or its representatives, including but not limited to
33
+ communication on electronic mailing lists, source code control systems, and issue tracking
34
+ systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and
35
+ improving the Work, but excluding communication that is conspicuously marked or otherwise
36
+ designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean
37
+ Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by
38
+ Licensor and subsequently incorporated within the Work.
39
+
40
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor
41
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
42
+ copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform,
43
+ sublicense, and distribute the Work and such Derivative Works in Source or Object form.
44
+
45
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor
46
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
47
+ (except as stated in this section) patent license to make, have made, use, offer to sell, sell,
48
+ import, and otherwise transfer the Work, where such license applies only to those patent claims
49
+ licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or
50
+ by combination of their Contribution(s) with the Work to which such Contribution(s) was
51
+ submitted. If You institute patent litigation against any entity (including a cross-claim or
52
+ counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work
53
+ constitutes direct or contributory patent infringement, then any patent licenses granted to You
54
+ under this License for that Work shall terminate as of the date such litigation is filed.
55
+
56
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof
57
+ in any medium, with or without modifications, and in Source or Object form, provided that You
58
+ meet the following conditions: You must give any other recipients of the Work or Derivative Works
59
+ a copy of this License; and You must cause any modified files to carry prominent notices stating
60
+ that You changed the files; and You must retain, in the Source form of any Derivative Works that
61
+ You distribute, all copyright, patent, trademark, and attribution notices from the Source form of
62
+ the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If
63
+ the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works
64
+ that You distribute must include a readable copy of the attribution notices contained within such
65
+ NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in
66
+ at least one of the following places: within a NOTICE text file distributed as part of the
67
+ Derivative Works; within the Source form or documentation, if provided along with the Derivative
68
+ Works; or, within a display generated by the Derivative Works, if and wherever such third-party
69
+ notices normally appear. The contents of the NOTICE file are for informational purposes only and
70
+ do not modify the License. You may add Your own attribution notices within Derivative Works that
71
+ You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such
72
+ additional attribution notices cannot be construed as modifying the License. You may add Your own
73
+ copyright statement to Your modifications and may provide additional or different license terms
74
+ and conditions for use, reproduction, or distribution of Your modifications, or for any such
75
+ Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work
76
+ otherwise complies with the conditions stated in this License.
77
+
78
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution
79
+ intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms
80
+ and conditions of this License, without any additional terms or conditions. Notwithstanding the
81
+ above, nothing herein shall supersede or modify the terms of any separate license agreement you
82
+ may have executed with Licensor regarding such Contributions.
83
+
84
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service
85
+ marks, or product names of the Licensor, except as required for reasonable and customary use in
86
+ describing the origin of the Work and reproducing the content of the NOTICE file.
87
+
88
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor
89
+ provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
90
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation,
91
+ any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
92
+ PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or
93
+ redistributing the Work and assume any risks associated with Your exercise of permissions under
94
+ this License.
95
+
96
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including
97
+ negligence), contract, or otherwise, unless required by applicable law (such as deliberate and
98
+ grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for
99
+ damages, including any direct, indirect, special, incidental, or consequential damages of any
100
+ character arising as a result of this License or out of the use or inability to use the Work
101
+ (including but not limited to damages for loss of goodwill, work stoppage, computer failure or
102
+ malfunction, or any and all other commercial damages or losses), even if such Contributor has
103
+ been advised of the possibility of such damages.
104
+
105
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works
106
+ thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty,
107
+ indemnity, or other liability obligations and/or rights consistent with this License. However, in
108
+ accepting such obligations, You may act only on Your own behalf and on Your sole responsibility,
109
+ not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each
110
+ Contributor harmless for any liability incurred by, or claims asserted against, such Contributor
111
+ by reason of your accepting any such warranty or additional liability.
112
+
113
+ END OF TERMS AND CONDITIONS
114
+
115
+ ©2022 Workday, Inc. All rights reserved. Workday and the Workday logo are registered trademarks of
116
+ Workday, Inc. All other brand and product names are trademarks or registered trademarks of their
117
+ respective holders.
118
+
119
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
120
+ compliance with the License. You may obtain a copy of the License at
121
+ http://www.apache.org/licenses/LICENSE-2.0
122
+
123
+ Unless required by applicable law or agreed to in writing, software distributed under the License is
124
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
125
+ implied. See the License for the specific language governing permissions and limitations under the
126
+ License.
@@ -0,0 +1,6 @@
1
+ # Canvas Kit React Segmented Control
2
+
3
+ `SegmentedControl` contains primary and secondary actions related to a page or task.
4
+
5
+ For more detailed information on this component, please refer to the
6
+ [storybook documentation](https://workday.github.io/canvas-kit/?path=/docs/preview-segmented-control-react--basic)
@@ -0,0 +1,4 @@
1
+ export * from './lib/SegmentedControl';
2
+ export * from './lib/hooks/useSegmentedControlModel';
3
+ export * from './lib/hooks/useSegmentedControlItem';
4
+ export {useSegmentedControlList} from './lib/SegmentedControlList';
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import {createContainer} from '@workday/canvas-kit-react/common';
3
+
4
+ import {useSegmentedControlModel} from './hooks/useSegmentedControlModel';
5
+ import {SegmentedControlList} from './SegmentedControlList';
6
+ import {SegmentedControlItem} from './SegmentedControlItem';
7
+
8
+ export interface SegmentedControlProps {
9
+ children: React.ReactNode;
10
+ }
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
+ */
32
+ export const SegmentedControl = createContainer()({
33
+ displayName: 'SegmentedControl',
34
+ modelHook: useSegmentedControlModel,
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
+ */
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
+ */
53
+ Item: SegmentedControlItem,
54
+ },
55
+ })<SegmentedControlProps>(({children}) => {
56
+ return <>{children}</>;
57
+ });
@@ -0,0 +1,175 @@
1
+ import * as React from 'react';
2
+
3
+ import {colors, type, space} from '@workday/canvas-kit-react/tokens';
4
+ import {createSubcomponent, useIsRTL} from '@workday/canvas-kit-react/common';
5
+ import {Tooltip, TooltipProps} from '@workday/canvas-kit-react/tooltip';
6
+ import {
7
+ BaseButton,
8
+ ButtonContainerProps,
9
+ ButtonColors,
10
+ ButtonSizes,
11
+ getMinWidthStyles,
12
+ } from '@workday/canvas-kit-react/button';
13
+ import {CanvasSystemIcon} from '@workday/design-assets-types';
14
+ import {useSegmentedControlModel} from './hooks/useSegmentedControlModel';
15
+ import {Text} from '@workday/canvas-kit-react/text';
16
+ import {useSegmentedControlItem} from './hooks/useSegmentedControlItem';
17
+
18
+ export interface ItemProps extends ButtonContainerProps {
19
+ /**
20
+ * Optionally pass index to the item. This should be done if `SegmentedControl.Item` components were created
21
+ * via a `[Array::map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)` function. This index will ensure keyboard navigation works even if items are
22
+ * inserted out of order.
23
+ */
24
+ index?: number;
25
+ /**
26
+ * The contents of the item. This is text used as the accessible name of the button for screen readers.
27
+ */
28
+ children?: React.ReactNode;
29
+ /**
30
+ * The identifier of the item. This identifier will be used in change events and for `initialTab`.
31
+ * If this property is not provided, it will default to a string representation
32
+ * of the the zero-based index of the item when it was initialized.
33
+ */
34
+ 'data-id'?: string;
35
+ /**
36
+ * Optional id. If not set, it will inherit the ID passed to the `SegmentedControl` component and append the
37
+ * index at the end. Only set this for advanced cases.
38
+ */
39
+ id?: string;
40
+ /**
41
+ * Part of the ARIA specification for buttons. Lets screen readers know which button is active. This
42
+ * should either be `true` or `false`. This is automatically set by the
43
+ * component and should only be used in advanced cases.
44
+ */
45
+ 'aria-pressed'?: boolean;
46
+ /**
47
+ * The icon of the button.
48
+ */
49
+ icon?: CanvasSystemIcon;
50
+ /**
51
+ * Tooltip Props
52
+ */
53
+ tooltipProps?: Omit<TooltipProps, 'children'>;
54
+ }
55
+
56
+ const getButtonSize = (size: ButtonContainerProps['size']) => {
57
+ switch (size) {
58
+ case 'large':
59
+ return 'medium';
60
+ case 'medium':
61
+ return 'small';
62
+ case 'small':
63
+ return 'extraSmall';
64
+ default:
65
+ return 'medium';
66
+ }
67
+ };
68
+
69
+ const getIconButtonColors = (toggled?: boolean): ButtonColors => {
70
+ return {
71
+ default: {
72
+ background: toggled ? colors.frenchVanilla100 : colors.soap200,
73
+ border: toggled ? colors.licorice200 : 'transparent',
74
+ icon: toggled ? colors.blackPepper400 : colors.licorice400,
75
+ label: toggled ? colors.blackPepper400 : colors.licorice400,
76
+ },
77
+ hover: {
78
+ background: toggled ? colors.frenchVanilla100 : colors.soap400,
79
+ icon: colors.licorice400,
80
+ label: colors.licorice400,
81
+ },
82
+ active: {
83
+ background: toggled ? colors.frenchVanilla100 : colors.soap400,
84
+ icon: colors.licorice400,
85
+ label: colors.licorice400,
86
+ },
87
+ focus: {},
88
+ disabled: {
89
+ background: colors.soap200,
90
+ opacity: '1',
91
+ },
92
+ };
93
+ };
94
+
95
+ const getPaddingStyles = (
96
+ children: React.ReactNode,
97
+ size: ButtonContainerProps['size'],
98
+ icon: CanvasSystemIcon | undefined
99
+ ) => {
100
+ if (!children) {
101
+ return 0;
102
+ }
103
+
104
+ switch (size) {
105
+ case 'large':
106
+ return icon ? `0 ${space.m} 0 20px` : `0 ${space.m}`;
107
+
108
+ case 'medium':
109
+ return icon ? `0 20px 0 ${space.s}` : `0 ${space.s}`;
110
+
111
+ case 'small':
112
+ return icon ? `0 ${space.xs} 0 ${space.xxs}` : `0 ${space.xs}`;
113
+
114
+ default:
115
+ return icon ? `0 20px 0 ${space.s}` : `0 ${space.s}`;
116
+ }
117
+ };
118
+
119
+ const geButtonStyles = (size: ButtonSizes, children: React.ReactNode, icon?: CanvasSystemIcon) => {
120
+ const buttonSize = getButtonSize(size);
121
+ const minWidthValue = getMinWidthStyles(children, children ? size : buttonSize);
122
+
123
+ return {
124
+ height: getMinWidthStyles(false, buttonSize),
125
+ minWidth: minWidthValue,
126
+ padding: getPaddingStyles(children, size, icon),
127
+ };
128
+ };
129
+
130
+ const Container = ({
131
+ tooltipProps,
132
+ children,
133
+ }: {
134
+ tooltipProps?: Omit<TooltipProps, 'children'>;
135
+ children: React.ReactElement;
136
+ }) => {
137
+ return tooltipProps ? (
138
+ <Tooltip {...tooltipProps}>{children}</Tooltip>
139
+ ) : (
140
+ <React.Fragment>{children}</React.Fragment>
141
+ );
142
+ };
143
+
144
+ export const SegmentedControlItem = createSubcomponent('button')({
145
+ displayName: 'SegmentedControl.Item',
146
+ modelHook: useSegmentedControlModel,
147
+ elemPropsHook: useSegmentedControlItem,
148
+ })<ItemProps>(({children, icon, tooltipProps, ...elemProps}, Element, {state: {size}}) => {
149
+ const {color, ...textStyles} = type.levels.subtext[size === 'small' ? 'medium' : 'large'];
150
+
151
+ return (
152
+ <Container tooltipProps={tooltipProps}>
153
+ <BaseButton
154
+ as={Element}
155
+ borderRadius="m"
156
+ colors={getIconButtonColors(elemProps['aria-pressed'])}
157
+ {...geButtonStyles(size, children, icon)}
158
+ {...elemProps}
159
+ >
160
+ {icon && (
161
+ <BaseButton.Icon
162
+ size={size === 'small' ? 'extraSmall' : 'medium'}
163
+ icon={icon}
164
+ shouldMirrorIcon={useIsRTL()}
165
+ />
166
+ )}
167
+ {children && (
168
+ <Text {...textStyles} fontWeight="bold" textAlign="left">
169
+ {children}
170
+ </Text>
171
+ )}
172
+ </BaseButton>
173
+ </Container>
174
+ );
175
+ });
@@ -0,0 +1,49 @@
1
+ import * as React from 'react';
2
+
3
+ import {
4
+ createSubcomponent,
5
+ ExtractProps,
6
+ createElemPropsHook,
7
+ } from '@workday/canvas-kit-react/common';
8
+ import {Grid} from '@workday/canvas-kit-react/layout';
9
+ import {useListRenderItems} from '@workday/canvas-kit-react/collection';
10
+ import {useSegmentedControlModel} from './hooks/useSegmentedControlModel';
11
+
12
+ export interface SegmentedControlListProps<T = any>
13
+ extends Omit<Partial<ExtractProps<typeof Grid, never>>, 'children'> {
14
+ 'aria-label': string;
15
+ children: ((item: T) => React.ReactNode) | React.ReactNode;
16
+ }
17
+
18
+ export const useSegmentedControlList = createElemPropsHook(useSegmentedControlModel)(
19
+ ({state: {orientation, disabled, items}}) => {
20
+ const directionName = orientation === 'vertical' ? 'Row' : 'Column';
21
+ return {
22
+ [`gridTemplate${directionName}s`]: `repeat(${items.length}, 1fr)`,
23
+ opacity: disabled ? 0.4 : undefined,
24
+ };
25
+ }
26
+ );
27
+
28
+ export const SegmentedControlList = createSubcomponent('div')({
29
+ displayName: 'SegmentedControl.List',
30
+ modelHook: useSegmentedControlModel,
31
+ elemPropsHook: useSegmentedControlList,
32
+ })<SegmentedControlListProps>(({children, ...elemProps}, Element, model) => {
33
+ return (
34
+ <Grid
35
+ as={Element}
36
+ display="inline-grid"
37
+ role="group"
38
+ backgroundColor="soap200"
39
+ border="1px solid transparent"
40
+ borderColor="licorice200"
41
+ borderRadius="l"
42
+ padding="3px"
43
+ gridGap="xxs"
44
+ {...elemProps}
45
+ >
46
+ {useListRenderItems(model, children)}
47
+ </Grid>
48
+ );
49
+ });
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+
3
+ import {createElemPropsHook, composeHooks} from '@workday/canvas-kit-react/common';
4
+ import {
5
+ useListItemRegister,
6
+ isSelected,
7
+ useListItemSelect,
8
+ } from '@workday/canvas-kit-react/collection';
9
+ import {useSegmentedControlModel} from './useSegmentedControlModel';
10
+
11
+ export const useSegmentedControlItem = composeHooks(
12
+ useListItemSelect,
13
+ createElemPropsHook(useSegmentedControlModel)(
14
+ (model, _, elemProps: {'data-id'?: string; children?: React.ReactNode} = {}) => {
15
+ const name = elemProps['data-id'] || '';
16
+ const selected = !!name && isSelected(name, model.state);
17
+
18
+ return {
19
+ id: `${model.state.id}-${name}`,
20
+ 'aria-pressed': selected,
21
+ };
22
+ }
23
+ ),
24
+ useListItemRegister,
25
+ createElemPropsHook(useSegmentedControlModel)(({state}) => {
26
+ return {
27
+ // override the default disabled functionality of `useListItemRegister`
28
+ // it shouldn't allow to set disabled state only for one button
29
+ // state prop will disable the whole container
30
+ disabled: state.disabled ? true : undefined,
31
+ };
32
+ })
33
+ );
@@ -0,0 +1,75 @@
1
+ import React from 'react';
2
+ import {createModelHook} from '@workday/canvas-kit-react/common';
3
+ import {defaultGetId, useListModel} from '@workday/canvas-kit-react/collection';
4
+
5
+ export const useSegmentedControlModel = createModelHook({
6
+ defaultConfig: {
7
+ ...useListModel.defaultConfig,
8
+ /**
9
+ * Optional id for the whole `SegmentedControl` group. If not provided, a unique id will be created.
10
+ * @default useUniqueId()
11
+ */
12
+ id: '',
13
+ /**
14
+ * An initially selected value. This value must match the `data-id` of the `SegmentedControl.Item` component.
15
+ * If not provided, the first value will be selected.
16
+ */
17
+ initialValue: '',
18
+ /**
19
+ * Sets disabled state for all segmented control buttons
20
+ * @default false
21
+ */
22
+ disabled: false,
23
+ /**
24
+ * Sets the size of the segmented control container and its buttons. Can be `small`, `medium` or `large`.
25
+ * @default 'medium'
26
+ */
27
+ size: 'medium' as 'small' | 'medium' | 'large',
28
+ /**
29
+ * The SegmentedControl can rendered in a horizontal or vertical orientation.
30
+ * We suggest to use the `vertical` orientation only for icon only variant.
31
+ * @default 'horizontal'
32
+ */
33
+ orientation: 'horizontal' as typeof useListModel.defaultConfig.orientation,
34
+ },
35
+ requiredConfig: useListModel.requiredConfig,
36
+ })(config => {
37
+ const getId = config.getId || defaultGetId;
38
+ const initialSelectedRef = React.useRef(config.initialValue);
39
+ const items = config.items;
40
+
41
+ const model = useListModel(
42
+ useListModel.mergeConfig(config, {
43
+ orientation: config.orientation || 'horizontal',
44
+ items,
45
+ onRegisterItem(data) {
46
+ if (!initialSelectedRef.current) {
47
+ initialSelectedRef.current = getId(data.item);
48
+ events.select({id: initialSelectedRef.current});
49
+ }
50
+ },
51
+ initialSelectedIds: config.initialValue
52
+ ? [config.initialValue]
53
+ : config.items?.length
54
+ ? [getId(config.items![0])]
55
+ : [],
56
+ shouldVirtualize: false,
57
+ })
58
+ );
59
+
60
+ const state = {
61
+ ...model.state,
62
+ disabled: config.disabled,
63
+ size: config.size,
64
+ };
65
+
66
+ const events = {
67
+ ...model.events,
68
+ };
69
+
70
+ return {
71
+ ...model,
72
+ state,
73
+ events,
74
+ };
75
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../dist/commonjs/segmented-control",
3
+ "module": "../dist/es6/segmented-control",
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/segmented-control"
6
+ }
package/select/README.md CHANGED
@@ -34,7 +34,7 @@ fully accessible (see below).
34
34
 
35
35
  ```tsx
36
36
  import * as React from 'react';
37
- import Select from '@workday/canvas-kit-preview-react/select';
37
+ import {Select} from '@workday/canvas-kit-preview-react/select';
38
38
 
39
39
  function Example() {
40
40
  const options = [
@@ -58,8 +58,8 @@ function Example() {
58
58
 
59
59
  ```tsx
60
60
  import * as React from 'react';
61
- import Select from '@workday/canvas-kit-preview-react/select';
62
- import FormField from '@workday/canvas-kit-react/form-field';
61
+ import {Select} from '@workday/canvas-kit-preview-react/select';
62
+ import {FormField} from '@workday/canvas-kit-react/form-field';
63
63
 
64
64
  function Example() {
65
65
  const options = [
@@ -89,8 +89,8 @@ function Example() {
89
89
 
90
90
  ```tsx
91
91
  import * as React from 'react';
92
- import Select from '@workday/canvas-kit-preview-react/select';
93
- import FormField from '@workday/canvas-kit-react/form-field';
92
+ import {Select} from '@workday/canvas-kit-preview-react/select';
93
+ import {FormField} from '@workday/canvas-kit-react/form-field';
94
94
 
95
95
  function Example() {
96
96
  const options = ['California', 'Florida', 'New York', 'Pennsylvania', 'Texas'];
@@ -117,8 +117,8 @@ used to customize how each option is rendered.
117
117
 
118
118
  ```tsx
119
119
  import * as React from 'react';
120
- import Select from '@workday/canvas-kit-preview-react/select';
121
- import FormField from '@workday/canvas-kit-react/form-field';
120
+ import {Select} from '@workday/canvas-kit-preview-react/select';
121
+ import {FormField} from '@workday/canvas-kit-react/form-field';
122
122
  import {colors, typeColors} from '@workday/canvas-kit-react/tokens';
123
123
  import {
124
124
  activityStreamIcon,
package/select/index.ts CHANGED
@@ -1,7 +1,3 @@
1
- import Select from './lib/Select';
2
-
3
- export default Select;
4
- export {Select};
5
1
  export * from './lib/Select';
6
2
 
7
3
  export {
@@ -7,7 +7,7 @@ import {
7
7
  generateUniqueId,
8
8
  } from '@workday/canvas-kit-react/common';
9
9
  import {menuAnimationDuration} from './SelectMenu';
10
- import SelectBase, {CoreSelectBaseProps, Option, NormalizedOption} from './SelectBase';
10
+ import {SelectBase, CoreSelectBaseProps, Option, NormalizedOption} from './SelectBase';
11
11
  import {MenuVisibility} from './types';
12
12
  import {getCorrectedIndexByValue} from './utils';
13
13
 
@@ -587,5 +587,3 @@ export const Select = createComponent('button')({
587
587
  ErrorType,
588
588
  },
589
589
  });
590
-
591
- export default Select;
@@ -20,8 +20,8 @@ import {
20
20
  import {caretDownSmallIcon} from '@workday/canvas-system-icons-web';
21
21
  import {SystemIcon} from '@workday/canvas-kit-react/icon';
22
22
 
23
- import SelectMenu from './SelectMenu';
24
- import SelectOption from './SelectOption';
23
+ import {SelectMenu} from './SelectMenu';
24
+ import {SelectOption} from './SelectOption';
25
25
  import {scrollIntoViewIfNeeded} from './scrolling';
26
26
  import {MenuPlacement, MenuVisibility} from './types';
27
27
  import {getCorrectedIndexByValue} from './utils';
@@ -288,7 +288,7 @@ const defaultRenderSelected: RenderSelectedFunction = option => {
288
288
  return option.label;
289
289
  };
290
290
 
291
- const SelectBase = ({
291
+ export const SelectBase = ({
292
292
  'aria-labelledby': ariaLabelledBy,
293
293
  'aria-required': ariaRequired,
294
294
  as,
@@ -475,5 +475,3 @@ const SelectBase = ({
475
475
  </SelectWrapper>
476
476
  );
477
477
  };
478
-
479
- export default SelectBase;
@@ -223,7 +223,7 @@ const generatePopperOptions = (
223
223
  };
224
224
  };
225
225
 
226
- const SelectMenu = ({
226
+ export const SelectMenu = ({
227
227
  buttonRef,
228
228
  children,
229
229
  error,
@@ -294,5 +294,3 @@ const SelectMenu = ({
294
294
  </Popper>
295
295
  );
296
296
  };
297
-
298
- export default SelectMenu;