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