Debian Codegraph @

node/@patternfly/react-core/dist/js/components/Toolbar/ToolbarGroup.js

raw
1 "use strict";
2 Object.defineProperty(exports, "__esModule", { value: true });
3 exports.ToolbarGroup = exports.ToolbarGroupVariant = void 0;
4 const tslib_1 = require("tslib");
5 const jsx_runtime_1 = require("react/jsx-runtime");
6 const react_1 = require("react");
7 const toolbar_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Toolbar/toolbar"));
8 const react_styles_1 = require("@patternfly/react-styles");
9 const util_1 = require("../../helpers/util");
10 const PageContext_1 = require("../Page/PageContext");
11 var ToolbarGroupVariant;
12 (function (ToolbarGroupVariant) {
13 ToolbarGroupVariant["filter-group"] = "filter-group";
14 ToolbarGroupVariant["action-group"] = "action-group";
15 ToolbarGroupVariant["action-group-inline"] = "action-group-inline";
16 ToolbarGroupVariant["action-group-plain"] = "action-group-plain";
17 ToolbarGroupVariant["label-group"] = "label-group";
18 })(ToolbarGroupVariant || (exports.ToolbarGroupVariant = ToolbarGroupVariant = {}));
19 class ToolbarGroupWithRef extends react_1.Component {
20 render() {
21 const _a = this.props, { visibility, visibilityAtHeight, align, alignItems, alignSelf, gap, columnGap, rowGap, rowWrap, className, variant, children, isOverflowContainer, innerRef } = _a, props = tslib_1.__rest(_a, ["visibility", "visibilityAtHeight", "align", "alignItems", "alignSelf", "gap", "columnGap", "rowGap", "rowWrap", "className", "variant", "children", "isOverflowContainer", "innerRef"]);
22 return ((0, jsx_runtime_1.jsx)(PageContext_1.PageContext.Consumer, { children: ({ width, getBreakpoint, height, getVerticalBreakpoint }) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, react_styles_1.css)(toolbar_1.default.toolbarGroup, variant &&
23 toolbar_1.default.modifiers[(0, util_1.toCamel)(variant)], (0, util_1.formatBreakpointMods)(visibility, toolbar_1.default, '', getBreakpoint(width)), (0, util_1.formatBreakpointMods)(visibilityAtHeight, toolbar_1.default, '', getVerticalBreakpoint(height), true), (0, util_1.formatBreakpointMods)(align, toolbar_1.default, '', getBreakpoint(width)), (0, util_1.formatBreakpointMods)(gap, toolbar_1.default, '', getBreakpoint(width)), (0, util_1.formatBreakpointMods)(columnGap, toolbar_1.default, '', getBreakpoint(width)), (0, util_1.formatBreakpointMods)(rowGap, toolbar_1.default, '', getBreakpoint(width)), (0, util_1.formatBreakpointMods)(rowWrap, toolbar_1.default, '', getBreakpoint(width)), alignItems === 'start' && toolbar_1.default.modifiers.alignItemsStart, alignItems === 'center' && toolbar_1.default.modifiers.alignItemsCenter, alignItems === 'baseline' && toolbar_1.default.modifiers.alignItemsBaseline, alignSelf === 'start' && toolbar_1.default.modifiers.alignSelfStart, alignSelf === 'center' && toolbar_1.default.modifiers.alignSelfCenter, alignSelf === 'baseline' && toolbar_1.default.modifiers.alignSelfBaseline, isOverflowContainer && toolbar_1.default.modifiers.overflowContainer, className) }, props, { ref: innerRef, children: children }))) }));
24 }
25 }
26 exports.ToolbarGroup = (0, react_1.forwardRef)((props, ref) => ((0, jsx_runtime_1.jsx)(ToolbarGroupWithRef, Object.assign({}, props, { innerRef: ref }))));
27 //# sourceMappingURL=ToolbarGroup.js.map