@mongodb-js/compass-components 1.2.0 → 1.3.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/lib/components/accordion.d.ts.map +1 -1
- package/lib/components/accordion.js +4 -5
- package/lib/components/accordion.js.map +1 -1
- package/lib/components/bson-value.d.ts.map +1 -1
- package/lib/components/bson-value.js +7 -8
- package/lib/components/bson-value.js.map +1 -1
- package/lib/components/cancel-loader.js +1 -1
- package/lib/components/cancel-loader.js.map +1 -1
- package/lib/components/collapsible-field-set.d.ts +2 -4
- package/lib/components/collapsible-field-set.d.ts.map +1 -1
- package/lib/components/collapsible-field-set.js +13 -20
- package/lib/components/collapsible-field-set.js.map +1 -1
- package/lib/components/document-list/document-actions-group.js +1 -1
- package/lib/components/document-list/document-actions-group.js.map +1 -1
- package/lib/components/document-list/document-edit-actions-footer.d.ts.map +1 -1
- package/lib/components/document-list/document-edit-actions-footer.js +11 -9
- package/lib/components/document-list/document-edit-actions-footer.js.map +1 -1
- package/lib/components/document-list/document.js +4 -4
- package/lib/components/document-list/document.js.map +1 -1
- package/lib/components/document-list/element-actions.d.ts.map +1 -1
- package/lib/components/document-list/element-actions.js +6 -5
- package/lib/components/document-list/element-actions.js.map +1 -1
- package/lib/components/document-list/element-editors.d.ts.map +1 -1
- package/lib/components/document-list/element-editors.js +8 -7
- package/lib/components/document-list/element-editors.js.map +1 -1
- package/lib/components/document-list/element.d.ts.map +1 -1
- package/lib/components/document-list/element.js +13 -13
- package/lib/components/document-list/element.js.map +1 -1
- package/lib/components/document-list/typography.d.ts +6 -0
- package/lib/components/document-list/typography.d.ts.map +1 -0
- package/lib/components/document-list/typography.js +10 -0
- package/lib/components/document-list/typography.js.map +1 -0
- package/lib/components/empty-content.d.ts +12 -0
- package/lib/components/empty-content.d.ts.map +1 -0
- package/lib/components/empty-content.js +52 -0
- package/lib/components/empty-content.js.map +1 -0
- package/lib/components/error-warning-summary.d.ts +2 -0
- package/lib/components/error-warning-summary.d.ts.map +1 -1
- package/lib/components/error-warning-summary.js +6 -6
- package/lib/components/error-warning-summary.js.map +1 -1
- package/lib/components/file-input.d.ts.map +1 -1
- package/lib/components/file-input.js +8 -10
- package/lib/components/file-input.js.map +1 -1
- package/lib/components/form-field-container.d.ts +8 -0
- package/lib/components/form-field-container.d.ts.map +1 -0
- package/lib/components/form-field-container.js +16 -0
- package/lib/components/form-field-container.js.map +1 -0
- package/lib/components/icons/document-icon.d.ts +7 -0
- package/lib/components/icons/document-icon.d.ts.map +1 -0
- package/lib/components/icons/document-icon.js +52 -0
- package/lib/components/icons/document-icon.js.map +1 -0
- package/lib/components/icons/favorite-icon.d.ts.map +1 -1
- package/lib/components/icons/favorite-icon.js +2 -3
- package/lib/components/icons/favorite-icon.js.map +1 -1
- package/lib/components/icons/no-saved-items-icon.d.ts +8 -0
- package/lib/components/icons/no-saved-items-icon.d.ts.map +1 -0
- package/lib/components/icons/no-saved-items-icon.js +41 -0
- package/lib/components/icons/no-saved-items-icon.js.map +1 -0
- package/lib/components/interactive-popover.d.ts +3 -4
- package/lib/components/interactive-popover.d.ts.map +1 -1
- package/lib/components/interactive-popover.js +30 -16
- package/lib/components/interactive-popover.js.map +1 -1
- package/lib/components/keyline-card.d.ts +7 -0
- package/lib/components/keyline-card.d.ts.map +1 -0
- package/lib/components/keyline-card.js +28 -0
- package/lib/components/keyline-card.js.map +1 -0
- package/lib/components/leafygreen.d.ts +20 -20
- package/lib/components/leafygreen.d.ts.map +1 -1
- package/lib/components/leafygreen.js +18 -7
- package/lib/components/leafygreen.js.map +1 -1
- package/lib/components/list-editor.d.ts +14 -0
- package/lib/components/list-editor.d.ts.map +1 -0
- package/lib/components/list-editor.js +36 -0
- package/lib/components/list-editor.js.map +1 -0
- package/lib/components/{confirmation-modal.d.ts → modals/confirmation-modal.d.ts} +1 -1
- package/lib/components/modals/confirmation-modal.d.ts.map +1 -0
- package/lib/components/{confirmation-modal.js → modals/confirmation-modal.js} +1 -1
- package/lib/components/modals/confirmation-modal.js.map +1 -0
- package/lib/components/modals/form-modal.d.ts +22 -0
- package/lib/components/modals/form-modal.d.ts.map +1 -0
- package/lib/components/modals/form-modal.js +31 -0
- package/lib/components/modals/form-modal.js.map +1 -0
- package/lib/components/modals/info-modal.d.ts +12 -0
- package/lib/components/modals/info-modal.d.ts.map +1 -0
- package/lib/components/modals/info-modal.js +23 -0
- package/lib/components/modals/info-modal.js.map +1 -0
- package/lib/components/modals/modal-body.d.ts +16 -0
- package/lib/components/modals/modal-body.d.ts.map +1 -0
- package/lib/components/modals/modal-body.js +46 -0
- package/lib/components/modals/modal-body.js.map +1 -0
- package/lib/components/modals/modal-footer-button.d.ts +5 -0
- package/lib/components/modals/modal-footer-button.d.ts.map +1 -0
- package/lib/components/modals/modal-footer-button.js +37 -0
- package/lib/components/modals/modal-footer-button.js.map +1 -0
- package/lib/components/modals/modal-header.d.ts +15 -0
- package/lib/components/modals/modal-header.d.ts.map +1 -0
- package/lib/components/modals/modal-header.js +65 -0
- package/lib/components/modals/modal-header.js.map +1 -0
- package/lib/components/modals/modal.d.ts +7 -0
- package/lib/components/modals/modal.d.ts.map +1 -0
- package/lib/components/{modal.js → modals/modal.js} +9 -3
- package/lib/components/modals/modal.js.map +1 -0
- package/lib/components/placeholder.js +4 -4
- package/lib/components/placeholder.js.map +1 -1
- package/lib/components/resize-handle.d.ts.map +1 -1
- package/lib/components/resize-handle.js +2 -1
- package/lib/components/resize-handle.js.map +1 -1
- package/lib/components/resizeable-sidebar.d.ts.map +1 -1
- package/lib/components/resizeable-sidebar.js +21 -22
- package/lib/components/resizeable-sidebar.js.map +1 -1
- package/lib/components/spin-loader.js +1 -1
- package/lib/components/spin-loader.js.map +1 -1
- package/lib/components/tab-nav-bar.d.ts.map +1 -1
- package/lib/components/tab-nav-bar.js +11 -7
- package/lib/components/tab-nav-bar.js.map +1 -1
- package/lib/components/virtual-grid.d.ts +1 -1
- package/lib/components/workspace-container.d.ts +1 -0
- package/lib/components/workspace-container.d.ts.map +1 -1
- package/lib/components/workspace-container.js +88 -10
- package/lib/components/workspace-container.js.map +1 -1
- package/lib/components/workspace-tabs/tab.d.ts.map +1 -1
- package/lib/components/workspace-tabs/tab.js +26 -27
- package/lib/components/workspace-tabs/tab.js.map +1 -1
- package/lib/components/workspace-tabs/workspace-tabs.d.ts +2 -0
- package/lib/components/workspace-tabs/workspace-tabs.d.ts.map +1 -1
- package/lib/components/workspace-tabs/workspace-tabs.js +10 -8
- package/lib/components/workspace-tabs/workspace-tabs.js.map +1 -1
- package/lib/hooks/use-focus-ring.d.ts.map +1 -1
- package/lib/hooks/use-focus-ring.js +3 -2
- package/lib/hooks/use-focus-ring.js.map +1 -1
- package/lib/hooks/use-theme.d.ts +2 -1
- package/lib/hooks/use-theme.d.ts.map +1 -1
- package/lib/hooks/use-theme.js +9 -6
- package/lib/hooks/use-theme.js.map +1 -1
- package/lib/index.d.ts +15 -11
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +26 -19
- package/lib/index.js.map +1 -1
- package/package.json +37 -41
- package/lib/compass-font-sizes.d.ts +0 -3
- package/lib/compass-font-sizes.d.ts.map +0 -1
- package/lib/compass-font-sizes.js +0 -6
- package/lib/compass-font-sizes.js.map +0 -1
- package/lib/compass-ui-colors.d.ts +0 -7
- package/lib/compass-ui-colors.d.ts.map +0 -1
- package/lib/compass-ui-colors.js +0 -10
- package/lib/compass-ui-colors.js.map +0 -1
- package/lib/components/confirmation-modal.d.ts.map +0 -1
- package/lib/components/confirmation-modal.js.map +0 -1
- package/lib/components/editor.d.ts +0 -36
- package/lib/components/editor.d.ts.map +0 -1
- package/lib/components/editor.js +0 -107
- package/lib/components/editor.js.map +0 -1
- package/lib/components/modal-title.d.ts +0 -5
- package/lib/components/modal-title.d.ts.map +0 -1
- package/lib/components/modal-title.js +0 -18
- package/lib/components/modal-title.js.map +0 -1
- package/lib/components/modal.d.ts +0 -7
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js.map +0 -1
- package/lib/components/toolbar.d.ts +0 -10
- package/lib/components/toolbar.d.ts.map +0 -1
- package/lib/components/toolbar.js +0 -25
- package/lib/components/toolbar.js.map +0 -1
- package/lib/constants/mongodb-ace-theme-query.d.ts +0 -3
- package/lib/constants/mongodb-ace-theme-query.d.ts.map +0 -1
- package/lib/constants/mongodb-ace-theme-query.js +0 -123
- package/lib/constants/mongodb-ace-theme-query.js.map +0 -1
- package/lib/constants/mongodb-ace-theme.d.ts +0 -3
- package/lib/constants/mongodb-ace-theme.d.ts.map +0 -1
- package/lib/constants/mongodb-ace-theme.js +0 -113
- package/lib/constants/mongodb-ace-theme.js.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal } from './modal';
|
|
3
|
+
export declare const Variant: {
|
|
4
|
+
readonly Default: "primary";
|
|
5
|
+
readonly Danger: "danger";
|
|
6
|
+
};
|
|
7
|
+
export declare type Variant = typeof Variant[keyof typeof Variant];
|
|
8
|
+
declare type FormModalProps = React.ComponentProps<typeof Modal> & {
|
|
9
|
+
variant?: Variant;
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
submitButtonText: string;
|
|
13
|
+
cancelButtonText?: string;
|
|
14
|
+
submitDisabled?: boolean;
|
|
15
|
+
scroll?: boolean;
|
|
16
|
+
minBodyHeight?: number;
|
|
17
|
+
onSubmit: () => void;
|
|
18
|
+
onCancel: () => void;
|
|
19
|
+
};
|
|
20
|
+
declare function FormModal({ title, subtitle, submitButtonText, cancelButtonText, submitDisabled, variant, scroll, minBodyHeight, onSubmit, onCancel, children, ...modalProps }: FormModalProps): JSX.Element;
|
|
21
|
+
export { FormModal };
|
|
22
|
+
//# sourceMappingURL=form-modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-modal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/form-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAOhC,eAAO,MAAM,OAAO;;;CAGV,CAAC;AAEX,oBAAY,OAAO,GAAG,OAAO,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAE3D,aAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,GAAG;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAA2B,EAC3B,cAAsB,EACtB,OAAyB,EACzB,MAAa,EACb,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,GAAG,UAAU,EACd,EAAE,cAAc,eAiChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FormModal = exports.Variant = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const button_1 = require("@leafygreen-ui/button");
|
|
9
|
+
const modal_1 = require("./modal");
|
|
10
|
+
const leafygreen_1 = require("../leafygreen");
|
|
11
|
+
const modal_body_1 = require("./modal-body");
|
|
12
|
+
const modal_header_1 = require("./modal-header");
|
|
13
|
+
const modal_footer_button_1 = require("./modal-footer-button");
|
|
14
|
+
exports.Variant = {
|
|
15
|
+
Default: button_1.Variant.Primary,
|
|
16
|
+
Danger: button_1.Variant.Danger,
|
|
17
|
+
};
|
|
18
|
+
function FormModal({ title, subtitle, submitButtonText, cancelButtonText = 'Cancel', submitDisabled = false, variant = exports.Variant.Default, scroll = true, minBodyHeight, onSubmit, onCancel, children, ...modalProps }) {
|
|
19
|
+
return (react_1.default.createElement(modal_1.Modal, { setOpen: onCancel, ...modalProps },
|
|
20
|
+
react_1.default.createElement("form", { onSubmit: (event) => {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
onSubmit();
|
|
23
|
+
} },
|
|
24
|
+
react_1.default.createElement(modal_header_1.ModalHeader, { title: title, subtitle: subtitle, variant: variant }),
|
|
25
|
+
react_1.default.createElement(modal_body_1.ModalBody, { variant: variant, scroll: scroll, minHeight: minBodyHeight }, children),
|
|
26
|
+
react_1.default.createElement(leafygreen_1.ModalFooter, null,
|
|
27
|
+
react_1.default.createElement(modal_footer_button_1.ModalFooterButton, { "data-testid": "submit-button", variant: variant, type: "submit", disabled: submitDisabled }, submitButtonText),
|
|
28
|
+
react_1.default.createElement(modal_footer_button_1.ModalFooterButton, { "data-testid": "cancel-button", onClick: onCancel, variant: "default" }, cancelButtonText)))));
|
|
29
|
+
}
|
|
30
|
+
exports.FormModal = FormModal;
|
|
31
|
+
//# sourceMappingURL=form-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-modal.js","sourceRoot":"","sources":["../../../src/components/modals/form-modal.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,kDAAiE;AACjE,mCAAgC;AAChC,8CAA4C;AAE5C,6CAAyC;AACzC,iDAA6C;AAC7C,+DAA0D;AAE7C,QAAA,OAAO,GAAG;IACrB,OAAO,EAAE,gBAAa,CAAC,OAAO;IAC9B,MAAM,EAAE,gBAAa,CAAC,MAAM;CACpB,CAAC;AAiBX,SAAS,SAAS,CAAC,EACjB,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,GAAG,QAAQ,EAC3B,cAAc,GAAG,KAAK,EACtB,OAAO,GAAG,eAAO,CAAC,OAAO,EACzB,MAAM,GAAG,IAAI,EACb,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,GAAG,UAAU,EACE;IACf,OAAO,CACL,8BAAC,aAAK,IAAC,OAAO,EAAE,QAAQ,KAAM,UAAU;QACtC,wCACE,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAClB,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,QAAQ,EAAE,CAAC;YACb,CAAC;YAED,8BAAC,0BAAW,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAI;YACnE,8BAAC,sBAAS,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,IAClE,QAAQ,CACC;YACZ,8BAAC,wBAAW;gBACV,8BAAC,uCAAiB,mBACJ,eAAe,EAC3B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,cAAc,IAEvB,gBAAgB,CACC;gBACpB,8BAAC,uCAAiB,mBACJ,eAAe,EAC3B,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAC,SAAS,IAEhB,gBAAgB,CACC,CACR,CACT,CACD,CACT,CAAC;AACJ,CAAC;AAEQ,8BAAS"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal } from './modal';
|
|
3
|
+
declare type InfoModalProps = React.ComponentProps<typeof Modal> & {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
showCloseButton?: boolean;
|
|
7
|
+
closeButtonText?: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
declare function InfoModal({ title, subtitle, showCloseButton, closeButtonText, onClose, children, ...modalProps }: InfoModalProps): JSX.Element;
|
|
11
|
+
export { InfoModal };
|
|
12
|
+
//# sourceMappingURL=info-modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info-modal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/info-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAMhC,aAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,GAAG;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,QAAQ,EACR,eAAsB,EACtB,eAAyB,EACzB,OAAO,EACP,QAAQ,EACR,GAAG,UAAU,EACd,EAAE,cAAc,eAwBhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.InfoModal = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
9
|
+
const tokens_1 = require("@leafygreen-ui/tokens");
|
|
10
|
+
const modal_1 = require("./modal");
|
|
11
|
+
const leafygreen_1 = require("../leafygreen");
|
|
12
|
+
const modal_body_1 = require("./modal-body");
|
|
13
|
+
const modal_header_1 = require("./modal-header");
|
|
14
|
+
const modal_footer_button_1 = require("./modal-footer-button");
|
|
15
|
+
function InfoModal({ title, subtitle, showCloseButton = true, closeButtonText = 'Close', onClose, children, ...modalProps }) {
|
|
16
|
+
return (react_1.default.createElement(modal_1.Modal, { setOpen: onClose, contentClassName: (0, emotion_1.cx)(!showCloseButton && (0, emotion_1.css)({ paddingBottom: tokens_1.spacing[5] })), ...modalProps },
|
|
17
|
+
react_1.default.createElement(modal_header_1.ModalHeader, { title: title, subtitle: subtitle }),
|
|
18
|
+
react_1.default.createElement(modal_body_1.ModalBody, null, children),
|
|
19
|
+
showCloseButton && (react_1.default.createElement(leafygreen_1.ModalFooter, null,
|
|
20
|
+
react_1.default.createElement(modal_footer_button_1.ModalFooterButton, { "data-testid": "close-button", onClick: onClose, variant: "default" }, closeButtonText)))));
|
|
21
|
+
}
|
|
22
|
+
exports.InfoModal = InfoModal;
|
|
23
|
+
//# sourceMappingURL=info-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info-modal.js","sourceRoot":"","sources":["../../../src/components/modals/info-modal.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,oDAAiD;AACjD,kDAAgD;AAEhD,mCAAgC;AAChC,8CAA4C;AAC5C,6CAAyC;AACzC,iDAA6C;AAC7C,+DAA0D;AAU1D,SAAS,SAAS,CAAC,EACjB,KAAK,EACL,QAAQ,EACR,eAAe,GAAG,IAAI,EACtB,eAAe,GAAG,OAAO,EACzB,OAAO,EACP,QAAQ,EACR,GAAG,UAAU,EACE;IACf,OAAO,CACL,8BAAC,aAAK,IACJ,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,IAAA,YAAE,EAClB,CAAC,eAAe,IAAI,IAAA,aAAG,EAAC,EAAE,aAAa,EAAE,gBAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CACvD,KACG,UAAU;QAEd,8BAAC,0BAAW,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACjD,8BAAC,sBAAS,QAAE,QAAQ,CAAa;QAChC,eAAe,IAAI,CAClB,8BAAC,wBAAW;YACV,8BAAC,uCAAiB,mBACJ,cAAc,EAC1B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAC,SAAS,IAEhB,eAAe,CACE,CACR,CACf,CACK,CACT,CAAC;AACJ,CAAC;AAEQ,8BAAS"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const Variant: {
|
|
3
|
+
readonly Default: "primary";
|
|
4
|
+
readonly Danger: "danger";
|
|
5
|
+
};
|
|
6
|
+
export declare type Variant = typeof Variant[keyof typeof Variant];
|
|
7
|
+
declare type ModalBodyProps = {
|
|
8
|
+
variant?: Variant;
|
|
9
|
+
className?: string;
|
|
10
|
+
scroll?: boolean;
|
|
11
|
+
minHeight?: number;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
declare function ModalBody({ variant, className, scroll, minHeight, children, }: ModalBodyProps): JSX.Element;
|
|
15
|
+
export { ModalBody };
|
|
16
|
+
//# sourceMappingURL=modal-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-body.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,OAAO;;;CAGV,CAAC;AAEX,oBAAY,OAAO,GAAG,OAAO,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAwB3D,aAAK,cAAc,GAAG;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,OAAyB,EACzB,SAAS,EACT,MAAa,EACb,SAAS,EACT,QAAQ,GACT,EAAE,cAAc,eAkBhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ModalBody = exports.Variant = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
9
|
+
const palette_1 = require("@leafygreen-ui/palette");
|
|
10
|
+
const tokens_1 = require("@leafygreen-ui/tokens");
|
|
11
|
+
const button_1 = require("@leafygreen-ui/button");
|
|
12
|
+
exports.Variant = {
|
|
13
|
+
Default: button_1.Variant.Primary,
|
|
14
|
+
Danger: button_1.Variant.Danger,
|
|
15
|
+
};
|
|
16
|
+
const contentStyle = (0, emotion_1.css)({
|
|
17
|
+
padding: `0 ${tokens_1.spacing[5]}px`,
|
|
18
|
+
paddingBottom: tokens_1.spacing[1],
|
|
19
|
+
fontFamily: tokens_1.fontFamilies.default,
|
|
20
|
+
fontSize: '13px',
|
|
21
|
+
lineHeight: '20px',
|
|
22
|
+
color: palette_1.palette.black,
|
|
23
|
+
maxHeight: `calc(100vh - ${tokens_1.spacing[6] * 5}px)`,
|
|
24
|
+
overflow: 'auto',
|
|
25
|
+
'&:first-child': {
|
|
26
|
+
paddingTop: tokens_1.spacing[5],
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const variantStyle = {
|
|
30
|
+
[exports.Variant.Default]: (0, emotion_1.css)({}),
|
|
31
|
+
[exports.Variant.Danger]: (0, emotion_1.css)({
|
|
32
|
+
paddingLeft: '78px',
|
|
33
|
+
}),
|
|
34
|
+
};
|
|
35
|
+
function ModalBody({ variant = exports.Variant.Default, className, scroll = true, minHeight, children, }) {
|
|
36
|
+
const style = {};
|
|
37
|
+
if (minHeight) {
|
|
38
|
+
style.minHeight = `${minHeight}px`;
|
|
39
|
+
}
|
|
40
|
+
if (scroll === false) {
|
|
41
|
+
style.overflow = 'visible';
|
|
42
|
+
}
|
|
43
|
+
return (react_1.default.createElement("div", { className: (0, emotion_1.cx)(contentStyle, variantStyle[variant], className), style: style }, children));
|
|
44
|
+
}
|
|
45
|
+
exports.ModalBody = ModalBody;
|
|
46
|
+
//# sourceMappingURL=modal-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-body.js","sourceRoot":"","sources":["../../../src/components/modals/modal-body.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAAiD;AACjD,oDAAiD;AACjD,kDAA8D;AAC9D,kDAAiE;AAEpD,QAAA,OAAO,GAAG;IACrB,OAAO,EAAE,gBAAa,CAAC,OAAO;IAC9B,MAAM,EAAE,gBAAa,CAAC,MAAM;CACpB,CAAC;AAIX,MAAM,YAAY,GAAG,IAAA,aAAG,EAAC;IACvB,OAAO,EAAE,KAAK,gBAAO,CAAC,CAAC,CAAC,IAAI;IAC5B,aAAa,EAAE,gBAAO,CAAC,CAAC,CAAC;IACzB,UAAU,EAAE,qBAAY,CAAC,OAAO;IAChC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM;IAClB,KAAK,EAAE,iBAAO,CAAC,KAAK;IACpB,SAAS,EAAE,gBAAgB,gBAAO,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK;IAC9C,QAAQ,EAAE,MAAM;IAEhB,eAAe,EAAE;QACf,UAAU,EAAE,gBAAO,CAAC,CAAC,CAAC;KACvB;CACF,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG;IACnB,CAAC,eAAO,CAAC,OAAO,CAAC,EAAE,IAAA,aAAG,EAAC,EAAE,CAAC;IAC1B,CAAC,eAAO,CAAC,MAAM,CAAC,EAAE,IAAA,aAAG,EAAC;QACpB,WAAW,EAAE,MAAM;KACpB,CAAC;CACH,CAAC;AAUF,SAAS,SAAS,CAAC,EACjB,OAAO,GAAG,eAAO,CAAC,OAAO,EACzB,SAAS,EACT,MAAM,GAAG,IAAI,EACb,SAAS,EACT,QAAQ,GACO;IACf,MAAM,KAAK,GAAwB,EAAE,CAAC;IAEtC,IAAI,SAAS,EAAE;QACb,KAAK,CAAC,SAAS,GAAG,GAAG,SAAS,IAAI,CAAC;KACpC;IACD,IAAI,MAAM,KAAK,KAAK,EAAE;QACpB,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC;KAC5B;IAED,OAAO,CACL,uCACE,SAAS,EAAE,IAAA,YAAE,EAAC,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,EAC7D,KAAK,EAAE,KAAK,IAEX,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AAEQ,8BAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-footer-button.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-footer-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA8BzD,QAAA,MAAM,iBAAiB,kCAAuC,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ModalFooterButton = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
9
|
+
const leafygreen_1 = require("../leafygreen");
|
|
10
|
+
const use_theme_1 = require("../../hooks/use-theme");
|
|
11
|
+
const buttonStyle = {
|
|
12
|
+
[use_theme_1.Theme.Light]: (0, emotion_1.css)({
|
|
13
|
+
margin: '0 2px',
|
|
14
|
+
'&:first-of-type': {
|
|
15
|
+
margin: '0 0 0 5px',
|
|
16
|
+
},
|
|
17
|
+
'&:last-of-type': {
|
|
18
|
+
margin: '0 5px 0 0',
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
[use_theme_1.Theme.Dark]: (0, emotion_1.css)({
|
|
22
|
+
margin: '0 2px',
|
|
23
|
+
'&:first-of-type': {
|
|
24
|
+
margin: '0 0 0 4px',
|
|
25
|
+
},
|
|
26
|
+
'&:last-of-type': {
|
|
27
|
+
margin: '0 4px 0 0',
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
};
|
|
31
|
+
function UnthemedModalFooterButton({ className, ...props }) {
|
|
32
|
+
const { theme } = (0, use_theme_1.useTheme)();
|
|
33
|
+
return react_1.default.createElement(leafygreen_1.Button, { ...props, className: (0, emotion_1.cx)(className, buttonStyle[theme]) });
|
|
34
|
+
}
|
|
35
|
+
const ModalFooterButton = (0, use_theme_1.withTheme)(UnthemedModalFooterButton);
|
|
36
|
+
exports.ModalFooterButton = ModalFooterButton;
|
|
37
|
+
//# sourceMappingURL=modal-footer-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-footer-button.js","sourceRoot":"","sources":["../../../src/components/modals/modal-footer-button.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAAiD;AAEjD,8CAAuC;AACvC,qDAAmE;AAEnE,MAAM,WAAW,GAAG;IAClB,CAAC,iBAAK,CAAC,KAAK,CAAC,EAAE,IAAA,aAAG,EAAC;QACjB,MAAM,EAAE,OAAO;QACf,iBAAiB,EAAE;YACjB,MAAM,EAAE,WAAW;SACpB;QACD,gBAAgB,EAAE;YAChB,MAAM,EAAE,WAAW;SACpB;KACF,CAAC;IACF,CAAC,iBAAK,CAAC,IAAI,CAAC,EAAE,IAAA,aAAG,EAAC;QAChB,MAAM,EAAE,OAAO;QACf,iBAAiB,EAAE;YACjB,MAAM,EAAE,WAAW;SACpB;QACD,gBAAgB,EAAE;YAChB,MAAM,EAAE,WAAW;SACpB;KACF,CAAC;CACH,CAAC;AAEF,SAAS,yBAAyB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAe;IACrE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,oBAAQ,GAAE,CAAC;IAC7B,OAAO,8BAAC,mBAAM,OAAK,KAAK,EAAE,SAAS,EAAE,IAAA,YAAE,EAAC,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,GAAI,CAAC;AAC7E,CAAC;AAED,MAAM,iBAAiB,GAAG,IAAA,qBAAS,EAAC,yBAAyB,CAAC,CAAC;AAEtD,8CAAiB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const Variant: {
|
|
3
|
+
readonly Default: "primary";
|
|
4
|
+
readonly Danger: "danger";
|
|
5
|
+
};
|
|
6
|
+
export declare type Variant = typeof Variant[keyof typeof Variant];
|
|
7
|
+
declare type ModalHeaderProps = {
|
|
8
|
+
title: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
variant?: Variant;
|
|
11
|
+
darkMode?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const ModalHeader: React.ComponentType<ModalHeaderProps>;
|
|
14
|
+
export { ModalHeader };
|
|
15
|
+
//# sourceMappingURL=modal-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,OAAO;;;CAGV,CAAC;AAEX,oBAAY,OAAO,GAAG,OAAO,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AA8C3D,aAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA2BF,QAAA,MAAM,WAAW,uCAAiC,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ModalHeader = exports.Variant = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
9
|
+
const palette_1 = require("@leafygreen-ui/palette");
|
|
10
|
+
const tokens_1 = require("@leafygreen-ui/tokens");
|
|
11
|
+
const button_1 = require("@leafygreen-ui/button");
|
|
12
|
+
const use_theme_1 = require("../../hooks/use-theme");
|
|
13
|
+
const leafygreen_1 = require("../leafygreen");
|
|
14
|
+
exports.Variant = {
|
|
15
|
+
Default: button_1.Variant.Primary,
|
|
16
|
+
Danger: button_1.Variant.Danger,
|
|
17
|
+
};
|
|
18
|
+
const headerStyle = (0, emotion_1.css)({
|
|
19
|
+
padding: tokens_1.spacing[5],
|
|
20
|
+
paddingBottom: 0,
|
|
21
|
+
});
|
|
22
|
+
const variantStyle = {
|
|
23
|
+
[exports.Variant.Default]: (0, emotion_1.css)({}),
|
|
24
|
+
[exports.Variant.Danger]: (0, emotion_1.css)({
|
|
25
|
+
paddingLeft: '78px',
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
const titleStyle = (0, emotion_1.css)({
|
|
29
|
+
fontSize: '24px',
|
|
30
|
+
fontWeight: 700,
|
|
31
|
+
lineHeight: '32px',
|
|
32
|
+
margin: 0,
|
|
33
|
+
marginBottom: '10px',
|
|
34
|
+
color: palette_1.palette.black,
|
|
35
|
+
});
|
|
36
|
+
const titleStyleDark = (0, emotion_1.css)({
|
|
37
|
+
fontWeight: 'bold',
|
|
38
|
+
lineHeight: '25px',
|
|
39
|
+
color: palette_1.uiColors.gray.light2,
|
|
40
|
+
});
|
|
41
|
+
const warningIconStyles = (0, emotion_1.css)({
|
|
42
|
+
width: '32px',
|
|
43
|
+
height: '32px',
|
|
44
|
+
borderRadius: '50%',
|
|
45
|
+
background: `${palette_1.palette.red.light3}`,
|
|
46
|
+
display: 'flex',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
justifyContent: 'center',
|
|
49
|
+
position: 'absolute',
|
|
50
|
+
left: '36px',
|
|
51
|
+
top: '32px',
|
|
52
|
+
svg: {
|
|
53
|
+
marginTop: '-3px',
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
function UnthemedModalHeader({ title, subtitle, variant = exports.Variant.Default, darkMode, }) {
|
|
57
|
+
return (react_1.default.createElement("div", { className: (0, emotion_1.cx)(headerStyle, variantStyle[variant]) },
|
|
58
|
+
variant === exports.Variant.Danger && (react_1.default.createElement("div", { className: (0, emotion_1.cx)(warningIconStyles) },
|
|
59
|
+
react_1.default.createElement(leafygreen_1.Icon, { glyph: "Warning", fill: palette_1.palette.red.base, role: "presentation" }))),
|
|
60
|
+
react_1.default.createElement("h1", { className: (0, emotion_1.cx)(titleStyle, darkMode && titleStyleDark), "data-testid": "modal-title", id: "modal-title" }, title),
|
|
61
|
+
subtitle && react_1.default.createElement(leafygreen_1.Body, null, subtitle)));
|
|
62
|
+
}
|
|
63
|
+
const ModalHeader = (0, use_theme_1.withTheme)(UnthemedModalHeader);
|
|
64
|
+
exports.ModalHeader = ModalHeader;
|
|
65
|
+
//# sourceMappingURL=modal-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-header.js","sourceRoot":"","sources":["../../../src/components/modals/modal-header.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAAiD;AACjD,oDAA2D;AAC3D,kDAAgD;AAChD,kDAAiE;AACjE,qDAAkD;AAClD,8CAA2C;AAE9B,QAAA,OAAO,GAAG;IACrB,OAAO,EAAE,gBAAa,CAAC,OAAO;IAC9B,MAAM,EAAE,gBAAa,CAAC,MAAM;CACpB,CAAC;AAIX,MAAM,WAAW,GAAG,IAAA,aAAG,EAAC;IACtB,OAAO,EAAE,gBAAO,CAAC,CAAC,CAAC;IACnB,aAAa,EAAE,CAAC;CACjB,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG;IACnB,CAAC,eAAO,CAAC,OAAO,CAAC,EAAE,IAAA,aAAG,EAAC,EAAE,CAAC;IAC1B,CAAC,eAAO,CAAC,MAAM,CAAC,EAAE,IAAA,aAAG,EAAC;QACpB,WAAW,EAAE,MAAM;KACpB,CAAC;CACH,CAAC;AAEF,MAAM,UAAU,GAAG,IAAA,aAAG,EAAC;IACrB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,CAAC;IACT,YAAY,EAAE,MAAM;IACpB,KAAK,EAAE,iBAAO,CAAC,KAAK;CACrB,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,IAAA,aAAG,EAAC;IACzB,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,MAAM;IAClB,KAAK,EAAE,kBAAQ,CAAC,IAAI,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,IAAA,aAAG,EAAC;IAC5B,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,KAAK;IACnB,UAAU,EAAE,GAAG,iBAAO,CAAC,GAAG,CAAC,MAAM,EAAE;IACnC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;IAEX,GAAG,EAAE;QACH,SAAS,EAAE,MAAM;KAClB;CACF,CAAC,CAAC;AASH,SAAS,mBAAmB,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,GAAG,eAAO,CAAC,OAAO,EACzB,QAAQ,GACS;IACjB,OAAO,CACL,uCAAK,SAAS,EAAE,IAAA,YAAE,EAAC,WAAW,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QACnD,OAAO,KAAK,eAAO,CAAC,MAAM,IAAI,CAC7B,uCAAK,SAAS,EAAE,IAAA,YAAE,EAAC,iBAAiB,CAAC;YACnC,8BAAC,iBAAI,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAE,iBAAO,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAC,cAAc,GAAG,CAChE,CACP;QACD,sCACE,SAAS,EAAE,IAAA,YAAE,EAAC,UAAU,EAAE,QAAQ,IAAI,cAAc,CAAC,iBACzC,aAAa,EACzB,EAAE,EAAC,aAAa,IAEf,KAAK,CACH;QACJ,QAAQ,IAAI,8BAAC,iBAAI,QAAE,QAAQ,CAAQ,CAChC,CACP,CAAC;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,IAAA,qBAAS,EAAC,mBAAmB,CAAC,CAAC;AAE1C,kCAAW"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal as LeafyGreenModal } from '../leafygreen';
|
|
3
|
+
declare function Modal({ trackingId, contentClassName, ...props }: React.ComponentProps<typeof LeafyGreenModal> & {
|
|
4
|
+
trackingId?: string;
|
|
5
|
+
}): React.ReactElement;
|
|
6
|
+
export { Modal };
|
|
7
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAQzD,iBAAS,KAAK,CAAC,EACb,UAAU,EACV,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,GAAG;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,KAAK,CAAC,YAAY,CAYrB;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -25,16 +25,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Modal = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
+
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
28
29
|
const compass_logging_1 = require("@mongodb-js/compass-logging");
|
|
29
30
|
const { track } = (0, compass_logging_1.createLoggerAndTelemetry)('COMPASS-UI');
|
|
30
|
-
const leafygreen_1 = require("
|
|
31
|
-
|
|
31
|
+
const leafygreen_1 = require("../leafygreen");
|
|
32
|
+
const contentStyles = (0, emotion_1.css)({
|
|
33
|
+
width: '600px',
|
|
34
|
+
letterSpacing: 0,
|
|
35
|
+
padding: 0,
|
|
36
|
+
});
|
|
37
|
+
function Modal({ trackingId, contentClassName, ...props }) {
|
|
32
38
|
(0, react_1.useEffect)(() => {
|
|
33
39
|
if (props.open && trackingId) {
|
|
34
40
|
track('Screen', { name: trackingId });
|
|
35
41
|
}
|
|
36
42
|
}, [props.open, trackingId]);
|
|
37
|
-
return react_1.default.createElement(leafygreen_1.Modal, { ...props });
|
|
43
|
+
return (react_1.default.createElement(leafygreen_1.Modal, { contentClassName: (0, emotion_1.cx)(contentStyles, contentClassName), ...props }));
|
|
38
44
|
}
|
|
39
45
|
exports.Modal = Modal;
|
|
40
46
|
//# sourceMappingURL=modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/components/modals/modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,oDAAiD;AACjD,iEAAuE;AACvE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,0CAAwB,EAAC,YAAY,CAAC,CAAC;AAEzD,8CAAyD;AAEzD,MAAM,aAAa,GAAG,IAAA,aAAG,EAAC;IACxB,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,CAAC;CACX,CAAC,CAAC;AAEH,SAAS,KAAK,CAAC,EACb,UAAU,EACV,gBAAgB,EAChB,GAAG,KAAK,EAGT;IACC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,IAAI,IAAI,UAAU,EAAE;YAC5B,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;SACvC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;IAC7B,OAAO,CACL,8BAAC,kBAAe,IACd,gBAAgB,EAAE,IAAA,YAAE,EAAC,aAAa,EAAE,gBAAgB,CAAC,KACjD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAEQ,sBAAK"}
|
|
@@ -40,8 +40,8 @@ const move = (0, emotion_1.keyframes)({
|
|
|
40
40
|
},
|
|
41
41
|
});
|
|
42
42
|
const placeholder = (0, emotion_1.css)({
|
|
43
|
-
'--gradient-start': palette_1.
|
|
44
|
-
'--gradient-end': palette_1.
|
|
43
|
+
'--gradient-start': palette_1.palette.gray.light2,
|
|
44
|
+
'--gradient-end': palette_1.palette.gray.light3,
|
|
45
45
|
alignSelf: 'center',
|
|
46
46
|
borderRadius: 3,
|
|
47
47
|
maxWidth: '80%',
|
|
@@ -58,8 +58,8 @@ const placeholder = (0, emotion_1.css)({
|
|
|
58
58
|
animation: `${move} ${scale}s infinite linear`,
|
|
59
59
|
});
|
|
60
60
|
const placeholderDarkMode = (0, emotion_1.css)({
|
|
61
|
-
'--gradient-start': palette_1.
|
|
62
|
-
'--gradient-end': palette_1.
|
|
61
|
+
'--gradient-start': palette_1.palette.gray.dark2,
|
|
62
|
+
'--gradient-end': palette_1.palette.gray.dark3,
|
|
63
63
|
});
|
|
64
64
|
function getBoundRandom(min, max) {
|
|
65
65
|
return Math.random() * (max - min) + min;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../../src/components/placeholder.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+CAAuC;AACvC,oDAA4D;AAC5D,kDAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../../src/components/placeholder.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+CAAuC;AACvC,oDAA4D;AAC5D,kDAAgD;AAChD,oDAAiD;AACjD,kDAA+C;AAG/C,MAAM,KAAK,GAAG,CAAC,CAAC;AAEhB,MAAM,OAAO,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAEtE,MAAM,IAAI,GAAG,IAAA,mBAAS,EAAC;IACrB,IAAI,EAAE;QACJ,kBAAkB,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI;KAC1C;IACD,EAAE,EAAE;QACF,kBAAkB,EAAE,KAAK;KAC1B;CACF,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,IAAA,aAAG,EAAC;IACtB,kBAAkB,EAAE,iBAAO,CAAC,IAAI,CAAC,MAAM;IACvC,gBAAgB,EAAE,iBAAO,CAAC,IAAI,CAAC,MA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,YAAE,EAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,IAAI,mBAAmB,CAAC,EACtE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,GAChC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,IAAA,qBAAS,EAAC,mBAAmB,CAAC,CAAC;AAE1C,kCAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-handle.d.ts","sourceRoot":"","sources":["../../src/components/resize-handle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"resize-handle.d.ts","sourceRoot":"","sources":["../../src/components/resize-handle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,aAAK,eAAe;IAClB,GAAG,QAAQ;IACX,KAAK,UAAU;CAChB;AAmDD,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,IAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,GACN,EAAE;IACD,SAAS,EAAE,eAAe,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAAC,YAAY,CA6DrB;AAED,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.ResizeDirection = exports.ResizeHandle = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
29
|
+
const palette_1 = require("@leafygreen-ui/palette");
|
|
29
30
|
var ResizeDirection;
|
|
30
31
|
(function (ResizeDirection) {
|
|
31
32
|
ResizeDirection["TOP"] = "TOP";
|
|
@@ -38,7 +39,7 @@ const baseResizerStyles = (0, emotion_1.css)({
|
|
|
38
39
|
padding: 0,
|
|
39
40
|
transition: 'opacity 250ms ease',
|
|
40
41
|
transitionDelay: '0ms',
|
|
41
|
-
backgroundColor:
|
|
42
|
+
backgroundColor: palette_1.palette.blue.light1,
|
|
42
43
|
opacity: '0',
|
|
43
44
|
outline: 'none',
|
|
44
45
|
zIndex: 100,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-handle.js","sourceRoot":"","sources":["../../src/components/resize-handle.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsC;AACtC,oDAAiD;AAEjD,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,8BAAW,CAAA;IACX,kCAAe,CAAA;AACjB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAkIsB,0CAAe;AAhItC,MAAM,iBAAiB,GAAG,IAAA,aAAG,EAAC;IAC5B,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,aAAa;IACzB,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,oBAAoB;IAChC,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"resize-handle.js","sourceRoot":"","sources":["../../src/components/resize-handle.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsC;AACtC,oDAAiD;AACjD,oDAAiD;AAEjD,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,8BAAW,CAAA;IACX,kCAAe,CAAA;AACjB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAkIsB,0CAAe;AAhItC,MAAM,iBAAiB,GAAG,IAAA,aAAG,EAAC;IAC5B,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,aAAa;IAC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E,CAAC,KAAK,EAAE,EAAE;YAGnB,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;YAE3B,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC;YAC3B,IAAI,SAAS,KAAK,eAAe,CAAC,KAAK,EAAE;gBACvC,QAAQ,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;aAC9C;iBAAM,IAAI,SAAS,KAAK,eAAe,CAAC,GAAG,EAAE;gBAC5C,QAAQ,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;aAC9C;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC;AAEQ,oCAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizeable-sidebar.d.ts","sourceRoot":"","sources":["../../src/components/resizeable-sidebar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"resizeable-sidebar.d.ts","sourceRoot":"","sources":["../../src/components/resizeable-sidebar.tsx"],"names":[],"mappings":";AAuDA,eAAO,MAAM,mBAAmB,QAAiB,CAAC;AAElD,QAAA,MAAM,gBAAgB;;;+BAaM,OAAO,KAAK,IAAI;;;;cAIhC,WAAW;MACnB,WAuEH,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -35,35 +35,34 @@ const containerStyles = (0, emotion_1.css)({
|
|
|
35
35
|
flexDirection: 'column',
|
|
36
36
|
margin: 0,
|
|
37
37
|
padding: 0,
|
|
38
|
-
maxWidth: '80%',
|
|
39
38
|
height: '100%',
|
|
40
39
|
position: 'relative',
|
|
41
40
|
});
|
|
42
41
|
const containerStylesDark = (0, emotion_1.css)({
|
|
43
|
-
'--color':
|
|
44
|
-
'--bg-color': palette_1.
|
|
45
|
-
'--title-color': palette_1.
|
|
46
|
-
'--title-bg-color':
|
|
47
|
-
'--icon-color':
|
|
48
|
-
'--item-color':
|
|
49
|
-
'--item-color-active':
|
|
50
|
-
'--item-bg-color': palette_1.
|
|
51
|
-
'--item-bg-color-hover': palette_1.
|
|
52
|
-
'--item-bg-color-active': palette_1.
|
|
42
|
+
'--color': palette_1.palette.white,
|
|
43
|
+
'--bg-color': palette_1.palette.gray.dark3,
|
|
44
|
+
'--title-color': palette_1.palette.gray.dark3,
|
|
45
|
+
'--title-bg-color': palette_1.palette.green.light1,
|
|
46
|
+
'--icon-color': palette_1.palette.white,
|
|
47
|
+
'--item-color': palette_1.palette.white,
|
|
48
|
+
'--item-color-active': palette_1.palette.green.light1,
|
|
49
|
+
'--item-bg-color': palette_1.palette.gray.dark3,
|
|
50
|
+
'--item-bg-color-hover': palette_1.palette.gray.dark2,
|
|
51
|
+
'--item-bg-color-active': palette_1.palette.black,
|
|
53
52
|
color: 'var(--color)',
|
|
54
53
|
backgroundColor: 'var(--bg-color)',
|
|
55
54
|
});
|
|
56
55
|
const containerStylesLight = (0, emotion_1.css)({
|
|
57
|
-
'--color': palette_1.
|
|
58
|
-
'--bg-color': palette_1.
|
|
59
|
-
'--title-color':
|
|
60
|
-
'--title-bg-color': palette_1.
|
|
61
|
-
'--icon-color': palette_1.
|
|
62
|
-
'--item-color': palette_1.
|
|
63
|
-
'--item-color-active': palette_1.
|
|
64
|
-
'--item-bg-color': palette_1.
|
|
65
|
-
'--item-bg-color-hover': palette_1.
|
|
66
|
-
'--item-bg-color-active': palette_1.
|
|
56
|
+
'--color': palette_1.palette.gray.dark3,
|
|
57
|
+
'--bg-color': palette_1.palette.gray.light3,
|
|
58
|
+
'--title-color': palette_1.palette.white,
|
|
59
|
+
'--title-bg-color': palette_1.palette.green.dark2,
|
|
60
|
+
'--icon-color': palette_1.palette.gray.dark3,
|
|
61
|
+
'--item-color': palette_1.palette.gray.dark3,
|
|
62
|
+
'--item-color-active': palette_1.palette.green.dark2,
|
|
63
|
+
'--item-bg-color': palette_1.palette.gray.light3,
|
|
64
|
+
'--item-bg-color-hover': palette_1.palette.gray.light2,
|
|
65
|
+
'--item-bg-color-active': palette_1.palette.green.light3,
|
|
67
66
|
color: 'var(--color)',
|
|
68
67
|
backgroundColor: 'var(--bg-color)',
|
|
69
68
|
});
|
|
@@ -74,7 +73,7 @@ const ResizableSidebar = ({ collapsable = false, expanded = true, setExpanded =
|
|
|
74
73
|
const [width, setWidth] = (0, react_1.useState)(initialWidth);
|
|
75
74
|
const [prevWidth, setPrevWidth] = (0, react_1.useState)(initialWidth);
|
|
76
75
|
const getMaxSidebarWidth = (0, react_1.useCallback)(() => {
|
|
77
|
-
return Math.max(minWidth,
|
|
76
|
+
return Math.max(minWidth, 600);
|
|
78
77
|
}, [minWidth]);
|
|
79
78
|
const boundSidebarWidth = (0, react_1.useCallback)((attemptedWidth) => {
|
|
80
79
|
const maxWidth = getMaxSidebarWidth();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizeable-sidebar.js","sourceRoot":"","sources":["../../src/components/resizeable-sidebar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgE;AAEhE,
|
|
1
|
+
{"version":3,"file":"resizeable-sidebar.js","sourceRoot":"","sources":["../../src/components/resizeable-sidebar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgE;AAEhE,oDAAiD;AACjD,kDAAgD;AAChD,oDAAiD;AACjD,kDAAqD;AACrD,mDAAgE;AAEhE,MAAM,eAAe,GAAG,IAAA,aAAG,EAAC;IAC1B,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,UAAU;CACrB,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,IAAA,aAAG,EAAC;IAC9B,SAAS,EAAE,iBAAO,CAAC,KAAK;IACxB,YAAY,EAAE,iBAAO,CAAC,IAAI,CAAC,KAAK;IAEhC,eAAe,EAAE,iBAAO,CAAC,IA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iB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;IAE3E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,QAAQ,IAAI,KAAK,KAAK,cAAc,EAAE;YACxC,QAAQ,CAAC,SAAS,CAAC,CAAC;SACrB;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;IAE3D,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,oBAAQ,GAAE,CAAC;IAE7B,OAAO,CACL,uCACE,SAAS,EAAE,IAAA,YAAE,EACX,eAAe,EACf,KAAK,KAAK,iBAAK,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,oBAAoB,CAClE,EACD,KAAK,EAAE;YACL,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ;YACjD,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,MAAM;SACb;QAEA,QAAQ;QACT,8BAAC,4BAAY,IACX,QAAQ,EAAE,WAAW,EACrB,SAAS,EAAE,+BAAe,CAAC,KAAK,EAChC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,EACjD,QAAQ,EAAE,kBAAkB,EAAE,EAC9B,KAAK,EAAC,SAAS,GACf,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -13,7 +13,7 @@ const shellLoaderSpin = (0, emotion_1.keyframes) `
|
|
|
13
13
|
`;
|
|
14
14
|
const spinLoaderStyle = (0, emotion_1.css) `
|
|
15
15
|
border: 2px solid transparent;
|
|
16
|
-
border-top: 2px solid ${palette_1.
|
|
16
|
+
border-top: 2px solid ${palette_1.palette.gray.dark3};
|
|
17
17
|
border-radius: 50%;
|
|
18
18
|
padding: 0;
|
|
19
19
|
margin: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spin-loader.js","sourceRoot":"","sources":["../../src/components/spin-loader.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"spin-loader.js","sourceRoot":"","sources":["../../src/components/spin-loader.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAAwD;AACxD,oDAAiD;AAOjD,MAAM,eAAe,GAAG,IAAA,mBAAS,EAAA;;;CAGhC,CAAC;AAEF,MAAM,eAAe,GAAG,IAAA,aAAG,EAAA;;0BAED,iBAAO,CAAC,IAAI,CAAC,KAAK;;;;;;;eAO7B,eAAe;CAC7B,CAAC;AAEF,SAAS,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAmB;IAC3D,OAAO,CACL,uCACE,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE;YACL,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;SACb,EACD,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC;AAEQ,gCAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-nav-bar.d.ts","sourceRoot":"","sources":["../../src/components/tab-nav-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"tab-nav-bar.d.ts","sourceRoot":"","sources":["../../src/components/tab-nav-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsC1B,aAAK,cAAc,GAAG;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;IACrB,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C,CAAC;AAkEF,QAAA,MAAM,SAAS,qCAA+B,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -8,26 +8,29 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
9
9
|
const tokens_1 = require("@leafygreen-ui/tokens");
|
|
10
10
|
const palette_1 = require("@leafygreen-ui/palette");
|
|
11
|
-
const workspace_container_1 = require("./workspace-container");
|
|
12
11
|
const use_theme_1 = require("../hooks/use-theme");
|
|
13
12
|
const leafygreen_1 = require("./leafygreen");
|
|
14
13
|
const containerStyles = (0, emotion_1.css)({
|
|
15
14
|
flexGrow: 1,
|
|
16
|
-
flexShrink: 1,
|
|
17
|
-
flexBasis: 'auto',
|
|
18
15
|
display: 'flex',
|
|
19
16
|
flexDirection: 'column',
|
|
20
17
|
alignItems: 'stretch',
|
|
21
|
-
overflow: '
|
|
18
|
+
overflow: 'hidden',
|
|
22
19
|
});
|
|
23
20
|
const tabsContainerStyles = (0, emotion_1.css)({
|
|
21
|
+
flex: 'none',
|
|
24
22
|
padding: `0 ${tokens_1.spacing[3]}px`,
|
|
25
23
|
});
|
|
26
24
|
const tabsContainerDarkStyles = (0, emotion_1.css)({
|
|
27
|
-
background: palette_1.
|
|
25
|
+
background: palette_1.palette.gray.dark3,
|
|
28
26
|
});
|
|
29
27
|
const tabsContainerLightStyles = (0, emotion_1.css)({
|
|
30
|
-
background: palette_1.
|
|
28
|
+
background: palette_1.palette.white,
|
|
29
|
+
});
|
|
30
|
+
const tabStyles = (0, emotion_1.css)({
|
|
31
|
+
display: 'flex',
|
|
32
|
+
flex: 1,
|
|
33
|
+
minHeight: 0,
|
|
31
34
|
});
|
|
32
35
|
const hiddenStyles = (0, emotion_1.css)({
|
|
33
36
|
display: 'none',
|
|
@@ -36,7 +39,8 @@ function UnthemedTabNavBar({ 'data-testid': dataTestId, 'aria-label': ariaLabel,
|
|
|
36
39
|
return (react_1.default.createElement("div", { className: containerStyles },
|
|
37
40
|
react_1.default.createElement("div", { className: (0, emotion_1.cx)(tabsContainerStyles, darkMode ? tabsContainerDarkStyles : tabsContainerLightStyles) },
|
|
38
41
|
react_1.default.createElement(leafygreen_1.Tabs, { "data-testid": dataTestId, "aria-label": ariaLabel, className: "test-tab-nav-bar-tabs", setSelected: onTabClicked, selected: activeTabIndex }, tabs.map((tab, idx) => (react_1.default.createElement(leafygreen_1.Tab, { className: "test-tab-nav-bar-tab", key: `tab-${idx}`, name: tab }))))),
|
|
39
|
-
views.map((view, idx) => (mountAllViews || idx === activeTabIndex) && (react_1.default.createElement(
|
|
42
|
+
views.map((view, idx) => (mountAllViews || idx === activeTabIndex) && (react_1.default.createElement("div", { className: (0, emotion_1.cx)({
|
|
43
|
+
[tabStyles]: true,
|
|
40
44
|
[hiddenStyles]: idx !== activeTabIndex,
|
|
41
45
|
}), key: `tab-content-${tabs[idx]}`, "data-testid": `${tabs[idx]
|
|
42
46
|
.toLowerCase()
|