@procore/core-react 12.37.0 → 12.39.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 (327) hide show
  1. package/.jest/testShims.js +6 -0
  2. package/CHANGELOG.md +64 -0
  3. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  4. package/dist/Avatar/Avatar.styles.js +6 -6
  5. package/dist/Avatar/Avatar.styles.js.map +1 -1
  6. package/dist/AvatarStack/AvatarStack.js +65 -25
  7. package/dist/AvatarStack/AvatarStack.js.map +1 -1
  8. package/dist/AvatarStack/AvatarStack.styles.js +8 -8
  9. package/dist/AvatarStack/AvatarStack.styles.js.map +1 -1
  10. package/dist/AvatarStack/useAvatarPopover.d.ts +14 -0
  11. package/dist/AvatarStack/useAvatarPopover.js +57 -0
  12. package/dist/AvatarStack/useAvatarPopover.js.map +1 -0
  13. package/dist/AvatarStack/useAvatarPopover.types.d.ts +4 -0
  14. package/dist/AvatarStack/useAvatarPopover.types.js +2 -0
  15. package/dist/AvatarStack/useAvatarPopover.types.js.map +1 -0
  16. package/dist/Badge/Badge.styles.js +2 -2
  17. package/dist/BadgePill/BadgePill.styles.js +4 -4
  18. package/dist/Banner/Banner.d.ts +2 -1
  19. package/dist/Banner/Banner.js +53 -34
  20. package/dist/Banner/Banner.js.map +1 -1
  21. package/dist/Banner/Banner.styles.js +10 -10
  22. package/dist/Banner/Banner.types.d.ts +6 -0
  23. package/dist/Banner/Banner.types.js.map +1 -1
  24. package/dist/Banner/index.d.ts +1 -1
  25. package/dist/Banner/index.js.map +1 -1
  26. package/dist/Box/Box.styles.js +1 -1
  27. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  28. package/dist/Button/Button.styles.js +5 -5
  29. package/dist/Calendar/Calendar.styles.js +9 -9
  30. package/dist/Card/Card.styles.js +1 -1
  31. package/dist/Checkbox/Checkbox.d.ts +0 -1
  32. package/dist/Checkbox/Checkbox.js +5 -6
  33. package/dist/Checkbox/Checkbox.js.map +1 -1
  34. package/dist/Checkbox/Checkbox.styles.js +6 -6
  35. package/dist/ContactItem/ContactItem.styles.js +5 -5
  36. package/dist/Content/Content.styles.js +2 -2
  37. package/dist/DateInput/DateInput.js +12 -2
  38. package/dist/DateInput/DateInput.js.map +1 -1
  39. package/dist/DateInput/DateInput.styles.js +6 -6
  40. package/dist/DateSelect/DateSelect.types.d.ts +1 -1
  41. package/dist/DateSelect/DateSelect.types.js.map +1 -1
  42. package/dist/DetailPage/DetailPage.styles.js +7 -7
  43. package/dist/Dropdown/Dropdown.styles.js +3 -3
  44. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  45. package/dist/Dropzone/Dropzone.js +1 -1
  46. package/dist/Dropzone/Dropzone.styles.js +9 -9
  47. package/dist/EmptyState/EmptyState.styles.js +6 -6
  48. package/dist/Field/Field.styles.js +3 -3
  49. package/dist/FileList/FileList.js +3 -7
  50. package/dist/FileList/FileList.js.map +1 -1
  51. package/dist/FileList/FileList.styles.d.ts +0 -1
  52. package/dist/FileList/FileList.styles.js +3 -7
  53. package/dist/FileList/FileList.styles.js.map +1 -1
  54. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  55. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js +3 -1
  56. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.js.map +1 -1
  57. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  58. package/dist/FileSelect/FileSelect.styles.js +2 -2
  59. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  60. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  61. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  62. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  63. package/dist/FileSelect/SourceItem/SourceItem.js +10 -5
  64. package/dist/FileSelect/SourceItem/SourceItem.js.map +1 -1
  65. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  66. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  67. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  68. package/dist/FileToken/FileToken.styles.js +4 -4
  69. package/dist/FilterToken/FilterToken.styles.js +5 -5
  70. package/dist/FlexList/FlexList.styles.js +1 -1
  71. package/dist/Form/Form.js +74 -58
  72. package/dist/Form/Form.js.map +1 -1
  73. package/dist/Form/Form.styles.d.ts +0 -14
  74. package/dist/Form/Form.styles.js +14 -24
  75. package/dist/Form/Form.styles.js.map +1 -1
  76. package/dist/Form/Form.types.d.ts +22 -2
  77. package/dist/Form/Form.types.js.map +1 -1
  78. package/dist/Form/FormFieldTooltip.js +4 -11
  79. package/dist/Form/FormFieldTooltip.js.map +1 -1
  80. package/dist/Form/StyledFormikForm.styles.js +2 -2
  81. package/dist/Form/stories/util.js +1 -12
  82. package/dist/Form/stories/util.js.map +1 -1
  83. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  84. package/dist/Grid/Grid.styles.js +2 -2
  85. package/dist/GroupSelect/GroupSelect.js +5 -4
  86. package/dist/GroupSelect/GroupSelect.js.map +1 -1
  87. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  88. package/dist/GroupSelect/GroupSelect.types.d.ts +5 -5
  89. package/dist/GroupSelect/GroupSelect.types.js.map +1 -1
  90. package/dist/Input/Input.styles.js +1 -1
  91. package/dist/Link/Link.styles.js +1 -1
  92. package/dist/ListPage/ListPage.styles.js +8 -8
  93. package/dist/Loader/Loader.styles.js +2 -2
  94. package/dist/Menu/Menu.js +1 -5
  95. package/dist/Menu/Menu.js.map +1 -1
  96. package/dist/MenuImperative/MenuImperative.js +7 -10
  97. package/dist/MenuImperative/MenuImperative.js.map +1 -1
  98. package/dist/MenuImperative/MenuImperative.styles.d.ts +2 -3
  99. package/dist/MenuImperative/MenuImperative.styles.js +26 -25
  100. package/dist/MenuImperative/MenuImperative.styles.js.map +1 -1
  101. package/dist/MenuImperative/MenuImperative.types.d.ts +4 -0
  102. package/dist/MenuImperative/MenuImperative.types.js.map +1 -1
  103. package/dist/MenuImperative/sensors.js +16 -58
  104. package/dist/MenuImperative/sensors.js.map +1 -1
  105. package/dist/Modal/Modal.styles.js +13 -13
  106. package/dist/MultiSelect/MultiSelect.js +50 -28
  107. package/dist/MultiSelect/MultiSelect.js.map +1 -1
  108. package/dist/MultiSelect/MultiSelect.styles.d.ts +1 -0
  109. package/dist/MultiSelect/MultiSelect.styles.js +12 -8
  110. package/dist/MultiSelect/MultiSelect.styles.js.map +1 -1
  111. package/dist/MultiSelect/MultiSelect.types.d.ts +31 -1
  112. package/dist/MultiSelect/MultiSelect.types.js.map +1 -1
  113. package/dist/NextMenu/NextMenu.styles.js +3 -3
  114. package/dist/Notation/Notation.js +1 -1
  115. package/dist/NumberInput/NumberInput.styles.js +7 -7
  116. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  117. package/dist/OverlayTrigger/OverlayTrigger.js +4 -2
  118. package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
  119. package/dist/OverlayTrigger/OverlayTrigger.types.d.ts +8 -0
  120. package/dist/OverlayTrigger/OverlayTrigger.types.js.map +1 -1
  121. package/dist/OverlayTrigger/a11yPresets.js +5 -3
  122. package/dist/OverlayTrigger/a11yPresets.js.map +1 -1
  123. package/dist/PageLayout/PageLayout.js +31 -12
  124. package/dist/PageLayout/PageLayout.js.map +1 -1
  125. package/dist/PageLayout/PageLayout.styles.d.ts +1 -0
  126. package/dist/PageLayout/PageLayout.styles.js +17 -17
  127. package/dist/PageLayout/PageLayout.styles.js.map +1 -1
  128. package/dist/PageLayout/PageLayout.types.d.ts +10 -0
  129. package/dist/PageLayout/PageLayout.types.js.map +1 -1
  130. package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
  131. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
  132. package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
  133. package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
  134. package/dist/Pagination/Pagination.styles.js +5 -5
  135. package/dist/Panel/Panel.styles.js +11 -11
  136. package/dist/Pill/Pill.styles.js +3 -3
  137. package/dist/PillSelect/PillSelect.js +4 -3
  138. package/dist/PillSelect/PillSelect.js.map +1 -1
  139. package/dist/PillSelect/PillSelect.styles.js +4 -4
  140. package/dist/Popover/Popover.js +2 -1
  141. package/dist/Popover/Popover.js.map +1 -1
  142. package/dist/Popover/Popover.styles.js +2 -2
  143. package/dist/Portal/Portal.styles.js +1 -1
  144. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  145. package/dist/RadioButton/RadioButton.styles.js +3 -3
  146. package/dist/Required/Required.styles.js +3 -3
  147. package/dist/Search/Search.styles.js +5 -5
  148. package/dist/Section/Section.styles.js +9 -9
  149. package/dist/Section/Section.styles.js.map +1 -1
  150. package/dist/SegmentedController/SegmentedController.js +1 -2
  151. package/dist/SegmentedController/SegmentedController.js.map +1 -1
  152. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  153. package/dist/Select/Select.d.ts +3 -4
  154. package/dist/Select/Select.js +37 -15
  155. package/dist/Select/Select.js.map +1 -1
  156. package/dist/Select/Select.styles.js +9 -9
  157. package/dist/Select/Select.styles.js.map +1 -1
  158. package/dist/Select/Select.types.d.ts +20 -0
  159. package/dist/Select/Select.types.js.map +1 -1
  160. package/dist/Select/index.d.ts +1 -1
  161. package/dist/Select/index.js.map +1 -1
  162. package/dist/Semantic/Semantic.styles.js +9 -9
  163. package/dist/Slider/Slider.styles.js +5 -5
  164. package/dist/Spinner/Spinner.js +21 -6
  165. package/dist/Spinner/Spinner.js.map +1 -1
  166. package/dist/Spinner/Spinner.styles.js +7 -7
  167. package/dist/SplitViewCard/SplitViewCard.js +13 -0
  168. package/dist/SplitViewCard/SplitViewCard.js.map +1 -1
  169. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  170. package/dist/SuperSelect/SuperSelect.components.js +6 -15
  171. package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
  172. package/dist/SuperSelect/SuperSelect.js +1 -1
  173. package/dist/SuperSelect/SuperSelect.js.map +1 -1
  174. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  175. package/dist/SuperSelect/SuperSelect.styles.js +38 -38
  176. package/dist/SuperSelect/SuperSelect.types.d.ts +0 -3
  177. package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
  178. package/dist/SuperSelect/useSuperSelect.d.ts +1 -1
  179. package/dist/SuperSelect/useSuperSelect.js +19 -52
  180. package/dist/SuperSelect/useSuperSelect.js.map +1 -1
  181. package/dist/Switch/Switch.styles.js +4 -4
  182. package/dist/Table/Table.styles.d.ts +1 -1
  183. package/dist/Table/Table.styles.js +28 -28
  184. package/dist/TableShelf/TableShelf.styles.js +5 -5
  185. package/dist/Tabs/Tabs.styles.js +15 -15
  186. package/dist/Tearsheet/Tearsheet.styles.js +17 -28
  187. package/dist/Tearsheet/Tearsheet.styles.js.map +1 -1
  188. package/dist/Tearsheet/storybook/PageLayoutDemo.js +11 -2
  189. package/dist/Tearsheet/storybook/PageLayoutDemo.js.map +1 -1
  190. package/dist/TextArea/TextArea.styles.js +1 -1
  191. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  192. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  193. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  194. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  195. package/dist/Tile/Tile.styles.js +8 -8
  196. package/dist/Title/Title.styles.js +7 -7
  197. package/dist/Toast/Toast.styles.js +3 -3
  198. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  199. package/dist/Token/Token.styles.js +3 -3
  200. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  201. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  202. package/dist/Tooltip/Tooltip.d.ts +4 -2
  203. package/dist/Tooltip/Tooltip.js +30 -5
  204. package/dist/Tooltip/Tooltip.js.map +1 -1
  205. package/dist/Tooltip/Tooltip.styles.d.ts +1 -0
  206. package/dist/Tooltip/Tooltip.styles.js +12 -4
  207. package/dist/Tooltip/Tooltip.styles.js.map +1 -1
  208. package/dist/Tooltip/Tooltip.types.d.ts +8 -0
  209. package/dist/Tooltip/Tooltip.types.js.map +1 -1
  210. package/dist/Tree/Tree.js +1 -1
  211. package/dist/Tree/Tree.styles.js +10 -10
  212. package/dist/Typeahead/Typeahead.styles.js +3 -3
  213. package/dist/Typography/Typography.styles.js +1 -1
  214. package/dist/Typography/Typography.table.story.js +2 -2
  215. package/dist/_hooks/I18n.d.ts +65 -67
  216. package/dist/_hooks/IntersectionObserver/createIntersectionObserver.d.ts +0 -1
  217. package/dist/_hooks/IntersectionObserver/createIntersectionObserver.js +0 -1
  218. package/dist/_hooks/IntersectionObserver/createIntersectionObserver.js.map +1 -1
  219. package/dist/_locales/de-DE.json +3 -1
  220. package/dist/_locales/en-AU.json +3 -1
  221. package/dist/_locales/en-CA.json +3 -1
  222. package/dist/_locales/en-GB.json +3 -1
  223. package/dist/_locales/en.json +5 -2
  224. package/dist/_locales/es-ES.json +3 -1
  225. package/dist/_locales/es.json +3 -1
  226. package/dist/_locales/fr-CA.json +3 -1
  227. package/dist/_locales/fr-FR.json +3 -1
  228. package/dist/_locales/is-IS.json +3 -1
  229. package/dist/_locales/it-IT.json +3 -1
  230. package/dist/_locales/ja-JP.json +3 -1
  231. package/dist/_locales/pl-PL.json +3 -1
  232. package/dist/_locales/pseudo.json +5 -2
  233. package/dist/_locales/pt-BR.json +3 -1
  234. package/dist/_locales/pt-PT.json +5 -3
  235. package/dist/_locales/th-TH.json +3 -1
  236. package/dist/_locales/zh-SG.json +3 -1
  237. package/dist/_locales/zh-TW.json +3 -1
  238. package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
  239. package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
  240. package/dist/_styles/mixins.d.ts +13 -1
  241. package/dist/_styles/mixins.js +15 -1
  242. package/dist/_styles/mixins.js.map +1 -1
  243. package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
  244. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  245. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
  246. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  247. package/dist/_typedoc/Banner/Banner.types.json +39 -13
  248. package/dist/_typedoc/Box/Box.types.json +68 -68
  249. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  250. package/dist/_typedoc/Button/Button.types.json +13 -13
  251. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  252. package/dist/_typedoc/Card/Card.types.json +6 -6
  253. package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -8
  254. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  255. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  256. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  257. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  258. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  259. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +31 -31
  260. package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
  261. package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
  262. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  263. package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
  264. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  265. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  266. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  267. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  268. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  269. package/dist/_typedoc/Form/Form.types.json +862 -762
  270. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  271. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  272. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +75 -55
  273. package/dist/_typedoc/Input/Input.types.json +2 -2
  274. package/dist/_typedoc/Link/Link.types.json +1 -1
  275. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  276. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  277. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +77 -77
  278. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  279. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +52 -32
  280. package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
  281. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  282. package/dist/_typedoc/NumberInput/NumberInput.types.json +48 -48
  283. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +42 -32
  284. package/dist/_typedoc/PageLayout/PageLayout.types.json +46 -26
  285. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  286. package/dist/_typedoc/Panel/Panel.types.json +30 -30
  287. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  288. package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
  289. package/dist/_typedoc/Popover/Popover.types.json +15 -15
  290. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
  291. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  292. package/dist/_typedoc/Required/Required.types.json +5 -5
  293. package/dist/_typedoc/Search/Search.types.json +18 -18
  294. package/dist/_typedoc/Section/Section.types.json +15 -15
  295. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
  296. package/dist/_typedoc/Select/Select.types.json +141 -60
  297. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  298. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  299. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  300. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
  301. package/dist/_typedoc/Table/Table.types.json +102 -102
  302. package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
  303. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
  304. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  305. package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
  306. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  307. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  308. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +43 -43
  309. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +29 -29
  310. package/dist/_typedoc/Tile/Tile.types.json +8 -8
  311. package/dist/_typedoc/Title/Title.types.json +1 -1
  312. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  313. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
  314. package/dist/_typedoc/Token/Token.types.json +7 -7
  315. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  316. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +8 -8
  317. package/dist/_typedoc/Tooltip/Tooltip.types.json +25 -14
  318. package/dist/_typedoc/Tree/Tree.types.json +88 -88
  319. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  320. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  321. package/dist/_typedoc/_utils/types.json +3 -3
  322. package/dist/_utils/scrollIntoView.js +21 -7
  323. package/dist/_utils/scrollIntoView.js.map +1 -1
  324. package/package.json +9 -8
  325. package/dist/Checkbox/CheckboxTooltip.d.ts +0 -4
  326. package/dist/Checkbox/CheckboxTooltip.js +0 -26
  327. package/dist/Checkbox/CheckboxTooltip.js.map +0 -1
@@ -30,20 +30,6 @@ export declare const StyledFormFieldHeader: import("styled-components/dist/types
30
30
  export declare const StyledFormFieldRequiredMark: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("../Required").RequiredProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & {
31
31
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
32
32
  }, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("../Required").RequiredProps & import("react").RefAttributes<HTMLSpanElement>>, keyof import("react").Component<any, {}, any>>;
33
- export declare const dataQaFieldTooltipIcon = "form-field-tooltip-icon";
34
- export declare const StyledFormFieldTooltipIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<Omit<{
35
- size?: import("@procore/core-icons/dist/Icon").IconSize | undefined;
36
- } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>, "ref"> & {
37
- ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
38
- }, Omit<{
39
- size?: import("@procore/core-icons/dist/Icon").IconSize | undefined;
40
- } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>, "ref"> & {
41
- ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
42
- }>, {
43
- 'data-qa'?: string | undefined;
44
- }>, never>> & string & Omit<import("react").ForwardRefExoticComponent<{
45
- size?: import("@procore/core-icons/dist/Icon").IconSize | undefined;
46
- } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>, keyof import("react").Component<any, {}, any>>;
47
33
  export declare const StyledFormFieldErrorIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<{
48
34
  size?: import("@procore/core-icons/dist/Icon").IconSize | undefined;
49
35
  } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>, "ref"> & {
@@ -1,4 +1,4 @@
1
- import { Error, Help } from '@procore/core-icons/dist';
1
+ import { Error } from '@procore/core-icons/dist';
2
2
  import styled, { css } from 'styled-components';
3
3
  import { checkboxSize } from '../Checkbox/Checkbox.styles';
4
4
  import { StyledFieldHeader } from '../Field';
@@ -6,7 +6,6 @@ import { Required } from '../Required';
6
6
  import { Label } from '../Semantic';
7
7
  import { getTypographyIntent } from '../Typography';
8
8
  import { colors } from '../_styles/colors';
9
- import { getGapOutlineFocus } from '../_styles/mixins';
10
9
  import { spacing } from '../_styles/spacing';
11
10
  var columnGutter = '24px';
12
11
  var defaultLineHeight = '20px';
@@ -24,7 +23,7 @@ function applyStylesOnlyToIE11(styles) {
24
23
  }
25
24
  export var StyledFormFieldMain = /*#__PURE__*/styled.div.withConfig({
26
25
  displayName: "StyledFormFieldMain",
27
- componentId: "core-12_37_0__sc-ncj3pf-0"
26
+ componentId: "core-12_39_0__sc-ncj3pf-0"
28
27
  })(["-ms-grid-row:2;grid-row:2;", " ", " ", ""], function (_ref) {
29
28
  var $colStart = _ref.$colStart,
30
29
  $colEnd = _ref.$colEnd,
@@ -36,15 +35,15 @@ export var StyledFormFieldMain = /*#__PURE__*/styled.div.withConfig({
36
35
  }, applyStylesOnlyToIE11("\n padding-left: ".concat(columnGutter, ";\n\n &:nth-child(2) {\n padding-left: 0;\n }\n ")));
37
36
  export var StyledLabel = /*#__PURE__*/styled(Label).withConfig({
38
37
  displayName: "StyledLabel",
39
- componentId: "core-12_37_0__sc-ncj3pf-1"
38
+ componentId: "core-12_39_0__sc-ncj3pf-1"
40
39
  })(["word-wrap:break-word;word-break:break-word;"]);
41
40
  export var StyledDescription = /*#__PURE__*/styled.div.withConfig({
42
41
  displayName: "StyledDescription",
43
- componentId: "core-12_37_0__sc-ncj3pf-2"
42
+ componentId: "core-12_39_0__sc-ncj3pf-2"
44
43
  })(["", " color:", ";word-wrap:break-word;word-break:break-word;"], getTypographyIntent('body'), colors.gray45);
45
44
  export var StyledCheckboxInlineDescription = /*#__PURE__*/styled(StyledDescription).withConfig({
46
45
  displayName: "StyledCheckboxInlineDescription",
47
- componentId: "core-12_37_0__sc-ncj3pf-3"
46
+ componentId: "core-12_39_0__sc-ncj3pf-3"
48
47
  })(["margin-top:", "px;", ""], spacing.xs, function (_ref3) {
49
48
  var $read = _ref3.$read;
50
49
  if (!$read) {
@@ -53,7 +52,7 @@ export var StyledCheckboxInlineDescription = /*#__PURE__*/styled(StyledDescripti
53
52
  });
54
53
  export var StyledFormFieldHeader = /*#__PURE__*/styled(StyledFieldHeader).withConfig({
55
54
  displayName: "StyledFormFieldHeader",
56
- componentId: "core-12_37_0__sc-ncj3pf-4"
55
+ componentId: "core-12_39_0__sc-ncj3pf-4"
57
56
  })(["-ms-grid-row:1;grid-row:1;align-self:end;margin-bottom:", "px;", " ", " * + ", "{margin-top:", "px;}"], spacing.xs, function (_ref4) {
58
57
  var $colStart = _ref4.$colStart,
59
58
  $colEnd = _ref4.$colEnd,
@@ -62,29 +61,20 @@ export var StyledFormFieldHeader = /*#__PURE__*/styled(StyledFieldHeader).withCo
62
61
  }, applyStylesOnlyToIE11("\n padding-left: ".concat(columnGutter, ";\n\n &:first-child {\n padding-left: 0;\n }\n\n ").concat(StyledFormFieldMain, " {\n padding-left: ").concat(columnGutter, ";\n\n &:nth-child(2) {\n padding-left: 0;\n }\n }\n ")), StyledDescription, spacing.xs);
63
62
  export var StyledFormFieldRequiredMark = /*#__PURE__*/styled(Required).withConfig({
64
63
  displayName: "StyledFormFieldRequiredMark",
65
- componentId: "core-12_37_0__sc-ncj3pf-5"
64
+ componentId: "core-12_39_0__sc-ncj3pf-5"
66
65
  })(["padding-left:", "px;vertical-align:top;"], spacing.xs);
67
- export var dataQaFieldTooltipIcon = 'form-field-tooltip-icon';
68
- export var StyledFormFieldTooltipIcon = /*#__PURE__*/styled(Help).attrs(function () {
69
- return {
70
- 'data-qa': dataQaFieldTooltipIcon
71
- };
72
- }).withConfig({
73
- displayName: "StyledFormFieldTooltipIcon",
74
- componentId: "core-12_37_0__sc-ncj3pf-6"
75
- })(["margin-left:", "px;color:", ";vertical-align:middle;&:focus-visible{border-radius:50%;", " outline-offset:0;}"], spacing.sm, colors.gray45, getGapOutlineFocus);
76
66
  export var StyledFormFieldErrorIcon = /*#__PURE__*/styled(Error).withConfig({
77
67
  displayName: "StyledFormFieldErrorIcon",
78
- componentId: "core-12_37_0__sc-ncj3pf-7"
68
+ componentId: "core-12_39_0__sc-ncj3pf-6"
79
69
  })(["vertical-align:sub;"]);
80
70
  export var StyledFormFieldBanner = /*#__PURE__*/styled.div.withConfig({
81
71
  displayName: "StyledFormFieldBanner",
82
- componentId: "core-12_37_0__sc-ncj3pf-8"
72
+ componentId: "core-12_39_0__sc-ncj3pf-7"
83
73
  })(["display:flex;align-items:flex-start;min-height:22px;margin-top:", "px;margin-bottom:2px;word-break:break-word;word-wrap:break-word;color:", ";", ""], spacing.xs, colors.red50, getTypographyIntent('body'));
84
74
  /** @deprecated The traditional field layout is deprecated */
85
75
  export var StyledTraditionalFormColumn = /*#__PURE__*/styled.div.withConfig({
86
76
  displayName: "StyledTraditionalFormColumn",
87
- componentId: "core-12_37_0__sc-ncj3pf-9"
77
+ componentId: "core-12_39_0__sc-ncj3pf-8"
88
78
  })(["padding:", ";align-self:center;height:100%;&:nth-child(1){-ms-grid-column:1;}&:nth-child(2){-ms-grid-column:2;}&:nth-child(3){-ms-grid-column:3;}&:nth-child(4){-ms-grid-column:4;}", " ", ""], traditionalPadding, function (_ref5) {
89
79
  var _ref5$$fullWidth = _ref5.$fullWidth,
90
80
  $fullWidth = _ref5$$fullWidth === void 0 ? false : _ref5$$fullWidth;
@@ -96,15 +86,15 @@ export var StyledTraditionalFormColumn = /*#__PURE__*/styled.div.withConfig({
96
86
  });
97
87
  export var StyledFormOutputTextArea = /*#__PURE__*/styled.span.withConfig({
98
88
  displayName: "StyledFormOutputTextArea",
99
- componentId: "core-12_37_0__sc-ncj3pf-10"
89
+ componentId: "core-12_39_0__sc-ncj3pf-9"
100
90
  })(["white-space:pre-wrap;"]);
101
91
  export var StyledFormOutputFiledset = /*#__PURE__*/styled.fieldset.withConfig({
102
92
  displayName: "StyledFormOutputFiledset",
103
- componentId: "core-12_37_0__sc-ncj3pf-11"
93
+ componentId: "core-12_39_0__sc-ncj3pf-10"
104
94
  })(["border:none;padding:0;margin-top:", "px;"], spacing.xs);
105
95
  export var StyledFormRow = /*#__PURE__*/styled.div.withConfig({
106
96
  displayName: "StyledFormRow",
107
- componentId: "core-12_37_0__sc-ncj3pf-12"
97
+ componentId: "core-12_39_0__sc-ncj3pf-11"
108
98
  })(["", ""], function (_ref7) {
109
99
  var _ref7$$traditional = _ref7.$traditional,
110
100
  $traditional = _ref7$$traditional === void 0 ? false : _ref7$$traditional,
@@ -115,6 +105,6 @@ export var StyledFormRow = /*#__PURE__*/styled.div.withConfig({
115
105
  export var formWrapper = /*#__PURE__*/css(["display:inherit;flex-direction:inherit;height:inherit;max-height:inherit;"]);
116
106
  export var StyledForm = /*#__PURE__*/styled.div.withConfig({
117
107
  displayName: "StyledForm",
118
- componentId: "core-12_37_0__sc-ncj3pf-13"
108
+ componentId: "core-12_39_0__sc-ncj3pf-12"
119
109
  })(["", ""], formWrapper);
120
110
  //# sourceMappingURL=Form.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.styles.js","names":["Error","Help","styled","css","checkboxSize","StyledFieldHeader","Required","Label","getTypographyIntent","colors","getGapOutlineFocus","spacing","columnGutter","defaultLineHeight","textEditorOutputListPadding","traditionalBorder","traditionalBgGray","traditionalPadding","traditionalFontSize","traditionalLineHeight","getGridColumns","colStart","colEnd","colIeSpan","applyStylesOnlyToIE11","styles","StyledFormFieldMain","div","withConfig","displayName","componentId","_ref","$colStart","$colEnd","$colIeSpan","_ref2","$read","gray15","concat","StyledLabel","StyledDescription","gray45","StyledCheckboxInlineDescription","xs","_ref3","md","StyledFormFieldHeader","_ref4","StyledFormFieldRequiredMark","dataQaFieldTooltipIcon","StyledFormFieldTooltipIcon","attrs","sm","StyledFormFieldErrorIcon","StyledFormFieldBanner","red50","StyledTraditionalFormColumn","_ref5","_ref5$$fullWidth","$fullWidth","_ref6","_ref6$$output","$output","StyledFormOutputTextArea","span","StyledFormOutputFiledset","fieldset","StyledFormRow","_ref7","_ref7$$traditional","$traditional","_ref7$$read","white","formWrapper","StyledForm"],"sources":["../../src/Form/Form.styles.tsx"],"sourcesContent":["import { Error, Help } from '@procore/core-icons/dist'\nimport styled, { css } from 'styled-components'\nimport { checkboxSize } from '../Checkbox/Checkbox.styles'\nimport { StyledFieldHeader } from '../Field'\nimport { Required } from '../Required'\nimport { Label } from '../Semantic'\nimport { getTypographyIntent } from '../Typography'\nimport { colors } from '../_styles/colors'\nimport { getGapOutlineFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\nconst columnGutter = '24px'\nconst defaultLineHeight = '20px'\nconst textEditorOutputListPadding = '10px 0 10px 40px'\n\nconst traditionalBorder = 'rgb(216, 216, 216)'\nconst traditionalBgGray = 'rgb(242, 242, 242)'\nconst traditionalPadding = '10px'\nconst traditionalFontSize = '13px'\nconst traditionalLineHeight = '20px'\n\nfunction getGridColumns(colStart: number, colEnd: number, colIeSpan: number) {\n return css`\n -ms-grid-column: ${colStart};\n grid-column-start: ${colStart};\n grid-column-end: ${colEnd};\n -ms-grid-column-span: ${colIeSpan};\n `\n}\n\nfunction applyStylesOnlyToIE11(styles: string) {\n return css`\n @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n ${styles}\n }\n `\n}\n\nexport const StyledFormFieldMain = styled.div<{\n $read: boolean\n $colStart: number\n $colEnd: number\n $colIeSpan: number\n}>`\n -ms-grid-row: 2;\n grid-row: 2;\n\n ${({ $colStart, $colEnd, $colIeSpan }) =>\n getGridColumns($colStart, $colEnd, $colIeSpan)}\n\n ${({ $read }) =>\n $read &&\n css`\n word-wrap: break-word;\n color: ${colors.gray15};\n ${getTypographyIntent('body')};\n `}\n\n // IE11 support grid-column-gap\n // bug: if a field's first column isn't at 1,\n // the field will fill the padding and be wider\n ${applyStylesOnlyToIE11(`\n padding-left: ${columnGutter};\n\n &:nth-child(2) {\n padding-left: 0;\n }\n `)}\n`\n\nexport const StyledLabel = styled(Label)`\n word-wrap: break-word;\n word-break: break-word;\n`\n\nexport const StyledDescription = styled.div`\n ${getTypographyIntent('body')}\n color: ${colors.gray45};\n word-wrap: break-word;\n word-break: break-word;\n`\n\nexport const StyledCheckboxInlineDescription = styled(StyledDescription)<{\n $read: boolean\n}>`\n margin-top: ${spacing.xs}px;\n ${({ $read }) => {\n if (!$read) {\n return css`\n padding-left: ${checkboxSize + spacing.md}px;\n `\n }\n }}\n`\n\nexport const StyledFormFieldHeader = styled(StyledFieldHeader)<{\n $colStart: number\n $colEnd: number\n $colIeSpan: number\n}>`\n -ms-grid-row: 1;\n grid-row: 1;\n align-self: end;\n margin-bottom: ${spacing.xs}px;\n\n ${({ $colStart, $colEnd, $colIeSpan }) =>\n getGridColumns($colStart, $colEnd, $colIeSpan)}\n\n // IE11 support grid-column-gap\n // bug: if a field's first column isn't at 1,\n // the field will fill the padding and be wider\n ${applyStylesOnlyToIE11(`\n padding-left: ${columnGutter};\n\n &:first-child {\n padding-left: 0;\n }\n\n ${StyledFormFieldMain} {\n padding-left: ${columnGutter};\n\n &:nth-child(2) {\n padding-left: 0;\n }\n }\n `)}\n\n * + ${StyledDescription} {\n margin-top: ${spacing.xs}px;\n }\n`\n\nexport const StyledFormFieldRequiredMark = styled(Required)`\n padding-left: ${spacing.xs}px;\n vertical-align: top;\n`\n\nexport const dataQaFieldTooltipIcon = 'form-field-tooltip-icon'\n\nexport const StyledFormFieldTooltipIcon = styled(Help).attrs<{\n 'data-qa'?: string\n}>(() => ({\n 'data-qa': dataQaFieldTooltipIcon,\n}))`\n margin-left: ${spacing.sm}px;\n color: ${colors.gray45};\n vertical-align: middle;\n\n &:focus-visible {\n border-radius: 50%;\n ${getGapOutlineFocus}\n // Icon does not touch viewBox borders. Already has 1px gap\n outline-offset: 0;\n }\n`\n\nexport const StyledFormFieldErrorIcon = styled(Error)`\n vertical-align: sub;\n`\n\nexport const StyledFormFieldBanner = styled.div`\n display: flex;\n align-items: flex-start;\n min-height: 22px;\n margin-top: ${spacing.xs}px;\n margin-bottom: 2px;\n word-break: break-word;\n word-wrap: break-word;\n color: ${colors.red50};\n\n ${getTypographyIntent('body')}\n`\n/** @deprecated The traditional field layout is deprecated */\nexport const StyledTraditionalFormColumn = styled.div<{\n $fullWidth?: boolean\n $output?: boolean\n}>`\n padding: ${traditionalPadding};\n align-self: center;\n height: 100%;\n\n &:nth-child(1) {\n -ms-grid-column: 1;\n }\n &:nth-child(2) {\n -ms-grid-column: 2;\n }\n &:nth-child(3) {\n -ms-grid-column: 3;\n }\n &:nth-child(4) {\n -ms-grid-column: 4;\n }\n\n ${({ $fullWidth = false }) =>\n $fullWidth &&\n css`\n grid-column: 2 / 5;\n -ms-grid-column-span: 3;\n `}\n\n ${({ $output = false }) =>\n $output &&\n css`\n font-weight: bold;\n font-size: ${traditionalFontSize};\n line-height: ${traditionalLineHeight};\n word-wrap: break-word;\n `}\n`\n\nexport const StyledFormOutputTextArea = styled.span`\n white-space: pre-wrap;\n`\n\nexport const StyledFormOutputFiledset = styled.fieldset`\n border: none;\n padding: 0;\n margin-top: ${spacing.xs}px;\n`\nexport const StyledFormRow = styled.div<{\n /** @deprecated The traditional field layout is deprecated */\n $traditional?: boolean\n $read?: boolean\n}>`\n ${({ $traditional = false, $read = false }) =>\n $traditional\n ? css`\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: 20% 30% 20% 30%;\n grid-template-columns: 20% 30% 20% 30%;\n -ms-grid-rows: auto;\n grid-template-rows: auto;\n border-top: 1px solid ${traditionalBorder};\n background-color: ${colors.white};\n\n &:last-of-type {\n border-bottom: 1px solid ${traditionalBorder};\n }\n\n ${$read &&\n `\n &:nth-child(2n + 1) {\n background-color: ${traditionalBgGray};\n }\n \n & > ${StyledTraditionalFormColumn}:nth-child(2) {\n border-right: 1px solid ${traditionalBorder};\n \n &:last-child {\n border-right: none;\n }\n }\n `}\n `\n : css`\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)\n minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)\n minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)\n minmax(0, 1fr);\n grid-template-columns: repeat(12, minmax(0, 1fr));\n -ms-grid-rows: minmax(${defaultLineHeight}, max-content)\n minmax(${defaultLineHeight}, max-content);\n grid-template-rows: minmax(${defaultLineHeight}, auto) minmax(\n ${defaultLineHeight},\n auto\n );\n justify-content: space-between;\n grid-column-gap: ${columnGutter};\n `}\n`\n\nexport const formWrapper = css`\n display: inherit;\n flex-direction: inherit;\n height: inherit;\n max-height: inherit;\n`\n\nexport const StyledForm = styled.div`\n ${formWrapper}\n`\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,IAAI,QAAQ,0BAA0B;AACtD,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,iBAAiB,QAAQ,UAAU;AAC5C,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,kBAAkB,QAAQ,mBAAmB;AACtD,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,IAAMC,YAAY,GAAG,MAAM;AAC3B,IAAMC,iBAAiB,GAAG,MAAM;AAChC,IAAMC,2BAA2B,GAAG,kBAAkB;AAEtD,IAAMC,iBAAiB,GAAG,oBAAoB;AAC9C,IAAMC,iBAAiB,GAAG,oBAAoB;AAC9C,IAAMC,kBAAkB,GAAG,MAAM;AACjC,IAAMC,mBAAmB,GAAG,MAAM;AAClC,IAAMC,qBAAqB,GAAG,MAAM;AAEpC,SAASC,cAAcA,CAACC,QAAgB,EAAEC,MAAc,EAAEC,SAAiB,EAAE;EAC3E,OAAOpB,GAAG,kGACWkB,QAAQ,EACNA,QAAQ,EACVC,MAAM,EAC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K,EAGHzD,iBAAiB,EAG5CqB,KAAK,4EAAAE,MAAA,CAGiBtB,iBAAiB,sDAAAsB,MAAA,CAGjCkB,2BAA2B,6DAAAlB,MAAA,CACLvB,iBAAiB,6HAM9C,IAEHZ,GAAG,ybAQuBU,iBAAiB,EAC9BA,iBAAiB,EACCA,iBAAiB,EACxCA,iBAAiB,EAIJD,YAAY,CAChC;AAAA,EACR;AAED,OAAO,IAAM6D,WAAW,gBAAGtE,GAAG,+EAK7B;AAED,OAAO,IAAMuE,UAAU,gBAAGxE,MAAM,CAACyB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,aAChC2C,WAAW,CACd"}
1
+ {"version":3,"file":"Form.styles.js","names":["Error","styled","css","checkboxSize","StyledFieldHeader","Required","Label","getTypographyIntent","colors","spacing","columnGutter","defaultLineHeight","textEditorOutputListPadding","traditionalBorder","traditionalBgGray","traditionalPadding","traditionalFontSize","traditionalLineHeight","getGridColumns","colStart","colEnd","colIeSpan","applyStylesOnlyToIE11","styles","StyledFormFieldMain","div","withConfig","displayName","componentId","_ref","$colStart","$colEnd","$colIeSpan","_ref2","$read","gray15","concat","StyledLabel","StyledDescription","gray45","StyledCheckboxInlineDescription","xs","_ref3","md","StyledFormFieldHeader","_ref4","StyledFormFieldRequiredMark","StyledFormFieldErrorIcon","StyledFormFieldBanner","red50","StyledTraditionalFormColumn","_ref5","_ref5$$fullWidth","$fullWidth","_ref6","_ref6$$output","$output","StyledFormOutputTextArea","span","StyledFormOutputFiledset","fieldset","StyledFormRow","_ref7","_ref7$$traditional","$traditional","_ref7$$read","white","formWrapper","StyledForm"],"sources":["../../src/Form/Form.styles.tsx"],"sourcesContent":["import { Error } from '@procore/core-icons/dist'\nimport styled, { css } from 'styled-components'\nimport { checkboxSize } from '../Checkbox/Checkbox.styles'\nimport { StyledFieldHeader } from '../Field'\nimport { Required } from '../Required'\nimport { Label } from '../Semantic'\nimport { getTypographyIntent } from '../Typography'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\nconst columnGutter = '24px'\nconst defaultLineHeight = '20px'\nconst textEditorOutputListPadding = '10px 0 10px 40px'\n\nconst traditionalBorder = 'rgb(216, 216, 216)'\nconst traditionalBgGray = 'rgb(242, 242, 242)'\nconst traditionalPadding = '10px'\nconst traditionalFontSize = '13px'\nconst traditionalLineHeight = '20px'\n\nfunction getGridColumns(colStart: number, colEnd: number, colIeSpan: number) {\n return css`\n -ms-grid-column: ${colStart};\n grid-column-start: ${colStart};\n grid-column-end: ${colEnd};\n -ms-grid-column-span: ${colIeSpan};\n `\n}\n\nfunction applyStylesOnlyToIE11(styles: string) {\n return css`\n @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n ${styles}\n }\n `\n}\n\nexport const StyledFormFieldMain = styled.div<{\n $read: boolean\n $colStart: number\n $colEnd: number\n $colIeSpan: number\n}>`\n -ms-grid-row: 2;\n grid-row: 2;\n\n ${({ $colStart, $colEnd, $colIeSpan }) =>\n getGridColumns($colStart, $colEnd, $colIeSpan)}\n\n ${({ $read }) =>\n $read &&\n css`\n word-wrap: break-word;\n color: ${colors.gray15};\n ${getTypographyIntent('body')};\n `}\n\n // IE11 support grid-column-gap\n // bug: if a field's first column isn't at 1,\n // the field will fill the padding and be wider\n ${applyStylesOnlyToIE11(`\n padding-left: ${columnGutter};\n\n &:nth-child(2) {\n padding-left: 0;\n }\n `)}\n`\n\nexport const StyledLabel = styled(Label)`\n word-wrap: break-word;\n word-break: break-word;\n`\n\nexport const StyledDescription = styled.div`\n ${getTypographyIntent('body')}\n color: ${colors.gray45};\n word-wrap: break-word;\n word-break: break-word;\n`\n\nexport const StyledCheckboxInlineDescription = styled(StyledDescription)<{\n $read: boolean\n}>`\n margin-top: ${spacing.xs}px;\n ${({ $read }) => {\n if (!$read) {\n return css`\n padding-left: ${checkboxSize + spacing.md}px;\n `\n }\n }}\n`\n\nexport const StyledFormFieldHeader = styled(StyledFieldHeader)<{\n $colStart: number\n $colEnd: number\n $colIeSpan: number\n}>`\n -ms-grid-row: 1;\n grid-row: 1;\n align-self: end;\n margin-bottom: ${spacing.xs}px;\n\n ${({ $colStart, $colEnd, $colIeSpan }) =>\n getGridColumns($colStart, $colEnd, $colIeSpan)}\n\n // IE11 support grid-column-gap\n // bug: if a field's first column isn't at 1,\n // the field will fill the padding and be wider\n ${applyStylesOnlyToIE11(`\n padding-left: ${columnGutter};\n\n &:first-child {\n padding-left: 0;\n }\n\n ${StyledFormFieldMain} {\n padding-left: ${columnGutter};\n\n &:nth-child(2) {\n padding-left: 0;\n }\n }\n `)}\n\n * + ${StyledDescription} {\n margin-top: ${spacing.xs}px;\n }\n`\n\nexport const StyledFormFieldRequiredMark = styled(Required)`\n padding-left: ${spacing.xs}px;\n vertical-align: top;\n`\n\nexport const StyledFormFieldErrorIcon = styled(Error)`\n vertical-align: sub;\n`\n\nexport const StyledFormFieldBanner = styled.div`\n display: flex;\n align-items: flex-start;\n min-height: 22px;\n margin-top: ${spacing.xs}px;\n margin-bottom: 2px;\n word-break: break-word;\n word-wrap: break-word;\n color: ${colors.red50};\n\n ${getTypographyIntent('body')}\n`\n/** @deprecated The traditional field layout is deprecated */\nexport const StyledTraditionalFormColumn = styled.div<{\n $fullWidth?: boolean\n $output?: boolean\n}>`\n padding: ${traditionalPadding};\n align-self: center;\n height: 100%;\n\n &:nth-child(1) {\n -ms-grid-column: 1;\n }\n &:nth-child(2) {\n -ms-grid-column: 2;\n }\n &:nth-child(3) {\n -ms-grid-column: 3;\n }\n &:nth-child(4) {\n -ms-grid-column: 4;\n }\n\n ${({ $fullWidth = false }) =>\n $fullWidth &&\n css`\n grid-column: 2 / 5;\n -ms-grid-column-span: 3;\n `}\n\n ${({ $output = false }) =>\n $output &&\n css`\n font-weight: bold;\n font-size: ${traditionalFontSize};\n line-height: ${traditionalLineHeight};\n word-wrap: break-word;\n `}\n`\n\nexport const StyledFormOutputTextArea = styled.span`\n white-space: pre-wrap;\n`\n\nexport const StyledFormOutputFiledset = styled.fieldset`\n border: none;\n padding: 0;\n margin-top: ${spacing.xs}px;\n`\nexport const StyledFormRow = styled.div<{\n /** @deprecated The traditional field layout is deprecated */\n $traditional?: boolean\n $read?: boolean\n}>`\n ${({ $traditional = false, $read = false }) =>\n $traditional\n ? css`\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: 20% 30% 20% 30%;\n grid-template-columns: 20% 30% 20% 30%;\n -ms-grid-rows: auto;\n grid-template-rows: auto;\n border-top: 1px solid ${traditionalBorder};\n background-color: ${colors.white};\n\n &:last-of-type {\n border-bottom: 1px solid ${traditionalBorder};\n }\n\n ${$read &&\n `\n &:nth-child(2n + 1) {\n background-color: ${traditionalBgGray};\n }\n \n & > ${StyledTraditionalFormColumn}:nth-child(2) {\n border-right: 1px solid ${traditionalBorder};\n \n &:last-child {\n border-right: none;\n }\n }\n `}\n `\n : css`\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)\n minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)\n minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr)\n minmax(0, 1fr);\n grid-template-columns: repeat(12, minmax(0, 1fr));\n -ms-grid-rows: minmax(${defaultLineHeight}, max-content)\n minmax(${defaultLineHeight}, max-content);\n grid-template-rows: minmax(${defaultLineHeight}, auto) minmax(\n ${defaultLineHeight},\n auto\n );\n justify-content: space-between;\n grid-column-gap: ${columnGutter};\n `}\n`\n\nexport const formWrapper = css`\n display: inherit;\n flex-direction: inherit;\n height: inherit;\n max-height: inherit;\n`\n\nexport const StyledForm = styled.div`\n ${formWrapper}\n`\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,0BAA0B;AAChD,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,iBAAiB,QAAQ,UAAU;AAC5C,SAASC,QAAQ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A,GAAAD,KAAA,CAAGE,YAAY;IAAZA,YAAY,GAAAD,kBAAA,cAAG,KAAK,GAAAA,kBAAA;IAAAE,WAAA,GAAAH,KAAA,CAAE5B,KAAK;IAALA,KAAK,GAAA+B,WAAA,cAAG,KAAK,GAAAA,WAAA;EAAA,OACtCD,YAAY,GACR9D,GAAG,wPAOuBW,iBAAiB,EACrBL,MAAM,CAAC0D,KAAK,EAGHrD,iBAAiB,EAG5CqB,KAAK,4EAAAE,MAAA,CAGiBtB,iBAAiB,sDAAAsB,MAAA,CAGjCc,2BAA2B,6DAAAd,MAAA,CACLvB,iBAAiB,6HAM9C,IAEHX,GAAG,ybAQuBS,iBAAiB,EAC9BA,iBAAiB,EACCA,iBAAiB,EACxCA,iBAAiB,EAIJD,YAAY,CAChC;AAAA,EACR;AAED,OAAO,IAAMyD,WAAW,gBAAGjE,GAAG,+EAK7B;AAED,OAAO,IAAMkE,UAAU,gBAAGnE,MAAM,CAACwB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,aAChCuC,WAAW,CACd"}
@@ -473,6 +473,10 @@ export declare type FieldSelectOptionItem = FieldSelectValueType;
473
473
  export declare type FieldSelectGroupItem = any;
474
474
  export declare type FieldSelectGroupHeader = FieldSelectGroupItem & {
475
475
  isGroupHeader: boolean;
476
+ /**
477
+ * @since 12.39.0
478
+ */
479
+ options: FieldSelectOptionItem[];
476
480
  };
477
481
  export interface GroupedOptionsConfig<OptionItem, GroupItem> extends OptionList<OptionItem> {
478
482
  /**
@@ -537,8 +541,24 @@ export interface FieldSelectComponentProps<Value = FieldSelectValueType, OptionI
537
541
  * Callback for rendering header for each entry in `optgroups`
538
542
  * `(group: GroupItem) => React.ReactNode`
539
543
  * @since 10.19.0
544
+ * @deprecated The `groupHeaderRenderer` prop is deprecated and will be removed in a future version. Use `groupRenderer` instead to customize the entire group rendering, including the header.
545
+ * @deprecatedSince 12.39.0
546
+ */
547
+ groupHeaderRenderer?: (group: GroupItem, params: {
548
+ getId: OptionList<GroupItem>['getId'];
549
+ getLabel: OptionList<GroupItem>['getLabel'];
550
+ children?: React.ReactNode;
551
+ }) => React.ReactNode;
552
+ /**
553
+ * Callback for rendering group wrapper for each entry in `optgroups`
554
+ * `(group: GroupItem) => React.ReactNode`
555
+ * @since 12.39.0
540
556
  */
541
- groupHeaderRenderer?: (group: GroupItem) => React.ReactNode;
557
+ groupRenderer?: (group: GroupItem, params: {
558
+ getId: OptionList<GroupItem>['getId'];
559
+ getLabel: OptionList<GroupItem>['getLabel'];
560
+ children?: React.ReactNode;
561
+ }) => React.ReactNode;
542
562
  /**
543
563
  * If nothing is selected, suggest this option. From `Select.Option suggested`.
544
564
  * `(option: OptionItem) => boolean`
@@ -577,7 +597,7 @@ export interface FieldSelectComponentProps<Value = FieldSelectValueType, OptionI
577
597
  */
578
598
  searchComparator?: (query: string, value: string) => boolean;
579
599
  }
580
- export interface FormSelectProps<Value = FieldSelectValueType, OptionItem = FieldSelectOptionItem, GroupItem = FieldSelectGroupItem> extends FormFieldProps<Value>, Partial<OptionList<OptionItem>>, Pick<FieldSelectComponentProps<Value, OptionItem, GroupItem>, 'getGroup' | 'groupGetId' | 'groupGetLabel' | 'groupHeaderRenderer' | 'isSuggestedOption' | 'onBlur' | 'onClear' | 'optgroups' | 'onSearch' | 'optionRenderer' | 'searchComparator'>, Omit<SelectProps, 'onClear' | 'onSearch' | 'error' | 'children' | 'label'> {
600
+ export interface FormSelectProps<Value = FieldSelectValueType, OptionItem = FieldSelectOptionItem, GroupItem = FieldSelectGroupItem> extends FormFieldProps<Value>, Partial<OptionList<OptionItem>>, Pick<FieldSelectComponentProps<Value, OptionItem, GroupItem>, 'getGroup' | 'groupGetId' | 'groupGetLabel' | 'groupHeaderRenderer' | 'groupRenderer' | 'isSuggestedOption' | 'onBlur' | 'onClear' | 'optgroups' | 'onSearch' | 'optionRenderer' | 'searchComparator'>, Omit<SelectProps, 'onClear' | 'onSearch' | 'error' | 'children' | 'label'> {
581
601
  }
582
602
  export declare type FieldPillSelectValueType = any;
583
603
  interface PillSelectCommon extends Omit<PillSelectProps, 'children' | 'onClear' | 'error' | 'value'> {
@@ -1 +1 @@
1
- {"version":3,"file":"Form.types.js","names":[],"sources":["../../src/Form/Form.types.ts"],"sourcesContent":["import type {\n FieldHelperProps,\n FieldInputProps,\n FieldMetaProps as FormikFieldMetaProps,\n FieldValidator,\n FormikConfig,\n} from 'formik'\nimport type React from 'react'\nimport type { CheckboxProps } from '../Checkbox/Checkbox.types'\nimport type { DateSelectProps } from '../DateSelect'\nimport type { GroupSelectProps } from '../GroupSelect/GroupSelect.types'\nimport type { InputProps } from '../Input/Input.types'\nimport type { MultiSelectProps } from '../MultiSelect/MultiSelect.types'\nimport type {\n CurrencyInputProps,\n InputValue as BaseNumberInputValueType,\n Locale,\n NumberInputProps,\n} from '../NumberInput/NumberInput.types'\nimport type { PillSelectProps } from '../PillSelect/PillSelect.types'\nimport type {\n SelectButtonProps,\n SelectOptionProps,\n SelectProps,\n} from '../Select/Select.types'\nimport type { TextAreaProps } from '../TextArea/TextArea.types'\nimport type { TextEditorProps } from '../TextEditor'\nimport type { TieredSelectProps } from '../TieredSelect/TieredSelect.types'\nimport type { TooltipProps } from '../Tooltip/Tooltip.types'\nimport type { Props } from '../_utils/types'\n\nexport type ValueInArray<V> = V[keyof V]\nexport type View = 'create' | 'read' | 'update'\nexport type Layout = 'wxp' | 'traditional'\n\nexport interface FormContextAPI {\n /**\n * @since 10.19.0\n */\n different: boolean\n /**\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n enableReinitialize?: boolean\n /**\n * @since 10.19.0\n */\n setFieldDifferent: (key: string, different: boolean) => void\n\n /**\n * A [Yup](https://github.com/jquense/yup) object schema to\n * validate all values.\n * ```\n * {`Yup.object().shape({\n * input_name: Yup.mixed().required()\n * })`}\n * ```\n * This is a great way to get error messages into the component. In\n * addition, if using Yup for required, those fields will automatically\n * get the required asterisk and highlight error.\n * @since 10.19.0\n */\n validationSchema?: FormikConfig<unknown>['validationSchema']\n\n /**\n * Toggle between modern and traditional form styles. Leave blank for the\n * modern label-above layout.\n * @since 10.19.0\n * @deprecated The `traditional` field layout variant is deprecated and `variant` property will be removed\n * in a future version. Use the default field layout (`wxp`) instead.\n *\n * Note that in the default field layout, you need to explicitly specify the `colStart` property:\n *\n * BEFORE\n *\n * ```\n * <Form.Row>\n * <Form.Text />\n * <Form.Number />\n * </Form.Row>\n * ```\n *\n * AFTER\n *\n * ```\n * <Form.Row>\n * <Form.Text colStart={1} />\n * <Form.Number colStart={7} />\n * </Form.Row>\n * ```\n *\n * We plan to remove this limitation in a future release.\n *\n * @deprecatedSince 12.18.0\n */\n variant: Layout\n\n /**\n * Determines show or edit state of form.\n * @default 'create'\n * @since 10.19.0\n */\n view: View\n}\n\ninterface FieldMetaProps<Value>\n extends Omit<FormikFieldMetaProps<Value>, 'error'> {\n /**\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n error: boolean\n /**\n * @since 10.19.0\n */\n required: boolean\n /**\n * @since 10.19.0\n */\n view: View\n}\n\nexport interface FieldConfig {\n /**\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean | string\n /**\n * @since 10.19.0\n */\n getId?: (item: any) => string | number\n /**\n * @since 10.19.0\n */\n name: string\n /**\n * @since 10.19.0\n */\n required?: boolean\n /**\n * @since 10.19.0\n */\n validate?: FieldValidator\n /**\n * @since 10.19.0\n */\n view?: View\n}\n\nexport interface FormFieldAPI<Value> {\n /**\n * @since 10.19.0\n */\n input: FieldInputProps<Value>\n /**\n * @since 10.19.0\n */\n helpers: {\n setValue: (\n value: Value,\n shouldValidate?: boolean,\n shouldMarkDifferent?: boolean\n ) => void\n setTouched: FieldHelperProps<Value>['setTouched']\n setError: FieldHelperProps<Value>['setError']\n }\n\n /**\n * @since 10.19.0\n */\n messages: {\n error?: string\n }\n /**\n * @since 10.19.0\n */\n meta: FieldMetaProps<Value>\n}\n\nexport interface FormProps<Values> extends Partial<FormikConfig<Values>> {\n /**\n * @since 10.19.0\n */\n children: React.ReactNode | (() => React.ReactNode)\n\n /**\n * Enable a browser confirmation about losing of unsaved data when the\n * form values are visually different from the initial values. Uses\n * `window.onbeforeunload` and `window.confirm` for dialogs(Modal, Tearsheet).\n * **Requires `onSubmit` to return a promise to remove onbeforeunload.**\n * @a11y To prevent accidental data loss, it is recommended to enable.\n * @default false\n */\n enableConfirmNavigation?: boolean\n\n /**\n * Disable all fields at once.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Submit the form. A promise is required to notify `Form` to make state changes like toggling `isSubmitting` and resetting `enableConfirmNavigation` (removing `window.onbeforeunload`) in the component.\n\n - Recommended: `onSubmit` returns a promise, it will wait for `onSuccess`.\n - Ok: `onSubmit` function is `async` and it returns undefined, it will always be considered a success.\n - Caution: `onSubmit` function is synchronous and it returns undefined, it will never reset certain states.\n\n A `button type='submit'` inside the `Form.Form` component (`form` tag) will trigger submission. If any validations fail, the submission will not continue.\n\n @example\n function(values, actions) {\n return new Promise(\n async function(onSuccess, onError) {\n const success = await _network(values)\n\n if (success) {\n return onSuccess('Successful Server Response')\n } else {\n actions.setFieldError('text', 'Example Error Message')\n return onError('Failed Server Response')\n }\n }\n )\n }\n\n */\n // TODO breaking change found v11 24-5-13\n // Our Partial<> usage above allows optional onSubmit,\n // even though Formik requires onSubmit. Keep ? for backwards compat.\n onSubmit?: FormikConfig<Values>['onSubmit']\n\n /**\n * Toggle between modern and traditional form styles. Leave blank for the modern label-above layout.\n * @deprecated The `traditional` field layout variant is deprecated and `variant` property will be removed\n * in a future version. Use the default field layout (`wxp`) instead.\n * @deprecatedSince 12.18.0\n */\n variant?: Layout\n\n /**\n * Determines show or edit state of form.\n * @default 'create'\n */\n view?: View\n}\n\nexport type FormFieldValueComponentProps<Value = any> = {\n field: FormFieldAPI<Value>\n}\n\nexport type ComponentWithFieldProp<\n Value,\n Props extends FormFieldValueComponentProps<Value>\n> =\n | React.FunctionComponent<Props>\n | React.ForwardRefExoticComponent<Props>\n | ((p: Props) => React.ReactNode)\n\nexport interface BaseFieldProps<\n Value,\n ComponentProps extends FormFieldValueComponentProps<Value>\n> {\n /**\n * Customize the input component, either a single component for all views\n * or an object with the keys of the views to render on that particular\n * view. This input component will receive the `field` prop.\n * If using TypeScript, these components will need to extend a specific\n * type from Core React, read more about the [props per view](#typescript-ans-as-prop-components)\n *\n * One of:\n *\n * `ReactComponent` or\n * `\n * {\n * '{ read: ReactComponent, create: ReactComponent, update: ReactComponent }'\n * }\n * `\n * @since 10.19.0\n */\n as?:\n | ComponentWithFieldProp<Value, ComponentProps>\n | { [V in View]: ComponentWithFieldProp<Value, ComponentProps> }\n\n /**\n * A subcomponent to render on a particular view.\n *\n * One or all of:\n *\n * `Form.X.Create, Form.X.Read, Form.X.Update`\n * @since 10.19.0\n */\n children?: ((field: FormFieldAPI<Value>) => React.ReactNode) | React.ReactNode\n\n /**\n * Starting location of column. For traditional variant, this does not exist\n * and is not necessary.\n * @since 10.19.0\n * */\n colStart?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n\n /**\n * Width of column. For traditional variant, will be either 6 or 12.\n * @default 6\n * @since 10.19.0\n */\n colWidth?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n /**\n * @since 10.19.0\n */\n ['data-qa']?: string\n\n /**\n * Specify disabled. Field disabled replaces the overall Form disabled state.\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean | string\n /**\n * @since 10.19.0\n */\n label?: string\n /**\n * @since 11.25.0\n */\n description?: React.ReactNode\n /**\n * Key path in store. Accepts `bracket[notation]` or `dot.notation`.\n * @since 10.19.0\n */\n name: string\n\n /**\n * The required asterisk if not using Yup `required`\n * ```\n * <Form\n * validationSchema={Yup.object().shape({\n * input_name: Yup.mixed().required(),\n * })}\n * >\n * ```\n * @since 10.19.0\n */\n required?: boolean\n\n /**\n * @since 10.19.0\n */\n tooltip?: TooltipProps['overlay']\n\n /**\n * The validate function from Formik for single field validation.\n * ```\n * (value: Value = any) => undefined | string | Promise<Value>\n * ```\n * @since 10.19.0\n */\n validate?: FieldValidator\n\n /**\n * Determines show or edit state of field.\n * @since 10.19.0\n */\n view?: View\n}\n\n/** @deprecated The traditional field layout is deprecated */\nexport interface TraditionalBaseFieldProps<\n Value,\n ComponentProps extends FormFieldValueComponentProps<Value>\n> extends Omit<BaseFieldProps<Value, ComponentProps>, 'colWidth' | 'colStart'> {\n /**\n * @since 10.19.0\n */\n colWidth?: 6 | 12\n}\n\nexport interface FormFieldProps<Value>\n extends Omit<\n BaseFieldProps<Value, FormFieldValueComponentProps<Value>>,\n 'children'\n > {\n /**\n * @since 10.19.0\n */\n children?:\n | React.ReactElement<\n BaseFieldProps<Value, FormFieldValueComponentProps<Value>>\n >\n | React.ReactElement<\n BaseFieldProps<Value, FormFieldValueComponentProps<Value>>\n >[]\n}\n\nexport type OptionList<OptionShape = any> = {\n /**\n * The id of an option\n * @since 10.19.0\n * @default (option: OptionItem) => option.id\n */\n getId: (option: OptionShape) => string | number\n\n /**\n * The display label of an option\n *\n * `(option: OptionItem) => string`\n *\n * Default:\n *\n * `(option: OptionItem) => option.label || option.name`\n *\n * @since 10.19.0\n */\n getLabel: (option: OptionShape) => string\n\n /**\n * @since 10.19.0\n */\n options?: OptionShape[]\n}\n\nexport interface FormErrorBannerProps {\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 10.19.0\n */\n item: string\n}\n\n// MAKE\n\nexport type ViewFieldProps<\n Value,\n FieldTypeProps extends FormFieldProps<Value>,\n ComponentProps extends FormFieldValueComponentProps<Value>\n> = Partial<Omit<FieldTypeProps, 'children'>> & {\n /**\n * @since 10.19.0\n */\n children?: BaseFieldProps<Value, ComponentProps>['children']\n}\n\n// TEXT\n\nexport type FieldTextValueType = string\n\nexport interface FieldTextComponentProps<Value = FieldTextValueType>\n extends FormFieldValueComponentProps<Value>,\n InputProps {}\nexport interface FormTextProps<Value = FieldTextValueType>\n extends FormFieldProps<Value>,\n Omit<InputProps, 'name' | 'children' | 'error'> {}\n\n// NUMBER\n\nexport type FieldNumberValueType = BaseNumberInputValueType\n\nexport interface FieldNumberComponentProps<Value = FieldNumberValueType>\n extends FormFieldValueComponentProps<Value>,\n NumberInputProps {\n /**\n * A string with a BCP 47 language tag or an array of such strings which specifies number formatting.\n * @defaultValue en-US\n * @since 10.19.0\n */\n locale?: Locale\n}\n\nexport interface FormNumberProps<Value = FieldNumberValueType>\n extends FormFieldProps<Value>,\n Omit<NumberInputProps, 'name' | 'children' | 'error'> {}\n\n// CURRENCY\n\nexport type FieldCurrencyValueType = BaseNumberInputValueType\n\nexport interface FieldCurrencyComponentProps<Value = FieldCurrencyValueType>\n extends FormFieldValueComponentProps<Value>,\n CurrencyInputProps {}\n\nexport interface FormCurrencyProps<Value = FieldCurrencyValueType>\n extends FormFieldProps<Value>,\n Omit<CurrencyInputProps, 'name' | 'children' | 'error'> {}\n\n// DATE\nexport type FieldDateValueType = null | string | Date\n\nexport interface FieldDateComponentProps<Value = FieldDateValueType>\n extends FormFieldValueComponentProps<Value>,\n DateSelectProps {}\n\nexport interface FormDateProps<Value = FieldDateValueType>\n extends FormFieldProps<Value>,\n Omit<DateSelectProps, 'error'> {}\n\n// CHECKBOX\n\nexport type FieldCheckboxValueType = boolean\n\nexport interface FieldCheckboxComponentProps<Value = FieldCheckboxValueType>\n extends FormFieldValueComponentProps<Value>,\n CheckboxProps {\n /**\n * Next to checkbox label\n * @since 11.25.0\n */\n inlineLabel?: string\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 11.25.0\n */\n tooltip?: TooltipProps['overlay']\n /**\n * @since 11.25.0\n */\n hasRequiredMark?: boolean\n}\n\nexport interface FormCheckboxProps<Value = FieldCheckboxValueType>\n extends FormFieldProps<Value>,\n Omit<CheckboxProps, 'name' | 'error' | 'children'> {\n /**\n * Next to checkbox label\n * @since 11.25.0\n */\n inlineLabel?: string\n /**\n * Below checkbox description\n * @since 11.25.0\n */\n inlineDescription?: React.ReactNode\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n}\n\n// TEXTAREA\n\nexport type FieldTextAreaValueType = string\n\nexport interface FieldTextAreaComponentProps<Value = FieldTextAreaValueType>\n extends FormFieldValueComponentProps<Value>,\n TextAreaProps {}\nexport interface FormTextAreaProps<Value = FieldTextAreaValueType>\n extends FormFieldProps<Value>,\n Omit<TextAreaProps, 'name' | 'error' | 'children'> {}\n\n// RICHTEXT\n\nexport type FieldRichTextValueType = string\n\nexport interface FieldRichTextComponentProps<Value = FieldRichTextValueType>\n extends FormFieldValueComponentProps<Value>,\n TextEditorProps {}\n\nexport interface FormRichTextProps<Value = FieldRichTextValueType>\n extends Omit<FormFieldProps<Value>, 'error'>,\n TextEditorProps {\n /** Future facing prop for decoupling the editor from the form. Will be required in v13. */\n textEditorComponent?: React.ComponentType<any>\n}\n\n// RADIO BUTTONS\n\nexport type FieldRadioButtonsValueType = any\n\nexport interface FieldRadioButtonsComponentProps<\n Value = FieldRadioButtonsValueType\n> extends FormFieldValueComponentProps<Value>,\n Partial<OptionList<Value>>,\n Pick<Props, 'className' | 'style'> {\n /**\n * @since 10.19.0\n */\n isDisabledOption?: (option: Value) => boolean\n}\n\nexport interface FormRadioButtonsProps<Value = FieldRadioButtonsValueType>\n extends FormFieldProps<Value>,\n Partial<OptionList<Value>>,\n Pick<Props, 'className' | 'style'>,\n Pick<FieldRadioButtonsComponentProps, 'isDisabledOption'> {}\n\n// CHECKBOXES\n\nexport type FieldCheckboxesValueType = any[]\n\nexport interface FieldCheckboxesComponentProps<Value = FieldCheckboxesValueType>\n extends FormFieldValueComponentProps<Value>,\n Partial<OptionList<ValueInArray<Value>>>,\n Pick<Props, 'className' | 'style'> {\n /**\n * @since 10.19.0\n */\n isDisabledOption?: (option: Value) => boolean\n /**\n * @since 10.19.0\n */\n isIndeterminateOption?: (option: Value) => boolean\n}\n\nexport interface FormCheckboxesProps<Value = FieldCheckboxesValueType>\n extends FormFieldProps<Value>,\n Partial<OptionList<ValueInArray<Value>>>,\n Pick<Props, 'className' | 'style'>,\n Pick<\n FieldCheckboxesComponentProps,\n 'isDisabledOption' | 'isIndeterminateOption'\n > {}\n\n// SELECT\n\nexport type FieldSelectValueType = any\nexport type FieldSelectOptionItem = FieldSelectValueType\nexport type FieldSelectGroupItem = any\nexport type FieldSelectGroupHeader = FieldSelectGroupItem & {\n isGroupHeader: boolean\n}\n\nexport interface GroupedOptionsConfig<OptionItem, GroupItem>\n extends OptionList<OptionItem> {\n /**\n * @since 10.19.0\n */\n comparator?: (query: string, value: string) => boolean\n /**\n * @since 10.19.0\n */\n getGroup: (option: OptionItem) => number | string\n /**\n * The id of group `(group: GroupItem) => string | number`\n *\n * Default:\n *\n * `(group) => group.id`\n *\n * @since 10.19.0\n */\n groupGetId: (group: GroupItem) => number | string\n /**\n * @since 10.19.0\n */\n optgroups?: GroupItem[]\n /**\n * @since 10.19.0\n */\n value?: OptionItem\n}\n\nexport interface SelectOptionRendererProps extends SelectOptionProps {\n /**\n * @since 12.13.0\n */\n getId: OptionList<FieldSelectOptionItem>['getId']\n\n /**\n * @since 12.13.0\n */\n getLabel: OptionList<FieldSelectOptionItem>['getLabel']\n}\n\nexport interface FieldSelectComponentProps<\n Value = FieldSelectValueType,\n OptionItem = FieldSelectOptionItem,\n GroupItem = FieldSelectGroupItem\n> extends FormFieldValueComponentProps<Value>,\n Partial<OptionList<OptionItem>>,\n Omit<SelectProps, 'onClear' | 'onSearch' | 'error' | 'children'> {\n /**\n * Callback for each entry in `options` to define relation to\n * group in `optgroups`\n * `(option: OptionItem) => string | number`\n * @since 10.19.0\n * */\n getGroup?: (option: OptionItem) => number | string\n /**\n * @since 10.19.0\n */\n groupGetId?: (group: GroupItem) => number | string\n\n /**\n * The display label of a group\n * `(group: GroupItem) => string`\n *\n * Default:\n * `(group: GroupItem) => group.label || group.name`\n * @since 10.19.0\n */\n groupGetLabel?: (group: GroupItem) => string\n\n /**\n * Callback for rendering header for each entry in `optgroups`\n * `(group: GroupItem) => React.ReactNode`\n * @since 10.19.0\n */\n groupHeaderRenderer?: (group: GroupItem) => React.ReactNode\n\n /**\n * If nothing is selected, suggest this option. From `Select.Option suggested`.\n * `(option: OptionItem) => boolean`\n * @since 10.19.0\n */\n isSuggestedOption?: (option: OptionItem) => boolean\n\n /**\n * Array of available option groups\n * @since 10.19.0\n */\n optgroups?: GroupItem[]\n\n /**\n * Callback for rendering each `option`\n * `(option: OptionItem) => React.ReactNode`\n * @since 10.19.0\n */\n optionRenderer?: (\n option: OptionItem,\n props?: SelectOptionRendererProps\n ) => React.ReactNode\n /**\n * @since 10.19.0\n */\n onBlur?: (e: React.FocusEvent<HTMLDivElement>) => void\n\n /**\n * Callback for when cleared. Default enabled, has clear icon.\n * @since 10.19.0\n */\n onClear?: false | SelectButtonProps['onClear']\n\n /**\n * Callback for when searching. Default enabled, has seach bar in menu.\n * @since 10.19.0\n */\n onSearch?: false | SelectProps['onSearch']\n\n /**\n * Customize how search works\n * `(query: string, value: string) => boolean`\n * @since 10.19.0\n */\n searchComparator?: (query: string, value: string) => boolean\n}\nexport interface FormSelectProps<\n Value = FieldSelectValueType,\n OptionItem = FieldSelectOptionItem,\n GroupItem = FieldSelectGroupItem\n> extends FormFieldProps<Value>,\n Partial<OptionList<OptionItem>>,\n Pick<\n FieldSelectComponentProps<Value, OptionItem, GroupItem>,\n | 'getGroup'\n | 'groupGetId'\n | 'groupGetLabel'\n | 'groupHeaderRenderer'\n | 'isSuggestedOption'\n | 'onBlur'\n | 'onClear'\n | 'optgroups'\n | 'onSearch'\n | 'optionRenderer'\n | 'searchComparator'\n >,\n Omit<\n SelectProps,\n 'onClear' | 'onSearch' | 'error' | 'children' | 'label'\n > {}\n\n// PILL SELECT\n\nexport type FieldPillSelectValueType = any\n\ninterface PillSelectCommon\n extends Omit<PillSelectProps, 'children' | 'onClear' | 'error' | 'value'> {\n /**\n * @since 10.19.0\n */\n onClear?: false | PillSelectProps['onClear']\n}\n\nexport interface FieldPillSelectComponentProps<Value = FieldPillSelectValueType>\n extends FormFieldValueComponentProps<Value>,\n PillSelectCommon {}\n\nexport interface FormPillSelectProps<Value = FieldPillSelectValueType>\n extends FormFieldProps<Value>,\n PillSelectCommon {}\n\n// MULTISELECT\n\nexport type FieldMultiSelectValueType = any[]\n\ninterface MultiSelectCommon<Value>\n extends Partial<OptionList<ValueInArray<Value>>>,\n Omit<MultiSelectProps, 'options' | 'getLabel' | 'getId' | 'error'> {}\n\nexport interface FieldMultiSelectComponentProps<\n Value = FieldMultiSelectValueType\n> extends FormFieldValueComponentProps<Value>,\n MultiSelectCommon<Value> {}\n\nexport interface FormMultiSelectProps<Value = FieldMultiSelectValueType>\n extends FormFieldProps<Value>,\n MultiSelectCommon<Value> {}\n\n// GROUP SELECT\n\nexport type FieldGroupSelectValueType = any[]\n\ninterface GroupSelectCommon<Value>\n extends Partial<OptionList<Value[keyof Value]>>,\n Omit<GroupSelectProps, 'options' | 'getLabel' | 'getId' | 'error'> {}\n\nexport interface FieldGroupSelectComponentProps<\n Value = FieldGroupSelectValueType\n> extends FormFieldValueComponentProps<Value>,\n GroupSelectCommon<Value> {}\n\nexport interface FormGroupSelectProps<Value = FieldGroupSelectValueType>\n extends FormFieldProps<Value>,\n GroupSelectCommon<Value> {}\n\n// TIERED SELECT\n\nexport type FieldTieredSelectValueType = any[]\n\ninterface TieredSelectCommon<Value>\n extends Partial<OptionList<Value[keyof Value]>>,\n Omit<\n TieredSelectProps,\n 'options' | 'getLabel' | 'getId' | 'error' | 'children'\n > {}\n\nexport interface FieldTieredSelectComponentProps<\n Value = FieldTieredSelectValueType\n> extends FormFieldValueComponentProps<Value>,\n TieredSelectCommon<Value> {}\n\nexport interface FormTieredSelectProps<Value = FieldTieredSelectValueType>\n extends FormFieldProps<Value>,\n TieredSelectCommon<Value> {}\n"],"mappings":""}
1
+ {"version":3,"file":"Form.types.js","names":[],"sources":["../../src/Form/Form.types.ts"],"sourcesContent":["import type {\n FieldHelperProps,\n FieldInputProps,\n FieldMetaProps as FormikFieldMetaProps,\n FieldValidator,\n FormikConfig,\n} from 'formik'\nimport type React from 'react'\nimport type { CheckboxProps } from '../Checkbox/Checkbox.types'\nimport type { DateSelectProps } from '../DateSelect'\nimport type { GroupSelectProps } from '../GroupSelect/GroupSelect.types'\nimport type { InputProps } from '../Input/Input.types'\nimport type { MultiSelectProps } from '../MultiSelect/MultiSelect.types'\nimport type {\n CurrencyInputProps,\n InputValue as BaseNumberInputValueType,\n Locale,\n NumberInputProps,\n} from '../NumberInput/NumberInput.types'\nimport type { PillSelectProps } from '../PillSelect/PillSelect.types'\nimport type {\n SelectButtonProps,\n SelectOptionProps,\n SelectProps,\n} from '../Select/Select.types'\nimport type { TextAreaProps } from '../TextArea/TextArea.types'\nimport type { TextEditorProps } from '../TextEditor'\nimport type { TieredSelectProps } from '../TieredSelect/TieredSelect.types'\nimport type { TooltipProps } from '../Tooltip/Tooltip.types'\nimport type { Props } from '../_utils/types'\n\nexport type ValueInArray<V> = V[keyof V]\nexport type View = 'create' | 'read' | 'update'\nexport type Layout = 'wxp' | 'traditional'\n\nexport interface FormContextAPI {\n /**\n * @since 10.19.0\n */\n different: boolean\n /**\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n enableReinitialize?: boolean\n /**\n * @since 10.19.0\n */\n setFieldDifferent: (key: string, different: boolean) => void\n\n /**\n * A [Yup](https://github.com/jquense/yup) object schema to\n * validate all values.\n * ```\n * {`Yup.object().shape({\n * input_name: Yup.mixed().required()\n * })`}\n * ```\n * This is a great way to get error messages into the component. In\n * addition, if using Yup for required, those fields will automatically\n * get the required asterisk and highlight error.\n * @since 10.19.0\n */\n validationSchema?: FormikConfig<unknown>['validationSchema']\n\n /**\n * Toggle between modern and traditional form styles. Leave blank for the\n * modern label-above layout.\n * @since 10.19.0\n * @deprecated The `traditional` field layout variant is deprecated and `variant` property will be removed\n * in a future version. Use the default field layout (`wxp`) instead.\n *\n * Note that in the default field layout, you need to explicitly specify the `colStart` property:\n *\n * BEFORE\n *\n * ```\n * <Form.Row>\n * <Form.Text />\n * <Form.Number />\n * </Form.Row>\n * ```\n *\n * AFTER\n *\n * ```\n * <Form.Row>\n * <Form.Text colStart={1} />\n * <Form.Number colStart={7} />\n * </Form.Row>\n * ```\n *\n * We plan to remove this limitation in a future release.\n *\n * @deprecatedSince 12.18.0\n */\n variant: Layout\n\n /**\n * Determines show or edit state of form.\n * @default 'create'\n * @since 10.19.0\n */\n view: View\n}\n\ninterface FieldMetaProps<Value>\n extends Omit<FormikFieldMetaProps<Value>, 'error'> {\n /**\n * @since 10.19.0\n */\n disabled: boolean\n /**\n * @since 10.19.0\n */\n error: boolean\n /**\n * @since 10.19.0\n */\n required: boolean\n /**\n * @since 10.19.0\n */\n view: View\n}\n\nexport interface FieldConfig {\n /**\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean | string\n /**\n * @since 10.19.0\n */\n getId?: (item: any) => string | number\n /**\n * @since 10.19.0\n */\n name: string\n /**\n * @since 10.19.0\n */\n required?: boolean\n /**\n * @since 10.19.0\n */\n validate?: FieldValidator\n /**\n * @since 10.19.0\n */\n view?: View\n}\n\nexport interface FormFieldAPI<Value> {\n /**\n * @since 10.19.0\n */\n input: FieldInputProps<Value>\n /**\n * @since 10.19.0\n */\n helpers: {\n setValue: (\n value: Value,\n shouldValidate?: boolean,\n shouldMarkDifferent?: boolean\n ) => void\n setTouched: FieldHelperProps<Value>['setTouched']\n setError: FieldHelperProps<Value>['setError']\n }\n\n /**\n * @since 10.19.0\n */\n messages: {\n error?: string\n }\n /**\n * @since 10.19.0\n */\n meta: FieldMetaProps<Value>\n}\n\nexport interface FormProps<Values> extends Partial<FormikConfig<Values>> {\n /**\n * @since 10.19.0\n */\n children: React.ReactNode | (() => React.ReactNode)\n\n /**\n * Enable a browser confirmation about losing of unsaved data when the\n * form values are visually different from the initial values. Uses\n * `window.onbeforeunload` and `window.confirm` for dialogs(Modal, Tearsheet).\n * **Requires `onSubmit` to return a promise to remove onbeforeunload.**\n * @a11y To prevent accidental data loss, it is recommended to enable.\n * @default false\n */\n enableConfirmNavigation?: boolean\n\n /**\n * Disable all fields at once.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Submit the form. A promise is required to notify `Form` to make state changes like toggling `isSubmitting` and resetting `enableConfirmNavigation` (removing `window.onbeforeunload`) in the component.\n\n - Recommended: `onSubmit` returns a promise, it will wait for `onSuccess`.\n - Ok: `onSubmit` function is `async` and it returns undefined, it will always be considered a success.\n - Caution: `onSubmit` function is synchronous and it returns undefined, it will never reset certain states.\n\n A `button type='submit'` inside the `Form.Form` component (`form` tag) will trigger submission. If any validations fail, the submission will not continue.\n\n @example\n function(values, actions) {\n return new Promise(\n async function(onSuccess, onError) {\n const success = await _network(values)\n\n if (success) {\n return onSuccess('Successful Server Response')\n } else {\n actions.setFieldError('text', 'Example Error Message')\n return onError('Failed Server Response')\n }\n }\n )\n }\n\n */\n // TODO breaking change found v11 24-5-13\n // Our Partial<> usage above allows optional onSubmit,\n // even though Formik requires onSubmit. Keep ? for backwards compat.\n onSubmit?: FormikConfig<Values>['onSubmit']\n\n /**\n * Toggle between modern and traditional form styles. Leave blank for the modern label-above layout.\n * @deprecated The `traditional` field layout variant is deprecated and `variant` property will be removed\n * in a future version. Use the default field layout (`wxp`) instead.\n * @deprecatedSince 12.18.0\n */\n variant?: Layout\n\n /**\n * Determines show or edit state of form.\n * @default 'create'\n */\n view?: View\n}\n\nexport type FormFieldValueComponentProps<Value = any> = {\n field: FormFieldAPI<Value>\n}\n\nexport type ComponentWithFieldProp<\n Value,\n Props extends FormFieldValueComponentProps<Value>\n> =\n | React.FunctionComponent<Props>\n | React.ForwardRefExoticComponent<Props>\n | ((p: Props) => React.ReactNode)\n\nexport interface BaseFieldProps<\n Value,\n ComponentProps extends FormFieldValueComponentProps<Value>\n> {\n /**\n * Customize the input component, either a single component for all views\n * or an object with the keys of the views to render on that particular\n * view. This input component will receive the `field` prop.\n * If using TypeScript, these components will need to extend a specific\n * type from Core React, read more about the [props per view](#typescript-ans-as-prop-components)\n *\n * One of:\n *\n * `ReactComponent` or\n * `\n * {\n * '{ read: ReactComponent, create: ReactComponent, update: ReactComponent }'\n * }\n * `\n * @since 10.19.0\n */\n as?:\n | ComponentWithFieldProp<Value, ComponentProps>\n | { [V in View]: ComponentWithFieldProp<Value, ComponentProps> }\n\n /**\n * A subcomponent to render on a particular view.\n *\n * One or all of:\n *\n * `Form.X.Create, Form.X.Read, Form.X.Update`\n * @since 10.19.0\n */\n children?: ((field: FormFieldAPI<Value>) => React.ReactNode) | React.ReactNode\n\n /**\n * Starting location of column. For traditional variant, this does not exist\n * and is not necessary.\n * @since 10.19.0\n * */\n colStart?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n\n /**\n * Width of column. For traditional variant, will be either 6 or 12.\n * @default 6\n * @since 10.19.0\n */\n colWidth?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n /**\n * @since 10.19.0\n */\n ['data-qa']?: string\n\n /**\n * Specify disabled. Field disabled replaces the overall Form disabled state.\n * @since 10.19.0\n */\n disabled?: boolean\n /**\n * @since 10.19.0\n */\n error?: boolean | string\n /**\n * @since 10.19.0\n */\n label?: string\n /**\n * @since 11.25.0\n */\n description?: React.ReactNode\n /**\n * Key path in store. Accepts `bracket[notation]` or `dot.notation`.\n * @since 10.19.0\n */\n name: string\n\n /**\n * The required asterisk if not using Yup `required`\n * ```\n * <Form\n * validationSchema={Yup.object().shape({\n * input_name: Yup.mixed().required(),\n * })}\n * >\n * ```\n * @since 10.19.0\n */\n required?: boolean\n\n /**\n * @since 10.19.0\n */\n tooltip?: TooltipProps['overlay']\n\n /**\n * The validate function from Formik for single field validation.\n * ```\n * (value: Value = any) => undefined | string | Promise<Value>\n * ```\n * @since 10.19.0\n */\n validate?: FieldValidator\n\n /**\n * Determines show or edit state of field.\n * @since 10.19.0\n */\n view?: View\n}\n\n/** @deprecated The traditional field layout is deprecated */\nexport interface TraditionalBaseFieldProps<\n Value,\n ComponentProps extends FormFieldValueComponentProps<Value>\n> extends Omit<BaseFieldProps<Value, ComponentProps>, 'colWidth' | 'colStart'> {\n /**\n * @since 10.19.0\n */\n colWidth?: 6 | 12\n}\n\nexport interface FormFieldProps<Value>\n extends Omit<\n BaseFieldProps<Value, FormFieldValueComponentProps<Value>>,\n 'children'\n > {\n /**\n * @since 10.19.0\n */\n children?:\n | React.ReactElement<\n BaseFieldProps<Value, FormFieldValueComponentProps<Value>>\n >\n | React.ReactElement<\n BaseFieldProps<Value, FormFieldValueComponentProps<Value>>\n >[]\n}\n\nexport type OptionList<OptionShape = any> = {\n /**\n * The id of an option\n * @since 10.19.0\n * @default (option: OptionItem) => option.id\n */\n getId: (option: OptionShape) => string | number\n\n /**\n * The display label of an option\n *\n * `(option: OptionItem) => string`\n *\n * Default:\n *\n * `(option: OptionItem) => option.label || option.name`\n *\n * @since 10.19.0\n */\n getLabel: (option: OptionShape) => string\n\n /**\n * @since 10.19.0\n */\n options?: OptionShape[]\n}\n\nexport interface FormErrorBannerProps {\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 10.19.0\n */\n item: string\n}\n\n// MAKE\n\nexport type ViewFieldProps<\n Value,\n FieldTypeProps extends FormFieldProps<Value>,\n ComponentProps extends FormFieldValueComponentProps<Value>\n> = Partial<Omit<FieldTypeProps, 'children'>> & {\n /**\n * @since 10.19.0\n */\n children?: BaseFieldProps<Value, ComponentProps>['children']\n}\n\n// TEXT\n\nexport type FieldTextValueType = string\n\nexport interface FieldTextComponentProps<Value = FieldTextValueType>\n extends FormFieldValueComponentProps<Value>,\n InputProps {}\nexport interface FormTextProps<Value = FieldTextValueType>\n extends FormFieldProps<Value>,\n Omit<InputProps, 'name' | 'children' | 'error'> {}\n\n// NUMBER\n\nexport type FieldNumberValueType = BaseNumberInputValueType\n\nexport interface FieldNumberComponentProps<Value = FieldNumberValueType>\n extends FormFieldValueComponentProps<Value>,\n NumberInputProps {\n /**\n * A string with a BCP 47 language tag or an array of such strings which specifies number formatting.\n * @defaultValue en-US\n * @since 10.19.0\n */\n locale?: Locale\n}\n\nexport interface FormNumberProps<Value = FieldNumberValueType>\n extends FormFieldProps<Value>,\n Omit<NumberInputProps, 'name' | 'children' | 'error'> {}\n\n// CURRENCY\n\nexport type FieldCurrencyValueType = BaseNumberInputValueType\n\nexport interface FieldCurrencyComponentProps<Value = FieldCurrencyValueType>\n extends FormFieldValueComponentProps<Value>,\n CurrencyInputProps {}\n\nexport interface FormCurrencyProps<Value = FieldCurrencyValueType>\n extends FormFieldProps<Value>,\n Omit<CurrencyInputProps, 'name' | 'children' | 'error'> {}\n\n// DATE\nexport type FieldDateValueType = null | string | Date\n\nexport interface FieldDateComponentProps<Value = FieldDateValueType>\n extends FormFieldValueComponentProps<Value>,\n DateSelectProps {}\n\nexport interface FormDateProps<Value = FieldDateValueType>\n extends FormFieldProps<Value>,\n Omit<DateSelectProps, 'error'> {}\n\n// CHECKBOX\n\nexport type FieldCheckboxValueType = boolean\n\nexport interface FieldCheckboxComponentProps<Value = FieldCheckboxValueType>\n extends FormFieldValueComponentProps<Value>,\n CheckboxProps {\n /**\n * Next to checkbox label\n * @since 11.25.0\n */\n inlineLabel?: string\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n /**\n * @since 11.25.0\n */\n tooltip?: TooltipProps['overlay']\n /**\n * @since 11.25.0\n */\n hasRequiredMark?: boolean\n}\n\nexport interface FormCheckboxProps<Value = FieldCheckboxValueType>\n extends FormFieldProps<Value>,\n Omit<CheckboxProps, 'name' | 'error' | 'children'> {\n /**\n * Next to checkbox label\n * @since 11.25.0\n */\n inlineLabel?: string\n /**\n * Below checkbox description\n * @since 11.25.0\n */\n inlineDescription?: React.ReactNode\n /**\n * @since 10.19.0\n */\n i18nScope?: string\n}\n\n// TEXTAREA\n\nexport type FieldTextAreaValueType = string\n\nexport interface FieldTextAreaComponentProps<Value = FieldTextAreaValueType>\n extends FormFieldValueComponentProps<Value>,\n TextAreaProps {}\nexport interface FormTextAreaProps<Value = FieldTextAreaValueType>\n extends FormFieldProps<Value>,\n Omit<TextAreaProps, 'name' | 'error' | 'children'> {}\n\n// RICHTEXT\n\nexport type FieldRichTextValueType = string\n\nexport interface FieldRichTextComponentProps<Value = FieldRichTextValueType>\n extends FormFieldValueComponentProps<Value>,\n TextEditorProps {}\n\nexport interface FormRichTextProps<Value = FieldRichTextValueType>\n extends Omit<FormFieldProps<Value>, 'error'>,\n TextEditorProps {\n /** Future facing prop for decoupling the editor from the form. Will be required in v13. */\n textEditorComponent?: React.ComponentType<any>\n}\n\n// RADIO BUTTONS\n\nexport type FieldRadioButtonsValueType = any\n\nexport interface FieldRadioButtonsComponentProps<\n Value = FieldRadioButtonsValueType\n> extends FormFieldValueComponentProps<Value>,\n Partial<OptionList<Value>>,\n Pick<Props, 'className' | 'style'> {\n /**\n * @since 10.19.0\n */\n isDisabledOption?: (option: Value) => boolean\n}\n\nexport interface FormRadioButtonsProps<Value = FieldRadioButtonsValueType>\n extends FormFieldProps<Value>,\n Partial<OptionList<Value>>,\n Pick<Props, 'className' | 'style'>,\n Pick<FieldRadioButtonsComponentProps, 'isDisabledOption'> {}\n\n// CHECKBOXES\n\nexport type FieldCheckboxesValueType = any[]\n\nexport interface FieldCheckboxesComponentProps<Value = FieldCheckboxesValueType>\n extends FormFieldValueComponentProps<Value>,\n Partial<OptionList<ValueInArray<Value>>>,\n Pick<Props, 'className' | 'style'> {\n /**\n * @since 10.19.0\n */\n isDisabledOption?: (option: Value) => boolean\n /**\n * @since 10.19.0\n */\n isIndeterminateOption?: (option: Value) => boolean\n}\n\nexport interface FormCheckboxesProps<Value = FieldCheckboxesValueType>\n extends FormFieldProps<Value>,\n Partial<OptionList<ValueInArray<Value>>>,\n Pick<Props, 'className' | 'style'>,\n Pick<\n FieldCheckboxesComponentProps,\n 'isDisabledOption' | 'isIndeterminateOption'\n > {}\n\n// SELECT\n\nexport type FieldSelectValueType = any\nexport type FieldSelectOptionItem = FieldSelectValueType\nexport type FieldSelectGroupItem = any\nexport type FieldSelectGroupHeader = FieldSelectGroupItem & {\n isGroupHeader: boolean\n /**\n * @since 12.39.0\n */\n options: FieldSelectOptionItem[]\n}\n\nexport interface GroupedOptionsConfig<OptionItem, GroupItem>\n extends OptionList<OptionItem> {\n /**\n * @since 10.19.0\n */\n comparator?: (query: string, value: string) => boolean\n /**\n * @since 10.19.0\n */\n getGroup: (option: OptionItem) => number | string\n /**\n * The id of group `(group: GroupItem) => string | number`\n *\n * Default:\n *\n * `(group) => group.id`\n *\n * @since 10.19.0\n */\n groupGetId: (group: GroupItem) => number | string\n /**\n * @since 10.19.0\n */\n optgroups?: GroupItem[]\n /**\n * @since 10.19.0\n */\n value?: OptionItem\n}\n\nexport interface SelectOptionRendererProps extends SelectOptionProps {\n /**\n * @since 12.13.0\n */\n getId: OptionList<FieldSelectOptionItem>['getId']\n\n /**\n * @since 12.13.0\n */\n getLabel: OptionList<FieldSelectOptionItem>['getLabel']\n}\n\nexport interface FieldSelectComponentProps<\n Value = FieldSelectValueType,\n OptionItem = FieldSelectOptionItem,\n GroupItem = FieldSelectGroupItem\n> extends FormFieldValueComponentProps<Value>,\n Partial<OptionList<OptionItem>>,\n Omit<SelectProps, 'onClear' | 'onSearch' | 'error' | 'children'> {\n /**\n * Callback for each entry in `options` to define relation to\n * group in `optgroups`\n * `(option: OptionItem) => string | number`\n * @since 10.19.0\n * */\n getGroup?: (option: OptionItem) => number | string\n /**\n * @since 10.19.0\n */\n groupGetId?: (group: GroupItem) => number | string\n\n /**\n * The display label of a group\n * `(group: GroupItem) => string`\n *\n * Default:\n * `(group: GroupItem) => group.label || group.name`\n * @since 10.19.0\n */\n groupGetLabel?: (group: GroupItem) => string\n\n /**\n * Callback for rendering header for each entry in `optgroups`\n * `(group: GroupItem) => React.ReactNode`\n * @since 10.19.0\n * @deprecated The `groupHeaderRenderer` prop is deprecated and will be removed in a future version. Use `groupRenderer` instead to customize the entire group rendering, including the header.\n * @deprecatedSince 12.39.0\n */\n groupHeaderRenderer?: (\n group: GroupItem,\n params: {\n getId: OptionList<GroupItem>['getId']\n getLabel: OptionList<GroupItem>['getLabel']\n children?: React.ReactNode\n }\n ) => React.ReactNode\n\n /**\n * Callback for rendering group wrapper for each entry in `optgroups`\n * `(group: GroupItem) => React.ReactNode`\n * @since 12.39.0\n */\n groupRenderer?: (\n group: GroupItem,\n params: {\n getId: OptionList<GroupItem>['getId']\n getLabel: OptionList<GroupItem>['getLabel']\n children?: React.ReactNode\n }\n ) => React.ReactNode\n\n /**\n * If nothing is selected, suggest this option. From `Select.Option suggested`.\n * `(option: OptionItem) => boolean`\n * @since 10.19.0\n */\n isSuggestedOption?: (option: OptionItem) => boolean\n\n /**\n * Array of available option groups\n * @since 10.19.0\n */\n optgroups?: GroupItem[]\n\n /**\n * Callback for rendering each `option`\n * `(option: OptionItem) => React.ReactNode`\n * @since 10.19.0\n */\n optionRenderer?: (\n option: OptionItem,\n props?: SelectOptionRendererProps\n ) => React.ReactNode\n /**\n * @since 10.19.0\n */\n onBlur?: (e: React.FocusEvent<HTMLDivElement>) => void\n\n /**\n * Callback for when cleared. Default enabled, has clear icon.\n * @since 10.19.0\n */\n onClear?: false | SelectButtonProps['onClear']\n\n /**\n * Callback for when searching. Default enabled, has seach bar in menu.\n * @since 10.19.0\n */\n onSearch?: false | SelectProps['onSearch']\n\n /**\n * Customize how search works\n * `(query: string, value: string) => boolean`\n * @since 10.19.0\n */\n searchComparator?: (query: string, value: string) => boolean\n}\nexport interface FormSelectProps<\n Value = FieldSelectValueType,\n OptionItem = FieldSelectOptionItem,\n GroupItem = FieldSelectGroupItem\n> extends FormFieldProps<Value>,\n Partial<OptionList<OptionItem>>,\n Pick<\n FieldSelectComponentProps<Value, OptionItem, GroupItem>,\n | 'getGroup'\n | 'groupGetId'\n | 'groupGetLabel'\n | 'groupHeaderRenderer'\n | 'groupRenderer'\n | 'isSuggestedOption'\n | 'onBlur'\n | 'onClear'\n | 'optgroups'\n | 'onSearch'\n | 'optionRenderer'\n | 'searchComparator'\n >,\n Omit<\n SelectProps,\n 'onClear' | 'onSearch' | 'error' | 'children' | 'label'\n > {}\n\n// PILL SELECT\n\nexport type FieldPillSelectValueType = any\n\ninterface PillSelectCommon\n extends Omit<PillSelectProps, 'children' | 'onClear' | 'error' | 'value'> {\n /**\n * @since 10.19.0\n */\n onClear?: false | PillSelectProps['onClear']\n}\n\nexport interface FieldPillSelectComponentProps<Value = FieldPillSelectValueType>\n extends FormFieldValueComponentProps<Value>,\n PillSelectCommon {}\n\nexport interface FormPillSelectProps<Value = FieldPillSelectValueType>\n extends FormFieldProps<Value>,\n PillSelectCommon {}\n\n// MULTISELECT\n\nexport type FieldMultiSelectValueType = any[]\n\ninterface MultiSelectCommon<Value>\n extends Partial<OptionList<ValueInArray<Value>>>,\n Omit<MultiSelectProps, 'options' | 'getLabel' | 'getId' | 'error'> {}\n\nexport interface FieldMultiSelectComponentProps<\n Value = FieldMultiSelectValueType\n> extends FormFieldValueComponentProps<Value>,\n MultiSelectCommon<Value> {}\n\nexport interface FormMultiSelectProps<Value = FieldMultiSelectValueType>\n extends FormFieldProps<Value>,\n MultiSelectCommon<Value> {}\n\n// GROUP SELECT\n\nexport type FieldGroupSelectValueType = any[]\n\ninterface GroupSelectCommon<Value>\n extends Partial<OptionList<Value[keyof Value]>>,\n Omit<GroupSelectProps, 'options' | 'getLabel' | 'getId' | 'error'> {}\n\nexport interface FieldGroupSelectComponentProps<\n Value = FieldGroupSelectValueType\n> extends FormFieldValueComponentProps<Value>,\n GroupSelectCommon<Value> {}\n\nexport interface FormGroupSelectProps<Value = FieldGroupSelectValueType>\n extends FormFieldProps<Value>,\n GroupSelectCommon<Value> {}\n\n// TIERED SELECT\n\nexport type FieldTieredSelectValueType = any[]\n\ninterface TieredSelectCommon<Value>\n extends Partial<OptionList<Value[keyof Value]>>,\n Omit<\n TieredSelectProps,\n 'options' | 'getLabel' | 'getId' | 'error' | 'children'\n > {}\n\nexport interface FieldTieredSelectComponentProps<\n Value = FieldTieredSelectValueType\n> extends FormFieldValueComponentProps<Value>,\n TieredSelectCommon<Value> {}\n\nexport interface FormTieredSelectProps<Value = FieldTieredSelectValueType>\n extends FormFieldProps<Value>,\n TieredSelectCommon<Value> {}\n"],"mappings":""}
@@ -1,18 +1,11 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
- import { Tooltip } from '../Tooltip';
4
- import { useI18nContext } from '../_hooks/I18n';
5
- import { StyledFormFieldTooltipIcon } from './Form.styles';
3
+ import { Tooltip, TooltipIconOnlyButton } from '../Tooltip/Tooltip';
6
4
  export var FormFieldTooltip = function FormFieldTooltip(props) {
7
- var i18n = useI18nContext();
8
5
  return /*#__PURE__*/React.createElement(Tooltip, _extends({
9
- role: "tooltip",
10
- trigger: ['hover', 'focus']
11
- }, props), /*#__PURE__*/React.createElement(StyledFormFieldTooltipIcon, {
12
- "aria-label": i18n.t('core.form.field.tooltipHelp'),
13
- "aria-hidden": false,
14
- size: "sm",
15
- tabIndex: 0
6
+ trackAriaExpanded: true
7
+ }, props), /*#__PURE__*/React.createElement(TooltipIconOnlyButton, {
8
+ "data-qa": "form-field-tooltip-icon"
16
9
  }));
17
10
  };
18
11
  //# sourceMappingURL=FormFieldTooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldTooltip.js","names":["React","Tooltip","useI18nContext","StyledFormFieldTooltipIcon","FormFieldTooltip","props","i18n","createElement","_extends","role","trigger","t","size","tabIndex"],"sources":["../../src/Form/FormFieldTooltip.tsx"],"sourcesContent":["import React from 'react'\nimport type { OverlayTriggerProps } from '../OverlayTrigger'\nimport type { TooltipProps } from '../Tooltip'\nimport { Tooltip } from '../Tooltip'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { StyledFormFieldTooltipIcon } from './Form.styles'\n\nexport const FormFieldTooltip: React.FC<\n Omit<OverlayTriggerProps & TooltipProps, 'children'>\n> = (props) => {\n const i18n = useI18nContext()\n\n return (\n <Tooltip role=\"tooltip\" trigger={['hover', 'focus']} {...props}>\n <StyledFormFieldTooltipIcon\n aria-label={i18n.t('core.form.field.tooltipHelp')}\n aria-hidden={false}\n size=\"sm\"\n tabIndex={0}\n />\n </Tooltip>\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,0BAA0B,QAAQ,eAAe;AAE1D,OAAO,IAAMC,gBAEZ,GAAG,SAFSA,gBAEZA,CAAIC,KAAK,EAAK;EACb,IAAMC,IAAI,GAAGJ,cAAc,CAAC,CAAC;EAE7B,oBACEF,KAAA,CAAAO,aAAA,CAACN,OAAO,EAAAO,QAAA;IAACC,IAAI,EAAC,SAAS;IAACC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO;EAAE,GAAKL,KAAK,gBAC5DL,KAAA,CAAAO,aAAA,CAACJ,0BAA0B;IACzB,cAAYG,IAAI,CAACK,CAAC,CAAC,6BAA6B,CAAE;IAClD,eAAa,KAAM;IACnBC,IAAI,EAAC,IAAI;IACTC,QAAQ,EAAE;EAAE,CACb,CACM,CAAC;AAEd,CAAC"}
1
+ {"version":3,"file":"FormFieldTooltip.js","names":["React","Tooltip","TooltipIconOnlyButton","FormFieldTooltip","props","createElement","_extends","trackAriaExpanded"],"sources":["../../src/Form/FormFieldTooltip.tsx"],"sourcesContent":["import React from 'react'\nimport type { OverlayTriggerProps } from '../OverlayTrigger'\nimport type { TooltipProps } from '../Tooltip'\nimport { Tooltip, TooltipIconOnlyButton } from '../Tooltip/Tooltip'\n\nexport const FormFieldTooltip: React.FC<\n Omit<OverlayTriggerProps & TooltipProps, 'children'>\n> = (props) => {\n return (\n <Tooltip trackAriaExpanded {...props}>\n <TooltipIconOnlyButton data-qa=\"form-field-tooltip-icon\" />\n </Tooltip>\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,SAASC,OAAO,EAAEC,qBAAqB,QAAQ,oBAAoB;AAEnE,OAAO,IAAMC,gBAEZ,GAAG,SAFSA,gBAEZA,CAAIC,KAAK,EAAK;EACb,oBACEJ,KAAA,CAAAK,aAAA,CAACJ,OAAO,EAAAK,QAAA;IAACC,iBAAiB;EAAA,GAAKH,KAAK,gBAClCJ,KAAA,CAAAK,aAAA,CAACH,qBAAqB;IAAC,WAAQ;EAAyB,CAAE,CACnD,CAAC;AAEd,CAAC"}
@@ -5,13 +5,13 @@ import { spacing } from '../_styles/spacing';
5
5
  import { formWrapper } from './Form.styles';
6
6
  export var StyledFormikForm = /*#__PURE__*/styled(FormikForm).withConfig({
7
7
  displayName: "StyledFormikForm",
8
- componentId: "core-12_37_0__sc-1ks7m0l-0"
8
+ componentId: "core-12_39_0__sc-1ks7m0l-0"
9
9
  })(["", ""], formWrapper);
10
10
 
11
11
  /** @deprecated The traditional field layout is deprecated */
12
12
  export var StyledTraditionalFormLabel = /*#__PURE__*/styled(Typography).withConfig({
13
13
  displayName: "StyledTraditionalFormLabel",
14
- componentId: "core-12_37_0__sc-1ks7m0l-1"
14
+ componentId: "core-12_39_0__sc-1ks7m0l-1"
15
15
  })(["display:inline-block;word-break:break-word;word-wrap:break-word;", ""], function (_ref) {
16
16
  var $view = _ref.$view;
17
17
  return ['create', 'update'].includes($view) && css(["padding-top:", "px;"], spacing.sm);
@@ -111,17 +111,6 @@ var SingleForm = function SingleForm(_ref) {
111
111
  } : {
112
112
  description: 'Disabled Initial Description'
113
113
  }, columnTwo, props))), /*#__PURE__*/React.createElement(Form.Row, null, /*#__PURE__*/React.createElement(FieldComponent, _extends({
114
- name: "error-empty",
115
- error: true
116
- }, useLabelAsInlineLabel ? {
117
- inlineLabel: 'Error Boolean Empty Text'
118
- } : {
119
- label: 'Error Boolean Empty Text'
120
- }, useDescriptionAsInlineDescription ? {
121
- inlineDescription: 'Error Boolean Description'
122
- } : {
123
- description: 'Error Boolean Description'
124
- }, columnOne, props)), /*#__PURE__*/React.createElement(FieldComponent, _extends({
125
114
  name: "error-value",
126
115
  error: "Some error message that should be read red"
127
116
  }, useLabelAsInlineLabel ? {
@@ -132,7 +121,7 @@ var SingleForm = function SingleForm(_ref) {
132
121
  inlineDescription: 'Error Message Initial Description'
133
122
  } : {
134
123
  description: 'Error Message Initial Description'
135
- }, columnTwo, props)))));
124
+ }, columnOne, props)))));
136
125
  };
137
126
  export var DemoForm = function DemoForm(_ref2) {
138
127
  var _ref2$view = _ref2.view,