@procore/core-react 12.8.1 → 12.10.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 (269) hide show
  1. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  2. package/dist/Avatar/Avatar.styles.js +5 -5
  3. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  4. package/dist/Badge/Badge.styles.js +2 -2
  5. package/dist/Banner/Banner.styles.js +10 -10
  6. package/dist/Box/Box.styles.js +1 -1
  7. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  8. package/dist/Button/Button.js +8 -1
  9. package/dist/Button/Button.js.map +1 -1
  10. package/dist/Button/Button.styles.js +15 -6
  11. package/dist/Button/Button.styles.js.map +1 -1
  12. package/dist/Button/Button.types.d.ts +1 -1
  13. package/dist/Button/Button.types.js.map +1 -1
  14. package/dist/Calendar/Calendar.styles.js +8 -8
  15. package/dist/Card/Card.styles.js +1 -1
  16. package/dist/Checkbox/Checkbox.styles.js +6 -6
  17. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  18. package/dist/ContactItem/ContactItem.styles.js +5 -5
  19. package/dist/Content/Content.styles.js +2 -2
  20. package/dist/DateInput/DateInput.js +7 -0
  21. package/dist/DateInput/DateInput.js.map +1 -1
  22. package/dist/DateInput/DateInput.styles.js +6 -6
  23. package/dist/DetailPage/DetailPage.styles.js +8 -8
  24. package/dist/DetailPage/DetailPage.styles.js.map +1 -1
  25. package/dist/Dropdown/Dropdown.styles.js +3 -3
  26. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  27. package/dist/Dropzone/Dropzone.js +1 -1
  28. package/dist/Dropzone/Dropzone.styles.js +9 -9
  29. package/dist/EmptyState/EmptyState.styles.js +6 -6
  30. package/dist/Field/Field.styles.js +3 -3
  31. package/dist/FileList/FileList.styles.js +4 -4
  32. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  33. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  34. package/dist/FileSelect/FileSelect.styles.js +2 -2
  35. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  36. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  37. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  38. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  39. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  40. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  41. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  42. package/dist/FileToken/FileToken.styles.js +4 -4
  43. package/dist/FilterToken/FilterToken.styles.js +2 -2
  44. package/dist/FlexList/FlexList.styles.js +1 -1
  45. package/dist/Form/Form.styles.js +14 -14
  46. package/dist/Form/StyledFormikForm.styles.js +2 -2
  47. package/dist/Grid/Grid.styles.js +2 -2
  48. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  49. package/dist/Input/Input.styles.js +1 -1
  50. package/dist/Link/Link.styles.js +1 -1
  51. package/dist/ListPage/ListPage.d.ts +7 -0
  52. package/dist/ListPage/ListPage.js +8 -0
  53. package/dist/ListPage/ListPage.js.map +1 -1
  54. package/dist/ListPage/ListPage.styles.js +8 -8
  55. package/dist/Loader/Loader.styles.js +2 -2
  56. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  57. package/dist/Modal/Modal.styles.js +13 -13
  58. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  59. package/dist/NextMenu/NextMenu.styles.js +3 -3
  60. package/dist/Notation/Notation.js +1 -1
  61. package/dist/NumberInput/NumberInput.styles.js +7 -7
  62. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  63. package/dist/PageLayout/PageLayout.styles.d.ts +3 -1
  64. package/dist/PageLayout/PageLayout.styles.js +29 -23
  65. package/dist/PageLayout/PageLayout.styles.js.map +1 -1
  66. package/dist/Pagination/Pagination.js +1 -1
  67. package/dist/Pagination/Pagination.js.map +1 -1
  68. package/dist/Pagination/Pagination.styles.js +5 -5
  69. package/dist/Panel/Panel.js +7 -2
  70. package/dist/Panel/Panel.js.map +1 -1
  71. package/dist/Panel/Panel.styles.js +11 -11
  72. package/dist/Pill/Pill.styles.js +2 -2
  73. package/dist/PillSelect/PillSelect.styles.js +4 -4
  74. package/dist/Popover/Popover.styles.js +2 -2
  75. package/dist/Portal/Portal.styles.js +1 -1
  76. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  77. package/dist/RadioButton/RadioButton.styles.js +3 -3
  78. package/dist/Required/Required.styles.js +3 -3
  79. package/dist/Search/Search.styles.js +5 -5
  80. package/dist/Section/Section.js +4 -3
  81. package/dist/Section/Section.js.map +1 -1
  82. package/dist/Section/Section.styles.d.ts +1 -0
  83. package/dist/Section/Section.styles.js +10 -6
  84. package/dist/Section/Section.styles.js.map +1 -1
  85. package/dist/Section/Section.types.d.ts +4 -0
  86. package/dist/Section/Section.types.js.map +1 -1
  87. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  88. package/dist/Select/Select.styles.js +7 -7
  89. package/dist/Semantic/Semantic.styles.js +9 -9
  90. package/dist/Slider/Slider.styles.js +5 -5
  91. package/dist/Spinner/Spinner.styles.js +7 -7
  92. package/dist/SplitViewCard/SplitViewCard.context.d.ts +3 -4
  93. package/dist/SplitViewCard/SplitViewCard.context.js +27 -9
  94. package/dist/SplitViewCard/SplitViewCard.context.js.map +1 -1
  95. package/dist/SplitViewCard/SplitViewCard.d.ts +23 -22
  96. package/dist/SplitViewCard/SplitViewCard.js +106 -39
  97. package/dist/SplitViewCard/SplitViewCard.js.map +1 -1
  98. package/dist/SplitViewCard/SplitViewCard.styles.d.ts +9 -3
  99. package/dist/SplitViewCard/SplitViewCard.styles.js +30 -18
  100. package/dist/SplitViewCard/SplitViewCard.styles.js.map +1 -1
  101. package/dist/SplitViewCard/SplitViewCard.types.d.ts +29 -6
  102. package/dist/SplitViewCard/SplitViewCard.types.js.map +1 -1
  103. package/dist/SplitViewCard/index.d.ts +0 -2
  104. package/dist/SplitViewCard/index.js +0 -2
  105. package/dist/SplitViewCard/index.js.map +1 -1
  106. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  107. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  108. package/dist/Switch/Switch.styles.js +4 -4
  109. package/dist/Table/Table.styles.js +28 -28
  110. package/dist/TableShelf/TableShelf.styles.js +5 -5
  111. package/dist/Tabs/Tabs.styles.js +15 -15
  112. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  113. package/dist/TextArea/TextArea.styles.js +1 -1
  114. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  115. package/dist/Thumbnail/Thumbnail.hooks.d.ts +4 -2
  116. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  117. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  118. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  119. package/dist/Tile/Tile.styles.js +8 -8
  120. package/dist/Title/Title.styles.js +7 -7
  121. package/dist/Toast/Toast.styles.js +3 -3
  122. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  123. package/dist/Token/Token.styles.js +3 -3
  124. package/dist/ToolHeader/ToolHeader.d.ts +9 -0
  125. package/dist/ToolHeader/ToolHeader.js +10 -0
  126. package/dist/ToolHeader/ToolHeader.js.map +1 -1
  127. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  128. package/dist/ToolLandingPage/ToolLandingPage.d.ts +25 -0
  129. package/dist/ToolLandingPage/ToolLandingPage.js +78 -0
  130. package/dist/ToolLandingPage/ToolLandingPage.js.map +1 -0
  131. package/dist/ToolLandingPage/ToolLandingPage.styles.d.ts +4 -0
  132. package/dist/ToolLandingPage/ToolLandingPage.styles.js +16 -0
  133. package/dist/ToolLandingPage/ToolLandingPage.styles.js.map +1 -0
  134. package/dist/ToolLandingPage/ToolLandingPage.types.d.ts +11 -0
  135. package/dist/ToolLandingPage/ToolLandingPage.types.js +2 -0
  136. package/dist/ToolLandingPage/ToolLandingPage.types.js.map +1 -0
  137. package/dist/ToolLandingPage/index.d.ts +2 -0
  138. package/dist/ToolLandingPage/index.js +2 -0
  139. package/dist/ToolLandingPage/index.js.map +1 -0
  140. package/dist/Tooltip/Tooltip.styles.js +2 -2
  141. package/dist/Tree/Tree.styles.js +9 -9
  142. package/dist/Typeahead/Typeahead.styles.js +3 -3
  143. package/dist/Typography/Typography.styles.js +1 -1
  144. package/dist/Typography/Typography.table.story.js +2 -2
  145. package/dist/_hooks/I18n.d.ts +79 -1
  146. package/dist/_hooks/I18n.js +10 -1
  147. package/dist/_hooks/I18n.js.map +1 -1
  148. package/dist/_hooks/getI18nProviderLocale.d.ts +6 -0
  149. package/dist/_hooks/getI18nProviderLocale.js +12 -2
  150. package/dist/_hooks/getI18nProviderLocale.js.map +1 -1
  151. package/dist/_locales/de-DE.json +9 -4
  152. package/dist/_locales/en-AU.json +6 -1
  153. package/dist/_locales/en-CA.json +6 -1
  154. package/dist/_locales/en-GB.json +6 -1
  155. package/dist/_locales/en.json +1 -1
  156. package/dist/_locales/es-ES.json +6 -1
  157. package/dist/_locales/es.json +11 -6
  158. package/dist/_locales/fr-CA.json +11 -6
  159. package/dist/_locales/fr-FR.json +14 -9
  160. package/dist/_locales/is-IS.json +6 -1
  161. package/dist/_locales/ja-JP.json +46 -41
  162. package/dist/_locales/pl-PL.json +3 -0
  163. package/dist/_locales/pseudo.json +6 -1
  164. package/dist/_locales/pt-BR.json +9 -4
  165. package/dist/_locales/th-TH.json +6 -1
  166. package/dist/_locales/zh-SG.json +6 -1
  167. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  168. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
  169. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  170. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  171. package/dist/_typedoc/Box/Box.types.json +68 -68
  172. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  173. package/dist/_typedoc/Button/Button.types.json +14 -14
  174. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  175. package/dist/_typedoc/Card/Card.types.json +6 -6
  176. package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
  177. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  178. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  179. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  180. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  181. package/dist/_typedoc/Dropdown/Dropdown.types.json +39 -39
  182. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +30 -30
  183. package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
  184. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  185. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  186. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  187. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  188. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  189. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  190. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  191. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  192. package/dist/_typedoc/Form/Form.types.json +726 -726
  193. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  194. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  195. package/dist/_typedoc/Input/Input.types.json +2 -2
  196. package/dist/_typedoc/Link/Link.types.json +4 -4
  197. package/dist/_typedoc/ListPage/ListPage.json +9 -0
  198. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  199. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  200. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  201. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  202. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  203. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  204. package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
  205. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
  206. package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
  207. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  208. package/dist/_typedoc/Panel/Panel.types.json +38 -28
  209. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  210. package/dist/_typedoc/PillSelect/PillSelect.types.json +47 -47
  211. package/dist/_typedoc/Popover/Popover.types.json +14 -14
  212. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  213. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  214. package/dist/_typedoc/Required/Required.types.json +5 -5
  215. package/dist/_typedoc/Search/Search.types.json +18 -18
  216. package/dist/_typedoc/Section/Section.types.json +24 -14
  217. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
  218. package/dist/_typedoc/Select/Select.types.json +58 -58
  219. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  220. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  221. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  222. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +134 -0
  223. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  224. package/dist/_typedoc/Table/Table.types.json +99 -99
  225. package/dist/_typedoc/Tabs/Tabs.types.json +19 -19
  226. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
  227. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  228. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  229. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  230. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  231. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +44 -44
  232. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  233. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  234. package/dist/_typedoc/Title/Title.types.json +1 -1
  235. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  236. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
  237. package/dist/_typedoc/Token/Token.types.json +4 -4
  238. package/dist/_typedoc/ToolHeader/ToolHeader.json +9 -0
  239. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  240. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +84 -0
  241. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  242. package/dist/_typedoc/Tree/Tree.types.json +86 -86
  243. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  244. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  245. package/dist/_typedoc/_utils/types.json +3 -3
  246. package/dist/_typedoc/deprecations.json +1 -1
  247. package/dist/_utils/CalendarHelpers.js +3 -2
  248. package/dist/_utils/CalendarHelpers.js.map +1 -1
  249. package/dist/_utils/TinyMCE.js +2 -1
  250. package/dist/_utils/TinyMCE.js.map +1 -1
  251. package/dist/_utils/propsTypedoc.d.ts +4 -0
  252. package/dist/_utils/propsTypedoc.js +4 -1
  253. package/dist/_utils/propsTypedoc.js.map +1 -1
  254. package/dist/index.d.ts +2 -0
  255. package/dist/index.js +2 -0
  256. package/dist/index.js.map +1 -1
  257. package/package.json +2 -2
  258. package/dist/NextListPage/NextListPage.d.ts +0 -24
  259. package/dist/NextListPage/NextListPage.js +0 -44
  260. package/dist/NextListPage/NextListPage.js.map +0 -1
  261. package/dist/NextListPage/NextListPage.types.d.ts +0 -3
  262. package/dist/NextListPage/NextListPage.types.js +0 -2
  263. package/dist/NextListPage/NextListPage.types.js.map +0 -1
  264. package/dist/NextListPage/index.d.ts +0 -2
  265. package/dist/NextListPage/index.js +0 -2
  266. package/dist/NextListPage/index.js.map +0 -1
  267. package/dist/SplitViewCard/useSplitViewCard.d.ts +0 -5
  268. package/dist/SplitViewCard/useSplitViewCard.js +0 -14
  269. package/dist/SplitViewCard/useSplitViewCard.js.map +0 -1
@@ -16,34 +16,34 @@ export var tableSelectClassName = 'select--table';
16
16
  var styledSelectButtonDefaultWidth = 248;
17
17
  export var StyledSelectMenu = /*#__PURE__*/styled(Card).withConfig({
18
18
  displayName: "StyledSelectMenu",
19
- componentId: "core-12_8_1__sc-mr8gwe-0"
19
+ componentId: "core-12_10_0__sc-mr8gwe-0"
20
20
  })(["display:flex;max-height:40vh;max-width:", "px;min-width:inherit;"], styledSelectButtonDefaultWidth);
21
21
  export var StyledSelectButtonLabel = /*#__PURE__*/styled.div.withConfig({
22
22
  displayName: "StyledSelectButtonLabel",
23
- componentId: "core-12_8_1__sc-mr8gwe-1"
23
+ componentId: "core-12_10_0__sc-mr8gwe-1"
24
24
  })(["", " flex-grow:1;margin-right:", "px;outline:none;pointer-events:", ";user-select:none;"], getEllipsis(), spacing.sm, function (_ref) {
25
25
  var $hoverable = _ref.$hoverable;
26
26
  return $hoverable ? 'initial' : 'none';
27
27
  });
28
28
  export var StyledSelectSpinner = /*#__PURE__*/styled.div.withConfig({
29
29
  displayName: "StyledSelectSpinner",
30
- componentId: "core-12_8_1__sc-mr8gwe-2"
30
+ componentId: "core-12_10_0__sc-mr8gwe-2"
31
31
  })(["align-items:center;display:flex;flex:0 0 auto;justify-content:center;line-height:0;"]);
32
32
  export var StyledSelectArrowContainer = /*#__PURE__*/styled.div.withConfig({
33
33
  displayName: "StyledSelectArrowContainer",
34
- componentId: "core-12_8_1__sc-mr8gwe-3"
34
+ componentId: "core-12_10_0__sc-mr8gwe-3"
35
35
  })(["align-items:center;display:inline-flex;height:16px;justify-content:flex-end;margin-left:", "px;width:8px;"], spacing.sm);
36
36
  export var StyledSelectArrow = /*#__PURE__*/styled.div.withConfig({
37
37
  displayName: "StyledSelectArrow",
38
- componentId: "core-12_8_1__sc-mr8gwe-4"
38
+ componentId: "core-12_10_0__sc-mr8gwe-4"
39
39
  })(["position:relative;", ""], arrowDown(4, 'gray45'));
40
40
  export var StyledSelectClearIcon = /*#__PURE__*/styled(Button).withConfig({
41
41
  displayName: "StyledSelectClearIcon",
42
- componentId: "core-12_8_1__sc-mr8gwe-5"
42
+ componentId: "core-12_10_0__sc-mr8gwe-5"
43
43
  })([""]);
44
44
  export var StyledSelectButton = /*#__PURE__*/styled.div.withConfig({
45
45
  displayName: "StyledSelectButton",
46
- componentId: "core-12_8_1__sc-mr8gwe-6"
46
+ componentId: "core-12_10_0__sc-mr8gwe-6"
47
47
  })(["", " align-items:center;background-color:", ";border-color:", ";border-radius:", "px;border-style:solid;border-width:1px;color:", ";cursor:pointer;display:inline-flex;height:36px;min-height:36px;outline:none;padding:0 ", "px;position:relative;white-space:nowrap;width:", ";&::placeholder{border-color:", ";}&:hover,&:active,&[data-qa=", "]{background-color:", ";border-color:", ";color:", ";}&.focus,&:focus,&[data-qa=", "]{", " ", "{stroke:", ";}}", " ", " ", " ", " ", " &.", "{", " ", " ", "}"], getTypographyIntent('body'), colors.white, colors.gray70, borderRadius.md, colors.gray15, spacing.md, function (_ref2) {
48
48
  var $block = _ref2.$block;
49
49
  return $block ? '100%' : "".concat(styledSelectButtonDefaultWidth, "px");
@@ -5,15 +5,15 @@ import { colors } from '../_styles/colors';
5
5
  import { spacing } from '../_styles/spacing';
6
6
  export var StyledH1 = /*#__PURE__*/styled.h1.withConfig({
7
7
  displayName: "StyledH1",
8
- componentId: "core-12_8_1__sc-172j5qh-0"
8
+ componentId: "core-12_10_0__sc-172j5qh-0"
9
9
  })(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h1'));
10
10
  export var StyledH2 = /*#__PURE__*/styled.h2.withConfig({
11
11
  displayName: "StyledH2",
12
- componentId: "core-12_8_1__sc-172j5qh-1"
12
+ componentId: "core-12_10_0__sc-172j5qh-1"
13
13
  })(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h2'));
14
14
  export var StyledH3 = /*#__PURE__*/styled.h3.withConfig({
15
15
  displayName: "StyledH3",
16
- componentId: "core-12_8_1__sc-172j5qh-2"
16
+ componentId: "core-12_10_0__sc-172j5qh-2"
17
17
  })(["color:", ";", " margin:0;"], colors.gray15, getTypographyIntent('h3'));
18
18
  var topMarginRules = function topMarginRules() {
19
19
  return css(["& + &,p + &,ol + &,ul + &{margin-top:", "px;}"], spacing.lg);
@@ -28,11 +28,11 @@ export function getSmallIconBodyTextRules() {
28
28
  }
29
29
  export var StyledP = /*#__PURE__*/styled.p.withConfig({
30
30
  displayName: "StyledP",
31
- componentId: "core-12_8_1__sc-172j5qh-3"
31
+ componentId: "core-12_10_0__sc-172j5qh-3"
32
32
  })(["color:", ";", " ", " ", ""], colors.gray15, getTypographyIntent('body'), topMarginRules, semiboldRules);
33
33
  export var StyledUL = /*#__PURE__*/styled.ul.withConfig({
34
34
  displayName: "StyledUL",
35
- componentId: "core-12_8_1__sc-172j5qh-4"
35
+ componentId: "core-12_10_0__sc-172j5qh-4"
36
36
  })(["color:", ";margin:0;padding:0;", " ", " padding-left:", "px;list-style-type:", ";"], colors.gray15, getTypographyIntent('body'), topMarginRules, spacing.lg, function (props) {
37
37
  return props.listStyleType || 'disc';
38
38
  });
@@ -40,7 +40,7 @@ export var StyledOL = /*#__PURE__*/styled(StyledUL).attrs({
40
40
  as: 'ol'
41
41
  }).withConfig({
42
42
  displayName: "StyledOL",
43
- componentId: "core-12_8_1__sc-172j5qh-5"
43
+ componentId: "core-12_10_0__sc-172j5qh-5"
44
44
  })(["list-style-type:", ";"], function (props) {
45
45
  return props.listStyleType || 'decimal';
46
46
  });
@@ -52,7 +52,7 @@ function enforceLabelTypography(props) {
52
52
  }
53
53
  export var StyledLabel = /*#__PURE__*/styled(StyledTypography).attrs(enforceLabelTypography).withConfig({
54
54
  displayName: "StyledLabel",
55
- componentId: "core-12_8_1__sc-172j5qh-6"
55
+ componentId: "core-12_10_0__sc-172j5qh-6"
56
56
  })(["", " ", " > ", "{margin-left:", "px;vertical-align:top;}"], function (_ref) {
57
57
  var _ref$block = _ref.block,
58
58
  block = _ref$block === void 0 ? false : _ref$block;
@@ -70,7 +70,7 @@ export function getUnstyledButton() {
70
70
  */
71
71
  export var StyledUnstyledButton = /*#__PURE__*/styled.button.withConfig({
72
72
  displayName: "StyledUnstyledButton",
73
- componentId: "core-12_8_1__sc-172j5qh-7"
73
+ componentId: "core-12_10_0__sc-172j5qh-7"
74
74
  })(["", ""], getUnstyledButton);
75
75
 
76
76
  /**
@@ -78,6 +78,6 @@ export var StyledUnstyledButton = /*#__PURE__*/styled.button.withConfig({
78
78
  */
79
79
  export var StyledAnchor = /*#__PURE__*/styled.a.withConfig({
80
80
  displayName: "StyledAnchor",
81
- componentId: "core-12_8_1__sc-172j5qh-8"
81
+ componentId: "core-12_10_0__sc-172j5qh-8"
82
82
  })([""]);
83
83
  //# sourceMappingURL=Semantic.styles.js.map
@@ -21,13 +21,13 @@ var getTrackBackgroundDisabled = function getTrackBackgroundDisabled(percent) {
21
21
  var getThumbDisabledStyles = /*#__PURE__*/css(["cursor:not-allowed;border:2px solid ", ";"], colors.blue85);
22
22
  export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
23
23
  displayName: "StyledContainer",
24
- componentId: "core-12_8_1__sc-12icguw-0"
24
+ componentId: "core-12_10_0__sc-12icguw-0"
25
25
  })(["position:relative;", ";"], function (props) {
26
26
  return props.showLabel && 'padding-bottom: 10px';
27
27
  });
28
28
  export var StyledSlider = /*#__PURE__*/styled.input.withConfig({
29
29
  displayName: "StyledSlider",
30
- componentId: "core-12_8_1__sc-12icguw-1"
30
+ componentId: "core-12_10_0__sc-12icguw-1"
31
31
  })(["-webkit-appearance:none;margin:0;padding-top:5px;padding-bottom:5px;width:100%;border:1px solid transparent;background-color:transparent;font-size:12px;&:focus{outline:none;", ";padding-top:5px;padding-bottom:5px;border-radius:2px;}&::-webkit-slider-runnable-track{", " ", "}&:disabled::-webkit-slider-runnable-track{cursor:not-allowed;", "}&::-webkit-slider-thumb{", " -webkit-appearance:none;margin-top:-5px;}&:disabled::-webkit-slider-thumb{", "}&::-moz-range-track{", " ", "}&:disabled::-moz-range-track{cursor:not-allowed;", "}&::-moz-range-thumb{", " height:12px;width:12px;}&:disabled::-moz-range-thumb{", "}&::-ms-track{", " height:", "px;color:transparent;", "}&:disabled::-ms-track{cursor:not-allowed;", "}&::-ms-fill-lower{background:", ";border:0px solid ", ";border-radius:2px;box-shadow:1px 1px 1px ", ";}&::-ms-fill-upper{background:", ";border:0px solid ", ";border-radius:2px;box-shadow:1px 1px 1px ", ";}&::-ms-thumb{", "}&:disabled::-ms-thumb{", "}&:focus::-ms-fill-lower{background:", ";}&:focus::-ms-fill-upper{background:", ";}"], function (props) {
32
32
  return props.isDragging ? "border: 1px solid transparent" : "border: 1px solid ".concat(colors.blue40);
33
33
  }, getTrackStyles, function (props) {
@@ -45,14 +45,14 @@ export var StyledSlider = /*#__PURE__*/styled.input.withConfig({
45
45
  }, colors.blue50, colors.black, colors.black, colors.gray70, colors.black, colors.black, getThumbStyles, getThumbDisabledStyles, colors.blue50, colors.gray70);
46
46
  export var StyledIncrementOverlay = /*#__PURE__*/styled.div.withConfig({
47
47
  displayName: "StyledIncrementOverlay",
48
- componentId: "core-12_8_1__sc-12icguw-2"
48
+ componentId: "core-12_10_0__sc-12icguw-2"
49
49
  })(["position:relative;width:0;&::before{content:'';height:", "px;width:2px;background-color:white;display:block;}z-index:2;"], TRACK_HEIGHT);
50
50
  export var StyledIncrementContainer = /*#__PURE__*/styled.div.withConfig({
51
51
  displayName: "StyledIncrementContainer",
52
- componentId: "core-12_8_1__sc-12icguw-3"
52
+ componentId: "core-12_10_0__sc-12icguw-3"
53
53
  })(["position:absolute;display:flex;justify-content:space-between;top:6px;", " left:5px;right:5px;> :first-child{visibility:hidden;}> :last-child{visibility:hidden;}"], applyStylesOnlyToFF("\n top: 12px;\n "));
54
54
  export var StyledLabel = /*#__PURE__*/styled(Typography).withConfig({
55
55
  displayName: "StyledLabel",
56
- componentId: "core-12_8_1__sc-12icguw-4"
56
+ componentId: "core-12_10_0__sc-12icguw-4"
57
57
  })(["visibility:visible;position:absolute;left:50%;transform:translateX(-50%);margin-top:8px;"]);
58
58
  //# sourceMappingURL=Slider.styles.js.map
@@ -10,7 +10,7 @@ var zOverlay = 2;
10
10
  var dash = /*#__PURE__*/keyframes(["0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}"]);
11
11
  export var StyledCircle = /*#__PURE__*/styled.circle.withConfig({
12
12
  displayName: "StyledCircle",
13
- componentId: "core-12_8_1__sc-1igww3-0"
13
+ componentId: "core-12_10_0__sc-1igww3-0"
14
14
  })(["animation:", " ", "ms ease-in-out ", "ms infinite;stroke-linecap:round;"], dash, duration, function (p) {
15
15
  var animationDelay = -(p.mountTime % duration);
16
16
  return animationDelay;
@@ -43,16 +43,16 @@ function getStrokeColor(_ref2) {
43
43
  }
44
44
  export var StyledSpinnerContainer = /*#__PURE__*/styled.div.withConfig({
45
45
  displayName: "StyledSpinnerContainer",
46
- componentId: "core-12_8_1__sc-1igww3-1"
46
+ componentId: "core-12_10_0__sc-1igww3-1"
47
47
  })(["border-radius:100%;box-sizing:border-box;display:block;flex-shrink:0;position:relative;", " ", "{", "}"], getHeightWidthStroke, StyledCircle, getStrokeColor);
48
48
  export var StyledSpinnerOverlayLabel = /*#__PURE__*/styled.span.withConfig({
49
49
  displayName: "StyledSpinnerOverlayLabel",
50
- componentId: "core-12_8_1__sc-1igww3-2"
50
+ componentId: "core-12_10_0__sc-1igww3-2"
51
51
  })(["", " color:", ";display:block;min-height:20px;padding-top:", "px;text-align:center;text-transform:uppercase;transition:opacity ", ";"], getTypographyIntent('body'), colors.gray15, spacing.md, transition);
52
52
  var rotate = /*#__PURE__*/keyframes(["to{transform:rotate(360deg);}"]);
53
53
  export var StyledSpinnerSVG = /*#__PURE__*/styled.svg.withConfig({
54
54
  displayName: "StyledSpinnerSVG",
55
- componentId: "core-12_8_1__sc-1igww3-3"
55
+ componentId: "core-12_10_0__sc-1igww3-3"
56
56
  })(["animation:", " ", "ms linear ", "ms infinite;fill:none;height:100%;left:0;margin:auto;position:absolute;right:0;top:0;width:100%;z-index:2;"], rotate, duration - durationOffset, function (p) {
57
57
  var animationDelay = -(p.mountTime % (duration - durationOffset));
58
58
  return animationDelay;
@@ -60,15 +60,15 @@ export var StyledSpinnerSVG = /*#__PURE__*/styled.svg.withConfig({
60
60
  var startsWithNoInteraction = /*#__PURE__*/css(["opacity:0;pointer-events:none;transition:opacity ", ";"], transition);
61
61
  export var StyledSpinnerOverlay = /*#__PURE__*/styled.div.withConfig({
62
62
  displayName: "StyledSpinnerOverlay",
63
- componentId: "core-12_8_1__sc-1igww3-4"
63
+ componentId: "core-12_10_0__sc-1igww3-4"
64
64
  })(["", " background-color:", ";bottom:0;left:0;position:absolute;right:0;top:0;z-index:", ";"], startsWithNoInteraction, colors.white, zOverlay);
65
65
  export var StyledSpinnerContainerWithLabel = /*#__PURE__*/styled.div.withConfig({
66
66
  displayName: "StyledSpinnerContainerWithLabel",
67
- componentId: "core-12_8_1__sc-1igww3-5"
67
+ componentId: "core-12_10_0__sc-1igww3-5"
68
68
  })(["", " align-items:center;display:flex;flex-direction:column;height:100%;max-height:400px;justify-content:center;position:absolute;top:0;width:100%;z-index:", ";"], startsWithNoInteraction, zContainer);
69
69
  export var StyledSpinnerOverlayContainer = /*#__PURE__*/styled.div.withConfig({
70
70
  displayName: "StyledSpinnerOverlayContainer",
71
- componentId: "core-12_8_1__sc-1igww3-6"
71
+ componentId: "core-12_10_0__sc-1igww3-6"
72
72
  })(["min-height:150px;position:relative;", " ", ""], function (_ref3) {
73
73
  var $loading = _ref3.$loading;
74
74
  if ($loading) {
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Props } from '../_utils/types';
3
- import type { SplitViewCardContextAPI } from './SplitViewCard.types';
3
+ import type { SplitViewCardContextAPI, SplitViewCardProps } from './SplitViewCard.types';
4
4
  export declare const SplitViewCardContext: React.Context<SplitViewCardContextAPI>;
5
- export declare const SplitViewCardContextProvider: ({ children, defaultValue, }: React.PropsWithChildren<Props & {
6
- defaultValue?: boolean | undefined;
7
- }>) => React.JSX.Element;
5
+ export declare const SplitViewCardContextProvider: ({ children, isInitiallyOpen, onClose, isClosable, }: React.PropsWithChildren<Props & SplitViewCardProps>) => React.JSX.Element;
6
+ export declare const useSplitViewCard: () => SplitViewCardContextAPI;
@@ -8,28 +8,46 @@ import React from 'react';
8
8
  export var SplitViewCardContext = /*#__PURE__*/React.createContext({
9
9
  open: false,
10
10
  onOpen: function onOpen() {},
11
- onClose: function onClose() {}
11
+ onClose: function onClose() {},
12
+ isClosable: true,
13
+ isScrolling: false,
14
+ setIsScrolling: function setIsScrolling() {}
12
15
  });
13
16
  export var SplitViewCardContextProvider = function SplitViewCardContextProvider(_ref) {
14
17
  var children = _ref.children,
15
- _ref$defaultValue = _ref.defaultValue,
16
- defaultValue = _ref$defaultValue === void 0 ? false : _ref$defaultValue;
17
- var _React$useState = React.useState(defaultValue),
18
+ _ref$isInitiallyOpen = _ref.isInitiallyOpen,
19
+ isInitiallyOpen = _ref$isInitiallyOpen === void 0 ? false : _ref$isInitiallyOpen,
20
+ onClose = _ref.onClose,
21
+ isClosable = _ref.isClosable;
22
+ var _React$useState = React.useState(isInitiallyOpen),
18
23
  _React$useState2 = _slicedToArray(_React$useState, 2),
19
24
  open = _React$useState2[0],
20
25
  setOpen = _React$useState2[1];
26
+ var _React$useState3 = React.useState(false),
27
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
28
+ isScrolling = _React$useState4[0],
29
+ setIsScrolling = _React$useState4[1];
21
30
  var onOpen = function onOpen() {
22
- return setOpen(true);
23
- };
24
- var onClose = function onClose() {
25
- return setOpen(false);
31
+ setOpen(true);
26
32
  };
33
+ var handleClose = React.useCallback(function () {
34
+ setOpen(false);
35
+ if (onClose) {
36
+ onClose();
37
+ }
38
+ }, [onClose]);
27
39
  return /*#__PURE__*/React.createElement(SplitViewCardContext.Provider, {
28
40
  value: {
29
41
  open: open,
30
42
  onOpen: onOpen,
31
- onClose: onClose
43
+ onClose: handleClose,
44
+ isClosable: isClosable,
45
+ isScrolling: isScrolling,
46
+ setIsScrolling: setIsScrolling
32
47
  }
33
48
  }, children);
34
49
  };
50
+ export var useSplitViewCard = function useSplitViewCard() {
51
+ return React.useContext(SplitViewCardContext);
52
+ };
35
53
  //# sourceMappingURL=SplitViewCard.context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SplitViewCard.context.js","names":["React","SplitViewCardContext","createContext","open","onOpen","onClose","SplitViewCardContextProvider","_ref","children","_ref$defaultValue","defaultValue","_React$useState","useState","_React$useState2","_slicedToArray","setOpen","createElement","Provider","value"],"sources":["../../src/SplitViewCard/SplitViewCard.context.tsx"],"sourcesContent":["import React from 'react'\nimport type { Props } from '../_utils/types'\nimport type { SplitViewCardContextAPI } from './SplitViewCard.types'\n\nexport const SplitViewCardContext =\n React.createContext<SplitViewCardContextAPI>({\n open: false,\n onOpen: () => {},\n onClose: () => {},\n })\n\nexport const SplitViewCardContextProvider = ({\n children,\n defaultValue = false,\n}: React.PropsWithChildren<Props & { defaultValue?: boolean }>) => {\n const [open, setOpen] = React.useState(defaultValue)\n\n const onOpen = () => setOpen(true)\n const onClose = () => setOpen(false)\n\n return (\n <SplitViewCardContext.Provider value={{ open, onOpen, onClose }}>\n {children}\n </SplitViewCardContext.Provider>\n )\n}\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAIzB,OAAO,IAAMC,oBAAoB,gBAC/BD,KAAK,CAACE,aAAa,CAA0B;EAC3CC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE,SAAAA,OAAA,EAAM,CAAC,CAAC;EAChBC,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC;AAClB,CAAC,CAAC;AAEJ,OAAO,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAAAC,IAAA,EAG0B;EAAA,IAFjEC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,iBAAA,GAAAF,IAAA,CACRG,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAG,KAAK,GAAAA,iBAAA;EAEpB,IAAAE,eAAA,GAAwBX,KAAK,CAACY,QAAQ,CAACF,YAAY,CAAC;IAAAG,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA7CR,IAAI,GAAAU,gBAAA;IAAEE,OAAO,GAAAF,gBAAA;EAEpB,IAAMT,MAAM,GAAG,SAATA,MAAMA,CAAA;IAAA,OAASW,OAAO,CAAC,IAAI,CAAC;EAAA;EAClC,IAAMV,OAAO,GAAG,SAAVA,OAAOA,CAAA;IAAA,OAASU,OAAO,CAAC,KAAK,CAAC;EAAA;EAEpC,oBACEf,KAAA,CAAAgB,aAAA,CAACf,oBAAoB,CAACgB,QAAQ;IAACC,KAAK,EAAE;MAAEf,IAAI,EAAJA,IAAI;MAAEC,MAAM,EAANA,MAAM;MAAEC,OAAO,EAAPA;IAAQ;EAAE,GAC7DG,QAC4B,CAAC;AAEpC,CAAC"}
1
+ {"version":3,"file":"SplitViewCard.context.js","names":["React","SplitViewCardContext","createContext","open","onOpen","onClose","isClosable","isScrolling","setIsScrolling","SplitViewCardContextProvider","_ref","children","_ref$isInitiallyOpen","isInitiallyOpen","_React$useState","useState","_React$useState2","_slicedToArray","setOpen","_React$useState3","_React$useState4","handleClose","useCallback","createElement","Provider","value","useSplitViewCard","useContext"],"sources":["../../src/SplitViewCard/SplitViewCard.context.tsx"],"sourcesContent":["import React from 'react'\nimport type { Props } from '../_utils/types'\nimport type {\n SplitViewCardContextAPI,\n SplitViewCardProps,\n} from './SplitViewCard.types'\n\nexport const SplitViewCardContext =\n React.createContext<SplitViewCardContextAPI>({\n open: false,\n onOpen: () => {},\n onClose: () => {},\n isClosable: true,\n isScrolling: false,\n setIsScrolling: () => {},\n })\n\nexport const SplitViewCardContextProvider = ({\n children,\n isInitiallyOpen = false,\n onClose,\n isClosable,\n}: React.PropsWithChildren<Props & SplitViewCardProps>) => {\n const [open, setOpen] = React.useState(isInitiallyOpen)\n const [isScrolling, setIsScrolling] = React.useState(false)\n\n const onOpen = () => {\n setOpen(true)\n }\n\n const handleClose = React.useCallback(() => {\n setOpen(false)\n\n if (onClose) {\n onClose()\n }\n }, [onClose])\n\n return (\n <SplitViewCardContext.Provider\n value={{\n open,\n onOpen,\n onClose: handleClose,\n isClosable,\n isScrolling,\n setIsScrolling,\n }}\n >\n {children}\n </SplitViewCardContext.Provider>\n )\n}\n\nexport const useSplitViewCard = () => React.useContext(SplitViewCardContext)\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAOzB,OAAO,IAAMC,oBAAoB,gBAC/BD,KAAK,CAACE,aAAa,CAA0B;EAC3CC,IAAI,EAAE,KAAK;EACXC,MAAM,EAAE,SAAAA,OAAA,EAAM,CAAC,CAAC;EAChBC,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC,CAAC;EACjBC,UAAU,EAAE,IAAI;EAChBC,WAAW,EAAE,KAAK;EAClBC,cAAc,EAAE,SAAAA,eAAA,EAAM,CAAC;AACzB,CAAC,CAAC;AAEJ,OAAO,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAAAC,IAAA,EAKkB;EAAA,IAJzDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,oBAAA,GAAAF,IAAA,CACRG,eAAe;IAAfA,eAAe,GAAAD,oBAAA,cAAG,KAAK,GAAAA,oBAAA;IACvBP,OAAO,GAAAK,IAAA,CAAPL,OAAO;IACPC,UAAU,GAAAI,IAAA,CAAVJ,UAAU;EAEV,IAAAQ,eAAA,GAAwBd,KAAK,CAACe,QAAQ,CAACF,eAAe,CAAC;IAAAG,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAAhDX,IAAI,GAAAa,gBAAA;IAAEE,OAAO,GAAAF,gBAAA;EACpB,IAAAG,gBAAA,GAAsCnB,KAAK,CAACe,QAAQ,CAAC,KAAK,CAAC;IAAAK,gBAAA,GAAAH,cAAA,CAAAE,gBAAA;IAApDZ,WAAW,GAAAa,gBAAA;IAAEZ,cAAc,GAAAY,gBAAA;EAElC,IAAMhB,MAAM,GAAG,SAATA,MAAMA,CAAA,EAAS;IACnBc,OAAO,CAAC,IAAI,CAAC;EACf,CAAC;EAED,IAAMG,WAAW,GAAGrB,KAAK,CAACsB,WAAW,CAAC,YAAM;IAC1CJ,OAAO,CAAC,KAAK,CAAC;IAEd,IAAIb,OAAO,EAAE;MACXA,OAAO,CAAC,CAAC;IACX;EACF,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,oBACEL,KAAA,CAAAuB,aAAA,CAACtB,oBAAoB,CAACuB,QAAQ;IAC5BC,KAAK,EAAE;MACLtB,IAAI,EAAJA,IAAI;MACJC,MAAM,EAANA,MAAM;MACNC,OAAO,EAAEgB,WAAW;MACpBf,UAAU,EAAVA,UAAU;MACVC,WAAW,EAAXA,WAAW;MACXC,cAAc,EAAdA;IACF;EAAE,GAEDG,QAC4B,CAAC;AAEpC,CAAC;AAED,OAAO,IAAMe,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAA;EAAA,OAAS1B,KAAK,CAAC2B,UAAU,CAAC1B,oBAAoB,CAAC;AAAA"}
@@ -2,42 +2,43 @@ import React from 'react';
2
2
  import type { Props } from '../_utils/types';
3
3
  import type { SplitViewCardProps } from './SplitViewCard.types';
4
4
  export declare const Main: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
5
- export declare const Aside: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
6
- export declare const Heading: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
7
- export declare const Title: React.ForwardRefExoticComponent<SplitViewCardProps & React.RefAttributes<HTMLDivElement>>;
8
- export declare const Header: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
9
- export declare const Body: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
10
- export declare const Footer: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const Panel: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
6
+ export declare const PanelHeading: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const PanelTitle: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const PanelHeader: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const PanelBody: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const PanelFooter: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
11
11
  /**
12
12
 
13
- A split view card component is used to support a split view page layout.
13
+ A SplitViewCard component is used to display additional details
14
+ of an item from a collection inside a panel of a card.
14
15
 
15
16
  - SplitViewCard
16
17
  - SplitViewCard.Main
17
18
  - SplitViewCard.Section
18
19
  - Table or some other main content
19
- - SplitViewCard.Aside
20
- - SplitViewCard.Header
21
- - SplitViewCard.Title
22
- - SplitViewCard.Heading
23
- - Title
20
+ - SplitViewCard.Panel
21
+ - SplitViewCard.PanelHeader
22
+ - SplitViewCard.PanelTitle
23
+ - text
24
24
  - Tabs
25
- - SplitViewCard.Body
25
+ - SplitViewCard.PanelBody
26
26
  - Content
27
- - SplitViewCard.Footer
27
+ - SplitViewCard.PanelFooter
28
+ - SplitViewCard.Actions
28
29
 
29
- @since 12.4.2
30
+ @since 12.9.0
30
31
 
31
32
  @see [Storybook](https://stories.core.procore.com/?path=/story/demos-splitviewcard--demo)
32
33
 
33
34
  */
34
- export declare const SplitViewCard: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>> & {
35
+ export declare const SplitViewCard: React.ForwardRefExoticComponent<SplitViewCardProps & React.RefAttributes<HTMLDivElement>> & {
36
+ Actions: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
35
37
  Main: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
36
38
  Section: React.ForwardRefExoticComponent<import("../Section").SectionProps & React.RefAttributes<HTMLDivElement>>;
37
- Aside: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
38
- Heading: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
39
- Title: React.ForwardRefExoticComponent<SplitViewCardProps & React.RefAttributes<HTMLDivElement>>;
40
- Header: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
41
- Body: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
42
- Footer: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
39
+ Panel: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
40
+ PanelTitle: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
41
+ PanelHeader: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
42
+ PanelBody: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
43
+ PanelFooter: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
43
44
  };
@@ -1,129 +1,196 @@
1
- var _excluded = ["children"],
1
+ var _excluded = ["children", "isClosable", "isInitiallyOpen", "onClose"],
2
2
  _excluded2 = ["children"],
3
3
  _excluded3 = ["children"],
4
4
  _excluded4 = ["children"],
5
- _excluded5 = ["children", "onClose"],
5
+ _excluded5 = ["children"],
6
6
  _excluded6 = ["children"],
7
7
  _excluded7 = ["children"],
8
- _excluded8 = ["children"];
8
+ _excluded8 = ["children"],
9
+ _excluded9 = ["children"];
10
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
15
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
16
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
17
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
11
18
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
19
  import { Clear } from '@procore/core-icons';
13
20
  import React from 'react';
14
21
  import { Button } from '../Button';
22
+ import { StyledActions } from '../Content/Content.styles';
15
23
  import { Section } from '../Section';
16
24
  import { useI18nContext } from '../_hooks/I18n';
25
+ import { useResizeObserver } from '../_hooks/ResizeObserver';
17
26
  import { addSubcomponents } from '../_utils/addSubcomponents';
27
+ import { mergeRefs } from '../_utils/mergeRefs';
28
+ import { SplitViewCardContextProvider, useSplitViewCard } from './SplitViewCard.context';
18
29
  import { StyledSplitViewCardAside, StyledSplitViewCardBody, StyledSplitViewCardContainer, StyledSplitViewCardFooter, StyledSplitViewCardHeader, StyledSplitViewCardHeading, StyledSplitViewCardMain, StyledSplitViewCardTitle } from './SplitViewCard.styles';
19
- import { useSplitViewCard } from './useSplitViewCard';
20
30
  var SplitViewCard_ = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
21
31
  var children = _ref.children,
32
+ _ref$isClosable = _ref.isClosable,
33
+ isClosable = _ref$isClosable === void 0 ? true : _ref$isClosable,
34
+ isInitiallyOpen = _ref.isInitiallyOpen,
35
+ onClose = _ref.onClose,
22
36
  props = _objectWithoutProperties(_ref, _excluded);
23
- return /*#__PURE__*/React.createElement(StyledSplitViewCardContainer, _extends({
37
+ return /*#__PURE__*/React.createElement(SplitViewCardContextProvider, {
38
+ isInitiallyOpen: isInitiallyOpen,
39
+ onClose: onClose,
40
+ isClosable: isClosable
41
+ }, /*#__PURE__*/React.createElement(StyledSplitViewCardContainer, _extends({
24
42
  ref: ref
25
- }, props), children);
43
+ }, props), children));
26
44
  });
27
45
  export var Main = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
28
46
  var children = _ref2.children,
29
47
  props = _objectWithoutProperties(_ref2, _excluded2);
48
+ var _useSplitViewCard = useSplitViewCard(),
49
+ open = _useSplitViewCard.open;
30
50
  return /*#__PURE__*/React.createElement(StyledSplitViewCardMain, _extends({
51
+ $open: open,
31
52
  ref: ref
32
53
  }, props), children);
33
54
  });
34
- export var Aside = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
55
+ export var Panel = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
35
56
  var children = _ref3.children,
36
57
  props = _objectWithoutProperties(_ref3, _excluded3);
37
- var _useSplitViewCard = useSplitViewCard(),
38
- open = _useSplitViewCard.open;
58
+ var _useSplitViewCard2 = useSplitViewCard(),
59
+ open = _useSplitViewCard2.open;
60
+ var _React$useState = React.useState(false),
61
+ _React$useState2 = _slicedToArray(_React$useState, 2),
62
+ hasShadow = _React$useState2[0],
63
+ setHasShadow = _React$useState2[1];
64
+ var mainRef = React.useRef(null);
65
+ var handleResize = React.useCallback(function (entries) {
66
+ var element = entries[0];
67
+ if (element && element.target.clientWidth <= 400) {
68
+ setHasShadow(true);
69
+ return;
70
+ }
71
+ setHasShadow(false);
72
+ }, []);
73
+ var setResize = useResizeObserver(handleResize);
74
+ React.useEffect(function () {
75
+ setResize(mainRef.current);
76
+ }, [setResize]);
39
77
  return /*#__PURE__*/React.createElement(StyledSplitViewCardAside, _extends({
40
78
  $open: open,
41
- ref: ref
79
+ $hasShadow: hasShadow,
80
+ ref: mergeRefs(ref, mainRef)
42
81
  }, props), children);
43
82
  });
44
- export var Heading = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
83
+ export var PanelHeading = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
45
84
  var children = _ref4.children,
46
85
  props = _objectWithoutProperties(_ref4, _excluded4);
47
86
  return /*#__PURE__*/React.createElement(StyledSplitViewCardHeading, _extends({
48
87
  ref: ref
49
88
  }, props), children);
50
89
  });
51
- export var Title = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
90
+ export var PanelTitle = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
52
91
  var children = _ref5.children,
53
- onClose = _ref5.onClose,
54
92
  props = _objectWithoutProperties(_ref5, _excluded5);
55
93
  var I18n = useI18nContext();
94
+ var _useSplitViewCard3 = useSplitViewCard(),
95
+ isClosable = _useSplitViewCard3.isClosable,
96
+ onClose = _useSplitViewCard3.onClose;
56
97
  return /*#__PURE__*/React.createElement(StyledSplitViewCardTitle, _extends({
57
98
  ref: ref
58
- }, props), children, /*#__PURE__*/React.createElement(Button, {
99
+ }, props), /*#__PURE__*/React.createElement(StyledSplitViewCardHeading, null, children), isClosable && /*#__PURE__*/React.createElement(Button, {
59
100
  "aria-label": I18n.t('core.splitViewCard.a11y.close'),
60
101
  icon: /*#__PURE__*/React.createElement(Clear, null),
61
102
  variant: "tertiary",
62
103
  onClick: onClose
63
104
  }));
64
105
  });
65
- export var Header = /*#__PURE__*/React.forwardRef(function (_ref6, ref) {
106
+ export var PanelHeader = /*#__PURE__*/React.forwardRef(function (_ref6, ref) {
66
107
  var children = _ref6.children,
67
108
  props = _objectWithoutProperties(_ref6, _excluded6);
68
109
  return /*#__PURE__*/React.createElement(StyledSplitViewCardHeader, _extends({
69
110
  ref: ref
70
111
  }, props), children);
71
112
  });
72
- export var Body = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
113
+ export var PanelBody = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
73
114
  var children = _ref7.children,
74
115
  props = _objectWithoutProperties(_ref7, _excluded7);
116
+ var _useSplitViewCard4 = useSplitViewCard(),
117
+ setIsScrolling = _useSplitViewCard4.setIsScrolling;
118
+ var timer = React.useRef(null);
119
+ var handleScroll = React.useCallback(function () {
120
+ setIsScrolling(true);
121
+ if (timer.current) {
122
+ clearTimeout(timer.current);
123
+ }
124
+ timer.current = setTimeout(function () {
125
+ setIsScrolling(false);
126
+ }, 100);
127
+ }, [setIsScrolling]);
75
128
  return /*#__PURE__*/React.createElement(StyledSplitViewCardBody, _extends({
76
129
  ref: ref
77
- }, props), children);
130
+ }, props, {
131
+ onScroll: handleScroll,
132
+ tabIndex: 0
133
+ }), children);
78
134
  });
79
- export var Footer = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
135
+ export var PanelFooter = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
80
136
  var children = _ref8.children,
81
137
  props = _objectWithoutProperties(_ref8, _excluded8);
138
+ var _useSplitViewCard5 = useSplitViewCard(),
139
+ isScrolling = _useSplitViewCard5.isScrolling;
82
140
  return /*#__PURE__*/React.createElement(StyledSplitViewCardFooter, _extends({
141
+ $hasShadow: isScrolling,
142
+ ref: ref
143
+ }, props), children);
144
+ });
145
+ var Actions = /*#__PURE__*/React.forwardRef(function Actions(_ref9, ref) {
146
+ var children = _ref9.children,
147
+ props = _objectWithoutProperties(_ref9, _excluded9);
148
+ return /*#__PURE__*/React.createElement(StyledActions, _extends({
83
149
  ref: ref
84
150
  }, props), children);
85
151
  });
86
152
  SplitViewCard_.displayName = 'SplitViewCard';
87
153
  Main.displayName = 'SplitViewCard.Main';
88
- Aside.displayName = 'SplitViewCard.Aside';
89
- Heading.displayName = 'SplitViewCard.Heading';
90
- Title.displayName = 'SplitViewCard.Title';
91
- Header.displayName = 'SplitViewCard.Header';
92
- Body.displayName = 'SplitViewCard.Body';
93
- Footer.displayName = 'SplitViewCard.Footer';
154
+ Panel.displayName = 'SplitViewCard.Panel';
155
+ PanelTitle.displayName = 'SplitViewCard.PanelTitle';
156
+ PanelHeader.displayName = 'SplitViewCard.PanelHeader';
157
+ PanelBody.displayName = 'SplitViewCard.PanelBody';
158
+ PanelFooter.displayName = 'SplitViewCard.PanelFooter';
159
+ Actions.displayName = 'SplitViewCard.Actions';
94
160
 
95
161
  /**
96
162
 
97
- A split view card component is used to support a split view page layout.
163
+ A SplitViewCard component is used to display additional details
164
+ of an item from a collection inside a panel of a card.
98
165
 
99
166
  - SplitViewCard
100
167
  - SplitViewCard.Main
101
168
  - SplitViewCard.Section
102
169
  - Table or some other main content
103
- - SplitViewCard.Aside
104
- - SplitViewCard.Header
105
- - SplitViewCard.Title
106
- - SplitViewCard.Heading
107
- - Title
170
+ - SplitViewCard.Panel
171
+ - SplitViewCard.PanelHeader
172
+ - SplitViewCard.PanelTitle
173
+ - text
108
174
  - Tabs
109
- - SplitViewCard.Body
175
+ - SplitViewCard.PanelBody
110
176
  - Content
111
- - SplitViewCard.Footer
177
+ - SplitViewCard.PanelFooter
178
+ - SplitViewCard.Actions
112
179
 
113
- @since 12.4.2
180
+ @since 12.9.0
114
181
 
115
182
  @see [Storybook](https://stories.core.procore.com/?path=/story/demos-splitviewcard--demo)
116
183
 
117
184
  */
118
185
 
119
186
  export var SplitViewCard = addSubcomponents({
187
+ Actions: Actions,
120
188
  Main: Main,
121
189
  Section: Section,
122
- Aside: Aside,
123
- Heading: Heading,
124
- Title: Title,
125
- Header: Header,
126
- Body: Body,
127
- Footer: Footer
190
+ Panel: Panel,
191
+ PanelTitle: PanelTitle,
192
+ PanelHeader: PanelHeader,
193
+ PanelBody: PanelBody,
194
+ PanelFooter: PanelFooter
128
195
  }, SplitViewCard_);
129
196
  //# sourceMappingURL=SplitViewCard.js.map