@mongodb-js/compass-components 1.4.0 → 1.5.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 +1 -2
- package/lib/components/accordion.d.ts.map +1 -1
- package/lib/components/accordion.js +3 -3
- package/lib/components/accordion.js.map +1 -1
- package/lib/components/bson-value.d.ts.map +1 -1
- package/lib/components/bson-value.js +3 -3
- package/lib/components/bson-value.js.map +1 -1
- package/lib/components/cancel-loader.d.ts.map +1 -1
- package/lib/components/cancel-loader.js +6 -1
- package/lib/components/cancel-loader.js.map +1 -1
- package/lib/components/combobox/Chip.d.ts +4 -0
- package/lib/components/combobox/Chip.d.ts.map +1 -0
- package/lib/components/combobox/Chip.js +229 -0
- package/lib/components/combobox/Chip.js.map +1 -0
- package/lib/components/combobox/Combobox.d.ts +39 -0
- package/lib/components/combobox/Combobox.d.ts.map +1 -0
- package/lib/components/combobox/Combobox.js +817 -0
- package/lib/components/combobox/Combobox.js.map +1 -0
- package/lib/components/combobox/Combobox.styles.d.ts +38 -0
- package/lib/components/combobox/Combobox.styles.d.ts.map +1 -0
- package/lib/components/combobox/Combobox.styles.js +278 -0
- package/lib/components/combobox/Combobox.styles.js.map +1 -0
- package/lib/components/combobox/Combobox.types.d.ts +121 -0
- package/lib/components/combobox/Combobox.types.d.ts.map +1 -0
- package/lib/components/combobox/Combobox.types.js +46 -0
- package/lib/components/combobox/Combobox.types.js.map +1 -0
- package/lib/components/combobox/ComboboxContext.d.ts +21 -0
- package/lib/components/combobox/ComboboxContext.d.ts.map +1 -0
- package/lib/components/combobox/ComboboxContext.js +19 -0
- package/lib/components/combobox/ComboboxContext.js.map +1 -0
- package/lib/components/combobox/ComboboxGroup.d.ts +15 -0
- package/lib/components/combobox/ComboboxGroup.d.ts.map +1 -0
- package/lib/components/combobox/ComboboxGroup.js +84 -0
- package/lib/components/combobox/ComboboxGroup.js.map +1 -0
- package/lib/components/combobox/ComboboxMenu/ComboboxMenu.d.ts +9 -0
- package/lib/components/combobox/ComboboxMenu/ComboboxMenu.d.ts.map +1 -0
- package/lib/components/combobox/ComboboxMenu/ComboboxMenu.js +86 -0
- package/lib/components/combobox/ComboboxMenu/ComboboxMenu.js.map +1 -0
- package/lib/components/combobox/ComboboxMenu/Menu.styles.d.ts +22 -0
- package/lib/components/combobox/ComboboxMenu/Menu.styles.d.ts.map +1 -0
- package/lib/components/combobox/ComboboxMenu/Menu.styles.js +115 -0
- package/lib/components/combobox/ComboboxMenu/Menu.styles.js.map +1 -0
- package/lib/components/combobox/ComboboxOption.d.ts +17 -0
- package/lib/components/combobox/ComboboxOption.d.ts.map +1 -0
- package/lib/components/combobox/ComboboxOption.js +258 -0
- package/lib/components/combobox/ComboboxOption.js.map +1 -0
- package/lib/components/combobox/Menu.styles.d.ts +18 -0
- package/lib/components/combobox/Menu.styles.d.ts.map +1 -0
- package/lib/components/combobox/Menu.styles.js +98 -0
- package/lib/components/combobox/Menu.styles.js.map +1 -0
- package/lib/components/combobox/index.d.ts +4 -0
- package/lib/components/combobox/index.d.ts.map +1 -0
- package/lib/components/combobox/index.js +13 -0
- package/lib/components/combobox/index.js.map +1 -0
- package/lib/components/combobox/utils/OptionObjectUtils.d.ts +5 -0
- package/lib/components/combobox/utils/OptionObjectUtils.d.ts.map +1 -0
- package/lib/components/combobox/utils/OptionObjectUtils.js +23 -0
- package/lib/components/combobox/utils/OptionObjectUtils.js.map +1 -0
- package/lib/components/combobox/utils/flattenChildren.d.ts +4 -0
- package/lib/components/combobox/utils/flattenChildren.d.ts.map +1 -0
- package/lib/components/combobox/utils/flattenChildren.js +35 -0
- package/lib/components/combobox/utils/flattenChildren.js.map +1 -0
- package/lib/components/combobox/utils/getNameAndValue.d.ts +6 -0
- package/lib/components/combobox/utils/getNameAndValue.d.ts.map +1 -0
- package/lib/components/combobox/utils/getNameAndValue.js +16 -0
- package/lib/components/combobox/utils/getNameAndValue.js.map +1 -0
- package/lib/components/combobox/utils/index.d.ts +5 -0
- package/lib/components/combobox/utils/index.d.ts.map +1 -0
- package/lib/components/combobox/utils/index.js +14 -0
- package/lib/components/combobox/utils/index.js.map +1 -0
- package/lib/components/combobox/utils/wrapJSX.d.ts +3 -0
- package/lib/components/combobox/utils/wrapJSX.d.ts.map +1 -0
- package/lib/components/combobox/utils/wrapJSX.js +33 -0
- package/lib/components/combobox/utils/wrapJSX.js.map +1 -0
- package/lib/components/empty-content.d.ts.map +1 -1
- package/lib/components/empty-content.js +9 -2
- package/lib/components/empty-content.js.map +1 -1
- package/lib/components/file-input.d.ts +18 -19
- package/lib/components/file-input.d.ts.map +1 -1
- package/lib/components/file-input.js +3 -3
- package/lib/components/file-input.js.map +1 -1
- package/lib/components/horizontal-rule.d.ts +4 -0
- package/lib/components/horizontal-rule.d.ts.map +1 -0
- package/lib/components/horizontal-rule.js +49 -0
- package/lib/components/horizontal-rule.js.map +1 -0
- package/lib/components/icons/document-icon.d.ts +1 -4
- package/lib/components/icons/document-icon.d.ts.map +1 -1
- package/lib/components/icons/document-icon.js +2 -2
- package/lib/components/icons/document-icon.js.map +1 -1
- package/lib/components/icons/favorite-icon.d.ts +6 -7
- package/lib/components/icons/favorite-icon.d.ts.map +1 -1
- package/lib/components/icons/favorite-icon.js +2 -2
- package/lib/components/icons/favorite-icon.js.map +1 -1
- package/lib/components/icons/no-saved-items-icon.d.ts +0 -1
- package/lib/components/icons/no-saved-items-icon.d.ts.map +1 -1
- package/lib/components/icons/no-saved-items-icon.js +2 -2
- package/lib/components/icons/no-saved-items-icon.js.map +1 -1
- package/lib/components/index-keys-badge.d.ts +11 -0
- package/lib/components/index-keys-badge.d.ts.map +1 -0
- package/lib/components/index-keys-badge.js +26 -0
- package/lib/components/index-keys-badge.js.map +1 -0
- package/lib/components/interactive-popover.js +2 -2
- package/lib/components/interactive-popover.js.map +1 -1
- package/lib/components/keyline-card.d.ts +1 -4
- package/lib/components/keyline-card.d.ts.map +1 -1
- package/lib/components/keyline-card.js +2 -2
- package/lib/components/keyline-card.js.map +1 -1
- package/lib/components/leafygreen.d.ts +26 -74
- package/lib/components/leafygreen.d.ts.map +1 -1
- package/lib/components/leafygreen.js +38 -70
- package/lib/components/leafygreen.js.map +1 -1
- package/lib/components/modals/confirmation-modal.d.ts +1 -1
- package/lib/components/modals/confirmation-modal.d.ts.map +1 -1
- package/lib/components/modals/confirmation-modal.js +3 -2
- package/lib/components/modals/confirmation-modal.js.map +1 -1
- package/lib/components/modals/modal-body.d.ts.map +1 -1
- package/lib/components/modals/modal-body.js +6 -3
- package/lib/components/modals/modal-body.js.map +1 -1
- package/lib/components/modals/modal-footer-button.d.ts +2 -2
- package/lib/components/modals/modal-footer-button.d.ts.map +1 -1
- package/lib/components/modals/modal-footer-button.js +3 -4
- package/lib/components/modals/modal-footer-button.js.map +1 -1
- package/lib/components/modals/modal-header.d.ts +2 -3
- package/lib/components/modals/modal-header.d.ts.map +1 -1
- package/lib/components/modals/modal-header.js +2 -2
- package/lib/components/modals/modal-header.js.map +1 -1
- package/lib/components/modals/modal.d.ts +1 -1
- package/lib/components/modals/modal.d.ts.map +1 -1
- package/lib/components/modals/modal.js +5 -2
- package/lib/components/modals/modal.js.map +1 -1
- package/lib/components/placeholder.d.ts +3 -4
- package/lib/components/placeholder.d.ts.map +1 -1
- package/lib/components/placeholder.js +2 -2
- package/lib/components/placeholder.js.map +1 -1
- package/lib/components/resizeable-sidebar.d.ts.map +1 -1
- package/lib/components/resizeable-sidebar.js +2 -2
- package/lib/components/resizeable-sidebar.js.map +1 -1
- package/lib/components/spin-loader.d.ts +2 -1
- package/lib/components/spin-loader.d.ts.map +1 -1
- package/lib/components/spin-loader.js +10 -3
- package/lib/components/spin-loader.js.map +1 -1
- package/lib/components/store-connector.d.ts +17 -0
- package/lib/components/store-connector.d.ts.map +1 -0
- package/lib/components/store-connector.js +25 -0
- package/lib/components/store-connector.js.map +1 -0
- package/lib/components/tab-nav-bar.d.ts +2 -3
- package/lib/components/tab-nav-bar.d.ts.map +1 -1
- package/lib/components/tab-nav-bar.js +2 -2
- package/lib/components/tab-nav-bar.js.map +1 -1
- package/lib/components/tooltip.d.ts.map +1 -1
- package/lib/components/tooltip.js +2 -8
- package/lib/components/tooltip.js.map +1 -1
- package/lib/components/virtual-grid.d.ts +1 -1
- package/lib/components/workspace-container.d.ts +1 -2
- package/lib/components/workspace-container.d.ts.map +1 -1
- package/lib/components/workspace-container.js +3 -3
- package/lib/components/workspace-container.js.map +1 -1
- package/lib/components/workspace-tabs/tab.d.ts +3 -3
- package/lib/components/workspace-tabs/tab.d.ts.map +1 -1
- package/lib/components/workspace-tabs/tab.js +18 -4
- package/lib/components/workspace-tabs/tab.js.map +1 -1
- package/lib/components/workspace-tabs/workspace-tabs.d.ts +1 -2
- package/lib/components/workspace-tabs/workspace-tabs.d.ts.map +1 -1
- package/lib/components/workspace-tabs/workspace-tabs.js +48 -23
- package/lib/components/workspace-tabs/workspace-tabs.js.map +1 -1
- package/lib/hooks/use-effect-on-change.d.ts +3 -0
- package/lib/hooks/use-effect-on-change.d.ts.map +1 -0
- package/lib/hooks/use-effect-on-change.js +19 -0
- package/lib/hooks/use-effect-on-change.js.map +1 -0
- package/lib/hooks/use-scrollbars.d.ts +11 -0
- package/lib/hooks/use-scrollbars.d.ts.map +1 -0
- package/lib/hooks/use-scrollbars.js +117 -0
- package/lib/hooks/use-scrollbars.js.map +1 -0
- package/lib/hooks/use-theme.d.ts +11 -13
- package/lib/hooks/use-theme.d.ts.map +1 -1
- package/lib/hooks/use-theme.js +17 -21
- package/lib/hooks/use-theme.js.map +1 -1
- package/lib/index.d.ts +8 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +21 -8
- package/lib/index.js.map +1 -1
- package/package.json +52 -43
- package/lib/components/checkbox.d.ts +0 -5
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js +0 -15
- package/lib/components/checkbox.js.map +0 -1
- package/lib/components/toggle.d.ts +0 -5
- package/lib/components/toggle.d.ts.map +0 -1
- package/lib/components/toggle.js +0 -15
- package/lib/components/toggle.js.map +0 -1
|
@@ -26,28 +26,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.InlineKeyCode = exports.InlineCode = exports.Body = exports.Subtitle = exports.H3 = exports.H2 = exports.H1 = exports.Toggle = exports.ToastVariant = exports.Toast = exports.TextInput = exports.TextArea = exports.Tabs = exports.Tab = exports.Stage = exports.Cell = exports.Row = exports.TableHeader = exports.Table = exports.OptionGroup = exports.Option = exports.Select = exports.SegmentedControlOption = exports.SegmentedControl = exports.RadioGroup = exports.Radio = exports.RadioBoxGroup = exports.RadioBox = exports.Popover = exports.Pipeline = exports.MongoDBLogo = exports.MongoDBLogoMark = exports.MarketingModal = exports.ModalFooter = exports.Modal = exports.MenuSeparator = exports.MenuItem = exports.Menu = exports.Language = exports.IconButton = exports.Icon = exports.ConfirmationModal = exports.Code = exports.Checkbox = exports.Card = exports.Button = exports.Banner = exports.Badge = exports.
|
|
30
|
-
exports.
|
|
29
|
+
exports.Disclaimer = exports.InlineKeyCode = exports.InlineCode = exports.Body = exports.Subtitle = exports.H3 = exports.H2 = exports.H1 = exports.Toggle = exports.ToastVariant = exports.Toast = exports.TextInput = exports.TextArea = exports.Tabs = exports.Tab = exports.Stage = exports.Cell = exports.Row = exports.TableHeader = exports.Table = exports.OptionGroup = exports.Option = exports.Select = exports.SegmentedControlOption = exports.SegmentedControl = exports.RadioGroup = exports.Radio = exports.RadioBoxGroup = exports.RadioBox = exports.Popover = exports.Pipeline = exports.MongoDBLogo = exports.MongoDBLogoMark = exports.MarketingModal = exports.ModalFooter = exports.Modal = exports.MenuSeparator = exports.MenuItem = exports.Menu = exports.Language = exports.IconButton = exports.Icon = exports.ConfirmationModal = exports.Code = exports.Checkbox = exports.Card = exports.Button = exports.Banner = exports.Badge = exports.AtlasNavGraphic = void 0;
|
|
30
|
+
exports.Description = exports.Link = exports.Label = exports.Overline = void 0;
|
|
31
31
|
const react_1 = __importDefault(require("react"));
|
|
32
|
-
const use_theme_1 = require("../hooks/use-theme");
|
|
33
32
|
const badge_1 = __importDefault(require("@leafygreen-ui/badge"));
|
|
34
33
|
Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return badge_1.default; } });
|
|
35
34
|
const banner_1 = __importDefault(require("@leafygreen-ui/banner"));
|
|
36
35
|
Object.defineProperty(exports, "Banner", { enumerable: true, get: function () { return banner_1.default; } });
|
|
37
36
|
const button_1 = __importDefault(require("@leafygreen-ui/button"));
|
|
37
|
+
exports.Button = button_1.default;
|
|
38
38
|
const checkbox_1 = __importDefault(require("@leafygreen-ui/checkbox"));
|
|
39
|
+
exports.Checkbox = checkbox_1.default;
|
|
39
40
|
const card_1 = __importDefault(require("@leafygreen-ui/card"));
|
|
41
|
+
exports.Card = card_1.default;
|
|
40
42
|
const code_1 = __importStar(require("@leafygreen-ui/code"));
|
|
41
43
|
Object.defineProperty(exports, "Language", { enumerable: true, get: function () { return code_1.Language; } });
|
|
42
|
-
const combobox_1 = require("@leafygreen-ui/combobox");
|
|
43
|
-
Object.defineProperty(exports, "ComboboxOption", { enumerable: true, get: function () { return combobox_1.ComboboxOption; } });
|
|
44
|
-
Object.defineProperty(exports, "ComboboxGroup", { enumerable: true, get: function () { return combobox_1.ComboboxGroup; } });
|
|
45
44
|
const confirmation_modal_1 = __importDefault(require("@leafygreen-ui/confirmation-modal"));
|
|
45
|
+
exports.ConfirmationModal = confirmation_modal_1.default;
|
|
46
46
|
const icon_1 = __importDefault(require("@leafygreen-ui/icon"));
|
|
47
47
|
const icon_button_1 = __importDefault(require("@leafygreen-ui/icon-button"));
|
|
48
|
+
exports.IconButton = icon_button_1.default;
|
|
48
49
|
const logo_1 = require("@leafygreen-ui/logo");
|
|
49
|
-
Object.defineProperty(exports, "
|
|
50
|
-
Object.defineProperty(exports, "AtlasLogoMark", { enumerable: true, get: function () { return logo_1.AtlasLogoMark; } });
|
|
50
|
+
Object.defineProperty(exports, "AtlasNavGraphic", { enumerable: true, get: function () { return logo_1.AtlasNavGraphic; } });
|
|
51
51
|
Object.defineProperty(exports, "MongoDBLogoMark", { enumerable: true, get: function () { return logo_1.MongoDBLogoMark; } });
|
|
52
52
|
Object.defineProperty(exports, "MongoDBLogo", { enumerable: true, get: function () { return logo_1.MongoDBLogo; } });
|
|
53
53
|
const menu_1 = require("@leafygreen-ui/menu");
|
|
@@ -59,8 +59,11 @@ menu_1.MenuItem.defaultProps = {
|
|
|
59
59
|
type: 'button',
|
|
60
60
|
};
|
|
61
61
|
const modal_1 = __importStar(require("@leafygreen-ui/modal"));
|
|
62
|
+
Object.defineProperty(exports, "ModalFooter", { enumerable: true, get: function () { return modal_1.Footer; } });
|
|
62
63
|
const marketing_modal_1 = __importDefault(require("@leafygreen-ui/marketing-modal"));
|
|
64
|
+
exports.MarketingModal = marketing_modal_1.default;
|
|
63
65
|
const pipeline_1 = require("@leafygreen-ui/pipeline");
|
|
66
|
+
Object.defineProperty(exports, "Pipeline", { enumerable: true, get: function () { return pipeline_1.Pipeline; } });
|
|
64
67
|
Object.defineProperty(exports, "Stage", { enumerable: true, get: function () { return pipeline_1.Stage; } });
|
|
65
68
|
const popover_1 = __importDefault(require("@leafygreen-ui/popover"));
|
|
66
69
|
exports.Popover = popover_1.default;
|
|
@@ -69,9 +72,12 @@ Object.defineProperty(exports, "RadioBox", { enumerable: true, get: function ()
|
|
|
69
72
|
Object.defineProperty(exports, "RadioBoxGroup", { enumerable: true, get: function () { return radio_box_group_1.RadioBoxGroup; } });
|
|
70
73
|
const radio_group_1 = require("@leafygreen-ui/radio-group");
|
|
71
74
|
Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return radio_group_1.Radio; } });
|
|
75
|
+
Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return radio_group_1.RadioGroup; } });
|
|
72
76
|
const segmented_control_1 = require("@leafygreen-ui/segmented-control");
|
|
77
|
+
Object.defineProperty(exports, "SegmentedControl", { enumerable: true, get: function () { return segmented_control_1.SegmentedControl; } });
|
|
73
78
|
Object.defineProperty(exports, "SegmentedControlOption", { enumerable: true, get: function () { return segmented_control_1.SegmentedControlOption; } });
|
|
74
79
|
const select_1 = require("@leafygreen-ui/select");
|
|
80
|
+
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return select_1.Select; } });
|
|
75
81
|
Object.defineProperty(exports, "Option", { enumerable: true, get: function () { return select_1.Option; } });
|
|
76
82
|
Object.defineProperty(exports, "OptionGroup", { enumerable: true, get: function () { return select_1.OptionGroup; } });
|
|
77
83
|
const table_1 = require("@leafygreen-ui/table");
|
|
@@ -79,79 +85,41 @@ Object.defineProperty(exports, "TableHeader", { enumerable: true, get: function
|
|
|
79
85
|
Object.defineProperty(exports, "Row", { enumerable: true, get: function () { return table_1.Row; } });
|
|
80
86
|
Object.defineProperty(exports, "Cell", { enumerable: true, get: function () { return table_1.Cell; } });
|
|
81
87
|
const tabs_1 = require("@leafygreen-ui/tabs");
|
|
88
|
+
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return tabs_1.Tabs; } });
|
|
82
89
|
Object.defineProperty(exports, "Tab", { enumerable: true, get: function () { return tabs_1.Tab; } });
|
|
83
90
|
const text_area_1 = __importDefault(require("@leafygreen-ui/text-area"));
|
|
91
|
+
exports.TextArea = text_area_1.default;
|
|
84
92
|
const text_input_1 = __importDefault(require("@leafygreen-ui/text-input"));
|
|
93
|
+
exports.TextInput = text_input_1.default;
|
|
85
94
|
const toast_1 = __importStar(require("@leafygreen-ui/toast"));
|
|
86
95
|
Object.defineProperty(exports, "Toast", { enumerable: true, get: function () { return toast_1.default; } });
|
|
87
96
|
Object.defineProperty(exports, "ToastVariant", { enumerable: true, get: function () { return toast_1.Variant; } });
|
|
88
97
|
const toggle_1 = __importDefault(require("@leafygreen-ui/toggle"));
|
|
98
|
+
exports.Toggle = toggle_1.default;
|
|
89
99
|
const typography_1 = require("@leafygreen-ui/typography");
|
|
90
|
-
|
|
91
|
-
exports.
|
|
92
|
-
|
|
93
|
-
exports.
|
|
94
|
-
|
|
95
|
-
exports.
|
|
96
|
-
|
|
97
|
-
exports.
|
|
98
|
-
|
|
99
|
-
exports.
|
|
100
|
-
|
|
101
|
-
exports.
|
|
102
|
-
const
|
|
103
|
-
exports.InlineKeyCode = InlineKeyCode;
|
|
104
|
-
const Disclaimer = (0, use_theme_1.withTheme)(typography_1.Disclaimer);
|
|
105
|
-
exports.Disclaimer = Disclaimer;
|
|
106
|
-
const Overline = (0, use_theme_1.withTheme)(typography_1.Overline);
|
|
107
|
-
exports.Overline = Overline;
|
|
108
|
-
const Link = (0, use_theme_1.withTheme)(typography_1.Link);
|
|
109
|
-
exports.Link = Link;
|
|
110
|
-
const Button = (0, use_theme_1.withTheme)(button_1.default);
|
|
111
|
-
exports.Button = Button;
|
|
112
|
-
const Card = (0, use_theme_1.withTheme)(card_1.default);
|
|
113
|
-
exports.Card = Card;
|
|
114
|
-
const Checkbox = (0, use_theme_1.withTheme)(checkbox_1.default);
|
|
115
|
-
exports.Checkbox = Checkbox;
|
|
116
|
-
const Code = (0, use_theme_1.withTheme)(code_1.default);
|
|
117
|
-
exports.Code = Code;
|
|
118
|
-
const Combobox = (0, use_theme_1.withTheme)(combobox_1.Combobox);
|
|
119
|
-
exports.Combobox = Combobox;
|
|
120
|
-
const ConfirmationModal = (0, use_theme_1.withTheme)(confirmation_modal_1.default);
|
|
121
|
-
exports.ConfirmationModal = ConfirmationModal;
|
|
122
|
-
const IconButton = (0, use_theme_1.withTheme)(icon_button_1.default);
|
|
123
|
-
exports.IconButton = IconButton;
|
|
124
|
-
const ModalFooter = (0, use_theme_1.withTheme)(modal_1.Footer);
|
|
125
|
-
exports.ModalFooter = ModalFooter;
|
|
126
|
-
const Modal = (0, use_theme_1.withTheme)(modal_1.default);
|
|
127
|
-
exports.Modal = Modal;
|
|
128
|
-
const MarketingModal = (0, use_theme_1.withTheme)(marketing_modal_1.default);
|
|
129
|
-
exports.MarketingModal = MarketingModal;
|
|
130
|
-
const Pipeline = (0, use_theme_1.withTheme)(pipeline_1.Pipeline);
|
|
131
|
-
exports.Pipeline = Pipeline;
|
|
132
|
-
const RadioGroup = (0, use_theme_1.withTheme)(radio_group_1.RadioGroup);
|
|
133
|
-
exports.RadioGroup = RadioGroup;
|
|
134
|
-
const SegmentedControl = (0, use_theme_1.withTheme)(segmented_control_1.SegmentedControl);
|
|
135
|
-
exports.SegmentedControl = SegmentedControl;
|
|
136
|
-
const Select = (0, use_theme_1.withTheme)(select_1.Select);
|
|
137
|
-
exports.Select = Select;
|
|
138
|
-
const Table = (0, use_theme_1.withTheme)(table_1.Table);
|
|
139
|
-
exports.Table = Table;
|
|
140
|
-
const Tabs = (0, use_theme_1.withTheme)(tabs_1.Tabs);
|
|
141
|
-
exports.Tabs = Tabs;
|
|
142
|
-
const TextArea = (0, use_theme_1.withTheme)(text_area_1.default);
|
|
143
|
-
exports.TextArea = TextArea;
|
|
144
|
-
const TextInput = (0, use_theme_1.withTheme)(text_input_1.default);
|
|
145
|
-
exports.TextInput = TextInput;
|
|
146
|
-
const Toggle = (0, use_theme_1.withTheme)(toggle_1.default);
|
|
147
|
-
exports.Toggle = Toggle;
|
|
148
|
-
const Label = (0, use_theme_1.withTheme)(typography_1.Label);
|
|
149
|
-
exports.Label = Label;
|
|
150
|
-
const Description = (0, use_theme_1.withTheme)(typography_1.Description);
|
|
151
|
-
exports.Description = Description;
|
|
100
|
+
Object.defineProperty(exports, "H1", { enumerable: true, get: function () { return typography_1.H1; } });
|
|
101
|
+
Object.defineProperty(exports, "H2", { enumerable: true, get: function () { return typography_1.H2; } });
|
|
102
|
+
Object.defineProperty(exports, "H3", { enumerable: true, get: function () { return typography_1.H3; } });
|
|
103
|
+
Object.defineProperty(exports, "Subtitle", { enumerable: true, get: function () { return typography_1.Subtitle; } });
|
|
104
|
+
Object.defineProperty(exports, "Body", { enumerable: true, get: function () { return typography_1.Body; } });
|
|
105
|
+
Object.defineProperty(exports, "InlineCode", { enumerable: true, get: function () { return typography_1.InlineCode; } });
|
|
106
|
+
Object.defineProperty(exports, "InlineKeyCode", { enumerable: true, get: function () { return typography_1.InlineKeyCode; } });
|
|
107
|
+
Object.defineProperty(exports, "Disclaimer", { enumerable: true, get: function () { return typography_1.Disclaimer; } });
|
|
108
|
+
Object.defineProperty(exports, "Overline", { enumerable: true, get: function () { return typography_1.Overline; } });
|
|
109
|
+
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return typography_1.Link; } });
|
|
110
|
+
Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return typography_1.Label; } });
|
|
111
|
+
Object.defineProperty(exports, "Description", { enumerable: true, get: function () { return typography_1.Description; } });
|
|
112
|
+
const use_theme_1 = require("../hooks/use-theme");
|
|
152
113
|
const Icon = ({ size, ...rest }) => {
|
|
153
114
|
size = size === 'xsmall' ? 12 : size;
|
|
154
115
|
return react_1.default.createElement(icon_1.default, { size: size, ...rest });
|
|
155
116
|
};
|
|
156
117
|
exports.Icon = Icon;
|
|
118
|
+
Icon.isGlyph = true;
|
|
119
|
+
const Code = (0, use_theme_1.withDarkMode)(code_1.default);
|
|
120
|
+
exports.Code = Code;
|
|
121
|
+
const Table = (0, use_theme_1.withDarkMode)(table_1.Table);
|
|
122
|
+
exports.Table = Table;
|
|
123
|
+
const Modal = (0, use_theme_1.withDarkMode)(modal_1.default);
|
|
124
|
+
exports.Modal = Modal;
|
|
157
125
|
//# sourceMappingURL=leafygreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leafygreen.js","sourceRoot":"","sources":["../../src/components/leafygreen.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;
|
|
1
|
+
{"version":3,"file":"leafygreen.js","sourceRoot":"","sources":["../../src/components/leafygreen.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;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K,GAAG,IAAA,wBAAY,EAAC,aAAe,CAA2B,CAAC;AAmCpE,sBAAK;AAlCP,MAAM,KAAK,GAAG,IAAA,wBAAY,EAAC,eAAsB,CAA2B,CAAC;AAkB3E,sBAAK"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ConfirmationModal as LeafyGreenConfirmationModal } from '../leafygreen';
|
|
3
|
-
declare function ConfirmationModal({ trackingId, ...props }: React.ComponentProps<typeof LeafyGreenConfirmationModal> & {
|
|
3
|
+
declare function ConfirmationModal({ trackingId, children, ...props }: React.ComponentProps<typeof LeafyGreenConfirmationModal> & {
|
|
4
4
|
trackingId?: string;
|
|
5
5
|
}): React.ReactElement;
|
|
6
6
|
export default ConfirmationModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirmation-modal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/confirmation-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,
|
|
1
|
+
{"version":3,"file":"confirmation-modal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/confirmation-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAEL,iBAAiB,IAAI,2BAA2B,EACjD,MAAM,eAAe,CAAC;AAEvB,iBAAS,iBAAiB,CAAC,EACzB,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,2BAA2B,CAAC,GAAG;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,KAAK,CAAC,YAAY,CAWrB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -27,13 +27,14 @@ const react_1 = __importStar(require("react"));
|
|
|
27
27
|
const compass_logging_1 = require("@mongodb-js/compass-logging");
|
|
28
28
|
const { track } = (0, compass_logging_1.createLoggerAndTelemetry)('COMPASS-UI');
|
|
29
29
|
const leafygreen_1 = require("../leafygreen");
|
|
30
|
-
function ConfirmationModal({ trackingId, ...props }) {
|
|
30
|
+
function ConfirmationModal({ trackingId, children, ...props }) {
|
|
31
31
|
(0, react_1.useEffect)(() => {
|
|
32
32
|
if (props.open && trackingId) {
|
|
33
33
|
track('Screen', { name: trackingId });
|
|
34
34
|
}
|
|
35
35
|
}, [props.open, trackingId]);
|
|
36
|
-
return react_1.default.createElement(leafygreen_1.ConfirmationModal, { "data-testid": trackingId, ...props }
|
|
36
|
+
return (react_1.default.createElement(leafygreen_1.ConfirmationModal, { "data-testid": trackingId, ...props },
|
|
37
|
+
react_1.default.createElement(leafygreen_1.Body, { as: "div" }, children)));
|
|
37
38
|
}
|
|
38
39
|
exports.default = ConfirmationModal;
|
|
39
40
|
//# sourceMappingURL=confirmation-modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirmation-modal.js","sourceRoot":"","sources":["../../../src/components/modals/confirmation-modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,iEAAuE;AACvE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,0CAAwB,EAAC,YAAY,CAAC,CAAC;AAEzD,
|
|
1
|
+
{"version":3,"file":"confirmation-modal.js","sourceRoot":"","sources":["../../../src/components/modals/confirmation-modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,iEAAuE;AACvE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,0CAAwB,EAAC,YAAY,CAAC,CAAC;AAEzD,8CAGuB;AAEvB,SAAS,iBAAiB,CAAC,EACzB,UAAU,EACV,QAAQ,EACR,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,8BAA2B,mBAAc,UAAU,KAAM,KAAK;QAC7D,8BAAC,iBAAI,IAAC,EAAE,EAAC,KAAK,IAAE,QAAQ,CAAQ,CACJ,CAC/B,CAAC;AACJ,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-body.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,eAAO,MAAM,OAAO;;;CAGV,CAAC;AAEX,oBAAY,OAAO,GAAG,OAAO,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"modal-body.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,eAAO,MAAM,OAAO;;;CAGV,CAAC;AAEX,oBAAY,OAAO,GAAG,OAAO,OAAO,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AA6B3D,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,QAAA,MAAM,SAAS,uFA6Bb,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -26,9 +26,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.ModalBody = exports.Variant = 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");
|
|
30
29
|
const tokens_1 = require("@leafygreen-ui/tokens");
|
|
31
30
|
const button_1 = require("@leafygreen-ui/button");
|
|
31
|
+
const use_theme_1 = require("../../hooks/use-theme");
|
|
32
32
|
exports.Variant = {
|
|
33
33
|
Default: button_1.Variant.Primary,
|
|
34
34
|
Danger: button_1.Variant.Danger,
|
|
@@ -39,7 +39,6 @@ const contentStyle = (0, emotion_1.css)({
|
|
|
39
39
|
fontFamily: tokens_1.fontFamilies.default,
|
|
40
40
|
fontSize: '13px',
|
|
41
41
|
lineHeight: '20px',
|
|
42
|
-
color: palette_1.palette.black,
|
|
43
42
|
maxHeight: `calc(100vh - ${tokens_1.spacing[6] * 5}px)`,
|
|
44
43
|
overflow: 'auto',
|
|
45
44
|
'&:first-child': {
|
|
@@ -52,7 +51,11 @@ const variantStyle = {
|
|
|
52
51
|
paddingLeft: '78px',
|
|
53
52
|
}),
|
|
54
53
|
};
|
|
54
|
+
const darkModeStyle = (0, emotion_1.css)({
|
|
55
|
+
paddingBottom: tokens_1.spacing[3],
|
|
56
|
+
});
|
|
55
57
|
const ModalBody = (0, react_1.forwardRef)(function ModalBody({ variant = exports.Variant.Default, className, scroll = true, minHeight, children }, ref) {
|
|
58
|
+
const darkMode = (0, use_theme_1.useDarkMode)();
|
|
56
59
|
const style = {};
|
|
57
60
|
if (minHeight) {
|
|
58
61
|
style.minHeight = `${minHeight}px`;
|
|
@@ -60,7 +63,7 @@ const ModalBody = (0, react_1.forwardRef)(function ModalBody({ variant = exports
|
|
|
60
63
|
if (scroll === false) {
|
|
61
64
|
style.overflow = 'visible';
|
|
62
65
|
}
|
|
63
|
-
return (react_1.default.createElement("div", { className: (0, emotion_1.cx)(contentStyle, variantStyle[variant], className), style: style, ref: ref }, children));
|
|
66
|
+
return (react_1.default.createElement("div", { className: (0, emotion_1.cx)(contentStyle, variantStyle[variant], darkMode && darkModeStyle, className), style: style, ref: ref }, children));
|
|
64
67
|
});
|
|
65
68
|
exports.ModalBody = ModalBody;
|
|
66
69
|
//# sourceMappingURL=modal-body.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-body.js","sourceRoot":"","sources":["../../../src/components/modals/modal-body.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,oDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"modal-body.js","sourceRoot":"","sources":["../../../src/components/modals/modal-body.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,oDAAiD;AACjD,kDAA8D;AAC9D,kDAAiE;AACjE,qDAAoD;AAEvC,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,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;AAIF,MAAM,aAAa,GAAG,IAAA,aAAG,EAAC;IACxB,aAAa,EAAE,gBAAO,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC;AAUH,MAAM,SAAS,GAAG,IAAA,kBAAU,EAAiC,SAAS,SAAS,CAC7E,EAAE,OAAO,GAAG,eAAO,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC5E,GAAG;IAEH,MAAM,QAAQ,GAAG,IAAA,uBAAW,GAAE,CAAC;IAE/B,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,EACX,YAAY,EACZ,YAAY,CAAC,OAAO,CAAC,EACrB,QAAQ,IAAI,aAAa,EACzB,SAAS,CACV,EACD,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IAEP,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEM,8BAAS"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { ButtonProps } from '@leafygreen-ui/button';
|
|
3
|
-
declare
|
|
3
|
+
declare function ModalFooterButton({ className, ...props }: ButtonProps): JSX.Element;
|
|
4
4
|
export { ModalFooterButton };
|
|
5
5
|
//# sourceMappingURL=modal-footer-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-footer-button.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-footer-button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal-footer-button.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-footer-button.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAyBzD,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,eAY9D;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -28,10 +28,9 @@ const buttonStyle = {
|
|
|
28
28
|
},
|
|
29
29
|
}),
|
|
30
30
|
};
|
|
31
|
-
function
|
|
32
|
-
const
|
|
33
|
-
return react_1.default.createElement(leafygreen_1.Button, { ...props, className: (0, emotion_1.cx)(className, buttonStyle[
|
|
31
|
+
function ModalFooterButton({ className, ...props }) {
|
|
32
|
+
const darkMode = (0, use_theme_1.useDarkMode)();
|
|
33
|
+
return (react_1.default.createElement(leafygreen_1.Button, { ...props, className: (0, emotion_1.cx)(className, buttonStyle[darkMode ? use_theme_1.Theme.Dark : use_theme_1.Theme.Light]) }));
|
|
34
34
|
}
|
|
35
|
-
const ModalFooterButton = (0, use_theme_1.withTheme)(UnthemedModalFooterButton);
|
|
36
35
|
exports.ModalFooterButton = ModalFooterButton;
|
|
37
36
|
//# sourceMappingURL=modal-footer-button.js.map
|
|
@@ -1 +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,
|
|
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,qDAA2D;AAE3D,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,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAe;IAC7D,MAAM,QAAQ,GAAG,IAAA,uBAAW,GAAE,CAAC;IAE/B,OAAO,CACL,8BAAC,mBAAM,OACD,KAAK,EACT,SAAS,EAAE,IAAA,YAAE,EACX,SAAS,EACT,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAK,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAK,CAAC,KAAK,CAAC,CACjD,GACD,CACH,CAAC;AACJ,CAAC;AAEQ,8CAAiB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export declare const Variant: {
|
|
3
3
|
readonly Default: "primary";
|
|
4
4
|
readonly Danger: "danger";
|
|
@@ -8,8 +8,7 @@ declare type ModalHeaderProps = {
|
|
|
8
8
|
title: string;
|
|
9
9
|
subtitle?: string;
|
|
10
10
|
variant?: Variant;
|
|
11
|
-
darkMode?: boolean;
|
|
12
11
|
};
|
|
13
|
-
declare
|
|
12
|
+
declare function ModalHeader({ title, subtitle, variant, }: ModalHeaderProps): JSX.Element;
|
|
14
13
|
export { ModalHeader };
|
|
15
14
|
//# sourceMappingURL=modal-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-header.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal-header.tsx"],"names":[],"mappings":";AASA,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;CACnB,CAAC;AAEF,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,QAAQ,EACR,OAAyB,GAC1B,EAAE,gBAAgB,eAoBlB;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -53,13 +53,13 @@ const warningIconStyles = (0, emotion_1.css)({
|
|
|
53
53
|
marginTop: '-3px',
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
|
-
function
|
|
56
|
+
function ModalHeader({ title, subtitle, variant = exports.Variant.Default, }) {
|
|
57
|
+
const darkMode = (0, use_theme_1.useDarkMode)();
|
|
57
58
|
return (react_1.default.createElement("div", { className: (0, emotion_1.cx)(headerStyle, variantStyle[variant]) },
|
|
58
59
|
variant === exports.Variant.Danger && (react_1.default.createElement("div", { className: (0, emotion_1.cx)(warningIconStyles) },
|
|
59
60
|
react_1.default.createElement(leafygreen_1.Icon, { glyph: "Warning", fill: palette_1.palette.red.base, role: "presentation" }))),
|
|
60
61
|
react_1.default.createElement("h1", { className: (0, emotion_1.cx)(titleStyle, darkMode && titleStyleDark), "data-testid": "modal-title", id: "modal-title" }, title),
|
|
61
62
|
subtitle && react_1.default.createElement(leafygreen_1.Body, null, subtitle)));
|
|
62
63
|
}
|
|
63
|
-
const ModalHeader = (0, use_theme_1.withTheme)(UnthemedModalHeader);
|
|
64
64
|
exports.ModalHeader = ModalHeader;
|
|
65
65
|
//# sourceMappingURL=modal-header.js.map
|
|
@@ -1 +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;
|
|
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;AAEjE,qDAAoD;AACpD,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;AAQH,SAAS,WAAW,CAAC,EACnB,KAAK,EACL,QAAQ,EACR,OAAO,GAAG,eAAO,CAAC,OAAO,GACR;IACjB,MAAM,QAAQ,GAAG,IAAA,uBAAW,GAAE,CAAC;IAE/B,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;AAEQ,kCAAW"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Modal as LeafyGreenModal } from '../leafygreen';
|
|
3
|
-
declare function Modal({ trackingId, contentClassName, ...props }: React.ComponentProps<typeof LeafyGreenModal> & {
|
|
3
|
+
declare function Modal({ trackingId, className, contentClassName, children, ...props }: React.ComponentProps<typeof LeafyGreenModal> & {
|
|
4
4
|
trackingId?: string;
|
|
5
5
|
}): React.ReactElement;
|
|
6
6
|
export { Modal };
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC,OAAO,EAAQ,KAAK,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAS/D,iBAAS,KAAK,CAAC,EACb,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,GAAG;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,KAAK,CAAC,YAAY,CAsBrB;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -29,18 +29,21 @@ const emotion_1 = require("@leafygreen-ui/emotion");
|
|
|
29
29
|
const compass_logging_1 = require("@mongodb-js/compass-logging");
|
|
30
30
|
const { track } = (0, compass_logging_1.createLoggerAndTelemetry)('COMPASS-UI');
|
|
31
31
|
const leafygreen_1 = require("../leafygreen");
|
|
32
|
+
const use_scrollbars_1 = require("../../hooks/use-scrollbars");
|
|
32
33
|
const contentStyles = (0, emotion_1.css)({
|
|
33
34
|
width: '600px',
|
|
34
35
|
letterSpacing: 0,
|
|
35
36
|
padding: 0,
|
|
36
37
|
});
|
|
37
|
-
function Modal({ trackingId, contentClassName, ...props }) {
|
|
38
|
+
function Modal({ trackingId, className, contentClassName, children, ...props }) {
|
|
39
|
+
const { className: scrollbarStyles } = (0, use_scrollbars_1.useScrollbars)();
|
|
38
40
|
(0, react_1.useEffect)(() => {
|
|
39
41
|
if (props.open && trackingId) {
|
|
40
42
|
track('Screen', { name: trackingId });
|
|
41
43
|
}
|
|
42
44
|
}, [props.open, trackingId]);
|
|
43
|
-
return (react_1.default.createElement(leafygreen_1.Modal, { contentClassName: (0, emotion_1.cx)(contentStyles, contentClassName), ...props }
|
|
45
|
+
return (react_1.default.createElement(leafygreen_1.Modal, { className: (0, emotion_1.cx)(scrollbarStyles, className), contentClassName: (0, emotion_1.cx)(contentStyles, contentClassName), ...props },
|
|
46
|
+
react_1.default.createElement(leafygreen_1.Body, { as: "div" }, children)));
|
|
44
47
|
}
|
|
45
48
|
exports.Modal = Modal;
|
|
46
49
|
//# sourceMappingURL=modal.js.map
|
|
@@ -1 +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,
|
|
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,8CAA+D;AAC/D,+DAA2D;AAE3D,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,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EAGT;IAMC,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,IAAA,8BAAa,GAAE,CAAC;IAEvD,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,SAAS,EAAE,IAAA,YAAE,EAAC,eAAe,EAAE,SAAS,CAAC,EACzC,gBAAgB,EAAE,IAAA,YAAE,EAAC,aAAa,EAAE,gBAAgB,CAAC,KACjD,KAAK;QAET,8BAAC,iBAAI,IAAC,EAAE,EAAC,KAAK,IAAE,QAAQ,CAAQ,CAChB,CACnB,CAAC;AACJ,CAAC;AAEQ,sBAAK"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
declare const Placeholder: React.
|
|
4
|
-
minChar?: number
|
|
5
|
-
maxChar?: number
|
|
3
|
+
declare const Placeholder: React.FunctionComponent<Omit<React.HTMLProps<HTMLDivElement>, 'minChar' | 'maxChar' | 'width' | 'height'> & {
|
|
4
|
+
minChar?: number;
|
|
5
|
+
maxChar?: number;
|
|
6
6
|
width?: CSSProperties['width'];
|
|
7
7
|
height?: CSSProperties['height'];
|
|
8
|
-
darkMode?: boolean | undefined;
|
|
9
8
|
}>;
|
|
10
9
|
export { Placeholder };
|
|
11
10
|
//# sourceMappingURL=placeholder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder.d.ts","sourceRoot":"","sources":["../../src/components/placeholder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"placeholder.d.ts","sourceRoot":"","sources":["../../src/components/placeholder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAgDvC,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CACxC,IAAI,CACF,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAC/B,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAC3C,GAAG;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CAClC,CAwBF,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -64,12 +64,12 @@ const placeholderDarkMode = (0, emotion_1.css)({
|
|
|
64
64
|
function getBoundRandom(min, max) {
|
|
65
65
|
return Math.random() * (max - min) + min;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Placeholder = ({ className, minChar = 5, maxChar = 15, width: propsWidth, height: propsHeight = tokens_1.spacing[3], ...props }) => {
|
|
68
|
+
const darkMode = (0, use_theme_1.useDarkMode)();
|
|
68
69
|
const width = (0, react_1.useMemo)(() => {
|
|
69
70
|
return propsWidth || `${Math.round(getBoundRandom(minChar, maxChar))}ch`;
|
|
70
71
|
}, [minChar, maxChar, propsWidth]);
|
|
71
72
|
return (react_1.default.createElement("div", { ...props, role: "presentation", "data-testid": "placeholder", className: (0, emotion_1.cx)(placeholder, className, darkMode && placeholderDarkMode), style: { width, height: propsHeight } }));
|
|
72
73
|
};
|
|
73
|
-
const Placeholder = (0, use_theme_1.withTheme)(UnthemedPlaceholder);
|
|
74
74
|
exports.Placeholder = Placeholder;
|
|
75
75
|
//# sourceMappingURL=placeholder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../../src/components/placeholder.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;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KAAK;IACtC,gBAAgB,EAAE,iBAAO,CAAC,IAAI,CAAC,KAAK;CACrC,CAAC,CAAC;AAEH,SAAS,cAAc,CAAC,GAAW,EAAE,GAAW;IAC9C,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAC3C,CAAC;AAED,MAAM,WAAW,GAUb,CAAC,EACH,SAAS,EACT,OAAO,GAAG,CAAC,EACX,OAAO,GAAG,EAAE,EACZ,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,WAAW,GAAG,gBAAO,CAAC,CAAC,CAAC,EAChC,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,IAAA,uBAAW,GAAE,CAAC;IAE/B,MAAM,KAAK,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACzB,OAAO,UAAU,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;IAC3E,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAEnC,OAAO,CACL,0CACM,KAAK,EACT,IAAI,EAAC,cAAc,iBACP,aAAa,EACzB,SAAS,EAAE,IAAA,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;AAEO,kCAAW"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,WAsEH,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -70,6 +70,7 @@ exports.defaultSidebarWidth = tokens_1.spacing[6] * 4;
|
|
|
70
70
|
const ResizableSidebar = ({ collapsable = false, expanded = true, setExpanded = () => {
|
|
71
71
|
return;
|
|
72
72
|
}, initialWidth = exports.defaultSidebarWidth, minWidth = 210, collapsedWidth = 48, children, }) => {
|
|
73
|
+
const darkMode = (0, use_theme_1.useDarkMode)();
|
|
73
74
|
const [width, setWidth] = (0, react_1.useState)(initialWidth);
|
|
74
75
|
const [prevWidth, setPrevWidth] = (0, react_1.useState)(initialWidth);
|
|
75
76
|
const getMaxSidebarWidth = (0, react_1.useCallback)(() => {
|
|
@@ -95,8 +96,7 @@ const ResizableSidebar = ({ collapsable = false, expanded = true, setExpanded =
|
|
|
95
96
|
setWidth(prevWidth);
|
|
96
97
|
}
|
|
97
98
|
}, [setWidth, prevWidth, expanded, width, collapsedWidth]);
|
|
98
|
-
|
|
99
|
-
return (react_1.default.createElement("div", { className: (0, emotion_1.cx)(containerStyles, theme === use_theme_1.Theme.Dark ? containerStylesDark : containerStylesLight), style: {
|
|
99
|
+
return (react_1.default.createElement("div", { className: (0, emotion_1.cx)(containerStyles, darkMode ? containerStylesDark : containerStylesLight), style: {
|
|
100
100
|
minWidth: collapsable ? collapsedWidth : minWidth,
|
|
101
101
|
width: renderedWidth,
|
|
102
102
|
flex: 'none',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizeable-sidebar.js","sourceRoot":"","sources":["../../src/components/resizeable-sidebar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgE;A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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"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
interface SpinLoaderProps {
|
|
3
3
|
size?: string;
|
|
4
4
|
title?: string;
|
|
5
|
+
className?: string;
|
|
5
6
|
}
|
|
6
|
-
declare function SpinLoader({ size, title }: SpinLoaderProps): JSX.Element;
|
|
7
|
+
declare function SpinLoader({ size, title, className, }: SpinLoaderProps): JSX.Element;
|
|
7
8
|
export { SpinLoader };
|
|
8
9
|
//# sourceMappingURL=spin-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spin-loader.d.ts","sourceRoot":"","sources":["../../src/components/spin-loader.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"spin-loader.d.ts","sourceRoot":"","sources":["../../src/components/spin-loader.tsx"],"names":[],"mappings":";AAKA,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyBD,iBAAS,UAAU,CAAC,EAClB,IAAa,EACb,KAAK,EACL,SAAS,GACV,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAiB/B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -7,13 +7,13 @@ exports.SpinLoader = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const emotion_1 = require("@leafygreen-ui/emotion");
|
|
9
9
|
const palette_1 = require("@leafygreen-ui/palette");
|
|
10
|
+
const use_theme_1 = require("../hooks/use-theme");
|
|
10
11
|
const shellLoaderSpin = (0, emotion_1.keyframes) `
|
|
11
12
|
0% { transform: rotate(0deg); }
|
|
12
13
|
100% { transform: rotate(360deg); }
|
|
13
14
|
`;
|
|
14
15
|
const spinLoaderStyle = (0, emotion_1.css) `
|
|
15
16
|
border: 2px solid transparent;
|
|
16
|
-
border-top: 2px solid ${palette_1.palette.gray.dark3};
|
|
17
17
|
border-radius: 50%;
|
|
18
18
|
padding: 0;
|
|
19
19
|
margin: 0;
|
|
@@ -22,8 +22,15 @@ const spinLoaderStyle = (0, emotion_1.css) `
|
|
|
22
22
|
|
|
23
23
|
animation: ${shellLoaderSpin} 700ms ease infinite;
|
|
24
24
|
`;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const lightStyles = (0, emotion_1.css)({
|
|
26
|
+
borderTop: `2px solid ${palette_1.palette.gray.dark3}`,
|
|
27
|
+
});
|
|
28
|
+
const darkStyles = (0, emotion_1.css)({
|
|
29
|
+
borderTop: `2px solid ${palette_1.palette.gray.light3}`,
|
|
30
|
+
});
|
|
31
|
+
function SpinLoader({ size = '12px', title, className, }) {
|
|
32
|
+
const darkMode = (0, use_theme_1.useDarkMode)();
|
|
33
|
+
return (react_1.default.createElement("div", { className: (0, emotion_1.cx)(spinLoaderStyle, darkMode ? darkStyles : lightStyles, className), style: {
|
|
27
34
|
width: size,
|
|
28
35
|
height: size,
|
|
29
36
|
}, title: title }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spin-loader.js","sourceRoot":"","sources":["../../src/components/spin-loader.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"spin-loader.js","sourceRoot":"","sources":["../../src/components/spin-loader.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAA4D;AAC5D,oDAAiD;AACjD,kDAAiD;AAQjD,MAAM,eAAe,GAAG,IAAA,mBAAS,EAAA;;;CAGhC,CAAC;AAEF,MAAM,eAAe,GAAG,IAAA,aAAG,EAAA;;;;;;;;eAQZ,eAAe;CAC7B,CAAC;AACF,MAAM,WAAW,GAAG,IAAA,aAAG,EAAC;IACtB,SAAS,EAAE,aAAa,iBAAO,CAAC,IAAI,CAAC,KAAK,EAAE;CAC7C,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,IAAA,aAAG,EAAC;IACrB,SAAS,EAAE,aAAa,iBAAO,CAAC,IAAI,CAAC,MAAM,EAAE;CAC9C,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,EAClB,IAAI,GAAG,MAAM,EACb,KAAK,EACL,SAAS,GACO;IAChB,MAAM,QAAQ,GAAG,IAAA,uBAAW,GAAE,CAAC;IAE/B,OAAO,CACL,uCACE,SAAS,EAAE,IAAA,YAAE,EACX,eAAe,EACf,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,EACnC,SAAS,CACV,EACD,KAAK,EAAE;YACL,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;SACb,EACD,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC;AAEQ,gCAAU"}
|