@procore/core-react 10.20.0-rc.23 → 10.20.0-rc.27

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 (245) hide show
  1. package/dist/esm/components/AvatarStack/AvatarStack.js +1 -1
  2. package/dist/esm/components/AvatarStack/AvatarStack.js.map +1 -1
  3. package/dist/esm/components/Badge/Badge.d.ts +2 -2
  4. package/dist/esm/components/Badge/Badge.styles.d.ts +3 -2
  5. package/dist/esm/components/Badge/Badge.styles.js.map +1 -1
  6. package/dist/esm/components/Badge/Badge.types.d.ts +5 -0
  7. package/dist/esm/components/Badge/Badge.types.js +2 -0
  8. package/dist/esm/components/Badge/Badge.types.js.map +1 -0
  9. package/dist/esm/components/Badge/index.d.ts +1 -0
  10. package/dist/esm/components/Button/Button.types.d.ts +3 -2
  11. package/dist/esm/components/Calendar/Calendar.types.d.ts +4 -0
  12. package/dist/esm/components/Card/Card.types.d.ts +1 -1
  13. package/dist/esm/components/Checkbox/Checkbox.types.d.ts +20 -0
  14. package/dist/esm/components/DateInput/DateInput.types.d.ts +15 -0
  15. package/dist/esm/components/DateSelect/DateSelect.d.ts +1 -12
  16. package/dist/esm/components/DateSelect/DateSelect.js.map +1 -1
  17. package/dist/esm/components/DateSelect/DateSelect.types.d.ts +12 -0
  18. package/dist/esm/components/DateSelect/DateSelect.types.js +2 -0
  19. package/dist/esm/components/DateSelect/DateSelect.types.js.map +1 -0
  20. package/dist/esm/components/DateSelect/index.d.ts +2 -1
  21. package/dist/esm/components/DateSelect/index.js.map +1 -1
  22. package/dist/esm/components/Dropdown/Dropdown.types.d.ts +37 -0
  23. package/dist/esm/components/DropdownFlyout/DropdownFlyout.helpers.d.ts +6 -6
  24. package/dist/esm/components/DropdownFlyout/DropdownFlyout.helpers.js.map +1 -1
  25. package/dist/esm/components/DropdownFlyout/DropdownFlyout.types.d.ts +44 -8
  26. package/dist/esm/components/Dropzone/Dropzone.types.d.ts +92 -5
  27. package/dist/esm/components/Dropzone/Dropzone.types.js.map +1 -1
  28. package/dist/esm/components/EmptyState/EmptyState.types.d.ts +11 -2
  29. package/dist/esm/components/FileList/FileList.d.ts +1 -17
  30. package/dist/esm/components/FileList/FileList.js.map +1 -1
  31. package/dist/esm/components/FileList/FileList.types.d.ts +16 -0
  32. package/dist/esm/components/FileList/FileList.types.js +2 -0
  33. package/dist/esm/components/FileList/FileList.types.js.map +1 -0
  34. package/dist/esm/components/FileList/index.d.ts +2 -1
  35. package/dist/esm/components/FileList/index.js.map +1 -1
  36. package/dist/esm/components/FileSelect/FileSelect.types.d.ts +132 -0
  37. package/dist/esm/components/FileSelect/GridSource/GridSource.types.d.ts +62 -0
  38. package/dist/esm/components/FileSelect/LocalSource/LocalSource.types.d.ts +103 -0
  39. package/dist/esm/components/FileSelect/TreeSource/TreeSource.types.d.ts +7 -0
  40. package/dist/esm/components/Font/Font.d.ts +2 -11
  41. package/dist/esm/components/Font/Font.js.map +1 -1
  42. package/dist/esm/components/Font/Font.types.d.ts +27 -0
  43. package/dist/esm/components/Font/Font.types.js +2 -0
  44. package/dist/esm/components/Font/Font.types.js.map +1 -0
  45. package/dist/esm/components/Font/index.d.ts +2 -1
  46. package/dist/esm/components/Font/index.js.map +1 -1
  47. package/dist/esm/components/Form/Form.types.d.ts +171 -0
  48. package/dist/esm/components/Icon/Icon.d.ts +2 -9
  49. package/dist/esm/components/Icon/Icon.js.map +1 -1
  50. package/dist/esm/components/Icon/Icon.types.d.ts +26 -0
  51. package/dist/esm/components/Icon/Icon.types.js +2 -0
  52. package/dist/esm/components/Icon/Icon.types.js.map +1 -0
  53. package/dist/esm/components/Icon/index.d.ts +2 -1
  54. package/dist/esm/components/Icon/index.js.map +1 -1
  55. package/dist/esm/components/Menu/Menu.types.d.ts +59 -0
  56. package/dist/esm/components/Modal/Modal.types.d.ts +6 -0
  57. package/dist/esm/components/MultiSelect/MultiSelect.types.d.ts +38 -0
  58. package/dist/esm/components/Notation/Notation.d.ts +2 -11
  59. package/dist/esm/components/Notation/Notation.js +0 -6
  60. package/dist/esm/components/Notation/Notation.js.map +1 -1
  61. package/dist/esm/components/Notation/Notation.types.d.ts +15 -0
  62. package/dist/esm/components/Notation/Notation.types.js +7 -0
  63. package/dist/esm/components/Notation/Notation.types.js.map +1 -0
  64. package/dist/esm/components/Notation/index.d.ts +2 -1
  65. package/dist/esm/components/Notation/index.js.map +1 -1
  66. package/dist/esm/components/NumberInput/NumberInput.types.d.ts +10 -5
  67. package/dist/esm/components/OverlayTrigger/OverlayTrigger.d.ts +33 -0
  68. package/dist/esm/components/OverlayTrigger/OverlayTrigger.js.map +1 -1
  69. package/dist/esm/components/Pagination/Pagination.js +1 -1
  70. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  71. package/dist/esm/components/Pagination/Pagination.types.d.ts +12 -0
  72. package/dist/esm/components/Panel/Panel.types.d.ts +10 -0
  73. package/dist/esm/components/Portal/Portal.d.ts +1 -1
  74. package/dist/esm/components/Portal/Portal.js.map +1 -1
  75. package/dist/esm/components/RadioButton/RadioButton.types.d.ts +9 -0
  76. package/dist/esm/components/Search/Search.types.d.ts +16 -0
  77. package/dist/esm/components/SegmentedController/SegmentedController.types.d.ts +21 -0
  78. package/dist/esm/components/Select/Select.types.d.ts +52 -0
  79. package/dist/esm/components/Spinner/Spinner.types.d.ts +16 -0
  80. package/dist/esm/components/Switch/Switch.types.d.ts +2 -1
  81. package/dist/esm/components/Table/Table.types.d.ts +79 -0
  82. package/dist/esm/components/Tabs/Tabs.types.d.ts +4 -0
  83. package/dist/esm/components/TextEditor/TextEditor.d.ts +1 -15
  84. package/dist/esm/components/TextEditor/TextEditor.js.map +1 -1
  85. package/dist/esm/components/TextEditor/TextEditor.types.d.ts +34 -0
  86. package/dist/esm/components/TextEditor/TextEditor.types.js +2 -0
  87. package/dist/esm/components/TextEditor/TextEditor.types.js.map +1 -0
  88. package/dist/esm/components/TextEditor/index.d.ts +2 -1
  89. package/dist/esm/components/TextEditor/index.js.map +1 -1
  90. package/dist/esm/components/Thumbnail/Thumbnail.types.d.ts +38 -1
  91. package/dist/esm/components/TieredSelect/TieredSelect.types.d.ts +89 -0
  92. package/dist/esm/components/Tile/Tile.types.d.ts +25 -0
  93. package/dist/esm/components/ToggleButton/ToggleButton.types.d.ts +11 -0
  94. package/dist/esm/components/Token/Token.types.d.ts +6 -0
  95. package/dist/esm/components/Tooltip/Tooltip.types.d.ts +12 -1
  96. package/dist/esm/components/Tree/Tree.js.map +1 -1
  97. package/dist/esm/components/Tree/Tree.types.d.ts +73 -0
  98. package/dist/esm/components/Typography/Typography.types.d.ts +40 -0
  99. package/dist/esm/effects/Resize.d.ts +1 -1
  100. package/dist/esm/effects/Resize.js.map +1 -1
  101. package/dist/esm/index.d.ts +3 -3
  102. package/dist/esm/index.js +3 -3
  103. package/dist/esm/index.js.map +1 -1
  104. package/dist/esm/layouts/Box/Box.types.d.ts +21 -0
  105. package/dist/esm/layouts/DetailPage/DetailPage.d.ts +19 -0
  106. package/dist/esm/layouts/DetailPage/DetailPage.js.map +1 -1
  107. package/dist/esm/layouts/Flex/Flex.types.d.ts +6 -0
  108. package/dist/esm/layouts/FlexList/FlexList.types.d.ts +3 -0
  109. package/dist/esm/layouts/{Grid.d.ts → Grid/Grid.d.ts} +19 -1
  110. package/dist/esm/layouts/{Grid.js → Grid/Grid.js} +1 -1
  111. package/dist/esm/layouts/Grid/Grid.js.map +1 -0
  112. package/dist/esm/layouts/Grid/index.d.ts +1 -0
  113. package/dist/esm/layouts/Grid/index.js +2 -0
  114. package/dist/esm/layouts/Grid/index.js.map +1 -0
  115. package/dist/esm/layouts/{IconLayout.d.ts → IconLayout/IconLayout.d.ts} +4 -1
  116. package/dist/esm/layouts/{IconLayout.js → IconLayout/IconLayout.js} +2 -2
  117. package/dist/esm/layouts/IconLayout/IconLayout.js.map +1 -0
  118. package/dist/esm/layouts/IconLayout/index.d.ts +1 -0
  119. package/dist/esm/layouts/IconLayout/index.js +2 -0
  120. package/dist/esm/layouts/IconLayout/index.js.map +1 -0
  121. package/dist/esm/layouts/{LegacyDetailPage.d.ts → LegacyDetailPage/LegacyDetailPage.d.ts} +5 -2
  122. package/dist/esm/layouts/{LegacyDetailPage.js → LegacyDetailPage/LegacyDetailPage.js} +3 -3
  123. package/dist/esm/layouts/LegacyDetailPage/LegacyDetailPage.js.map +1 -0
  124. package/dist/esm/layouts/LegacyDetailPage/index.d.ts +1 -0
  125. package/dist/esm/layouts/LegacyDetailPage/index.js +2 -0
  126. package/dist/esm/layouts/LegacyDetailPage/index.js.map +1 -0
  127. package/dist/esm/layouts/NextDetailPage/NextDetailPage.d.ts +1 -1
  128. package/dist/esm/layouts/NextDetailPage/index.d.ts +1 -1
  129. package/dist/esm/layouts/NextDetailPage/index.js +1 -1
  130. package/dist/esm/layouts/NextDetailPage/index.js.map +1 -1
  131. package/dist/esm/layouts/PageLayout/PageLayout.d.ts +7 -2
  132. package/dist/esm/layouts/PageLayout/PageLayout.js +56 -11
  133. package/dist/esm/layouts/PageLayout/PageLayout.js.map +1 -1
  134. package/dist/esm/layouts/PageLayout/PageLayout.styles.d.ts +5 -1
  135. package/dist/esm/layouts/PageLayout/PageLayout.styles.js +20 -6
  136. package/dist/esm/layouts/PageLayout/PageLayout.styles.js.map +1 -1
  137. package/dist/esm/layouts/PageLayout/PageLayout.types.d.ts +7 -1
  138. package/dist/esm/layouts/PageLayout/index.d.ts +1 -1
  139. package/dist/esm/layouts/PageLayout/index.js +1 -1
  140. package/dist/esm/layouts/PageLayout/index.js.map +1 -1
  141. package/dist/esm/utils/propsTypedoc.d.ts +48 -2
  142. package/dist/esm/utils/propsTypedoc.js +34 -24
  143. package/dist/esm/utils/propsTypedoc.js.map +1 -1
  144. package/dist/esm/utils/types.d.ts +9 -0
  145. package/dist/props/Avatar.json +1 -1
  146. package/dist/props/AvatarStack.json +1 -1
  147. package/dist/props/Badge.json +1 -0
  148. package/dist/props/Banner.json +1 -1
  149. package/dist/props/Box.json +1 -0
  150. package/dist/props/Breadcrumbs.json +1 -1
  151. package/dist/props/Button.json +1 -1
  152. package/dist/props/Calendar.json +1 -1
  153. package/dist/props/Card.json +1 -1
  154. package/dist/props/Checkbox.json +1 -1
  155. package/dist/props/ContactItem.json +1 -1
  156. package/dist/props/DateInput.json +1 -0
  157. package/dist/props/DateSelect.json +1 -0
  158. package/dist/props/DetailPage.json +1 -0
  159. package/dist/props/Dropdown.json +1 -1
  160. package/dist/props/DropdownFlyout.json +1 -0
  161. package/dist/props/Dropzone.json +1 -1
  162. package/dist/props/EmptyState.json +1 -1
  163. package/dist/props/FileList.json +1 -0
  164. package/dist/props/FileSelect.json +1 -0
  165. package/dist/props/Flex.json +1 -0
  166. package/dist/props/FlexList.json +1 -0
  167. package/dist/props/Font.json +1 -0
  168. package/dist/props/Form.json +1 -0
  169. package/dist/props/Grid.json +1 -0
  170. package/dist/props/GridSource.json +1 -0
  171. package/dist/props/GroupSelect.json +1 -1
  172. package/dist/props/Icon.json +1 -0
  173. package/dist/props/IconLayout.json +1 -0
  174. package/dist/props/Input.json +1 -0
  175. package/dist/props/LegacyDetailPage.json +1 -0
  176. package/dist/props/Link.json +1 -1
  177. package/dist/props/ListPage.json +1 -0
  178. package/dist/props/LocalSource.json +1 -0
  179. package/dist/props/Menu.json +1 -0
  180. package/dist/props/MenuImperative.json +1 -0
  181. package/dist/props/Modal.json +1 -1
  182. package/dist/props/MultiSelect.json +1 -0
  183. package/dist/props/NextDetailPage.json +1 -0
  184. package/dist/props/NextGrid.json +1 -1
  185. package/dist/props/Notation.json +1 -0
  186. package/dist/props/NumberInput.json +1 -0
  187. package/dist/props/OverlayTrigger.json +1 -0
  188. package/dist/props/PageLayout.json +1 -0
  189. package/dist/props/Pagination.json +1 -0
  190. package/dist/props/Panel.json +1 -0
  191. package/dist/props/PillSelect.json +1 -1
  192. package/dist/props/Popover.json +1 -1
  193. package/dist/props/ProgressBar.json +1 -0
  194. package/dist/props/RadioButton.json +1 -1
  195. package/dist/props/Required.json +1 -1
  196. package/dist/props/Search.json +1 -0
  197. package/dist/props/SegmentedController.json +1 -1
  198. package/dist/props/Select.json +1 -0
  199. package/dist/props/Slider.json +1 -1
  200. package/dist/props/Spinner.json +1 -1
  201. package/dist/props/Switch.json +1 -1
  202. package/dist/props/Table.json +1 -0
  203. package/dist/props/Tabs.json +1 -0
  204. package/dist/props/TextArea.json +1 -0
  205. package/dist/props/TextEditor.json +1 -0
  206. package/dist/props/Thumbnail.json +1 -0
  207. package/dist/props/TieredDropdown.json +1 -0
  208. package/dist/props/TieredSelect.json +1 -0
  209. package/dist/props/Tile.json +1 -0
  210. package/dist/props/Toast.json +1 -1
  211. package/dist/props/ToggleButton.json +1 -0
  212. package/dist/props/Token.json +1 -0
  213. package/dist/props/ToolHeader.json +1 -0
  214. package/dist/props/Tooltip.json +1 -1
  215. package/dist/props/Tree.json +1 -1
  216. package/dist/props/TreeSource.json +1 -0
  217. package/dist/props/Typeahead.json +1 -1
  218. package/dist/props/Typography.json +1 -1
  219. package/dist/props/allProps.json +84385 -12253
  220. package/dist/props/utils.json +1 -0
  221. package/package.json +5 -5
  222. package/storybook-static/{0.36a4dc12.iframe.bundle.js → 0.dde5c721.iframe.bundle.js} +1 -1
  223. package/storybook-static/{4.7e4053e5.iframe.bundle.js → 4.58fdecc5.iframe.bundle.js} +3 -3
  224. package/storybook-static/{4.7e4053e5.iframe.bundle.js.LICENSE.txt → 4.58fdecc5.iframe.bundle.js.LICENSE.txt} +0 -0
  225. package/storybook-static/4.58fdecc5.iframe.bundle.js.map +1 -0
  226. package/storybook-static/{5.6d713b1f.iframe.bundle.js → 5.e620cbe6.iframe.bundle.js} +1 -1
  227. package/storybook-static/{6.bb3e7bce.iframe.bundle.js → 6.c9ea1a58.iframe.bundle.js} +3 -3
  228. package/storybook-static/{6.bb3e7bce.iframe.bundle.js.LICENSE.txt → 6.c9ea1a58.iframe.bundle.js.LICENSE.txt} +0 -0
  229. package/storybook-static/6.c9ea1a58.iframe.bundle.js.map +1 -0
  230. package/storybook-static/{7.de964f69.iframe.bundle.js → 7.7f1db2f5.iframe.bundle.js} +1 -1
  231. package/storybook-static/iframe.html +1 -1
  232. package/storybook-static/main.08f0dcac.iframe.bundle.js +1 -0
  233. package/storybook-static/{runtime~main.7aac441e.iframe.bundle.js → runtime~main.063219ff.iframe.bundle.js} +1 -1
  234. package/storybook-static/vendors~main.371a5bc6.iframe.bundle.js +3 -0
  235. package/storybook-static/{vendors~main.9f84f57c.iframe.bundle.js.LICENSE.txt → vendors~main.371a5bc6.iframe.bundle.js.LICENSE.txt} +0 -0
  236. package/storybook-static/vendors~main.371a5bc6.iframe.bundle.js.map +1 -0
  237. package/typedoc.js +12 -13
  238. package/dist/esm/layouts/Grid.js.map +0 -1
  239. package/dist/esm/layouts/IconLayout.js.map +0 -1
  240. package/dist/esm/layouts/LegacyDetailPage.js.map +0 -1
  241. package/storybook-static/4.7e4053e5.iframe.bundle.js.map +0 -1
  242. package/storybook-static/6.bb3e7bce.iframe.bundle.js.map +0 -1
  243. package/storybook-static/main.f5c0afea.iframe.bundle.js +0 -1
  244. package/storybook-static/vendors~main.9f84f57c.iframe.bundle.js +0 -3
  245. package/storybook-static/vendors~main.9f84f57c.iframe.bundle.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Dropzone.types.js","sourceRoot":"","sources":["../../../../src/components/Dropzone/Dropzone.types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,IAAM,mBAAmB,GAAwC;IACtE,QAAQ,EAAE,gBAAgB;IAC1B,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,gBAAgB;IAC7B,QAAQ,EAAE,mBAAmB;CAC9B,CAAA;AAgDD,MAAM,CAAC,IAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,iBAAiB;IAC3B,UAAU,EAAE,mBAAmB;IAC/B,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,eAAe;IAC5B,cAAc,EAAE,oBAAoB;IACpC,cAAc,EAAE,iBAAiB;IACjC,KAAK,EAAE,OAAO;CACN,CAAA"}
1
+ {"version":3,"file":"Dropzone.types.js","sourceRoot":"","sources":["../../../../src/components/Dropzone/Dropzone.types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,IAAM,mBAAmB,GAAwC;IACtE,QAAQ,EAAE,gBAAgB;IAC1B,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,gBAAgB;IAC7B,QAAQ,EAAE,mBAAmB;CAC9B,CAAA;AAqGD,MAAM,CAAC,IAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,iBAAiB;IAC3B,UAAU,EAAE,mBAAmB;IAC/B,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,eAAe;IAC5B,cAAc,EAAE,oBAAoB;IACpC,cAAc,EAAE,iBAAiB;IACjC,KAAK,EAAE,OAAO;CACN,CAAA"}
@@ -1,7 +1,16 @@
1
1
  import { Props } from '../../utils/types';
2
+ export interface EmptyStateProps extends Props {
3
+ /**
4
+ * Render the EmptyState in compact mode
5
+ */
6
+ compact?: boolean;
7
+ }
8
+ export interface EmptyStateActionsProps extends Props {
9
+ }
10
+ export interface EmptyStateDescriptionsProps extends Props {
11
+ }
2
12
  export interface EmptyStateImageProps {
3
13
  src?: string;
4
14
  }
5
- export interface EmptyStateProps extends Props {
6
- compact?: boolean;
15
+ export interface EmptyStateTitleProps extends Props {
7
16
  }
@@ -1,20 +1,4 @@
1
1
  import React from 'react';
2
2
  import { DivAttributes } from '../../utils/types';
3
- interface QaTags {
4
- item?: (item: FileListItem) => string;
5
- }
6
- interface FileListItem {
7
- name: string;
8
- url: string;
9
- }
10
- export interface FileListProps {
11
- downloadAllUrl?: string;
12
- items: FileListItem[];
13
- qa?: QaTags;
14
- }
3
+ import { FileListProps } from './FileList.types';
15
4
  export declare const FileList: React.ForwardRefExoticComponent<FileListProps & DivAttributes & React.RefAttributes<HTMLDivElement>>;
16
- interface FileListItem {
17
- name: string;
18
- url: string;
19
- }
20
- export {};
@@ -1 +1 @@
1
- {"version":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AE;YAEZ,6BAAK,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,oBAAoB,CAAC;gBACnD,8BAAM,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,8BAA8B,CAAC,IAC1D,IAAI,CACA;gBACN,UAAU,IAAI,CACb,8BAAM,SAAS,EAAE,EAAE,CAAC,mCAAmC,CAAC,IACrD,SAAS,CACL,CACR,CACG,CACE;QACV,2BAAG,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,0BAA0B,CAAC;YACrD,oBAAC,YAAY,OAAG,CACd,CACA,CACP,CAAA;AACH,CAAC;AAED,SAAS,YAAY;IACnB,OAAO,CACL,6BACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAE,KAAK;QAEhB,8BAAM,CAAC,EAAC,wCAAwC,EAAC,IAAI,EAAC,SAAS,GAAG;QAClE,2CACY,SAAS,eACT,SAAS,EACnB,CAAC,EAAC,sFAAsF,EACxF,IAAI,EAAC,SAAS,GACd,CACE,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"FileList.js","sourceRoot":"","sources":["../../../../src/components/FileList/FileList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,MAAM,MAAM,kDAAkD,CAAA;AACrE,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGpC,IAAM,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAElC,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AI,EACX,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAE,KAAK;QAEhB,8BAAM,CAAC,EAAC,wCAAwC,EAAC,IAAI,EAAC,SAAS,GAAG;QAClE,2CACY,SAAS,eACT,SAAS,EACnB,CAAC,EAAC,sFAAsF,EACxF,IAAI,EAAC,SAAS,GACd,CACE,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ interface QaTags {
2
+ item?: (item: FileListItem) => string;
3
+ }
4
+ interface FileListItem {
5
+ name: string;
6
+ url: string;
7
+ }
8
+ export interface FileListProps {
9
+ /**
10
+ * "Download All" link URL
11
+ */
12
+ downloadAllUrl?: string;
13
+ items: FileListItem[];
14
+ qa?: QaTags;
15
+ }
16
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=FileList.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileList.types.js","sourceRoot":"","sources":["../../../../src/components/FileList/FileList.types.tsx"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
- export { FileList as default, FileList, FileListProps } from './FileList';
1
+ export { FileList as default, FileList } from './FileList';
2
+ export { FileListProps } from './FileList.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/FileList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/FileList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
@@ -44,6 +44,9 @@ export interface FileSelectContextApi {
44
44
  maxFileNumber: number;
45
45
  }
46
46
  export interface DropzoneContentRendererProps {
47
+ /**
48
+ * Enable/disable the dropzone
49
+ */
47
50
  disabled: DropzoneContentProps['disabled'];
48
51
  errorMessage?: DropzoneContentProps['errorMessage'];
49
52
  openLocalFiles: () => void;
@@ -57,27 +60,156 @@ export interface QaTags {
57
60
  removeEntry?: string;
58
61
  }
59
62
  export interface FileSelectProps extends Omit<DivAttributes, 'onError' | 'onProgress'> {
63
+ /**
64
+ * <Code>(addedValues: FileSelectValue) => void</Code>
65
+ * <br />
66
+ * <br />
67
+ * To be called every time when the files are uploaded directly or
68
+ * attached via file explorer. The input data should be appended to the
69
+ * current value. Files with upload errors are omitted.
70
+ */
60
71
  onAdd?: (value: FileSelectValue) => void;
72
+ /**
73
+ * <Code>(valueEntry: FileSelectValueEntry) => void</Code>
74
+ * <br />
75
+ * <br />
76
+ * To be called whenever the file is removed by user from the primary
77
+ * token list. Removed item should be deleted from the current value by{' '}
78
+ * <Code>id</Code> key
79
+ */
61
80
  onRemove?: (valueEntry: FileSelectValueEntry) => void;
81
+ /**
82
+ * <Code>(fileId: string, progress: number) => void</Code>
83
+ * <br />
84
+ * <br />
85
+ * To be called whenever the upload progress is changed
86
+ */
62
87
  onProgress?: (fileId: ValueId, progress: number) => void;
88
+ /**
89
+ * Optional async function that is invoked when selecting or dropping in a
90
+ * local file. If you want to restrict certain uploads, you can use this
91
+ * callback. Returning true continues the upload, while false will prevent
92
+ * upload.
93
+ * <Code>{'(files: ThumbnailListItem[]) => Promise<boolean>'}</Code>
94
+ */
63
95
  beforeLocalFileUpload?: (files: ThumbnailListItem[]) => Promise<boolean>;
96
+ /**
97
+ * <Code>(isPendingUpload: boolean) => void</Code>
98
+ * <br />
99
+ * <br />
100
+ * To be called whenever upload state is changed
101
+ */
64
102
  onUploadStateChange?: (isPendingUpload: boolean) => void;
103
+ /**
104
+ * <Code>(fileId: string, error: unknown) => void</Code>
105
+ * <br />
106
+ * <br />
107
+ * To be called whenever an upload error occures
108
+ */
65
109
  onError?: (fileId: ValueId, error: unknown) => void;
110
+ /**
111
+ * <Code>(file: FileSelectValueEntry) => void</Code>
112
+ * <br />
113
+ * <br />
114
+ * To be called when attached file receives a click
115
+ */
66
116
  onFileTokenClick?: (file: FileSelectValueEntry) => void;
117
+ /**
118
+ * An optional content renderer for the dropzone. Accepts{' '}
119
+ * <Code>{'{ open, disabled, errorMessage }'}</Code> as a single argument,
120
+ * allowing to control the dropzone and display different content depending
121
+ * on dropzone state
122
+ */
67
123
  dropzoneContentRenderer?: (dropzoneProps: DropzoneContentRendererProps) => React.ReactNode;
124
+ /**
125
+ * Hide dropzone and render only default "Attach File(s)" button.
126
+ * @default false
127
+ */
68
128
  hideDropzone?: boolean;
129
+ /**
130
+ * Hide local files source in file explorer modal
131
+ */
69
132
  hideLocalSource?: boolean;
133
+ /**
134
+ * <Code>(sourceId: string, sourceValueEntry: unknown) => string</Code>
135
+ * <br />
136
+ * <br />
137
+ * Customize the token label for a given source value. By default,{' '}
138
+ * <Code>sourceValueEntry.name</Code> is returned.
139
+ */
70
140
  getTokenLabel?: (sourceId: string, sourceValueEntry: unknown) => string;
71
141
  localSourceDropzoneContentRenderer?: (dropzoneProps: DropzoneContentProps) => React.ReactNode;
142
+ /**
143
+ * <Code>(file: File) => string</Code>
144
+ * <br />
145
+ * <br />A function returning an upload URL for a given file. An
146
+ * alternative to <Code>uploadFile</Code> which allows manual control of
147
+ * the network request for file upload.
148
+ */
72
149
  getEndpoint?: (file: File) => string;
150
+ /**
151
+ * <Code>(file: File) => HTTPRequestMethod</Code>
152
+ * <br />
153
+ * <br />A function returning an upload HTTP method for a given file.
154
+ * Returns <Code>POST</Code> by default.
155
+ */
73
156
  getMethod?: (file: File) => Method;
157
+ /**
158
+ * <Code>(file: File) => string</Code>
159
+ * <br />
160
+ * <br />A function returning an upload payload <Code>FormData</Code> key
161
+ * for a given file. Returns <Code>file</Code> by default.
162
+ */
74
163
  getPayloadKey?: (file: File) => string;
164
+ /**
165
+ * <Code>(file: File) => FormData</Code>
166
+ * <br />
167
+ * <br />A function returning an upload payload <Code>FormData</Code>{' '}
168
+ * object for a given file. When defined, <Code>getPayloadKey</Code> is
169
+ * ignored.
170
+ */
75
171
  getPayload?: (file: File) => FormData;
172
+ /**
173
+ * <Code>(file: File) => object</Code>
174
+ * <br />
175
+ * <br />A function returning an upload request headers. Returns empty
176
+ * object by default.
177
+ */
76
178
  getHeaders?: (file: File) => Record<string, string>;
179
+ /**
180
+ * <Code>
181
+ * (file: File,{' '}
182
+ * {`{
183
+ * onProgress: (progress: number) => void
184
+ * onSuccess: (response: unknown) => void
185
+ * onError: (error: unknown) => void
186
+ * }`}
187
+ * ) => string
188
+ * </Code>
189
+ * <br />
190
+ * <br />A function for manually controlling the network request for file
191
+ * upload. An alternative to using <Code>getEndpoint</Code> which handles
192
+ * the network request itself.
193
+ */
77
194
  uploadFile?: UploadFile;
195
+ /**
196
+ * Maximum number of files that can be selected
197
+ */
78
198
  maxFileNumber?: number;
199
+ /**
200
+ * Maximum file size (in bytes)
201
+ */
79
202
  maxFileSize?: number;
203
+ /**
204
+ * Minimum file size (in bytes)
205
+ */
80
206
  minFileSize?: number;
207
+ /**
208
+ * Set accepted file types. Accepts everything if left undefined
209
+ */
81
210
  accept?: string | string[];
211
+ /**
212
+ * @ignore
213
+ */
82
214
  qa?: QaTags;
83
215
  }
@@ -16,22 +16,84 @@ export interface GridProps {
16
16
  */
17
17
  icon: string | React.ReactNode;
18
18
  title: string;
19
+ /**
20
+ * Allows controlling the search input value. Can be used with
21
+ * <Code>onSearch</Code> to customize the default string-based search
22
+ */
19
23
  searchQuery?: string;
24
+ /**
25
+ * Allows customizing the default string-based search by passing a
26
+ * different set of <Code>items</Code> every time
27
+ * <Code>onSearch</Code> is called with query string as a single
28
+ * parameter
29
+ */
20
30
  onSearch?: (q: string) => void;
31
+ /**
32
+ * React nodes to be displayed next to the search bar
33
+ */
21
34
  children?: React.ReactNode;
35
+ /**
36
+ * An array of arbitrarily-shaped objects representing grid items.{' '}
37
+ * <Code>getId</Code> <Code>getName</Code> and <Code>getThumbnail</Code>{' '}
38
+ * should be used to bind the target shape to a view.
39
+ */
22
40
  items: GridItem[];
41
+ /**
42
+ * <Code>{`{ id: string | number, title: string }[]`}</Code> object
43
+ * representing file groups
44
+ */
23
45
  groups?: ThumbnailGridGroup[];
46
+ /**
47
+ * <Code>{`{ text: string, image: string }`}</Code> props for{' '}
48
+ * <Code>EmptyState</Code> component shown when there are no items in
49
+ * grid
50
+ */
24
51
  emptyState?: {
25
52
  text?: string;
26
53
  image?: string;
27
54
  };
55
+ /**
56
+ * Show/Hide loading indicator at the list bottom
57
+ */
28
58
  isLoadingMore?: boolean;
59
+ /**
60
+ * Show/Hide loading indicator of the content
61
+ */
29
62
  isLoading?: boolean;
63
+ /**
64
+ * Optional <Code>function</Code> that automatically executes when
65
+ * scrolling reaches the last item.
66
+ */
30
67
  onScrollBottom?: () => Promise<any>;
68
+ /**
69
+ * A function called returning ID of a given grid item that is used to
70
+ * identify the item. Returns <Code>item.id</Code> by default.
71
+ */
31
72
  getId?: GetId;
73
+ /**
74
+ * A function called returning thumbnail URL of a given grid item that is
75
+ * used to display the item's thumbnail image. Returns{' '}
76
+ * <Code>item.src</Code>
77
+ * by default.
78
+ */
32
79
  getThumbnailSource?: GetThumbnailSource;
80
+ /**
81
+ * A function called returning name of a given grid item that is used to
82
+ * display the item's thumbnail name. Returns <Code>item.name</Code> by
83
+ * default.
84
+ */
33
85
  getThumbnailName?: GetThumnbnailName;
86
+ /**
87
+ * A function called returning label of a given grid item that is used to
88
+ * display the item's thumbnail label. Returns <Code>item.label</Code>
89
+ * by default.
90
+ */
34
91
  getThumbnailLabel?: GetThumbnailLabel;
92
+ /**
93
+ * A function called returning group ID of a given grid item that is used
94
+ * to sort items by group. Returns <Code>item.groupId</Code>
95
+ * by default.
96
+ */
35
97
  getGroupId?: GetGroupId;
36
98
  qa?: QaTags;
37
99
  }
@@ -4,29 +4,132 @@ import { DropError, DropzoneContentProps, DropzoneHookProps, QaTags } from '../.
4
4
  import { ThumbnailListItem } from '../ThumbnailList/ThumbnailList.types';
5
5
  export declare type ValueId = string | number;
6
6
  export interface UploaderProps extends Omit<DropzoneHookProps, 'value'> {
7
+ /**
8
+ * Allow drag 'n' drop (or selection from the file dialog) of multiple files
9
+ */
7
10
  multiple: boolean;
8
11
  uploadedValue: ThumbnailListItem[];
12
+ /**
13
+ * Array of already selected items
14
+ */
9
15
  value: ThumbnailListItem[];
16
+ /**
17
+ * Callback function fired with currently selected array of items.
18
+ * <CodeBlock>(items: ThumbnailListItem[]) => void</CodeBlock>
19
+ */
10
20
  onChange: (items: ThumbnailListItem[]) => void;
21
+ /**
22
+ * Callback function fired when a previously selected file is removed.
23
+ * <br />
24
+ * <br />
25
+ * <Code>(item: ThumbnailListItem) => void</Code>
26
+ */
11
27
  onCancel?: (item: ThumbnailListItem) => void;
28
+ /**
29
+ * Error message if dropped files is rejected
30
+ * <CodeBlock>
31
+ * {`{ type: DropErrorType, title: string, message: string }`}
32
+ * </CodeBlock>
33
+ */
12
34
  dropError?: DropError;
13
35
  onDropError: (err: DropError) => void;
36
+ /**
37
+ * An optional content renderer for the dropzone. Accepts{' '}
38
+ * <Code>{'{ open, disabled, errorMessage }'}</Code> as a single argument,
39
+ * allowing to control the dropzone and display different content depending
40
+ * on dropzone state
41
+ */
14
42
  dropzoneContentRenderer?: (props: DropzoneContentProps) => React.ReactNode;
15
43
  qa?: QaTags;
16
44
  }
17
45
  export interface LocalSourceProps {
18
46
  sourceId: string;
47
+ /**
48
+ * Callback function fired when a previously selected file is removed.
49
+ * <br />
50
+ * <br />
51
+ * <Code>(item: ThumbnailListItem) => void</Code>
52
+ */
19
53
  onCancel?: UploaderProps['onCancel'];
54
+ /**
55
+ * Set accepted file types. Accepts everything if left undefined
56
+ */
20
57
  accept?: UploaderProps['accept'];
58
+ /**
59
+ * <Code>(file: File) => string</Code>
60
+ * <br />
61
+ * <br />A function returning an upload URL for a given file. An
62
+ * alternative to <Code>uploadFile</Code> which allows manual control of
63
+ * the network request for file upload.
64
+ */
21
65
  getEndpoint?: (file: File) => string;
66
+ /**
67
+ * <Code>(file: File) => HTTPRequestMethod</Code>
68
+ * <br />
69
+ * <br />A function returning an upload HTTP method for a given file.
70
+ * Returns <Code>POST</Code> by default.
71
+ */
22
72
  getMethod?: (file: File) => Method;
73
+ /**
74
+ * <Code>(file: File) => FormData</Code>
75
+ * <br />
76
+ * <br />A function returning an upload payload <Code>FormData</Code>{' '}
77
+ * object for a given file. When defined, <Code>getPayloadKey</Code> is
78
+ * ignored.
79
+ */
23
80
  getPayload?: (file: File) => FormData;
81
+ /**
82
+ * Optional async function that is invoked when selecting or dropping in a
83
+ * local file. If you want to restrict certain uploads, you can use this
84
+ * callback. Returning true continues the upload, while false will prevent
85
+ * upload.
86
+ * <Code>{'(files: ThumbnailListItem[]) => Promise<boolean>'}</Code>
87
+ */
24
88
  beforeLocalFileUpload: (files: ThumbnailListItem[]) => Promise<boolean>;
89
+ /**
90
+ * <Code>(file: File) => string</Code>
91
+ * <br />
92
+ * <br />A function returning an upload payload <Code>FormData</Code> key
93
+ * for a given file. Returns <Code>file</Code> by default.
94
+ */
25
95
  getPayloadKey?: (file: File) => string;
96
+ /**
97
+ * <Code>(file: File) => object</Code>
98
+ * <br />
99
+ * <br />A function returning an upload request headers. Returns empty
100
+ * object by default.
101
+ */
26
102
  getHeaders?: (file: File) => Record<string, string>;
103
+ /**
104
+ * <Code>
105
+ * (file: File,{' '}
106
+ * {`{
107
+ * onProgress: (progress: number) => void
108
+ * onSuccess: (response: unknown) => void
109
+ * onError: (error: unknown) => void
110
+ * }`}
111
+ * ) => string
112
+ * </Code>
113
+ * <br />
114
+ * <br />A function for manually controlling the network request for file
115
+ * upload. An alternative to using <Code>getEndpoint</Code> which handles
116
+ * the network request itself.
117
+ */
27
118
  uploadFile?: UploadFile;
119
+ /**
120
+ * Maximum file size (in bytes)
121
+ */
28
122
  maxFileSize?: number;
123
+ /**
124
+ * Minimum file size (in bytes)
125
+ */
29
126
  minFileSize?: number;
127
+ /**
128
+ * An optional content renderer for the dropzone. Accepts{' '}
129
+ * <Code>{'{ open, disabled, errorMessage }'}</Code> as a single argument,
130
+ * allowing to control the dropzone and display different content depending
131
+ * on dropzone state
132
+ */
30
133
  dropzoneContentRenderer?: (props: DropzoneContentProps) => React.ReactNode;
31
134
  qa?: UploaderProps['qa'];
32
135
  }
@@ -4,6 +4,10 @@ export interface TreeSourceRef {
4
4
  setValue: <Node extends TreeNode = TreeNode>(nodes: Node[]) => void;
5
5
  }
6
6
  export interface FileTreeProps extends Pick<TreeProps<TreeNode>, 'options' | 'getRoot' | 'getChildren' | 'getLabel' | 'getParentId' | 'getType' | 'isSelectable' | 'isExpandable' | 'onExpand' | 'expanded'> {
7
+ /**
8
+ * Callback function fired with currently selected array of nodes.
9
+ * <CodeBlock>(nodes: DefaultNode[]) => void</CodeBlock>
10
+ */
7
11
  onChange?: (nodes: TreeNode[]) => void;
8
12
  sourceId: string;
9
13
  title: string;
@@ -11,5 +15,8 @@ export interface FileTreeProps extends Pick<TreeProps<TreeNode>, 'options' | 'ge
11
15
  * @deprecated String icon variant is deprecated, use the React components directly from the `@procore/core-icons/dist` package
12
16
  */
13
17
  icon: string | React.ReactNode;
18
+ /**
19
+ * Show/Hide loading indicator of the content
20
+ */
14
21
  isLoading?: boolean;
15
22
  }
@@ -1,15 +1,6 @@
1
1
  import React from 'react';
2
- import { Props, SpanAttributes } from '../../utils/types';
3
- export declare type FontSize = 'xs' | 'table' | 'sm' | 'md' | 'lg';
4
- export declare type FontStyle = '' | 'italic';
5
- export declare type FontVariant = 'primary' | 'secondary' | 'tertiary' | 'tableHeader' | 'white' | 'blue' | 'red';
6
- export declare type FontWeight = 'regular' | 'medium' | 'bold';
7
- export interface FontProps extends Props {
8
- fontStyle?: FontStyle;
9
- size?: FontSize;
10
- variant?: FontVariant;
11
- weight?: FontWeight;
12
- }
2
+ import { SpanAttributes } from '../../utils/types';
3
+ import { FontProps } from './Font.types';
13
4
  /**
14
5
  * @deprecated Please use H1, H2, H3, P, UL, or Typography
15
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Font.js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AC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;QACtE,OAAO,CAAC,KAAK,CACX,mDAAiD,aAAa,qBAAkB,CACjF,CAAA;KACF;IAED,OAAO,CACL,uCAAM,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC,IAAM,KAAK,GAC/D,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,eAAe,IAAI,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { Props } from '../../utils/types';
2
+ export declare type FontSize = 'xs' | 'table' | 'sm' | 'md' | 'lg';
3
+ export declare type FontStyle = '' | 'italic';
4
+ export declare type FontVariant = 'primary' | 'secondary' | 'tertiary' | 'tableHeader' | 'white' | 'blue' | 'red';
5
+ export declare type FontWeight = 'regular' | 'medium' | 'bold';
6
+ export interface FontProps extends Props {
7
+ /**
8
+ * Sets the font-style.
9
+ * @default 'none'
10
+ */
11
+ fontStyle?: FontStyle;
12
+ /**
13
+ * Sets the font-size.
14
+ * @default 'sm'
15
+ */
16
+ size?: FontSize;
17
+ /**
18
+ * Sets the font-color.
19
+ * @default 'primary'
20
+ */
21
+ variant?: FontVariant;
22
+ /**
23
+ * Sets the font-weight.
24
+ * @default 'regular'
25
+ */
26
+ weight?: FontWeight;
27
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Font.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Font.types.js","sourceRoot":"","sources":["../../../../src/components/Font/Font.types.ts"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
- export { Font as default, Font, FontProps } from './Font';
1
+ export { Font as default, Font } from './Font';
2
+ export { FontProps } from './Font.types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Font/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Font/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}