@lonli-lokli/react-mosaic-component
Version:
A React Tiling Window Manager
65 lines (63 loc) • 3.69 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// libs/react-mosaic-component/src/lib/buttons/defaultToolbarControls.tsx
var defaultToolbarControls_exports = {};
__export(defaultToolbarControls_exports, {
DEFAULT_PANEL_CONTROLS_IN_TABS: () => DEFAULT_PANEL_CONTROLS_IN_TABS,
DEFAULT_PANEL_CONTROLS_WITHOUT_CREATION: () => DEFAULT_PANEL_CONTROLS_WITHOUT_CREATION,
DEFAULT_PANEL_CONTROLS_WITH_CREATION: () => DEFAULT_PANEL_CONTROLS_WITH_CREATION,
createDefaultTabsControls: () => createDefaultTabsControls
});
module.exports = __toCommonJS(defaultToolbarControls_exports);
var import_react = __toESM(require("react"), 1);
var import_ExpandButton = require("./ExpandButton.cjs");
var import_RemoveButton = require("./RemoveButton.cjs");
var import_ReplaceButton = require("./ReplaceButton.cjs");
var import_SplitButton = require("./SplitButton.cjs");
var import_AddTabButton = require("./AddTabButton.cjs");
var import_TabSplitButton = require("./TabSplitButton.cjs");
var import_TabRemoveButton = require("./TabRemoveButton.cjs");
var DEFAULT_PANEL_CONTROLS_IN_TABS = import_react.default.Children.toArray([
/* @__PURE__ */ import_react.default.createElement(import_RemoveButton.RemoveButton, null)
]);
var createDefaultTabsControls = (path) => import_react.default.Children.toArray([
/* @__PURE__ */ import_react.default.createElement(import_TabSplitButton.TabSplitButton, { path }),
/* @__PURE__ */ import_react.default.createElement(import_TabRemoveButton.TabRemoveButton, { path })
]);
var DEFAULT_PANEL_CONTROLS_WITH_CREATION = import_react.default.Children.toArray([
/* @__PURE__ */ import_react.default.createElement(import_ReplaceButton.ReplaceButton, null),
/* @__PURE__ */ import_react.default.createElement(import_SplitButton.SplitButton, null),
/* @__PURE__ */ import_react.default.createElement(import_AddTabButton.AddTabButton, null),
/* @__PURE__ */ import_react.default.createElement(import_ExpandButton.ExpandButton, null),
/* @__PURE__ */ import_react.default.createElement(import_RemoveButton.RemoveButton, null)
]);
var DEFAULT_PANEL_CONTROLS_WITHOUT_CREATION = import_react.default.Children.toArray([
/* @__PURE__ */ import_react.default.createElement(import_ExpandButton.ExpandButton, null),
/* @__PURE__ */ import_react.default.createElement(import_RemoveButton.RemoveButton, null)
]);