@procore/core-react 11.31.0 → 11.32.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.d.ts +6 -6
- package/dist/AnchorNavigation/AnchorNavigation.js +19 -17
- package/dist/AnchorNavigation/AnchorNavigation.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +8 -7
- package/dist/AnchorNavigation/AnchorNavigation.styles.js.map +1 -1
- package/dist/Avatar/Avatar.d.ts +18 -4
- package/dist/Avatar/Avatar.js +30 -14
- package/dist/Avatar/Avatar.js.map +1 -1
- 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.d.ts +19 -0
- package/dist/Banner/Banner.js +20 -19
- package/dist/Banner/Banner.js.map +1 -1
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +12 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +13 -13
- package/dist/Breadcrumbs/Breadcrumbs.js.map +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/ContactItem/ContactItem.d.ts +14 -0
- package/dist/ContactItem/ContactItem.js +15 -14
- package/dist/ContactItem/ContactItem.js.map +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.d.ts +13 -0
- package/dist/Dropdown/Dropdown.js +14 -14
- package/dist/Dropdown/Dropdown.js.map +1 -1
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.d.ts +12 -0
- package/dist/Dropzone/Dropzone.js +14 -14
- package/dist/Dropzone/Dropzone.js.map +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.d.ts +13 -0
- package/dist/EmptyState/EmptyState.js +14 -14
- package/dist/EmptyState/EmptyState.js.map +1 -1
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.d.ts +3 -3
- package/dist/FileList/FileList.js +10 -10
- package/dist/FileList/FileList.js.map +1 -1
- 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.js +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.js.map +1 -1
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.js +1 -1
- package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
- 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 +16 -16
- 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/Menu/Menu.d.ts +10 -10
- package/dist/Menu/Menu.js +13 -13
- package/dist/Menu/Menu.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.d.ts +7 -0
- package/dist/MenuImperative/MenuImperative.js +8 -8
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +10 -10
- package/dist/Modal/Modal.d.ts +16 -0
- package/dist/Modal/Modal.js +17 -17
- package/dist/Modal/Modal.js.map +1 -1
- 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.d.ts +3 -3
- package/dist/PageLayout/PageLayout.js +60 -29
- package/dist/PageLayout/PageLayout.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.d.ts +2 -0
- package/dist/PageLayout/PageLayout.styles.js +37 -26
- package/dist/PageLayout/PageLayout.styles.js.map +1 -1
- package/dist/PageLayout/PageLayout.types.d.ts +6 -1
- package/dist/PageLayout/PageLayout.types.js.map +1 -1
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.d.ts +15 -0
- package/dist/Panel/Panel.js +16 -16
- 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.d.ts +2 -2
- package/dist/Popover/Popover.js +21 -22
- package/dist/Popover/Popover.js.map +1 -1
- 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.d.ts +16 -0
- package/dist/Select/Select.js +17 -17
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +7 -7
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Sidebar/Sidebar.styles.js +7 -7
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- 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 +5 -5
- package/dist/Tabs/Tabs.js +32 -28
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.d.ts +12 -6
- package/dist/Tabs/Tabs.styles.js +40 -38
- package/dist/Tabs/Tabs.styles.js.map +1 -1
- 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.d.ts +14 -0
- package/dist/Thumbnail/Thumbnail.js +8 -8
- package/dist/Thumbnail/Thumbnail.js.map +1 -1
- 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.d.ts +1 -1
- package/dist/Toast/Toast.js +18 -18
- package/dist/Toast/Toast.js.map +1 -1
- 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.d.ts +17 -0
- package/dist/Tooltip/Tooltip.js +18 -18
- package/dist/Tooltip/Tooltip.js.map +1 -1
- 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/useFileUploader.js +1 -1
- package/dist/_hooks/useFileUploader.js.map +1 -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 +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 +4 -4
- 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 +41 -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 +38 -38
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
- package/dist/_typedoc/PageLayout/PageLayout.types.json +68 -22
- 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/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 +17 -17
- 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 +8 -8
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_utils/isFunction.d.ts +1 -0
- package/dist/_utils/isFunction.js +4 -0
- package/dist/_utils/isFunction.js.map +1 -0
- package/package.json +1 -1
|
@@ -8,19 +8,19 @@ var trackWidth = 36;
|
|
|
8
8
|
var toggleSize = 16;
|
|
9
9
|
export var StyledTrack = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
displayName: "StyledTrack",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-11_32_0__sc-mwn4kg-0"
|
|
12
12
|
})(["background-color:", ";border-radius:", "px;height:", "px;width:", "px;position:relative;transition:0.2s;"], colors.gray70, trackHeight, trackHeight, trackWidth);
|
|
13
13
|
export var StyledToggle = /*#__PURE__*/styled.span.withConfig({
|
|
14
14
|
displayName: "StyledToggle",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-11_32_0__sc-mwn4kg-1"
|
|
16
16
|
})(["background-color:", ";border-radius:50%;bottom:2px;height:", "px;left:2px;position:absolute;transition:all 0.2s;width:", "px;"], colors.white, toggleSize, toggleSize);
|
|
17
17
|
export var StyledSwitchLabel = /*#__PURE__*/styled.span.withConfig({
|
|
18
18
|
displayName: "StyledSwitchLabel",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-11_32_0__sc-mwn4kg-2"
|
|
20
20
|
})(["", " padding-left:", "px;user-select:none;"], getTypographyIntent('body'), spacing.md);
|
|
21
21
|
export var StyledSwitchContainer = /*#__PURE__*/styled.label.withConfig({
|
|
22
22
|
displayName: "StyledSwitchContainer",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-11_32_0__sc-mwn4kg-3"
|
|
24
24
|
})(["cursor:pointer;display:grid;grid-template-columns:", "px 1fr;position:relative;& + &{margin-top:", "px;}", " ", " ", ""], trackWidth, spacing.md, function (_ref) {
|
|
25
25
|
var $checked = _ref.$checked;
|
|
26
26
|
return $checked && css(["", "{background-color:", ";", "{transform:translateX(", "px);}}"], StyledTrack, colors.blue50, StyledToggle, spacing.lg);
|
|
@@ -47,26 +47,26 @@ var tableCellInputErrorBorder = "1px solid ".concat(colors.red50);
|
|
|
47
47
|
var tableRowBorderBottom = /*#__PURE__*/css(["border-bottom:", ";&:last-child{border-bottom:0;}"], tableBorder);
|
|
48
48
|
export var StyledTableHeaderCellSortableContainer = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledTableHeaderCellSortableContainer",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-11_32_0__sc-9c7xd-0"
|
|
51
51
|
})([""]);
|
|
52
52
|
export var StyledTableHeaderCellLabel = /*#__PURE__*/styled.div.withConfig({
|
|
53
53
|
displayName: "StyledTableHeaderCellLabel",
|
|
54
|
-
componentId: "core-
|
|
54
|
+
componentId: "core-11_32_0__sc-9c7xd-1"
|
|
55
55
|
})(["display:inline-block;flex:1 1 auto;position:relative;"]);
|
|
56
56
|
export var StyledCheckbox = /*#__PURE__*/styled(Checkbox).withConfig({
|
|
57
57
|
displayName: "StyledCheckbox",
|
|
58
|
-
componentId: "core-
|
|
58
|
+
componentId: "core-11_32_0__sc-9c7xd-2"
|
|
59
59
|
})([""]);
|
|
60
60
|
export var StyledTableBodyCell = /*#__PURE__*/styled.td.withConfig({
|
|
61
61
|
displayName: "StyledTableBodyCell",
|
|
62
|
-
componentId: "core-
|
|
62
|
+
componentId: "core-11_32_0__sc-9c7xd-3"
|
|
63
63
|
})(["position:relative;vertical-align:middle;", ""], function (_ref) {
|
|
64
64
|
var $snugfit = _ref.$snugfit;
|
|
65
65
|
return $snugfit && css(["white-space:nowrap;width:0.1%;"]);
|
|
66
66
|
});
|
|
67
67
|
export var StyledTableHeaderCell = /*#__PURE__*/styled.th.withConfig({
|
|
68
68
|
displayName: "StyledTableHeaderCell",
|
|
69
|
-
componentId: "core-
|
|
69
|
+
componentId: "core-11_32_0__sc-9c7xd-4"
|
|
70
70
|
})(["", " font-weight:", ";border-right:", ";color:", ";height:", "px;padding:", "px;position:relative;text-align:left;transition:background-color 0.2s ease-in-out;&:last-child{border-right:0;}", "{display:flex;align-items:center;}", "{", "{min-height:14px;}}", " ", " ", " ", " ", ""], getTypographyIntent('small'), tableHeaderFontWeight, tableHeaderBorderRight, tableHeaderFontColor, tableHeaderHeight, tableHeaderPadding, StyledTableHeaderCellSortableContainer, StyledTableHeaderCellSortableContainer, StyledTableHeaderCellLabel, function (_ref2) {
|
|
71
71
|
var $sortable = _ref2.$sortable;
|
|
72
72
|
return $sortable && css(["cursor:pointer;padding:", "px;", ",", "{color:", ";opacity:0;transition:all 0.15s ease-in-out;position:absolute;}::before,::after{font-size:16px;}&:hover{background-color:", ";", "{color:", ";}}"], spacing.lg, StyledTableHeaderCellSortIconAsc, StyledTableHeaderCellSortIconDesc, tableSortFontColor, tableHeaderBgColorHover, StyledTableHeaderCellSortIconAsc, tableSortFontColorHover);
|
|
@@ -85,27 +85,27 @@ export var StyledTableHeaderCell = /*#__PURE__*/styled.th.withConfig({
|
|
|
85
85
|
});
|
|
86
86
|
export var StyledTableHeaderCellIconWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
87
87
|
displayName: "StyledTableHeaderCellIconWrapper",
|
|
88
|
-
componentId: "core-
|
|
88
|
+
componentId: "core-11_32_0__sc-9c7xd-5"
|
|
89
89
|
})(["height:20px;line-height:20px;padding:0 ", "px 0 ", "px;width:20px;"], spacing.lg, spacing.sm);
|
|
90
90
|
export var StyledTableHeaderCellSortIconAsc = /*#__PURE__*/styled(CaretUp).withConfig({
|
|
91
91
|
displayName: "StyledTableHeaderCellSortIconAsc",
|
|
92
|
-
componentId: "core-
|
|
92
|
+
componentId: "core-11_32_0__sc-9c7xd-6"
|
|
93
93
|
})(["margin-top:-", "px;"], spacing.sm);
|
|
94
94
|
export var StyledTableHeaderCellSortIconDesc = /*#__PURE__*/styled(CaretDown).withConfig({
|
|
95
95
|
displayName: "StyledTableHeaderCellSortIconDesc",
|
|
96
|
-
componentId: "core-
|
|
96
|
+
componentId: "core-11_32_0__sc-9c7xd-7"
|
|
97
97
|
})([""]);
|
|
98
98
|
export var StyledHead = /*#__PURE__*/styled.thead.withConfig({
|
|
99
99
|
displayName: "StyledHead",
|
|
100
|
-
componentId: "core-
|
|
100
|
+
componentId: "core-11_32_0__sc-9c7xd-8"
|
|
101
101
|
})(["background-color:", ";transition:background-color 0.2s ease-in-out;", " &:hover{", "{", ",", "{&::after,&::before{opacity:1;}}}}"], tableHeaderBgColor, tableRowBorderBottom, StyledTableHeaderCell, StyledTableHeaderCellSortIconAsc, StyledTableHeaderCellSortIconDesc);
|
|
102
102
|
export var StyledCaratWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
103
103
|
displayName: "StyledCaratWrapper",
|
|
104
|
-
componentId: "core-
|
|
104
|
+
componentId: "core-11_32_0__sc-9c7xd-9"
|
|
105
105
|
})(["font-size:16px;color:", ";padding-right:", "px;transition:all 0.2s ease-in-out;& + ", "{margin:0 ", "px;}"], colors.gray70, spacing.xs, StyledCheckbox, spacing.xs);
|
|
106
106
|
export var StyledCarat = /*#__PURE__*/styled(ChevronRight).withConfig({
|
|
107
107
|
displayName: "StyledCarat",
|
|
108
|
-
componentId: "core-
|
|
108
|
+
componentId: "core-11_32_0__sc-9c7xd-10"
|
|
109
109
|
})(["", ""], function (_ref7) {
|
|
110
110
|
var $expanded = _ref7.$expanded;
|
|
111
111
|
return $expanded && css(["transform:rotate(90deg);"]);
|
|
@@ -113,7 +113,7 @@ export var StyledCarat = /*#__PURE__*/styled(ChevronRight).withConfig({
|
|
|
113
113
|
var cellInputCSS = /*#__PURE__*/css(["background-color:rgba(255,255,255,0);&&&{border:", ";border-radius:4px;width:100%;&::placeholder{color:", ";}&::-ms-clear{display:none;}&:hover{border-color:transparent;}&:focus{background-color:", ";border-style:solid;border-width:1px;border-color:", ";box-shadow:0 0 0 1px ", ";outline:none;}&:disabled{border:", ";color:", ";}}"], tableCellInputBorder, tableCellInputPlaceholderColor, colors.white, colors.blue40, colors.blue40, tableCellInputBorder, colors.gray70);
|
|
114
114
|
export var StyledTableCellSelect = /*#__PURE__*/styled(Select).withConfig({
|
|
115
115
|
displayName: "StyledTableCellSelect",
|
|
116
|
-
componentId: "core-
|
|
116
|
+
componentId: "core-11_32_0__sc-9c7xd-11"
|
|
117
117
|
})(["", ";background-color:transparent;border-color:transparent;height:auto;&:hover{background-color:transparent;}&:active:hover{border-color:", ";}&:focus{background-color:", ";cursor:pointer;", " ", "{white-space:nowrap;}", "{opacity:1;pointer-events:all;}", " ", "}", "{white-space:normal;}", ",", "{opacity:0;pointer-events:none;}", " ", ""], cellInputCSS, colors.gray85, colors.white, getFocus(), StyledSelectButtonLabel, StyledSelectArrow, function (_ref8) {
|
|
118
118
|
var $hasClearIcon = _ref8.$hasClearIcon;
|
|
119
119
|
return $hasClearIcon && css(["", "{opacity:1;pointer-events:all;}"], StyledSelectClearIcon);
|
|
@@ -131,25 +131,25 @@ export var StyledTableCellSelect = /*#__PURE__*/styled(Select).withConfig({
|
|
|
131
131
|
});
|
|
132
132
|
export var StyledTableCellInput = /*#__PURE__*/styled(Input).withConfig({
|
|
133
133
|
displayName: "StyledTableCellInput",
|
|
134
|
-
componentId: "core-
|
|
134
|
+
componentId: "core-11_32_0__sc-9c7xd-12"
|
|
135
135
|
})(["", ""], cellInputCSS);
|
|
136
136
|
export var StyledTableCellDateInput = /*#__PURE__*/styled(DateSelect).withConfig({
|
|
137
137
|
displayName: "StyledTableCellDateInput",
|
|
138
|
-
componentId: "core-
|
|
138
|
+
componentId: "core-11_32_0__sc-9c7xd-13"
|
|
139
139
|
})(["background-color:transparent;border-color:transparent;&:active:hover{border-color:", ";}&&&:focus-within{", ";background-color:", ";}", " ", "{opacity:0;}", "{&[data-qa-table-visible='false']{opacity:0;}}", "{&[data-placeholder='true']{opacity:0;}}&:focus-within{", "{opacity:1;}", "{&[data-qa-table-visible='false']{opacity:1;}}", "{&[data-placeholder='true']{opacity:1;}}}"], colors.gray45, getFocus(), colors.white, function (_ref12) {
|
|
140
140
|
var error = _ref12.error;
|
|
141
141
|
return error && css(["border-color:", ";"], colors.red50);
|
|
142
142
|
}, StyledDateInputIconContainer, StyledDateInputDelimiter, StyledDateInputSegment, StyledDateInputIconContainer, StyledDateInputDelimiter, StyledDateInputSegment);
|
|
143
143
|
export var StyledTableCellTextArea = /*#__PURE__*/styled(TextArea).withConfig({
|
|
144
144
|
displayName: "StyledTableCellTextArea",
|
|
145
|
-
componentId: "core-
|
|
145
|
+
componentId: "core-11_32_0__sc-9c7xd-14"
|
|
146
146
|
})(["", " &&{height:", "px;min-height:", "px;overflow:hidden;padding-top:", "px;resize:none;width:100%;", "}"], cellInputCSS, spacing.xxl, spacing.xxl, spacing.xs, function (_ref13) {
|
|
147
147
|
var $resizable = _ref13.$resizable;
|
|
148
148
|
return $resizable && css(["&:focus{min-height:64px;overflow:auto;resize:vertical;}"]);
|
|
149
149
|
});
|
|
150
150
|
export var StyledTableCellText = /*#__PURE__*/styled.div.withConfig({
|
|
151
151
|
displayName: "StyledTableCellText",
|
|
152
|
-
componentId: "core-
|
|
152
|
+
componentId: "core-11_32_0__sc-9c7xd-15"
|
|
153
153
|
})(["margin:", "px;display:flex;color:", ";", ""], spacing.lg, tableCellTextColor, function (_ref14) {
|
|
154
154
|
var $percent = _ref14.$percent,
|
|
155
155
|
$currency = _ref14.$currency;
|
|
@@ -157,15 +157,15 @@ export var StyledTableCellText = /*#__PURE__*/styled.div.withConfig({
|
|
|
157
157
|
});
|
|
158
158
|
export var StyledIconCell = /*#__PURE__*/styled.div.withConfig({
|
|
159
159
|
displayName: "StyledIconCell",
|
|
160
|
-
componentId: "core-
|
|
160
|
+
componentId: "core-11_32_0__sc-9c7xd-16"
|
|
161
161
|
})(["display:flex;color:", ";"], tableCellIconColor);
|
|
162
162
|
export var StyledSelectCellWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
163
163
|
displayName: "StyledSelectCellWrapper",
|
|
164
|
-
componentId: "core-
|
|
164
|
+
componentId: "core-11_32_0__sc-9c7xd-17"
|
|
165
165
|
})(["display:flex;flex-direction:column;"]);
|
|
166
166
|
export var StyledTableInlineEditErrorBox = /*#__PURE__*/styled.div.withConfig({
|
|
167
167
|
displayName: "StyledTableInlineEditErrorBox",
|
|
168
|
-
componentId: "core-
|
|
168
|
+
componentId: "core-11_32_0__sc-9c7xd-18"
|
|
169
169
|
})(["", " color:", ";font-style:italic;background:", ";border-radius:0 2px 2px 2px;box-shadow:0 1px 2px rgba(0,0,0,0.2),0 1px 3px rgba(0,0,0,0.1);padding:6px ", "px;position:absolute;max-width:160px;z-index:1;", ""], getTypographyIntent('small'), colors.white, colors.red50, spacing.md, function (_ref15) {
|
|
170
170
|
var $size = _ref15.$size;
|
|
171
171
|
var sizes = {
|
|
@@ -183,7 +183,7 @@ export var StyledTableInlineEditErrorBox = /*#__PURE__*/styled.div.withConfig({
|
|
|
183
183
|
});
|
|
184
184
|
export var StyledTableInlineEditContainer = /*#__PURE__*/styled.div.withConfig({
|
|
185
185
|
displayName: "StyledTableInlineEditContainer",
|
|
186
|
-
componentId: "core-
|
|
186
|
+
componentId: "core-11_32_0__sc-9c7xd-19"
|
|
187
187
|
})(["background-color:", ";margin:", "px ", "px;position:relative;", " ", ""], tableBgColor, spacing.sm, spacing.xs, function (_ref16) {
|
|
188
188
|
var $error = _ref16.$error;
|
|
189
189
|
return $error && css(["position:static;background-color:", ";", ",", ",", ",", "{border:", ";border-radius:4px 4px 0 0;border-bottom:none;&:hover{border-bottom:none;}&:focus{background-color:", ";border:", ";border-bottom:none;}}"], tableCellInputErrorBgColor, StyledTableCellDateInput, StyledTableCellInput, StyledTableCellSelect, StyledTableCellTextArea, tableCellInputErrorBorder, tableCellInputFocusBgColor, tableCellInputFocusBorder);
|
|
@@ -207,26 +207,26 @@ export var StyledTableInlineEditContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
207
207
|
});
|
|
208
208
|
export var StyledTableBodyRow = /*#__PURE__*/styled.tr.withConfig({
|
|
209
209
|
displayName: "StyledTableBodyRow",
|
|
210
|
-
componentId: "core-
|
|
210
|
+
componentId: "core-11_32_0__sc-9c7xd-20"
|
|
211
211
|
})(["", " ", " &:focus-within{", "{background-color:", ";&.disabled{background-color:transparent;}}", ".error{background-color:", ";}}&:hover{", "{background-color:", ";cursor:pointer;&:hover{background-color:", ";}&.disabled{&,&:hover{background-color:transparent;cursor:default;}}}", ".error{background-color:", ";&:hover{background-color:", ";}", ",", ",", "{border:", ";border-bottom:none;&:hover{border-bottom:none;}&:focus{border:", ";border-bottom:none;}}}}"], tableRowBorderBottom, function (_ref18) {
|
|
212
212
|
var $overdue = _ref18.$overdue;
|
|
213
213
|
return $overdue && css(["", ",", ",", ",", ",", "{color:", ";}"], StyledTableCellText, StyledTableCellSelect, StyledTableCellInput, StyledTableCellDateInput, StyledTableCellTextArea, colors.red50);
|
|
214
214
|
}, StyledTableInlineEditContainer, tableCellInputRowHoverBgColor, StyledTableInlineEditContainer, tableCellInputErrorBgColor, StyledTableInlineEditContainer, tableCellInputRowHoverBgColor, tableCellInputHoverBgColor, StyledTableInlineEditContainer, tableCellInputErrorBgColor, tableCellInputErrorBgColor, StyledTableCellInput, StyledTableCellSelect, StyledTableCellTextArea, tableCellInputErrorBorder, tableCellInputFocusBorder);
|
|
215
215
|
export var StyledTableGroupRowContent = /*#__PURE__*/styled.div.withConfig({
|
|
216
216
|
displayName: "StyledTableGroupRowContent",
|
|
217
|
-
componentId: "core-
|
|
217
|
+
componentId: "core-11_32_0__sc-9c7xd-21"
|
|
218
218
|
})([""]);
|
|
219
219
|
export var StyledTableGroupRowHeader = /*#__PURE__*/styled.div.withConfig({
|
|
220
220
|
displayName: "StyledTableGroupRowHeader",
|
|
221
|
-
componentId: "core-
|
|
221
|
+
componentId: "core-11_32_0__sc-9c7xd-22"
|
|
222
222
|
})([""]);
|
|
223
223
|
export var StyledTableGroupRowTitle = /*#__PURE__*/styled.span.withConfig({
|
|
224
224
|
displayName: "StyledTableGroupRowTitle",
|
|
225
|
-
componentId: "core-
|
|
225
|
+
componentId: "core-11_32_0__sc-9c7xd-23"
|
|
226
226
|
})([""]);
|
|
227
227
|
export var StyledTableGroupRow = /*#__PURE__*/styled.tr.withConfig({
|
|
228
228
|
displayName: "StyledTableGroupRow",
|
|
229
|
-
componentId: "core-
|
|
229
|
+
componentId: "core-11_32_0__sc-9c7xd-24"
|
|
230
230
|
})(["background-color:", ";", " ", "{margin-left:", "px;padding:", "px 0;display:flex;flex-direction:row;}", "{display:flex;align-items:center;}", "{font-weight:", ";padding-left:", "px;}", ""], tableGroupRowBgColor, tableRowBorderBottom, StyledTableGroupRowContent, spacing.lg, spacing.lg, StyledTableGroupRowHeader, StyledTableGroupRowTitle, tableHeaderFontWeight, spacing.lg, function (_ref19) {
|
|
231
231
|
var $depth = _ref19.$depth;
|
|
232
232
|
if (typeof $depth !== 'number') {
|
|
@@ -236,7 +236,7 @@ export var StyledTableGroupRow = /*#__PURE__*/styled.tr.withConfig({
|
|
|
236
236
|
});
|
|
237
237
|
export var StyledTableWrapper = /*#__PURE__*/styled(Card).withConfig({
|
|
238
238
|
displayName: "StyledTableWrapper",
|
|
239
|
-
componentId: "core-
|
|
239
|
+
componentId: "core-11_32_0__sc-9c7xd-25"
|
|
240
240
|
})(["border-radius:", "px;border:", ";", ",tbody{&:first-child{tr:first-child{", ",td{&:first-child{border-top-left-radius:", "px;}&:last-child{border-top-right-radius:", "px;}}}}&:last-child{tr:last-child{", ",td{&:first-child{border-bottom-left-radius:", "px;}&:last-child{border-bottom-right-radius:", "px;}}}}}", ""], tableBorderRadius, tableBorder, StyledHead, StyledTableHeaderCell, tableBorderRadius, tableBorderRadius, StyledTableHeaderCell, tableBorderRadius, tableBorderRadius, function (_ref20) {
|
|
241
241
|
var $withShelf = _ref20.$withShelf;
|
|
242
242
|
return $withShelf && css(["position:relative;height:100%;"]);
|
|
@@ -245,7 +245,7 @@ var BodyRow = StyledTableBodyRow;
|
|
|
245
245
|
var GroupRow = StyledTableGroupRow;
|
|
246
246
|
export var StyledTable = /*#__PURE__*/styled.table.withConfig({
|
|
247
247
|
displayName: "StyledTable",
|
|
248
|
-
componentId: "core-
|
|
248
|
+
componentId: "core-11_32_0__sc-9c7xd-26"
|
|
249
249
|
})(["background-color:", ";border-collapse:collapse;border-radius:", "px;", " width:100%;td:first-child ", "{padding-left:", "px;}", " ", " + ", "{margin-left:", "px;padding-left:0;}", " ", " ", " + ", " > td{padding-left:", "px;}", " + ", " + ", " > td{padding-left:", "px;}", " + ", " + ", " + ", " > td{padding-left:", "px;}", " + ", " + ", " + ", " + ", " > td{padding-left:", "px;}", " ~ ", "{", "{padding-left:0;margin:0 ", "px;}& > td:first-child{padding-left:", "px;}}", " + ", " ~ ", "{& > td:first-child{padding-left:", "px;}}", " + ", " + ", " ~ ", "{& > td:first-child{padding-left:", "px;}}", " + ", " + ", " + ", " ~ ", "{& > td:first-child{padding-left:", "px;}}", " + ", " + ", " + ", " + ", " ~ ", "{& > td:first-child{padding-left:", "px;}}"], tableBgColor, tableBorderRadius, getTypographyIntent('body'), StyledCheckbox, spacing.lg, StyledTableGroupRow, StyledCaratWrapper, StyledCheckbox, spacing.xs, function (_ref21) {
|
|
250
250
|
var $fixed = _ref21.$fixed;
|
|
251
251
|
return $fixed && css(["table-layout:fixed;"]);
|
|
@@ -255,6 +255,6 @@ export var StyledTable = /*#__PURE__*/styled.table.withConfig({
|
|
|
255
255
|
}, GroupRow, GroupRow, tableGroupHeaderRowIndentation, GroupRow, GroupRow, GroupRow, 2 * tableGroupHeaderRowIndentation, GroupRow, GroupRow, GroupRow, GroupRow, 3 * tableGroupHeaderRowIndentation, GroupRow, GroupRow, GroupRow, GroupRow, GroupRow, 4 * tableGroupHeaderRowIndentation, GroupRow, BodyRow, StyledCheckbox, spacing.xs, tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation, GroupRow, GroupRow, BodyRow, 2 * tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation, GroupRow, GroupRow, GroupRow, BodyRow, 3 * tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation, GroupRow, GroupRow, GroupRow, GroupRow, BodyRow, 4 * tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation, GroupRow, GroupRow, GroupRow, GroupRow, GroupRow, BodyRow, 5 * tableGroupHeaderRowIndentation + tableGroupBodyRowIndentation);
|
|
256
256
|
export var StyledLoadingContainer = /*#__PURE__*/styled.div.withConfig({
|
|
257
257
|
displayName: "StyledLoadingContainer",
|
|
258
|
-
componentId: "core-
|
|
258
|
+
componentId: "core-11_32_0__sc-9c7xd-27"
|
|
259
259
|
})(["cursor:default;align-items:center;background:", ";display:flex;height:100%;justify-content:center;opacity:0.9;position:absolute;width:100%;z-index:2;"], colors.gray96);
|
|
260
260
|
//# sourceMappingURL=Table.styles.js.map
|
|
@@ -4,22 +4,22 @@ import { spacing } from '../_styles/spacing';
|
|
|
4
4
|
var tableShelfShadow = '-4px 0px 5px 0px rgba(112, 112, 112, 0.1)';
|
|
5
5
|
export var StyledShelf = /*#__PURE__*/styled.div.withConfig({
|
|
6
6
|
displayName: "StyledShelf",
|
|
7
|
-
componentId: "core-
|
|
7
|
+
componentId: "core-11_32_0__sc-a6498a-0"
|
|
8
8
|
})(["position:absolute;right:0;top:0;bottom:0;box-shadow:", ";background-color:", ";"], tableShelfShadow, colors.white);
|
|
9
9
|
export var StyledHead = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
displayName: "StyledHead",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-11_32_0__sc-a6498a-1"
|
|
12
12
|
})(["background-color:", ";transition:background-color 0.2s ease-in-out;"], colors.gray96);
|
|
13
13
|
export var StyledBodyRow = /*#__PURE__*/styled.div.withConfig({
|
|
14
14
|
displayName: "StyledBodyRow",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-11_32_0__sc-a6498a-2"
|
|
16
16
|
})(["border-top:1px solid ", ";transition:background-color 0.2s ease-in-out;"], colors.gray85);
|
|
17
17
|
export var StyledHeadCell = /*#__PURE__*/styled.div.withConfig({
|
|
18
18
|
displayName: "StyledHeadCell",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-11_32_0__sc-a6498a-3"
|
|
20
20
|
})(["text-align:left;padding:", "px;line-height:13px;"], spacing.lg);
|
|
21
21
|
export var StyledBodyCell = /*#__PURE__*/styled.div.withConfig({
|
|
22
22
|
displayName: "StyledBodyCell",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-11_32_0__sc-a6498a-4"
|
|
24
24
|
})(["padding:", "px;line-height:13px;"], spacing.lg);
|
|
25
25
|
//# sourceMappingURL=TableShelf.styles.js.map
|
package/dist/Tabs/Tabs.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import type { DivAttributes, Props, SpanAttributes } from '../_utils/types';
|
|
3
3
|
import type { BaseTabProps, TabDropdownProps, TabProps, TabRef, TabRole, TabRoleType, TabsProps } from './Tabs.types';
|
|
4
4
|
export declare const Link: React.ForwardRefExoticComponent<SpanAttributes & Props & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
declare function TabInternal({ as, disabled, role, active, children, onBlur, onFocus, onMount, onUnmount, overflowing, dropdown, variant, ...props }: TabProps<TabRoleType>, ref: TabRef<TabRoleType>): React.JSX.Element;
|
|
6
|
+
export declare const Tab: <Role extends TabRole>(props: TabProps<Role> | (BaseTabProps & {
|
|
7
|
+
ref?: React.ComponentPropsWithRef<'div'>['ref'];
|
|
8
|
+
})) => ReturnType<typeof TabInternal>;
|
|
9
|
+
export declare const MoreMenu: React.ForwardRefExoticComponent<DivAttributes & TabDropdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
10
|
/**
|
|
6
11
|
|
|
7
12
|
We use tabs to navigate between different, but related content.
|
|
@@ -14,11 +19,6 @@ export declare const Link: React.ForwardRefExoticComponent<SpanAttributes & Prop
|
|
|
14
19
|
@see [Design Guidelines](https://design.procore.com/tabs)
|
|
15
20
|
|
|
16
21
|
*/
|
|
17
|
-
declare function TabInternal({ as, disabled, role, active, children, onBlur, onFocus, onMount, onUnmount, overflowing, dropdown, variant, ...props }: TabProps<TabRoleType>, ref: TabRef<TabRoleType>): React.JSX.Element;
|
|
18
|
-
export declare const Tab: <Role extends TabRole>(props: TabProps<Role> | (BaseTabProps & {
|
|
19
|
-
ref?: React.ComponentPropsWithRef<'div'>['ref'];
|
|
20
|
-
})) => ReturnType<typeof TabInternal>;
|
|
21
|
-
export declare const MoreMenu: React.ForwardRefExoticComponent<DivAttributes & TabDropdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
22
|
export declare const Tabs: React.ForwardRefExoticComponent<DivAttributes & TabsProps & React.RefAttributes<HTMLDivElement>> & {
|
|
23
23
|
Link: React.ForwardRefExoticComponent<SpanAttributes & Props & React.RefAttributes<HTMLSpanElement>>;
|
|
24
24
|
Tab: <Role extends TabRole>(props: TabProps<Role> | (BaseTabProps & {
|
package/dist/Tabs/Tabs.js
CHANGED
|
@@ -27,10 +27,12 @@ import { MenuImperative } from '../MenuImperative/MenuImperative';
|
|
|
27
27
|
import { OverlayTrigger, useOverlayTriggerContext } from '../OverlayTrigger/OverlayTrigger';
|
|
28
28
|
import { useI18nContext } from '../_hooks/I18n';
|
|
29
29
|
import { useResize } from '../_hooks/Resize';
|
|
30
|
+
import { spacing } from '../_styles/spacing';
|
|
30
31
|
import { addSubcomponents } from '../_utils/addSubcomponents';
|
|
31
32
|
import { getBoundingRect } from '../_utils/dom';
|
|
32
33
|
import { mergeRefs } from '../_utils/mergeRefs';
|
|
33
34
|
import { StyledDropdownTab, StyledDropdownTabInner, StyledLink, StyledOverlay, StyledTab, StyledTabInner, StyledTabList, StyledTabs } from './Tabs.styles';
|
|
35
|
+
var ExtraTabSpacing = spacing.xxl;
|
|
34
36
|
function noop() {}
|
|
35
37
|
export var Link = /*#__PURE__*/React.forwardRef(function Link(_ref, ref) {
|
|
36
38
|
var children = _ref.children,
|
|
@@ -39,20 +41,6 @@ export var Link = /*#__PURE__*/React.forwardRef(function Link(_ref, ref) {
|
|
|
39
41
|
ref: ref
|
|
40
42
|
}, props), children);
|
|
41
43
|
});
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
We use tabs to navigate between different, but related content.
|
|
46
|
-
Tabs are commonly used on tool landing pages and on item detail pages.
|
|
47
|
-
|
|
48
|
-
@since 10.19.0
|
|
49
|
-
|
|
50
|
-
@see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-tabs--demo)
|
|
51
|
-
|
|
52
|
-
@see [Design Guidelines](https://design.procore.com/tabs)
|
|
53
|
-
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
44
|
function TabInternal(_ref2, ref) {
|
|
57
45
|
var as = _ref2.as,
|
|
58
46
|
disabled = _ref2.disabled,
|
|
@@ -107,18 +95,19 @@ function TabInternal(_ref2, ref) {
|
|
|
107
95
|
return onUnmount;
|
|
108
96
|
}, []);
|
|
109
97
|
var validChild = /*#__PURE__*/React.isValidElement(children);
|
|
110
|
-
|
|
111
|
-
|
|
98
|
+
var tabActive = active || variant === 'active';
|
|
99
|
+
return /*#__PURE__*/React.createElement(StyledTab, _extends({
|
|
100
|
+
$active: tabActive,
|
|
101
|
+
$dark: props.dark
|
|
112
102
|
// @ts-ignore
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
);
|
|
103
|
+
,
|
|
104
|
+
ref: mergeRefs(ref, innerRef)
|
|
105
|
+
}, a11yProps, props), /*#__PURE__*/React.createElement(StyledTabInner, {
|
|
106
|
+
$active: tabActive,
|
|
107
|
+
$dark: props.dark
|
|
108
|
+
}, validChild ? /*#__PURE__*/React.cloneElement(children, {
|
|
109
|
+
'aria-current': tabActive ? true : undefined
|
|
110
|
+
}) : children));
|
|
122
111
|
}
|
|
123
112
|
export var Tab = /*#__PURE__*/React.forwardRef(TabInternal);
|
|
124
113
|
export var MoreMenu = /*#__PURE__*/React.forwardRef(function MoreMenu(_ref4, ref) {
|
|
@@ -184,7 +173,7 @@ var Tabs_ = /*#__PURE__*/React.forwardRef(function Tabs(_ref5, ref) {
|
|
|
184
173
|
var rect = getBoundingRect(el);
|
|
185
174
|
return {
|
|
186
175
|
subtotals: [].concat(_toConsumableArray(acc.subtotals), [acc.total + rect.width]),
|
|
187
|
-
total: acc.total + rect.width
|
|
176
|
+
total: acc.total + rect.width + ExtraTabSpacing
|
|
188
177
|
};
|
|
189
178
|
}, {
|
|
190
179
|
subtotals: new Array(),
|
|
@@ -246,11 +235,13 @@ var Tabs_ = /*#__PURE__*/React.forwardRef(function Tabs(_ref5, ref) {
|
|
|
246
235
|
ref: ref,
|
|
247
236
|
role: "menu"
|
|
248
237
|
}, /*#__PURE__*/React.createElement(StyledDropdownTab, {
|
|
238
|
+
$active: isOverflowingActive,
|
|
239
|
+
$dark: dark,
|
|
249
240
|
"aria-hidden": !overflowing.length,
|
|
250
241
|
as: "button"
|
|
251
242
|
}, /*#__PURE__*/React.createElement(StyledDropdownTabInner, {
|
|
252
|
-
active: isOverflowingActive,
|
|
253
|
-
dark: dark
|
|
243
|
+
$active: isOverflowingActive,
|
|
244
|
+
$dark: dark
|
|
254
245
|
}, /*#__PURE__*/React.createElement(StyledLink, {
|
|
255
246
|
"data-qa": qa === null || qa === void 0 ? void 0 : qa.more
|
|
256
247
|
}, i18n.t('core.tabs.more')), moreMenuIsShown ? /*#__PURE__*/React.createElement(CaretUp, {
|
|
@@ -264,6 +255,19 @@ Link.displayName = 'Tabs.Link';
|
|
|
264
255
|
|
|
265
256
|
// @ts-ignore
|
|
266
257
|
Tab.displayName = 'Tabs.Tab';
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
|
|
261
|
+
We use tabs to navigate between different, but related content.
|
|
262
|
+
Tabs are commonly used on tool landing pages and on item detail pages.
|
|
263
|
+
|
|
264
|
+
@since 10.19.0
|
|
265
|
+
|
|
266
|
+
@see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-tabs--demo)
|
|
267
|
+
|
|
268
|
+
@see [Design Guidelines](https://design.procore.com/tabs)
|
|
269
|
+
|
|
270
|
+
*/
|
|
267
271
|
export var Tabs = addSubcomponents({
|
|
268
272
|
Link: Link,
|
|
269
273
|
Tab: Tab
|
package/dist/Tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","names":["CaretDown","CaretUp","React","useButton","MenuImperative","OverlayTrigger","useOverlayTriggerContext","useI18nContext","useResize","addSubcomponents","getBoundingRect","mergeRefs","StyledDropdownTab","StyledDropdownTabInner","StyledLink","StyledOverlay","StyledTab","StyledTabInner","StyledTabList","StyledTabs","noop","Link","forwardRef","_ref","ref","children","props","_objectWithoutProperties","_excluded","createElement","_extends","TabInternal","_ref2","as","disabled","role","_ref2$active","active","onBlur","onFocus","_ref2$onMount","onMount","_ref2$onUnmount","onUnmount","_ref2$overflowing","overflowing","_ref2$dropdown","dropdown","_ref2$variant","variant","_excluded2","_ref3","onPress","_useButton","_objectSpread","elementType","isDisabled","type","buttonProps","a11yProps","$clickable","innerRef","useRef","useEffect","current","validChild","isValidElement","dark","cloneElement","undefined","Tab","MoreMenu","_ref4","id","ctx","menuRef","_menuRef$current","_menuRef$current$el","_menuRef$current2","_menuRef$current3","el","focus","highlightFirst","highlightSelected","onSelect","selection","hide","event","Options","Children","map","child","i","Item","item","key","selected","Tabs_","Tabs","_ref5","className","_ref5$dark","qa","_excluded3","i18n","_React$useState","useState","_React$useState2","_slicedToArray","moreMenuIsShown","setMoreMenuIsShown","_React$useState3","_React$useState4","tabElements","setTabElements","_React$useState5","_React$useState6","cutoffIndex","setCutoffIndex","containerRef","recalculate","container","_tabElements$reduce","reduce","acc","rect","subtotals","concat","_toConsumableArray","total","width","Array","index","findIndex","val","onResize","filtered","toArray","filter","slice","isOverflowingActive","some","elements","oldElements","autoFocus","beforeShow","afterHide","trigger","passA11yPropsToOverlay","placement","overlay","length","more","t","size","displayName"],"sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import { CaretDown, CaretUp } from '@procore/core-icons/dist'\nimport React from 'react'\n\nimport { useButton } from '@react-aria/button'\nimport { MenuImperative } from '../MenuImperative/MenuImperative'\nimport type { MenuRef, Selection } from '../MenuImperative/MenuImperative.types'\nimport {\n OverlayTrigger,\n useOverlayTriggerContext,\n} from '../OverlayTrigger/OverlayTrigger'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useResize } from '../_hooks/Resize'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport { getBoundingRect } from '../_utils/dom'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type {\n DivAttributes,\n NavAttributes,\n Props,\n SpanAttributes,\n} from '../_utils/types'\nimport {\n StyledDropdownTab,\n StyledDropdownTabInner,\n StyledLink,\n StyledOverlay,\n StyledTab,\n StyledTabInner,\n StyledTabList,\n StyledTabs,\n} from './Tabs.styles'\nimport type {\n BaseTabProps,\n TabDropdownProps,\n TabProps,\n TabRef,\n TabRole,\n TabRoleType,\n TabsProps,\n} from './Tabs.types'\n\nfunction noop() {}\n\nexport const Link = React.forwardRef<HTMLSpanElement, SpanAttributes & Props>(\n function Link({ children, ...props }, ref) {\n return (\n <StyledLink ref={ref} {...props}>\n {children}\n </StyledLink>\n )\n }\n)\n\n/**\n\n We use tabs to navigate between different, but related content.\n Tabs are commonly used on tool landing pages and on item detail pages.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-tabs--demo)\n\n @see [Design Guidelines](https://design.procore.com/tabs)\n\n */\n\nfunction TabInternal(\n {\n as,\n disabled,\n role,\n active = false,\n children,\n onBlur,\n onFocus,\n onMount = noop,\n onUnmount = noop,\n overflowing = false,\n dropdown = false,\n variant = '',\n ...props\n }: TabProps<TabRoleType>,\n ref: TabRef<TabRoleType>\n) {\n const { onPress } = props as TabProps<'button'>\n\n const { buttonProps } = useButton(\n {\n ...props,\n onBlur: onBlur as (e: React.FocusEvent) => void,\n onFocus: onFocus as (e: React.FocusEvent) => void,\n elementType: role === 'link' ? 'a' : role === 'button' ? 'button' : 'div',\n isDisabled: disabled,\n onPress,\n type: 'button',\n },\n ref as any // TODO fix polymorphic type\n )\n\n const a11yProps =\n role === 'button'\n ? {\n ...buttonProps,\n 'aria-current': active,\n as: as || 'button',\n $clickable: !disabled,\n }\n : role === 'link'\n ? {\n ...buttonProps,\n 'aria-current': active,\n as: as || 'a',\n $clickable: !disabled,\n }\n : role === 'tab'\n ? { role: 'tab', onBlur, onFocus }\n : { onBlur, onFocus }\n\n const innerRef = React.useRef<HTMLDivElement>(null)\n\n React.useEffect(() => {\n onMount(innerRef.current)\n return onUnmount\n }, [])\n\n const validChild = React.isValidElement(children)\n\n return (\n // @ts-ignore\n <StyledTab ref={mergeRefs(ref, innerRef)} {...a11yProps} {...props}>\n <StyledTabInner active={active || variant === 'active'} dark={props.dark}>\n {validChild\n ? React.cloneElement(children as React.ReactElement<any, any>, {\n 'aria-current': active || variant === 'active' ? true : undefined,\n })\n : children}\n </StyledTabInner>\n </StyledTab>\n )\n}\n\nexport const Tab = React.forwardRef(TabInternal) as <Role extends TabRole>(\n props:\n | TabProps<Role>\n | (BaseTabProps & { ref?: React.ComponentPropsWithRef<'div'>['ref'] })\n) => ReturnType<typeof TabInternal>\n\nexport const MoreMenu = React.forwardRef<\n HTMLDivElement,\n DivAttributes & TabDropdownProps\n>(function MoreMenu({ children, id }, ref) {\n const ctx = useOverlayTriggerContext()\n\n const menuRef = React.useRef<MenuRef | null>(null)\n\n React.useEffect(function () {\n menuRef.current?.el?.focus()\n menuRef.current?.highlightFirst()\n menuRef.current?.highlightSelected()\n }, [])\n\n function onSelect(selection: Selection) {\n ctx.hide(selection.event)\n }\n\n return (\n <StyledOverlay ref={ref}>\n <MenuImperative id={id} role=\"menu\" ref={menuRef} onSelect={onSelect}>\n <MenuImperative.Options>\n {React.Children.map(children, (child, i) => {\n if (React.isValidElement<BaseTabProps>(child)) {\n return (\n <MenuImperative.Item\n item={null}\n key={i}\n selected={child.props.active}\n >\n {React.cloneElement(child as any, { ref: null })}\n </MenuImperative.Item>\n )\n }\n })}\n </MenuImperative.Options>\n </MenuImperative>\n </StyledOverlay>\n )\n})\n\nconst Tabs_ = React.forwardRef<HTMLDivElement, NavAttributes & TabsProps>(\n function Tabs({ children, className, dark = false, qa, ...props }, ref) {\n const i18n = useI18nContext()\n\n const [moreMenuIsShown, setMoreMenuIsShown] = React.useState(false)\n const [tabElements, setTabElements] = React.useState<\n (HTMLDivElement | null)[]\n >([])\n const [cutoffIndex, setCutoffIndex] = React.useState(0)\n\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n function recalculate() {\n const container = getBoundingRect(containerRef.current!)\n\n const { subtotals } = tabElements.reduce(\n (acc, el) => {\n if (!el) {\n return acc\n }\n const rect = getBoundingRect(el)\n return {\n subtotals: [...acc.subtotals, acc.total + rect.width],\n total: acc.total + rect.width,\n }\n },\n { subtotals: new Array(), total: 0 }\n )\n\n const index = subtotals.findIndex((val: number) => val >= container.width)\n\n setCutoffIndex(index)\n }\n\n useResize({ onResize: recalculate })\n\n React.useEffect(recalculate)\n\n const filtered = React.Children.toArray(children).filter((child) => child)\n\n const overflowing = filtered.slice(cutoffIndex - 1)\n\n const isOverflowingActive = React.Children.toArray(overflowing).some(\n (child) => React.isValidElement(child) && child.props.active\n )\n\n return (\n <StyledTabs ref={ref} dark={dark} index={cutoffIndex} {...props}>\n <StyledTabList ref={containerRef}>\n {filtered.map((child, i) => {\n if (React.isValidElement(child))\n return React.cloneElement(child, {\n dark,\n onMount: (el: HTMLDivElement) => {\n setTabElements((elements) => {\n const oldElements = [...elements]\n oldElements[i] = el\n return oldElements\n })\n },\n onUnmount: () => {\n setTabElements((elements) => {\n const oldElements = [...elements]\n oldElements[i] = null\n return oldElements\n })\n },\n } as any) // TODO fix type\n })}\n\n <OverlayTrigger\n autoFocus\n beforeShow={() => setMoreMenuIsShown(true)}\n afterHide={() => setMoreMenuIsShown(false)}\n trigger=\"click\"\n passA11yPropsToOverlay\n placement=\"bottom-right\"\n overlay={<MoreMenu>{overflowing}</MoreMenu>}\n ref={ref}\n role=\"menu\"\n >\n <StyledDropdownTab aria-hidden={!overflowing.length} as=\"button\">\n <StyledDropdownTabInner active={isOverflowingActive} dark={dark}>\n <StyledLink data-qa={qa?.more}>\n {i18n.t('core.tabs.more')}\n </StyledLink>\n {moreMenuIsShown ? (\n <CaretUp size=\"sm\" />\n ) : (\n <CaretDown size=\"sm\" />\n )}\n </StyledDropdownTabInner>\n </StyledDropdownTab>\n </OverlayTrigger>\n </StyledTabList>\n </StyledTabs>\n )\n }\n)\n\nTabs_.displayName = 'Tabs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,CACL,CAAC;AAEjB,CACF,CAAC;AAEDzD,KAAK,CAAC0D,WAAW,GAAG,MAAM;AAE1BtI,IAAI,CAACsI,WAAW,GAAG,WAAW;;AAE9B;AACArF,GAAG,CAACqF,WAAW,GAAG,UAAU;AAE5B,OAAO,IAAMzD,IAAI,GAAGzF,gBAAgB,CAClC;EACEY,IAAI,EAAJA,IAAI;EACJiD,GAAG,EAAHA;AACF,CAAC,EACD2B,KACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":["CaretDown","CaretUp","React","useButton","MenuImperative","OverlayTrigger","useOverlayTriggerContext","useI18nContext","useResize","spacing","addSubcomponents","getBoundingRect","mergeRefs","StyledDropdownTab","StyledDropdownTabInner","StyledLink","StyledOverlay","StyledTab","StyledTabInner","StyledTabList","StyledTabs","ExtraTabSpacing","xxl","noop","Link","forwardRef","_ref","ref","children","props","_objectWithoutProperties","_excluded","createElement","_extends","TabInternal","_ref2","as","disabled","role","_ref2$active","active","onBlur","onFocus","_ref2$onMount","onMount","_ref2$onUnmount","onUnmount","_ref2$overflowing","overflowing","_ref2$dropdown","dropdown","_ref2$variant","variant","_excluded2","_ref3","onPress","_useButton","_objectSpread","elementType","isDisabled","type","buttonProps","a11yProps","$clickable","innerRef","useRef","useEffect","current","validChild","isValidElement","tabActive","$active","$dark","dark","cloneElement","undefined","Tab","MoreMenu","_ref4","id","ctx","menuRef","_menuRef$current","_menuRef$current$el","_menuRef$current2","_menuRef$current3","el","focus","highlightFirst","highlightSelected","onSelect","selection","hide","event","Options","Children","map","child","i","Item","item","key","selected","Tabs_","Tabs","_ref5","className","_ref5$dark","qa","_excluded3","i18n","_React$useState","useState","_React$useState2","_slicedToArray","moreMenuIsShown","setMoreMenuIsShown","_React$useState3","_React$useState4","tabElements","setTabElements","_React$useState5","_React$useState6","cutoffIndex","setCutoffIndex","containerRef","recalculate","container","_tabElements$reduce","reduce","acc","rect","subtotals","concat","_toConsumableArray","total","width","Array","index","findIndex","val","onResize","filtered","toArray","filter","slice","isOverflowingActive","some","elements","oldElements","autoFocus","beforeShow","afterHide","trigger","passA11yPropsToOverlay","placement","overlay","length","more","t","size","displayName"],"sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import { CaretDown, CaretUp } from '@procore/core-icons/dist'\nimport React from 'react'\n\nimport { useButton } from '@react-aria/button'\nimport { MenuImperative } from '../MenuImperative/MenuImperative'\nimport type { MenuRef, Selection } from '../MenuImperative/MenuImperative.types'\nimport {\n OverlayTrigger,\n useOverlayTriggerContext,\n} from '../OverlayTrigger/OverlayTrigger'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { useResize } from '../_hooks/Resize'\nimport { spacing } from '../_styles/spacing'\nimport { addSubcomponents } from '../_utils/addSubcomponents'\nimport { getBoundingRect } from '../_utils/dom'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport type {\n DivAttributes,\n NavAttributes,\n Props,\n SpanAttributes,\n} from '../_utils/types'\nimport {\n StyledDropdownTab,\n StyledDropdownTabInner,\n StyledLink,\n StyledOverlay,\n StyledTab,\n StyledTabInner,\n StyledTabList,\n StyledTabs,\n} from './Tabs.styles'\nimport type {\n BaseTabProps,\n TabDropdownProps,\n TabProps,\n TabRef,\n TabRole,\n TabRoleType,\n TabsProps,\n} from './Tabs.types'\n\nconst ExtraTabSpacing = spacing.xxl\n\nfunction noop() {}\n\nexport const Link = React.forwardRef<HTMLSpanElement, SpanAttributes & Props>(\n function Link({ children, ...props }, ref) {\n return (\n <StyledLink ref={ref} {...props}>\n {children}\n </StyledLink>\n )\n }\n)\n\nfunction TabInternal(\n {\n as,\n disabled,\n role,\n active = false,\n children,\n onBlur,\n onFocus,\n onMount = noop,\n onUnmount = noop,\n overflowing = false,\n dropdown = false,\n variant = '',\n ...props\n }: TabProps<TabRoleType>,\n ref: TabRef<TabRoleType>\n) {\n const { onPress } = props as TabProps<'button'>\n\n const { buttonProps } = useButton(\n {\n ...props,\n onBlur: onBlur as (e: React.FocusEvent) => void,\n onFocus: onFocus as (e: React.FocusEvent) => void,\n elementType: role === 'link' ? 'a' : role === 'button' ? 'button' : 'div',\n isDisabled: disabled,\n onPress,\n type: 'button',\n },\n ref as any // TODO fix polymorphic type\n )\n\n const a11yProps =\n role === 'button'\n ? {\n ...buttonProps,\n 'aria-current': active,\n as: as || 'button',\n $clickable: !disabled,\n }\n : role === 'link'\n ? {\n ...buttonProps,\n 'aria-current': active,\n as: as || 'a',\n $clickable: !disabled,\n }\n : role === 'tab'\n ? { role: 'tab', onBlur, onFocus }\n : { onBlur, onFocus }\n\n const innerRef = React.useRef<HTMLDivElement>(null)\n\n React.useEffect(() => {\n onMount(innerRef.current)\n return onUnmount\n }, [])\n\n const validChild = React.isValidElement(children)\n const tabActive = active || variant === 'active'\n\n return (\n <StyledTab\n $active={tabActive}\n $dark={props.dark}\n // @ts-ignore\n ref={mergeRefs(ref, innerRef)}\n {...a11yProps}\n {...props}\n >\n <StyledTabInner $active={tabActive} $dark={props.dark}>\n {validChild\n ? React.cloneElement(children as React.ReactElement<any, any>, {\n 'aria-current': tabActive ? true : undefined,\n })\n : children}\n </StyledTabInner>\n </StyledTab>\n )\n}\n\nexport const Tab = React.forwardRef(TabInternal) as <Role extends TabRole>(\n props:\n | TabProps<Role>\n | (BaseTabProps & { ref?: React.ComponentPropsWithRef<'div'>['ref'] })\n) => ReturnType<typeof TabInternal>\n\nexport const MoreMenu = React.forwardRef<\n HTMLDivElement,\n DivAttributes & TabDropdownProps\n>(function MoreMenu({ children, id }, ref) {\n const ctx = useOverlayTriggerContext()\n\n const menuRef = React.useRef<MenuRef | null>(null)\n\n React.useEffect(function () {\n menuRef.current?.el?.focus()\n menuRef.current?.highlightFirst()\n menuRef.current?.highlightSelected()\n }, [])\n\n function onSelect(selection: Selection) {\n ctx.hide(selection.event)\n }\n\n return (\n <StyledOverlay ref={ref}>\n <MenuImperative id={id} role=\"menu\" ref={menuRef} onSelect={onSelect}>\n <MenuImperative.Options>\n {React.Children.map(children, (child, i) => {\n if (React.isValidElement<BaseTabProps>(child)) {\n return (\n <MenuImperative.Item\n item={null}\n key={i}\n selected={child.props.active}\n >\n {React.cloneElement(child as any, { ref: null })}\n </MenuImperative.Item>\n )\n }\n })}\n </MenuImperative.Options>\n </MenuImperative>\n </StyledOverlay>\n )\n})\n\nconst Tabs_ = React.forwardRef<HTMLDivElement, NavAttributes & TabsProps>(\n function Tabs({ children, className, dark = false, qa, ...props }, ref) {\n const i18n = useI18nContext()\n\n const [moreMenuIsShown, setMoreMenuIsShown] = React.useState(false)\n const [tabElements, setTabElements] = React.useState<\n (HTMLDivElement | null)[]\n >([])\n const [cutoffIndex, setCutoffIndex] = React.useState(0)\n\n const containerRef = React.useRef<HTMLDivElement>(null)\n\n function recalculate() {\n const container = getBoundingRect(containerRef.current!)\n\n const { subtotals } = tabElements.reduce(\n (acc, el) => {\n if (!el) {\n return acc\n }\n const rect = getBoundingRect(el)\n return {\n subtotals: [...acc.subtotals, acc.total + rect.width],\n total: acc.total + rect.width + ExtraTabSpacing,\n }\n },\n { subtotals: new Array(), total: 0 }\n )\n\n const index = subtotals.findIndex((val: number) => val >= container.width)\n\n setCutoffIndex(index)\n }\n\n useResize({ onResize: recalculate })\n\n React.useEffect(recalculate)\n\n const filtered = React.Children.toArray(children).filter((child) => child)\n\n const overflowing = filtered.slice(cutoffIndex - 1)\n\n const isOverflowingActive = React.Children.toArray(overflowing).some(\n (child) => React.isValidElement(child) && child.props.active\n )\n\n return (\n <StyledTabs ref={ref} dark={dark} index={cutoffIndex} {...props}>\n <StyledTabList ref={containerRef}>\n {filtered.map((child, i) => {\n if (React.isValidElement(child))\n return React.cloneElement(child, {\n dark,\n onMount: (el: HTMLDivElement) => {\n setTabElements((elements) => {\n const oldElements = [...elements]\n oldElements[i] = el\n return oldElements\n })\n },\n onUnmount: () => {\n setTabElements((elements) => {\n const oldElements = [...elements]\n oldElements[i] = null\n return oldElements\n })\n },\n } as any) // TODO fix type\n })}\n\n <OverlayTrigger\n autoFocus\n beforeShow={() => setMoreMenuIsShown(true)}\n afterHide={() => setMoreMenuIsShown(false)}\n trigger=\"click\"\n passA11yPropsToOverlay\n placement=\"bottom-right\"\n overlay={<MoreMenu>{overflowing}</MoreMenu>}\n ref={ref}\n role=\"menu\"\n >\n <StyledDropdownTab\n $active={isOverflowingActive}\n $dark={dark}\n aria-hidden={!overflowing.length}\n as=\"button\"\n >\n <StyledDropdownTabInner\n $active={isOverflowingActive}\n $dark={dark}\n >\n <StyledLink data-qa={qa?.more}>\n {i18n.t('core.tabs.more')}\n </StyledLink>\n {moreMenuIsShown ? (\n <CaretUp size=\"sm\" />\n ) : (\n <CaretDown size=\"sm\" />\n )}\n </StyledDropdownTabInner>\n </StyledDropdownTab>\n </OverlayTrigger>\n </StyledTabList>\n </StyledTabs>\n )\n }\n)\n\nTabs_.displayName = 'Tabs'\n\nLink.displayName = 'Tabs.Link'\n\n// @ts-ignore\nTab.displayName = 'Tabs.Tab'\n\n/**\n\n We use tabs to navigate between different, but related content.\n Tabs are commonly used on tool landing pages and on item detail pages.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-tabs--demo)\n\n @see [Design Guidelines](https://design.procore.com/tabs)\n\n */\nexport const Tabs = addSubcomponents(\n {\n Link,\n Tab,\n },\n Tabs_\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,0BAA0B;AAC7D,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,cAAc,QAAQ,kCAAkC;AAEjE,SACEC,cAAc,EACdC,wBAAwB,QACnB,kCAAkC;AACzC,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,eAAe,QAAQ,eAAe;AAC/C,SAASC,SAAS,Q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 +1,20 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledLink: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
3
|
-
export declare const StyledTab: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
export declare const StyledTab: import("styled-components").StyledComponent<"div", any, {
|
|
4
|
+
$active?: boolean | undefined;
|
|
5
|
+
$dark?: boolean | undefined;
|
|
6
|
+
}, never>;
|
|
4
7
|
export declare const StyledTabInner: import("styled-components").StyledComponent<"div", any, {
|
|
5
|
-
active?: boolean | undefined;
|
|
6
|
-
dark?: boolean | undefined;
|
|
8
|
+
$active?: boolean | undefined;
|
|
9
|
+
$dark?: boolean | undefined;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const StyledDropdownTab: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
+
$active?: boolean | undefined;
|
|
13
|
+
$dark?: boolean | undefined;
|
|
7
14
|
}, never>;
|
|
8
|
-
export declare const StyledDropdownTab: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
15
|
export declare const StyledDropdownTabInner: import("styled-components").StyledComponent<"div", any, {
|
|
10
|
-
active?: boolean | undefined;
|
|
11
|
-
dark?: boolean | undefined;
|
|
16
|
+
$active?: boolean | undefined;
|
|
17
|
+
$dark?: boolean | undefined;
|
|
12
18
|
}, never>;
|
|
13
19
|
export declare const StyledOverlay: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../_utils/types").DivAttributes & import("..").CardProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
14
20
|
export declare const StyledTabList: import("styled-components").StyledComponent<"div", any, {}, never>;
|