@procore/core-react 12.21.2 → 12.22.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 (388) hide show
  1. package/CHANGELOG.md +6 -8
  2. package/dist/@types/global.d.js.map +1 -1
  3. package/dist/AnchorNavigation/AnchorNavigation.styles.d.ts +6 -5
  4. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  5. package/dist/Avatar/Avatar.styles.d.ts +7 -6
  6. package/dist/Avatar/Avatar.styles.js +5 -5
  7. package/dist/AvatarStack/AvatarStack.styles.d.ts +1677 -13
  8. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  9. package/dist/Badge/Badge.styles.d.ts +3 -2
  10. package/dist/Badge/Badge.styles.js +2 -2
  11. package/dist/Banner/Banner.js +1 -1
  12. package/dist/Banner/Banner.js.map +1 -1
  13. package/dist/Banner/Banner.styles.d.ts +22 -13
  14. package/dist/Banner/Banner.styles.js +12 -12
  15. package/dist/Banner/Banner.styles.js.map +1 -1
  16. package/dist/Box/Box.js +1 -1
  17. package/dist/Box/Box.js.map +1 -1
  18. package/dist/Box/Box.styles.d.ts +2 -1
  19. package/dist/Box/Box.styles.js +3 -3
  20. package/dist/Box/Box.styles.js.map +1 -1
  21. package/dist/Box/Box.types.d.ts +1 -1
  22. package/dist/Box/Box.types.js.map +1 -1
  23. package/dist/Breadcrumbs/Breadcrumbs.styles.d.ts +5 -4
  24. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  25. package/dist/Button/Button.styles.d.ts +8 -6
  26. package/dist/Button/Button.styles.js +5 -5
  27. package/dist/Calendar/Calendar.styles.d.ts +15 -9
  28. package/dist/Calendar/Calendar.styles.js +8 -8
  29. package/dist/Card/Card.styles.d.ts +3 -2
  30. package/dist/Card/Card.styles.js +1 -1
  31. package/dist/Checkbox/Checkbox.styles.d.ts +11 -10
  32. package/dist/Checkbox/Checkbox.styles.js +6 -6
  33. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  34. package/dist/ContactItem/ContactItem.styles.d.ts +18 -7
  35. package/dist/ContactItem/ContactItem.styles.js +5 -5
  36. package/dist/Content/Content.styles.d.ts +6 -2
  37. package/dist/Content/Content.styles.js +2 -2
  38. package/dist/DateInput/DateInput.js +6 -6
  39. package/dist/DateInput/DateInput.js.map +1 -1
  40. package/dist/DateInput/DateInput.styles.d.ts +20 -13
  41. package/dist/DateInput/DateInput.styles.js +21 -23
  42. package/dist/DateInput/DateInput.styles.js.map +1 -1
  43. package/dist/DateSelect/DateSelect.js +2 -2
  44. package/dist/DateSelect/DateSelect.js.map +1 -1
  45. package/dist/DetailPage/DetailPage.styles.d.ts +13 -7
  46. package/dist/DetailPage/DetailPage.styles.js +7 -7
  47. package/dist/Dropdown/Dropdown.styles.d.ts +10 -4
  48. package/dist/Dropdown/Dropdown.styles.js +3 -3
  49. package/dist/DropdownFlyout/DropdownFlyout.js +1 -1
  50. package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
  51. package/dist/DropdownFlyout/DropdownFlyout.styles.d.ts +5 -4
  52. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  53. package/dist/DropdownFlyout/DropdownFlyout.types.d.ts +4 -1
  54. package/dist/DropdownFlyout/DropdownFlyout.types.js.map +1 -1
  55. package/dist/Dropzone/Dropzone.d.ts +3 -1
  56. package/dist/Dropzone/Dropzone.js +5 -5
  57. package/dist/Dropzone/Dropzone.js.map +1 -1
  58. package/dist/Dropzone/Dropzone.styles.d.ts +24 -16
  59. package/dist/Dropzone/Dropzone.styles.js +22 -22
  60. package/dist/Dropzone/Dropzone.styles.js.map +1 -1
  61. package/dist/EmptyState/EmptyState.js +1 -1
  62. package/dist/EmptyState/EmptyState.js.map +1 -1
  63. package/dist/EmptyState/EmptyState.styles.d.ts +8 -7
  64. package/dist/EmptyState/EmptyState.styles.js +6 -6
  65. package/dist/Field/Field.styles.d.ts +4 -3
  66. package/dist/Field/Field.styles.js +3 -3
  67. package/dist/FileList/FileList.styles.d.ts +8 -4
  68. package/dist/FileList/FileList.styles.js +4 -4
  69. package/dist/FileSelect/FileExplorer/FileExplorer.styles.d.ts +18 -10
  70. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  71. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.d.ts +5 -3
  72. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  73. package/dist/FileSelect/FileSelect.d.ts +3 -3
  74. package/dist/FileSelect/FileSelect.js +4 -4
  75. package/dist/FileSelect/FileSelect.js.map +1 -1
  76. package/dist/FileSelect/FileSelect.styles.d.ts +4 -2
  77. package/dist/FileSelect/FileSelect.styles.js +2 -2
  78. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.d.ts +7 -5
  79. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  80. package/dist/FileSelect/FileTokenList/FileTokenList.styles.d.ts +4 -2
  81. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  82. package/dist/FileSelect/GridSource/GridSource.styles.d.ts +11 -9
  83. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  84. package/dist/FileSelect/LocalSource/LocalSource.styles.d.ts +10 -4
  85. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  86. package/dist/FileSelect/SourceItem/SourceItem.styles.d.ts +5 -4
  87. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  88. package/dist/FileSelect/ThumbnailList/ThumbnailList.js +1 -1
  89. package/dist/FileSelect/ThumbnailList/ThumbnailList.js.map +1 -1
  90. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.d.ts +18 -8
  91. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  92. package/dist/FileSelect/TreeSource/TreeSource.styles.d.ts +2 -1
  93. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  94. package/dist/FileToken/FileToken.styles.d.ts +6 -5
  95. package/dist/FileToken/FileToken.styles.js +4 -4
  96. package/dist/FilterToken/FilterToken.styles.d.ts +8 -7
  97. package/dist/FilterToken/FilterToken.styles.js +5 -5
  98. package/dist/FlexList/FlexList.styles.d.ts +4 -2
  99. package/dist/FlexList/FlexList.styles.js +1 -1
  100. package/dist/Form/Form.d.ts +2 -1
  101. package/dist/Form/Form.js.map +1 -1
  102. package/dist/Form/Form.styles.d.ts +48 -25
  103. package/dist/Form/Form.styles.js +18 -18
  104. package/dist/Form/Form.styles.js.map +1 -1
  105. package/dist/Form/Form.types.d.ts +1 -1
  106. package/dist/Form/Form.types.js.map +1 -1
  107. package/dist/Form/StyledFormikForm.styles.d.ts +7 -3
  108. package/dist/Form/StyledFormikForm.styles.js +2 -2
  109. package/dist/GhostPlaceholder/GhostPlaceholder.styles.d.ts +5 -2
  110. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  111. package/dist/Grid/Grid.styles.d.ts +5 -4
  112. package/dist/Grid/Grid.styles.js +2 -2
  113. package/dist/GroupSelect/GroupSelect.js +1 -1
  114. package/dist/GroupSelect/GroupSelect.js.map +1 -1
  115. package/dist/GroupSelect/GroupSelect.styles.d.ts +4 -2
  116. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  117. package/dist/Input/Input.js +5 -1
  118. package/dist/Input/Input.js.map +1 -1
  119. package/dist/Input/Input.styles.d.ts +8 -8
  120. package/dist/Input/Input.styles.js +5 -5
  121. package/dist/Input/Input.styles.js.map +1 -1
  122. package/dist/Link/Link.js +3 -1
  123. package/dist/Link/Link.js.map +1 -1
  124. package/dist/Link/Link.styles.d.ts +4 -1
  125. package/dist/Link/Link.styles.js +4 -4
  126. package/dist/Link/Link.styles.js.map +1 -1
  127. package/dist/Link/Link.types.d.ts +1 -2
  128. package/dist/Link/Link.types.js.map +1 -1
  129. package/dist/ListPage/ListPage.styles.d.ts +9 -8
  130. package/dist/ListPage/ListPage.styles.js +8 -8
  131. package/dist/Loader/Loader.styles.d.ts +4 -3
  132. package/dist/Loader/Loader.styles.js +2 -2
  133. package/dist/Menu/Menu.js +6 -5
  134. package/dist/Menu/Menu.js.map +1 -1
  135. package/dist/MenuImperative/MenuImperative.d.ts +2 -3
  136. package/dist/MenuImperative/MenuImperative.js +8 -26
  137. package/dist/MenuImperative/MenuImperative.js.map +1 -1
  138. package/dist/MenuImperative/MenuImperative.styles.d.ts +15 -13
  139. package/dist/MenuImperative/MenuImperative.styles.js +13 -13
  140. package/dist/MenuImperative/MenuImperative.styles.js.map +1 -1
  141. package/dist/Modal/Modal.d.ts +6 -6
  142. package/dist/Modal/Modal.js +2 -2
  143. package/dist/Modal/Modal.js.map +1 -1
  144. package/dist/Modal/Modal.styles.d.ts +27 -19
  145. package/dist/Modal/Modal.styles.js +13 -13
  146. package/dist/MultiSelect/MultiSelect.js +5 -5
  147. package/dist/MultiSelect/MultiSelect.js.map +1 -1
  148. package/dist/MultiSelect/MultiSelect.styles.d.ts +19 -13
  149. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  150. package/dist/NextMenu/NextMenu.styles.d.ts +4 -3
  151. package/dist/NextMenu/NextMenu.styles.js +3 -3
  152. package/dist/Notation/Notation.js +5 -5
  153. package/dist/Notation/Notation.js.map +1 -1
  154. package/dist/NumberInput/NumberInput.hooks.d.ts +1 -1
  155. package/dist/NumberInput/NumberInput.styles.d.ts +16 -10
  156. package/dist/NumberInput/NumberInput.styles.js +7 -7
  157. package/dist/Overlay/OverlayArrow.styles.d.ts +2 -1
  158. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  159. package/dist/OverlayTrigger/a11yPresets.d.ts +20 -20
  160. package/dist/PageLayout/PageLayout.styles.d.ts +33 -24
  161. package/dist/PageLayout/PageLayout.styles.js +16 -16
  162. package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.d.ts +2 -1
  163. package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
  164. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.d.ts +3 -1
  165. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.js.map +1 -1
  166. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.d.ts +10 -4
  167. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
  168. package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.d.ts +12 -8
  169. package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
  170. package/dist/PageTemplate/PageTemplate/PageTemplate.styles.d.ts +5 -3
  171. package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
  172. package/dist/Pagination/Pagination.styles.d.ts +13 -5
  173. package/dist/Pagination/Pagination.styles.js +5 -5
  174. package/dist/Panel/Panel.js +1 -1
  175. package/dist/Panel/Panel.js.map +1 -1
  176. package/dist/Panel/Panel.styles.d.ts +19 -15
  177. package/dist/Panel/Panel.styles.js +19 -19
  178. package/dist/Panel/Panel.styles.js.map +1 -1
  179. package/dist/Pill/Pill.styles.d.ts +9 -5
  180. package/dist/Pill/Pill.styles.js +2 -2
  181. package/dist/PillSelect/PillSelect.styles.d.ts +7 -5
  182. package/dist/PillSelect/PillSelect.styles.js +4 -4
  183. package/dist/Popover/Popover.styles.d.ts +3 -2
  184. package/dist/Popover/Popover.styles.js +2 -2
  185. package/dist/Portal/Portal.styles.d.ts +2 -1
  186. package/dist/Portal/Portal.styles.js +1 -1
  187. package/dist/ProgressBar/ProgressBar.styles.d.ts +3 -3
  188. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  189. package/dist/RadioButton/RadioButton.styles.d.ts +5 -4
  190. package/dist/RadioButton/RadioButton.styles.js +3 -3
  191. package/dist/Required/Required.styles.d.ts +5 -4
  192. package/dist/Required/Required.styles.js +3 -3
  193. package/dist/Search/Search.js +6 -2
  194. package/dist/Search/Search.js.map +1 -1
  195. package/dist/Search/Search.styles.d.ts +11 -12
  196. package/dist/Search/Search.styles.js +13 -7
  197. package/dist/Search/Search.styles.js.map +1 -1
  198. package/dist/Section/Section.styles.d.ts +11 -9
  199. package/dist/Section/Section.styles.js +7 -7
  200. package/dist/SegmentedController/SegmentedController.js +1 -1
  201. package/dist/SegmentedController/SegmentedController.js.map +1 -1
  202. package/dist/SegmentedController/SegmentedController.styles.d.ts +8 -7
  203. package/dist/SegmentedController/SegmentedController.styles.js +9 -9
  204. package/dist/SegmentedController/SegmentedController.styles.js.map +1 -1
  205. package/dist/Select/Select.js +4 -4
  206. package/dist/Select/Select.js.map +1 -1
  207. package/dist/Select/Select.styles.d.ts +13 -9
  208. package/dist/Select/Select.styles.js +7 -7
  209. package/dist/Semantic/Semantic.styles.d.ts +359 -20
  210. package/dist/Semantic/Semantic.styles.js +11 -12
  211. package/dist/Semantic/Semantic.styles.js.map +1 -1
  212. package/dist/Slider/Slider.styles.d.ts +9 -7
  213. package/dist/Slider/Slider.styles.js +5 -5
  214. package/dist/Spinner/Spinner.styles.d.ts +9 -8
  215. package/dist/Spinner/Spinner.styles.js +7 -7
  216. package/dist/SplitViewCard/SplitViewCard.styles.d.ts +13 -11
  217. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  218. package/dist/SuperSelect/SuperSelect.components.d.ts +1 -1
  219. package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
  220. package/dist/SuperSelect/SuperSelect.presets.styles.d.ts +3 -1
  221. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  222. package/dist/SuperSelect/SuperSelect.styles.d.ts +67 -54
  223. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  224. package/dist/SuperSelect/SuperSelect.styles.js.map +1 -1
  225. package/dist/SuperSelect/SuperSelect.types.d.ts +9 -8
  226. package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
  227. package/dist/SuperSelect/presets/filterPreset.js.map +1 -1
  228. package/dist/SuperSelect/useSuperSelect.js.map +1 -1
  229. package/dist/Switch/Switch.styles.d.ts +6 -5
  230. package/dist/Switch/Switch.styles.js +4 -4
  231. package/dist/Table/Table.d.ts +7 -3
  232. package/dist/Table/Table.js.map +1 -1
  233. package/dist/Table/Table.styles.d.ts +69 -45
  234. package/dist/Table/Table.styles.js +28 -28
  235. package/dist/TableShelf/TableShelf.styles.d.ts +6 -5
  236. package/dist/TableShelf/TableShelf.styles.js +5 -5
  237. package/dist/Tabs/Tabs.styles.d.ts +31 -9
  238. package/dist/Tabs/Tabs.styles.js +15 -15
  239. package/dist/Tearsheet/Tearsheet.styles.d.ts +12 -10
  240. package/dist/Tearsheet/Tearsheet.styles.js +6 -6
  241. package/dist/Tearsheet/Tearsheet.styles.js.map +1 -1
  242. package/dist/TextArea/TextArea.js +6 -2
  243. package/dist/TextArea/TextArea.js.map +1 -1
  244. package/dist/TextArea/TextArea.styles.d.ts +7 -1
  245. package/dist/TextArea/TextArea.styles.js +2 -2
  246. package/dist/TextArea/TextArea.styles.js.map +1 -1
  247. package/dist/TextEditor/TextEditor.styles.d.ts +3 -2
  248. package/dist/TextEditorOutput/TextEditorOutput.styles.d.ts +2 -1
  249. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  250. package/dist/Thumbnail/Thumbnail.hooks.d.ts +129 -139
  251. package/dist/Thumbnail/Thumbnail.js +69 -56
  252. package/dist/Thumbnail/Thumbnail.js.map +1 -1
  253. package/dist/Thumbnail/Thumbnail.styles.d.ts +34 -32
  254. package/dist/Thumbnail/Thumbnail.styles.js +78 -79
  255. package/dist/Thumbnail/Thumbnail.styles.js.map +1 -1
  256. package/dist/Thumbnail/Thumbnail.types.d.ts +1 -1
  257. package/dist/Thumbnail/Thumbnail.types.js.map +1 -1
  258. package/dist/Thumbnail/ThumbnailCaption.js +10 -10
  259. package/dist/Thumbnail/ThumbnailCaption.js.map +1 -1
  260. package/dist/ThumbnailGrid/ThumbnailGrid.js +2 -2
  261. package/dist/ThumbnailGrid/ThumbnailGrid.js.map +1 -1
  262. package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +20 -8
  263. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  264. package/dist/TieredSelect/TierSelectionTieredSelect.js +9 -9
  265. package/dist/TieredSelect/TierSelectionTieredSelect.js.map +1 -1
  266. package/dist/TieredSelect/TieredSelect.styles.d.ts +29 -13
  267. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  268. package/dist/TieredSelect/TieredSelect.types.d.ts +1 -1
  269. package/dist/TieredSelect/TieredSelect.types.js.map +1 -1
  270. package/dist/TieredSelect/TieredSelectMenu.js +10 -10
  271. package/dist/TieredSelect/TieredSelectMenu.js.map +1 -1
  272. package/dist/Tile/Tile.js +1 -1
  273. package/dist/Tile/Tile.js.map +1 -1
  274. package/dist/Tile/Tile.styles.d.ts +13 -11
  275. package/dist/Tile/Tile.styles.js +8 -8
  276. package/dist/Title/Title.styles.d.ts +12 -8
  277. package/dist/Title/Title.styles.js +7 -7
  278. package/dist/Toast/Toast.styles.d.ts +7 -5
  279. package/dist/Toast/Toast.styles.js +3 -3
  280. package/dist/ToggleButton/ToggleButton.styles.d.ts +4 -2
  281. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  282. package/dist/Token/Token.styles.d.ts +9 -5
  283. package/dist/Token/Token.styles.js +3 -3
  284. package/dist/ToolHeader/ToolHeader.d.ts +8 -4
  285. package/dist/ToolHeader/ToolHeader.styles.d.ts +9 -7
  286. package/dist/ToolHeader/ToolHeader.styles.js +8 -8
  287. package/dist/ToolHeader/ToolHeader.styles.js.map +1 -1
  288. package/dist/ToolLandingPage/ToolLandingPage.styles.d.ts +5 -3
  289. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  290. package/dist/Tooltip/Tooltip.js +3 -4
  291. package/dist/Tooltip/Tooltip.js.map +1 -1
  292. package/dist/Tooltip/Tooltip.styles.d.ts +3 -2
  293. package/dist/Tooltip/Tooltip.styles.js +3 -3
  294. package/dist/Tooltip/Tooltip.styles.js.map +1 -1
  295. package/dist/Tree/Tree.styles.d.ts +24 -12
  296. package/dist/Tree/Tree.styles.js +9 -9
  297. package/dist/Typeahead/Typeahead.js +1 -1
  298. package/dist/Typeahead/Typeahead.js.map +1 -1
  299. package/dist/Typeahead/Typeahead.styles.d.ts +5 -7
  300. package/dist/Typeahead/Typeahead.styles.js +3 -3
  301. package/dist/Typography/Typography.styles.d.ts +5 -4
  302. package/dist/Typography/Typography.styles.js +1 -1
  303. package/dist/Typography/Typography.styles.js.map +1 -1
  304. package/dist/Typography/Typography.table.story.js +2 -2
  305. package/dist/_styles/arrows.d.ts +4 -4
  306. package/dist/_styles/borderRadius.d.ts +1 -1
  307. package/dist/_styles/mixins.d.ts +7 -7
  308. package/dist/_styles/shadows.d.ts +1 -1
  309. package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +3 -3
  310. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  311. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
  312. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  313. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  314. package/dist/_typedoc/Box/Box.types.json +77 -77
  315. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  316. package/dist/_typedoc/Button/Button.types.json +13 -13
  317. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  318. package/dist/_typedoc/Card/Card.types.json +6 -6
  319. package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
  320. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  321. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  322. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  323. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  324. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  325. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +39 -29
  326. package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
  327. package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
  328. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  329. package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
  330. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  331. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  332. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  333. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  334. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  335. package/dist/_typedoc/Form/Form.types.json +747 -747
  336. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  337. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  338. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  339. package/dist/_typedoc/Input/Input.types.json +2 -2
  340. package/dist/_typedoc/Link/Link.types.json +11 -6
  341. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  342. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  343. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  344. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  345. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  346. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  347. package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
  348. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
  349. package/dist/_typedoc/PageLayout/PageLayout.types.json +29 -29
  350. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  351. package/dist/_typedoc/Panel/Panel.types.json +28 -28
  352. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  353. package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
  354. package/dist/_typedoc/Popover/Popover.types.json +15 -15
  355. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  356. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  357. package/dist/_typedoc/Required/Required.types.json +5 -5
  358. package/dist/_typedoc/Search/Search.types.json +18 -18
  359. package/dist/_typedoc/Section/Section.types.json +15 -15
  360. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
  361. package/dist/_typedoc/Select/Select.types.json +60 -60
  362. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  363. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  364. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  365. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
  366. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  367. package/dist/_typedoc/Table/Table.types.json +101 -101
  368. package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
  369. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
  370. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  371. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  372. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  373. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  374. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +44 -44
  375. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +30 -30
  376. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  377. package/dist/_typedoc/Title/Title.types.json +3 -3
  378. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  379. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
  380. package/dist/_typedoc/Token/Token.types.json +6 -6
  381. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  382. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
  383. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  384. package/dist/_typedoc/Tree/Tree.types.json +86 -86
  385. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  386. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  387. package/dist/_typedoc/_utils/types.json +3 -3
  388. package/package.json +10 -12
@@ -1,19 +1,26 @@
1
1
  /// <reference types="react" />
2
2
  interface StyledDateInputSegmentProps {
3
- disabled: boolean;
3
+ $disabled: boolean;
4
4
  $isYear: boolean;
5
5
  }
6
- export declare const StyledCalendar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
6
+ export declare const StyledCalendar: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<{
7
7
  size?: import("@procore/core-icons/dist/Icon").IconSize | undefined;
8
- } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>, any, {}, never>;
9
- export declare const StyledDateSegmentsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
10
- export declare const StyledDateInputSegment: import("styled-components").StyledComponent<"div", any, StyledDateInputSegmentProps, never>;
11
- export declare const StyledDateInputDelimiter: import("styled-components").StyledComponent<"span", any, {
12
- visible: boolean;
13
- }, never>;
14
- export declare const StyledDateInputIconContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
15
- export declare const StyledDateInput: import("styled-components").StyledComponent<"div", any, {
16
- disabled: boolean;
17
- error: boolean;
18
- }, never>;
8
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>, "ref"> & {
9
+ ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
10
+ }, never>> & string & Omit<import("react").ForwardRefExoticComponent<{
11
+ size?: import("@procore/core-icons/dist/Icon").IconSize | undefined;
12
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>, keyof import("react").Component<any, {}, any>>;
13
+ export declare const StyledDateSegmentsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
14
+ export declare const StyledDateInputSegment: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledDateInputSegmentProps>> & string;
15
+ export declare const StyledDateInputDelimiter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
16
+ ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
17
+ }>, {
18
+ $visible: boolean;
19
+ 'data-qa-table-visible'?: boolean | undefined;
20
+ }>, never>> & string;
21
+ export declare const StyledDateInputIconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
22
+ export declare const StyledDateInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
23
+ $disabled: boolean;
24
+ $error: boolean;
25
+ }>> & string;
19
26
  export {};
@@ -1,11 +1,7 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
4
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
1
  import { Calendar } from '@procore/core-icons/dist';
6
2
  import styled, { css } from 'styled-components';
7
3
  import { dataQa } from '../Input/Input.styles';
8
- import { getTypographyIntent } from '../Typography/Typography.styles';
4
+ import { getTypographyIntent } from '../Typography';
9
5
  import { colors } from '../_styles/colors';
10
6
  import { getFocus } from '../_styles/mixins';
11
7
  import { spacing } from '../_styles/spacing';
@@ -14,40 +10,42 @@ var inputHeight = 36; // TODO one-off
14
10
  var disabledCss = /*#__PURE__*/css(["background-color:", ";color:", ";border-width:1px;border-style:solid;border-color:", ";pointer-events:none;svg{color:", ";}"], colors.gray94, colors.gray45, colors.gray70, colors.gray45);
15
11
  export var StyledCalendar = /*#__PURE__*/styled(Calendar).withConfig({
16
12
  displayName: "StyledCalendar",
17
- componentId: "core-12_21_2__sc-w10btf-0"
13
+ componentId: "core-12_22_0__sc-w10btf-0"
18
14
  })(["color:", ";"], colors.gray45);
19
15
  export var StyledDateSegmentsContainer = /*#__PURE__*/styled.div.withConfig({
20
16
  displayName: "StyledDateSegmentsContainer",
21
- componentId: "core-12_21_2__sc-w10btf-1"
17
+ componentId: "core-12_22_0__sc-w10btf-1"
22
18
  })(["min-width:104px;display:flex;gap:", "px;"], spacing.xs);
23
19
  export var StyledDateInputSegment = /*#__PURE__*/styled.div.withConfig({
24
20
  displayName: "StyledDateInputSegment",
25
- componentId: "core-12_21_2__sc-w10btf-2"
21
+ componentId: "core-12_22_0__sc-w10btf-2"
26
22
  })(["", " outline:none;text-align:center;&:focus{background-color:", ";}&::selection{background-color:transparent;}&[data-placeholder='true']{color:", ";}"], getTypographyIntent('body'), colors.blue96, function (_ref) {
27
- var disabled = _ref.disabled;
28
- return disabled ? colors.gray70 : colors.gray45;
23
+ var $disabled = _ref.$disabled;
24
+ return $disabled ? colors.gray70 : colors.gray45;
29
25
  });
30
26
  export var StyledDateInputDelimiter = /*#__PURE__*/styled.span.attrs(function (props) {
31
- return _defineProperty({}, 'data-qa-table-visible', props.visible);
27
+ return {
28
+ 'data-qa-table-visible': props.$visible
29
+ };
32
30
  }).withConfig({
33
31
  displayName: "StyledDateInputDelimiter",
34
- componentId: "core-12_21_2__sc-w10btf-3"
32
+ componentId: "core-12_22_0__sc-w10btf-3"
35
33
  })(["", " user-select:none;"], getTypographyIntent('body'));
36
34
  export var StyledDateInputIconContainer = /*#__PURE__*/styled.div.withConfig({
37
35
  displayName: "StyledDateInputIconContainer",
38
- componentId: "core-12_21_2__sc-w10btf-4"
36
+ componentId: "core-12_22_0__sc-w10btf-4"
39
37
  })(["display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;margin:0 0 0 ", "px;height:24px;width:24px;"], spacing.xs);
40
38
  export var StyledDateInput = /*#__PURE__*/styled.div.withConfig({
41
39
  displayName: "StyledDateInput",
42
- componentId: "core-12_21_2__sc-w10btf-5"
43
- })(["align-items:center;border-color:", ";border-radius:4px;border-style:solid;border-width:1px;display:inline-flex;flex-direction:row;height:", "px;justify-content:center;padding:0 ", "px 0 ", "px;&::placeholder{color:", ";}", " &:focus-within,&[data-qa=", "]{", ";}&:disabled{", "}", " ", ""], colors.gray70, inputHeight, spacing.xs, spacing.sm, colors.gray45, function (_ref3) {
44
- var error = _ref3.error;
45
- return !error && css(["&:hover,&[data-qa=", "]{border-color:", ";}"], dataQa.hovered, colors.gray45);
46
- }, dataQa.focused, getFocus(), disabledCss, function (_ref4) {
47
- var disabled = _ref4.disabled;
48
- return disabled && disabledCss;
49
- }, function (_ref5) {
50
- var error = _ref5.error;
51
- return error && css(["border-color:", ";"], colors.red50);
40
+ componentId: "core-12_22_0__sc-w10btf-5"
41
+ })(["align-items:center;border-color:", ";border-radius:4px;border-style:solid;border-width:1px;display:inline-flex;flex-direction:row;height:", "px;justify-content:center;padding:0 ", "px 0 ", "px;&::placeholder{color:", ";}", " &:focus-within,&[data-qa=", "]{", ";}&:disabled{", "}", " ", ""], colors.gray70, inputHeight, spacing.xs, spacing.sm, colors.gray45, function (_ref2) {
42
+ var $error = _ref2.$error;
43
+ return !$error && css(["&:hover,&[data-qa=", "]{border-color:", ";}"], dataQa.hovered, colors.gray45);
44
+ }, dataQa.focused, getFocus(), disabledCss, function (_ref3) {
45
+ var $disabled = _ref3.$disabled;
46
+ return $disabled && disabledCss;
47
+ }, function (_ref4) {
48
+ var $error = _ref4.$error;
49
+ return $error && css(["border-color:", ";"], colors.red50);
52
50
  });
53
51
  //# sourceMappingURL=DateInput.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.styles.js","names":["Calendar","styled","css","dataQa","getTypographyIntent","colors","getFocus","spacing","inputHeight","disabledCss","gray94","gray45","gray70","StyledCalendar","withConfig","displayName","componentId","StyledDateSegmentsContainer","div","xs","StyledDateInputSegment","blue96","_ref","disabled","StyledDateInputDelimiter","span","attrs","props","_defineProperty","visible","StyledDateInputIconContainer","StyledDateInput","sm","_ref3","error","hovered","focused","_ref4","_ref5","red50"],"sources":["../../src/DateInput/DateInput.styles.tsx"],"sourcesContent":["import { Calendar } from '@procore/core-icons/dist'\nimport styled, { css } from 'styled-components'\nimport { dataQa } from '../Input/Input.styles'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { getFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\ninterface StyledDateInputSegmentProps {\n disabled: boolean\n $isYear: boolean\n}\n\nconst inputHeight = 36 // TODO one-off\n\nconst disabledCss = css`\n background-color: ${colors.gray94};\n color: ${colors.gray45};\n border-width: 1px;\n border-style: solid;\n border-color: ${colors.gray70};\n pointer-events: none;\n\n svg {\n color: ${colors.gray45};\n }\n`\n\nexport const StyledCalendar = styled(Calendar)`\n color: ${colors.gray45};\n`\n\nexport const StyledDateSegmentsContainer = styled.div`\n min-width: 104px;\n display: flex;\n gap: ${spacing.xs}px;\n`\n\nexport const StyledDateInputSegment = styled.div<StyledDateInputSegmentProps>`\n ${getTypographyIntent('body')}\n outline: none;\n text-align: center;\n\n &:focus {\n background-color: ${colors.blue96};\n }\n\n &::selection {\n background-color: transparent;\n }\n\n &[data-placeholder='true'] {\n color: ${({ disabled }) => (disabled ? colors.gray70 : colors.gray45)};\n }\n`\n\nexport const StyledDateInputDelimiter = styled.span.attrs<{ visible: boolean }>(\n (props) => ({\n ['data-qa-table-visible']: props.visible,\n })\n)<{ visible: boolean }>`\n ${getTypographyIntent('body')}\n user-select: none;\n`\n\nexport const StyledDateInputIconContainer = styled.div`\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n margin: 0 0 0 ${spacing.xs}px;\n height: 24px;\n width: 24px;\n`\n\nexport const StyledDateInput = styled.div<{\n disabled: boolean\n error: boolean\n}>`\n align-items: center;\n border-color: ${colors.gray70};\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n display: inline-flex;\n flex-direction: row;\n height: ${inputHeight}px;\n justify-content: center;\n padding: 0 ${spacing.xs}px 0 ${spacing.sm}px;\n\n &::placeholder {\n color: ${colors.gray45};\n }\n\n ${({ error }) =>\n !error &&\n css`\n &:hover,\n &[data-qa=${dataQa.hovered}] {\n border-color: ${colors.gray45};\n }\n `}\n\n &:focus-within,\n &[data-qa=${dataQa.focused}] {\n ${getFocus()};\n }\n\n &:disabled {\n ${disabledCss}\n }\n\n ${({ disabled }) => disabled && disabledCss}\n\n ${({ error }) =>\n error &&\n css`\n border-color: ${colors.red50};\n `}\n`\n"],"mappings":";;;;AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,OAAO,QAAQ,oBAAoB;AAO5C,IAAMC,WAAW,GAAG,EAAE,EAAC;;AAEvB,IAAMC,WAA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MAAM,EAMnBJ,WAAW,EAERD,OAAO,CAACY,EAAE,EAAQZ,OAAO,CAACyB,EAAE,EAG9B3B,MAAM,CAACM,MAAM,EAGtB,UAAAsB,KAAA;EAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK;EAAA,OACR,CAACA,KAAK,IACNhC,GAAG,kDAEWC,MAAM,CAACgC,OAAO,EACR9B,MAAM,CAACM,MAAM,CAEhC;AAAA,GAGSR,MAAM,CAACiC,OAAO,EACtB9B,QAAQ,CAAC,CAAC,EAIVG,WAAW,EAGb,UAAA4B,KAAA;EAAA,IAAGd,QAAQ,GAAAc,KAAA,CAARd,QAAQ;EAAA,OAAOA,QAAQ,IAAId,WAAW;AAAA,GAEzC,UAAA6B,KAAA;EAAA,IAAGJ,KAAK,GAAAI,KAAA,CAALJ,KAAK;EAAA,OACRA,KAAK,IACLhC,GAAG,yBACeG,MAAM,CAACkC,KAAK,CAC7B;AAAA,EACJ"}
1
+ {"version":3,"file":"DateInput.styles.js","names":["Calendar","styled","css","dataQa","getTypographyIntent","colors","getFocus","spacing","inputHeight","disabledCss","gray94","gray45","gray70","StyledCalendar","withConfig","displayName","componentId","StyledDateSegmentsContainer","div","xs","StyledDateInputSegment","blue96","_ref","$disabled","StyledDateInputDelimiter","span","attrs","props","$visible","StyledDateInputIconContainer","StyledDateInput","sm","_ref2","$error","hovered","focused","_ref3","_ref4","red50"],"sources":["../../src/DateInput/DateInput.styles.tsx"],"sourcesContent":["import { Calendar } from '@procore/core-icons/dist'\nimport styled, { css } from 'styled-components'\nimport { dataQa } from '../Input/Input.styles'\nimport { getTypographyIntent } from '../Typography'\nimport { colors } from '../_styles/colors'\nimport { getFocus } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\ninterface StyledDateInputSegmentProps {\n $disabled: boolean\n $isYear: boolean\n}\n\nconst inputHeight = 36 // TODO one-off\n\nconst disabledCss = css`\n background-color: ${colors.gray94};\n color: ${colors.gray45};\n border-width: 1px;\n border-style: solid;\n border-color: ${colors.gray70};\n pointer-events: none;\n\n svg {\n color: ${colors.gray45};\n }\n`\n\nexport const StyledCalendar = styled(Calendar)`\n color: ${colors.gray45};\n`\n\nexport const StyledDateSegmentsContainer = styled.div`\n min-width: 104px;\n display: flex;\n gap: ${spacing.xs}px;\n`\n\nexport const StyledDateInputSegment = styled.div<StyledDateInputSegmentProps>`\n ${getTypographyIntent('body')}\n outline: none;\n text-align: center;\n\n &:focus {\n background-color: ${colors.blue96};\n }\n\n &::selection {\n background-color: transparent;\n }\n\n &[data-placeholder='true'] {\n color: ${({ $disabled }) => ($disabled ? colors.gray70 : colors.gray45)};\n }\n`\n\nexport const StyledDateInputDelimiter = styled.span.attrs<{\n $visible: boolean\n 'data-qa-table-visible'?: boolean\n}>((props) => ({\n 'data-qa-table-visible': props.$visible,\n}))`\n ${getTypographyIntent('body')}\n user-select: none;\n`\n\nexport const StyledDateInputIconContainer = styled.div`\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n margin: 0 0 0 ${spacing.xs}px;\n height: 24px;\n width: 24px;\n`\n\nexport const StyledDateInput = styled.div<{\n $disabled: boolean\n $error: boolean\n}>`\n align-items: center;\n border-color: ${colors.gray70};\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n display: inline-flex;\n flex-direction: row;\n height: ${inputHeight}px;\n justify-content: center;\n padding: 0 ${spacing.xs}px 0 ${spacing.sm}px;\n\n &::placeholder {\n color: ${colors.gray45};\n }\n\n ${({ $error }) =>\n !$error &&\n css`\n &:hover,\n &[data-qa=${dataQa.hovered}] {\n border-color: ${colors.gray45};\n }\n `}\n\n &:focus-within,\n &[data-qa=${dataQa.focused}] {\n ${getFocus()};\n }\n\n &:disabled {\n ${disabledCss}\n }\n\n ${({ $disabled }) => $disabled && disabledCss}\n\n ${({ $error }) =>\n $error &&\n css`\n border-color: ${colors.red50};\n `}\n`\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,OAAOC,MAA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AAED,OAAO,IAAMyB,4BAA4B,gBAAG5B,MAAM,CAACiB,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gIAKpCT,OAAO,CAACY,EAAE,CAG3B;AAED,OAAO,IAAMW,eAAe,gBAAG7B,MAAM,CAACiB,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wSAKvBX,MAAM,CAACO,MAAM,EAMnBJ,WAAW,EAERD,OAAO,CAACY,EAAE,EAAQZ,OAAO,CAACwB,EAAE,EAG9B1B,MAAM,CAACM,MAAM,EAGtB,UAAAqB,KAAA;EAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM;EAAA,OACT,CAACA,MAAM,IACP/B,GAAG,kDAEWC,MAAM,CAAC+B,OAAO,EACR7B,MAAM,CAACM,MAAM,CAEhC;AAAA,GAGSR,MAAM,CAACgC,OAAO,EACtB7B,QAAQ,CAAC,CAAC,EAIVG,WAAW,EAGb,UAAA2B,KAAA;EAAA,IAAGb,SAAS,GAAAa,KAAA,CAATb,SAAS;EAAA,OAAOA,SAAS,IAAId,WAAW;AAAA,GAE3C,UAAA4B,KAAA;EAAA,IAAGJ,MAAM,GAAAI,KAAA,CAANJ,MAAM;EAAA,OACTA,MAAM,IACN/B,GAAG,yBACeG,MAAM,CAACiC,KAAK,CAC7B;AAAA,EACJ"}
@@ -11,8 +11,8 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
11
11
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
12
12
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
13
13
  import React from 'react';
14
- import { Calendar as CalendarBase } from '../Calendar/Calendar';
15
- import { Card } from '../Card/Card';
14
+ import { Calendar as CalendarBase } from '../Calendar';
15
+ import { Card } from '../Card';
16
16
  import { DateInput, isValidYearRange } from '../DateInput/DateInput';
17
17
  import { OverlayTrigger, useOverlayTriggerContext } from '../OverlayTrigger/OverlayTrigger';
18
18
  import { isEventSource } from '../_hooks/ClickOutside';
@@ -1 +1 @@
1
- {"version":3,"file":"DateSelect.js","names":["React","Calendar","CalendarBase","Card","DateInput","isValidYearRange","OverlayTrigger","useOverlayTriggerContext","isEventSource","useDateTime","enableLogs","_process$env$TZ_LOG","process","env","TZ_LOG","toLowerCase","consoleMessageChange","_ref","date","console","log","showKeys","hideKeys","target","overlay","lifecycleDefault","noop","forwardRef","_ref2","ref","onSelect","props","_objectWithoutProperties","_excluded","_useOverlayTriggerCon","hide","createElement","shadowStrength","_extends","DateSelect","_ref3","_ref3$beforeHide","beforeHide","_ref3$beforeShow","beforeShow","_ref3$afterHide","afterHide","_ref3$afterShow","afterShow","disabledDate","_ref3$onChange","onChange","_ref3$onClear","onClear","value","_excluded2","dateTime","clearRef","useRef","dateInputRef","monthRef","yearRef","segmentRefs","segmentThree","_React$useState","useState","_React$useState2","_slicedToArray","selected","setSelected","_React$useState3","newDate","_React$useState4","displayed","setDisplayed","useEffect","displayDate","onNavigate","current","focus","selectedStart","selectedEnd","e","KeyboardEvent","clickOutsideIgnoreRefs","placement","onChangeSegment","type","setMonth","setFullYear","undefined"],"sources":["../../src/DateSelect/DateSelect.tsx"],"sourcesContent":["import React from 'react'\nimport { Calendar as CalendarBase } from '../Calendar/Calendar'\nimport type { CalendarProps } from '../Calendar/Calendar.types'\nimport { Card } from '../Card/Card'\nimport { DateInput, isValidYearRange } from '../DateInput/DateInput'\nimport {\n OverlayTrigger,\n useOverlayTriggerContext,\n} from '../OverlayTrigger/OverlayTrigger'\nimport { isEventSource } from '../_hooks/ClickOutside'\nimport { useDateTime } from '../_hooks/DateTime'\nimport type { DateSelectProps } from './DateSelect.types'\n\nconst enableLogs = process.env.TZ_LOG?.toLowerCase() === 'true'\n\nfunction consoleMessageChange({ date }: any) {\n if (enableLogs) {\n console.log(\n `core-react: DateInput onChange, relative start of day in destination time zone.\\n`,\n date\n )\n }\n}\n\nconst showKeys: string[] = []\n\nconst hideKeys = {\n target: ['Esc', 'Escape', 'Enter'],\n overlay: ['Esc', 'Escape'],\n}\n\nfunction lifecycleDefault() {\n return true\n}\n\nfunction noop() {}\n\nconst Calendar = React.forwardRef<HTMLDivElement, CalendarProps>(\n function Calendar({ onSelect, ...props }, ref) {\n const { hide } = useOverlayTriggerContext()\n\n return (\n <Card ref={ref} shadowStrength={2}>\n <CalendarBase\n {...props}\n onSelect={(date) => {\n onSelect?.(date)\n hide(true)\n }}\n />\n </Card>\n )\n }\n)\n\n/**\n\n We use date selects to allow users to enter a date into a form by either\n selecting it from a calendar or typing it into a date field.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dateselect--demo)\n\n @see [Design Guidelines](https://design.procore.com/date-select)\n\n */\nexport const DateSelect = React.forwardRef<HTMLDivElement, DateSelectProps>(\n function DateSelect(\n {\n beforeHide = lifecycleDefault,\n beforeShow = lifecycleDefault,\n afterHide = noop,\n afterShow = noop,\n disabledDate,\n onChange = noop,\n onClear = noop,\n value,\n ...props\n },\n ref\n ) {\n const dateTime = useDateTime()\n\n const clearRef = React.useRef<HTMLButtonElement>(null)\n\n const dateInputRef = ref as React.RefObject<HTMLDivElement>\n React.useRef<HTMLDivElement>(null)\n\n const monthRef = React.useRef<HTMLDivElement>(null)\n\n const yearRef = React.useRef<HTMLDivElement>(null)\n\n const segmentRefs = {\n segmentThree: React.useRef<HTMLDivElement>(null),\n }\n\n const [selected, setSelected] = React.useState(value)\n\n const [displayed, setDisplayed] = React.useState(\n value || dateTime.newDate()\n )\n\n React.useEffect(() => {\n setSelected(value)\n setDisplayed(value || dateTime.newDate())\n }, [value])\n\n const overlay = (\n <Calendar\n data-qa=\"core-date-select-calendar\"\n disabledDate={disabledDate}\n displayDate={displayed}\n monthRef={monthRef}\n onNavigate={setDisplayed}\n onSelect={(date) => {\n segmentRefs.segmentThree.current &&\n segmentRefs.segmentThree.current.focus()\n\n setDisplayed(date)\n setSelected(date)\n onChange(date)\n }}\n selectedStart={selected}\n selectedEnd={selected}\n yearRef={yearRef}\n />\n )\n\n return (\n <OverlayTrigger\n afterHide={afterHide}\n afterShow={afterShow}\n beforeHide={(e) => {\n if (e instanceof KeyboardEvent) {\n segmentRefs.segmentThree.current &&\n segmentRefs.segmentThree.current.focus()\n\n return beforeHide(e)\n }\n\n if (isEventSource(dateInputRef, e) || isEventSource(clearRef, e)) {\n return false\n }\n return beforeHide(e)\n }}\n beforeShow={(e) => {\n if (isEventSource(clearRef, e)) {\n return false\n }\n return beforeShow(e)\n }}\n clickOutsideIgnoreRefs={[monthRef, yearRef]}\n hideKeys={hideKeys}\n overlay={overlay}\n placement=\"bottom-left\"\n ref={dateInputRef}\n showKeys={showKeys}\n >\n <DateInput\n {...props}\n clearRef={clearRef}\n segmentRefs={segmentRefs}\n onChangeSegment={(type, value) => {\n if (value === -1) {\n return\n }\n\n if (type === 'month') {\n setDisplayed(dateTime.newDate(displayed.setMonth(value - 1)))\n } else if (type === 'year') {\n // isValidYearRange prevents calendar from changing, the display date\n if (isValidYearRange(value)) {\n setDisplayed(dateTime.newDate(displayed.setFullYear(value)))\n }\n }\n }}\n onChange={(date: Date | null) => {\n consoleMessageChange({ date })\n if (date) {\n setSelected(date)\n setDisplayed(date)\n } else {\n setDisplayed(dateTime.newDate())\n setSelected(undefined)\n }\n\n onChange(date)\n }}\n onClear={onClear}\n value={selected}\n />\n </OverlayTrigger>\n )\n }\n)\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,IAAIC,YAAY,QAAQ,sBAAsB;AAE/D,SAASC,IAAI,Q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Ae,EAAE,SAAjBA,eAAeA,CAAGC,IAAI,EAAEjC,KAAK,EAAK;MAChC,IAAIA,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB;MACF;MAEA,IAAIiC,IAAI,KAAK,OAAO,EAAE;QACpBb,YAAY,CAAClB,QAAQ,CAACe,OAAO,CAACE,SAAS,CAACe,QAAQ,CAAClC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;MAC/D,CAAC,MAAM,IAAIiC,IAAI,KAAK,MAAM,EAAE;QAC1B;QACA,IAAIlF,gBAAgB,CAACiD,KAAK,CAAC,EAAE;UAC3BoB,YAAY,CAAClB,QAAQ,CAACe,OAAO,CAACE,SAAS,CAACgB,WAAW,CAACnC,KAAK,CAAC,CAAC,CAAC;QAC9D;MACF;IACF,CAAE;IACFH,QAAQ,EAAE,SAAVA,QAAQA,CAAGjC,IAAiB,EAAK;MAC/BF,oBAAoB,CAAC;QAAEE,IAAI,EAAJA;MAAK,CAAC,CAAC;MAC9B,IAAIA,IAAI,EAAE;QACRmD,WAAW,CAACnD,IAAI,CAAC;QACjBwD,YAAY,CAACxD,IAAI,CAAC;MACpB,CAAC,MAAM;QACLwD,YAAY,CAAClB,QAAQ,CAACe,OAAO,CAAC,CAAC,CAAC;QAChCF,WAAW,CAACqB,SAAS,CAAC;MACxB;MAEAvC,SAAQ,CAACjC,IAAI,CAAC;IAChB,CAAE;IACFmC,OAAO,EAAEA,OAAQ;IACjBC,KAAK,EAAEc;EAAS,EACjB,CACa,CAAC;AAErB,CACF,CAAC"}
1
+ {"version":3,"file":"DateSelect.js","names":["React","Calendar","CalendarBase","Card","DateInput","isValidYearRange","OverlayTrigger","useOverlayTriggerContext","isEventSource","useDateTime","enableLogs","_process$env$TZ_LOG","process","env","TZ_LOG","toLowerCase","consoleMessageChange","_ref","date","console","log","showKeys","hideKeys","target","overlay","lifecycleDefault","noop","forwardRef","_ref2","ref","onSelect","props","_objectWithoutProperties","_excluded","_useOverlayTriggerCon","hide","createElement","shadowStrength","_extends","DateSelect","_ref3","_ref3$beforeHide","beforeHide","_ref3$beforeShow","beforeShow","_ref3$afterHide","afterHide","_ref3$afterShow","afterShow","disabledDate","_ref3$onChange","onChange","_ref3$onClear","onClear","value","_excluded2","dateTime","clearRef","useRef","dateInputRef","monthRef","yearRef","segmentRefs","segmentThree","_React$useState","useState","_React$useState2","_slicedToArray","selected","setSelected","_React$useState3","newDate","_React$useState4","displayed","setDisplayed","useEffect","displayDate","onNavigate","current","focus","selectedStart","selectedEnd","e","KeyboardEvent","clickOutsideIgnoreRefs","placement","onChangeSegment","type","setMonth","setFullYear","undefined"],"sources":["../../src/DateSelect/DateSelect.tsx"],"sourcesContent":["import React from 'react'\nimport type { CalendarProps } from '../Calendar'\nimport { Calendar as CalendarBase } from '../Calendar'\nimport { Card } from '../Card'\nimport { DateInput, isValidYearRange } from '../DateInput/DateInput'\nimport {\n OverlayTrigger,\n useOverlayTriggerContext,\n} from '../OverlayTrigger/OverlayTrigger'\nimport { isEventSource } from '../_hooks/ClickOutside'\nimport { useDateTime } from '../_hooks/DateTime'\nimport type { DateSelectProps } from './DateSelect.types'\n\nconst enableLogs = process.env.TZ_LOG?.toLowerCase() === 'true'\n\nfunction consoleMessageChange({ date }: any) {\n if (enableLogs) {\n console.log(\n `core-react: DateInput onChange, relative start of day in destination time zone.\\n`,\n date\n )\n }\n}\n\nconst showKeys: string[] = []\n\nconst hideKeys = {\n target: ['Esc', 'Escape', 'Enter'],\n overlay: ['Esc', 'Escape'],\n}\n\nfunction lifecycleDefault() {\n return true\n}\n\nfunction noop() {}\n\nconst Calendar = React.forwardRef<HTMLDivElement, CalendarProps>(\n function Calendar({ onSelect, ...props }, ref) {\n const { hide } = useOverlayTriggerContext()\n\n return (\n <Card ref={ref} shadowStrength={2}>\n <CalendarBase\n {...props}\n onSelect={(date) => {\n onSelect?.(date)\n hide(true)\n }}\n />\n </Card>\n )\n }\n)\n\n/**\n\n We use date selects to allow users to enter a date into a form by either\n selecting it from a calendar or typing it into a date field.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dateselect--demo)\n\n @see [Design Guidelines](https://design.procore.com/date-select)\n\n */\nexport const DateSelect = React.forwardRef<HTMLDivElement, DateSelectProps>(\n function DateSelect(\n {\n beforeHide = lifecycleDefault,\n beforeShow = lifecycleDefault,\n afterHide = noop,\n afterShow = noop,\n disabledDate,\n onChange = noop,\n onClear = noop,\n value,\n ...props\n },\n ref\n ) {\n const dateTime = useDateTime()\n\n const clearRef = React.useRef<HTMLButtonElement>(null)\n\n const dateInputRef = ref as React.RefObject<HTMLDivElement>\n React.useRef<HTMLDivElement>(null)\n\n const monthRef = React.useRef<HTMLDivElement>(null)\n\n const yearRef = React.useRef<HTMLDivElement>(null)\n\n const segmentRefs = {\n segmentThree: React.useRef<HTMLDivElement>(null),\n }\n\n const [selected, setSelected] = React.useState(value)\n\n const [displayed, setDisplayed] = React.useState(\n value || dateTime.newDate()\n )\n\n React.useEffect(() => {\n setSelected(value)\n setDisplayed(value || dateTime.newDate())\n }, [value])\n\n const overlay = (\n <Calendar\n data-qa=\"core-date-select-calendar\"\n disabledDate={disabledDate}\n displayDate={displayed}\n monthRef={monthRef}\n onNavigate={setDisplayed}\n onSelect={(date) => {\n segmentRefs.segmentThree.current &&\n segmentRefs.segmentThree.current.focus()\n\n setDisplayed(date)\n setSelected(date)\n onChange(date)\n }}\n selectedStart={selected}\n selectedEnd={selected}\n yearRef={yearRef}\n />\n )\n\n return (\n <OverlayTrigger\n afterHide={afterHide}\n afterShow={afterShow}\n beforeHide={(e) => {\n if (e instanceof KeyboardEvent) {\n segmentRefs.segmentThree.current &&\n segmentRefs.segmentThree.current.focus()\n\n return beforeHide(e)\n }\n\n if (isEventSource(dateInputRef, e) || isEventSource(clearRef, e)) {\n return false\n }\n return beforeHide(e)\n }}\n beforeShow={(e) => {\n if (isEventSource(clearRef, e)) {\n return false\n }\n return beforeShow(e)\n }}\n clickOutsideIgnoreRefs={[monthRef, yearRef]}\n hideKeys={hideKeys}\n overlay={overlay}\n placement=\"bottom-left\"\n ref={dateInputRef}\n showKeys={showKeys}\n >\n <DateInput\n {...props}\n clearRef={clearRef}\n segmentRefs={segmentRefs}\n onChangeSegment={(type, value) => {\n if (value === -1) {\n return\n }\n\n if (type === 'month') {\n setDisplayed(dateTime.newDate(displayed.setMonth(value - 1)))\n } else if (type === 'year') {\n // isValidYearRange prevents calendar from changing, the display date\n if (isValidYearRange(value)) {\n setDisplayed(dateTime.newDate(displayed.setFullYear(value)))\n }\n }\n }}\n onChange={(date: Date | null) => {\n consoleMessageChange({ date })\n if (date) {\n setSelected(date)\n setDisplayed(date)\n } else {\n setDisplayed(dateTime.newDate())\n setSelected(undefined)\n }\n\n onChange(date)\n }}\n onClear={onClear}\n value={selected}\n />\n </OverlayTrigger>\n )\n }\n)\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,QAAQ,IAAIC,YAAY,QAAQ,aAAa;AACtD,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,SAAS,EAAEC,gBAAgB,QAAQ,wBAAwB;AACpE,SACEC,cAAc,EACdC,wBAAwB,QACnB,kCAAkC;AACzC,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,WAAW,QAAQ,oBAAoB;AAGhD,IAAMC,UAAU,GAAG,EAAAC,mBAAA,GAAAC,OAAO,CAACC,GAAG,CAACC,MAAM,cAAAH,mBAAA,uBAAlBA,mBAAA,CAAoBI,WAAW,CAAC,CAAC,MAAK,MAAM;AAE/D,SAASC,oBAAoBA,CAAAC,IAAA,EAAgB;EAAA,IAAbC,IAAI,GAAAD,IAAA,CAAJC,IAAI;EAClC,IAAIR,UAAU,EAAE;IACdS,OAAO,CAACC,GAAG,sFAETF,IACF,CAAC;EACH;AACF;AAEA,IAAMG,QAAkB,GAAG,EAAE;AAE7B,IAAMC,QAAQ,GAAG;EACfC,MAAM,EAAE,CAAC,KAAK,EAAE,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MAAK,CAAC,CAAC;MAC9B,IAAIA,IAAI,EAAE;QACRmD,WAAW,CAACnD,IAAI,CAAC;QACjBwD,YAAY,CAACxD,IAAI,CAAC;MACpB,CAAC,MAAM;QACLwD,YAAY,CAAClB,QAAQ,CAACe,OAAO,CAAC,CAAC,CAAC;QAChCF,WAAW,CAACqB,SAAS,CAAC;MACxB;MAEAvC,SAAQ,CAACjC,IAAI,CAAC;IAChB,CAAE;IACFmC,OAAO,EAAEA,OAAQ;IACjBC,KAAK,EAAEc;EAAS,EACjB,CACa,CAAC;AAErB,CACF,CAAC"}
@@ -1,8 +1,14 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledDetailPage: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const StyledDetailPageBody: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const StyledDetailPageFooterNotation: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const StyledDetailPageFooter: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../PageLayout/PageLayout.types").PageFooterProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
6
- export declare const StyledDetailPageFooterActions: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
7
- export declare const StyledDetailPageFooterContent: import("styled-components").StyledComponent<"div", any, {}, never>;
8
- export declare const StyledDetailPageCard: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
2
+ export declare const StyledDetailPage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const StyledDetailPageBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const StyledDetailPageFooterNotation: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ export declare const StyledDetailPageFooter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("../PageLayout/PageLayout.types").PageFooterProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("../PageLayout/PageLayout.types").PageFooterProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
8
+ export declare const StyledDetailPageFooterActions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("..").DivAttributes & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
9
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
10
+ }, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").BoxProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
11
+ export declare const StyledDetailPageFooterContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
12
+ export declare const StyledDetailPageCard: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("..").DivAttributes & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
13
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
14
+ }, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
@@ -8,32 +8,32 @@ import { colors } from '../_styles/colors';
8
8
  import { spacing } from '../_styles/spacing';
9
9
  export var StyledDetailPage = /*#__PURE__*/styled.div.withConfig({
10
10
  displayName: "StyledDetailPage",
11
- componentId: "core-12_21_2__sc-cytnlo-0"
11
+ componentId: "core-12_22_0__sc-cytnlo-0"
12
12
  })(["background-color:", ";height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;"], colors.gray96);
13
13
  export var StyledDetailPageBody = /*#__PURE__*/styled.div.withConfig({
14
14
  displayName: "StyledDetailPageBody",
15
- componentId: "core-12_21_2__sc-cytnlo-1"
15
+ componentId: "core-12_22_0__sc-cytnlo-1"
16
16
  })(["padding-bottom:", "px;"], spacing.xl);
17
17
  export var StyledDetailPageFooterNotation = /*#__PURE__*/styled.div.withConfig({
18
18
  displayName: "StyledDetailPageFooterNotation",
19
- componentId: "core-12_21_2__sc-cytnlo-2"
19
+ componentId: "core-12_22_0__sc-cytnlo-2"
20
20
  })(["flex-grow:1;z-index:1;"]);
21
21
  export var StyledDetailPageFooter = /*#__PURE__*/styled(Page.Footer).withConfig({
22
22
  displayName: "StyledDetailPageFooter",
23
- componentId: "core-12_21_2__sc-cytnlo-3"
23
+ componentId: "core-12_22_0__sc-cytnlo-3"
24
24
  })(["display:flex;padding:", "px 0;background-color:", ";justify-content:center;"], spacing.lg, colors.white);
25
25
  export var StyledDetailPageFooterActions = /*#__PURE__*/styled(Box).withConfig({
26
26
  displayName: "StyledDetailPageFooterActions",
27
- componentId: "core-12_21_2__sc-cytnlo-4"
27
+ componentId: "core-12_22_0__sc-cytnlo-4"
28
28
  })(["", ""], getActions());
29
29
  var maxFooterContentWidth = 1920;
30
30
  export var StyledDetailPageFooterContent = /*#__PURE__*/styled.div.withConfig({
31
31
  displayName: "StyledDetailPageFooterContent",
32
- componentId: "core-12_21_2__sc-cytnlo-5"
32
+ componentId: "core-12_22_0__sc-cytnlo-5"
33
33
  })(["width:100%;align-items:center;display:flex;justify-content:flex-end;padding:0 ", "px;max-width:", "px;"], spacing.xl, maxFooterContentWidth);
34
34
  var detailPageCardBorderRadius = 8;
35
35
  export var StyledDetailPageCard = /*#__PURE__*/styled(Card).withConfig({
36
36
  displayName: "StyledDetailPageCard",
37
- componentId: "core-12_21_2__sc-cytnlo-6"
37
+ componentId: "core-12_22_0__sc-cytnlo-6"
38
38
  })(["width:100%;border-radius:", "px;margin-top:", "px;margin-bottom:", "px;& + &{margin-top:", "px;}&:first-child{margin-top:0;}&:last-child{margin-bottom:", "px;}& > ", "{padding:", "px ", "px 0 ", "px;max-width:100%;&:empty{padding:0;}}& > ", " + ", " > ", "{border-top:0;}> .", ":first-child + .", ",> ", " + .", " + .", "{margin-top:", "px;}"], detailPageCardBorderRadius, spacing.lg, spacing.sm, spacing.sm, spacing.lg, StyledPageBanner, spacing.lg, spacing.lg, spacing.lg, StyledPageBanner, StyledSection, StyledSectionInner, sectionClassnames.levelAnonymous, sectionClassnames.level(2), StyledPageBanner, sectionClassnames.levelAnonymous, sectionClassnames.level(2), spacing.xxl * -1);
39
39
  //# sourceMappingURL=DetailPage.styles.js.map
@@ -1,8 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import type { ButtonVariant } from '../Button/Button.types';
3
- export declare const StyledDropdownMenu: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
4
- export declare const StyledDropdownSpinner: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").SpinnerProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
5
- export declare const StyledDropdownButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Button/Button.types").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {
3
+ export declare const StyledDropdownMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("..").DivAttributes & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
4
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
5
+ }, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
6
+ export declare const StyledDropdownSpinner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("..").SpinnerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
7
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
8
+ }, never>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").SpinnerProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
9
+ export declare const StyledDropdownButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("../Button/Button.types").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
10
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
11
+ }, {
6
12
  $loading: boolean;
7
13
  variant: ButtonVariant;
8
- }, never>;
14
+ }>> & string & Omit<import("react").ForwardRefExoticComponent<import("../Button/Button.types").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
@@ -5,15 +5,15 @@ import { Card } from '../Card/Card';
5
5
  import { Spinner } from '../Spinner/Spinner';
6
6
  export var StyledDropdownMenu = /*#__PURE__*/styled(Card).withConfig({
7
7
  displayName: "StyledDropdownMenu",
8
- componentId: "core-12_21_2__sc-ufsy2q-0"
8
+ componentId: "core-12_22_0__sc-ufsy2q-0"
9
9
  })(["display:flex;max-height:40vh;max-width:248px;min-width:inherit;"]);
10
10
  export var StyledDropdownSpinner = /*#__PURE__*/styled(Spinner).withConfig({
11
11
  displayName: "StyledDropdownSpinner",
12
- componentId: "core-12_21_2__sc-ufsy2q-1"
12
+ componentId: "core-12_22_0__sc-ufsy2q-1"
13
13
  })(["margin:0 6px;"]);
14
14
  export var StyledDropdownButton = /*#__PURE__*/styled(Button).withConfig({
15
15
  displayName: "StyledDropdownButton",
16
- componentId: "core-12_21_2__sc-ufsy2q-2"
16
+ componentId: "core-12_22_0__sc-ufsy2q-2"
17
17
  })(["pointer-events:", ";", ""], function (_ref) {
18
18
  var disabled = _ref.disabled,
19
19
  $loading = _ref.$loading;
@@ -12,7 +12,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
12
12
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
13
13
  import { EllipsisVertical } from '@procore/core-icons/dist';
14
14
  import React, { useCallback } from 'react';
15
- import { Card } from '../Card/Card';
15
+ import { Card } from '../Card';
16
16
  import { DropdownButton } from '../Dropdown/Dropdown';
17
17
  import { Portal } from '../Portal';
18
18
  import { useClickOutside } from '../_hooks/ClickOutside';
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownFlyout.js","names":["EllipsisVertical","React","useCallback","Card","DropdownButton","Portal","useClickOutside","useI18nContext","mergeRefs","defaultOptionRenderer","DropdownFlyoutContext","noop","transformOption","useDropdownFlyout","useDropdownFlyoutContext","StyledDropdownFlyout","StyledDropdownFlyoutItem","rootId","useDropdownFlyoutOverlay","FlyoutCaption","forwardRef","_ref","ref","option","highlighted","optionRenderer","props","_objectWithoutProperties","_excluded","createElement","_extends","displayName","FlyoutItem","_ref2","overlayElRef","useRef","_useDropdownFlyoutCon","isHighlighted","isExpanded","_onClick","onClick","expand","collapse","onMouseEnter","onMouseLeave","e","relatedTarget","Node","current","contains","_React$useState","useState","_React$useState2","_slicedToArray","referenceEl","setReferenceEl","Fragment","role","origin","Array","isArray","children","FlyoutList","options","overlayRef","placement","_ref3","_ref3$offset","offset","_useDropdownFlyoutOve","mainAxis","overlayStyle","referenceRef","useEffect","shadowStrength","style","map","key","id","DefaultButton","_ref4","icon","_excluded2","loading","undefined","arrow","Boolean","Children","count","DropdownFlyout","_ref5","disabled","label","_options","_ref5$onClick","_ref5$optionRenderer","_ref5$placement","_onKeyDown","onKeyDown","onFocus_","onFocus","onBlur_","onBlur","onMouseDown_","onMouseDown","onMouseEnter_","onMouseLeave_","size","_ref5$variant","variant","_excluded3","innerRef","containerRef","targetRef","flyoutOptions","useMemo","_useDropdownFlyout","closeSelectedDropdown","openDropdown","isOpen","setMouseOver","setFocused","onClickOutside","refs","element","I18n","ariaLabel","t","concat","trigger","isValidElement","_containerRef$current","target","dataset","flyout","preventDefault","_targetRef$current","focus","_React$useState3","_React$useState4","memoRef","cloneElement","_trigger$props$onClic","_trigger$props","call","tabIndex","Provider","value"],"sources":["../../src/DropdownFlyout/DropdownFlyout.tsx"],"sourcesContent":["import { EllipsisVertical } from '@procore/core-icons/dist'\nimport type { MouseEvent } from 'react'\nimport React, { useCallback } from 'react'\nimport type { ButtonProps } from '../Button/Button.types'\nimport { Card } from '../Card/Card'\nimport { DropdownButton } from '../Dropdown/Dropdown'\nimport { Portal } from '../Portal'\nimport { useClickOutside } from '../_hooks/ClickOutside'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { ReactElementWithRef } from '../_utils/types'\nimport {\n defaultOptionRenderer,\n DropdownFlyoutContext,\n noop,\n transformOption,\n useDropdownFlyout,\n useDropdownFlyoutContext,\n} from './DropdownFlyout.helpers'\nimport {\n StyledDropdownFlyout,\n StyledDropdownFlyoutItem,\n} from './DropdownFlyout.styles'\nimport type {\n DropdownFlyoutProps,\n FlyoutCaptionProps,\n FlyoutItemProps,\n FlyoutListProps,\n} from './DropdownFlyout.types'\nimport { rootId } from './DropdownFlyout.types'\nimport { useDropdownFlyoutOverlay } from './useDropdownFlyoutOverlay'\n\nexport const FlyoutCaption = React.forwardRef<\n HTMLDivElement,\n FlyoutCaptionProps\n>(function FlyoutCaption(\n { option, highlighted, optionRenderer, ...props },\n ref\n) {\n return (\n <StyledDropdownFlyoutItem\n {...props}\n ref={ref}\n data-highlighted={highlighted}\n data-flyout\n >\n {optionRenderer(option)}\n </StyledDropdownFlyoutItem>\n )\n})\n\nFlyoutCaption.displayName = 'FlyoutCaption'\n\nexport function FlyoutItem({ option }: FlyoutItemProps) {\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const {\n isHighlighted,\n isExpanded,\n onClick: _onClick,\n expand,\n collapse,\n optionRenderer,\n } = useDropdownFlyoutContext()\n\n const onMouseEnter = React.useCallback(() => expand(option), [option, expand])\n const onMouseLeave = React.useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (\n e.relatedTarget instanceof Node &&\n overlayElRef.current &&\n !overlayElRef.current.contains(e.relatedTarget as Node)\n ) {\n collapse(option)\n }\n },\n [collapse, option]\n )\n\n const onClick = React.useCallback(() => _onClick(option), [_onClick, option])\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n return (\n <>\n <FlyoutCaption\n ref={setReferenceEl}\n role=\"listitem\"\n option={option.origin}\n onClick={onClick}\n optionRenderer={optionRenderer}\n highlighted={isHighlighted(option)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n {Array.isArray(option.children) && isExpanded(option) ? (\n <Portal>\n <FlyoutList\n referenceEl={referenceEl}\n options={option.children}\n overlayRef={overlayElRef}\n placement=\"right-top\"\n />\n </Portal>\n ) : null}\n </>\n )\n}\n\nexport function FlyoutList({\n options,\n placement,\n referenceEl,\n overlayRef: overlayElRef,\n offset = 0,\n}: FlyoutListProps) {\n const { overlayStyle, referenceRef, overlayRef } = useDropdownFlyoutOverlay({\n placement,\n offset: { mainAxis: offset },\n })\n\n React.useEffect(() => {\n referenceRef(referenceEl)\n }, [referenceEl, referenceRef])\n\n return (\n <Card\n ref={mergeRefs(overlayRef, overlayElRef)}\n shadowStrength={2}\n style={overlayStyle}\n >\n <StyledDropdownFlyout role=\"list\">\n {options.map((option) => (\n <FlyoutItem key={option.id} option={option} />\n ))}\n </StyledDropdownFlyout>\n </Card>\n )\n}\n\nconst DefaultButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function DefaultButton({ children, icon, ...props }, ref) {\n return (\n <DropdownButton\n {...props}\n icon={\n props.loading ? undefined : !icon && !children ? (\n <EllipsisVertical />\n ) : (\n icon\n )\n }\n arrow={Boolean(React.Children.count(children))}\n ref={ref}\n >\n {children}\n </DropdownButton>\n )\n }\n)\n\n/**\n\n The dropdown flyout allows for additional menu items to be nested within\n parent items, which allows more menu options for users.\n @a11y WARN: DropdownFlyotus hold no value and take an action. Focus is expected\n to be moved from a Dropdown to something else, to continue the user flow.\n If the action is inert and does not move focus, this is left to be added\n by the consumer.\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dropdownflyout--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropdown-flyout)\n\n */\nexport const DropdownFlyout = React.forwardRef<\n HTMLDivElement,\n DropdownFlyoutProps\n>(function DropdownFlyout(\n {\n disabled,\n icon,\n label,\n loading,\n options: _options,\n onClick: _onClick = noop,\n optionRenderer = defaultOptionRenderer,\n children,\n placement = 'right-bottom',\n onKeyDown: _onKeyDown,\n onFocus: onFocus_,\n onBlur: onBlur_,\n onMouseDown: onMouseDown_,\n onMouseEnter: onMouseEnter_,\n onMouseLeave: onMouseLeave_,\n size,\n variant = 'secondary',\n ...props\n },\n ref\n) {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const containerRef = (ref as React.RefObject<HTMLInputElement>) || innerRef\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const targetRef = React.useRef<HTMLElement>(null)\n\n const flyoutOptions = React.useMemo(\n () => transformOption(_options, rootId),\n [_options]\n )\n\n const {\n options,\n collapse,\n expand,\n closeSelectedDropdown,\n openDropdown,\n isOpen,\n onClick,\n onKeyDown,\n setMouseOver,\n setFocused,\n isExpanded,\n isHighlighted,\n } = useDropdownFlyout({\n flyoutOptions,\n onClick: _onClick,\n onKeyDown: _onKeyDown,\n })\n\n useClickOutside({\n onClickOutside: isOpen ? closeSelectedDropdown : noop,\n refs: [containerRef],\n })\n\n const element =\n typeof children === 'function' ? children({ isOpen }) : children\n\n const I18n = useI18nContext()\n\n const ariaLabel =\n props['aria-label'] ||\n label ||\n I18n.t(`core.dropdown.${loading ? 'loading' : 'moreOptions'}`)\n\n const trigger: ReactElementWithRef = React.isValidElement(element) ? (\n element\n ) : (\n <DefaultButton\n aria-label={ariaLabel}\n children={label}\n disabled={disabled}\n loading={loading}\n icon={icon}\n size={size}\n variant={variant}\n />\n )\n\n function onBlur(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(false)\n closeSelectedDropdown(e)\n onBlur_?.(e)\n }\n\n function onFocus(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(true)\n onFocus_?.(e)\n }\n\n function onMouseDown(e: React.MouseEvent<HTMLDivElement>) {\n // Discard firing of blur event\n // when click was inside the dropdown\n if ((e.target as HTMLElement).dataset.flyout) {\n e.preventDefault()\n return\n }\n if (e.target instanceof Node && containerRef.current?.contains(e.target)) {\n e.preventDefault()\n targetRef.current?.focus()\n }\n onMouseDown_?.(e)\n }\n\n function onMouseLeave(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(false)\n onMouseLeave_?.(e)\n }\n\n function onMouseEnter(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(true)\n onMouseEnter_?.(e)\n }\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n // mergeRefs function is from shared utils.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const memoRef = useCallback(\n trigger.ref\n ? mergeRefs(trigger.ref, targetRef, setReferenceEl)\n : mergeRefs(targetRef, setReferenceEl),\n [targetRef, setReferenceEl, trigger.ref]\n )\n return (\n <div\n {...props}\n aria-label={undefined}\n ref={containerRef}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onMouseDown={onMouseDown}\n onBlur={onBlur}\n >\n {React.cloneElement(trigger, {\n ref: memoRef,\n onClick: (e: MouseEvent<HTMLElement, 'click'>) => {\n trigger.props.onClick?.(e)\n openDropdown()\n },\n tabIndex: 0,\n })}\n <DropdownFlyoutContext.Provider\n value={{\n expand,\n collapse,\n onClick,\n isExpanded,\n isHighlighted,\n optionRenderer,\n }}\n >\n {isOpen && (\n <Portal>\n <FlyoutList\n options={options}\n overlayRef={overlayElRef}\n placement={placement}\n referenceEl={referenceEl}\n offset={4}\n />\n </Portal>\n )}\n </DropdownFlyoutContext.Provider>\n </div>\n )\n})\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,OAAOC,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAE1C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,qBAAqB,EACrBC,qBAAqB,EACrBC,IAAI,EACJC,eAAe,EACfC,iBAAiB,EACjBC,wBAAwB,QACnB,0BAA0B;AACjC,SACEC,oBAAoB,EACpBC,wBAAwB,QACnB,yBAAyB;AAOhC,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,wBAAwB,QAAQ,4BAA4B;AAErE,OAAO,IAAMC,aAAa,gBAAGlB,KAAK,CAACmB,UAAU,CAG3C,SAASD,aAAaA,CAAAE,IAAA,EAEtBC,GAAG,EACH;EAAA,IAFEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IAAEC,cAAc,GAAAJ,IAAA,CAAdI,cAA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}
1
+ {"version":3,"file":"DropdownFlyout.js","names":["EllipsisVertical","React","useCallback","Card","DropdownButton","Portal","useClickOutside","useI18nContext","mergeRefs","defaultOptionRenderer","DropdownFlyoutContext","noop","transformOption","useDropdownFlyout","useDropdownFlyoutContext","StyledDropdownFlyout","StyledDropdownFlyoutItem","rootId","useDropdownFlyoutOverlay","FlyoutCaption","forwardRef","_ref","ref","option","highlighted","optionRenderer","props","_objectWithoutProperties","_excluded","createElement","_extends","displayName","FlyoutItem","_ref2","overlayElRef","useRef","_useDropdownFlyoutCon","isHighlighted","isExpanded","_onClick","onClick","expand","collapse","onMouseEnter","onMouseLeave","e","relatedTarget","Node","current","contains","_React$useState","useState","_React$useState2","_slicedToArray","referenceEl","setReferenceEl","Fragment","role","origin","Array","isArray","children","FlyoutList","options","overlayRef","placement","_ref3","_ref3$offset","offset","_useDropdownFlyoutOve","mainAxis","overlayStyle","referenceRef","useEffect","shadowStrength","style","map","key","id","DefaultButton","_ref4","icon","_excluded2","loading","undefined","arrow","Boolean","Children","count","DropdownFlyout","_ref5","disabled","label","_options","_ref5$onClick","_ref5$optionRenderer","_ref5$placement","_onKeyDown","onKeyDown","onFocus_","onFocus","onBlur_","onBlur","onMouseDown_","onMouseDown","onMouseEnter_","onMouseLeave_","size","_ref5$variant","variant","_excluded3","innerRef","containerRef","targetRef","flyoutOptions","useMemo","_useDropdownFlyout","closeSelectedDropdown","openDropdown","isOpen","setMouseOver","setFocused","onClickOutside","refs","element","I18n","ariaLabel","t","concat","trigger","isValidElement","_containerRef$current","target","dataset","flyout","preventDefault","_targetRef$current","focus","_React$useState3","_React$useState4","memoRef","cloneElement","_trigger$props$onClic","_trigger$props","call","tabIndex","Provider","value"],"sources":["../../src/DropdownFlyout/DropdownFlyout.tsx"],"sourcesContent":["import { EllipsisVertical } from '@procore/core-icons/dist'\nimport type { MouseEvent } from 'react'\nimport React, { useCallback } from 'react'\nimport type { ButtonProps } from '../Button'\nimport { Card } from '../Card'\nimport { DropdownButton } from '../Dropdown/Dropdown'\nimport { Portal } from '../Portal'\nimport { useClickOutside } from '../_hooks/ClickOutside'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type { ReactElementWithRef } from '../_utils/types'\nimport {\n defaultOptionRenderer,\n DropdownFlyoutContext,\n noop,\n transformOption,\n useDropdownFlyout,\n useDropdownFlyoutContext,\n} from './DropdownFlyout.helpers'\nimport {\n StyledDropdownFlyout,\n StyledDropdownFlyoutItem,\n} from './DropdownFlyout.styles'\nimport type {\n DropdownFlyoutProps,\n FlyoutCaptionProps,\n FlyoutItemProps,\n FlyoutListProps,\n} from './DropdownFlyout.types'\nimport { rootId } from './DropdownFlyout.types'\nimport { useDropdownFlyoutOverlay } from './useDropdownFlyoutOverlay'\n\nexport const FlyoutCaption = React.forwardRef<\n HTMLDivElement,\n FlyoutCaptionProps\n>(function FlyoutCaption(\n { option, highlighted, optionRenderer, ...props },\n ref\n) {\n return (\n <StyledDropdownFlyoutItem\n {...props}\n ref={ref}\n data-highlighted={highlighted}\n data-flyout\n >\n {optionRenderer(option)}\n </StyledDropdownFlyoutItem>\n )\n})\n\nFlyoutCaption.displayName = 'FlyoutCaption'\n\nexport function FlyoutItem({ option }: FlyoutItemProps) {\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const {\n isHighlighted,\n isExpanded,\n onClick: _onClick,\n expand,\n collapse,\n optionRenderer,\n } = useDropdownFlyoutContext()\n\n const onMouseEnter = React.useCallback(() => expand(option), [option, expand])\n const onMouseLeave = React.useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (\n e.relatedTarget instanceof Node &&\n overlayElRef.current &&\n !overlayElRef.current.contains(e.relatedTarget as Node)\n ) {\n collapse(option)\n }\n },\n [collapse, option]\n )\n\n const onClick = React.useCallback(() => _onClick(option), [_onClick, option])\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n return (\n <>\n <FlyoutCaption\n ref={setReferenceEl}\n role=\"listitem\"\n option={option.origin}\n onClick={onClick}\n optionRenderer={optionRenderer}\n highlighted={isHighlighted(option)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n {Array.isArray(option.children) && isExpanded(option) ? (\n <Portal>\n <FlyoutList\n referenceEl={referenceEl}\n options={option.children}\n overlayRef={overlayElRef}\n placement=\"right-top\"\n />\n </Portal>\n ) : null}\n </>\n )\n}\n\nexport function FlyoutList({\n options,\n placement,\n referenceEl,\n overlayRef: overlayElRef,\n offset = 0,\n}: FlyoutListProps) {\n const { overlayStyle, referenceRef, overlayRef } = useDropdownFlyoutOverlay({\n placement,\n offset: { mainAxis: offset },\n })\n\n React.useEffect(() => {\n referenceRef(referenceEl)\n }, [referenceEl, referenceRef])\n\n return (\n <Card\n ref={mergeRefs(overlayRef, overlayElRef)}\n shadowStrength={2}\n style={overlayStyle}\n >\n <StyledDropdownFlyout role=\"list\">\n {options.map((option) => (\n <FlyoutItem key={option.id} option={option} />\n ))}\n </StyledDropdownFlyout>\n </Card>\n )\n}\n\nconst DefaultButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function DefaultButton({ children, icon, ...props }, ref) {\n return (\n <DropdownButton\n {...props}\n icon={\n props.loading ? undefined : !icon && !children ? (\n <EllipsisVertical />\n ) : (\n icon\n )\n }\n arrow={Boolean(React.Children.count(children))}\n ref={ref}\n >\n {children}\n </DropdownButton>\n )\n }\n)\n\n/**\n\n The dropdown flyout allows for additional menu items to be nested within\n parent items, which allows more menu options for users.\n @a11y WARN: DropdownFlyotus hold no value and take an action. Focus is expected\n to be moved from a Dropdown to something else, to continue the user flow.\n If the action is inert and does not move focus, this is left to be added\n by the consumer.\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-dropdownflyout--demo)\n\n @see [Design Guidelines](https://design.procore.com/dropdown-flyout)\n\n */\nexport const DropdownFlyout = React.forwardRef<\n HTMLDivElement,\n DropdownFlyoutProps\n>(function DropdownFlyout(\n {\n disabled,\n icon,\n label,\n loading,\n options: _options,\n onClick: _onClick = noop,\n optionRenderer = defaultOptionRenderer,\n children,\n placement = 'right-bottom',\n onKeyDown: _onKeyDown,\n onFocus: onFocus_,\n onBlur: onBlur_,\n onMouseDown: onMouseDown_,\n onMouseEnter: onMouseEnter_,\n onMouseLeave: onMouseLeave_,\n size,\n variant = 'secondary',\n ...props\n },\n ref\n) {\n const innerRef = React.useRef<HTMLDivElement>(null)\n const containerRef = (ref as React.RefObject<HTMLInputElement>) || innerRef\n const overlayElRef = React.useRef<HTMLDivElement>(null)\n const targetRef = React.useRef<HTMLElement>(null)\n\n const flyoutOptions = React.useMemo(\n () => transformOption(_options, rootId),\n [_options]\n )\n\n const {\n options,\n collapse,\n expand,\n closeSelectedDropdown,\n openDropdown,\n isOpen,\n onClick,\n onKeyDown,\n setMouseOver,\n setFocused,\n isExpanded,\n isHighlighted,\n } = useDropdownFlyout({\n flyoutOptions,\n onClick: _onClick,\n onKeyDown: _onKeyDown,\n })\n\n useClickOutside({\n onClickOutside: isOpen ? closeSelectedDropdown : noop,\n refs: [containerRef],\n })\n\n const element =\n typeof children === 'function' ? children({ isOpen }) : children\n\n const I18n = useI18nContext()\n\n const ariaLabel =\n props['aria-label'] ||\n label ||\n I18n.t(`core.dropdown.${loading ? 'loading' : 'moreOptions'}`)\n\n const trigger: ReactElementWithRef = React.isValidElement(element) ? (\n element\n ) : (\n <DefaultButton\n aria-label={ariaLabel}\n children={label}\n disabled={disabled}\n loading={loading}\n icon={icon}\n size={size}\n variant={variant}\n />\n )\n\n function onBlur(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(false)\n closeSelectedDropdown(e)\n onBlur_?.(e)\n }\n\n function onFocus(e: React.FocusEvent<HTMLDivElement>) {\n setFocused(true)\n onFocus_?.(e)\n }\n\n function onMouseDown(e: React.MouseEvent<HTMLDivElement>) {\n // Discard firing of blur event\n // when click was inside the dropdown\n if ((e.target as HTMLElement).dataset.flyout) {\n e.preventDefault()\n return\n }\n if (e.target instanceof Node && containerRef.current?.contains(e.target)) {\n e.preventDefault()\n targetRef.current?.focus()\n }\n onMouseDown_?.(e)\n }\n\n function onMouseLeave(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(false)\n onMouseLeave_?.(e)\n }\n\n function onMouseEnter(e: React.MouseEvent<HTMLDivElement>) {\n setMouseOver(true)\n onMouseEnter_?.(e)\n }\n\n const [referenceEl, setReferenceEl] = React.useState<HTMLElement | null>(null)\n\n // mergeRefs function is from shared utils.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const memoRef = useCallback(\n trigger.ref\n ? mergeRefs(trigger.ref, targetRef, setReferenceEl)\n : mergeRefs(targetRef, setReferenceEl),\n [targetRef, setReferenceEl, trigger.ref]\n )\n return (\n <div\n {...props}\n aria-label={undefined}\n ref={containerRef}\n onKeyDown={onKeyDown}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onMouseDown={onMouseDown}\n onBlur={onBlur}\n >\n {React.cloneElement(trigger, {\n ref: memoRef,\n onClick: (e: MouseEvent<HTMLElement, 'click'>) => {\n trigger.props.onClick?.(e)\n openDropdown()\n },\n tabIndex: 0,\n })}\n <DropdownFlyoutContext.Provider\n value={{\n expand,\n collapse,\n onClick,\n isExpanded,\n isHighlighted,\n optionRenderer,\n }}\n >\n {isOpen && (\n <Portal>\n <FlyoutList\n options={options}\n overlayRef={overlayElRef}\n placement={placement}\n referenceEl={referenceEl}\n offset={4}\n />\n </Portal>\n )}\n </DropdownFlyoutContext.Provider>\n </div>\n )\n})\n"],"mappings":";;;;;;;;;;;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,OAAOC,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAE1C,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC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eACFhJ,KAAA,CAAA4B,aAAA,CAACnB,qBAAqB,CAACwI,QAAQ;IAC7BC,KAAK,EAAE;MACL1G,MAAM,EAANA,MAAM;MACNC,QAAQ,EAARA,QAAQ;MACRF,OAAO,EAAPA,OAAO;MACPF,UAAU,EAAVA,UAAU;MACVD,aAAa,EAAbA,aAAa;MACbZ,cAAc,EAAdA;IACF;EAAE,GAED8F,MAAM,iBACLtH,KAAA,CAAA4B,aAAA,CAACxB,MAAM,qBACLJ,KAAA,CAAA4B,aAAA,CAACiC,UAAU;IACTC,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAE9B,YAAa;IACzB+B,SAAS,EAAEA,SAAU;IACrBX,WAAW,EAAEA,WAAY;IACzBc,MAAM,EAAE;EAAE,CACX,CACK,CAEoB,CAC7B,CAAC;AAEV,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
- export declare const StyledDropdownFlyout: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const StyledDropdownFlyoutItem: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const StyledDropdownFlyoutLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
4
- export declare const StyledDropdownFlyoutExpandIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
1
+ /// <reference types="react" />
2
+ export declare const StyledDropdownFlyout: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const StyledDropdownFlyoutItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const StyledDropdownFlyoutLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
5
+ export declare const StyledDropdownFlyoutExpandIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -6,18 +6,18 @@ import { getEllipsis } from '../_styles/mixins';
6
6
  import { spacing } from '../_styles/spacing';
7
7
  export var StyledDropdownFlyout = /*#__PURE__*/styled.div.withConfig({
8
8
  displayName: "StyledDropdownFlyout",
9
- componentId: "core-12_21_2__sc-1i79jsg-0"
9
+ componentId: "core-12_22_0__sc-1i79jsg-0"
10
10
  })(["display:flex;flex-wrap:wrap;flex-direction:column;width:100%;max-height:855px;padding:", "px 0;"], spacing.sm);
11
11
  export var StyledDropdownFlyoutItem = /*#__PURE__*/styled.div.withConfig({
12
12
  displayName: "StyledDropdownFlyoutItem",
13
- componentId: "core-12_21_2__sc-1i79jsg-1"
13
+ componentId: "core-12_22_0__sc-1i79jsg-1"
14
14
  })(["display:flex;justify-content:space-between;cursor:pointer;width:100%;padding:", "px ", "px;color:", ";", " &[data-highlighted='true'],&:hover{background-color:", ";}"], spacing.xs, spacing.lg, colors.gray20, getTypographyIntent('body'), colors.gray96);
15
15
  export var StyledDropdownFlyoutLabel = /*#__PURE__*/styled.span.withConfig({
16
16
  displayName: "StyledDropdownFlyoutLabel",
17
- componentId: "core-12_21_2__sc-1i79jsg-2"
17
+ componentId: "core-12_22_0__sc-1i79jsg-2"
18
18
  })(["", ""], getEllipsis());
19
19
  export var StyledDropdownFlyoutExpandIcon = /*#__PURE__*/styled.span.withConfig({
20
20
  displayName: "StyledDropdownFlyoutExpandIcon",
21
- componentId: "core-12_21_2__sc-1i79jsg-3"
21
+ componentId: "core-12_22_0__sc-1i79jsg-3"
22
22
  })(["position:relative;display:inline-flex;align-self:center;flex-shrink:0;margin-left:", "px;white-space:nowrap;", ""], spacing.lg, arrowRight(4, 'black'));
23
23
  //# sourceMappingURL=DropdownFlyout.styles.js.map
@@ -72,7 +72,10 @@ export interface FlyoutListProps extends DivAttributes {
72
72
  referenceEl: HTMLElement | null;
73
73
  offset?: number;
74
74
  }
75
- export interface DropdownFlyoutProps extends Omit<DivAttributes, 'onClick'> {
75
+ export interface DropdownFlyoutProps extends Omit<DivAttributes, 'children' | 'onClick'> {
76
+ children?: React.ReactNode | React.FunctionComponent<{
77
+ isOpen?: boolean;
78
+ }>;
76
79
  /**
77
80
  * @since 10.19.0
78
81
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownFlyout.types.js","names":["rootId"],"sources":["../../src/DropdownFlyout/DropdownFlyout.types.ts"],"sourcesContent":["import type { Ref } from 'react'\nimport type { DropdownProps } from '../Dropdown/Dropdown.types'\nimport type { OverlayProps } from '../Overlay/Overlay'\nimport type { DivAttributes, Placement, Props } from '../_utils/types'\n\nexport const rootId = 'ROOT_ID'\n\nexport type Action =\n | { type: 'highlight'; option: FlyoutOption }\n | { type: 'expand'; option: FlyoutOption }\n | { type: 'collapse'; option: FlyoutOption }\n | { type: 'close' }\n | { type: 'open' }\n | { type: 'setMouseOver'; isMouseOver: boolean }\n | { type: 'setFocused'; isFocused: boolean }\n | { type: 'updateOptions'; options: FlyoutOption[] }\n\ntype ExpandedItem = FlyoutOptionId\n\nexport type State = {\n highlighted: FlyoutOption\n expanded: ExpandedItem[]\n options: FlyoutOption[]\n isMouseOver: boolean\n isFocused: boolean\n isOpen: boolean\n}\n\nexport interface DropdownOption {\n value: any\n label: string\n children?: DropdownOption[]\n}\n\ntype OptionId = string\nexport interface FlyoutOption {\n /**\n * @since 10.19.0\n */\n id: OptionId\n /**\n * @since 10.19.0\n */\n parentId: OptionId | typeof rootId\n /**\n * @since 10.19.0\n */\n origin: DropdownOption\n /**\n * @since 10.19.0\n */\n children?: FlyoutOption[]\n}\n\nexport type FlyoutOptionId = FlyoutOption['id'] | typeof rootId\n\nexport interface FlyoutCaptionProps extends DivAttributes {\n option: DropdownOption\n highlighted: boolean\n optionRenderer: (option: DropdownOption) => React.ReactNode\n}\n\nexport interface FlyoutListProps extends DivAttributes {\n options: FlyoutOption[]\n overlayRef: Ref<HTMLDivElement>\n placement: Placement\n referenceEl: HTMLElement | null\n offset?: number\n}\n\nexport interface DropdownFlyoutProps extends Omit<DivAttributes, 'onClick'> {\n /**\n * @since 10.19.0\n */\n disabled?: DropdownProps['disabled']\n\n /**\n * The text of the button.\n * @since 10.19.0\n */\n label?: DropdownProps['label']\n /**\n * @since 10.19.0\n */\n loading?: DropdownProps['loading']\n\n /**\n * The icon of the button.\n * @since 10.19.0\n */\n icon?: DropdownProps['icon']\n\n /**\n * Data of the dropdown options - `Option[]`\n * ```\n * type Option = { label: string; children?: Option[] }\n * ```\n * @since 10.19.0\n */\n options: DropdownOption[]\n\n /**\n * Callback for click on dropdown option\n * ```\n * (option: Option) => void\n * ```\n * @since 10.19.0\n */\n onClick?: (option: DropdownOption) => void\n\n /**\n * Render prop to specify custom dropdown option content\n * ```\n * (option: Option) => ReactNode\n * ```\n * @since 10.19.0\n */\n optionRenderer?: (option: DropdownOption) => React.ReactNode\n\n /**\n * @default 'right-bottom'\n * @since 10.19.0\n */\n placement?: OverlayProps['placement']\n\n /**\n * The button size\n * @default 'md'\n * @since 10.19.0\n */\n size?: DropdownProps['size']\n\n /**\n * @default 'secondary'\n * @since 10.19.0\n */\n variant?: DropdownProps['variant']\n}\n\nexport interface FlyoutItemProps extends Props {\n option: FlyoutOption\n}\n"],"mappings":"AAKA,OAAO,IAAMA,MAAM,GAAG,SAAS"}
1
+ {"version":3,"file":"DropdownFlyout.types.js","names":["rootId"],"sources":["../../src/DropdownFlyout/DropdownFlyout.types.ts"],"sourcesContent":["import type { Ref } from 'react'\nimport type { DropdownProps } from '../Dropdown/Dropdown.types'\nimport type { OverlayProps } from '../Overlay/Overlay'\nimport type { DivAttributes, Placement, Props } from '../_utils/types'\n\nexport const rootId = 'ROOT_ID'\n\nexport type Action =\n | { type: 'highlight'; option: FlyoutOption }\n | { type: 'expand'; option: FlyoutOption }\n | { type: 'collapse'; option: FlyoutOption }\n | { type: 'close' }\n | { type: 'open' }\n | { type: 'setMouseOver'; isMouseOver: boolean }\n | { type: 'setFocused'; isFocused: boolean }\n | { type: 'updateOptions'; options: FlyoutOption[] }\n\ntype ExpandedItem = FlyoutOptionId\n\nexport type State = {\n highlighted: FlyoutOption\n expanded: ExpandedItem[]\n options: FlyoutOption[]\n isMouseOver: boolean\n isFocused: boolean\n isOpen: boolean\n}\n\nexport interface DropdownOption {\n value: any\n label: string\n children?: DropdownOption[]\n}\n\ntype OptionId = string\nexport interface FlyoutOption {\n /**\n * @since 10.19.0\n */\n id: OptionId\n /**\n * @since 10.19.0\n */\n parentId: OptionId | typeof rootId\n /**\n * @since 10.19.0\n */\n origin: DropdownOption\n /**\n * @since 10.19.0\n */\n children?: FlyoutOption[]\n}\n\nexport type FlyoutOptionId = FlyoutOption['id'] | typeof rootId\n\nexport interface FlyoutCaptionProps extends DivAttributes {\n option: DropdownOption\n highlighted: boolean\n optionRenderer: (option: DropdownOption) => React.ReactNode\n}\n\nexport interface FlyoutListProps extends DivAttributes {\n options: FlyoutOption[]\n overlayRef: Ref<HTMLDivElement>\n placement: Placement\n referenceEl: HTMLElement | null\n offset?: number\n}\n\nexport interface DropdownFlyoutProps\n extends Omit<DivAttributes, 'children' | 'onClick'> {\n children?: React.ReactNode | React.FunctionComponent<{ isOpen?: boolean }>\n /**\n * @since 10.19.0\n */\n disabled?: DropdownProps['disabled']\n\n /**\n * The text of the button.\n * @since 10.19.0\n */\n label?: DropdownProps['label']\n /**\n * @since 10.19.0\n */\n loading?: DropdownProps['loading']\n\n /**\n * The icon of the button.\n * @since 10.19.0\n */\n icon?: DropdownProps['icon']\n\n /**\n * Data of the dropdown options - `Option[]`\n * ```\n * type Option = { label: string; children?: Option[] }\n * ```\n * @since 10.19.0\n */\n options: DropdownOption[]\n\n /**\n * Callback for click on dropdown option\n * ```\n * (option: Option) => void\n * ```\n * @since 10.19.0\n */\n onClick?: (option: DropdownOption) => void\n\n /**\n * Render prop to specify custom dropdown option content\n * ```\n * (option: Option) => ReactNode\n * ```\n * @since 10.19.0\n */\n optionRenderer?: (option: DropdownOption) => React.ReactNode\n\n /**\n * @default 'right-bottom'\n * @since 10.19.0\n */\n placement?: OverlayProps['placement']\n\n /**\n * The button size\n * @default 'md'\n * @since 10.19.0\n */\n size?: DropdownProps['size']\n\n /**\n * @default 'secondary'\n * @since 10.19.0\n */\n variant?: DropdownProps['variant']\n}\n\nexport interface FlyoutItemProps extends Props {\n option: FlyoutOption\n}\n"],"mappings":"AAKA,OAAO,IAAMA,MAAM,GAAG,SAAS"}
@@ -2,7 +2,9 @@ import React from 'react';
2
2
  import type { DivAttributes } from '../_utils/types';
3
3
  import type { DropzoneContentProps, DropzoneErrorBannerProps, DropzoneProps, DropzoneRef, MultipleErrorsProps } from './Dropzone.types';
4
4
  export declare function MultipleErrors(props: MultipleErrorsProps): React.JSX.Element;
5
- export declare const DropzoneErrorBanner: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<DropzoneErrorBannerProps & DivAttributes & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
5
+ export declare const DropzoneErrorBanner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<DropzoneErrorBannerProps & DivAttributes & React.RefAttributes<HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
7
+ }, never>> & string & Omit<React.ForwardRefExoticComponent<DropzoneErrorBannerProps & DivAttributes & React.RefAttributes<HTMLDivElement>>, keyof React.Component<any, {}, any>>;
6
8
  export declare function DropzoneDefaultMessage({ open, disabled, multiple, errorMessage, }: DropzoneContentProps & {
7
9
  multiple: boolean;
8
10
  }): React.JSX.Element;
@@ -95,7 +95,7 @@ export function MultipleErrors(props) {
95
95
  // make error banner accessible as a styled-components selector
96
96
  export var DropzoneErrorBanner = /*#__PURE__*/styled(DropzoneErrorBannerBase).withConfig({
97
97
  displayName: "DropzoneErrorBanner",
98
- componentId: "core-12_21_2__sc-l4fojb-0"
98
+ componentId: "core-12_22_0__sc-l4fojb-0"
99
99
  })([""]);
100
100
  function DropzoneContainer(_ref2) {
101
101
  var active = _ref2.active,
@@ -104,8 +104,8 @@ function DropzoneContainer(_ref2) {
104
104
  rootProps = _ref2.rootProps,
105
105
  children = _ref2.children;
106
106
  return /*#__PURE__*/React.createElement(StyledDropzoneContainer, _extends({}, getRootProps(rootProps), {
107
- active: active,
108
- disabled: disabled
107
+ $active: active,
108
+ $disabled: disabled
109
109
  }), children);
110
110
  }
111
111
  function DropzoneContent(_ref3) {
@@ -113,7 +113,7 @@ function DropzoneContent(_ref3) {
113
113
  isIconVisible = _ref3.isIconVisible,
114
114
  contentMessage = _ref3.contentMessage;
115
115
  return /*#__PURE__*/React.createElement(StyledDropzoneMessage, null, isIconVisible && /*#__PURE__*/React.createElement(StyledDropzoneIcon, {
116
- disabled: disabled
116
+ $disabled: disabled
117
117
  }, disabled ? /*#__PURE__*/React.createElement(Ban, null) : /*#__PURE__*/React.createElement(Image, null)), contentMessage);
118
118
  }
119
119
  export function DropzoneDefaultMessage(_ref4) {
@@ -129,7 +129,7 @@ export function DropzoneDefaultMessage(_ref4) {
129
129
  }, I18n.t('core.dropzone.uploadFiles', {
130
130
  count: multiple ? Infinity : 1
131
131
  })), /*#__PURE__*/React.createElement(StyledDropzoneCaption, {
132
- error: !!errorMessage
132
+ $error: !!errorMessage
133
133
  }, errorMessage || I18n.t('core.dropzone.dragAndDrop')));
134
134
  }
135
135
  var dropErrorsByReason = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, fileRejectionReason.maxFiles, dropErrors.fileAmount), fileRejectionReason.maxFileSize, dropErrors.maxFileSize), fileRejectionReason.minFileSize, dropErrors.minFileSize), fileRejectionReason.fileType, dropErrors.fileType);