@procore/core-react 10.20.1-rc.23 → 10.20.1-rc.24
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/esm/components/Tabs/Tabs.js +48 -34
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.types.d.ts +5 -1
- package/dist/esm/components/Tabs/Tabs.types.js.map +1 -1
- package/dist/props/Tabs.json +1 -1
- package/dist/props/allProps.json +7604 -7531
- package/dist/typedoc/components/Avatar/Avatar.types.json +17 -17
- package/dist/typedoc/components/AvatarStack/AvatarStack.types.json +20 -20
- package/dist/typedoc/components/Badge/Badge.types.json +6 -6
- package/dist/typedoc/components/Banner/Banner.types.json +12 -12
- package/dist/typedoc/components/Breadcrumbs/Breadcrumbs.types.json +7 -7
- package/dist/typedoc/components/Button/Button.types.json +11 -11
- package/dist/typedoc/components/Calendar/Calendar.types.json +79 -79
- package/dist/typedoc/components/Card/Card.types.json +6 -6
- package/dist/typedoc/components/Checkbox/Checkbox.types.json +7 -7
- package/dist/typedoc/components/ContactItem/ContactItem.types.json +9 -9
- package/dist/typedoc/components/DateInput/DateInput.types.json +35 -35
- package/dist/typedoc/components/DateSelect/DateSelect.types.json +13 -13
- package/dist/typedoc/components/Dropdown/Dropdown.types.json +34 -34
- package/dist/typedoc/components/DropdownFlyout/DropdownFlyout.types.json +32 -32
- package/dist/typedoc/components/Dropzone/Dropzone.types.json +41 -41
- package/dist/typedoc/components/EmptyState/EmptyState.types.json +14 -14
- package/dist/typedoc/components/FileList/FileList.types.json +3 -3
- package/dist/typedoc/components/FileSelect/FileSelect.types.json +25 -25
- package/dist/typedoc/components/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/typedoc/components/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/typedoc/components/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/typedoc/components/Font/Font.types.json +7 -7
- package/dist/typedoc/components/Form/Form.types.json +664 -664
- package/dist/typedoc/components/GroupSelect/GroupSelect.types.json +50 -50
- package/dist/typedoc/components/Icon/Icon.types.json +10 -10
- package/dist/typedoc/components/Input/Input.types.json +2 -2
- package/dist/typedoc/components/Link/Link.types.json +4 -4
- package/dist/typedoc/components/Menu/Menu.types.json +67 -67
- package/dist/typedoc/components/MenuImperative/MenuImperative.types.json +67 -67
- package/dist/typedoc/components/Modal/Modal.types.json +27 -27
- package/dist/typedoc/components/MultiSelect/MultiSelect.types.json +29 -29
- package/dist/typedoc/components/Notation/Notation.types.json +4 -4
- package/dist/typedoc/components/NumberInput/NumberInput.types.json +25 -25
- package/dist/typedoc/components/OverlayTrigger/OverlayTrigger.json +18 -18
- package/dist/typedoc/components/Pagination/Pagination.types.json +8 -8
- package/dist/typedoc/components/Panel/Panel.types.json +17 -17
- package/dist/typedoc/components/Pill/Pill.types.json +1 -1
- package/dist/typedoc/components/PillSelect/PillSelect.types.json +46 -46
- package/dist/typedoc/components/Popover/Popover.types.json +9 -9
- package/dist/typedoc/components/ProgressBar/ProgressBar.types.json +5 -5
- package/dist/typedoc/components/RadioButton/RadioButton.types.json +6 -6
- package/dist/typedoc/components/Required/Required.types.json +5 -5
- package/dist/typedoc/components/Search/Search.types.json +21 -21
- package/dist/typedoc/components/SegmentedController/SegmentedController.types.json +20 -20
- package/dist/typedoc/components/Select/Select.types.json +31 -31
- package/dist/typedoc/components/Slider/Slider.types.json +6 -6
- package/dist/typedoc/components/Spinner/Spinner.types.json +8 -8
- package/dist/typedoc/components/Switch/Switch.types.json +3 -3
- package/dist/typedoc/components/Table/Table.types.json +94 -94
- package/dist/typedoc/components/Tabs/Tabs.types.json +33 -23
- package/dist/typedoc/components/TextArea/TextArea.types.json +3 -3
- package/dist/typedoc/components/TextEditor/TextEditor.types.json +7 -7
- package/dist/typedoc/components/Thumbnail/Thumbnail.types.json +12 -12
- package/dist/typedoc/components/TieredDropdown/TieredDropdown.types.json +41 -41
- package/dist/typedoc/components/TieredSelect/TieredSelect.types.json +27 -27
- package/dist/typedoc/components/Tile/Tile.types.json +30 -30
- package/dist/typedoc/components/Toast/Toast.types.json +4 -4
- package/dist/typedoc/components/ToggleButton/ToggleButton.types.json +3 -3
- package/dist/typedoc/components/Token/Token.types.json +11 -11
- package/dist/typedoc/components/Tooltip/Tooltip.types.json +13 -13
- package/dist/typedoc/components/Tree/Tree.types.json +85 -85
- package/dist/typedoc/components/Typeahead/Typeahead.types.json +2 -2
- package/dist/typedoc/components/Typography/Typography.types.json +8 -8
- package/dist/typedoc/layouts/Box/Box.types.json +71 -71
- package/dist/typedoc/layouts/DetailPage/DetailPage.json +11 -11
- package/dist/typedoc/layouts/Flex/Flex.types.json +26 -26
- package/dist/typedoc/layouts/FlexList/FlexList.types.json +29 -29
- package/dist/typedoc/layouts/Grid/Grid.json +10 -10
- package/dist/typedoc/layouts/LegacyDetailPage/LegacyDetailPage.json +4 -4
- package/dist/typedoc/layouts/ListPage/ListPage.types.json +10 -10
- package/dist/typedoc/layouts/NextDetailPage/NextDetailPage.types.json +4 -4
- package/dist/typedoc/layouts/NextGrid/NextGrid.types.json +8 -8
- package/dist/typedoc/layouts/PageLayout/PageLayout.types.json +7 -7
- package/dist/typedoc/layouts/ToolHeader/ToolHeader.types.json +8 -8
- package/dist/typedoc/utils/types.json +3 -3
- package/package.json +5 -5
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.9e4d71a3.iframe.bundle.js +1 -0
- package/storybook-static/main.8c5a2af5.iframe.bundle.js +0 -1
|
@@ -31,10 +31,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
31
31
|
};
|
|
32
32
|
import { CaretDown, CaretUp } from '@procore/core-icons/dist';
|
|
33
33
|
import React from 'react';
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
34
|
+
import { useResize } from '../../effects/Resize';
|
|
35
|
+
import { mergeRefs } from '../../effects/mergeRefs';
|
|
36
36
|
import { useI18nContext } from '../../state/I18n';
|
|
37
37
|
import { addSubcomponents } from '../../utils/addSubcomponents';
|
|
38
|
+
import { getBoundingRect } from '../../utils/dom';
|
|
38
39
|
import { MenuImperative } from '../MenuImperative';
|
|
39
40
|
import { OverlayTrigger, useOverlayTriggerContext } from '../OverlayTrigger';
|
|
40
41
|
import { StyledDropdownTab, StyledLink, StyledOverlay, StyledTab, StyledTabList, StyledTabs, } from './Tabs.styles';
|
|
@@ -44,17 +45,13 @@ export var Link = React.forwardRef(function Link(_a, ref) {
|
|
|
44
45
|
return (React.createElement(StyledLink, __assign({ ref: ref }, props), children));
|
|
45
46
|
});
|
|
46
47
|
export var Tab = React.forwardRef(function Tab(_a, ref) {
|
|
47
|
-
var _b = _a.active, active = _b === void 0 ? false : _b, children = _a.children, _c = _a.
|
|
48
|
-
var
|
|
48
|
+
var _b = _a.active, active = _b === void 0 ? false : _b, children = _a.children, _c = _a.onMount, onMount = _c === void 0 ? noop : _c, _d = _a.onUnmount, onUnmount = _d === void 0 ? noop : _d, _e = _a.overflowing, overflowing = _e === void 0 ? false : _e, _f = _a.dropdown, dropdown = _f === void 0 ? false : _f, _g = _a.variant, variant = _g === void 0 ? '' : _g, props = __rest(_a, ["active", "children", "onMount", "onUnmount", "overflowing", "dropdown", "variant"]);
|
|
49
|
+
var innerRef = React.useRef(null);
|
|
49
50
|
React.useEffect(function () {
|
|
50
|
-
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
onLayout({});
|
|
55
|
-
};
|
|
56
|
-
}, [rect]);
|
|
57
|
-
return (React.createElement(StyledTab, __assign({}, props, { ref: rectRef, active: active || variant === 'active' }),
|
|
51
|
+
onMount(innerRef.current);
|
|
52
|
+
return onUnmount;
|
|
53
|
+
}, []);
|
|
54
|
+
return (React.createElement(StyledTab, __assign({}, props, { ref: mergeRefs(ref, innerRef), active: active || variant === 'active' }),
|
|
58
55
|
React.createElement("div", { ref: ref }, children)));
|
|
59
56
|
});
|
|
60
57
|
export var MoreMenu = React.forwardRef(function MoreMenu(_a, ref) {
|
|
@@ -81,39 +78,56 @@ export var MoreMenu = React.forwardRef(function MoreMenu(_a, ref) {
|
|
|
81
78
|
var Tabs_ = React.forwardRef(function Tabs(_a, ref) {
|
|
82
79
|
var children = _a.children, className = _a.className, _b = _a.dark, dark = _b === void 0 ? false : _b, qa = _a.qa, props = __rest(_a, ["children", "className", "dark", "qa"]);
|
|
83
80
|
var i18n = useI18nContext();
|
|
84
|
-
var _c = React.useState(
|
|
85
|
-
var _d = React.useState(
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
var _c = React.useState(false), moreMenuIsShown = _c[0], setMoreMenuIsShown = _c[1];
|
|
82
|
+
var _d = React.useState([]), tabElements = _d[0], setTabElements = _d[1];
|
|
83
|
+
var _e = React.useState(0), cutoffIndex = _e[0], setCutoffIndex = _e[1];
|
|
84
|
+
var containerRef = React.useRef(null);
|
|
85
|
+
var dropdownRef = React.useRef(null);
|
|
86
|
+
function recalculate() {
|
|
87
|
+
var container = getBoundingRect(containerRef.current);
|
|
88
|
+
var dropdown = getBoundingRect(dropdownRef.current);
|
|
89
|
+
var subtotals = tabElements.reduce(function (acc, el) {
|
|
90
|
+
if (!el) {
|
|
91
|
+
return acc;
|
|
92
|
+
}
|
|
93
|
+
var rect = getBoundingRect(el);
|
|
94
|
+
return {
|
|
95
|
+
subtotals: __spreadArray(__spreadArray([], acc.subtotals, true), [acc.total + rect.width], false),
|
|
96
|
+
total: acc.total + rect.width,
|
|
97
|
+
};
|
|
98
|
+
}, { subtotals: new Array(), total: 0 }).subtotals;
|
|
99
|
+
var index = subtotals.findIndex(function (val) { return val >= container.width - dropdown.width; });
|
|
100
|
+
setCutoffIndex(index);
|
|
101
|
+
}
|
|
102
|
+
useResize({ onResize: recalculate });
|
|
103
|
+
React.useEffect(recalculate);
|
|
97
104
|
var filtered = React.Children.toArray(children).filter(function (child) { return child; });
|
|
98
|
-
var overflowing = filtered.slice(
|
|
105
|
+
var overflowing = filtered.slice(cutoffIndex - 1);
|
|
99
106
|
var isOverflowingActive = React.Children.toArray(overflowing).some(function (child) { return React.isValidElement(child) && child.props.active; });
|
|
100
|
-
return (React.createElement(StyledTabs, __assign({ ref: ref, dark: dark, index:
|
|
101
|
-
React.createElement(StyledTabList, { ref:
|
|
107
|
+
return (React.createElement(StyledTabs, __assign({ ref: ref, dark: dark, index: cutoffIndex }, props),
|
|
108
|
+
React.createElement(StyledTabList, { ref: containerRef },
|
|
102
109
|
filtered.map(function (child, i) {
|
|
103
110
|
if (React.isValidElement(child))
|
|
104
111
|
return React.cloneElement(child, {
|
|
105
112
|
dark: dark,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
return
|
|
113
|
+
onMount: function (el) {
|
|
114
|
+
setTabElements(function (elements) {
|
|
115
|
+
var oldElements = __spreadArray([], elements, true);
|
|
116
|
+
oldElements[i] = el;
|
|
117
|
+
return oldElements;
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
onUnmount: function () {
|
|
121
|
+
setTabElements(function (elements) {
|
|
122
|
+
var oldElements = __spreadArray([], elements, true);
|
|
123
|
+
oldElements[i] = null;
|
|
124
|
+
return oldElements;
|
|
111
125
|
});
|
|
112
126
|
},
|
|
113
127
|
});
|
|
114
128
|
}),
|
|
115
129
|
React.createElement(OverlayTrigger, { beforeShow: function () { return setMoreMenuIsShown(true); }, afterHide: function () { return setMoreMenuIsShown(false); }, trigger: "click", placement: "bottom-right", overlay: React.createElement(MoreMenu, null, overflowing), ref: ref },
|
|
116
|
-
React.createElement(StyledDropdownTab, { ref:
|
|
130
|
+
React.createElement(StyledDropdownTab, { ref: dropdownRef, active: isOverflowingActive, dark: dark },
|
|
117
131
|
React.createElement(StyledLink, { "data-qa": qa === null || qa === void 0 ? void 0 : qa.more }, i18n.t('core.tabs.more')),
|
|
118
132
|
moreMenuIsShown ? (React.createElement(CaretUp, { size: "sm" })) : (React.createElement(CaretDown, { size: "sm" })))))));
|
|
119
133
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAOjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACb,UAAU,GACX,MAAM,eAAe,CAAA;AAGtB,SAAS,IAAI,KAAI,CAAC;AAElB,MAAM,CAAC,IAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAClC,SAAS,IAAI,CAAC,EAAsB,EAAE,GAAG;IAAzB,IAAA,QAAQ,cAA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
|
*/
|
|
24
|
-
|
|
24
|
+
onMount?: (el: HTMLDivElement | null) => void;
|
|
25
|
+
/**
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
onUnmount?: () => void;
|
|
25
29
|
/**
|
|
26
30
|
* @deprecated This was never intended to be a public facing API and does not
|
|
27
31
|
* do anything. It will be removed in the future.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.types.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tabs.types.js","sourceRoot":"","sources":["../../../../src/components/Tabs/Tabs.types.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,IAAM,UAAU,GAAG;IACxB,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;CAClB,CAAA"}
|
package/dist/props/Tabs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"TabProps":[{"name":"active","type":"boolean","required":false,"description":"The tab is active"},{"name":"children","type":"ReactNode","required":false,"description":"Instead of using the default children, you can pass in your own."},{"name":"className","type":"string","required":false,"description":"Additional classNames"},{"name":"dark","type":"boolean","required":false,"description":"Whether or not tab is in dark mode"},{"name":"dropdown","type":"boolean","required":false,"deprecated":"This was never intended to be a public facing API and does not\ndo anything. It will be removed in the future.\n"},{"name":"
|
|
1
|
+
{"TabProps":[{"name":"active","type":"boolean","required":false,"description":"The tab is active"},{"name":"children","type":"ReactNode","required":false,"description":"Instead of using the default children, you can pass in your own."},{"name":"className","type":"string","required":false,"description":"Additional classNames"},{"name":"dark","type":"boolean","required":false,"description":"Whether or not tab is in dark mode"},{"name":"dropdown","type":"boolean","required":false,"deprecated":"This was never intended to be a public facing API and does not\ndo anything. It will be removed in the future.\n"},{"name":"overflowing","type":"boolean","required":false,"deprecated":"This was never intended to be a public facing API and does not\ndo anything. It will be removed in the future.\n"},{"name":"style","type":"CSSProperties","required":false,"description":"Additional CSS styles"},{"name":"variant","type":"TabVariant","required":false,"deprecated":"please use the `active` and `dark` props to configure style. The\n`dropdown`, `hover`, and `overflowing` variants were only for internal use\nand should not be used in clients\n"},{"name":"onMount","type":"void","required":true},{"name":"onUnmount","type":"void","required":true}],"TabsProps":[{"name":"children","type":"ReactNode","required":false,"description":"Instead of using the default children, you can pass in your own."},{"name":"className","type":"string","required":false,"description":"Additional classNames"},{"name":"dark","type":"boolean","required":false},{"name":"qa","type":"QaTags","required":false},{"name":"style","type":"CSSProperties","required":false,"description":"Additional CSS styles"}]}
|