@workday/canvas-kit-react 15.0.0-alpha.0010-next.0 → 15.0.0-alpha.0028-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/dist/commonjs/action-bar/lib/ActionBarList.js +1 -1
  2. package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.js +1 -1
  3. package/dist/commonjs/avatar/lib/Avatar.js +20 -20
  4. package/dist/commonjs/badge/lib/CountBadge.js +6 -6
  5. package/dist/commonjs/banner/lib/Banner.js +5 -5
  6. package/dist/commonjs/banner/lib/BannerActionText.js +2 -2
  7. package/dist/commonjs/banner/lib/BannerIcon.js +1 -1
  8. package/dist/commonjs/banner/lib/BannerLabel.js +1 -1
  9. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.js +1 -1
  10. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.js +1 -1
  11. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.js +1 -1
  12. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.js +1 -1
  13. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.js +2 -2
  14. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.js +1 -1
  15. package/dist/commonjs/button/lib/BaseButton.js +21 -21
  16. package/dist/commonjs/button/lib/DeleteButton.js +1 -1
  17. package/dist/commonjs/button/lib/ExternalHyperlink.js +1 -1
  18. package/dist/commonjs/button/lib/Hyperlink.js +4 -4
  19. package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
  20. package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
  21. package/dist/commonjs/button/lib/TertiaryButton.js +17 -17
  22. package/dist/commonjs/button/lib/ToolbarDropdownButton.js +3 -3
  23. package/dist/commonjs/button/lib/ToolbarIconButton.js +1 -1
  24. package/dist/commonjs/card/lib/Card.js +3 -3
  25. package/dist/commonjs/card/lib/CardBody.js +1 -1
  26. package/dist/commonjs/card/lib/CardHeading.js +1 -1
  27. package/dist/commonjs/checkbox/lib/CheckBackground.js +3 -3
  28. package/dist/commonjs/checkbox/lib/CheckboxCheck.js +5 -5
  29. package/dist/commonjs/checkbox/lib/CheckboxContainer.js +1 -1
  30. package/dist/commonjs/checkbox/lib/CheckboxInput.js +5 -5
  31. package/dist/commonjs/checkbox/lib/CheckboxRipple.js +1 -1
  32. package/dist/commonjs/collection/lib/ListBox.js +3 -3
  33. package/dist/commonjs/color-picker/lib/ColorInput.js +3 -3
  34. package/dist/commonjs/color-picker/lib/ColorPreview.js +1 -1
  35. package/dist/commonjs/color-picker/lib/parts/ColorSwatch.js +2 -2
  36. package/dist/commonjs/combobox/lib/ComboboxMenuList.js +1 -1
  37. package/dist/commonjs/common/lib/AccessibleHide.js +1 -1
  38. package/dist/commonjs/common/lib/CanvasProvider.js +1 -1
  39. package/dist/commonjs/expandable/lib/Expandable.js +1 -1
  40. package/dist/commonjs/expandable/lib/ExpandableAvatar.js +1 -1
  41. package/dist/commonjs/expandable/lib/ExpandableContent.js +1 -1
  42. package/dist/commonjs/expandable/lib/ExpandableIcon.js +10 -10
  43. package/dist/commonjs/expandable/lib/ExpandableTarget.js +1 -1
  44. package/dist/commonjs/expandable/lib/ExpandableTitle.js +1 -1
  45. package/dist/commonjs/form-field/lib/FormFieldContainer.js +1 -1
  46. package/dist/commonjs/form-field/lib/FormFieldField.js +1 -1
  47. package/dist/commonjs/form-field/lib/FormFieldGroupLabel.js +5 -5
  48. package/dist/commonjs/form-field/lib/FormFieldGroupList.js +3 -3
  49. package/dist/commonjs/form-field/lib/FormFieldHint.js +3 -3
  50. package/dist/commonjs/form-field/lib/FormFieldLabel.js +6 -6
  51. package/dist/commonjs/form-field/lib/formFieldStencil.js +8 -8
  52. package/dist/commonjs/icon/lib/AccentIcon.js +2 -2
  53. package/dist/commonjs/icon/lib/AppletIcon.js +1 -1
  54. package/dist/commonjs/icon/lib/Graphic.js +4 -4
  55. package/dist/commonjs/icon/lib/Svg.js +3 -3
  56. package/dist/commonjs/icon/lib/SystemIcon.js +1 -1
  57. package/dist/commonjs/icon/lib/SystemIconCircle.js +1 -1
  58. package/dist/commonjs/loading-dots/lib/LoadingDots.js +3 -3
  59. package/dist/commonjs/menu/lib/MenuCard.js +1 -1
  60. package/dist/commonjs/menu/lib/MenuDivider.js +1 -1
  61. package/dist/commonjs/menu/lib/MenuGroup.js +1 -1
  62. package/dist/commonjs/menu/lib/MenuItem.js +1 -1
  63. package/dist/commonjs/menu/lib/MenuList.js +3 -3
  64. package/dist/commonjs/modal/lib/ModalBody.js +1 -1
  65. package/dist/commonjs/modal/lib/ModalCard.js +1 -1
  66. package/dist/commonjs/modal/lib/ModalHeading.js +1 -1
  67. package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
  68. package/dist/commonjs/modal/lib/ModalOverlay.js +2 -2
  69. package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.js +2 -2
  70. package/dist/commonjs/pagination/lib/Pagination/Controls.js +2 -2
  71. package/dist/commonjs/pagination/lib/Pagination/GoTo/Form.js +1 -1
  72. package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.js +1 -1
  73. package/dist/commonjs/pagination/lib/Pagination/GoTo/TextInput.js +1 -1
  74. package/dist/commonjs/pagination/lib/Pagination/Nav.js +1 -1
  75. package/dist/commonjs/pagination/lib/Pagination/PageButton.js +2 -2
  76. package/dist/commonjs/pagination/lib/Pagination/PageList.js +1 -1
  77. package/dist/commonjs/pagination/lib/Pagination/Pagination.js +1 -1
  78. package/dist/commonjs/pagination/lib/Pagination/common/List.js +2 -2
  79. package/dist/commonjs/popup/lib/PopupBody.js +1 -1
  80. package/dist/commonjs/popup/lib/PopupCard.js +2 -2
  81. package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
  82. package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
  83. package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +1 -1
  84. package/dist/commonjs/segmented-control/index.d.ts +3 -0
  85. package/dist/commonjs/segmented-control/index.d.ts.map +1 -1
  86. package/dist/commonjs/segmented-control/index.js +3 -0
  87. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +1316 -24
  88. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
  89. package/dist/commonjs/segmented-control/lib/SegmentedControl.js +43 -53
  90. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +256 -0
  91. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
  92. package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +114 -0
  93. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +153 -0
  94. package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
  95. package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +34 -0
  96. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +140 -0
  97. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
  98. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +21 -0
  99. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1336 -0
  100. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
  101. package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +75 -0
  102. package/dist/commonjs/select/lib/SelectCard.js +1 -1
  103. package/dist/commonjs/select/lib/SelectInput.js +3 -3
  104. package/dist/commonjs/skeleton/lib/Skeleton.js +2 -2
  105. package/dist/commonjs/skeleton/lib/parts/SkeletonHeader.js +1 -1
  106. package/dist/commonjs/skeleton/lib/parts/SkeletonShape.js +1 -1
  107. package/dist/commonjs/skeleton/lib/parts/SkeletonText.js +1 -1
  108. package/dist/commonjs/switch/lib/Switch.js +7 -7
  109. package/dist/commonjs/table/lib/BaseTable.js +1 -1
  110. package/dist/commonjs/table/lib/Table.js +7 -7
  111. package/dist/commonjs/table/lib/parts/BaseTableBody.js +1 -1
  112. package/dist/commonjs/table/lib/parts/BaseTableCaption.js +1 -1
  113. package/dist/commonjs/table/lib/parts/BaseTableCell.js +1 -1
  114. package/dist/commonjs/table/lib/parts/BaseTableHead.js +1 -1
  115. package/dist/commonjs/table/lib/parts/BaseTableHeader.js +1 -1
  116. package/dist/commonjs/table/lib/parts/css-grid-table/TableRow.js +1 -1
  117. package/dist/commonjs/tabs/lib/TabsItem.js +1 -1
  118. package/dist/commonjs/tabs/lib/TabsList.js +8 -8
  119. package/dist/commonjs/tabs/lib/TabsOverflowButton.js +1 -1
  120. package/dist/commonjs/text/lib/LabelText.js +6 -6
  121. package/dist/commonjs/text/lib/Text.js +16 -16
  122. package/dist/commonjs/text/lib/TypeLevelComponents.js +4 -4
  123. package/dist/commonjs/text-area/lib/TextArea.js +5 -5
  124. package/dist/commonjs/text-input/lib/InputGroup.js +6 -6
  125. package/dist/commonjs/text-input/lib/TextInput.js +5 -5
  126. package/dist/commonjs/toast/lib/Toast.js +1 -1
  127. package/dist/commonjs/toast/lib/ToastBody.js +1 -1
  128. package/dist/commonjs/toast/lib/ToastCloseIcon.js +1 -1
  129. package/dist/commonjs/toast/lib/ToastIcon.js +1 -1
  130. package/dist/commonjs/toast/lib/ToastMessage.js +1 -1
  131. package/dist/commonjs/tooltip/lib/TooltipContainer.js +2 -2
  132. package/dist/commonjs/version/lib/version.js +1 -1
  133. package/dist/es6/action-bar/lib/ActionBarList.js +1 -1
  134. package/dist/es6/action-bar/lib/ActionBarOverflowButton.js +1 -1
  135. package/dist/es6/avatar/lib/Avatar.js +20 -20
  136. package/dist/es6/badge/lib/CountBadge.js +6 -6
  137. package/dist/es6/banner/lib/Banner.js +5 -5
  138. package/dist/es6/banner/lib/BannerActionText.js +2 -2
  139. package/dist/es6/banner/lib/BannerIcon.js +1 -1
  140. package/dist/es6/banner/lib/BannerLabel.js +1 -1
  141. package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.js +1 -1
  142. package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.js +1 -1
  143. package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.js +1 -1
  144. package/dist/es6/breadcrumbs/lib/BreadcrumbsList.js +1 -1
  145. package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.js +2 -2
  146. package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.js +1 -1
  147. package/dist/es6/button/lib/BaseButton.js +21 -21
  148. package/dist/es6/button/lib/DeleteButton.js +1 -1
  149. package/dist/es6/button/lib/ExternalHyperlink.js +1 -1
  150. package/dist/es6/button/lib/Hyperlink.js +4 -4
  151. package/dist/es6/button/lib/PrimaryButton.js +2 -2
  152. package/dist/es6/button/lib/SecondaryButton.js +2 -2
  153. package/dist/es6/button/lib/TertiaryButton.js +17 -17
  154. package/dist/es6/button/lib/ToolbarDropdownButton.js +3 -3
  155. package/dist/es6/button/lib/ToolbarIconButton.js +1 -1
  156. package/dist/es6/card/lib/Card.js +3 -3
  157. package/dist/es6/card/lib/CardBody.js +1 -1
  158. package/dist/es6/card/lib/CardHeading.js +1 -1
  159. package/dist/es6/checkbox/lib/CheckBackground.js +3 -3
  160. package/dist/es6/checkbox/lib/CheckboxCheck.js +5 -5
  161. package/dist/es6/checkbox/lib/CheckboxContainer.js +1 -1
  162. package/dist/es6/checkbox/lib/CheckboxInput.js +5 -5
  163. package/dist/es6/checkbox/lib/CheckboxRipple.js +1 -1
  164. package/dist/es6/collection/lib/ListBox.js +3 -3
  165. package/dist/es6/color-picker/lib/ColorInput.js +3 -3
  166. package/dist/es6/color-picker/lib/ColorPreview.js +1 -1
  167. package/dist/es6/color-picker/lib/parts/ColorSwatch.js +2 -2
  168. package/dist/es6/combobox/lib/ComboboxMenuList.js +1 -1
  169. package/dist/es6/common/lib/AccessibleHide.js +1 -1
  170. package/dist/es6/common/lib/CanvasProvider.js +1 -1
  171. package/dist/es6/expandable/lib/Expandable.js +1 -1
  172. package/dist/es6/expandable/lib/ExpandableAvatar.js +1 -1
  173. package/dist/es6/expandable/lib/ExpandableContent.js +1 -1
  174. package/dist/es6/expandable/lib/ExpandableIcon.js +10 -10
  175. package/dist/es6/expandable/lib/ExpandableTarget.js +1 -1
  176. package/dist/es6/expandable/lib/ExpandableTitle.js +1 -1
  177. package/dist/es6/form-field/lib/FormFieldContainer.js +1 -1
  178. package/dist/es6/form-field/lib/FormFieldField.js +1 -1
  179. package/dist/es6/form-field/lib/FormFieldGroupLabel.js +5 -5
  180. package/dist/es6/form-field/lib/FormFieldGroupList.js +3 -3
  181. package/dist/es6/form-field/lib/FormFieldHint.js +3 -3
  182. package/dist/es6/form-field/lib/FormFieldLabel.js +6 -6
  183. package/dist/es6/form-field/lib/formFieldStencil.js +8 -8
  184. package/dist/es6/icon/lib/AccentIcon.js +2 -2
  185. package/dist/es6/icon/lib/AppletIcon.js +1 -1
  186. package/dist/es6/icon/lib/Graphic.js +4 -4
  187. package/dist/es6/icon/lib/Svg.js +3 -3
  188. package/dist/es6/icon/lib/SystemIcon.js +1 -1
  189. package/dist/es6/icon/lib/SystemIconCircle.js +1 -1
  190. package/dist/es6/loading-dots/lib/LoadingDots.js +3 -3
  191. package/dist/es6/menu/lib/MenuCard.js +1 -1
  192. package/dist/es6/menu/lib/MenuDivider.js +1 -1
  193. package/dist/es6/menu/lib/MenuGroup.js +1 -1
  194. package/dist/es6/menu/lib/MenuItem.js +1 -1
  195. package/dist/es6/menu/lib/MenuList.js +3 -3
  196. package/dist/es6/modal/lib/ModalBody.js +1 -1
  197. package/dist/es6/modal/lib/ModalCard.js +1 -1
  198. package/dist/es6/modal/lib/ModalHeading.js +1 -1
  199. package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
  200. package/dist/es6/modal/lib/ModalOverlay.js +2 -2
  201. package/dist/es6/pagination/lib/Pagination/AdditionalDetails.js +2 -2
  202. package/dist/es6/pagination/lib/Pagination/Controls.js +2 -2
  203. package/dist/es6/pagination/lib/Pagination/GoTo/Form.js +1 -1
  204. package/dist/es6/pagination/lib/Pagination/GoTo/Label.js +1 -1
  205. package/dist/es6/pagination/lib/Pagination/GoTo/TextInput.js +1 -1
  206. package/dist/es6/pagination/lib/Pagination/Nav.js +1 -1
  207. package/dist/es6/pagination/lib/Pagination/PageButton.js +2 -2
  208. package/dist/es6/pagination/lib/Pagination/PageList.js +1 -1
  209. package/dist/es6/pagination/lib/Pagination/Pagination.js +1 -1
  210. package/dist/es6/pagination/lib/Pagination/common/List.js +2 -2
  211. package/dist/es6/popup/lib/PopupBody.js +1 -1
  212. package/dist/es6/popup/lib/PopupCard.js +2 -2
  213. package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
  214. package/dist/es6/popup/lib/PopupHeading.js +1 -1
  215. package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +1 -1
  216. package/dist/es6/segmented-control/index.d.ts +3 -0
  217. package/dist/es6/segmented-control/index.d.ts.map +1 -1
  218. package/dist/es6/segmented-control/index.js +3 -0
  219. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +1316 -24
  220. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
  221. package/dist/es6/segmented-control/lib/SegmentedControl.js +45 -32
  222. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +256 -0
  223. package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
  224. package/dist/es6/segmented-control/lib/SegmentedControlItem.js +88 -0
  225. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +153 -0
  226. package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
  227. package/dist/es6/segmented-control/lib/SegmentedControlList.js +31 -0
  228. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +140 -0
  229. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
  230. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +18 -0
  231. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1336 -0
  232. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
  233. package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +69 -0
  234. package/dist/es6/select/lib/SelectCard.js +1 -1
  235. package/dist/es6/select/lib/SelectInput.js +3 -3
  236. package/dist/es6/skeleton/lib/Skeleton.js +2 -2
  237. package/dist/es6/skeleton/lib/parts/SkeletonHeader.js +1 -1
  238. package/dist/es6/skeleton/lib/parts/SkeletonShape.js +1 -1
  239. package/dist/es6/skeleton/lib/parts/SkeletonText.js +1 -1
  240. package/dist/es6/switch/lib/Switch.js +7 -7
  241. package/dist/es6/table/lib/BaseTable.js +1 -1
  242. package/dist/es6/table/lib/Table.js +7 -7
  243. package/dist/es6/table/lib/parts/BaseTableBody.js +1 -1
  244. package/dist/es6/table/lib/parts/BaseTableCaption.js +1 -1
  245. package/dist/es6/table/lib/parts/BaseTableCell.js +1 -1
  246. package/dist/es6/table/lib/parts/BaseTableHead.js +1 -1
  247. package/dist/es6/table/lib/parts/BaseTableHeader.js +1 -1
  248. package/dist/es6/table/lib/parts/css-grid-table/TableRow.js +1 -1
  249. package/dist/es6/tabs/lib/TabsItem.js +1 -1
  250. package/dist/es6/tabs/lib/TabsList.js +8 -8
  251. package/dist/es6/tabs/lib/TabsOverflowButton.js +1 -1
  252. package/dist/es6/text/lib/LabelText.js +6 -6
  253. package/dist/es6/text/lib/Text.js +16 -16
  254. package/dist/es6/text/lib/TypeLevelComponents.js +4 -4
  255. package/dist/es6/text-area/lib/TextArea.js +5 -5
  256. package/dist/es6/text-input/lib/InputGroup.js +6 -6
  257. package/dist/es6/text-input/lib/TextInput.js +5 -5
  258. package/dist/es6/toast/lib/Toast.js +1 -1
  259. package/dist/es6/toast/lib/ToastBody.js +1 -1
  260. package/dist/es6/toast/lib/ToastCloseIcon.js +1 -1
  261. package/dist/es6/toast/lib/ToastIcon.js +1 -1
  262. package/dist/es6/toast/lib/ToastMessage.js +1 -1
  263. package/dist/es6/tooltip/lib/TooltipContainer.js +2 -2
  264. package/dist/es6/version/lib/version.js +1 -1
  265. package/package.json +5 -5
  266. package/segmented-control/index.ts +3 -0
  267. package/segmented-control/lib/SegmentedControl.tsx +46 -75
  268. package/segmented-control/lib/SegmentedControlItem.tsx +230 -0
  269. package/segmented-control/lib/SegmentedControlList.tsx +64 -0
  270. package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +33 -0
  271. package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +75 -0
  272. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +0 -16
  273. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +0 -1
  274. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +0 -29
  275. package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +0 -16
  276. package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +0 -1
  277. package/dist/es6/segmented-control/lib/SegmentedControlButton.js +0 -26
  278. package/segmented-control/lib/SegmentedControlButton.tsx +0 -114
@@ -1,32 +1,1324 @@
1
- import * as React from 'react';
2
- import { SegmentedControlButtonProps } from './SegmentedControlButton';
1
+ import React from 'react';
2
+ export interface SegmentedControlProps {
3
+ children: React.ReactNode;
4
+ }
3
5
  /**
4
- * @deprecated ⚠️ `SegmentedControlProps` in Main has been deprecated and will be removed in a future major version. Please use [`SegmentedControl` in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-segmented-control--docs) instead.
6
+ * `SegmentedControl` is a container component that is responsible for creating a
7
+ * {@link SegmentedControlModel} and sharing it with its subcomponents using React context. It does
8
+ * not represent a real element.
9
+ *
10
+ * ```tsx
11
+ * <SegmentedControl items={[]}>{Child components}</SegmentedControl>
12
+ * ```
13
+ *
14
+ * Alternatively, you may pass in a model using the [hoisted model
15
+ * pattern](/getting-started/for-developers/resources/compound-components/#configuring-a-model).
16
+ *
17
+ * ```tsx
18
+ * const model = useSegmentedControlModel({
19
+ * items: [],
20
+ * });
21
+ *
22
+ * <SegmentedControl model={model}>{Child components}</SegmentedControl>;
23
+ * ```
5
24
  */
6
- export interface SegmentedControlProps {
7
- /**
8
- * The Button children of the SegmentedControl (must be at least two).
9
- * TODO: Add support for text children
10
- */
11
- children: React.ReactElement<SegmentedControlButtonProps>[];
25
+ export declare const SegmentedControl: import("@workday/canvas-kit-react/common").ComponentM<SegmentedControlProps & Partial<{
26
+ id: string;
27
+ initialValue: string;
28
+ disabled: boolean;
29
+ size: "medium" | "small" | "large";
30
+ orientation: import("../..").Orientation;
31
+ initialSelectedIds: import("../..").SelectedIds;
32
+ initialUnselectedIds: string[];
33
+ selection: import("../..").SelectionManager;
34
+ initialCursorId: string | string[];
35
+ columnCount: number;
36
+ navigation: import("../..").NavigationManager;
37
+ pageSize: number;
38
+ getId: (item: any) => string;
39
+ getTextValue: (item: any) => string;
40
+ nonInteractiveIds: string[];
41
+ defaultItemHeight: number;
42
+ shouldVirtualize: boolean;
43
+ items: any[];
44
+ UNSTABLE_parentModel: {
45
+ state: {
46
+ selectedIds: string[] | "all";
47
+ unselectedIds: string[];
48
+ cursorId: string | string[];
49
+ columnCount: number;
50
+ pageSizeRef: React.MutableRefObject<number>;
51
+ cursorIndexRef: {
52
+ readonly current: number;
53
+ };
54
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
55
+ UNSTABLE_defaultItemHeight: number;
56
+ containerRef: React.RefObject<HTMLDivElement>;
57
+ id: string;
58
+ orientation: "horizontal" | "vertical";
59
+ indexRef: React.MutableRefObject<number>;
60
+ nonInteractiveIds: string[];
61
+ isVirtualized: boolean;
62
+ items: import("../..").Item<any>[];
63
+ };
64
+ events: {
65
+ select(data: {
66
+ id: string;
67
+ }): void;
68
+ selectAll(): void;
69
+ unselectAll(): void;
70
+ setSelectedIds(ids: string[] | "all"): void;
71
+ remove(data: {
72
+ id: string;
73
+ nextId?: string | undefined;
74
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
75
+ }): void;
76
+ goTo(data: {
77
+ id: string;
78
+ }): void;
79
+ goToNext(): void;
80
+ goToPrevious(): void;
81
+ goToPreviousRow(): void;
82
+ goToNextRow(): void;
83
+ goToFirst(): void;
84
+ goToLast(): void;
85
+ goToFirstOfRow(): void;
86
+ goToLastOfRow(): void;
87
+ goToNextPage(): void;
88
+ goToPreviousPage(): void;
89
+ registerItem(data: {
90
+ id: string;
91
+ textValue: string;
92
+ }): void;
93
+ unregisterItem(data: {
94
+ id: string;
95
+ }): void;
96
+ updateItemHeight(data: {
97
+ value: number;
98
+ }): void;
99
+ };
100
+ selection: import("../..").SelectionManager;
101
+ navigation: import("../..").NavigationManager;
102
+ getId: (item: any) => string;
103
+ getTextValue: (item: any) => string;
104
+ } | undefined;
105
+ }> & {
106
+ onSelect?: ((data: {
107
+ id: string;
108
+ }, prevState: {
109
+ disabled: boolean;
110
+ size: "medium" | "small" | "large";
111
+ selectedIds: string[] | "all";
112
+ unselectedIds: string[];
113
+ cursorId: string | string[];
114
+ columnCount: number;
115
+ pageSizeRef: React.MutableRefObject<number>;
116
+ cursorIndexRef: {
117
+ readonly current: number;
118
+ };
119
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
120
+ UNSTABLE_defaultItemHeight: number;
121
+ containerRef: React.RefObject<HTMLDivElement>;
122
+ id: string;
123
+ orientation: "horizontal" | "vertical";
124
+ indexRef: React.MutableRefObject<number>;
125
+ nonInteractiveIds: string[];
126
+ isVirtualized: boolean;
127
+ items: import("../..").Item<any>[];
128
+ }) => void) | undefined;
129
+ onSelectAll?: ((data: undefined, prevState: {
130
+ disabled: boolean;
131
+ size: "medium" | "small" | "large";
132
+ selectedIds: string[] | "all";
133
+ unselectedIds: string[];
134
+ cursorId: string | string[];
135
+ columnCount: number;
136
+ pageSizeRef: React.MutableRefObject<number>;
137
+ cursorIndexRef: {
138
+ readonly current: number;
139
+ };
140
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
141
+ UNSTABLE_defaultItemHeight: number;
142
+ containerRef: React.RefObject<HTMLDivElement>;
143
+ id: string;
144
+ orientation: "horizontal" | "vertical";
145
+ indexRef: React.MutableRefObject<number>;
146
+ nonInteractiveIds: string[];
147
+ isVirtualized: boolean;
148
+ items: import("../..").Item<any>[];
149
+ }) => void) | undefined;
150
+ onUnselectAll?: ((data: undefined, prevState: {
151
+ disabled: boolean;
152
+ size: "medium" | "small" | "large";
153
+ selectedIds: string[] | "all";
154
+ unselectedIds: string[];
155
+ cursorId: string | string[];
156
+ columnCount: number;
157
+ pageSizeRef: React.MutableRefObject<number>;
158
+ cursorIndexRef: {
159
+ readonly current: number;
160
+ };
161
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
162
+ UNSTABLE_defaultItemHeight: number;
163
+ containerRef: React.RefObject<HTMLDivElement>;
164
+ id: string;
165
+ orientation: "horizontal" | "vertical";
166
+ indexRef: React.MutableRefObject<number>;
167
+ nonInteractiveIds: string[];
168
+ isVirtualized: boolean;
169
+ items: import("../..").Item<any>[];
170
+ }) => void) | undefined;
171
+ onSetSelectedIds?: ((data: string[] | "all", prevState: {
172
+ disabled: boolean;
173
+ size: "medium" | "small" | "large";
174
+ selectedIds: string[] | "all";
175
+ unselectedIds: string[];
176
+ cursorId: string | string[];
177
+ columnCount: number;
178
+ pageSizeRef: React.MutableRefObject<number>;
179
+ cursorIndexRef: {
180
+ readonly current: number;
181
+ };
182
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
183
+ UNSTABLE_defaultItemHeight: number;
184
+ containerRef: React.RefObject<HTMLDivElement>;
185
+ id: string;
186
+ orientation: "horizontal" | "vertical";
187
+ indexRef: React.MutableRefObject<number>;
188
+ nonInteractiveIds: string[];
189
+ isVirtualized: boolean;
190
+ items: import("../..").Item<any>[];
191
+ }) => void) | undefined;
192
+ onRemove?: ((data: {
193
+ id: string;
194
+ nextId?: string | undefined;
195
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
196
+ }, prevState: {
197
+ disabled: boolean;
198
+ size: "medium" | "small" | "large";
199
+ selectedIds: string[] | "all";
200
+ unselectedIds: string[];
201
+ cursorId: string | string[];
202
+ columnCount: number;
203
+ pageSizeRef: React.MutableRefObject<number>;
204
+ cursorIndexRef: {
205
+ readonly current: number;
206
+ };
207
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
208
+ UNSTABLE_defaultItemHeight: number;
209
+ containerRef: React.RefObject<HTMLDivElement>;
210
+ id: string;
211
+ orientation: "horizontal" | "vertical";
212
+ indexRef: React.MutableRefObject<number>;
213
+ nonInteractiveIds: string[];
214
+ isVirtualized: boolean;
215
+ items: import("../..").Item<any>[];
216
+ }) => void) | undefined;
217
+ onGoTo?: ((data: {
218
+ id: string;
219
+ }, prevState: {
220
+ disabled: boolean;
221
+ size: "medium" | "small" | "large";
222
+ selectedIds: string[] | "all";
223
+ unselectedIds: string[];
224
+ cursorId: string | string[];
225
+ columnCount: number;
226
+ pageSizeRef: React.MutableRefObject<number>;
227
+ cursorIndexRef: {
228
+ readonly current: number;
229
+ };
230
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
231
+ UNSTABLE_defaultItemHeight: number;
232
+ containerRef: React.RefObject<HTMLDivElement>;
233
+ id: string;
234
+ orientation: "horizontal" | "vertical";
235
+ indexRef: React.MutableRefObject<number>;
236
+ nonInteractiveIds: string[];
237
+ isVirtualized: boolean;
238
+ items: import("../..").Item<any>[];
239
+ }) => void) | undefined;
240
+ onGoToNext?: ((data: undefined, prevState: {
241
+ disabled: boolean;
242
+ size: "medium" | "small" | "large";
243
+ selectedIds: string[] | "all";
244
+ unselectedIds: string[];
245
+ cursorId: string | string[];
246
+ columnCount: number;
247
+ pageSizeRef: React.MutableRefObject<number>;
248
+ cursorIndexRef: {
249
+ readonly current: number;
250
+ };
251
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
252
+ UNSTABLE_defaultItemHeight: number;
253
+ containerRef: React.RefObject<HTMLDivElement>;
254
+ id: string;
255
+ orientation: "horizontal" | "vertical";
256
+ indexRef: React.MutableRefObject<number>;
257
+ nonInteractiveIds: string[];
258
+ isVirtualized: boolean;
259
+ items: import("../..").Item<any>[];
260
+ }) => void) | undefined;
261
+ onGoToPrevious?: ((data: undefined, prevState: {
262
+ disabled: boolean;
263
+ size: "medium" | "small" | "large";
264
+ selectedIds: string[] | "all";
265
+ unselectedIds: string[];
266
+ cursorId: string | string[];
267
+ columnCount: number;
268
+ pageSizeRef: React.MutableRefObject<number>;
269
+ cursorIndexRef: {
270
+ readonly current: number;
271
+ };
272
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
273
+ UNSTABLE_defaultItemHeight: number;
274
+ containerRef: React.RefObject<HTMLDivElement>;
275
+ id: string;
276
+ orientation: "horizontal" | "vertical";
277
+ indexRef: React.MutableRefObject<number>;
278
+ nonInteractiveIds: string[];
279
+ isVirtualized: boolean;
280
+ items: import("../..").Item<any>[];
281
+ }) => void) | undefined;
282
+ onGoToPreviousRow?: ((data: undefined, prevState: {
283
+ disabled: boolean;
284
+ size: "medium" | "small" | "large";
285
+ selectedIds: string[] | "all";
286
+ unselectedIds: string[];
287
+ cursorId: string | string[];
288
+ columnCount: number;
289
+ pageSizeRef: React.MutableRefObject<number>;
290
+ cursorIndexRef: {
291
+ readonly current: number;
292
+ };
293
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
294
+ UNSTABLE_defaultItemHeight: number;
295
+ containerRef: React.RefObject<HTMLDivElement>;
296
+ id: string;
297
+ orientation: "horizontal" | "vertical";
298
+ indexRef: React.MutableRefObject<number>;
299
+ nonInteractiveIds: string[];
300
+ isVirtualized: boolean;
301
+ items: import("../..").Item<any>[];
302
+ }) => void) | undefined;
303
+ onGoToNextRow?: ((data: undefined, prevState: {
304
+ disabled: boolean;
305
+ size: "medium" | "small" | "large";
306
+ selectedIds: string[] | "all";
307
+ unselectedIds: string[];
308
+ cursorId: string | string[];
309
+ columnCount: number;
310
+ pageSizeRef: React.MutableRefObject<number>;
311
+ cursorIndexRef: {
312
+ readonly current: number;
313
+ };
314
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
315
+ UNSTABLE_defaultItemHeight: number;
316
+ containerRef: React.RefObject<HTMLDivElement>;
317
+ id: string;
318
+ orientation: "horizontal" | "vertical";
319
+ indexRef: React.MutableRefObject<number>;
320
+ nonInteractiveIds: string[];
321
+ isVirtualized: boolean;
322
+ items: import("../..").Item<any>[];
323
+ }) => void) | undefined;
324
+ onGoToFirst?: ((data: undefined, prevState: {
325
+ disabled: boolean;
326
+ size: "medium" | "small" | "large";
327
+ selectedIds: string[] | "all";
328
+ unselectedIds: string[];
329
+ cursorId: string | string[];
330
+ columnCount: number;
331
+ pageSizeRef: React.MutableRefObject<number>;
332
+ cursorIndexRef: {
333
+ readonly current: number;
334
+ };
335
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
336
+ UNSTABLE_defaultItemHeight: number;
337
+ containerRef: React.RefObject<HTMLDivElement>;
338
+ id: string;
339
+ orientation: "horizontal" | "vertical";
340
+ indexRef: React.MutableRefObject<number>;
341
+ nonInteractiveIds: string[];
342
+ isVirtualized: boolean;
343
+ items: import("../..").Item<any>[];
344
+ }) => void) | undefined;
345
+ onGoToLast?: ((data: undefined, prevState: {
346
+ disabled: boolean;
347
+ size: "medium" | "small" | "large";
348
+ selectedIds: string[] | "all";
349
+ unselectedIds: string[];
350
+ cursorId: string | string[];
351
+ columnCount: number;
352
+ pageSizeRef: React.MutableRefObject<number>;
353
+ cursorIndexRef: {
354
+ readonly current: number;
355
+ };
356
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
357
+ UNSTABLE_defaultItemHeight: number;
358
+ containerRef: React.RefObject<HTMLDivElement>;
359
+ id: string;
360
+ orientation: "horizontal" | "vertical";
361
+ indexRef: React.MutableRefObject<number>;
362
+ nonInteractiveIds: string[];
363
+ isVirtualized: boolean;
364
+ items: import("../..").Item<any>[];
365
+ }) => void) | undefined;
366
+ onGoToFirstOfRow?: ((data: undefined, prevState: {
367
+ disabled: boolean;
368
+ size: "medium" | "small" | "large";
369
+ selectedIds: string[] | "all";
370
+ unselectedIds: string[];
371
+ cursorId: string | string[];
372
+ columnCount: number;
373
+ pageSizeRef: React.MutableRefObject<number>;
374
+ cursorIndexRef: {
375
+ readonly current: number;
376
+ };
377
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
378
+ UNSTABLE_defaultItemHeight: number;
379
+ containerRef: React.RefObject<HTMLDivElement>;
380
+ id: string;
381
+ orientation: "horizontal" | "vertical";
382
+ indexRef: React.MutableRefObject<number>;
383
+ nonInteractiveIds: string[];
384
+ isVirtualized: boolean;
385
+ items: import("../..").Item<any>[];
386
+ }) => void) | undefined;
387
+ onGoToLastOfRow?: ((data: undefined, prevState: {
388
+ disabled: boolean;
389
+ size: "medium" | "small" | "large";
390
+ selectedIds: string[] | "all";
391
+ unselectedIds: string[];
392
+ cursorId: string | string[];
393
+ columnCount: number;
394
+ pageSizeRef: React.MutableRefObject<number>;
395
+ cursorIndexRef: {
396
+ readonly current: number;
397
+ };
398
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
399
+ UNSTABLE_defaultItemHeight: number;
400
+ containerRef: React.RefObject<HTMLDivElement>;
401
+ id: string;
402
+ orientation: "horizontal" | "vertical";
403
+ indexRef: React.MutableRefObject<number>;
404
+ nonInteractiveIds: string[];
405
+ isVirtualized: boolean;
406
+ items: import("../..").Item<any>[];
407
+ }) => void) | undefined;
408
+ onGoToNextPage?: ((data: undefined, prevState: {
409
+ disabled: boolean;
410
+ size: "medium" | "small" | "large";
411
+ selectedIds: string[] | "all";
412
+ unselectedIds: string[];
413
+ cursorId: string | string[];
414
+ columnCount: number;
415
+ pageSizeRef: React.MutableRefObject<number>;
416
+ cursorIndexRef: {
417
+ readonly current: number;
418
+ };
419
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
420
+ UNSTABLE_defaultItemHeight: number;
421
+ containerRef: React.RefObject<HTMLDivElement>;
422
+ id: string;
423
+ orientation: "horizontal" | "vertical";
424
+ indexRef: React.MutableRefObject<number>;
425
+ nonInteractiveIds: string[];
426
+ isVirtualized: boolean;
427
+ items: import("../..").Item<any>[];
428
+ }) => void) | undefined;
429
+ onGoToPreviousPage?: ((data: undefined, prevState: {
430
+ disabled: boolean;
431
+ size: "medium" | "small" | "large";
432
+ selectedIds: string[] | "all";
433
+ unselectedIds: string[];
434
+ cursorId: string | string[];
435
+ columnCount: number;
436
+ pageSizeRef: React.MutableRefObject<number>;
437
+ cursorIndexRef: {
438
+ readonly current: number;
439
+ };
440
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
441
+ UNSTABLE_defaultItemHeight: number;
442
+ containerRef: React.RefObject<HTMLDivElement>;
443
+ id: string;
444
+ orientation: "horizontal" | "vertical";
445
+ indexRef: React.MutableRefObject<number>;
446
+ nonInteractiveIds: string[];
447
+ isVirtualized: boolean;
448
+ items: import("../..").Item<any>[];
449
+ }) => void) | undefined;
450
+ onRegisterItem?: ((data: {
451
+ id: string;
452
+ textValue: string;
453
+ }, prevState: {
454
+ disabled: boolean;
455
+ size: "medium" | "small" | "large";
456
+ selectedIds: string[] | "all";
457
+ unselectedIds: string[];
458
+ cursorId: string | string[];
459
+ columnCount: number;
460
+ pageSizeRef: React.MutableRefObject<number>;
461
+ cursorIndexRef: {
462
+ readonly current: number;
463
+ };
464
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
465
+ UNSTABLE_defaultItemHeight: number;
466
+ containerRef: React.RefObject<HTMLDivElement>;
467
+ id: string;
468
+ orientation: "horizontal" | "vertical";
469
+ indexRef: React.MutableRefObject<number>;
470
+ nonInteractiveIds: string[];
471
+ isVirtualized: boolean;
472
+ items: import("../..").Item<any>[];
473
+ }) => void) | undefined;
474
+ onUnregisterItem?: ((data: {
475
+ id: string;
476
+ }, prevState: {
477
+ disabled: boolean;
478
+ size: "medium" | "small" | "large";
479
+ selectedIds: string[] | "all";
480
+ unselectedIds: string[];
481
+ cursorId: string | string[];
482
+ columnCount: number;
483
+ pageSizeRef: React.MutableRefObject<number>;
484
+ cursorIndexRef: {
485
+ readonly current: number;
486
+ };
487
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
488
+ UNSTABLE_defaultItemHeight: number;
489
+ containerRef: React.RefObject<HTMLDivElement>;
490
+ id: string;
491
+ orientation: "horizontal" | "vertical";
492
+ indexRef: React.MutableRefObject<number>;
493
+ nonInteractiveIds: string[];
494
+ isVirtualized: boolean;
495
+ items: import("../..").Item<any>[];
496
+ }) => void) | undefined;
497
+ onUpdateItemHeight?: ((data: {
498
+ value: number;
499
+ }, prevState: {
500
+ disabled: boolean;
501
+ size: "medium" | "small" | "large";
502
+ selectedIds: string[] | "all";
503
+ unselectedIds: string[];
504
+ cursorId: string | string[];
505
+ columnCount: number;
506
+ pageSizeRef: React.MutableRefObject<number>;
507
+ cursorIndexRef: {
508
+ readonly current: number;
509
+ };
510
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
511
+ UNSTABLE_defaultItemHeight: number;
512
+ containerRef: React.RefObject<HTMLDivElement>;
513
+ id: string;
514
+ orientation: "horizontal" | "vertical";
515
+ indexRef: React.MutableRefObject<number>;
516
+ nonInteractiveIds: string[];
517
+ isVirtualized: boolean;
518
+ items: import("../..").Item<any>[];
519
+ }) => void) | undefined;
520
+ } & {
521
+ shouldSelect?: ((data: {
522
+ id: string;
523
+ }, state: {
524
+ disabled: boolean;
525
+ size: "medium" | "small" | "large";
526
+ selectedIds: string[] | "all";
527
+ unselectedIds: string[];
528
+ cursorId: string | string[];
529
+ columnCount: number;
530
+ pageSizeRef: React.MutableRefObject<number>;
531
+ cursorIndexRef: {
532
+ readonly current: number;
533
+ };
534
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
535
+ UNSTABLE_defaultItemHeight: number;
536
+ containerRef: React.RefObject<HTMLDivElement>;
537
+ id: string;
538
+ orientation: "horizontal" | "vertical";
539
+ indexRef: React.MutableRefObject<number>;
540
+ nonInteractiveIds: string[];
541
+ isVirtualized: boolean;
542
+ items: import("../..").Item<any>[];
543
+ }) => boolean) | undefined;
544
+ shouldSelectAll?: ((data: undefined, state: {
545
+ disabled: boolean;
546
+ size: "medium" | "small" | "large";
547
+ selectedIds: string[] | "all";
548
+ unselectedIds: string[];
549
+ cursorId: string | string[];
550
+ columnCount: number;
551
+ pageSizeRef: React.MutableRefObject<number>;
552
+ cursorIndexRef: {
553
+ readonly current: number;
554
+ };
555
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
556
+ UNSTABLE_defaultItemHeight: number;
557
+ containerRef: React.RefObject<HTMLDivElement>;
558
+ id: string;
559
+ orientation: "horizontal" | "vertical";
560
+ indexRef: React.MutableRefObject<number>;
561
+ nonInteractiveIds: string[];
562
+ isVirtualized: boolean;
563
+ items: import("../..").Item<any>[];
564
+ }) => boolean) | undefined;
565
+ shouldUnselectAll?: ((data: undefined, state: {
566
+ disabled: boolean;
567
+ size: "medium" | "small" | "large";
568
+ selectedIds: string[] | "all";
569
+ unselectedIds: string[];
570
+ cursorId: string | string[];
571
+ columnCount: number;
572
+ pageSizeRef: React.MutableRefObject<number>;
573
+ cursorIndexRef: {
574
+ readonly current: number;
575
+ };
576
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
577
+ UNSTABLE_defaultItemHeight: number;
578
+ containerRef: React.RefObject<HTMLDivElement>;
579
+ id: string;
580
+ orientation: "horizontal" | "vertical";
581
+ indexRef: React.MutableRefObject<number>;
582
+ nonInteractiveIds: string[];
583
+ isVirtualized: boolean;
584
+ items: import("../..").Item<any>[];
585
+ }) => boolean) | undefined;
586
+ shouldSetSelectedIds?: ((data: string[] | "all", state: {
587
+ disabled: boolean;
588
+ size: "medium" | "small" | "large";
589
+ selectedIds: string[] | "all";
590
+ unselectedIds: string[];
591
+ cursorId: string | string[];
592
+ columnCount: number;
593
+ pageSizeRef: React.MutableRefObject<number>;
594
+ cursorIndexRef: {
595
+ readonly current: number;
596
+ };
597
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
598
+ UNSTABLE_defaultItemHeight: number;
599
+ containerRef: React.RefObject<HTMLDivElement>;
600
+ id: string;
601
+ orientation: "horizontal" | "vertical";
602
+ indexRef: React.MutableRefObject<number>;
603
+ nonInteractiveIds: string[];
604
+ isVirtualized: boolean;
605
+ items: import("../..").Item<any>[];
606
+ }) => boolean) | undefined;
607
+ shouldRemove?: ((data: {
608
+ id: string;
609
+ nextId?: string | undefined;
610
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
611
+ }, state: {
612
+ disabled: boolean;
613
+ size: "medium" | "small" | "large";
614
+ selectedIds: string[] | "all";
615
+ unselectedIds: string[];
616
+ cursorId: string | string[];
617
+ columnCount: number;
618
+ pageSizeRef: React.MutableRefObject<number>;
619
+ cursorIndexRef: {
620
+ readonly current: number;
621
+ };
622
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
623
+ UNSTABLE_defaultItemHeight: number;
624
+ containerRef: React.RefObject<HTMLDivElement>;
625
+ id: string;
626
+ orientation: "horizontal" | "vertical";
627
+ indexRef: React.MutableRefObject<number>;
628
+ nonInteractiveIds: string[];
629
+ isVirtualized: boolean;
630
+ items: import("../..").Item<any>[];
631
+ }) => boolean) | undefined;
632
+ shouldGoTo?: ((data: {
633
+ id: string;
634
+ }, state: {
635
+ disabled: boolean;
636
+ size: "medium" | "small" | "large";
637
+ selectedIds: string[] | "all";
638
+ unselectedIds: string[];
639
+ cursorId: string | string[];
640
+ columnCount: number;
641
+ pageSizeRef: React.MutableRefObject<number>;
642
+ cursorIndexRef: {
643
+ readonly current: number;
644
+ };
645
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
646
+ UNSTABLE_defaultItemHeight: number;
647
+ containerRef: React.RefObject<HTMLDivElement>;
648
+ id: string;
649
+ orientation: "horizontal" | "vertical";
650
+ indexRef: React.MutableRefObject<number>;
651
+ nonInteractiveIds: string[];
652
+ isVirtualized: boolean;
653
+ items: import("../..").Item<any>[];
654
+ }) => boolean) | undefined;
655
+ shouldGoToNext?: ((data: undefined, state: {
656
+ disabled: boolean;
657
+ size: "medium" | "small" | "large";
658
+ selectedIds: string[] | "all";
659
+ unselectedIds: string[];
660
+ cursorId: string | string[];
661
+ columnCount: number;
662
+ pageSizeRef: React.MutableRefObject<number>;
663
+ cursorIndexRef: {
664
+ readonly current: number;
665
+ };
666
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
667
+ UNSTABLE_defaultItemHeight: number;
668
+ containerRef: React.RefObject<HTMLDivElement>;
669
+ id: string;
670
+ orientation: "horizontal" | "vertical";
671
+ indexRef: React.MutableRefObject<number>;
672
+ nonInteractiveIds: string[];
673
+ isVirtualized: boolean;
674
+ items: import("../..").Item<any>[];
675
+ }) => boolean) | undefined;
676
+ shouldGoToPrevious?: ((data: undefined, state: {
677
+ disabled: boolean;
678
+ size: "medium" | "small" | "large";
679
+ selectedIds: string[] | "all";
680
+ unselectedIds: string[];
681
+ cursorId: string | string[];
682
+ columnCount: number;
683
+ pageSizeRef: React.MutableRefObject<number>;
684
+ cursorIndexRef: {
685
+ readonly current: number;
686
+ };
687
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
688
+ UNSTABLE_defaultItemHeight: number;
689
+ containerRef: React.RefObject<HTMLDivElement>;
690
+ id: string;
691
+ orientation: "horizontal" | "vertical";
692
+ indexRef: React.MutableRefObject<number>;
693
+ nonInteractiveIds: string[];
694
+ isVirtualized: boolean;
695
+ items: import("../..").Item<any>[];
696
+ }) => boolean) | undefined;
697
+ shouldGoToPreviousRow?: ((data: undefined, state: {
698
+ disabled: boolean;
699
+ size: "medium" | "small" | "large";
700
+ selectedIds: string[] | "all";
701
+ unselectedIds: string[];
702
+ cursorId: string | string[];
703
+ columnCount: number;
704
+ pageSizeRef: React.MutableRefObject<number>;
705
+ cursorIndexRef: {
706
+ readonly current: number;
707
+ };
708
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
709
+ UNSTABLE_defaultItemHeight: number;
710
+ containerRef: React.RefObject<HTMLDivElement>;
711
+ id: string;
712
+ orientation: "horizontal" | "vertical";
713
+ indexRef: React.MutableRefObject<number>;
714
+ nonInteractiveIds: string[];
715
+ isVirtualized: boolean;
716
+ items: import("../..").Item<any>[];
717
+ }) => boolean) | undefined;
718
+ shouldGoToNextRow?: ((data: undefined, state: {
719
+ disabled: boolean;
720
+ size: "medium" | "small" | "large";
721
+ selectedIds: string[] | "all";
722
+ unselectedIds: string[];
723
+ cursorId: string | string[];
724
+ columnCount: number;
725
+ pageSizeRef: React.MutableRefObject<number>;
726
+ cursorIndexRef: {
727
+ readonly current: number;
728
+ };
729
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
730
+ UNSTABLE_defaultItemHeight: number;
731
+ containerRef: React.RefObject<HTMLDivElement>;
732
+ id: string;
733
+ orientation: "horizontal" | "vertical";
734
+ indexRef: React.MutableRefObject<number>;
735
+ nonInteractiveIds: string[];
736
+ isVirtualized: boolean;
737
+ items: import("../..").Item<any>[];
738
+ }) => boolean) | undefined;
739
+ shouldGoToFirst?: ((data: undefined, state: {
740
+ disabled: boolean;
741
+ size: "medium" | "small" | "large";
742
+ selectedIds: string[] | "all";
743
+ unselectedIds: string[];
744
+ cursorId: string | string[];
745
+ columnCount: number;
746
+ pageSizeRef: React.MutableRefObject<number>;
747
+ cursorIndexRef: {
748
+ readonly current: number;
749
+ };
750
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
751
+ UNSTABLE_defaultItemHeight: number;
752
+ containerRef: React.RefObject<HTMLDivElement>;
753
+ id: string;
754
+ orientation: "horizontal" | "vertical";
755
+ indexRef: React.MutableRefObject<number>;
756
+ nonInteractiveIds: string[];
757
+ isVirtualized: boolean;
758
+ items: import("../..").Item<any>[];
759
+ }) => boolean) | undefined;
760
+ shouldGoToLast?: ((data: undefined, state: {
761
+ disabled: boolean;
762
+ size: "medium" | "small" | "large";
763
+ selectedIds: string[] | "all";
764
+ unselectedIds: string[];
765
+ cursorId: string | string[];
766
+ columnCount: number;
767
+ pageSizeRef: React.MutableRefObject<number>;
768
+ cursorIndexRef: {
769
+ readonly current: number;
770
+ };
771
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
772
+ UNSTABLE_defaultItemHeight: number;
773
+ containerRef: React.RefObject<HTMLDivElement>;
774
+ id: string;
775
+ orientation: "horizontal" | "vertical";
776
+ indexRef: React.MutableRefObject<number>;
777
+ nonInteractiveIds: string[];
778
+ isVirtualized: boolean;
779
+ items: import("../..").Item<any>[];
780
+ }) => boolean) | undefined;
781
+ shouldGoToFirstOfRow?: ((data: undefined, state: {
782
+ disabled: boolean;
783
+ size: "medium" | "small" | "large";
784
+ selectedIds: string[] | "all";
785
+ unselectedIds: string[];
786
+ cursorId: string | string[];
787
+ columnCount: number;
788
+ pageSizeRef: React.MutableRefObject<number>;
789
+ cursorIndexRef: {
790
+ readonly current: number;
791
+ };
792
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
793
+ UNSTABLE_defaultItemHeight: number;
794
+ containerRef: React.RefObject<HTMLDivElement>;
795
+ id: string;
796
+ orientation: "horizontal" | "vertical";
797
+ indexRef: React.MutableRefObject<number>;
798
+ nonInteractiveIds: string[];
799
+ isVirtualized: boolean;
800
+ items: import("../..").Item<any>[];
801
+ }) => boolean) | undefined;
802
+ shouldGoToLastOfRow?: ((data: undefined, state: {
803
+ disabled: boolean;
804
+ size: "medium" | "small" | "large";
805
+ selectedIds: string[] | "all";
806
+ unselectedIds: string[];
807
+ cursorId: string | string[];
808
+ columnCount: number;
809
+ pageSizeRef: React.MutableRefObject<number>;
810
+ cursorIndexRef: {
811
+ readonly current: number;
812
+ };
813
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
814
+ UNSTABLE_defaultItemHeight: number;
815
+ containerRef: React.RefObject<HTMLDivElement>;
816
+ id: string;
817
+ orientation: "horizontal" | "vertical";
818
+ indexRef: React.MutableRefObject<number>;
819
+ nonInteractiveIds: string[];
820
+ isVirtualized: boolean;
821
+ items: import("../..").Item<any>[];
822
+ }) => boolean) | undefined;
823
+ shouldGoToNextPage?: ((data: undefined, state: {
824
+ disabled: boolean;
825
+ size: "medium" | "small" | "large";
826
+ selectedIds: string[] | "all";
827
+ unselectedIds: string[];
828
+ cursorId: string | string[];
829
+ columnCount: number;
830
+ pageSizeRef: React.MutableRefObject<number>;
831
+ cursorIndexRef: {
832
+ readonly current: number;
833
+ };
834
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
835
+ UNSTABLE_defaultItemHeight: number;
836
+ containerRef: React.RefObject<HTMLDivElement>;
837
+ id: string;
838
+ orientation: "horizontal" | "vertical";
839
+ indexRef: React.MutableRefObject<number>;
840
+ nonInteractiveIds: string[];
841
+ isVirtualized: boolean;
842
+ items: import("../..").Item<any>[];
843
+ }) => boolean) | undefined;
844
+ shouldGoToPreviousPage?: ((data: undefined, state: {
845
+ disabled: boolean;
846
+ size: "medium" | "small" | "large";
847
+ selectedIds: string[] | "all";
848
+ unselectedIds: string[];
849
+ cursorId: string | string[];
850
+ columnCount: number;
851
+ pageSizeRef: React.MutableRefObject<number>;
852
+ cursorIndexRef: {
853
+ readonly current: number;
854
+ };
855
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
856
+ UNSTABLE_defaultItemHeight: number;
857
+ containerRef: React.RefObject<HTMLDivElement>;
858
+ id: string;
859
+ orientation: "horizontal" | "vertical";
860
+ indexRef: React.MutableRefObject<number>;
861
+ nonInteractiveIds: string[];
862
+ isVirtualized: boolean;
863
+ items: import("../..").Item<any>[];
864
+ }) => boolean) | undefined;
865
+ shouldRegisterItem?: ((data: {
866
+ id: string;
867
+ textValue: string;
868
+ }, state: {
869
+ disabled: boolean;
870
+ size: "medium" | "small" | "large";
871
+ selectedIds: string[] | "all";
872
+ unselectedIds: string[];
873
+ cursorId: string | string[];
874
+ columnCount: number;
875
+ pageSizeRef: React.MutableRefObject<number>;
876
+ cursorIndexRef: {
877
+ readonly current: number;
878
+ };
879
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
880
+ UNSTABLE_defaultItemHeight: number;
881
+ containerRef: React.RefObject<HTMLDivElement>;
882
+ id: string;
883
+ orientation: "horizontal" | "vertical";
884
+ indexRef: React.MutableRefObject<number>;
885
+ nonInteractiveIds: string[];
886
+ isVirtualized: boolean;
887
+ items: import("../..").Item<any>[];
888
+ }) => boolean) | undefined;
889
+ shouldUnregisterItem?: ((data: {
890
+ id: string;
891
+ }, state: {
892
+ disabled: boolean;
893
+ size: "medium" | "small" | "large";
894
+ selectedIds: string[] | "all";
895
+ unselectedIds: string[];
896
+ cursorId: string | string[];
897
+ columnCount: number;
898
+ pageSizeRef: React.MutableRefObject<number>;
899
+ cursorIndexRef: {
900
+ readonly current: number;
901
+ };
902
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
903
+ UNSTABLE_defaultItemHeight: number;
904
+ containerRef: React.RefObject<HTMLDivElement>;
905
+ id: string;
906
+ orientation: "horizontal" | "vertical";
907
+ indexRef: React.MutableRefObject<number>;
908
+ nonInteractiveIds: string[];
909
+ isVirtualized: boolean;
910
+ items: import("../..").Item<any>[];
911
+ }) => boolean) | undefined;
912
+ shouldUpdateItemHeight?: ((data: {
913
+ value: number;
914
+ }, state: {
915
+ disabled: boolean;
916
+ size: "medium" | "small" | "large";
917
+ selectedIds: string[] | "all";
918
+ unselectedIds: string[];
919
+ cursorId: string | string[];
920
+ columnCount: number;
921
+ pageSizeRef: React.MutableRefObject<number>;
922
+ cursorIndexRef: {
923
+ readonly current: number;
924
+ };
925
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
926
+ UNSTABLE_defaultItemHeight: number;
927
+ containerRef: React.RefObject<HTMLDivElement>;
928
+ id: string;
929
+ orientation: "horizontal" | "vertical";
930
+ indexRef: React.MutableRefObject<number>;
931
+ nonInteractiveIds: string[];
932
+ isVirtualized: boolean;
933
+ items: import("../..").Item<any>[];
934
+ }) => boolean) | undefined;
935
+ }, {
936
+ state: {
937
+ disabled: boolean;
938
+ size: "medium" | "small" | "large";
939
+ selectedIds: string[] | "all";
940
+ unselectedIds: string[];
941
+ cursorId: string | string[];
942
+ columnCount: number;
943
+ pageSizeRef: React.MutableRefObject<number>;
944
+ cursorIndexRef: {
945
+ readonly current: number;
946
+ };
947
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
948
+ UNSTABLE_defaultItemHeight: number;
949
+ containerRef: React.RefObject<HTMLDivElement>;
950
+ id: string;
951
+ orientation: "horizontal" | "vertical";
952
+ indexRef: React.MutableRefObject<number>;
953
+ nonInteractiveIds: string[];
954
+ isVirtualized: boolean;
955
+ items: import("../..").Item<any>[];
956
+ };
957
+ events: {
958
+ select(data: {
959
+ id: string;
960
+ }): void;
961
+ selectAll(): void;
962
+ unselectAll(): void;
963
+ setSelectedIds(ids: string[] | "all"): void;
964
+ remove(data: {
965
+ id: string;
966
+ nextId?: string | undefined;
967
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
968
+ }): void;
969
+ goTo(data: {
970
+ id: string;
971
+ }): void;
972
+ goToNext(): void;
973
+ goToPrevious(): void;
974
+ goToPreviousRow(): void;
975
+ goToNextRow(): void;
976
+ goToFirst(): void;
977
+ goToLast(): void;
978
+ goToFirstOfRow(): void;
979
+ goToLastOfRow(): void;
980
+ goToNextPage(): void;
981
+ goToPreviousPage(): void;
982
+ registerItem(data: {
983
+ id: string;
984
+ textValue: string;
985
+ }): void;
986
+ unregisterItem(data: {
987
+ id: string;
988
+ }): void;
989
+ updateItemHeight(data: {
990
+ value: number;
991
+ }): void;
992
+ };
993
+ selection: import("../..").SelectionManager;
994
+ navigation: import("../..").NavigationManager;
995
+ getId: (item: any) => string;
996
+ getTextValue: (item: any) => string;
997
+ UNSTABLE_parentModel: {
998
+ state: {
999
+ selectedIds: string[] | "all";
1000
+ unselectedIds: string[];
1001
+ cursorId: string | string[];
1002
+ columnCount: number;
1003
+ pageSizeRef: React.MutableRefObject<number>;
1004
+ cursorIndexRef: {
1005
+ readonly current: number;
1006
+ };
1007
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
1008
+ UNSTABLE_defaultItemHeight: number;
1009
+ containerRef: React.RefObject<HTMLDivElement>;
1010
+ id: string;
1011
+ orientation: "horizontal" | "vertical";
1012
+ indexRef: React.MutableRefObject<number>;
1013
+ nonInteractiveIds: string[];
1014
+ isVirtualized: boolean;
1015
+ items: import("../..").Item<any>[];
1016
+ };
1017
+ events: {
1018
+ select(data: {
1019
+ id: string;
1020
+ }): void;
1021
+ selectAll(): void;
1022
+ unselectAll(): void;
1023
+ setSelectedIds(ids: string[] | "all"): void;
1024
+ remove(data: {
1025
+ id: string;
1026
+ nextId?: string | undefined;
1027
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
1028
+ }): void;
1029
+ goTo(data: {
1030
+ id: string;
1031
+ }): void;
1032
+ goToNext(): void;
1033
+ goToPrevious(): void;
1034
+ goToPreviousRow(): void;
1035
+ goToNextRow(): void;
1036
+ goToFirst(): void;
1037
+ goToLast(): void;
1038
+ goToFirstOfRow(): void;
1039
+ goToLastOfRow(): void;
1040
+ goToNextPage(): void;
1041
+ goToPreviousPage(): void;
1042
+ registerItem(data: {
1043
+ id: string;
1044
+ textValue: string;
1045
+ }): void;
1046
+ unregisterItem(data: {
1047
+ id: string;
1048
+ }): void;
1049
+ updateItemHeight(data: {
1050
+ value: number;
1051
+ }): void;
1052
+ };
1053
+ selection: import("../..").SelectionManager;
1054
+ navigation: import("../..").NavigationManager;
1055
+ getId: (item: any) => string;
1056
+ getTextValue: (item: any) => string;
1057
+ } | undefined;
1058
+ }> & {
12
1059
  /**
13
- * The value or index of the Button that the SegmentedControl should be toggled on to.
14
- * If a string is provided, the Button with the corresponding value will be selected.
15
- * If a number is provided, the Button with the corresponding index will be selected.
16
- * @default 0
1060
+ * `SegmentedControl.List` renders {@link Grid} under the hood. It is a container for
1061
+ * {@link SegmentedControlItem SegmentedControl.Item} subcomponents.
1062
+ *
1063
+ * ```tsx
1064
+ * <SegmentedControl.List>{SegmentedControl.Items}</SegmentedControl.List>
1065
+ * ```
17
1066
  */
18
- value?: string | number;
1067
+ List: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./SegmentedControlList").SegmentedControlListProps<any>, {
1068
+ state: {
1069
+ disabled: boolean;
1070
+ size: "medium" | "small" | "large";
1071
+ selectedIds: string[] | "all";
1072
+ unselectedIds: string[];
1073
+ cursorId: string | string[];
1074
+ columnCount: number;
1075
+ pageSizeRef: React.MutableRefObject<number>;
1076
+ cursorIndexRef: {
1077
+ readonly current: number;
1078
+ };
1079
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
1080
+ UNSTABLE_defaultItemHeight: number;
1081
+ containerRef: React.RefObject<HTMLDivElement>;
1082
+ id: string;
1083
+ orientation: "horizontal" | "vertical";
1084
+ indexRef: React.MutableRefObject<number>;
1085
+ nonInteractiveIds: string[];
1086
+ isVirtualized: boolean;
1087
+ items: import("../..").Item<any>[];
1088
+ };
1089
+ events: {
1090
+ select(data: {
1091
+ id: string;
1092
+ }): void;
1093
+ selectAll(): void;
1094
+ unselectAll(): void;
1095
+ setSelectedIds(ids: string[] | "all"): void;
1096
+ remove(data: {
1097
+ id: string;
1098
+ nextId?: string | undefined;
1099
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
1100
+ }): void;
1101
+ goTo(data: {
1102
+ id: string;
1103
+ }): void;
1104
+ goToNext(): void;
1105
+ goToPrevious(): void;
1106
+ goToPreviousRow(): void;
1107
+ goToNextRow(): void;
1108
+ goToFirst(): void;
1109
+ goToLast(): void;
1110
+ goToFirstOfRow(): void;
1111
+ goToLastOfRow(): void;
1112
+ goToNextPage(): void;
1113
+ goToPreviousPage(): void;
1114
+ registerItem(data: {
1115
+ id: string;
1116
+ textValue: string;
1117
+ }): void;
1118
+ unregisterItem(data: {
1119
+ id: string;
1120
+ }): void;
1121
+ updateItemHeight(data: {
1122
+ value: number;
1123
+ }): void;
1124
+ };
1125
+ selection: import("../..").SelectionManager;
1126
+ navigation: import("../..").NavigationManager;
1127
+ getId: (item: any) => string;
1128
+ getTextValue: (item: any) => string;
1129
+ UNSTABLE_parentModel: {
1130
+ state: {
1131
+ selectedIds: string[] | "all";
1132
+ unselectedIds: string[];
1133
+ cursorId: string | string[];
1134
+ columnCount: number;
1135
+ pageSizeRef: React.MutableRefObject<number>;
1136
+ cursorIndexRef: {
1137
+ readonly current: number;
1138
+ };
1139
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
1140
+ UNSTABLE_defaultItemHeight: number;
1141
+ containerRef: React.RefObject<HTMLDivElement>;
1142
+ id: string;
1143
+ orientation: "horizontal" | "vertical";
1144
+ indexRef: React.MutableRefObject<number>;
1145
+ nonInteractiveIds: string[];
1146
+ isVirtualized: boolean;
1147
+ items: import("../..").Item<any>[];
1148
+ };
1149
+ events: {
1150
+ select(data: {
1151
+ id: string;
1152
+ }): void;
1153
+ selectAll(): void;
1154
+ unselectAll(): void;
1155
+ setSelectedIds(ids: string[] | "all"): void;
1156
+ remove(data: {
1157
+ id: string;
1158
+ nextId?: string | undefined;
1159
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
1160
+ }): void;
1161
+ goTo(data: {
1162
+ id: string;
1163
+ }): void;
1164
+ goToNext(): void;
1165
+ goToPrevious(): void;
1166
+ goToPreviousRow(): void;
1167
+ goToNextRow(): void;
1168
+ goToFirst(): void;
1169
+ goToLast(): void;
1170
+ goToFirstOfRow(): void;
1171
+ goToLastOfRow(): void;
1172
+ goToNextPage(): void;
1173
+ goToPreviousPage(): void;
1174
+ registerItem(data: {
1175
+ id: string;
1176
+ textValue: string;
1177
+ }): void;
1178
+ unregisterItem(data: {
1179
+ id: string;
1180
+ }): void;
1181
+ updateItemHeight(data: {
1182
+ value: number;
1183
+ }): void;
1184
+ };
1185
+ selection: import("../..").SelectionManager;
1186
+ navigation: import("../..").NavigationManager;
1187
+ getId: (item: any) => string;
1188
+ getTextValue: (item: any) => string;
1189
+ } | undefined;
1190
+ }>;
19
1191
  /**
20
- * The function called when a button in the SegmentedControl is toggled.
21
- * If the selected button has a value, that value will be passed to the callback function;
22
- * otherwise, the index of the button will be passed.
1192
+ * `SegmentedControl.Item` is a `button` element built on `BaseButton`. `SegmentedControl.Item`
1193
+ * has a `data-id` prop to handle `onSelect` properly.
1194
+ *
1195
+ * ```tsx
1196
+ * <SegmentedControl.Item data-id="table">Table</SegmentedControl.Item>
1197
+ * ```
23
1198
  */
24
- onChange?: (value: string | number) => void;
25
- }
26
- /**
27
- * @deprecated ⚠️ `SegmentedControl` in Main has been deprecated and will be removed in a future major version. Please use [`SegmentedControl` in Preview](https://workday.github.io/canvas-kit/?path=/docs/preview-segmented-control--docs) instead.
28
- */
29
- export declare const SegmentedControl: import("@workday/canvas-kit-react/common").ElementComponent<"div", SegmentedControlProps> & {
30
- Button: import("@workday/canvas-kit-react/common").ElementComponent<"button", SegmentedControlButtonProps>;
1199
+ Item: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./SegmentedControlItem").ItemProps, {
1200
+ state: {
1201
+ disabled: boolean;
1202
+ size: "medium" | "small" | "large";
1203
+ selectedIds: string[] | "all";
1204
+ unselectedIds: string[];
1205
+ cursorId: string | string[];
1206
+ columnCount: number;
1207
+ pageSizeRef: React.MutableRefObject<number>;
1208
+ cursorIndexRef: {
1209
+ readonly current: number;
1210
+ };
1211
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
1212
+ UNSTABLE_defaultItemHeight: number;
1213
+ containerRef: React.RefObject<HTMLDivElement>;
1214
+ id: string;
1215
+ orientation: "horizontal" | "vertical";
1216
+ indexRef: React.MutableRefObject<number>;
1217
+ nonInteractiveIds: string[];
1218
+ isVirtualized: boolean;
1219
+ items: import("../..").Item<any>[];
1220
+ };
1221
+ events: {
1222
+ select(data: {
1223
+ id: string;
1224
+ }): void;
1225
+ selectAll(): void;
1226
+ unselectAll(): void;
1227
+ setSelectedIds(ids: string[] | "all"): void;
1228
+ remove(data: {
1229
+ id: string;
1230
+ nextId?: string | undefined;
1231
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
1232
+ }): void;
1233
+ goTo(data: {
1234
+ id: string;
1235
+ }): void;
1236
+ goToNext(): void;
1237
+ goToPrevious(): void;
1238
+ goToPreviousRow(): void;
1239
+ goToNextRow(): void;
1240
+ goToFirst(): void;
1241
+ goToLast(): void;
1242
+ goToFirstOfRow(): void;
1243
+ goToLastOfRow(): void;
1244
+ goToNextPage(): void;
1245
+ goToPreviousPage(): void;
1246
+ registerItem(data: {
1247
+ id: string;
1248
+ textValue: string;
1249
+ }): void;
1250
+ unregisterItem(data: {
1251
+ id: string;
1252
+ }): void;
1253
+ updateItemHeight(data: {
1254
+ value: number;
1255
+ }): void;
1256
+ };
1257
+ selection: import("../..").SelectionManager;
1258
+ navigation: import("../..").NavigationManager;
1259
+ getId: (item: any) => string;
1260
+ getTextValue: (item: any) => string;
1261
+ UNSTABLE_parentModel: {
1262
+ state: {
1263
+ selectedIds: string[] | "all";
1264
+ unselectedIds: string[];
1265
+ cursorId: string | string[];
1266
+ columnCount: number;
1267
+ pageSizeRef: React.MutableRefObject<number>;
1268
+ cursorIndexRef: {
1269
+ readonly current: number;
1270
+ };
1271
+ UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
1272
+ UNSTABLE_defaultItemHeight: number;
1273
+ containerRef: React.RefObject<HTMLDivElement>;
1274
+ id: string;
1275
+ orientation: "horizontal" | "vertical";
1276
+ indexRef: React.MutableRefObject<number>;
1277
+ nonInteractiveIds: string[];
1278
+ isVirtualized: boolean;
1279
+ items: import("../..").Item<any>[];
1280
+ };
1281
+ events: {
1282
+ select(data: {
1283
+ id: string;
1284
+ }): void;
1285
+ selectAll(): void;
1286
+ unselectAll(): void;
1287
+ setSelectedIds(ids: string[] | "all"): void;
1288
+ remove(data: {
1289
+ id: string;
1290
+ nextId?: string | undefined;
1291
+ event?: Event | React.SyntheticEvent<Element, Event> | undefined;
1292
+ }): void;
1293
+ goTo(data: {
1294
+ id: string;
1295
+ }): void;
1296
+ goToNext(): void;
1297
+ goToPrevious(): void;
1298
+ goToPreviousRow(): void;
1299
+ goToNextRow(): void;
1300
+ goToFirst(): void;
1301
+ goToLast(): void;
1302
+ goToFirstOfRow(): void;
1303
+ goToLastOfRow(): void;
1304
+ goToNextPage(): void;
1305
+ goToPreviousPage(): void;
1306
+ registerItem(data: {
1307
+ id: string;
1308
+ textValue: string;
1309
+ }): void;
1310
+ unregisterItem(data: {
1311
+ id: string;
1312
+ }): void;
1313
+ updateItemHeight(data: {
1314
+ value: number;
1315
+ }): void;
1316
+ };
1317
+ selection: import("../..").SelectionManager;
1318
+ navigation: import("../..").NavigationManager;
1319
+ getId: (item: any) => string;
1320
+ getTextValue: (item: any) => string;
1321
+ } | undefined;
1322
+ }>;
31
1323
  };
32
1324
  //# sourceMappingURL=SegmentedControl.d.ts.map