@procore/core-react 12.6.0 → 12.8.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.
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.d.ts +2 -2
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Calendar/Calendar.styles.js +8 -8
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/Checkbox/CheckboxTooltip.js +1 -1
- package/dist/ContactItem/ContactItem.styles.d.ts +1 -1
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +4 -4
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/ThumbnailList/index.d.ts +1 -1
- package/dist/FileSelect/ThumbnailList/index.js.map +1 -1
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +4 -4
- package/dist/FilterToken/FilterToken.styles.js +2 -2
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +14 -14
- package/dist/Form/StyledFormikForm.styles.d.ts +1 -1
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/Form/index.d.ts +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/Form/index.js.map +1 -1
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.d.ts +3 -1
- package/dist/Modal/Modal.js +26 -12
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.d.ts +10 -3
- package/dist/Modal/Modal.styles.js +82 -26
- package/dist/Modal/Modal.styles.js.map +1 -1
- package/dist/Modal/Modal.types.d.ts +24 -0
- package/dist/Modal/Modal.types.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +6 -6
- package/dist/NextListPage/NextListPage.d.ts +24 -0
- package/dist/NextListPage/NextListPage.js +44 -0
- package/dist/NextListPage/NextListPage.js.map +1 -0
- package/dist/NextListPage/NextListPage.types.d.ts +3 -0
- package/dist/NextListPage/NextListPage.types.js +2 -0
- package/dist/NextListPage/NextListPage.types.js.map +1 -0
- package/dist/NextListPage/index.d.ts +2 -0
- package/dist/NextListPage/index.js +2 -0
- package/dist/NextListPage/index.js.map +1 -0
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/PageLayout/PageLayout.styles.js +15 -15
- package/dist/Pagination/Pagination.styles.d.ts +2 -2
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.d.ts +1 -1
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +2 -2
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +6 -6
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.d.ts +1 -1
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.context.d.ts +7 -0
- package/dist/SplitViewCard/SplitViewCard.context.js +35 -0
- package/dist/SplitViewCard/SplitViewCard.context.js.map +1 -0
- package/dist/SplitViewCard/SplitViewCard.d.ts +43 -0
- package/dist/SplitViewCard/SplitViewCard.js +129 -0
- package/dist/SplitViewCard/SplitViewCard.js.map +1 -0
- package/dist/SplitViewCard/SplitViewCard.styles.d.ts +10 -0
- package/dist/SplitViewCard/SplitViewCard.styles.js +39 -0
- package/dist/SplitViewCard/SplitViewCard.styles.js.map +1 -0
- package/dist/SplitViewCard/SplitViewCard.types.d.ts +25 -0
- package/dist/SplitViewCard/SplitViewCard.types.js +2 -0
- package/dist/SplitViewCard/SplitViewCard.types.js.map +1 -0
- package/dist/SplitViewCard/index.d.ts +4 -0
- package/dist/SplitViewCard/index.js +4 -0
- package/dist/SplitViewCard/index.js.map +1 -0
- package/dist/SplitViewCard/useSplitViewCard.d.ts +5 -0
- package/dist/SplitViewCard/useSplitViewCard.js +14 -0
- package/dist/SplitViewCard/useSplitViewCard.js.map +1 -0
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +37 -37
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.d.ts +9 -3
- package/dist/Tabs/Tabs.js +19 -10
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.d.ts +17 -17
- package/dist/Tabs/Tabs.styles.js +116 -33
- package/dist/Tabs/Tabs.styles.js.map +1 -1
- package/dist/Tabs/Tabs.types.d.ts +22 -0
- package/dist/Tabs/Tabs.types.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditor/TextEditor.js +7 -1
- package/dist/TextEditor/TextEditor.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.js +1 -0
- package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.styles.d.ts +1 -1
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/TieredSelect/index.d.ts +1 -1
- package/dist/TieredSelect/index.js.map +1 -1
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.d.ts +1 -1
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/Tooltip/Tooltip.styles.js +2 -2
- package/dist/Tree/Tree.styles.d.ts +2 -2
- package/dist/Tree/Tree.styles.js +9 -9
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/I18n.d.ts +5 -0
- package/dist/_locales/en.json +5 -0
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +13 -13
- package/dist/_typedoc/Box/Box.types.json +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +12 -12
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
- package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
- package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +726 -726
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +4 -4
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
- package/dist/_typedoc/Modal/Modal.types.json +101 -41
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +27 -27
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +47 -47
- package/dist/_typedoc/Popover/Popover.types.json +14 -14
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +14 -14
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
- package/dist/_typedoc/Select/Select.types.json +57 -57
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/Switch/Switch.types.json +3 -3
- package/dist/_typedoc/Table/Table.types.json +99 -99
- package/dist/_typedoc/Tabs/Tabs.types.json +45 -19
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
- package/dist/_typedoc/Tile/Tile.types.json +30 -30
- package/dist/_typedoc/Title/Title.types.json +1 -1
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
- package/dist/_typedoc/Token/Token.types.json +4 -4
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
- package/dist/_typedoc/Tree/Tree.types.json +86 -86
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/deprecations.json +1 -1
- package/dist/_utils/TinyMCE.js +1 -1
- package/dist/_utils/TinyMCE.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
|
@@ -16,26 +16,45 @@ export var modalPixelWidths = {
|
|
|
16
16
|
lg: 1152,
|
|
17
17
|
xl: 1920
|
|
18
18
|
};
|
|
19
|
+
var compactModalFullscreenMaxHeight = 940;
|
|
20
|
+
var screenWidthPixelBreakpoints = {
|
|
21
|
+
mobile: {
|
|
22
|
+
small: {
|
|
23
|
+
min: 0,
|
|
24
|
+
max: 439
|
|
25
|
+
},
|
|
26
|
+
large: {
|
|
27
|
+
min: 440,
|
|
28
|
+
max: 767
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
19
32
|
export var StyledModal = /*#__PURE__*/styled.div.withConfig({
|
|
20
33
|
displayName: "StyledModal",
|
|
21
|
-
componentId: "core-
|
|
34
|
+
componentId: "core-12_8_0__sc-1ijdug2-0"
|
|
22
35
|
})(["display:flex;height:100vh;position:absolute;opacity:0;transition:0.3s opacity ease;width:100vw;z-index:0;&.", "{opacity:1;}&.", "{opacity:0;}"], fadeInClassName, fadeOutClassName);
|
|
23
36
|
export var StyledModalButtons = /*#__PURE__*/styled.div.withConfig({
|
|
24
37
|
displayName: "StyledModalButtons",
|
|
25
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_8_0__sc-1ijdug2-1"
|
|
26
39
|
})(["display:flex;flex:0 0 auto;margin-left:", "px;> * + *{margin-left:", "px;}"], spacing.lg, spacing.sm);
|
|
27
40
|
export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
|
|
28
41
|
displayName: "StyledModalContainer",
|
|
29
|
-
componentId: "core-
|
|
30
|
-
})(["display:flex;flex-direction:row;position:absolute;z-index:2;", " ", ""], function (_ref) {
|
|
31
|
-
var $
|
|
42
|
+
componentId: "core-12_8_0__sc-1ijdug2-2"
|
|
43
|
+
})(["display:flex;flex-direction:row;position:absolute;z-index:2;", " ", " ", ""], function (_ref) {
|
|
44
|
+
var $compact = _ref.$compact;
|
|
45
|
+
if (!$compact) {
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
return css(["@media (max-width:", "px) and (max-height:", "px){border-radius:0;height:100vh;width:100vw;}@media (min-width:", "px) and (max-width:", "px){max-height:calc(100vh - 24px);width:416px;}@media (min-height:", "px){height:916px;max-width:100vw;}"], screenWidthPixelBreakpoints.mobile.small.max, compactModalFullscreenMaxHeight, screenWidthPixelBreakpoints.mobile.large.min, screenWidthPixelBreakpoints.mobile.large.max, compactModalFullscreenMaxHeight + 1);
|
|
49
|
+
}, function (_ref2) {
|
|
50
|
+
var $placement = _ref2.$placement;
|
|
32
51
|
if ($placement === 'top') {
|
|
33
52
|
return css(["top:5vh;"]);
|
|
34
53
|
}
|
|
35
54
|
return css(["top:50vh;transform:translateY(-50%);"]);
|
|
36
|
-
}, function (
|
|
37
|
-
var $width =
|
|
38
|
-
$placement =
|
|
55
|
+
}, function (_ref3) {
|
|
56
|
+
var $width = _ref3.$width,
|
|
57
|
+
$placement = _ref3.$placement;
|
|
39
58
|
if ($width) {
|
|
40
59
|
return css(["left:", "px;right:", "px;margin-left:auto;margin-right:auto;max-width:", "px;", "{max-width:none;}"], modalPixelGutter, modalPixelGutter, modalPixelWidths[$width], StyledModalBody);
|
|
41
60
|
}
|
|
@@ -44,51 +63,88 @@ export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
|
|
|
44
63
|
});
|
|
45
64
|
export var StyledModalFooter = /*#__PURE__*/styled.div.withConfig({
|
|
46
65
|
displayName: "StyledModalFooter",
|
|
47
|
-
componentId: "core-
|
|
66
|
+
componentId: "core-12_8_0__sc-1ijdug2-3"
|
|
48
67
|
})(["align-items:center;display:flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;padding:", "px ", "px ", "px;"], spacing.xl, spacing.xxl, spacing.xxl);
|
|
49
68
|
export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
|
|
50
69
|
displayName: "StyledModalBody",
|
|
51
|
-
componentId: "core-
|
|
52
|
-
})(["", " box-sizing:border-box;color:", ";display:flex;flex-direction:column;
|
|
53
|
-
var noSideSpacing =
|
|
70
|
+
componentId: "core-12_8_0__sc-1ijdug2-4"
|
|
71
|
+
})(["", " box-sizing:border-box;color:", ";display:flex;flex-direction:column;overflow:auto;", " ", " > ", "{padding-left:0;padding-right:0;&:first-child > ", "{padding-top:0;}}", ""], getTypographyIntent('body'), colors.gray15, function (_ref4) {
|
|
72
|
+
var noSideSpacing = _ref4.noSideSpacing;
|
|
54
73
|
return css(["padding:", "px ", "px;"], spacing.xl, noSideSpacing ? 0 : spacing.xxl);
|
|
55
|
-
},
|
|
56
|
-
var
|
|
74
|
+
}, function (_ref5) {
|
|
75
|
+
var $compact = _ref5.$compact;
|
|
76
|
+
if (!$compact) {
|
|
77
|
+
// TODO deprecated, moving width up. delete line in breaking change
|
|
78
|
+
return css(["max-width:", ";"], modalMaxWidth);
|
|
79
|
+
}
|
|
80
|
+
return css(["padding:8px 16px;"]);
|
|
81
|
+
}, StyledSection, StyledSectionInner, function (_ref6) {
|
|
82
|
+
var isOverflowingY = _ref6.isOverflowingY;
|
|
57
83
|
return isOverflowingY && css(["& + ", "{border-top-width:1px;border-top-style:solid;border-top-color:", ";", "{border-top:none;}}"], StyledModalFooter, colors.gray85, StyledModalFooterSummary);
|
|
58
84
|
});
|
|
59
85
|
export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
|
|
60
86
|
displayName: "StyledModalContent",
|
|
61
|
-
componentId: "core-
|
|
62
|
-
})(["display:flex;flex-direction:column;max-height:90vh;overflow:hidden;width:100%;"])
|
|
87
|
+
componentId: "core-12_8_0__sc-1ijdug2-5"
|
|
88
|
+
})(["display:flex;flex-direction:column;max-height:90vh;overflow:hidden;width:100%;", ""], function (_ref7) {
|
|
89
|
+
var _ref7$$compact = _ref7.$compact,
|
|
90
|
+
$compact = _ref7$$compact === void 0 ? false : _ref7$$compact;
|
|
91
|
+
if (!$compact) {
|
|
92
|
+
return '';
|
|
93
|
+
}
|
|
94
|
+
return css(["max-height:unset;"]);
|
|
95
|
+
});
|
|
63
96
|
export var StyledModalFooterNotation = /*#__PURE__*/styled(Typography).withConfig({
|
|
64
97
|
displayName: "StyledModalFooterNotation",
|
|
65
|
-
componentId: "core-
|
|
98
|
+
componentId: "core-12_8_0__sc-1ijdug2-6"
|
|
66
99
|
})(["flex-grow:1;"]);
|
|
67
100
|
export var StyledModalHeader = /*#__PURE__*/styled.div.withConfig({
|
|
68
101
|
displayName: "StyledModalHeader",
|
|
69
|
-
componentId: "core-
|
|
70
|
-
})(["align-items:flex-start;color:", ";display:flex;flex:0 0 auto;
|
|
71
|
-
var $
|
|
102
|
+
componentId: "core-12_8_0__sc-1ijdug2-7"
|
|
103
|
+
})(["align-items:flex-start;color:", ";display:flex;flex:0 0 auto;position:relative;", " ", ""], colors.gray10, function (_ref8) {
|
|
104
|
+
var $compact = _ref8.$compact,
|
|
105
|
+
$isBodyScrolled = _ref8.$isBodyScrolled;
|
|
106
|
+
if ($compact) {
|
|
107
|
+
return css(["border-bottom:1px solid ", ";"], colors.gray85);
|
|
108
|
+
}
|
|
72
109
|
return css(["border-bottom:1px solid ", ";"], $isBodyScrolled ? colors.gray85 : 'transparent');
|
|
110
|
+
}, function (_ref9) {
|
|
111
|
+
var $compact = _ref9.$compact;
|
|
112
|
+
var spacings = "".concat(spacing.xl, "px ").concat(spacing.xxl, "px");
|
|
113
|
+
if ($compact) {
|
|
114
|
+
spacings = "".concat(spacing.md, "px ").concat(spacing.lg, "px");
|
|
115
|
+
}
|
|
116
|
+
return css(["padding:", ";"], spacings);
|
|
73
117
|
});
|
|
74
118
|
export var StyledModalHeading = /*#__PURE__*/styled.div.withConfig({
|
|
75
119
|
displayName: "StyledModalHeading",
|
|
76
|
-
componentId: "core-
|
|
77
|
-
})(["", " align-items:center;display:flex;flex:1 1 auto;min-height:36px;padding-right:", "px;"],
|
|
120
|
+
componentId: "core-12_8_0__sc-1ijdug2-8"
|
|
121
|
+
})(["", " align-items:center;display:flex;flex:1 1 auto;min-height:36px;padding-right:", "px;", ""], function (_ref10) {
|
|
122
|
+
var $compact = _ref10.$compact;
|
|
123
|
+
return getTypographyIntent($compact ? 'h3' : 'h2');
|
|
124
|
+
}, function (_ref11) {
|
|
125
|
+
var $compact = _ref11.$compact;
|
|
126
|
+
return $compact ? 36 : spacing.lg;
|
|
127
|
+
}, function (_ref12) {
|
|
128
|
+
var $compact = _ref12.$compact;
|
|
129
|
+
if (!$compact) {
|
|
130
|
+
return '';
|
|
131
|
+
}
|
|
132
|
+
return css(["min-height:unset;"]);
|
|
133
|
+
});
|
|
78
134
|
export var StyledModalCancel = /*#__PURE__*/styled.div.withConfig({
|
|
79
135
|
displayName: "StyledModalCancel",
|
|
80
|
-
componentId: "core-
|
|
136
|
+
componentId: "core-12_8_0__sc-1ijdug2-9"
|
|
81
137
|
})(["flex:0 0 auto;"]);
|
|
82
138
|
export var StyledModalScrim = /*#__PURE__*/styled.div.withConfig({
|
|
83
139
|
displayName: "StyledModalScrim",
|
|
84
|
-
componentId: "core-
|
|
140
|
+
componentId: "core-12_8_0__sc-1ijdug2-10"
|
|
85
141
|
})(["background:hsla(200,8%,10%,0.6);height:100vh;left:0;position:absolute;top:0;width:100vw;z-index:1;"]);
|
|
86
142
|
export var StyledModalWarningIcon = /*#__PURE__*/styled(Warning).withConfig({
|
|
87
143
|
displayName: "StyledModalWarningIcon",
|
|
88
|
-
componentId: "core-
|
|
144
|
+
componentId: "core-12_8_0__sc-1ijdug2-11"
|
|
89
145
|
})(["color:", ";margin-right:", "px;"], colors.yellow40, spacing.sm);
|
|
90
146
|
export var StyledModalFooterSummary = /*#__PURE__*/styled.div.withConfig({
|
|
91
147
|
displayName: "StyledModalFooterSummary",
|
|
92
|
-
componentId: "core-
|
|
148
|
+
componentId: "core-12_8_0__sc-1ijdug2-12"
|
|
93
149
|
})(["", " border-top:1px solid ", ";border-bottom:1px solid ", ";padding:", "px ", "px;color:", ";font-style:italic;background-color:", ";margin:-", "px -", "px ", "px -", "px;flex:1 1 100%;"], getTypographyIntent('small'), colors.gray85, colors.gray85, spacing.md, spacing.xxl, colors.gray15, colors.gray98, spacing.xl, spacing.xxl, spacing.xl, spacing.xxl);
|
|
94
150
|
//# sourceMappingURL=Modal.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.styles.js","names":["Warning","styled","css","Card","StyledSection","StyledSectionInner","Typography","getTypographyIntent","colors","spacing","fadeInClassName","fadeOutClassName","modalMaxWidth","modalPixelGutter","xl","modalPixelWidths","sm","md","lg","StyledModal","div","withConfig","displayName","componentId","StyledModalButtons","StyledModalContainer","_ref","$placement","_ref2","$width","StyledModalBody","StyledModalFooter","xxl","gray15","_ref3","noSideSpacing","_ref4","isOverflowingY","gray85","StyledModalFooterSummary","StyledModalContent","StyledModalFooterNotation","StyledModalHeader","gray10","_ref5","$isBodyScrolled","StyledModalHeading","StyledModalCancel","StyledModalScrim","StyledModalWarningIcon","yellow40","gray98"],"sources":["../../src/Modal/Modal.styles.ts"],"sourcesContent":["import { Warning } from '@procore/core-icons'\nimport styled, { css } from 'styled-components'\nimport { Card } from '../Card/Card'\nimport { StyledSection, StyledSectionInner } from '../Section/Section.styles'\nimport { Typography } from '../Typography/Typography'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\nimport type { ModalPlacement, ModalWidth } from './Modal.types'\n\nexport const fadeInClassName = 'fade-in'\nexport const fadeOutClassName = 'fade-out'\nexport const modalMaxWidth = '640px'\nexport const modalPixelGutter = spacing.xl\nexport const modalPixelWidths = {\n sm: 432,\n md: 688,\n lg: 1152,\n xl: 1920,\n}\n\nexport const StyledModal = styled.div`\n display: flex;\n height: 100vh;\n position: absolute;\n opacity: 0;\n transition: 0.3s opacity ease;\n width: 100vw;\n z-index: 0;\n\n &.${fadeInClassName} {\n opacity: 1;\n }\n\n &.${fadeOutClassName} {\n opacity: 0;\n }\n`\n\nexport const StyledModalButtons = styled.div`\n display: flex;\n flex: 0 0 auto;\n margin-left: ${spacing.lg}px;\n\n > * + * {\n margin-left: ${spacing.sm}px;\n }\n`\n\nexport const StyledModalContainer = styled(Card)<{\n $placement: ModalPlacement\n $width?: ModalWidth\n}>`\n display: flex;\n flex-direction: row;\n position: absolute;\n z-index: 2;\n\n ${({ $placement }) => {\n if ($placement === 'top') {\n return css`\n top: 5vh;\n `\n }\n\n return css`\n top: 50vh;\n transform: translateY(-50%);\n `\n }}\n\n ${({ $width, $placement }) => {\n if ($width) {\n return css`\n left: ${modalPixelGutter}px;\n right: ${modalPixelGutter}px;\n margin-left: auto;\n margin-right: auto;\n max-width: ${modalPixelWidths[$width]}px;\n\n // TODO deprecated, moving width up\n ${StyledModalBody} {\n max-width: none;\n }\n `\n }\n // TODO deprecated, uses new centering, required width\n return css`\n left: 50vw;\n transform: translateX(-50%)\n ${$placement === 'center' && 'translateY(-50%)'};\n `\n }}\n`\n\nexport const StyledModalFooter = styled.div`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n justify-content: flex-end;\n padding: ${spacing.xl}px ${spacing.xxl}px ${spacing.xxl}px;\n`\n\nexport const StyledModalBody = styled.div<{\n isOverflowingY: boolean\n noSideSpacing: boolean\n}>`\n ${getTypographyIntent('body')}\n\n box-sizing: border-box;\n color: ${colors.gray15};\n display: flex;\n flex-direction: column;\n // TODO deprecated, delete line in breaking change\n max-width: ${modalMaxWidth};\n overflow: auto;\n ${({ noSideSpacing }) => {\n return css`\n padding: ${spacing.xl}px ${noSideSpacing ? 0 : spacing.xxl}px;\n `\n }}\n\n > ${StyledSection} {\n padding-left: 0;\n padding-right: 0;\n\n &:first-child > ${StyledSectionInner} {\n padding-top: 0;\n }\n }\n\n ${({ isOverflowingY }) =>\n isOverflowingY &&\n css`\n & + ${StyledModalFooter} {\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: ${colors.gray85};\n ${StyledModalFooterSummary} {\n border-top: none;\n }\n }\n `}\n`\n\nexport const StyledModalContent = styled.div`\n display: flex;\n flex-direction: column;\n max-height: 90vh;\n overflow: hidden;\n width: 100%;\n`\n\nexport const StyledModalFooterNotation = styled(Typography)`\n flex-grow: 1;\n`\n\nexport const StyledModalHeader = styled.div<{ $isBodyScrolled: boolean }>`\n align-items: flex-start;\n color: ${colors.gray10};\n display: flex;\n flex: 0 0 auto;\n padding: ${spacing.xl}px ${spacing.xxl}px;\n position: relative;\n ${({ $isBodyScrolled }) => css`\n border-bottom: 1px solid ${$isBodyScrolled ? colors.gray85 : 'transparent'};\n `}\n`\n\nexport const StyledModalHeading = styled.div`\n ${getTypographyIntent('h2')}\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n min-height: 36px;\n padding-right: ${spacing.lg}px;\n`\n\nexport const StyledModalCancel = styled.div`\n flex: 0 0 auto;\n`\n\nexport const StyledModalScrim = styled.div`\n background: hsla(200, 8%, 10%, 0.6);\n height: 100vh;\n left: 0;\n position: absolute;\n top: 0;\n width: 100vw;\n z-index: 1;\n`\n\nexport const StyledModalWarningIcon = styled(Warning)`\n color: ${colors.yellow40};\n margin-right: ${spacing.sm}px;\n`\nexport const StyledModalFooterSummary = styled.div`\n ${getTypographyIntent('small')}\n border-top: 1px solid ${colors.gray85};\n border-bottom: 1px solid ${colors.gray85};\n padding: ${spacing.md}px ${spacing.xxl}px;\n color: ${colors.gray15};\n font-style: italic;\n background-color: ${colors.gray98};\n margin: -${spacing.xl}px -${spacing.xxl}px ${spacing.xl}px -${spacing.xxl}px;\n flex: 1 1 100%;\n`\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,qBAAqB;AAC7C,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,2BAA2B;AAC7E,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,OAAO,IAAMC,eAAe,GAAG,SAAS;AACxC,OAAO,IAAMC,gBAAgB,GAAG,UAAU;AAC1C,OAAO,IAAMC,aAAa,GAAG,OAAO;AACpC,OAAO,IAAMC,gBAAgB,GAAGJ,OAAO,CAACK,EAAE;AAC1C,OAAO,IAAMC,gBAAgB,GAAG;EAC9BC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,IAAI;EACRJ,EAAE,EAAE;AACN,CAAC;AAED,OAAO,IAAMK,WAAW,gBAAGlB,MAAM,C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AAA,sBAE1C;AAED,OAAO,IAAMyB,gBAAgB,gBAAG/C,MAAM,CAACmB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0GAQzC;AAED,OAAO,IAAM0B,sBAAsB,gBAAGhD,MAAM,CAACD,OAAO,CAAC,CAAAqB,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wCAC1Cf,MAAM,CAAC0C,QAAQ,EACRzC,OAAO,CAACO,EAAE,CAC3B;AACD,OAAO,IAAMuB,wBAAwB,gBAAGtC,MAAM,CAACmB,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kMAC9ChB,mBAAmB,CAAC,OAAO,CAAC,EACNC,MAAM,CAAC8B,MAAM,EACV9B,MAAM,CAAC8B,MAAM,EAC7B7B,OAAO,CAACQ,EAAE,EAAMR,OAAO,CAACuB,GAAG,EAC7BxB,MAAM,CAACyB,MAAM,EAEFzB,MAAM,CAAC2C,MAAM,EACtB1C,OAAO,CAACK,EAAE,EAAOL,OAAO,CAACuB,GAAG,EAAMvB,OAAO,CAACK,EAAE,EAAOL,OAAO,CAACuB,GAAG,CAE1E"}
|
|
1
|
+
{"version":3,"file":"Modal.styles.js","names":["Warning","styled","css","Card","StyledSection","StyledSectionInner","Typography","getTypographyIntent","colors","spacing","fadeInClassName","fadeOutClassName","modalMaxWidth","modalPixelGutter","xl","modalPixelWidths","sm","md","lg","compactModalFullscreenMaxHeight","screenWidthPixelBreakpoints","mobile","small","min","max","large","StyledModal","div","withConfig","displayName","componentId","StyledModalButtons","StyledModalContainer","_ref","$compact","_ref2","$placement","_ref3","$width","StyledModalBody","StyledModalFooter","xxl","gray15","_ref4","noSideSpacing","_ref5","_ref6","isOverflowingY","gray85","StyledModalFooterSummary","StyledModalContent","_ref7","_ref7$$compact","StyledModalFooterNotation","StyledModalHeader","gray10","_ref8","$isBodyScrolled","_ref9","spacings","concat","StyledModalHeading","_ref10","_ref11","_ref12","StyledModalCancel","StyledModalScrim","StyledModalWarningIcon","yellow40","gray98"],"sources":["../../src/Modal/Modal.styles.ts"],"sourcesContent":["import { Warning } from '@procore/core-icons'\nimport styled, { css } from 'styled-components'\nimport { Card } from '../Card/Card'\nimport { StyledSection, StyledSectionInner } from '../Section/Section.styles'\nimport { Typography } from '../Typography/Typography'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\nimport type { ModalPlacement, ModalWidth } from './Modal.types'\n\nexport const fadeInClassName = 'fade-in'\nexport const fadeOutClassName = 'fade-out'\nexport const modalMaxWidth = '640px'\nexport const modalPixelGutter = spacing.xl\nexport const modalPixelWidths = {\n sm: 432,\n md: 688,\n lg: 1152,\n xl: 1920,\n}\n\nconst compactModalFullscreenMaxHeight = 940\nconst screenWidthPixelBreakpoints = {\n mobile: {\n small: {\n min: 0,\n max: 439,\n },\n large: {\n min: 440,\n max: 767,\n },\n },\n}\n\nexport const StyledModal = styled.div`\n display: flex;\n height: 100vh;\n position: absolute;\n opacity: 0;\n transition: 0.3s opacity ease;\n width: 100vw;\n z-index: 0;\n\n &.${fadeInClassName} {\n opacity: 1;\n }\n\n &.${fadeOutClassName} {\n opacity: 0;\n }\n`\n\nexport const StyledModalButtons = styled.div`\n display: flex;\n flex: 0 0 auto;\n margin-left: ${spacing.lg}px;\n\n > * + * {\n margin-left: ${spacing.sm}px;\n }\n`\n\nexport const StyledModalContainer = styled(Card)<{\n $compact: boolean\n $placement: ModalPlacement\n $width?: ModalWidth\n}>`\n display: flex;\n flex-direction: row;\n position: absolute;\n z-index: 2;\n\n ${({ $compact }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n @media (max-width: ${screenWidthPixelBreakpoints.mobile.small\n .max}px) and (max-height: ${compactModalFullscreenMaxHeight}px) {\n border-radius: 0;\n height: 100vh;\n width: 100vw;\n }\n @media (min-width: ${screenWidthPixelBreakpoints.mobile.large\n .min}px) and (max-width: ${screenWidthPixelBreakpoints.mobile.large\n .max}px) {\n max-height: calc(100vh - 24px);\n width: 416px;\n }\n @media (min-height: ${compactModalFullscreenMaxHeight + 1}px) {\n height: 916px;\n max-width: 100vw;\n }\n `\n }}\n\n ${({ $placement }) => {\n if ($placement === 'top') {\n return css`\n top: 5vh;\n `\n }\n\n return css`\n top: 50vh;\n transform: translateY(-50%);\n `\n }}\n\n ${({ $width, $placement }) => {\n if ($width) {\n return css`\n left: ${modalPixelGutter}px;\n right: ${modalPixelGutter}px;\n margin-left: auto;\n margin-right: auto;\n max-width: ${modalPixelWidths[$width]}px;\n\n // TODO deprecated, moving width up. delete line in breaking change\n ${StyledModalBody} {\n max-width: none;\n }\n `\n }\n // TODO deprecated, uses new centering, required width\n return css`\n left: 50vw;\n transform: translateX(-50%)\n ${$placement === 'center' && 'translateY(-50%)'};\n `\n }}\n`\n\nexport const StyledModalFooter = styled.div`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n justify-content: flex-end;\n padding: ${spacing.xl}px ${spacing.xxl}px ${spacing.xxl}px;\n`\n\nexport const StyledModalBody = styled.div<{\n $compact: boolean\n isOverflowingY: boolean\n noSideSpacing: boolean\n}>`\n ${getTypographyIntent('body')}\n\n box-sizing: border-box;\n color: ${colors.gray15};\n display: flex;\n flex-direction: column;\n overflow: auto;\n ${({ noSideSpacing }) => {\n return css`\n padding: ${spacing.xl}px ${noSideSpacing ? 0 : spacing.xxl}px;\n `\n }}\n\n ${({ $compact }) => {\n if (!$compact) {\n // TODO deprecated, moving width up. delete line in breaking change\n return css`\n max-width: ${modalMaxWidth};\n `\n }\n\n return css`\n padding: 8px 16px;\n `\n }}\n\n > ${StyledSection} {\n padding-left: 0;\n padding-right: 0;\n\n &:first-child > ${StyledSectionInner} {\n padding-top: 0;\n }\n }\n\n ${({ isOverflowingY }) =>\n isOverflowingY &&\n css`\n & + ${StyledModalFooter} {\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: ${colors.gray85};\n ${StyledModalFooterSummary} {\n border-top: none;\n }\n }\n `}\n`\n\nexport const StyledModalContent = styled.div<{ $compact?: boolean }>`\n display: flex;\n flex-direction: column;\n max-height: 90vh;\n overflow: hidden;\n width: 100%;\n\n ${({ $compact = false }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n max-height: unset;\n `\n }}\n`\n\nexport const StyledModalFooterNotation = styled(Typography)`\n flex-grow: 1;\n`\n\nexport const StyledModalHeader = styled.div<{\n $compact: boolean\n $isBodyScrolled: boolean\n}>`\n align-items: flex-start;\n color: ${colors.gray10};\n display: flex;\n flex: 0 0 auto;\n position: relative;\n ${({ $compact, $isBodyScrolled }) => {\n if ($compact) {\n return css`\n border-bottom: 1px solid ${colors.gray85};\n `\n }\n\n return css`\n border-bottom: 1px solid\n ${$isBodyScrolled ? colors.gray85 : 'transparent'};\n `\n }}\n\n ${({ $compact }) => {\n let spacings = `${spacing.xl}px ${spacing.xxl}px`\n\n if ($compact) {\n spacings = `${spacing.md}px ${spacing.lg}px`\n }\n\n return css`\n padding: ${spacings};\n `\n }}\n`\n\nexport const StyledModalHeading = styled.div<{ $compact: boolean }>`\n ${({ $compact }) => getTypographyIntent($compact ? 'h3' : 'h2')}\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n min-height: 36px;\n padding-right: ${({ $compact }) => ($compact ? 36 : spacing.lg)}px;\n\n ${({ $compact }) => {\n if (!$compact) {\n return ''\n }\n\n return css`\n min-height: unset;\n `\n }}\n`\n\nexport const StyledModalCancel = styled.div`\n flex: 0 0 auto;\n`\n\nexport const StyledModalScrim = styled.div`\n background: hsla(200, 8%, 10%, 0.6);\n height: 100vh;\n left: 0;\n position: absolute;\n top: 0;\n width: 100vw;\n z-index: 1;\n`\n\nexport const StyledModalWarningIcon = styled(Warning)`\n color: ${colors.yellow40};\n margin-right: ${spacing.sm}px;\n`\nexport const StyledModalFooterSummary = styled.div`\n ${getTypographyIntent('small')}\n border-top: 1px solid ${colors.gray85};\n border-bottom: 1px solid ${colors.gray85};\n padding: ${spacing.md}px ${spacing.xxl}px;\n color: ${colors.gray15};\n font-style: italic;\n background-color: ${colors.gray98};\n margin: -${spacing.xl}px -${spacing.xxl}px ${spacing.xl}px -${spacing.xxl}px;\n flex: 1 1 100%;\n`\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,qBAAqB;AAC7C,OAAOC,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,2BAA2B;AAC7E,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,OAAO,IAAMC,eAAe,GAAG,SAAS;AACxC,OAAO,IAAMC,gBAAgB,GAAG,UAAU;AAC1C,OAAO,IAAMC,aAAa,GAAG,OAAO;AACpC,OAAO,IAAMC,gBAAgB,GAAGJ,OAAO,CAACK,EAAE;AAC1C,OAAO,IAAMC,gBAAgB,GAAG;EAC9BC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,IAAI;EACRJ,EAAE,EAAE;AACN,CAAC;AAED,IAAMK,+BAA+B,GAAG,GAAG;AAC3C,IAAMC,2BAA2B,GAAG;EAClCC,MAAM,EAAE;IACNC,KAAK,EAAE;MACLC,GAAG,EAAE,CAAC;MACNC,GAAG,EAAE;IACP,CAAC;IACDC,KAAK,EAAE;MACLF,GAAG,EAAE,GAAG;MACRC,GAAG,EAAE;IACP;EACF;AACF,CAAC;AAED,OAAO,IAAME,WAAW,gBAAGzB,MAAM,CAAC0B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sJAS/BpB,eAAe,EAIfC,gBAAgB,CAGrB;AAED,OAAO,IAAMoB,kBAAkB,gBAAG9B,MAAM,CAAC0B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAA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QAAQ;EACX,IAAI,CAACA,QAAQ,EAAE;IACb,OAAO,EAAE;EACX;EAEA,OAAOhC,GAAG;AAGZ,CAAC,CACF;AAED,OAAO,IAAM+D,iBAAiB,gBAAGhE,MAAM,CAAC0B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sBAE1C;AAED,OAAO,IAAMoC,gBAAgB,gBAAGjE,MAAM,CAAC0B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0GAQzC;AAED,OAAO,IAAMqC,sBAAsB,gBAAGlE,MAAM,CAACD,OAAO,CAAC,CAAA4B,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wCAC1CtB,MAAM,CAAC4D,QAAQ,EACR3D,OAAO,CAACO,EAAE,CAC3B;AACD,OAAO,IAAMiC,wBAAwB,gBAAGhD,MAAM,CAAC0B,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kMAC9CvB,mBAAmB,CAAC,OAAO,CAAC,EACNC,MAAM,CAACwC,MAAM,EACVxC,MAAM,CAACwC,MAAM,EAC7BvC,OAAO,CAACQ,EAAE,EAAMR,OAAO,CAACgC,GAAG,EAC7BjC,MAAM,CAACkC,MAAM,EAEFlC,MAAM,CAAC6D,MAAM,EACtB5D,OAAO,CAACK,EAAE,EAAOL,OAAO,CAACgC,GAAG,EAAMhC,OAAO,CAACK,EAAE,EAAOL,OAAO,CAACgC,GAAG,CAE1E"}
|
|
@@ -19,6 +19,12 @@ export interface ModalCloseContextApi {
|
|
|
19
19
|
onClose: ModalOnClose | undefined;
|
|
20
20
|
}
|
|
21
21
|
export interface ModalCloseableHeaderProps extends DivAttributes {
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY
|
|
24
|
+
* @defaultValue false
|
|
25
|
+
* @since 12.8.0
|
|
26
|
+
*/
|
|
27
|
+
compact?: boolean;
|
|
22
28
|
qa?: {
|
|
23
29
|
closeButton?: string;
|
|
24
30
|
};
|
|
@@ -36,6 +42,12 @@ export interface ModalProps extends Props {
|
|
|
36
42
|
* @since 11.12.0
|
|
37
43
|
*/
|
|
38
44
|
'aria-label'?: string;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY
|
|
47
|
+
* @defaultValue false
|
|
48
|
+
* @since 12.8.0
|
|
49
|
+
*/
|
|
50
|
+
compact?: boolean;
|
|
39
51
|
/**
|
|
40
52
|
* This adds additional UI or UX to close. Escape key will always close a dialog, see `onClose`.
|
|
41
53
|
*
|
|
@@ -86,6 +98,12 @@ export interface ModalProps extends Props {
|
|
|
86
98
|
width?: ModalWidth;
|
|
87
99
|
}
|
|
88
100
|
export interface ModalContainerProps extends Props {
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY
|
|
103
|
+
* @defaultValue false
|
|
104
|
+
* @since 12.8.0
|
|
105
|
+
*/
|
|
106
|
+
compact?: boolean;
|
|
89
107
|
/**
|
|
90
108
|
* @since 10.19.0
|
|
91
109
|
*/
|
|
@@ -124,6 +142,12 @@ export interface ModalCloseableHeaderProps extends Props {
|
|
|
124
142
|
};
|
|
125
143
|
}
|
|
126
144
|
export interface ModalBodyProps extends DivAttributes {
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY
|
|
147
|
+
* @defaultValue false
|
|
148
|
+
* @since 12.8.0
|
|
149
|
+
*/
|
|
150
|
+
compact?: boolean;
|
|
127
151
|
/**
|
|
128
152
|
* Removes left, right paddings from the modal body when true
|
|
129
153
|
* @defaultValue false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.types.js","names":[],"sources":["../../src/Modal/Modal.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { DivAttributes, Props } from '../_utils/types'\n\nexport type ModalPlacement = 'top' | 'center'\nexport type ModalWidth = 'sm' | 'md' | 'lg' | 'xl'\n\n/**\n * Additional UI/UX to dismiss. (In addition to the Esc key)\n * - `x` Close Button in the Modal Header\n * - `scrim` Overlay dimmed scrim\n * - `footer-button` Cancel Button in the Modal Footer Actions\n */\nexport type ModalOptionalCloseStartegy = 'x' | 'footer-button' | 'scrim'\ntype ModalCloseStragety = 'esc' | ModalOptionalCloseStartegy\n\ntype ModalOnClose = (\n event: // clicked scrim\n | React.MouseEvent<HTMLDivElement>\n // clicked x button\n | React.MouseEvent<HTMLButtonElement>\n // pressed escape key\n | React.KeyboardEvent<HTMLElement>,\n how: ModalCloseStragety\n) => void\n\nexport interface ModalCloseContextApi {\n /**\n * Escape key will always close a dialog. This adds additional UI or UX to close.\n */\n howToClose: ModalOptionalCloseStartegy[] | undefined\n onClose: ModalOnClose | undefined\n}\n\nexport interface ModalCloseableHeaderProps extends DivAttributes {\n qa?: { closeButton?: string }\n}\n\nexport interface ModalProps extends Props {\n 'aria-describedby'?: string\n 'aria-details'?: string\n /**\n * @a11y `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.\n * @since 11.12.0\n */\n 'aria-labelledby'?: string\n /**\n * @a11y `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.\n * @since 11.12.0\n */\n 'aria-label'?: string\n /**\n * This adds additional UI or UX to close. Escape key will always close a dialog, see `onClose`.\n *\n * NOTE 'footer-button': Footer Cancel button still requires at least a rendered self closing `Modal.FooterButtons`.\n *\n * NOTE 'x': The X button still requires a rendered `Modal.Header` component.\n * @defaultValue []\n * @since 11.12.0\n */\n howToClose?: ModalOptionalCloseStartegy[]\n /**\n * Aligns with `role` and `ref` location.\n */\n id?: string\n /**\n * Callback for clicking the overlay\n * @since 10.19.0\n */\n onClickOverlay?: (event: React.MouseEvent<HTMLDivElement>) => void\n /**\n * When a user closes the Modal by some approved `howToClose` method or the Escape key. This also opts-in to dialog focus management.\n * @a11y Future default! Moves focus into and cycles focus in the Modal, and returning focus\n * to the trigger when closed. Also enables the Escape key to close the Modal.\n * @since 11.6.0\n */\n onClose?: ModalOnClose\n /**\n * Modal open state\n * @defaultValue false\n * @since 10.19.0\n */\n open?: boolean\n /**\n * Enable dialog props. REQUIRES `onClose` to enable Escape key and focus management. MUST be labelled, prefer `aria-labelledby` over `aria-label`.\n */\n role?: 'dialog'\n /**\n * Vertical placement of the modal\n * @defaultValue center\n * @since 10.19.0\n */\n placement?: ModalPlacement\n /**\n * Sets a width on the container and uses next centering.\n * Future will default to `md`\n * @since 10.19.0\n */\n width?: ModalWidth\n}\n\nexport interface ModalContainerProps extends Props {\n /**\n * @since 10.19.0\n */\n placement: ModalPlacement\n /**\n * @since 10.19.0\n */\n width?: ModalWidth\n}\n\nexport interface ConfirmModalProps extends Omit<ModalProps, 'onClose'> {\n /**\n * Headline message\n * @since 10.19.0\n */\n headline?: string\n\n /**\n * The dismiss onClick callback\n * @since 10.19.0\n */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void\n}\n\n/**\n * NOTE: Using howToClose 'x' requires the `Modal.Header` component.\n * @a11y This component is a not semantic heading! For that, see `Modal.Heading`.\n */\nexport interface ModalCloseableHeaderProps extends Props {\n /**\n * @since 10.19.0\n */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void\n /**\n * @since 10.19.0\n */\n qa?: { closeButton?: string }\n}\n\nexport interface ModalBodyProps extends DivAttributes {\n /**\n * Removes left, right paddings from the modal body when true\n * @defaultValue false\n * @since 10.19.0\n */\n noSideSpacing?: boolean\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Modal.types.js","names":[],"sources":["../../src/Modal/Modal.types.ts"],"sourcesContent":["import type React from 'react'\nimport type { DivAttributes, Props } from '../_utils/types'\n\nexport type ModalPlacement = 'top' | 'center'\nexport type ModalWidth = 'sm' | 'md' | 'lg' | 'xl'\n\n/**\n * Additional UI/UX to dismiss. (In addition to the Esc key)\n * - `x` Close Button in the Modal Header\n * - `scrim` Overlay dimmed scrim\n * - `footer-button` Cancel Button in the Modal Footer Actions\n */\nexport type ModalOptionalCloseStartegy = 'x' | 'footer-button' | 'scrim'\ntype ModalCloseStragety = 'esc' | ModalOptionalCloseStartegy\n\ntype ModalOnClose = (\n event: // clicked scrim\n | React.MouseEvent<HTMLDivElement>\n // clicked x button\n | React.MouseEvent<HTMLButtonElement>\n // pressed escape key\n | React.KeyboardEvent<HTMLElement>,\n how: ModalCloseStragety\n) => void\n\nexport interface ModalCloseContextApi {\n /**\n * Escape key will always close a dialog. This adds additional UI or UX to close.\n */\n howToClose: ModalOptionalCloseStartegy[] | undefined\n onClose: ModalOnClose | undefined\n}\n\nexport interface ModalCloseableHeaderProps extends DivAttributes {\n /**\n * @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY\n * @defaultValue false\n * @since 12.8.0\n */\n compact?: boolean\n qa?: { closeButton?: string }\n}\n\nexport interface ModalProps extends Props {\n 'aria-describedby'?: string\n 'aria-details'?: string\n /**\n * @a11y `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.\n * @since 11.12.0\n */\n 'aria-labelledby'?: string\n /**\n * @a11y `role='dialog'` MUST be labelled. Prefer `aria-labelledby` over `aria-label`.\n * @since 11.12.0\n */\n 'aria-label'?: string\n /**\n * @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY\n * @defaultValue false\n * @since 12.8.0\n */\n compact?: boolean\n /**\n * This adds additional UI or UX to close. Escape key will always close a dialog, see `onClose`.\n *\n * NOTE 'footer-button': Footer Cancel button still requires at least a rendered self closing `Modal.FooterButtons`.\n *\n * NOTE 'x': The X button still requires a rendered `Modal.Header` component.\n * @defaultValue []\n * @since 11.12.0\n */\n howToClose?: ModalOptionalCloseStartegy[]\n /**\n * Aligns with `role` and `ref` location.\n */\n id?: string\n /**\n * Callback for clicking the overlay\n * @since 10.19.0\n */\n onClickOverlay?: (event: React.MouseEvent<HTMLDivElement>) => void\n /**\n * When a user closes the Modal by some approved `howToClose` method or the Escape key. This also opts-in to dialog focus management.\n * @a11y Future default! Moves focus into and cycles focus in the Modal, and returning focus\n * to the trigger when closed. Also enables the Escape key to close the Modal.\n * @since 11.6.0\n */\n onClose?: ModalOnClose\n /**\n * Modal open state\n * @defaultValue false\n * @since 10.19.0\n */\n open?: boolean\n /**\n * Enable dialog props. REQUIRES `onClose` to enable Escape key and focus management. MUST be labelled, prefer `aria-labelledby` over `aria-label`.\n */\n role?: 'dialog'\n /**\n * Vertical placement of the modal\n * @defaultValue center\n * @since 10.19.0\n */\n placement?: ModalPlacement\n /**\n * Sets a width on the container and uses next centering.\n * Future will default to `md`\n * @since 10.19.0\n */\n width?: ModalWidth\n}\n\nexport interface ModalContainerProps extends Props {\n /**\n * @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY\n * @defaultValue false\n * @since 12.8.0\n */\n compact?: boolean\n /**\n * @since 10.19.0\n */\n placement: ModalPlacement\n /**\n * @since 10.19.0\n */\n width?: ModalWidth\n}\n\nexport interface ConfirmModalProps extends Omit<ModalProps, 'onClose'> {\n /**\n * Headline message\n * @since 10.19.0\n */\n headline?: string\n\n /**\n * The dismiss onClick callback\n * @since 10.19.0\n */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void\n}\n\n/**\n * NOTE: Using howToClose 'x' requires the `Modal.Header` component.\n * @a11y This component is a not semantic heading! For that, see `Modal.Heading`.\n */\nexport interface ModalCloseableHeaderProps extends Props {\n /**\n * @since 10.19.0\n */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void\n /**\n * @since 10.19.0\n */\n qa?: { closeButton?: string }\n}\n\nexport interface ModalBodyProps extends DivAttributes {\n /**\n * @deprecated @experimental Changes the UI of modal to work on mobile breakpoints, to be used on Helix Header ONLY\n * @defaultValue false\n * @since 12.8.0\n */\n compact?: boolean\n /**\n * Removes left, right paddings from the modal body when true\n * @defaultValue false\n * @since 10.19.0\n */\n noSideSpacing?: boolean\n}\n"],"mappings":""}
|
|
@@ -6,26 +6,26 @@ import { getFocus } from '../_styles/mixins';
|
|
|
6
6
|
import { spacing } from '../_styles/spacing';
|
|
7
7
|
export var StyledMultiSelectValues = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "StyledMultiSelectValues",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_8_0__sc-s9ym9q-0"
|
|
10
10
|
})(["display:flex;flex-wrap:wrap;margin-bottom:2px;margin-left:", "px;margin-right:", "px;margin-top:2px;min-width:0;width:100%;"], spacing.md, spacing.xs);
|
|
11
11
|
export var StyledMultiSelectToken = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledMultiSelectToken",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_8_0__sc-s9ym9q-1"
|
|
14
14
|
})(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:0 1 auto;> div{max-width:178px;width:100%;}"], spacing.xs);
|
|
15
15
|
export var StyledMultiSelectSearchInput = /*#__PURE__*/styled.input.withConfig({
|
|
16
16
|
displayName: "StyledMultiSelectSearchInput",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_8_0__sc-s9ym9q-2"
|
|
18
18
|
})(["background-color:transparent;border-width:0;font-family:inherit;padding:0;height:24px;width:100%;", " ", " &::-ms-clear{display:none;}&:focus{box-shadow:none;outline:none;}&::placeholder{color:", ";}"], getTypographyIntent('body'), function (_ref) {
|
|
19
19
|
var $isNavigatingTokens = _ref.$isNavigatingTokens;
|
|
20
20
|
return $isNavigatingTokens && css(["color:transparent;"]);
|
|
21
21
|
}, colors.gray45);
|
|
22
22
|
export var StyledMultiSelectSearch = /*#__PURE__*/styled.div.withConfig({
|
|
23
23
|
displayName: "StyledMultiSelectSearch",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_8_0__sc-s9ym9q-3"
|
|
25
25
|
})(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:1;max-width:100%;min-width:24px;"], spacing.xs);
|
|
26
26
|
export var StyledMultiSelectSearchIcon = /*#__PURE__*/styled.div.withConfig({
|
|
27
27
|
displayName: "StyledMultiSelectSearchIcon",
|
|
28
|
-
componentId: "core-
|
|
28
|
+
componentId: "core-12_8_0__sc-s9ym9q-4"
|
|
29
29
|
})(["align-items:center;align-self:flex-start;display:flex;height:34px;justify-content:flex-end;margin-left:", "px;margin-right:", "px;min-width:40px;width:40px;"], spacing.xs, spacing.md);
|
|
30
30
|
export var StyledMultiSelectClearIcon = StyledSelectClearIcon;
|
|
31
31
|
export var StyledMultiSelectArrowContainer = StyledSelectArrowContainer;
|
|
@@ -33,7 +33,7 @@ export var StyledMultiSelectArrow = StyledSelectArrow;
|
|
|
33
33
|
export var StyledMultiSelectMenu = StyledSelectMenu;
|
|
34
34
|
export var StyledMultiSelectButton = /*#__PURE__*/styled(StyledSelectButton).withConfig({
|
|
35
35
|
displayName: "StyledMultiSelectButton",
|
|
36
|
-
componentId: "core-
|
|
36
|
+
componentId: "core-12_8_0__sc-s9ym9q-5"
|
|
37
37
|
})(["height:auto;padding:0;white-space:normal;&:focus-within{", "}", ""], getFocus(), function (_ref2) {
|
|
38
38
|
var $emptyValue = _ref2.$emptyValue;
|
|
39
39
|
return $emptyValue && css(["", "{cursor:pointer;}"], StyledMultiSelectSearchInput);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NextListPageProps } from './NextListPage.types';
|
|
3
|
+
export declare const NextListPage_: React.ForwardRefExoticComponent<NextListPageProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
/**
|
|
5
|
+
|
|
6
|
+
A list page is basically a copy of SettingsPage/DetailPage. However, it has some differences.
|
|
7
|
+
NextListPage does not have Breadcrumbs, nested sections (although, we may need them in the future), and Footer.
|
|
8
|
+
|
|
9
|
+
@since TBD
|
|
10
|
+
|
|
11
|
+
@see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-nextlistpage--edit)
|
|
12
|
+
|
|
13
|
+
@see [Design Guidelines](https://design.procore.com/tool-landing-layout)
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
export declare const NextListPage: React.ForwardRefExoticComponent<NextListPageProps & React.RefAttributes<HTMLDivElement>> & {
|
|
17
|
+
Main: React.ForwardRefExoticComponent<import("../PageLayout/PageLayout.types").PageMainProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Header: React.ForwardRefExoticComponent<import("../PageLayout").PageHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
Banner: React.ForwardRefExoticComponent<import("../_utils/types").Props & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Title: React.ForwardRefExoticComponent<import("../_utils/types").Props & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
Tabs: React.ForwardRefExoticComponent<import("../_utils/types").Props & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
Body: React.ForwardRefExoticComponent<import("../PageLayout").PageProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
Aside: React.ForwardRefExoticComponent<import("../PageLayout").PageAsideProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var _excluded = ["children"];
|
|
2
|
+
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); }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { DetailPage, DetailPageViewContext } from '../DetailPage';
|
|
7
|
+
import { Page } from '../PageLayout';
|
|
8
|
+
import { addSubcomponents } from '../_utils/addSubcomponents';
|
|
9
|
+
export var NextListPage_ = /*#__PURE__*/React.forwardRef(function NextListPage_(_ref, ref) {
|
|
10
|
+
var children = _ref.children,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
return /*#__PURE__*/React.createElement(DetailPageViewContext.Provider, {
|
|
13
|
+
value: {
|
|
14
|
+
width: 'xl',
|
|
15
|
+
hasNavigation: false
|
|
16
|
+
}
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Page, _extends({
|
|
18
|
+
ref: ref
|
|
19
|
+
}, props), children));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
|
|
24
|
+
A list page is basically a copy of SettingsPage/DetailPage. However, it has some differences.
|
|
25
|
+
NextListPage does not have Breadcrumbs, nested sections (although, we may need them in the future), and Footer.
|
|
26
|
+
|
|
27
|
+
@since TBD
|
|
28
|
+
|
|
29
|
+
@see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-nextlistpage--edit)
|
|
30
|
+
|
|
31
|
+
@see [Design Guidelines](https://design.procore.com/tool-landing-layout)
|
|
32
|
+
|
|
33
|
+
*/
|
|
34
|
+
export var NextListPage = addSubcomponents({
|
|
35
|
+
Main: Page.Main,
|
|
36
|
+
Header: Page.Header,
|
|
37
|
+
Banner: Page.Banner,
|
|
38
|
+
Title: Page.Title,
|
|
39
|
+
Tabs: Page.Tabs,
|
|
40
|
+
Body: DetailPage.Body,
|
|
41
|
+
Aside: Page.Aside
|
|
42
|
+
}, NextListPage_);
|
|
43
|
+
NextListPage_.displayName = 'NextListPage';
|
|
44
|
+
//# sourceMappingURL=NextListPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextListPage.js","names":["React","DetailPage","DetailPageViewContext","Page","addSubcomponents","NextListPage_","forwardRef","_ref","ref","children","props","_objectWithoutProperties","_excluded","createElement","Provider","value","width","hasNavigation","_extends","NextListPage","Main","Header","Banner","Title","Tabs","Body","Aside","displayName"],"sources":["../../src/NextListPage/NextListPage.tsx"],"sourcesContent":["import React from 'react'\nimport { DetailPage, DetailPageViewContext } from '../DetailPage'\nimport { Page } from '../PageLayout'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport type { NextListPageProps } from './NextListPage.types'\n\nexport const NextListPage_ = React.forwardRef<\n HTMLDivElement,\n NextListPageProps\n>(function NextListPage_({ children, ...props }, ref) {\n return (\n <DetailPageViewContext.Provider\n value={{ width: 'xl', hasNavigation: false }}\n >\n <Page ref={ref} {...props}>\n {children}\n </Page>\n </DetailPageViewContext.Provider>\n )\n})\n\n/**\n\n A list page is basically a copy of SettingsPage/DetailPage. However, it has some differences.\n NextListPage does not have Breadcrumbs, nested sections (although, we may need them in the future), and Footer.\n\n @since TBD\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-nextlistpage--edit)\n\n @see [Design Guidelines](https://design.procore.com/tool-landing-layout)\n\n */\nexport const NextListPage = addSubcomponents(\n {\n Main: Page.Main,\n Header: Page.Header,\n Banner: Page.Banner,\n Title: Page.Title,\n Tabs: Page.Tabs,\n Body: DetailPage.Body,\n Aside: Page.Aside,\n },\n NextListPage_\n)\n\nNextListPage_.displayName = 'NextListPage'\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,qBAAqB,QAAQ,eAAe;AACjE,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,gBAAgB,QAAQ,4BAA4B;AAG7D,OAAO,IAAMC,aAAa,gBAAGL,KAAK,CAACM,UAAU,CAG3C,SAASD,aAAaA,CAAAE,IAAA,EAAyBC,GAAG,EAAE;EAAA,IAA3BC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAC3C,oBACEZ,KAAA,CAAAa,aAAA,CAACX,qBAAqB,CAACY,QAAQ;IAC7BC,KAAK,EAAE;MAAEC,KAAK,EAAE,IAAI;MAAEC,aAAa,EAAE;IAAM;EAAE,gBAE7CjB,KAAA,CAAAa,aAAA,CAACV,IAAI,EAAAe,QAAA;IAACV,GAAG,EAAEA;EAAI,GAAKE,KAAK,GACtBD,QACG,CACwB,CAAC;AAErC,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMU,YAAY,GAAGf,gBAAgB,CAC1C;EACEgB,IAAI,EAAEjB,IAAI,CAACiB,IAAI;EACfC,MAAM,EAAElB,IAAI,CAACkB,MAAM;EACnBC,MAAM,EAAEnB,IAAI,CAACmB,MAAM;EACnBC,KAAK,EAAEpB,IAAI,CAACoB,KAAK;EACjBC,IAAI,EAAErB,IAAI,CAACqB,IAAI;EACfC,IAAI,EAAExB,UAAU,CAACwB,IAAI;EACrBC,KAAK,EAAEvB,IAAI,CAACuB;AACd,CAAC,EACDrB,aACF,CAAC;AAEDA,aAAa,CAACsB,WAAW,GAAG,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextListPage.types.js","names":[],"sources":["../../src/NextListPage/NextListPage.types.ts"],"sourcesContent":["import type { DetailPageProps } from '../DetailPage'\n\nexport interface NextListPageProps\n extends Omit<DetailPageProps, 'width' | 'hasNavigation'> {}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["NextListPage"],"sources":["../../src/NextListPage/index.ts"],"sourcesContent":["export { NextListPage } from './NextListPage'\nexport type { NextListPageProps } from './NextListPage.types'\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB"}
|
|
@@ -6,14 +6,14 @@ export var optionMinHeight = 32;
|
|
|
6
6
|
export var defaultMenuHeight = 64;
|
|
7
7
|
export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "StyledOptions",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_8_0__sc-3o6zya-0"
|
|
10
10
|
})([""]);
|
|
11
11
|
export var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledItem",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_8_0__sc-3o6zya-1"
|
|
14
14
|
})(["", ";padding:", "px ", "px;cursor:pointer;list-style-type:none;"], getTypographyIntent('body'), spacing.xs, spacing.md);
|
|
15
15
|
export var StyledGroup = /*#__PURE__*/styled.div.withConfig({
|
|
16
16
|
displayName: "StyledGroup",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_8_0__sc-3o6zya-2"
|
|
18
18
|
})(["", ";padding:", "px ", "px ", "px;font-weight:", ";background:white;list-style-type:none;"], getTypographyIntent('body'), spacing.md, spacing.md, spacing.xs, typographyWeights.semibold);
|
|
19
19
|
//# sourceMappingURL=NextMenu.styles.js.map
|
|
@@ -14,7 +14,7 @@ var variantColorMap = {
|
|
|
14
14
|
};
|
|
15
15
|
var StyledNotation = /*#__PURE__*/styled.i.withConfig({
|
|
16
16
|
displayName: "StyledNotation",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_8_0__sc-160q1m6-0"
|
|
18
18
|
})(["", " color:", ";font-style:italic;"], getTypographyIntent('small'), function (_ref) {
|
|
19
19
|
var variant = _ref.variant;
|
|
20
20
|
return variant ? colors[variantColorMap[variant]] : colors.gray15;
|
|
@@ -12,37 +12,37 @@ var inputBgColor = colors.white;
|
|
|
12
12
|
var inputBorder = "".concat(colors.gray70, " solid 1px");
|
|
13
13
|
var StyledRootAddon = /*#__PURE__*/styled.span.withConfig({
|
|
14
14
|
displayName: "StyledRootAddon",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_8_0__sc-1782nvg-0"
|
|
16
16
|
})(["display:inline-flex;align-items:center;height:100%;position:absolute;top:0;color:", ";", ";"], function (_ref) {
|
|
17
17
|
var disabled = _ref.disabled;
|
|
18
18
|
return disabled ? colors.gray70 : colors.gray45;
|
|
19
19
|
}, getTypographyIntent('body'));
|
|
20
20
|
export var StyledPrefix = /*#__PURE__*/styled(StyledRootAddon).withConfig({
|
|
21
21
|
displayName: "StyledPrefix",
|
|
22
|
-
componentId: "core-
|
|
22
|
+
componentId: "core-12_8_0__sc-1782nvg-1"
|
|
23
23
|
})(["left:", "px;"], spacing.md);
|
|
24
24
|
export var StyledSuffix = /*#__PURE__*/styled(StyledRootAddon).withConfig({
|
|
25
25
|
displayName: "StyledSuffix",
|
|
26
|
-
componentId: "core-
|
|
26
|
+
componentId: "core-12_8_0__sc-1782nvg-2"
|
|
27
27
|
})(["right:", "px;"], function (_ref2) {
|
|
28
28
|
var withIncrementer = _ref2.withIncrementer;
|
|
29
29
|
return withIncrementer ? spacing.md + incrementerWidth : spacing.md;
|
|
30
30
|
});
|
|
31
31
|
export var StyledIncrementerWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
32
32
|
displayName: "StyledIncrementerWrapper",
|
|
33
|
-
componentId: "core-
|
|
33
|
+
componentId: "core-12_8_0__sc-1782nvg-3"
|
|
34
34
|
})(["display:flex;flex-direction:column;position:absolute;top:1px;right:1px;height:100%;"]);
|
|
35
35
|
export var StyledIncrementerButton = /*#__PURE__*/styled.button.withConfig({
|
|
36
36
|
displayName: "StyledIncrementerButton",
|
|
37
|
-
componentId: "core-
|
|
37
|
+
componentId: "core-12_8_0__sc-1782nvg-4"
|
|
38
38
|
})(["display:inline-flex;justify-content:center;align-items:center;width:", "px;height:calc(50% - 1px);border:none;border-radius:0px;outline:none;background-color:", ";padding:0;cursor:pointer;&:first-child,&:last-child{border-left:", ";&:disabled{border-color:", ";background-color:", ";}}&:first-child{border-top-right-radius:2px;}&:last-child{border-top:", ";border-bottom-right-radius:2px;}svg{fill:", ";}&:hover{svg{fill:", ";}}&:disabled{cursor:default;svg{fill:", ";}}"], incrementerWidth, inputBgColor, inputBorder, colors.gray70, colors.gray94, inputBorder, colors.gray45, colors.gray10, colors.gray70);
|
|
39
39
|
export var StyledInput = /*#__PURE__*/styled(Input).withConfig({
|
|
40
40
|
displayName: "StyledInput",
|
|
41
|
-
componentId: "core-
|
|
41
|
+
componentId: "core-12_8_0__sc-1782nvg-5"
|
|
42
42
|
})([""]);
|
|
43
43
|
export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
44
44
|
displayName: "StyledWrapper",
|
|
45
|
-
componentId: "core-
|
|
45
|
+
componentId: "core-12_8_0__sc-1782nvg-6"
|
|
46
46
|
})(["position:relative;", ""], function (_ref3) {
|
|
47
47
|
var hasIncrementer = _ref3.hasIncrementer;
|
|
48
48
|
return hasIncrementer && css(["", "{padding-right:", "px;}"], StyledInput, spacing.md + incrementerWidth);
|
|
@@ -2,6 +2,6 @@ import styled from 'styled-components';
|
|
|
2
2
|
export var arrowSize = 8;
|
|
3
3
|
export var StyledArrow = /*#__PURE__*/styled.div.withConfig({
|
|
4
4
|
displayName: "StyledArrow",
|
|
5
|
-
componentId: "core-
|
|
5
|
+
componentId: "core-12_8_0__sc-1epxw7u-0"
|
|
6
6
|
})(["position:absolute;background:inherit;width:", "px;height:", "px;transform:rotate(45deg);"], arrowSize, arrowSize);
|
|
7
7
|
//# sourceMappingURL=OverlayArrow.styles.js.map
|