@procore/core-react 10.22.2-rc.3 → 10.23.0-rc.4
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/Tearsheet/Tearsheet.constants.d.ts +9 -0
- package/dist/esm/components/Tearsheet/Tearsheet.constants.js +24 -0
- package/dist/esm/components/Tearsheet/Tearsheet.constants.js.map +1 -0
- package/dist/esm/components/Tearsheet/Tearsheet.d.ts +14 -0
- package/dist/esm/components/Tearsheet/Tearsheet.js +183 -0
- package/dist/esm/components/Tearsheet/Tearsheet.js.map +1 -0
- package/dist/esm/components/Tearsheet/Tearsheet.styles.d.ts +20 -0
- package/dist/esm/components/Tearsheet/Tearsheet.styles.js +72 -0
- package/dist/esm/components/Tearsheet/Tearsheet.styles.js.map +1 -0
- package/dist/esm/components/Tearsheet/Tearsheet.types.d.ts +42 -0
- package/dist/esm/components/Tearsheet/Tearsheet.types.js +2 -0
- package/dist/esm/components/Tearsheet/Tearsheet.types.js.map +1 -0
- package/dist/esm/components/Tearsheet/Tearsheet.util.d.ts +8 -0
- package/dist/esm/components/Tearsheet/Tearsheet.util.js +58 -0
- package/dist/esm/components/Tearsheet/Tearsheet.util.js.map +1 -0
- package/dist/esm/components/Tearsheet/index.d.ts +1 -0
- package/dist/esm/components/Tearsheet/index.js +2 -0
- package/dist/esm/components/Tearsheet/index.js.map +1 -0
- package/dist/esm/components/Tearsheet/storybook/PageLayoutDemo.d.ts +2 -0
- package/dist/esm/components/Tearsheet/storybook/PageLayoutDemo.js +84 -0
- package/dist/esm/components/Tearsheet/storybook/PageLayoutDemo.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layouts/PageLayout/PageLayout.js +8 -5
- package/dist/esm/layouts/PageLayout/PageLayout.js.map +1 -1
- package/dist/esm/layouts/PageLayout/PageLayout.styles.js +3 -3
- package/dist/esm/layouts/PageLayout/PageLayout.styles.js.map +1 -1
- package/dist/esm/utils/propsTypedoc.d.ts +1 -0
- package/dist/esm/utils/propsTypedoc.js +1 -0
- package/dist/esm/utils/propsTypedoc.js.map +1 -1
- package/dist/typedoc/components/Avatar/Avatar.types.json +17 -17
- package/dist/typedoc/components/AvatarStack/AvatarStack.types.json +22 -22
- 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 +684 -684
- 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 +15 -15
- package/dist/typedoc/components/Tearsheet/Tearsheet.types.json +78 -0
- 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 +66 -66
- 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.d3feebe8.iframe.bundle.js +1 -0
- package/storybook-static/main.ba7289c1.iframe.bundle.js +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AnimationPhase } from './Tearsheet.types';
|
|
2
|
+
export declare const animationSpeed: {
|
|
3
|
+
readonly disabled: 0;
|
|
4
|
+
readonly tearsheet: number;
|
|
5
|
+
readonly scrim: number;
|
|
6
|
+
readonly closeButton: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const openingPhasesInOrder: AnimationPhase[];
|
|
9
|
+
export declare const closingPhasesInOrder: AnimationPhase[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
import { animationSpeed as baseAnimationSpeed } from './Tearsheet.styles';
|
|
11
|
+
var toMilliseconds = function (v) { return v * 1000; };
|
|
12
|
+
export var animationSpeed = {
|
|
13
|
+
disabled: 0,
|
|
14
|
+
tearsheet: toMilliseconds(baseAnimationSpeed.tearsheet),
|
|
15
|
+
scrim: toMilliseconds(baseAnimationSpeed.scrim),
|
|
16
|
+
closeButton: toMilliseconds(baseAnimationSpeed.closeButton),
|
|
17
|
+
};
|
|
18
|
+
export var openingPhasesInOrder = [
|
|
19
|
+
'scrim',
|
|
20
|
+
'tearsheet',
|
|
21
|
+
'closeButton',
|
|
22
|
+
];
|
|
23
|
+
export var closingPhasesInOrder = __spreadArray([], openingPhasesInOrder, true).reverse();
|
|
24
|
+
//# sourceMappingURL=Tearsheet.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tearsheet.constants.js","sourceRoot":"","sources":["../../../../src/components/Tearsheet/Tearsheet.constants.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAGzE,IAAM,cAAc,GAAG,UAAC,CAAS,IAAK,OAAA,CAAC,GAAG,IAAI,EAAR,CAAQ,CAAA;AAE9C,MAAM,CAAC,IAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC,SAAS,CAAC;IACvD,KAAK,EAAE,cAAc,CAAC,kBAAkB,CAAC,KAAK,CAAC;IAC/C,WAAW,EAAE,cAAc,CAAC,kBAAkB,CAAC,WAAW,CAAC;CACnD,CAAA;AAEV,MAAM,CAAC,IAAM,oBAAoB,GAAqB;IACpD,OAAO;IACP,WAAW;IACX,aAAa;CACd,CAAA;AACD,MAAM,CAAC,IAAM,oBAAoB,GAAG,kBAAI,oBAAoB,QAAE,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TearsheetProps } from './Tearsheet.types';
|
|
3
|
+
/**
|
|
4
|
+
|
|
5
|
+
The Tearsheet is a container for complex content placed over another layout,
|
|
6
|
+
such as the Detail Page layout. They slide out from one direction on the screen.
|
|
7
|
+
They allow users complete complex and detail rich tasks without leaving the page they were on.
|
|
8
|
+
|
|
9
|
+
@since 10.22.0
|
|
10
|
+
|
|
11
|
+
@see [Storybook](https://procore.github.io/core/latest/?path=/story/demos-tearsheet--demo)
|
|
12
|
+
|
|
13
|
+
*/
|
|
14
|
+
export declare const Tearsheet: React.ForwardRefExoticComponent<TearsheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import React from 'react';
|
|
49
|
+
import { Portal } from '../Portal';
|
|
50
|
+
import { StyledModal, StyledModalScrim } from '../Modal/Modal.styles';
|
|
51
|
+
import Button from '../Button';
|
|
52
|
+
import { StyledTearsheetBody, StyledTearsheetContent, StyledCard, } from './Tearsheet.styles';
|
|
53
|
+
import { Clear } from '@procore/core-icons/dist';
|
|
54
|
+
import { getAnimationState, getScrimClassName, wait } from './Tearsheet.util';
|
|
55
|
+
import { animationSpeed, closingPhasesInOrder, openingPhasesInOrder, } from './Tearsheet.constants';
|
|
56
|
+
import { useHotkey } from '../../effects/Hotkey';
|
|
57
|
+
/**
|
|
58
|
+
|
|
59
|
+
The Tearsheet is a container for complex content placed over another layout,
|
|
60
|
+
such as the Detail Page layout. They slide out from one direction on the screen.
|
|
61
|
+
They allow users complete complex and detail rich tasks without leaving the page they were on.
|
|
62
|
+
|
|
63
|
+
@since 10.22.0
|
|
64
|
+
|
|
65
|
+
@see [Storybook](https://procore.github.io/core/latest/?path=/story/demos-tearsheet--demo)
|
|
66
|
+
|
|
67
|
+
*/
|
|
68
|
+
export var Tearsheet = React.forwardRef(function Tearsheet(_a, ref) {
|
|
69
|
+
var _this = this;
|
|
70
|
+
var children = _a.children, open = _a.open, onClose = _a.onClose, afterShow = _a.afterShow, afterHide = _a.afterHide, _b = _a.placement, placement = _b === void 0 ? 'right' : _b, qa = _a.qa;
|
|
71
|
+
var _c = React.useState('closed'), status = _c[0], setStatus = _c[1];
|
|
72
|
+
var _d = React.useState('disabled'), phase = _d[0], setPhase = _d[1];
|
|
73
|
+
var _e = React.useState(open), isVisible = _e[0], setIsVisible = _e[1];
|
|
74
|
+
var closeBtnRef = React.useRef(null);
|
|
75
|
+
var preventAnimationRef = React.useRef(!open);
|
|
76
|
+
React.useEffect(function () {
|
|
77
|
+
;
|
|
78
|
+
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
79
|
+
return __generator(this, function (_a) {
|
|
80
|
+
switch (_a.label) {
|
|
81
|
+
case 0: return [4 /*yield*/, wait(50)];
|
|
82
|
+
case 1:
|
|
83
|
+
_a.sent();
|
|
84
|
+
preventAnimationRef.current = false;
|
|
85
|
+
return [2 /*return*/];
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}); })();
|
|
89
|
+
}, []);
|
|
90
|
+
/**
|
|
91
|
+
* This prevents "closing" animation from being performed on mount.
|
|
92
|
+
*
|
|
93
|
+
* When `open` is **initially** set to `true`, "closing" animation will run because it is required
|
|
94
|
+
* to open tearsheet.
|
|
95
|
+
* When `open` is **initially** set to `false`, "closing" animation will run needlessly in background,
|
|
96
|
+
* causing UI issues if a user opens up the tearsheet up immediately.
|
|
97
|
+
*/
|
|
98
|
+
React.useEffect(function () {
|
|
99
|
+
if (!open && preventAnimationRef.current) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
setStatus(open ? 'opening' : 'closing');
|
|
103
|
+
}, [open]);
|
|
104
|
+
function handleClose() {
|
|
105
|
+
if (status === 'open') {
|
|
106
|
+
onClose();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
useHotkey({
|
|
110
|
+
key: ['Escape', 'Esc'],
|
|
111
|
+
handler: handleClose,
|
|
112
|
+
});
|
|
113
|
+
React.useEffect(function () {
|
|
114
|
+
;
|
|
115
|
+
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
116
|
+
var _i, openingPhasesInOrder_1, openingPhase, _a, closingPhasesInOrder_1, closingPhase;
|
|
117
|
+
var _b;
|
|
118
|
+
return __generator(this, function (_c) {
|
|
119
|
+
switch (_c.label) {
|
|
120
|
+
case 0:
|
|
121
|
+
if (!(status === 'opening')) return [3 /*break*/, 6];
|
|
122
|
+
setIsVisible(true);
|
|
123
|
+
_i = 0, openingPhasesInOrder_1 = openingPhasesInOrder;
|
|
124
|
+
_c.label = 1;
|
|
125
|
+
case 1:
|
|
126
|
+
if (!(_i < openingPhasesInOrder_1.length)) return [3 /*break*/, 4];
|
|
127
|
+
openingPhase = openingPhasesInOrder_1[_i];
|
|
128
|
+
setPhase(openingPhase);
|
|
129
|
+
return [4 /*yield*/, wait(animationSpeed[openingPhase])];
|
|
130
|
+
case 2:
|
|
131
|
+
_c.sent();
|
|
132
|
+
_c.label = 3;
|
|
133
|
+
case 3:
|
|
134
|
+
_i++;
|
|
135
|
+
return [3 /*break*/, 1];
|
|
136
|
+
case 4:
|
|
137
|
+
setStatus('open');
|
|
138
|
+
setPhase('disabled');
|
|
139
|
+
(_b = closeBtnRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
140
|
+
return [4 /*yield*/, wait(0)];
|
|
141
|
+
case 5:
|
|
142
|
+
_c.sent();
|
|
143
|
+
afterShow === null || afterShow === void 0 ? void 0 : afterShow();
|
|
144
|
+
return [2 /*return*/];
|
|
145
|
+
case 6:
|
|
146
|
+
if (!(status === 'closing')) return [3 /*break*/, 11];
|
|
147
|
+
_a = 0, closingPhasesInOrder_1 = closingPhasesInOrder;
|
|
148
|
+
_c.label = 7;
|
|
149
|
+
case 7:
|
|
150
|
+
if (!(_a < closingPhasesInOrder_1.length)) return [3 /*break*/, 10];
|
|
151
|
+
closingPhase = closingPhasesInOrder_1[_a];
|
|
152
|
+
setPhase(closingPhase);
|
|
153
|
+
return [4 /*yield*/, wait(animationSpeed[closingPhase])];
|
|
154
|
+
case 8:
|
|
155
|
+
_c.sent();
|
|
156
|
+
_c.label = 9;
|
|
157
|
+
case 9:
|
|
158
|
+
_a++;
|
|
159
|
+
return [3 /*break*/, 7];
|
|
160
|
+
case 10:
|
|
161
|
+
setStatus('closed');
|
|
162
|
+
setPhase('disabled');
|
|
163
|
+
setIsVisible(false);
|
|
164
|
+
afterHide === null || afterHide === void 0 ? void 0 : afterHide();
|
|
165
|
+
_c.label = 11;
|
|
166
|
+
case 11: return [2 /*return*/];
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}); })();
|
|
170
|
+
}, [status]);
|
|
171
|
+
if (!isVisible) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
return (React.createElement(Portal, null,
|
|
175
|
+
React.createElement(StyledModal, { ref: ref, className: getScrimClassName(status, phase) },
|
|
176
|
+
React.createElement(StyledModalScrim, null),
|
|
177
|
+
React.createElement(StyledTearsheetContent, __assign({ ref: ref, "$placement": placement }, getAnimationState('tearsheet', phase, status)),
|
|
178
|
+
React.createElement("div", { onClick: handleClose, "data-qa": qa === null || qa === void 0 ? void 0 : qa.scrim },
|
|
179
|
+
React.createElement(StyledCard, __assign({}, getAnimationState('closeButton', phase, status)),
|
|
180
|
+
React.createElement(Button, { ref: closeBtnRef, onClick: onClose, size: "lg", variant: "tertiary", icon: React.createElement(Clear, null), "data-qa": qa === null || qa === void 0 ? void 0 : qa.closeButton }))),
|
|
181
|
+
React.createElement(StyledTearsheetBody, { "$placement": placement }, children)))));
|
|
182
|
+
});
|
|
183
|
+
//# sourceMappingURL=Tearsheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tearsheet.js","sourceRoot":"","sources":["../../../../src/components/Tearsheet/Tearsheet.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,GACX,MAAM,oBAAoB,CAAA;AAM3B,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC7E,OAAO,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Q,CAAC,CAAA;wBACnB,QAAQ,CAAC,UAAU,CAAC,CAAA;wBACpB,YAAY,CAAC,KAAK,CAAC,CAAA;wBACnB,SAAS,aAAT,SAAS,uBAAT,SAAS,EAAI,CAAA;;;;;aAEhB,CAAC,EAAE,CAAA;IACN,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,CACL,oBAAC,MAAM;QACL,oBAAC,WAAW,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC;YAChE,oBAAC,gBAAgB,OAAG;YACpB,oBAAC,sBAAsB,aACrB,GAAG,EAAE,GAAG,gBACI,SAAS,IACjB,iBAAiB,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC;gBAEjD,6BAAK,OAAO,EAAE,WAAW,aAAW,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,KAAK;oBAC3C,oBAAC,UAAU,eAAK,iBAAiB,CAAC,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC;wBAC7D,oBAAC,MAAM,IACL,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,UAAU,EAClB,IAAI,EAAE,oBAAC,KAAK,OAAG,aACN,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,WAAW,GACxB,CACS,CACT;gBACN,oBAAC,mBAAmB,kBAAa,SAAS,IACvC,QAAQ,CACW,CACC,CACb,CACP,CACV,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Placement } from './Tearsheet.types';
|
|
2
|
+
export declare const animationSpeed: {
|
|
3
|
+
tearsheet: number;
|
|
4
|
+
scrim: number;
|
|
5
|
+
closeButton: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const StyledTearsheetContent: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
$placement: Placement;
|
|
9
|
+
$open: boolean;
|
|
10
|
+
$opening?: boolean | undefined;
|
|
11
|
+
$closing?: boolean | undefined;
|
|
12
|
+
}, never>;
|
|
13
|
+
export declare const StyledTearsheetBody: import("styled-components").StyledComponent<"div", any, {
|
|
14
|
+
$placement: Placement;
|
|
15
|
+
}, never>;
|
|
16
|
+
export declare const StyledCard: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../utils/types").DivAttributes & import("../Card").CardProps & import("react").RefAttributes<HTMLDivElement>>, any, {
|
|
17
|
+
$open: boolean;
|
|
18
|
+
$opening?: boolean | undefined;
|
|
19
|
+
$closing?: boolean | undefined;
|
|
20
|
+
}, never>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import styled, { css } from 'styled-components';
|
|
6
|
+
import { spacing } from '../../styles/spacing';
|
|
7
|
+
import Card from '../Card';
|
|
8
|
+
import { getShadow } from '../../styles/shadows';
|
|
9
|
+
import { colors } from '../../styles/colors';
|
|
10
|
+
export var animationSpeed = {
|
|
11
|
+
tearsheet: 0.8,
|
|
12
|
+
scrim: 0.3,
|
|
13
|
+
closeButton: 0.15,
|
|
14
|
+
};
|
|
15
|
+
var slideDistance = '100%';
|
|
16
|
+
var positioningProps = {
|
|
17
|
+
right: {
|
|
18
|
+
open: "translateX(0);",
|
|
19
|
+
closed: "translateX(".concat(slideDistance, ");"),
|
|
20
|
+
placement: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: row;\n justify-content: flex-end;\n "], ["\n flex-direction: row;\n justify-content: flex-end;\n "]))),
|
|
21
|
+
shadow: getShadow(4, 'left'),
|
|
22
|
+
},
|
|
23
|
+
top: {
|
|
24
|
+
open: "translateY(0);",
|
|
25
|
+
closed: "translateY(-".concat(slideDistance, ");"),
|
|
26
|
+
placement: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex-direction: column-reverse;\n justify-content: flex-end;\n "], ["\n flex-direction: column-reverse;\n justify-content: flex-end;\n "]))),
|
|
27
|
+
shadow: getShadow(4, 'bottom'),
|
|
28
|
+
},
|
|
29
|
+
bottom: {
|
|
30
|
+
open: "translateY(0);",
|
|
31
|
+
closed: "translateY(".concat(slideDistance, ");"),
|
|
32
|
+
placement: css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: column;\n justify-content: flex-end;\n "], ["\n flex-direction: column;\n justify-content: flex-end;\n "]))),
|
|
33
|
+
shadow: getShadow(4, 'top'),
|
|
34
|
+
},
|
|
35
|
+
left: {
|
|
36
|
+
open: "translateX(0);",
|
|
37
|
+
closed: "translateX(-".concat(slideDistance, ");"),
|
|
38
|
+
placement: css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-direction: row-reverse;\n justify-content: flex-end;\n "], ["\n flex-direction: row-reverse;\n justify-content: flex-end;\n "]))),
|
|
39
|
+
shadow: getShadow(4, 'right'),
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export var StyledTearsheetContent = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n display: flex;\n z-index: 2;\n width: 100%;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"], ["\n display: flex;\n z-index: 2;\n width: 100%;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
43
|
+
var $open = _a.$open, $placement = _a.$placement;
|
|
44
|
+
return $open
|
|
45
|
+
? css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n transform: ", ";\n "], ["\n transform: ", ";\n "])), positioningProps[$placement].open) : css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n transform: ", ";\n "], ["\n transform: ", ";\n "])), positioningProps[$placement].closed);
|
|
46
|
+
}, function (_a) {
|
|
47
|
+
var $placement = _a.$placement;
|
|
48
|
+
return positioningProps[$placement].placement;
|
|
49
|
+
}, function (_a) {
|
|
50
|
+
var $placement = _a.$placement;
|
|
51
|
+
return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n @keyframes slideIn {\n from {\n transform: ", ";\n }\n to {\n transform: ", ";\n }\n }\n\n @keyframes slideOut {\n from {\n transform: ", ";\n }\n to {\n transform: ", ";\n }\n }\n "], ["\n @keyframes slideIn {\n from {\n transform: ", ";\n }\n to {\n transform: ", ";\n }\n }\n\n @keyframes slideOut {\n from {\n transform: ", ";\n }\n to {\n transform: ", ";\n }\n }\n "])), positioningProps[$placement].closed, positioningProps[$placement].open, positioningProps[$placement].open, positioningProps[$placement].closed);
|
|
52
|
+
}, function (_a) {
|
|
53
|
+
var $opening = _a.$opening, $placement = _a.$placement;
|
|
54
|
+
return $opening && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n animation: slideIn ", "s ease-out;\n transform: ", ";\n "], ["\n animation: slideIn ", "s ease-out;\n transform: ", ";\n "])), animationSpeed.tearsheet, positioningProps[$placement].open);
|
|
55
|
+
}, function (_a) {
|
|
56
|
+
var $closing = _a.$closing, $placement = _a.$placement;
|
|
57
|
+
return $closing && css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n animation: slideOut ", "s ease-out;\n transform: ", ";\n "], ["\n animation: slideOut ", "s ease-out;\n transform: ", ";\n "])), animationSpeed.tearsheet, positioningProps[$placement].closed);
|
|
58
|
+
});
|
|
59
|
+
export var StyledTearsheetBody = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: flex;\n overflow-y: auto;\n flex-direction: column;\n background-color: ", ";\n"], ["\n display: flex;\n overflow-y: auto;\n flex-direction: column;\n background-color: ", ";\n"])), colors.white);
|
|
60
|
+
export var StyledCard = styled(Card)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: inline-flex;\n margin: ", "px;\n\n ", "\n\n @keyframes zoomIn {\n from {\n transform: scale(0);\n }\n to {\n transform: scale(1);\n }\n }\n\n @keyframes zoomOut {\n from {\n transform: scale(1);\n }\n to {\n transform: scale(0);\n }\n }\n\n ", "\n\n ", "\n"], ["\n display: inline-flex;\n margin: ", "px;\n\n ", "\n\n @keyframes zoomIn {\n from {\n transform: scale(0);\n }\n to {\n transform: scale(1);\n }\n }\n\n @keyframes zoomOut {\n from {\n transform: scale(1);\n }\n to {\n transform: scale(0);\n }\n }\n\n ", "\n\n ", "\n"])), spacing.xl, function (_a) {
|
|
61
|
+
var $open = _a.$open;
|
|
62
|
+
return $open
|
|
63
|
+
? css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n transform: scale(1);\n "], ["\n transform: scale(1);\n "]))) : css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n transform: scale(0);\n "], ["\n transform: scale(0);\n "])));
|
|
64
|
+
}, function (_a) {
|
|
65
|
+
var $opening = _a.$opening;
|
|
66
|
+
return $opening && css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n animation: zoomIn ", "s;\n transform: scale(1);\n "], ["\n animation: zoomIn ", "s;\n transform: scale(1);\n "])), animationSpeed.closeButton);
|
|
67
|
+
}, function (_a) {
|
|
68
|
+
var $closing = _a.$closing;
|
|
69
|
+
return $closing && css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n animation: zoomOut ", "s;\n transform: scale(0);\n "], ["\n animation: zoomOut ", "s;\n transform: scale(0);\n "])), animationSpeed.closeButton);
|
|
70
|
+
});
|
|
71
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16;
|
|
72
|
+
//# sourceMappingURL=Tearsheet.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tearsheet.styles.js","source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AAc,CAAC,SAAS,EACjC,gBAAgB,CAAC,UAAU,CAAC,CAAC,MAAM,CACjD;AAJD,CAIC,CACJ,CAAA;AAED,MAAM,CAAC,IAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,sKAE3C,0FAIoB,EAAY,KACjC,KADqB,MAAM,CAAC,KAAK,CACjC,CAAA;AAED,MAAM,CAAC,IAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,wYAIpC,uCAEU,EAAU,WAElB,EAOK,6PAoBL,EAKC,QAED,EAKC,IACJ,KA1CW,OAAO,CAAC,EAAE,EAElB,UAAC,EAAS;QAAP,KAAK,WAAA;IACR,OAAA,KAAK;QACH,CAAC,CAAC,GAAG,iHAAA,4CAEF,KACH,CAAC,CAAC,GAAG,iHAAA,4CAEF,IAAA;AANL,CAMK,EAoBL,UAAC,EAAY;QAAV,QAAQ,cAAA;IACX,OAAA,QAAQ,IACR,GAAG,yIAAA,4BACmB,EAA0B,sCAE/C,KAFqB,cAAc,CAAC,WAAW,CAE/C;AAJD,CAIC,EAED,UAAC,EAAY;QAAV,QAAQ,cAAA;IACX,OAAA,QAAQ,IACR,GAAG,0IAAA,6BACoB,EAA0B,sCAEhD,KAFsB,cAAc,CAAC,WAAW,CAEhD;AAJD,CAIC,CACJ,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type AnimationStatus = 'opening' | 'closing' | 'open' | 'closed';
|
|
3
|
+
export declare type AnimationPhase = 'tearsheet' | 'closeButton' | 'scrim' | 'disabled';
|
|
4
|
+
interface QaTags {
|
|
5
|
+
closeButton?: string;
|
|
6
|
+
scrim?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface TearsheetProps {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* A controlled prop defining open/close state of the tearsheet.
|
|
12
|
+
* @since 10.22.0
|
|
13
|
+
*/
|
|
14
|
+
open: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* A required callback to be called when "close" button is clicked. Should set "open" flag to "false".
|
|
17
|
+
* @since 10.22.0
|
|
18
|
+
*/
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* A callback to be called when "open" animation is finished.
|
|
22
|
+
* @since 10.22.0
|
|
23
|
+
*/
|
|
24
|
+
afterShow?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* A callback to be called when "close" animation is finished.
|
|
27
|
+
* @since 10.22.0
|
|
28
|
+
*/
|
|
29
|
+
afterHide?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Tearsheet placement
|
|
32
|
+
* @since 10.22.0
|
|
33
|
+
*/
|
|
34
|
+
placement?: Placement;
|
|
35
|
+
/**
|
|
36
|
+
* QA tags
|
|
37
|
+
* @since 10.22.0
|
|
38
|
+
*/
|
|
39
|
+
qa?: QaTags;
|
|
40
|
+
}
|
|
41
|
+
export declare type Placement = 'right' | 'left' | 'top' | 'bottom';
|
|
42
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tearsheet.types.js","sourceRoot":"","sources":["../../../../src/components/Tearsheet/Tearsheet.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AnimationPhase, AnimationStatus } from './Tearsheet.types';
|
|
2
|
+
export declare const wait: (ms: number) => Promise<unknown>;
|
|
3
|
+
export declare function getScrimClassName(status: AnimationStatus, phase: AnimationPhase): "fade-in" | "fade-out" | undefined;
|
|
4
|
+
export declare function getAnimationState(targetPhase: AnimationPhase, currentPhase: AnimationPhase, status: AnimationStatus): {
|
|
5
|
+
$open: boolean;
|
|
6
|
+
$opening?: boolean;
|
|
7
|
+
$closing?: boolean;
|
|
8
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { fadeInClassName, fadeOutClassName } from '../Modal/Modal.styles';
|
|
2
|
+
import { closingPhasesInOrder, openingPhasesInOrder, } from './Tearsheet.constants';
|
|
3
|
+
export var wait = function (ms) { return new Promise(function (res) { return setTimeout(res, ms); }); };
|
|
4
|
+
function getIsPhaseInProgressOrComplete(targetPhase, currentPhase, status) {
|
|
5
|
+
if (currentPhase === 'disabled') {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
if (status === 'opening') {
|
|
9
|
+
return (openingPhasesInOrder.indexOf(targetPhase) <=
|
|
10
|
+
openingPhasesInOrder.indexOf(currentPhase));
|
|
11
|
+
}
|
|
12
|
+
if (status === 'closing') {
|
|
13
|
+
return (closingPhasesInOrder.indexOf(targetPhase) <=
|
|
14
|
+
closingPhasesInOrder.indexOf(currentPhase));
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
export function getScrimClassName(status, phase) {
|
|
19
|
+
if (status === 'open') {
|
|
20
|
+
return fadeInClassName;
|
|
21
|
+
}
|
|
22
|
+
if (status === 'closed') {
|
|
23
|
+
return fadeOutClassName;
|
|
24
|
+
}
|
|
25
|
+
if (status === 'closing') {
|
|
26
|
+
return getIsPhaseInProgressOrComplete('scrim', phase, status)
|
|
27
|
+
? fadeOutClassName
|
|
28
|
+
: fadeInClassName;
|
|
29
|
+
}
|
|
30
|
+
if (status === 'opening') {
|
|
31
|
+
return getIsPhaseInProgressOrComplete('scrim', phase, status)
|
|
32
|
+
? fadeInClassName
|
|
33
|
+
: fadeOutClassName;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function getAnimationState(targetPhase, currentPhase, status) {
|
|
37
|
+
if (status === 'open') {
|
|
38
|
+
return { $open: true };
|
|
39
|
+
}
|
|
40
|
+
if (status === 'closed') {
|
|
41
|
+
return { $open: false };
|
|
42
|
+
}
|
|
43
|
+
var inProgressOrComplete = getIsPhaseInProgressOrComplete(targetPhase, currentPhase, status);
|
|
44
|
+
if (status === 'closing') {
|
|
45
|
+
return {
|
|
46
|
+
$open: !inProgressOrComplete,
|
|
47
|
+
$closing: targetPhase === currentPhase,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (status === 'opening') {
|
|
51
|
+
return {
|
|
52
|
+
$open: inProgressOrComplete,
|
|
53
|
+
$opening: targetPhase === currentPhase,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return { $open: false };
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=Tearsheet.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tearsheet.util.js","sourceRoot":"","sources":["../../../../src/components/Tearsheet/Tearsheet.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,uBAAuB,CAAA;AAG9B,MAAM,CAAC,IAAM,IAAI,GAAG,UAAC,EAAU,IAAK,OAAA,IAAI,OAAO,CAAC,UAAC,GAAG,IAAK,OAAA,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,CAAA;AAE7E,SAAS,8BAA8B,CACrC,WAA2B,EAC3B,YAA4B,EAC5B,MAAuB;IAEvB,IAAI,YAAY,KAAK,UAAU,EAAE;QAC/B,OAAO,KAAK,CAAA;KACb;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,CACL,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC;YACzC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAC3C,CAAA;KACF;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,CACL,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC;YACzC,oBAAoB,CAAC,OAAO,CAAC,YAAY,CAAC,CAC3C,CAAA;KACF;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,MAAuB,EACvB,KAAqB;IAErB,IAAI,MAAM,KAAK,MAAM,EAAE;QACrB,OAAO,eAAe,CAAA;KACvB;IAED,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,OAAO,gBAAgB,CAAA;KACxB;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,8BAA8B,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC;YAC3D,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,eAAe,CAAA;KACpB;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,8BAA8B,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC;YAC3D,CAAC,CAAC,eAAe;YACjB,CAAC,CAAC,gBAAgB,CAAA;KACrB;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,WAA2B,EAC3B,YAA4B,EAC5B,MAAuB;IAEvB,IAAI,MAAM,KAAK,MAAM,EAAE;QACrB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;KACvB;IAED,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;KACxB;IAED,IAAM,oBAAoB,GAAG,8BAA8B,CACzD,WAAW,EACX,YAAY,EACZ,MAAM,CACP,CAAA;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO;YACL,KAAK,EAAE,CAAC,oBAAoB;YAC5B,QAAQ,EAAE,WAAW,KAAK,YAAY;SACvC,CAAA;KACF;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO;YACL,KAAK,EAAE,oBAAoB;YAC3B,QAAQ,EAAE,WAAW,KAAK,YAAY;SACvC,CAAA;KACF;IAED,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tearsheet } from './Tearsheet';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Tearsheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from '../../Button';
|
|
3
|
+
import Modal from '../../Modal';
|
|
4
|
+
import { Page } from '../../../layouts/PageLayout';
|
|
5
|
+
import Breadcrumbs from '../../Breadcrumbs';
|
|
6
|
+
import { H1 } from '../../Semantic';
|
|
7
|
+
import Tabs from '../../Tabs';
|
|
8
|
+
import Card from '../../Card';
|
|
9
|
+
import { exampleText } from '../../_storyHelpers_/constants';
|
|
10
|
+
import { Flex } from '../../../layouts/Flex';
|
|
11
|
+
import { FlexList } from '../../../layouts/FlexList';
|
|
12
|
+
import { Box } from '../../../layouts/Box';
|
|
13
|
+
import { Tab } from '../../Tabs/Tabs';
|
|
14
|
+
import Panel from '../../Panel';
|
|
15
|
+
import Input from '../../Input';
|
|
16
|
+
var longText = exampleText.longest_ipsum;
|
|
17
|
+
var shortText = exampleText.short_sentence;
|
|
18
|
+
var panelContent = (React.createElement(Flex, { direction: "column", alignItems: "center", paddingBottom: "lg", style: { width: '100%' } }, Array.from({ length: 10 }).map(function (_, i) { return (React.createElement("div", { key: "".concat(i, "-content-item"), style: {
|
|
19
|
+
width: '80%',
|
|
20
|
+
height: '100px',
|
|
21
|
+
marginTop: '16px',
|
|
22
|
+
backgroundColor: 'white',
|
|
23
|
+
border: '1px solid lightgray',
|
|
24
|
+
borderRadius: '8px',
|
|
25
|
+
} })); })));
|
|
26
|
+
function PanelSample(_a) {
|
|
27
|
+
var onClose = _a.onClose, footer = _a.hasFooter;
|
|
28
|
+
return (React.createElement(Panel, null,
|
|
29
|
+
React.createElement(Panel.Header, { onClose: onClose },
|
|
30
|
+
React.createElement(Panel.Title, null, "Sample heading")),
|
|
31
|
+
React.createElement(Panel.Body, null, panelContent),
|
|
32
|
+
footer && (React.createElement(Panel.Footer, null,
|
|
33
|
+
React.createElement(Button, null, "Action 3"),
|
|
34
|
+
React.createElement(FlexList, { space: "sm", marginLeft: "auto" },
|
|
35
|
+
React.createElement(Button, { variant: "primary" }, "Action 4"),
|
|
36
|
+
React.createElement(Button, { onClick: onClose, variant: "secondary" }, "Close"))))));
|
|
37
|
+
}
|
|
38
|
+
export var PageLayoutDemo = React.forwardRef(function PageLayoutDemo(props, ref) {
|
|
39
|
+
var _a = React.useState(false), isAsideVisible = _a[0], setIsAsideVisible = _a[1];
|
|
40
|
+
var _b = React.useState(false), isModalVisible = _b[0], setIsModalVisible = _b[1];
|
|
41
|
+
return (React.createElement(React.Fragment, null,
|
|
42
|
+
React.createElement(Modal, { open: isModalVisible },
|
|
43
|
+
React.createElement(Modal.Header, { onClose: function () { return setIsModalVisible(false); } }, shortText),
|
|
44
|
+
React.createElement(Modal.Body, null, longText)),
|
|
45
|
+
React.createElement(Page, null,
|
|
46
|
+
React.createElement(Page.Main, null,
|
|
47
|
+
React.createElement(Page.Header, null,
|
|
48
|
+
React.createElement(Page.Breadcrumbs, null,
|
|
49
|
+
React.createElement(Breadcrumbs, null,
|
|
50
|
+
React.createElement(Breadcrumbs.Crumb, { active: true }, "Tool Name"),
|
|
51
|
+
React.createElement(Breadcrumbs.Crumb, null, "Item"))),
|
|
52
|
+
React.createElement(Page.Title, null,
|
|
53
|
+
React.createElement(H1, null, "Page Title")),
|
|
54
|
+
React.createElement(Page.Tabs, null,
|
|
55
|
+
React.createElement(Tabs, null,
|
|
56
|
+
React.createElement(Tab, { active: true },
|
|
57
|
+
React.createElement(Tabs.Link, null, "Active")),
|
|
58
|
+
React.createElement(Tab, null,
|
|
59
|
+
React.createElement(Tabs.Link, null, "Second")),
|
|
60
|
+
React.createElement(Tab, null,
|
|
61
|
+
React.createElement(Tabs.Link, null, "Third")),
|
|
62
|
+
React.createElement(Tab, null,
|
|
63
|
+
React.createElement(Tabs.Link, null, "Fourth"))))),
|
|
64
|
+
React.createElement(Page.Body, null,
|
|
65
|
+
React.createElement(FlexList, { direction: "column" },
|
|
66
|
+
React.createElement(Card, null,
|
|
67
|
+
React.createElement(Box, { padding: "md" },
|
|
68
|
+
React.createElement(Input, { placeholder: "Hello", ref: ref }))),
|
|
69
|
+
React.createElement(Card, null,
|
|
70
|
+
React.createElement(Box, { padding: "md" }, longText)),
|
|
71
|
+
React.createElement(Card, null,
|
|
72
|
+
React.createElement(Box, { padding: "md" }, longText)),
|
|
73
|
+
React.createElement(Card, null,
|
|
74
|
+
React.createElement(Box, { padding: "md" }, longText)),
|
|
75
|
+
React.createElement(Card, null,
|
|
76
|
+
React.createElement(Box, { padding: "md" }, longText)))),
|
|
77
|
+
React.createElement(Page.Footer, null,
|
|
78
|
+
React.createElement(Box, { padding: "16px", display: "flex" },
|
|
79
|
+
React.createElement(Button, { variant: "secondary", onClick: function () { return setIsModalVisible(true); } }, "Open Modal"),
|
|
80
|
+
React.createElement(Button, { variant: "secondary", onClick: function () { return setIsAsideVisible(true); }, style: { marginLeft: 'auto' } }, "Open Panel")))),
|
|
81
|
+
React.createElement(Page.Aside, { open: isAsideVisible },
|
|
82
|
+
React.createElement(PanelSample, { hasFooter: true, onClose: function () { return setIsAsideVisible(false); } })))));
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=PageLayoutDemo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayoutDemo.js","sourceRoot":"","sources":["../../../../../src/components/Tearsheet/storybook/PageLayoutDemo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,WAAW,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,IAAI,MAAM,YAA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AE,iBAGtB,CACL,CACM,CACJ;YACZ,oBAAC,IAAI,CAAC,KAAK,IAAC,IAAI,EAAE,cAAc;gBAC9B,oBAAC,WAAW,IAAC,SAAS,QAAC,OAAO,EAAE,cAAM,OAAA,iBAAiB,CAAC,KAAK,CAAC,EAAxB,CAAwB,GAAI,CACvD,CACR,CACN,CACJ,CAAA;AACH,CAAC,CACF,CAAA"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export { TableShelf } from './components/TableShelf';
|
|
|
54
54
|
export { default as Tabs } from './components/Tabs';
|
|
55
55
|
export { default as TextArea } from './components/TextArea';
|
|
56
56
|
export { default as TextEditor, TextEditorProvider, } from './components/TextEditor';
|
|
57
|
+
export { Tearsheet } from './components/Tearsheet';
|
|
57
58
|
export { default as Thumbnail } from './components/Thumbnail';
|
|
58
59
|
export { default as TieredDropdown } from './components/TieredDropdown';
|
|
59
60
|
export { default as TieredSelect } from './components/TieredSelect';
|
package/dist/esm/index.js
CHANGED
|
@@ -55,6 +55,7 @@ export { TableShelf } from './components/TableShelf';
|
|
|
55
55
|
export { default as Tabs } from './components/Tabs';
|
|
56
56
|
export { default as TextArea } from './components/TextArea';
|
|
57
57
|
export { default as TextEditor, TextEditorProvider, } from './components/TextEditor';
|
|
58
|
+
export { Tearsheet } from './components/Tearsheet';
|
|
58
59
|
export { default as Thumbnail } from './components/Thumbnail';
|
|
59
60
|
export { default as TieredDropdown } from './components/TieredDropdown';
|
|
60
61
|
export { default as TieredSelect } from './components/TieredSelect';
|