@procore/core-react 12.17.8 → 12.18.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 (201) 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.styles.js +5 -5
  9. package/dist/Calendar/Calendar.styles.js +8 -8
  10. package/dist/Card/Card.styles.js +1 -1
  11. package/dist/Checkbox/Checkbox.styles.js +6 -6
  12. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  13. package/dist/ContactItem/ContactItem.styles.js +5 -5
  14. package/dist/Content/Content.styles.js +2 -2
  15. package/dist/DateInput/DateInput.styles.js +6 -6
  16. package/dist/DetailPage/DetailPage.styles.js +7 -7
  17. package/dist/Dropdown/Dropdown.styles.js +3 -3
  18. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  19. package/dist/Dropzone/Dropzone.js +1 -1
  20. package/dist/Dropzone/Dropzone.styles.js +9 -9
  21. package/dist/EmptyState/EmptyState.styles.js +6 -6
  22. package/dist/Field/Field.styles.js +3 -3
  23. package/dist/FileList/FileList.styles.js +4 -4
  24. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  25. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  26. package/dist/FileSelect/FileSelect.styles.js +2 -2
  27. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  28. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  29. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  30. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  31. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  32. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  33. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  34. package/dist/FileToken/FileToken.styles.js +4 -4
  35. package/dist/FilterToken/FilterToken.styles.js +5 -5
  36. package/dist/FlexList/FlexList.styles.js +1 -1
  37. package/dist/Form/Form.styles.js +14 -14
  38. package/dist/Form/StyledFormikForm.styles.js +2 -2
  39. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  40. package/dist/Grid/Grid.styles.js +2 -2
  41. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  42. package/dist/Input/Input.styles.js +1 -1
  43. package/dist/Link/Link.styles.js +1 -1
  44. package/dist/ListPage/ListPage.styles.js +8 -8
  45. package/dist/Loader/Loader.styles.js +2 -2
  46. package/dist/MenuImperative/MenuImperative.js +3 -6
  47. package/dist/MenuImperative/MenuImperative.js.map +1 -1
  48. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  49. package/dist/MenuImperative/sensors.d.ts +0 -1
  50. package/dist/MenuImperative/sensors.js +1 -1
  51. package/dist/MenuImperative/sensors.js.map +1 -1
  52. package/dist/Modal/Modal.styles.js +13 -13
  53. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  54. package/dist/NextMenu/NextMenu.styles.js +3 -3
  55. package/dist/Notation/Notation.js +1 -1
  56. package/dist/NumberInput/NumberInput.styles.js +7 -7
  57. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  58. package/dist/OverlayTrigger/a11yPresets.d.ts +5 -0
  59. package/dist/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
  60. package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
  61. package/dist/PageLayout/PageLayout.styles.js +16 -16
  62. package/dist/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
  63. package/dist/PageTemplate/PageTemplate.styles.js +3 -3
  64. package/dist/Pagination/Pagination.styles.js +5 -5
  65. package/dist/Panel/Panel.styles.js +11 -11
  66. package/dist/Pill/Pill.styles.js +2 -2
  67. package/dist/PillSelect/PillSelect.styles.js +4 -4
  68. package/dist/Popover/Popover.styles.js +2 -2
  69. package/dist/Portal/Portal.styles.js +1 -1
  70. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  71. package/dist/RadioButton/RadioButton.styles.js +3 -3
  72. package/dist/Required/Required.styles.js +3 -3
  73. package/dist/Search/Search.styles.js +5 -5
  74. package/dist/Section/Section.styles.js +7 -7
  75. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  76. package/dist/Select/Select.styles.js +7 -7
  77. package/dist/Semantic/Semantic.styles.js +9 -9
  78. package/dist/Slider/Slider.styles.js +5 -5
  79. package/dist/Spinner/Spinner.js +52 -28
  80. package/dist/Spinner/Spinner.js.map +1 -1
  81. package/dist/Spinner/Spinner.styles.d.ts +1 -0
  82. package/dist/Spinner/Spinner.styles.js +17 -13
  83. package/dist/Spinner/Spinner.styles.js.map +1 -1
  84. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  85. package/dist/SuperSelect/SuperSelect.components.js +1 -1
  86. package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
  87. package/dist/SuperSelect/SuperSelect.js +1 -1
  88. package/dist/SuperSelect/SuperSelect.js.map +1 -1
  89. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  90. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  91. package/dist/Switch/Switch.styles.js +4 -4
  92. package/dist/Table/Table.styles.js +28 -28
  93. package/dist/TableShelf/TableShelf.styles.js +5 -5
  94. package/dist/Tabs/Tabs.styles.js +15 -15
  95. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  96. package/dist/TextArea/TextArea.styles.js +1 -1
  97. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  98. package/dist/TextInput/TextInput.d.ts +11 -0
  99. package/dist/TextInput/TextInput.js +15 -0
  100. package/dist/TextInput/TextInput.js.map +1 -0
  101. package/dist/TextInput/index.d.ts +2 -0
  102. package/dist/TextInput/index.js +2 -0
  103. package/dist/TextInput/index.js.map +1 -0
  104. package/dist/Thumbnail/Thumbnail.hooks.d.ts +20 -0
  105. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  106. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  107. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  108. package/dist/Tile/Tile.styles.js +8 -8
  109. package/dist/Title/Title.styles.js +7 -7
  110. package/dist/Toast/Toast.styles.js +3 -3
  111. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  112. package/dist/Token/Token.styles.js +3 -3
  113. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  114. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  115. package/dist/Tooltip/Tooltip.styles.js +2 -2
  116. package/dist/Tree/Tree.styles.js +9 -9
  117. package/dist/Typeahead/Typeahead.styles.js +3 -3
  118. package/dist/Typography/Typography.styles.js +1 -1
  119. package/dist/Typography/Typography.table.story.js +2 -2
  120. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  121. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
  122. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  123. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  124. package/dist/_typedoc/Box/Box.types.json +68 -68
  125. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  126. package/dist/_typedoc/Button/Button.types.json +12 -12
  127. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  128. package/dist/_typedoc/Card/Card.types.json +6 -6
  129. package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
  130. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  131. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  132. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  133. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  134. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  135. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
  136. package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
  137. package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
  138. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  139. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  140. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  141. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  142. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  143. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  144. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  145. package/dist/_typedoc/Form/Form.types.json +741 -741
  146. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  147. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  148. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  149. package/dist/_typedoc/Input/Input.types.json +2 -2
  150. package/dist/_typedoc/Link/Link.types.json +4 -4
  151. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  152. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  153. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  154. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  155. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  156. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  157. package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
  158. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
  159. package/dist/_typedoc/PageLayout/PageLayout.types.json +29 -29
  160. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  161. package/dist/_typedoc/Panel/Panel.types.json +28 -28
  162. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  163. package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
  164. package/dist/_typedoc/Popover/Popover.types.json +15 -15
  165. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  166. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  167. package/dist/_typedoc/Required/Required.types.json +5 -5
  168. package/dist/_typedoc/Search/Search.types.json +19 -19
  169. package/dist/_typedoc/Section/Section.types.json +15 -15
  170. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
  171. package/dist/_typedoc/Select/Select.types.json +60 -60
  172. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  173. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  174. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  175. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
  176. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  177. package/dist/_typedoc/Table/Table.types.json +101 -101
  178. package/dist/_typedoc/Tabs/Tabs.types.json +20 -20
  179. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
  180. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  181. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  182. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  183. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  184. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  185. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  186. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  187. package/dist/_typedoc/Title/Title.types.json +1 -1
  188. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  189. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
  190. package/dist/_typedoc/Token/Token.types.json +4 -4
  191. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  192. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
  193. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  194. package/dist/_typedoc/Tree/Tree.types.json +86 -86
  195. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  196. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  197. package/dist/_typedoc/_utils/types.json +3 -3
  198. package/dist/index.d.ts +1 -0
  199. package/dist/index.js +1 -0
  200. package/dist/index.js.map +1 -1
  201. package/package.json +4 -5
@@ -5,15 +5,15 @@ import { colors } from '../_styles/colors';
5
5
  import { spacing } from '../_styles/spacing';
6
6
  export var StyledSectionBanner = /*#__PURE__*/styled.div.withConfig({
7
7
  displayName: "StyledSectionBanner",
8
- componentId: "core-12_17_8__sc-1lxbrwv-0"
8
+ componentId: "core-12_18_0__sc-1lxbrwv-0"
9
9
  })(["margin-bottom:", "px;> * + *{margin-top:", "px;}"], spacing.sm, spacing.sm);
10
10
  export var StyledSectionInner = /*#__PURE__*/styled.div.withConfig({
11
11
  displayName: "StyledSectionInner",
12
- componentId: "core-12_17_8__sc-1lxbrwv-1"
12
+ componentId: "core-12_18_0__sc-1lxbrwv-1"
13
13
  })([""]);
14
14
  export var StyledSectionCollapseHeading = /*#__PURE__*/styled.div.withConfig({
15
15
  displayName: "StyledSectionCollapseHeading",
16
- componentId: "core-12_17_8__sc-1lxbrwv-2"
16
+ componentId: "core-12_18_0__sc-1lxbrwv-2"
17
17
  })(["align-self:flex-start;margin-right:", "px;"], spacing.sm);
18
18
  export var sectionClassnames = {
19
19
  divide: 'section--divide',
@@ -24,11 +24,11 @@ export var sectionClassnames = {
24
24
  };
25
25
  export var StyledSection = /*#__PURE__*/styled.div.withConfig({
26
26
  displayName: "StyledSection",
27
- componentId: "core-12_17_8__sc-1lxbrwv-3"
27
+ componentId: "core-12_18_0__sc-1lxbrwv-3"
28
28
  })(["padding-left:", "px;padding-right:", "px;padding-bottom:", "px;& > ", "{padding-top:", "px;}&.", "{& > ", "{border-top:1px solid ", ";}}&:first-child > ", "{border-top:0;}& &{padding-left:0;padding-right:0;&:first-child > ", "{border-top:1px solid ", ";}&:last-child{padding-bottom:0;}}", ":last-of-type{margin-bottom:", "px;}", " + &&&{padding-top:", "px;}"], spacing.lg, spacing.lg, spacing.lg, StyledSectionInner, spacing.lg, sectionClassnames.divide, StyledSectionInner, colors.gray85, StyledSectionInner, StyledSectionInner, colors.gray85, StyledFormRow, spacing.lg * -1, StyledFormRow, spacing.xs);
29
29
  export var StyledSectionContentRegion = /*#__PURE__*/styled.div.withConfig({
30
30
  displayName: "StyledSectionContentRegion",
31
- componentId: "core-12_17_8__sc-1lxbrwv-4"
31
+ componentId: "core-12_18_0__sc-1lxbrwv-4"
32
32
  })(["padding-top:", "px;", " ", " & > :not(", ") + ", "{padding-top:", "px;}", " ", " &:last-of-type{padding-bottom:0;}"], spacing.sm, function (_ref) {
33
33
  var $closed = _ref.$closed;
34
34
  return $closed && css(["padding-top:0;"]);
@@ -38,10 +38,10 @@ export var StyledSectionContentRegion = /*#__PURE__*/styled.div.withConfig({
38
38
  }, StyledSection, StyledSection, spacing.xl, StyledSection, StyledSection);
39
39
  export var StyledSectionHeader = /*#__PURE__*/styled.div.withConfig({
40
40
  displayName: "StyledSectionHeader",
41
- componentId: "core-12_17_8__sc-1lxbrwv-5"
41
+ componentId: "core-12_18_0__sc-1lxbrwv-5"
42
42
  })(["align-items:center;display:flex;min-height:36px;word-break:break-word;"]);
43
43
  export var StyledTitle = /*#__PURE__*/styled(Title).withConfig({
44
44
  displayName: "StyledTitle",
45
- componentId: "core-12_17_8__sc-1lxbrwv-6"
45
+ componentId: "core-12_18_0__sc-1lxbrwv-6"
46
46
  })(["width:100%;"]);
47
47
  //# sourceMappingURL=Section.styles.js.map
@@ -5,7 +5,7 @@ import { colors } from '../_styles/colors';
5
5
  import { spacing } from '../_styles/spacing';
6
6
  export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
7
7
  displayName: "StyledContainer",
8
- componentId: "core-12_17_8__sc-ocai3-0"
8
+ componentId: "core-12_18_0__sc-ocai3-0"
9
9
  })(["align-items:center;display:", ";height:36px;justify-content:center;width:", ";"], function (_ref) {
10
10
  var block = _ref.block;
11
11
  return block ? 'flex' : 'inline-flex';
@@ -15,7 +15,7 @@ export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
15
15
  });
16
16
  export var StyledSegment = /*#__PURE__*/styled.label.withConfig({
17
17
  displayName: "StyledSegment",
18
- componentId: "core-12_17_8__sc-ocai3-1"
18
+ componentId: "core-12_18_0__sc-ocai3-1"
19
19
  })(["align-items:center;border-radius:0;border:1px solid ", ";cursor:pointer;display:flex;flex:1 1 auto;height:100%;justify-content:center;min-width:0;outline:0;padding:0 ", "px;position:relative;background-color:", ";color:", ";&:hover{background-color:", ";border-color:", ";color:", ";}", " ", ";"], colors.gray85, spacing.md, colors.white, colors.gray45, colors.gray94, colors.gray85, colors.gray45, function (_ref3) {
20
20
  var _ref3$$focused = _ref3.$focused,
21
21
  $focused = _ref3$$focused === void 0 ? false : _ref3$$focused;
@@ -37,10 +37,10 @@ export var StyledSegment = /*#__PURE__*/styled.label.withConfig({
37
37
  });
38
38
  export var StyledSegmentDisabledInteractiveWrapper = /*#__PURE__*/styled.div.withConfig({
39
39
  displayName: "StyledSegmentDisabledInteractiveWrapper",
40
- componentId: "core-12_17_8__sc-ocai3-2"
40
+ componentId: "core-12_18_0__sc-ocai3-2"
41
41
  })(["display:flex;flex:1 1 auto;min-width:0;height:100%;margin-right:-1px;&:first-child ", "{border-bottom-left-radius:", "px;border-top-left-radius:", "px;}&:last-child ", "{border-bottom-right-radius:", "px;border-top-right-radius:", "px;}"], StyledSegment, borderRadius.md, borderRadius.md, StyledSegment, borderRadius.md, borderRadius.md);
42
42
  export var StyledLabel = /*#__PURE__*/styled.span.withConfig({
43
43
  displayName: "StyledLabel",
44
- componentId: "core-12_17_8__sc-ocai3-3"
44
+ componentId: "core-12_18_0__sc-ocai3-3"
45
45
  })(["", ";display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"], getTypographyIntent('body'));
46
46
  //# sourceMappingURL=SegmentedController.styles.js.map
@@ -17,34 +17,34 @@ export var tableSelectClassName = 'select--table';
17
17
  var styledSelectButtonDefaultWidth = 248;
18
18
  export var StyledSelectMenu = /*#__PURE__*/styled(Card).withConfig({
19
19
  displayName: "StyledSelectMenu",
20
- componentId: "core-12_17_8__sc-mr8gwe-0"
20
+ componentId: "core-12_18_0__sc-mr8gwe-0"
21
21
  })(["display:flex;max-height:40vh;max-width:", "px;min-width:inherit;"], styledSelectButtonDefaultWidth);
22
22
  export var StyledSelectButtonLabel = /*#__PURE__*/styled.div.withConfig({
23
23
  displayName: "StyledSelectButtonLabel",
24
- componentId: "core-12_17_8__sc-mr8gwe-1"
24
+ componentId: "core-12_18_0__sc-mr8gwe-1"
25
25
  })(["", " flex-grow:1;margin-right:", "px;outline:none;pointer-events:", ";user-select:none;"], getEllipsis(), spacing.sm, function (_ref) {
26
26
  var $hoverable = _ref.$hoverable;
27
27
  return $hoverable ? 'initial' : 'none';
28
28
  });
29
29
  export var StyledSelectSpinner = /*#__PURE__*/styled.div.withConfig({
30
30
  displayName: "StyledSelectSpinner",
31
- componentId: "core-12_17_8__sc-mr8gwe-2"
31
+ componentId: "core-12_18_0__sc-mr8gwe-2"
32
32
  })(["align-items:center;display:flex;flex:0 0 auto;justify-content:center;line-height:0;"]);
33
33
  export var StyledSelectArrowContainer = /*#__PURE__*/styled.div.withConfig({
34
34
  displayName: "StyledSelectArrowContainer",
35
- componentId: "core-12_17_8__sc-mr8gwe-3"
35
+ componentId: "core-12_18_0__sc-mr8gwe-3"
36
36
  })(["align-items:center;display:inline-flex;height:16px;justify-content:flex-end;margin-left:", "px;width:8px;"], spacing.sm);
37
37
  export var StyledSelectArrow = /*#__PURE__*/styled.div.withConfig({
38
38
  displayName: "StyledSelectArrow",
39
- componentId: "core-12_17_8__sc-mr8gwe-4"
39
+ componentId: "core-12_18_0__sc-mr8gwe-4"
40
40
  })(["position:relative;", ""], arrowDown(4, 'gray45'));
41
41
  export var StyledSelectClearIcon = /*#__PURE__*/styled(Button).withConfig({
42
42
  displayName: "StyledSelectClearIcon",
43
- componentId: "core-12_17_8__sc-mr8gwe-5"
43
+ componentId: "core-12_18_0__sc-mr8gwe-5"
44
44
  })(["", "{pointer-events:none;}"], StyledContent);
45
45
  export var StyledSelectButton = /*#__PURE__*/styled.div.withConfig({
46
46
  displayName: "StyledSelectButton",
47
- componentId: "core-12_17_8__sc-mr8gwe-6"
47
+ componentId: "core-12_18_0__sc-mr8gwe-6"
48
48
  })(["", " 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) {
49
49
  var $block = _ref2.$block;
50
50
  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_17_8__sc-172j5qh-0"
8
+ componentId: "core-12_18_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_17_8__sc-172j5qh-1"
12
+ componentId: "core-12_18_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_17_8__sc-172j5qh-2"
16
+ componentId: "core-12_18_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_17_8__sc-172j5qh-3"
31
+ componentId: "core-12_18_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_17_8__sc-172j5qh-4"
35
+ componentId: "core-12_18_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_17_8__sc-172j5qh-5"
43
+ componentId: "core-12_18_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_17_8__sc-172j5qh-6"
55
+ componentId: "core-12_18_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_17_8__sc-172j5qh-7"
73
+ componentId: "core-12_18_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_17_8__sc-172j5qh-8"
81
+ componentId: "core-12_18_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_17_8__sc-12icguw-0"
24
+ componentId: "core-12_18_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_17_8__sc-12icguw-1"
30
+ componentId: "core-12_18_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_17_8__sc-12icguw-2"
48
+ componentId: "core-12_18_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_17_8__sc-12icguw-3"
52
+ componentId: "core-12_18_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_17_8__sc-12icguw-4"
56
+ componentId: "core-12_18_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
@@ -12,37 +12,19 @@ var radiusMap = {
12
12
  };
13
13
  var smallSizes = ['xs', 'sm'];
14
14
  export var defaultSpinnerSize = 'lg';
15
-
16
- /**
17
-
18
- Spinners indicate a loading state on either a full page or smaller component,
19
- like a menu, select or button.
20
-
21
- @since 10.19.0
22
-
23
- @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-spinner--demo)
24
-
25
- @see [Design Guidelines](https://design.procore.com/spinner)
26
-
27
- */
28
- export var Spinner = /*#__PURE__*/React.forwardRef(function Spinner(_ref, ref) {
29
- var children = _ref.children,
30
- _ref$className = _ref.className,
15
+ var Circle = /*#__PURE__*/React.forwardRef(function Circle(_ref, ref) {
16
+ var _ref$className = _ref.className,
31
17
  className = _ref$className === void 0 ? '' : _ref$className,
32
18
  color = _ref.color,
33
- label = _ref.label,
34
19
  _ref$loading = _ref.loading,
35
20
  loading = _ref$loading === void 0 ? false : _ref$loading,
21
+ mountTime = _ref.mountTime,
36
22
  _ref$size = _ref.size,
37
23
  size = _ref$size === void 0 ? defaultSpinnerSize : _ref$size,
38
24
  _ref$variant = _ref.variant,
39
- variant = _ref$variant === void 0 ? 'default' : _ref$variant,
40
- _ref$centered = _ref.centered,
41
- centered = _ref$centered === void 0 ? false : _ref$centered,
42
- props = _objectWithoutProperties(_ref, _excluded);
43
- var mountTime = React.useRef(Date.now());
44
- var circle = /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
45
- className: !children ? className : '',
25
+ variant = _ref$variant === void 0 ? 'default' : _ref$variant;
26
+ return /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
27
+ className: className,
46
28
  $color: color,
47
29
  $size: size,
48
30
  $variant: variant,
@@ -50,21 +32,63 @@ export var Spinner = /*#__PURE__*/React.forwardRef(function Spinner(_ref, ref) {
50
32
  }, /*#__PURE__*/React.createElement(StyledSpinnerSVG, {
51
33
  viewBox: "0 0 48 48",
52
34
  xmlns: "http://www.w3.org/2000/svg",
53
- $mountTime: mountTime.current
35
+ $animate: loading,
36
+ $mountTime: mountTime
54
37
  }, /*#__PURE__*/React.createElement(StyledCircle, {
55
38
  cx: "24",
56
39
  cy: "24",
57
40
  r: radiusMap[size],
58
- $mountTime: mountTime.current
41
+ $animate: loading,
42
+ $mountTime: mountTime
59
43
  })));
44
+ });
45
+
46
+ /**
47
+
48
+ Spinners indicate a loading state on either a full page or smaller component,
49
+ like a menu, select or button.
50
+
51
+ @since 10.19.0
52
+
53
+ @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-spinner--demo)
54
+
55
+ @see [Design Guidelines](https://design.procore.com/spinner)
56
+
57
+ */
58
+ export var Spinner = /*#__PURE__*/React.forwardRef(function Spinner(props, ref) {
59
+ var children = props.children,
60
+ _props$className = props.className,
61
+ className = _props$className === void 0 ? '' : _props$className,
62
+ color = props.color,
63
+ label = props.label,
64
+ _props$loading = props.loading,
65
+ loading = _props$loading === void 0 ? false : _props$loading,
66
+ _props$size = props.size,
67
+ size = _props$size === void 0 ? defaultSpinnerSize : _props$size,
68
+ _props$variant = props.variant,
69
+ variant = _props$variant === void 0 ? 'default' : _props$variant,
70
+ _props$centered = props.centered,
71
+ centered = _props$centered === void 0 ? false : _props$centered,
72
+ rest = _objectWithoutProperties(props, _excluded);
73
+ var mountTime = React.useRef(Date.now());
60
74
  if (!children) {
61
- return circle;
75
+ // We are preserving the current behavior of the Spinner component,
76
+ // where the loading prop does not apply when no children are passed.
77
+ return /*#__PURE__*/React.createElement(Circle, _extends({}, props, {
78
+ loading: true,
79
+ mountTime: mountTime.current,
80
+ ref: ref
81
+ }));
62
82
  }
63
83
  return /*#__PURE__*/React.createElement(StyledSpinnerOverlayContainer, _extends({
64
84
  $loading: loading,
65
85
  className: className,
66
86
  $centered: centered
67
- }, props), /*#__PURE__*/React.createElement(StyledSpinnerOverlay, null), /*#__PURE__*/React.createElement(StyledSpinnerContainerWithLabel, null, circle, !smallSizes.includes(size) && /*#__PURE__*/React.createElement(StyledSpinnerOverlayLabel, null, label)), children);
87
+ }, rest), /*#__PURE__*/React.createElement(StyledSpinnerOverlay, null), /*#__PURE__*/React.createElement(StyledSpinnerContainerWithLabel, null, /*#__PURE__*/React.createElement(Circle, _extends({}, props, {
88
+ className: "",
89
+ mountTime: mountTime.current,
90
+ ref: ref
91
+ })), !smallSizes.includes(size) && /*#__PURE__*/React.createElement(StyledSpinnerOverlayLabel, null, label)), children);
68
92
  });
69
93
  Spinner.displayName = 'Spinner';
70
94
  //# sourceMappingURL=Spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","names":["React","StyledCircle","StyledSpinnerContainer","StyledSpinnerContainerWithLabel","StyledSpinnerOverlay","StyledSpinnerOverlayContainer","StyledSpinnerOverlayLabel","StyledSpinnerSVG","radiusMap","xs","sm","md","lg","smallSizes","defaultSpinnerSize","Spinner","forwardRef","_ref","ref","children","_ref$className","className","color","label","_ref$loading","loading","_ref$size","size","_ref$variant","variant","_ref$centered","centered","props","_objectWithoutProperties","_excluded","mountTime","useRef","Date","now","circle","createElement","$color","$size","$variant","viewBox","xmlns","$mountTime","current","cx","cy","r","_extends","$loading","$centered","includes","displayName"],"sources":["../../src/Spinner/Spinner.tsx"],"sourcesContent":["import React from 'react'\nimport {\n StyledCircle,\n StyledSpinnerContainer,\n StyledSpinnerContainerWithLabel,\n StyledSpinnerOverlay,\n StyledSpinnerOverlayContainer,\n StyledSpinnerOverlayLabel,\n StyledSpinnerSVG,\n} from './Spinner.styles'\nimport type { SpinnerProps, SpinnerSize } from './Spinner.types'\n\nconst radiusMap: Record<SpinnerSize, number> = {\n xs: 18.5,\n sm: 18,\n md: 20,\n lg: 20.5,\n}\n\nconst smallSizes: SpinnerSize[] = ['xs', 'sm']\n\nexport const defaultSpinnerSize: SpinnerSize = 'lg'\n\n/**\n\n Spinners indicate a loading state on either a full page or smaller component,\n like a menu, select or button.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-spinner--demo)\n\n @see [Design Guidelines](https://design.procore.com/spinner)\n\n */\nexport const Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n function Spinner(\n {\n children,\n className = '',\n color,\n label,\n loading = false,\n size = defaultSpinnerSize,\n variant = 'default',\n centered = false,\n ...props\n },\n ref\n ) {\n const mountTime = React.useRef(Date.now())\n\n const circle = (\n <StyledSpinnerContainer\n className={!children ? className : ''}\n $color={color}\n $size={size}\n $variant={variant}\n ref={ref}\n >\n <StyledSpinnerSVG\n viewBox=\"0 0 48 48\"\n xmlns=\"http://www.w3.org/2000/svg\"\n $mountTime={mountTime.current}\n >\n <StyledCircle\n cx=\"24\"\n cy=\"24\"\n r={radiusMap[size]}\n $mountTime={mountTime.current}\n />\n </StyledSpinnerSVG>\n </StyledSpinnerContainer>\n )\n\n if (!children) {\n return circle\n }\n\n return (\n <StyledSpinnerOverlayContainer\n $loading={loading}\n className={className}\n $centered={centered}\n {...props}\n >\n <StyledSpinnerOverlay />\n <StyledSpinnerContainerWithLabel>\n {circle}\n {!smallSizes.includes(size) && (\n <StyledSpinnerOverlayLabel>{label}</StyledSpinnerOverlayLabel>\n )}\n </StyledSpinnerContainerWithLabel>\n {children}\n </StyledSpinnerOverlayContainer>\n )\n }\n)\n\nSpinner.displayName = 'Spinner'\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,YAAY,EACZC,sBAAsB,EACtBC,+BAA+B,EAC/BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,yBAAyB,EACzBC,gBAAgB,QACX,kBAAkB;AAGzB,IAAMC,SAAsC,GAAG;EAC7CC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE;AACN,CAAC;AAED,IAAMC,UAAyB,GAAG,CAAC,I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IACfqC,OAAO,EAAC,WAAW;IACnBC,KAAK,EAAC,4BAA4B;IAClCC,UAAU,EAAEX,SAAS,CAACY;EAAQ,gBAE9B/C,KAAA,CAAAwC,aAAA,CAACvC,YAAY;IACX+C,EAAE,EAAC,IAAI;IACPC,EAAE,EAAC,IAAI;IACPC,CAAC,EAAE1C,SAAS,CAACmB,IAAI,CAAE;IACnBmB,UAAU,EAAEX,SAAS,CAACY;EAAQ,CAC/B,CACe,CACI,CACzB;EAED,IAAI,CAAC5B,QAAQ,EAAE;IACb,OAAOoB,MAAM;EACf;EAEA,oBACEvC,KAAA,CAAAwC,aAAA,CAACnC,6BAA6B,EAAA8C,QAAA;IAC5BC,QAAQ,EAAE3B,OAAQ;IAClBJ,SAAS,EAAEA,SAAU;IACrBgC,SAAS,EAAEtB;EAAS,GAChBC,KAAK,gBAEThC,KAAA,CAAAwC,aAAA,CAACpC,oBAAoB,MAAE,CAAC,eACxBJ,KAAA,CAAAwC,aAAA,CAACrC,+BAA+B,QAC7BoC,MAAM,EACN,CAAC1B,UAAU,CAACyC,QAAQ,CAAC3B,IAAI,CAAC,iBACzB3B,KAAA,CAAAwC,aAAA,CAAClC,yBAAyB,QAAEiB,KAAiC,CAEhC,CAAC,EACjCJ,QAC4B,CAAC;AAEpC,CACF,CAAC;AAEDJ,OAAO,CAACwC,WAAW,GAAG,SAAS"}
1
+ {"version":3,"file":"Spinner.js","names":["React","StyledCircle","StyledSpinnerContainer","StyledSpinnerContainerWithLabel","StyledSpinnerOverlay","StyledSpinnerOverlayContainer","StyledSpinnerOverlayLabel","StyledSpinnerSVG","radiusMap","xs","sm","md","lg","smallSizes","defaultSpinnerSize","Circle","forwardRef","_ref","ref","_ref$className","className","color","_ref$loading","loading","mountTime","_ref$size","size","_ref$variant","variant","createElement","$color","$size","$variant","viewBox","xmlns","$animate","$mountTime","cx","cy","r","Spinner","props","children","_props$className","label","_props$loading","_props$size","_props$variant","_props$centered","centered","rest","_objectWithoutProperties","_excluded","useRef","Date","now","_extends","current","$loading","$centered","includes","displayName"],"sources":["../../src/Spinner/Spinner.tsx"],"sourcesContent":["import React from 'react'\nimport {\n StyledCircle,\n StyledSpinnerContainer,\n StyledSpinnerContainerWithLabel,\n StyledSpinnerOverlay,\n StyledSpinnerOverlayContainer,\n StyledSpinnerOverlayLabel,\n StyledSpinnerSVG,\n} from './Spinner.styles'\nimport type { SpinnerProps, SpinnerSize } from './Spinner.types'\n\nconst radiusMap: Record<SpinnerSize, number> = {\n xs: 18.5,\n sm: 18,\n md: 20,\n lg: 20.5,\n}\n\nconst smallSizes: SpinnerSize[] = ['xs', 'sm']\n\nexport const defaultSpinnerSize: SpinnerSize = 'lg'\n\nconst Circle = React.forwardRef<\n HTMLDivElement,\n SpinnerProps & {\n mountTime: number\n }\n>(function Circle(\n {\n className = '',\n color,\n loading = false,\n mountTime,\n size = defaultSpinnerSize,\n variant = 'default',\n },\n ref\n) {\n return (\n <StyledSpinnerContainer\n className={className}\n $color={color}\n $size={size}\n $variant={variant}\n ref={ref}\n >\n <StyledSpinnerSVG\n viewBox=\"0 0 48 48\"\n xmlns=\"http://www.w3.org/2000/svg\"\n $animate={loading}\n $mountTime={mountTime}\n >\n <StyledCircle\n cx=\"24\"\n cy=\"24\"\n r={radiusMap[size]}\n $animate={loading}\n $mountTime={mountTime}\n />\n </StyledSpinnerSVG>\n </StyledSpinnerContainer>\n )\n})\n\n/**\n\n Spinners indicate a loading state on either a full page or smaller component,\n like a menu, select or button.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-spinner--demo)\n\n @see [Design Guidelines](https://design.procore.com/spinner)\n\n */\nexport const Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n function Spinner(props, ref) {\n const {\n children,\n className = '',\n color,\n label,\n loading = false,\n size = defaultSpinnerSize,\n variant = 'default',\n centered = false,\n ...rest\n } = props\n const mountTime = React.useRef(Date.now())\n\n if (!children) {\n // We are preserving the current behavior of the Spinner component,\n // where the loading prop does not apply when no children are passed.\n return (\n <Circle {...props} loading mountTime={mountTime.current} ref={ref} />\n )\n }\n\n return (\n <StyledSpinnerOverlayContainer\n $loading={loading}\n className={className}\n $centered={centered}\n {...rest}\n >\n <StyledSpinnerOverlay />\n <StyledSpinnerContainerWithLabel>\n <Circle\n {...props}\n className=\"\"\n mountTime={mountTime.current}\n ref={ref}\n />\n {!smallSizes.includes(size) && (\n <StyledSpinnerOverlayLabel>{label}</StyledSpinnerOverlayLabel>\n )}\n </StyledSpinnerContainerWithLabel>\n {children}\n </StyledSpinnerOverlayContainer>\n )\n }\n)\n\nSpinner.displayName = 'Spinner'\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,YAAY,EACZC,sBAAsB,EACtBC,+BAA+B,EAC/BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,yBAAyB,EACzBC,gBAAgB,QACX,kBAAkB;AAGzB,IAAMC,SAAsC,GAAG;EAC7CC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE;AACN,CAAC;AAED,IAAMC,UAAyB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;AAE9C,OAAO,IAAMC,kBAA+B,GAAG,IAAI;AAEnD,IAAMC,MAAM,gBAAGf,KAAK,CAACgB,UAAU,CAK7B,SAASD,MAAMA,CAAAE,IAAA,EASfC,GAAG,EACH;EAAA,IAAAC,cAAA,GAAAF,IAAA,CAREG,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IACdE,KAAK,GAAAJ,IAAA,CAALI,KAAK;IAAAC,YAAA,GAAAL,IAAA,CACLM,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,KAAK,GAAAA,YAAA;IACfE,SAAS,GAAAP,IAAA,CAATO,SAAS;IAAAC,SAAA,GAAAR,IAAA,CACTS,IAAI;IAAJA,IAAI,GAAAD,SAAA,cAAGX,kBAAk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 +1,7 @@
1
1
  import type { Color } from '../_styles/colors';
2
2
  import type { SpinnerSize, SpinnerVariant } from './Spinner.types';
3
3
  declare type SyncAnimationProps = {
4
+ $animate: boolean;
4
5
  $mountTime: number;
5
6
  };
6
7
  export declare const StyledCircle: import("styled-components").StyledComponent<"circle", any, SyncAnimationProps, never>;
@@ -10,10 +10,12 @@ 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_17_8__sc-1igww3-0"
14
- })(["animation:", " ", "ms ease-in-out ", "ms infinite;stroke-linecap:round;"], dash, duration, function (p) {
15
- var animationDelay = -(p.$mountTime % duration);
16
- return animationDelay;
13
+ componentId: "core-12_18_0__sc-1igww3-0"
14
+ })(["", " stroke-linecap:round;"], function (p) {
15
+ if (p.$animate) {
16
+ var animationDelay = -(p.$mountTime % duration);
17
+ return css(["animation:", " ", "ms ease-in-out ", "ms infinite;"], dash, duration, animationDelay);
18
+ }
17
19
  });
18
20
  export var spinnerDimensions = {
19
21
  xs: spacing.md,
@@ -49,32 +51,34 @@ function getStrokeColor(_ref2) {
49
51
  }
50
52
  export var StyledSpinnerContainer = /*#__PURE__*/styled.div.withConfig({
51
53
  displayName: "StyledSpinnerContainer",
52
- componentId: "core-12_17_8__sc-1igww3-1"
54
+ componentId: "core-12_18_0__sc-1igww3-1"
53
55
  })(["border-radius:100%;box-sizing:border-box;display:block;flex-shrink:0;position:relative;", " ", "{", "}"], getHeightWidthStroke, StyledCircle, getStrokeColor);
54
56
  export var StyledSpinnerOverlayLabel = /*#__PURE__*/styled.span.withConfig({
55
57
  displayName: "StyledSpinnerOverlayLabel",
56
- componentId: "core-12_17_8__sc-1igww3-2"
58
+ componentId: "core-12_18_0__sc-1igww3-2"
57
59
  })(["", " color:", ";display:block;min-height:20px;padding-top:", "px;text-align:center;transition:opacity ", ";"], getTypographyIntent('body'), colors.gray15, spacing.md, transition);
58
60
  var rotate = /*#__PURE__*/keyframes(["to{transform:rotate(360deg);}"]);
59
61
  export var StyledSpinnerSVG = /*#__PURE__*/styled.svg.withConfig({
60
62
  displayName: "StyledSpinnerSVG",
61
- componentId: "core-12_17_8__sc-1igww3-3"
62
- })(["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) {
63
- var animationDelay = -(p.$mountTime % (duration - durationOffset));
64
- return animationDelay;
63
+ componentId: "core-12_18_0__sc-1igww3-3"
64
+ })(["", " fill:none;height:100%;left:0;margin:auto;position:absolute;right:0;top:0;width:100%;z-index:2;"], function (p) {
65
+ if (p.$animate) {
66
+ var animationDelay = -(p.$mountTime % (duration - durationOffset));
67
+ return css(["animation:", " ", "ms linear ", "ms infinite;"], rotate, duration - durationOffset, animationDelay);
68
+ }
65
69
  });
66
70
  var startsWithNoInteraction = /*#__PURE__*/css(["opacity:0;pointer-events:none;transition:opacity ", ";"], transition);
67
71
  export var StyledSpinnerOverlay = /*#__PURE__*/styled.div.withConfig({
68
72
  displayName: "StyledSpinnerOverlay",
69
- componentId: "core-12_17_8__sc-1igww3-4"
73
+ componentId: "core-12_18_0__sc-1igww3-4"
70
74
  })(["", ";background-color:", ";bottom:0;left:0;position:absolute;right:0;top:0;z-index:", ";"], startsWithNoInteraction, colors.white, zOverlay);
71
75
  export var StyledSpinnerContainerWithLabel = /*#__PURE__*/styled.div.withConfig({
72
76
  displayName: "StyledSpinnerContainerWithLabel",
73
- componentId: "core-12_17_8__sc-1igww3-5"
77
+ componentId: "core-12_18_0__sc-1igww3-5"
74
78
  })(["", ";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);
75
79
  export var StyledSpinnerOverlayContainer = /*#__PURE__*/styled.div.withConfig({
76
80
  displayName: "StyledSpinnerOverlayContainer",
77
- componentId: "core-12_17_8__sc-1igww3-6"
81
+ componentId: "core-12_18_0__sc-1igww3-6"
78
82
  })(["min-height:150px;position:relative;", " ", ""], function (_ref3) {
79
83
  var $loading = _ref3.$loading;
80
84
  if ($loading) {
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.styles.js","names":["styled","css","keyframes","getTypographyIntent","colors","spacing","duration","durationOffset","transition","zContainer","zOverlay","dash","StyledCircle","circle","withConfig","displayName","componentId","p","animationDelay","$mountTime","spinnerDimensions","xs","md","sm","lg","xl","spinnerColorMap","button","light","focus","spinnerStroke","getHeightWidthStroke","_ref","$size","dimension","strokeWidth","getStrokeColor","_ref2","$color","$variant","StyledSpinnerContainer","div","StyledSpinnerOverlayLabel","span","gray15","rotate","StyledSpinnerSVG","svg","startsWithNoInteraction","StyledSpinnerOverlay","white","StyledSpinnerContainerWithLabel","StyledSpinnerOverlayContainer","_ref3","$loading","_ref4","$centered"],"sources":["../../src/Spinner/Spinner.styles.ts"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components'\nimport { getTypographyIntent } from '../Typography'\nimport type { Color } from '../_styles/colors'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\nimport type { SpinnerSize, SpinnerVariant } from './Spinner.types'\n\nconst duration = 1500\n\nconst durationOffset = 500\n\nconst transition = '0.5s ease'\n\nconst zContainer = 3\n\nconst zOverlay = 2\n\nconst dash = keyframes`\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n`\n\ntype SyncAnimationProps = {\n $mountTime: number\n}\n\nexport const StyledCircle = styled.circle<SyncAnimationProps>`\n animation: ${dash} ${duration}ms ease-in-out\n ${(p) => {\n const animationDelay = -(p.$mountTime % duration)\n return animationDelay\n }}ms\n infinite;\n stroke-linecap: round;\n`\nexport const spinnerDimensions: Record<SpinnerSize, number> = {\n xs: spacing.md,\n sm: spacing.lg,\n md: spacing.xl,\n lg: 48,\n}\n\nconst spinnerColorMap: Record<SpinnerVariant, Color> = {\n default: 'gray60',\n button: 'gray15',\n light: 'white',\n focus: 'blue50',\n}\n\nconst spinnerStroke: Record<SpinnerSize, number> = {\n xs: 10,\n sm: 8,\n md: 8,\n lg: 6,\n}\n\nfunction getHeightWidthStroke({ $size }: { $size: SpinnerSize }) {\n const dimension = spinnerDimensions[$size]\n const strokeWidth = spinnerStroke[$size]\n\n return css`\n height: ${dimension}px;\n width: ${dimension}px;\n stroke-width: ${strokeWidth}px;\n `\n}\n\nfunction getStrokeColor({\n $color,\n $variant,\n}: {\n $color?: Color\n $variant: SpinnerVariant\n}) {\n if ($color) {\n return css`\n stroke: ${colors[$color]};\n `\n }\n\n return css`\n stroke: ${colors[spinnerColorMap[$variant]]};\n `\n}\n\ninterface StyledSpinnerContainerProps {\n $color?: Color\n $size: SpinnerSize\n $variant: SpinnerVariant\n}\n\nexport const StyledSpinnerContainer = styled.div<StyledSpinnerContainerProps>`\n border-radius: 100%;\n box-sizing: border-box;\n display: block;\n flex-shrink: 0;\n position: relative;\n\n ${getHeightWidthStroke}\n\n ${StyledCircle} {\n ${getStrokeColor}\n }\n`\n\nexport const StyledSpinnerOverlayLabel = styled.span`\n ${getTypographyIntent('body')}\n color: ${colors.gray15};\n\n display: block;\n min-height: 20px;\n padding-top: ${spacing.md}px;\n text-align: center;\n transition: opacity ${transition};\n`\n\nconst rotate = keyframes`\n to {\n transform: rotate(360deg);\n }\n`\n\nexport const StyledSpinnerSVG = styled.svg<SyncAnimationProps>`\n animation: ${rotate} ${duration - durationOffset}ms linear\n ${(p) => {\n const animationDelay = -(p.$mountTime % (duration - durationOffset))\n return animationDelay\n }}ms\n infinite;\n fill: none;\n height: 100%;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 2;\n`\n\nconst startsWithNoInteraction = css`\n opacity: 0;\n pointer-events: none;\n transition: opacity ${transition};\n`\n\nexport const StyledSpinnerOverlay = styled.div`\n ${startsWithNoInteraction};\n background-color: ${colors.white};\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: ${zOverlay};\n`\n\nexport const StyledSpinnerContainerWithLabel = styled.div`\n ${startsWithNoInteraction};\n align-items: center;\n display: flex;\n flex-direction: column;\n height: 100%;\n max-height: 400px;\n justify-content: center;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: ${zContainer};\n`\n\nexport const StyledSpinnerOverlayContainer = styled.div<{\n $loading: boolean\n $centered: boolean\n}>`\n min-height: 150px;\n position: relative;\n\n ${({ $loading }) => {\n if ($loading) {\n return css`\n ${StyledSpinnerContainerWithLabel}, ${StyledSpinnerOverlay} {\n opacity: 1;\n pointer-events: auto;\n }\n `\n }\n }}\n\n ${({ $centered }) => {\n if ($centered) {\n return css`\n ${StyledSpinnerContainerWithLabel} {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n `\n }\n }}\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAC1D,SAASC,mBAAmB,QAAQ,eAAe;AAEnD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,IAAMC,QAAQ,GAAG,IAAI;AAErB,IAAMC,cAAc,GAAG,GAAG;AAE1B,IAAMC,UAAU,GAAG,WAAW;AAE9B,IAAMC,UAAU,GAAG,CAAC;AAEpB,IAAMC,QAAQ,GAAG,CAAC;AAElB,IAAMC,IAAI,gBAAGT,SAAS,6JAarB;AAMD,OAAO,IAAMU,YAAY,gBAAGZ,MAAM,CAACa,MAAM,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gFAC1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KF,oBAAoB;EAK9D;AACF,CAAC,EAEC,UAAAM,KAAA,EAAmB;EAAA,IAAhBC,SAAS,GAAAD,KAAA,CAATC,SAAS;EACZ,IAAIA,SAAS,EAAE;IACb,OAAOvD,GAAG,kEACNkD,+BAA+B;EAMrC;AACF,CAAC,CACF"}
1
+ {"version":3,"file":"Spinner.styles.js","names":["styled","css","keyframes","getTypographyIntent","colors","spacing","duration","durationOffset","transition","zContainer","zOverlay","dash","StyledCircle","circle","withConfig","displayName","componentId","p","$animate","animationDelay","$mountTime","spinnerDimensions","xs","md","sm","lg","xl","spinnerColorMap","button","light","focus","spinnerStroke","getHeightWidthStroke","_ref","$size","dimension","strokeWidth","getStrokeColor","_ref2","$color","$variant","StyledSpinnerContainer","div","StyledSpinnerOverlayLabel","span","gray15","rotate","StyledSpinnerSVG","svg","startsWithNoInteraction","StyledSpinnerOverlay","white","StyledSpinnerContainerWithLabel","StyledSpinnerOverlayContainer","_ref3","$loading","_ref4","$centered"],"sources":["../../src/Spinner/Spinner.styles.ts"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components'\nimport { getTypographyIntent } from '../Typography'\nimport type { Color } from '../_styles/colors'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\nimport type { SpinnerSize, SpinnerVariant } from './Spinner.types'\n\nconst duration = 1500\n\nconst durationOffset = 500\n\nconst transition = '0.5s ease'\n\nconst zContainer = 3\n\nconst zOverlay = 2\n\nconst dash = keyframes`\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n`\n\ntype SyncAnimationProps = {\n $animate: boolean\n $mountTime: number\n}\nexport const StyledCircle = styled.circle<SyncAnimationProps>`\n ${(p) => {\n if (p.$animate) {\n const animationDelay = -(p.$mountTime % duration)\n return css`\n animation: ${dash} ${duration}ms ease-in-out ${animationDelay}ms\n infinite;\n `\n }\n }}\n stroke-linecap: round;\n`\nexport const spinnerDimensions: Record<SpinnerSize, number> = {\n xs: spacing.md,\n sm: spacing.lg,\n md: spacing.xl,\n lg: 48,\n}\n\nconst spinnerColorMap: Record<SpinnerVariant, Color> = {\n default: 'gray60',\n button: 'gray15',\n light: 'white',\n focus: 'blue50',\n}\n\nconst spinnerStroke: Record<SpinnerSize, number> = {\n xs: 10,\n sm: 8,\n md: 8,\n lg: 6,\n}\n\nfunction getHeightWidthStroke({ $size }: { $size: SpinnerSize }) {\n const dimension = spinnerDimensions[$size]\n const strokeWidth = spinnerStroke[$size]\n\n return css`\n height: ${dimension}px;\n width: ${dimension}px;\n stroke-width: ${strokeWidth}px;\n `\n}\n\nfunction getStrokeColor({\n $color,\n $variant,\n}: {\n $color?: Color\n $variant: SpinnerVariant\n}) {\n if ($color) {\n return css`\n stroke: ${colors[$color]};\n `\n }\n\n return css`\n stroke: ${colors[spinnerColorMap[$variant]]};\n `\n}\n\ninterface StyledSpinnerContainerProps {\n $color?: Color\n $size: SpinnerSize\n $variant: SpinnerVariant\n}\n\nexport const StyledSpinnerContainer = styled.div<StyledSpinnerContainerProps>`\n border-radius: 100%;\n box-sizing: border-box;\n display: block;\n flex-shrink: 0;\n position: relative;\n\n ${getHeightWidthStroke}\n\n ${StyledCircle} {\n ${getStrokeColor}\n }\n`\n\nexport const StyledSpinnerOverlayLabel = styled.span`\n ${getTypographyIntent('body')}\n color: ${colors.gray15};\n\n display: block;\n min-height: 20px;\n padding-top: ${spacing.md}px;\n text-align: center;\n transition: opacity ${transition};\n`\n\nconst rotate = keyframes`\n to {\n transform: rotate(360deg);\n }\n`\n\nexport const StyledSpinnerSVG = styled.svg<SyncAnimationProps>`\n ${(p) => {\n if (p.$animate) {\n const animationDelay = -(p.$mountTime % (duration - durationOffset))\n return css`\n animation: ${rotate} ${duration - durationOffset}ms linear\n ${animationDelay}ms infinite;\n `\n }\n }}\n fill: none;\n height: 100%;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 2;\n`\n\nconst startsWithNoInteraction = css`\n opacity: 0;\n pointer-events: none;\n transition: opacity ${transition};\n`\n\nexport const StyledSpinnerOverlay = styled.div`\n ${startsWithNoInteraction};\n background-color: ${colors.white};\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: ${zOverlay};\n`\n\nexport const StyledSpinnerContainerWithLabel = styled.div`\n ${startsWithNoInteraction};\n align-items: center;\n display: flex;\n flex-direction: column;\n height: 100%;\n max-height: 400px;\n justify-content: center;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: ${zContainer};\n`\n\nexport const StyledSpinnerOverlayContainer = styled.div<{\n $loading: boolean\n $centered: boolean\n}>`\n min-height: 150px;\n position: relative;\n\n ${({ $loading }) => {\n if ($loading) {\n return css`\n ${StyledSpinnerContainerWithLabel}, ${StyledSpinnerOverlay} {\n opacity: 1;\n pointer-events: auto;\n }\n `\n }\n }}\n\n ${({ $centered }) => {\n if ($centered) {\n return css`\n ${StyledSpinnerContainerWithLabel} {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n `\n }\n }}\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAC1D,SAASC,mBAAmB,QAAQ,eAAe;AAEnD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,IAAMC,QAAQ,GAAG,IAAI;AAErB,IAAMC,cAAc,GAAG,GAAG;AAE1B,IAAMC,UAAU,GAAG,WAAW;AAE9B,IAAMC,UAAU,GAAG,CAAC;AAEpB,IAAMC,QAAQ,GAAG,CAAC;AAElB,IAAMC,IAAI,gBAAGT,SAAS,6JAarB;AAMD,OAAO,IAAMU,YAAY,gBAAGZ,MAAM,CAACa,MAAM,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,mCACrC,UAACC,CAA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C,QAAQ,GAAAD,KAAA,CAARC,QAAQ;EACX,IAAIA,QAAQ,EAAE;IACZ,OAAOtD,GAAG,gDACNmD,+BAA+B,EAAKF,oBAAoB;EAK9D;AACF,CAAC,EAEC,UAAAM,KAAA,EAAmB;EAAA,IAAhBC,SAAS,GAAAD,KAAA,CAATC,SAAS;EACZ,IAAIA,SAAS,EAAE;IACb,OAAOxD,GAAG,kEACNmD,+BAA+B;EAMrC;AACF,CAAC,CACF"}
@@ -6,18 +6,18 @@ import { spacing } from '../_styles/spacing';
6
6
  var MIN_CARD_HEIGHT = 364;
7
7
  export var StyledSplitViewCardContainer = /*#__PURE__*/styled.div.withConfig({
8
8
  displayName: "StyledSplitViewCardContainer",
9
- componentId: "core-12_17_8__sc-9hrkda-0"
9
+ componentId: "core-12_18_0__sc-9hrkda-0"
10
10
  })(["display:grid;grid-template-columns:1fr auto;border-radius:", "px;box-shadow:0 0 4px 0 rgba(0,0,0,0.25);min-height:", "px;position:relative;width:100%;@media (max-width:", "){box-shadow:none;display:flex;flex-direction:column;width:100%;}"], spacing.sm, MIN_CARD_HEIGHT, breakpointMinWidthValues.tabletMd);
11
11
  export var StyledSplitViewCardMain = /*#__PURE__*/styled.div.withConfig({
12
12
  displayName: "StyledSplitViewCardMain",
13
- componentId: "core-12_17_8__sc-9hrkda-1"
13
+ componentId: "core-12_18_0__sc-9hrkda-1"
14
14
  })(["background-color:", ";border-top-left-radius:", "px;border-bottom-left-radius:", "px;position:relative;width:60%;transition:all ease 500ms;@media (max-width:", "){box-shadow:0 0 4px 0 rgba(0,0,0,0.25);border-radius:", "px;margin-bottom:", "px;width:100%;}", ""], colors.white, spacing.sm, spacing.sm, breakpointMinWidthValues.tabletMd, spacing.sm, spacing.sm, function (_ref) {
15
15
  var $open = _ref.$open;
16
16
  return !$open && css(["border-radius:", "px;width:100%;"], spacing.sm);
17
17
  });
18
18
  export var StyledSplitViewCardAside = /*#__PURE__*/styled.div.withConfig({
19
19
  displayName: "StyledSplitViewCardAside",
20
- componentId: "core-12_17_8__sc-9hrkda-2"
20
+ componentId: "core-12_18_0__sc-9hrkda-2"
21
21
  })(["background-color:", ";border-left:1px solid ", ";border-top-right-radius:", "px;border-bottom-right-radius:", "px;display:flex;flex-direction:column;height:100%;width:40%;min-height:", "px;min-width:400px;transition:all ease 500ms;z-index:2;position:absolute;top:0;right:0;@media screen and (max-width:", "px){min-width:unset;}@media (max-width:", "){box-shadow:0 0 4px 0 rgba(0,0,0,0.25);border:none;border-radius:", "px;position:relative;width:100%;}", " ", ""], colors.white, colors.gray85, spacing.sm, spacing.sm, MIN_CARD_HEIGHT, breakpointRawMinWidthValues.tabletSm, breakpointMinWidthValues.tabletMd, spacing.sm, function (_ref2) {
22
22
  var $open = _ref2.$open;
23
23
  return !$open && css(["border:none;border-radius:", "px;overflow:hidden !important;@media (min-width:", "){min-width:0;width:0 !important;}@media (max-width:", "){display:none;}"], spacing.sm, breakpointMinWidthValues.tabletMd, breakpointMinWidthValues.tabletMd);
@@ -27,23 +27,23 @@ export var StyledSplitViewCardAside = /*#__PURE__*/styled.div.withConfig({
27
27
  });
28
28
  export var StyledSplitViewCardHeading = /*#__PURE__*/styled(H2).withConfig({
29
29
  displayName: "StyledSplitViewCardHeading",
30
- componentId: "core-12_17_8__sc-9hrkda-3"
30
+ componentId: "core-12_18_0__sc-9hrkda-3"
31
31
  })(["overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;"]);
32
32
  export var StyledSplitViewCardTitle = /*#__PURE__*/styled.div.withConfig({
33
33
  displayName: "StyledSplitViewCardTitle",
34
- componentId: "core-12_17_8__sc-9hrkda-4"
34
+ componentId: "core-12_18_0__sc-9hrkda-4"
35
35
  })(["display:flex;align-items:center;justify-content:space-between;margin-bottom:", "px;min-height:36px;"], spacing.sm);
36
36
  export var StyledSplitViewCardHeader = /*#__PURE__*/styled.div.withConfig({
37
37
  displayName: "StyledSplitViewCardHeader",
38
- componentId: "core-12_17_8__sc-9hrkda-5"
38
+ componentId: "core-12_18_0__sc-9hrkda-5"
39
39
  })(["border-bottom:1px solid ", ";display:flex;flex-direction:column;padding:", "px ", "px 0;"], colors.gray85, spacing.lg, spacing.lg);
40
40
  export var StyledSplitViewCardBody = /*#__PURE__*/styled.div.withConfig({
41
41
  displayName: "StyledSplitViewCardBody",
42
- componentId: "core-12_17_8__sc-9hrkda-6"
42
+ componentId: "core-12_18_0__sc-9hrkda-6"
43
43
  })(["display:flex;flex-direction:column;flex:1;padding:", "px ", "px 0;overflow-y:auto;"], spacing.lg, spacing.lg);
44
44
  export var StyledSplitViewCardFooter = /*#__PURE__*/styled.div.withConfig({
45
45
  displayName: "StyledSplitViewCardFooter",
46
- componentId: "core-12_17_8__sc-9hrkda-7"
46
+ componentId: "core-12_18_0__sc-9hrkda-7"
47
47
  })(["display:flex;align-items:center;justify-content:flex-end;padding:", "px;", ""], spacing.lg, function (_ref4) {
48
48
  var $hasShadow = _ref4.$hasShadow;
49
49
  return $hasShadow && css(["box-shadow:0 -4px 6px 0 #0000001a;"]);
@@ -9,9 +9,9 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
9
9
  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; }
10
10
  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; }
11
11
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
12
+ import { Draggable } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration';
12
13
  import { Check, Clear as ClearIcon, Grip } from '@procore/core-icons';
13
14
  import React from 'react';
14
- import { Draggable } from 'react-beautiful-dnd';
15
15
  import { FakeCheckbox } from '../Checkbox/Checkbox';
16
16
  import { Spinner } from '../Spinner/Spinner';
17
17
  import { Token } from '../Token/Token';