@qoretechnologies/reqore 0.63.5 → 0.63.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/EmptyState/index.d.ts +0 -2
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/EmptyState/index.js +3 -51
- package/dist/components/EmptyState/index.js.map +1 -1
- package/dist/components/Panel/index.d.ts +3 -1
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +102 -26
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +3 -1
- package/dist/components/Table/index.js.map +1 -1
- package/package.json +1 -1
- package/tests.json +1 -1
|
@@ -24,8 +24,6 @@ export interface IReqoreEmptyStateProps extends Omit<React.HTMLAttributes<HTMLDi
|
|
|
24
24
|
transparent?: boolean;
|
|
25
25
|
/** Background opacity */
|
|
26
26
|
opacity?: number;
|
|
27
|
-
/** Whether to use a compact layout with less padding */
|
|
28
|
-
compact?: boolean;
|
|
29
27
|
}
|
|
30
28
|
export declare const ReqoreEmptyState: React.MemoExoticComponent<(props: IReqoreEmptyStateProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>>;
|
|
31
29
|
export default ReqoreEmptyState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAIzD,OAAO,EACL,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAmB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGvD,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EAC5D,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB;IACpB,qCAAqC;IACrC,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,kCAAkC;IAClC,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,4BAA4B;IAC5B,SAAS,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IAC9D,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACvC,yEAAyE;IACzE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,wKAyG5B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
var __assign = (this && this.__assign) || function () {
|
|
7
3
|
__assign = Object.assign || function(t) {
|
|
8
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -14,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
10
|
};
|
|
15
11
|
return __assign.apply(this, arguments);
|
|
16
12
|
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
13
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
41
14
|
var t = {};
|
|
42
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -54,36 +27,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
54
27
|
exports.__esModule = true;
|
|
55
28
|
exports.ReqoreEmptyState = void 0;
|
|
56
29
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
57
|
-
var polished_1 = require("polished");
|
|
58
30
|
var react_1 = require("react");
|
|
59
|
-
var
|
|
60
|
-
var sizes_1 = require("../../constants/sizes");
|
|
61
|
-
var colors_1 = require("../../helpers/colors");
|
|
31
|
+
var __1 = require("../..");
|
|
62
32
|
var utils_1 = require("../../helpers/utils");
|
|
63
33
|
var useTheme_1 = require("../../hooks/useTheme");
|
|
64
|
-
var styles_1 = require("../../styles");
|
|
65
34
|
var ControlGroup_1 = __importDefault(require("../ControlGroup"));
|
|
66
|
-
var Effect_1 = require("../Effect");
|
|
67
35
|
var Header_1 = require("../Header");
|
|
68
36
|
var Icon_1 = __importDefault(require("../Icon"));
|
|
69
37
|
var Paragraph_1 = require("../Paragraph");
|
|
70
|
-
var TooltipComponent_1 = require("../TooltipComponent");
|
|
71
|
-
var StyledEmptyStateWrapper = (0, styled_components_1["default"])(Effect_1.StyledEffect)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n width: ", ";\n\n ", "\n\n ", "\n"], ["\n display: inline-flex;\n justify-content: center;\n width: ", ";\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
72
|
-
var $fluid = _a.$fluid;
|
|
73
|
-
return ($fluid ? '100%' : undefined);
|
|
74
|
-
}, function (_a) {
|
|
75
|
-
var $hasBackground = _a.$hasBackground, theme = _a.theme, size = _a.size, rounded = _a.rounded, flat = _a.flat, intent = _a.intent, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b, compact = _a.compact;
|
|
76
|
-
return $hasBackground && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", "px;\n border: ", ";\n color: ", ";\n padding: ", ";\n "], ["\n background-color: ", ";\n border-radius: ", "px;\n border: ", ";\n color: ", ";\n padding: ", ";\n "])), (0, polished_1.rgba)((0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.03), opacity), rounded ? sizes_1.RADIUS_FROM_SIZE[size] : 0, flat
|
|
77
|
-
? undefined
|
|
78
|
-
: "1px solid ".concat((0, colors_1.changeLightness)(intent ? theme.intents[intent] : (0, colors_1.getMainBackgroundColor)(theme), 0.08)), (0, colors_1.getReadableColor)(theme, undefined, undefined, true), compact
|
|
79
|
-
? "".concat(sizes_1.PADDING_FROM_SIZE[size] * 2, "px ").concat(sizes_1.PADDING_FROM_SIZE[size] * 3, "px")
|
|
80
|
-
: "".concat(sizes_1.PADDING_FROM_SIZE[size] * 4, "px ").concat(sizes_1.PADDING_FROM_SIZE[size] * 6, "px"));
|
|
81
|
-
}, function (_a) {
|
|
82
|
-
var disabled = _a.disabled;
|
|
83
|
-
return disabled && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), styles_1.DisabledElement);
|
|
84
|
-
});
|
|
85
38
|
exports.ReqoreEmptyState = (0, react_1.memo)((0, react_1.forwardRef)(function (_a, ref) {
|
|
86
|
-
var icon = _a.icon, iconColor = _a.iconColor, iconProps = _a.iconProps, title = _a.title, description = _a.description, actions = _a.actions, _b = _a.size, size = _b === void 0 ? 'normal' : _b, customTheme = _a.customTheme, intent = _a.intent, fluid = _a.fluid, flat = _a.flat, disabled = _a.disabled, tooltip = _a.tooltip, rounded = _a.rounded, transparent = _a.transparent, opacity = _a.opacity, effect = _a.effect,
|
|
39
|
+
var icon = _a.icon, iconColor = _a.iconColor, iconProps = _a.iconProps, title = _a.title, description = _a.description, actions = _a.actions, _b = _a.size, size = _b === void 0 ? 'normal' : _b, customTheme = _a.customTheme, intent = _a.intent, fluid = _a.fluid, flat = _a.flat, disabled = _a.disabled, tooltip = _a.tooltip, rounded = _a.rounded, transparent = _a.transparent, opacity = _a.opacity, effect = _a.effect, className = _a.className, rest = __rest(_a, ["icon", "iconColor", "iconProps", "title", "description", "actions", "size", "customTheme", "intent", "fluid", "flat", "disabled", "tooltip", "rounded", "transparent", "opacity", "effect", "className"]);
|
|
87
40
|
var theme = (0, useTheme_1.useReqoreTheme)('main', customTheme, intent);
|
|
88
41
|
var iconSize = (0, react_1.useMemo)(function () { return (0, utils_1.getOneHigherSize)(size); }, [size]);
|
|
89
42
|
var descriptionSize = (0, react_1.useMemo)(function () { return (0, utils_1.getOneLessSize)(size); }, [size]);
|
|
@@ -97,9 +50,8 @@ exports.ReqoreEmptyState = (0, react_1.memo)((0, react_1.forwardRef)(function (_
|
|
|
97
50
|
}
|
|
98
51
|
return newEffect;
|
|
99
52
|
}, [effect, intent, theme]);
|
|
100
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(__1.ReqorePanel, __assign({ transparent: transparent, minimal: true, flat: true, padded: 'massive' }, rest, { tooltip: tooltip, ref: ref, customTheme: theme, size: size, fluid: fluid, disabled: disabled, rounded: rounded, intent: intent, contentEffect: transformedEffect, className: "".concat(className || '', " reqore-empty-state") }, { children: (0, jsx_runtime_1.jsxs)(ControlGroup_1["default"], __assign({ vertical: true, horizontalAlign: 'center', className: 'reqore-empty-state-content' }, { children: [icon && ((0, jsx_runtime_1.jsx)(Icon_1["default"], __assign({}, iconProps, { icon: icon, size: iconSize, color: iconColor, intent: iconColor || hasBackground ? undefined : intent, className: 'reqore-empty-state-icon' }))), title && ((0, jsx_runtime_1.jsx)(Header_1.ReqoreHeading, __assign({ size: (0, utils_1.getOneHigherSize)(size), className: 'reqore-empty-state-title' }, { children: title }))), description &&
|
|
101
54
|
(typeof description === 'string' ? ((0, jsx_runtime_1.jsx)(Paragraph_1.ReqoreP, __assign({ size: descriptionSize, className: 'reqore-empty-state-description', effect: { opacity: 0.7 }, style: { textAlign: 'center', maxWidth: '480px' } }, { children: description }))) : ((0, jsx_runtime_1.jsx)("div", __assign({ className: 'reqore-empty-state-description' }, { children: description })))), actions && (0, jsx_runtime_1.jsx)("div", __assign({ className: 'reqore-empty-state-actions' }, { children: actions }))] })) })));
|
|
102
55
|
}));
|
|
103
56
|
exports["default"] = exports.ReqoreEmptyState;
|
|
104
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
105
57
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/EmptyState/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/EmptyState/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyD;AACzD,2BAAoC;AACpC,6CAAuE;AACvE,iDAAsD;AAWtD,iEAAiD;AAEjD,oCAA0C;AAC1C,iDAAuD;AACvD,0CAAuC;AAiC1B,QAAA,gBAAgB,GAAG,IAAA,YAAI,EAClC,IAAA,kBAAU,EACR,UACE,EAoBC,EACD,GAAG;IApBD,IAAA,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,SAAS,eAAA,EACT,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,OAAO,aAAA,EACP,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,WAAW,iBAAA,EACX,MAAM,YAAA,EACN,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,OAAO,aAAA,EACP,WAAW,iBAAA,EACX,OAAO,aAAA,EACP,MAAM,YAAA,EACN,SAAS,eAAA,EACN,IAAI,cAnBT,0MAoBC,CADQ;IAIT,IAAM,KAAK,GAAG,IAAA,yBAAc,EAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAE1D,IAAM,QAAQ,GAAG,IAAA,eAAO,EAAC,cAAM,OAAA,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAtB,CAAsB,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,IAAM,eAAe,GAAG,IAAA,eAAO,EAAC,cAAM,OAAA,IAAA,sBAAc,EAAC,IAA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,EACV,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,SAAS,IAAI,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EACvD,SAAS,EAAC,yBAAyB,IACnC,CACH,EACA,KAAK,IAAI,CACR,uBAAC,sBAAa,aAAC,IAAI,EAAE,IAAA,wBAAgB,EAAC,IAAI,CAAC,EAAE,SAAS,EAAC,0BAA0B,gBAC9E,KAAK,IACQ,CACjB,EACA,WAAW;oBACV,CAAC,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,CACjC,uBAAC,mBAAO,aACN,IAAI,EAAE,eAAe,EACrB,SAAS,EAAC,gCAAgC,EAC1C,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,EACxB,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAEhD,WAAW,IACJ,CACX,CAAC,CAAC,CAAC,CACF,yCAAK,SAAS,EAAC,gCAAgC,gBAAE,WAAW,IAAO,CACpE,CAAC,EACH,OAAO,IAAI,yCAAK,SAAS,EAAC,4BAA4B,gBAAE,OAAO,IAAO,KACpD,IACT,CACf,CAAC;AACJ,CAAC,CACF,CACF,CAAC;AAEF,qBAAe,wBAAgB,CAAC"}
|
|
@@ -58,7 +58,7 @@ export interface IReqorePanelProps extends IReqoreComponent, IWithReqoreSize, IW
|
|
|
58
58
|
unMountContentOnCollapse?: boolean;
|
|
59
59
|
onCollapseChange?: (isCollapsed?: boolean) => void;
|
|
60
60
|
fill?: boolean;
|
|
61
|
-
padded?: boolean;
|
|
61
|
+
padded?: boolean | TSizes;
|
|
62
62
|
contentStyle?: React.CSSProperties;
|
|
63
63
|
opacity?: number;
|
|
64
64
|
blur?: number;
|
|
@@ -80,6 +80,7 @@ export interface IReqorePanelProps extends IReqoreComponent, IWithReqoreSize, IW
|
|
|
80
80
|
responsiveActionsWrapperProps?: Partial<IReqoreControlGroupProps>;
|
|
81
81
|
stickyHeader?: boolean;
|
|
82
82
|
stickyHeaderOffset?: number;
|
|
83
|
+
floatingActions?: boolean;
|
|
83
84
|
}
|
|
84
85
|
export interface IStyledPanel extends IReqorePanelProps {
|
|
85
86
|
theme: IReqoreTheme;
|
|
@@ -101,6 +102,7 @@ export declare const StyledPanelTitle: any;
|
|
|
101
102
|
export declare const StyledPanelTopBar: any;
|
|
102
103
|
export declare const StyledPanelBottomActions: any;
|
|
103
104
|
export declare const StyledPanelContent: any;
|
|
105
|
+
export declare const StyledFloatingActions: any;
|
|
104
106
|
export declare const ReqorePanelSkeleton: import("react").MemoExoticComponent<({ size, isCollapsed, children, }: Pick<IReqorePanelProps, 'size' | 'isCollapsed' | 'children'>) => import("react/jsx-runtime").JSX.Element>;
|
|
105
107
|
export declare const ReqorePanel: (props: IReqorePanelProps & import("react").RefAttributes<HTMLDivElement>) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
106
108
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAGL,YAAY,EAMb,MAAM,OAAO,CAAC;AAKf,OAAO,EASL,MAAM,EACP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAYpE,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EACnB,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AAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,sBAAsB,KAOlC,CAAC;AAEF,eAAO,MAAM,6BAA6B,KAezC,CAAC;AAEF,eAAO,MAAM,yCAAyC,KAMrD,CAAC;AAEF,eAAO,MAAM,mCAAmC,KAG/C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,CAChC,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,MAAM,CAAC,GAC1C,cAAc,GAAG;IACf,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CACJ,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAuFzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,KAuC5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,KAoB7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,KAmBpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,KAsB9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,KAcjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,yEAK3B,KAAK,iBAAiB,EAAE,MAAM,GAAG,aAAa,GAAG,UAAU,CAAC,6CA2BhE,CAAC;AAEF,eAAO,MAAM,WAAW,sJA8rBvB,CAAC"}
|
|
@@ -52,7 +52,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
52
52
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
53
|
};
|
|
54
54
|
exports.__esModule = true;
|
|
55
|
-
exports.ReqorePanel = exports.ReqorePanelSkeleton = exports.StyledPanelContent = exports.StyledPanelBottomActions = exports.StyledPanelTopBar = exports.StyledPanelTitle = exports.StyledPanel = exports.StyledPanelTitleHeaderLabelAndBadge = exports.StyledPanelTitleHeaderLabelAndDescription = exports.StyledPanelTitleHeaderContent = exports.StyledPanelTitleHeader = void 0;
|
|
55
|
+
exports.ReqorePanel = exports.ReqorePanelSkeleton = exports.StyledFloatingActions = exports.StyledPanelContent = exports.StyledPanelBottomActions = exports.StyledPanelTopBar = exports.StyledPanelTitle = exports.StyledPanel = exports.StyledPanelTitleHeaderLabelAndBadge = exports.StyledPanelTitleHeaderLabelAndDescription = exports.StyledPanelTitleHeaderContent = exports.StyledPanelTitleHeader = void 0;
|
|
56
56
|
var react_1 = require("react");
|
|
57
57
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
58
58
|
var classnames_1 = __importDefault(require("classnames"));
|
|
@@ -60,6 +60,7 @@ var lodash_1 = require("lodash");
|
|
|
60
60
|
var polished_1 = require("polished");
|
|
61
61
|
var re_resizable_1 = require("re-resizable");
|
|
62
62
|
var react_2 = require("react");
|
|
63
|
+
var react_dom_1 = require("react-dom");
|
|
63
64
|
var react_use_1 = require("react-use");
|
|
64
65
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
65
66
|
var colors_1 = require("../../constants/colors");
|
|
@@ -83,6 +84,9 @@ var Span_1 = require("../Span");
|
|
|
83
84
|
var TooltipComponent_1 = require("../TooltipComponent");
|
|
84
85
|
var LabelEditor_1 = require("./LabelEditor");
|
|
85
86
|
var NonResponsiveActions_1 = require("./NonResponsiveActions");
|
|
87
|
+
var getPaddingSize = function (padded, size) {
|
|
88
|
+
return typeof padded === 'string' ? sizes_1.PADDING_FROM_SIZE[padded] : sizes_1.PADDING_FROM_SIZE[size];
|
|
89
|
+
};
|
|
86
90
|
exports.StyledPanelTitleHeader = styled_components_1["default"].div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex: 1 1 auto;\n width: 100%;\n overflow: hidden;\n"], ["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex: 1 1 auto;\n width: 100%;\n overflow: hidden;\n"])));
|
|
87
91
|
exports.StyledPanelTitleHeaderContent = styled_components_1["default"].div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex: 0 1 auto;\n overflow: hidden;\n min-width: ", "px;\n"], ["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex: 0 1 auto;\n overflow: hidden;\n min-width: ", "px;\n"])), function (_a) {
|
|
88
92
|
var iconSize = _a.iconSize, hasIcon = _a.hasIcon;
|
|
@@ -94,7 +98,7 @@ exports.StyledPanelTitleHeaderContent = styled_components_1["default"].div(templ
|
|
|
94
98
|
});
|
|
95
99
|
exports.StyledPanelTitleHeaderLabelAndDescription = styled_components_1["default"].div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-flow: column;\n gap: 3px;\n min-width: 0;\n flex: 1 auto;\n"], ["\n display: flex;\n flex-flow: column;\n gap: 3px;\n min-width: 0;\n flex: 1 auto;\n"])));
|
|
96
100
|
exports.StyledPanelTitleHeaderLabelAndBadge = styled_components_1["default"].div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: inline-flex;\n max-width: 100%;\n"], ["\n display: inline-flex;\n max-width: 100%;\n"])));
|
|
97
|
-
exports.StyledPanel = (0, styled_components_1["default"])(Effect_1.StyledEffect)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", "px;\n border: ", ";\n color: ", ";\n overflow: ", ";\n display: flex;\n flex-flow: column;\n position: relative;\n backdrop-filter: ", ";\n width: ", ";\n max-width: 100%;\n flex: ", ";\n\n &:not(:hover) {\n .reqore-panel-action-hidden {\n
|
|
101
|
+
exports.StyledPanel = (0, styled_components_1["default"])(Effect_1.StyledEffect)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", "px;\n border: ", ";\n color: ", ";\n overflow: ", ";\n display: flex;\n flex-flow: column;\n position: relative;\n backdrop-filter: ", ";\n width: ", ";\n max-width: 100%;\n flex: ", ";\n\n &:not(:hover) {\n .reqore-panel-action-hidden {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n }\n }\n\n &.reqore-panel-floating-active {\n border-top-right-radius: 0;\n }\n\n ", "\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-radius: ", "px;\n border: ", ";\n color: ", ";\n overflow: ", ";\n display: flex;\n flex-flow: column;\n position: relative;\n backdrop-filter: ", ";\n width: ", ";\n max-width: 100%;\n flex: ", ";\n\n &:not(:hover) {\n .reqore-panel-action-hidden {\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n }\n }\n\n &.reqore-panel-floating-active {\n border-top-right-radius: 0;\n }\n\n ", "\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
98
102
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
99
103
|
return (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
100
104
|
}, function (_a) {
|
|
@@ -143,8 +147,8 @@ exports.StyledPanelTitle = styled_components_1["default"].div(templateObject_10
|
|
|
143
147
|
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
144
148
|
return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
145
149
|
}, function (_a) {
|
|
146
|
-
var noHorizontalPadding = _a.noHorizontalPadding, size = _a.size, transparent = _a.transparent, flat = _a.flat, intent = _a.intent;
|
|
147
|
-
return "".concat(transparent && flat && !intent ? 0 :
|
|
150
|
+
var noHorizontalPadding = _a.noHorizontalPadding, size = _a.size, padded = _a.padded, transparent = _a.transparent, flat = _a.flat, intent = _a.intent;
|
|
151
|
+
return "".concat(transparent && flat && !intent ? 0 : getPaddingSize(padded, size), "px ").concat(noHorizontalPadding ? 0 : "".concat(getPaddingSize(padded, size), "px"));
|
|
148
152
|
}, function (_a) {
|
|
149
153
|
var theme = _a.theme, isCollapsed = _a.isCollapsed, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
150
154
|
return !isCollapsed && !flat && opacity
|
|
@@ -158,18 +162,20 @@ exports.StyledPanelTitle = styled_components_1["default"].div(templateObject_10
|
|
|
158
162
|
});
|
|
159
163
|
});
|
|
160
164
|
exports.StyledPanelTopBar = (0, styled_components_1["default"])(exports.StyledPanelTitle)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n min-height: ", "px;\n padding-bottom: ", ";\n padding-top: ", ";\n position: ", ";\n top: ", ";\n z-index: ", ";\n background: ", ";\n"], ["\n min-height: ", "px;\n padding-bottom: ", ";\n padding-top: ", ";\n position: ", ";\n top: ", ";\n z-index: ", ";\n background: ", ";\n"])), function (_a) {
|
|
161
|
-
var size = _a.size, wrapperPadding = _a.wrapperPadding;
|
|
165
|
+
var size = _a.size, padded = _a.padded, wrapperPadding = _a.wrapperPadding;
|
|
162
166
|
return sizes_1.SIZE_TO_PX[size] +
|
|
163
|
-
(wrapperPadding === 'both' || wrapperPadding === 'top'
|
|
167
|
+
(wrapperPadding === 'both' || wrapperPadding === 'top'
|
|
168
|
+
? getPaddingSize(padded, size) * 2
|
|
169
|
+
: 0);
|
|
164
170
|
}, function (_a) {
|
|
165
171
|
var padded = _a.padded, size = _a.size, isCollapsed = _a.isCollapsed;
|
|
166
|
-
return !padded || isCollapsed ? "".concat(
|
|
172
|
+
return !padded || isCollapsed ? "".concat(getPaddingSize(padded, size), "px") : undefined;
|
|
167
173
|
}, function (_a) {
|
|
168
|
-
var minimal = _a.minimal, size = _a.size, wrapperPadding = _a.wrapperPadding;
|
|
174
|
+
var minimal = _a.minimal, size = _a.size, padded = _a.padded, wrapperPadding = _a.wrapperPadding;
|
|
169
175
|
return wrapperPadding === 'bottom' || wrapperPadding === 'none'
|
|
170
176
|
? undefined
|
|
171
177
|
: minimal
|
|
172
|
-
? "".concat(
|
|
178
|
+
? "".concat(getPaddingSize(padded, size), "px")
|
|
173
179
|
: undefined;
|
|
174
180
|
}, function (_a) {
|
|
175
181
|
var stickyHeader = _a.stickyHeader;
|
|
@@ -185,18 +191,20 @@ exports.StyledPanelTopBar = (0, styled_components_1["default"])(exports.StyledPa
|
|
|
185
191
|
return (0, polished_1.rgba)((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
186
192
|
});
|
|
187
193
|
exports.StyledPanelBottomActions = (0, styled_components_1["default"])(exports.StyledPanelTitle)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n min-height: ", "px;\n padding-top: ", ";\n padding-bottom: ", ";\n border-bottom: 0;\n border-top: ", ";\n"], ["\n min-height: ", "px;\n padding-top: ", ";\n padding-bottom: ", ";\n border-bottom: 0;\n border-top: ", ";\n"])), function (_a) {
|
|
188
|
-
var size = _a.size, wrapperPadding = _a.wrapperPadding;
|
|
194
|
+
var size = _a.size, padded = _a.padded, wrapperPadding = _a.wrapperPadding;
|
|
189
195
|
return sizes_1.SIZE_TO_PX[size] +
|
|
190
|
-
(wrapperPadding === 'both' || wrapperPadding === 'bottom'
|
|
196
|
+
(wrapperPadding === 'both' || wrapperPadding === 'bottom'
|
|
197
|
+
? getPaddingSize(padded, size) * 2
|
|
198
|
+
: 0);
|
|
191
199
|
}, function (_a) {
|
|
192
200
|
var padded = _a.padded, size = _a.size;
|
|
193
|
-
return !padded ? "".concat(
|
|
201
|
+
return !padded ? "".concat(getPaddingSize(padded, size), "px") : undefined;
|
|
194
202
|
}, function (_a) {
|
|
195
|
-
var minimal = _a.minimal, size = _a.size, wrapperPadding = _a.wrapperPadding;
|
|
203
|
+
var minimal = _a.minimal, size = _a.size, padded = _a.padded, wrapperPadding = _a.wrapperPadding;
|
|
196
204
|
return wrapperPadding === 'top' || wrapperPadding === 'none'
|
|
197
205
|
? undefined
|
|
198
206
|
: minimal
|
|
199
|
-
? "".concat(
|
|
207
|
+
? "".concat(getPaddingSize(padded, size), "px")
|
|
200
208
|
: undefined;
|
|
201
209
|
}, function (_a) {
|
|
202
210
|
var theme = _a.theme, flat = _a.flat, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
@@ -212,22 +220,41 @@ exports.StyledPanelContent = styled_components_1["default"].div(templateObject_1
|
|
|
212
220
|
return !padded
|
|
213
221
|
? undefined
|
|
214
222
|
: noHorizontalPadding
|
|
215
|
-
? "".concat(
|
|
216
|
-
: "".concat(
|
|
223
|
+
? "".concat(getPaddingSize(padded, size), "px 0")
|
|
224
|
+
: "".concat(getPaddingSize(padded, size) / (minimal ? 2 : 1), "px ").concat(getPaddingSize(padded, size), "px");
|
|
217
225
|
}, function (_a) {
|
|
218
226
|
var minimal = _a.minimal, hasLabel = _a.hasLabel, padded = _a.padded, size = _a.size;
|
|
219
|
-
return minimal && hasLabel && padded ? 0 : padded ? "".concat(
|
|
227
|
+
return minimal && hasLabel && padded ? 0 : padded ? "".concat(getPaddingSize(padded, size), "px") : undefined;
|
|
220
228
|
}, function (_a) {
|
|
221
229
|
var minimal = _a.minimal, padded = _a.padded, size = _a.size, hasBottomActions = _a.hasBottomActions;
|
|
222
230
|
return minimal && hasBottomActions && padded
|
|
223
231
|
? 0
|
|
224
232
|
: padded
|
|
225
|
-
? "".concat(
|
|
233
|
+
? "".concat(getPaddingSize(padded, size), "px")
|
|
226
234
|
: undefined;
|
|
227
235
|
}, function (_a) {
|
|
228
236
|
var size = _a.size;
|
|
229
237
|
return sizes_1.TEXT_FROM_SIZE[size];
|
|
230
238
|
});
|
|
239
|
+
exports.StyledFloatingActions = styled_components_1["default"].div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n position: fixed;\n z-index: 999999;\n display: flex;\n padding: ", "px;\n background-color: ", ";\n border: ", ";\n border-bottom: none;\n border-radius: ", "px ", "px\n 0 0;\n gap: ", "px;\n pointer-events: auto;\n"], ["\n position: fixed;\n z-index: 999999;\n display: flex;\n padding: ", "px;\n background-color: ", ";\n border: ", ";\n border-bottom: none;\n border-radius: ", "px ", "px\n 0 0;\n gap: ", "px;\n pointer-events: auto;\n"])), function (_a) {
|
|
240
|
+
var size = _a.size;
|
|
241
|
+
return sizes_1.PADDING_FROM_SIZE[size];
|
|
242
|
+
}, function (_a) {
|
|
243
|
+
var theme = _a.theme, _b = _a.opacity, opacity = _b === void 0 ? 1 : _b;
|
|
244
|
+
return (0, polished_1.rgba)((0, colors_2.changeDarkness)((0, colors_2.getMainBackgroundColor)(theme), 0.03), opacity);
|
|
245
|
+
}, function (_a) {
|
|
246
|
+
var flat = _a.flat, theme = _a.theme;
|
|
247
|
+
return flat ? 'none' : "1px solid ".concat((0, colors_2.changeLightness)((0, colors_2.getMainBackgroundColor)(theme), 0.08));
|
|
248
|
+
}, function (_a) {
|
|
249
|
+
var size = _a.size;
|
|
250
|
+
return sizes_1.RADIUS_FROM_SIZE[size];
|
|
251
|
+
}, function (_a) {
|
|
252
|
+
var size = _a.size;
|
|
253
|
+
return sizes_1.RADIUS_FROM_SIZE[size];
|
|
254
|
+
}, function (_a) {
|
|
255
|
+
var size = _a.size;
|
|
256
|
+
return sizes_1.GAP_FROM_SIZE[size];
|
|
257
|
+
});
|
|
231
258
|
exports.ReqorePanelSkeleton = (0, react_2.memo)(function (_a) {
|
|
232
259
|
var size = _a.size, isCollapsed = _a.isCollapsed, children = _a.children;
|
|
233
260
|
var style = (0, react_2.useMemo)(function () { return ({ padding: "".concat(sizes_1.PADDING_FROM_SIZE[size], "px") }); }, [size]);
|
|
@@ -235,7 +262,7 @@ exports.ReqorePanelSkeleton = (0, react_2.memo)(function (_a) {
|
|
|
235
262
|
(children ? (children) : ((0, jsx_runtime_1.jsx)(ControlGroup_1["default"], __assign({ vertical: true }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.ReqoreSkeleton, { lines: 5, width: '100%', size: 'tiny' }) }))))] })));
|
|
236
263
|
});
|
|
237
264
|
exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
238
|
-
var children = _a.children, label = _a.label, description = _a.description, _b = _a.collapseButtonProps, collapseButtonProps = _b === void 0 ? {} : _b, collapsible = _a.collapsible, onClose = _a.onClose, _c = _a.closeButtonProps, closeButtonProps = _c === void 0 ? {} : _c, _d = _a.rounded, rounded = _d === void 0 ? true : _d, _e = _a.actions, actions = _e === void 0 ? [] : _e, _f = _a.bottomActions, bottomActions = _f === void 0 ? [] : _f, isCollapsed = _a.isCollapsed, customTheme = _a.customTheme, icon = _a.icon, iconImage = _a.iconImage, intent = _a.intent, className = _a.className, flat = _a.flat, _g = _a.unMountContentOnCollapse, unMountContentOnCollapse = _g === void 0 ? true : _g, onCollapseChange = _a.onCollapseChange, _h = _a.padded, padded = _h === void 0 ? true : _h, _j = _a.wrapperPadding, wrapperPadding = _j === void 0 ? 'both' : _j, contentStyle = _a.contentStyle, contentEffect = _a.contentEffect, _k = _a.labelEffect, labelEffect = _k === void 0 ? {} : _k, _l = _a.descriptionEffect, descriptionEffect = _l === void 0 ? {} : _l, descriptionIntent = _a.descriptionIntent, labelSize = _a.labelSize, contentSize = _a.contentSize, minimal = _a.minimal, badge = _a.badge, iconColor = _a.iconColor, _m = _a.iconProps, iconProps = _m === void 0 ? {} : _m, fluid = _a.fluid, _o = _a.responsiveActions, responsiveActions = _o === void 0 ? true : _o, _p = _a.responsiveTitle, responsiveTitle = _p === void 0 ? true : _p, _q = _a.size, panelSize = _q === void 0 ? 'normal' : _q, getContentRef = _a.getContentRef, _r = _a.labelProps, labelProps = _r === void 0 ? {} : _r, disabled = _a.disabled, breadcrumbs = _a.breadcrumbs, _s = _a.showActionsWhenCollapsed, showActionsWhenCollapsed = _s === void 0 ? true : _s, showLabelTooltip = _a.showLabelTooltip, customLabelTooltip = _a.customLabelTooltip, resizable = _a.resizable, onLabelEdit = _a.onLabelEdit, responsiveActionsWrapperProps = _a.responsiveActionsWrapperProps, loading = _a.loading, loadingIconType = _a.loadingIconType, skeleton = _a.skeleton, errorBoundaryOptions = _a.errorBoundaryOptions, rest = __rest(_a, ["children", "label", "description", "collapseButtonProps", "collapsible", "onClose", "closeButtonProps", "rounded", "actions", "bottomActions", "isCollapsed", "customTheme", "icon", "iconImage", "intent", "className", "flat", "unMountContentOnCollapse", "onCollapseChange", "padded", "wrapperPadding", "contentStyle", "contentEffect", "labelEffect", "descriptionEffect", "descriptionIntent", "labelSize", "contentSize", "minimal", "badge", "iconColor", "iconProps", "fluid", "responsiveActions", "responsiveTitle", "size", "getContentRef", "labelProps", "disabled", "breadcrumbs", "showActionsWhenCollapsed", "showLabelTooltip", "customLabelTooltip", "resizable", "onLabelEdit", "responsiveActionsWrapperProps", "loading", "loadingIconType", "skeleton", "errorBoundaryOptions"]);
|
|
265
|
+
var children = _a.children, label = _a.label, description = _a.description, _b = _a.collapseButtonProps, collapseButtonProps = _b === void 0 ? {} : _b, collapsible = _a.collapsible, onClose = _a.onClose, _c = _a.closeButtonProps, closeButtonProps = _c === void 0 ? {} : _c, _d = _a.rounded, rounded = _d === void 0 ? true : _d, _e = _a.actions, actions = _e === void 0 ? [] : _e, _f = _a.bottomActions, bottomActions = _f === void 0 ? [] : _f, isCollapsed = _a.isCollapsed, customTheme = _a.customTheme, icon = _a.icon, iconImage = _a.iconImage, intent = _a.intent, className = _a.className, flat = _a.flat, _g = _a.unMountContentOnCollapse, unMountContentOnCollapse = _g === void 0 ? true : _g, onCollapseChange = _a.onCollapseChange, _h = _a.padded, padded = _h === void 0 ? true : _h, _j = _a.wrapperPadding, wrapperPadding = _j === void 0 ? 'both' : _j, contentStyle = _a.contentStyle, contentEffect = _a.contentEffect, _k = _a.labelEffect, labelEffect = _k === void 0 ? {} : _k, _l = _a.descriptionEffect, descriptionEffect = _l === void 0 ? {} : _l, descriptionIntent = _a.descriptionIntent, labelSize = _a.labelSize, contentSize = _a.contentSize, minimal = _a.minimal, badge = _a.badge, iconColor = _a.iconColor, _m = _a.iconProps, iconProps = _m === void 0 ? {} : _m, fluid = _a.fluid, _o = _a.responsiveActions, responsiveActions = _o === void 0 ? true : _o, _p = _a.responsiveTitle, responsiveTitle = _p === void 0 ? true : _p, _q = _a.size, panelSize = _q === void 0 ? 'normal' : _q, getContentRef = _a.getContentRef, _r = _a.labelProps, labelProps = _r === void 0 ? {} : _r, disabled = _a.disabled, breadcrumbs = _a.breadcrumbs, _s = _a.showActionsWhenCollapsed, showActionsWhenCollapsed = _s === void 0 ? true : _s, showLabelTooltip = _a.showLabelTooltip, customLabelTooltip = _a.customLabelTooltip, resizable = _a.resizable, onLabelEdit = _a.onLabelEdit, responsiveActionsWrapperProps = _a.responsiveActionsWrapperProps, loading = _a.loading, loadingIconType = _a.loadingIconType, skeleton = _a.skeleton, errorBoundaryOptions = _a.errorBoundaryOptions, floatingActions = _a.floatingActions, rest = __rest(_a, ["children", "label", "description", "collapseButtonProps", "collapsible", "onClose", "closeButtonProps", "rounded", "actions", "bottomActions", "isCollapsed", "customTheme", "icon", "iconImage", "intent", "className", "flat", "unMountContentOnCollapse", "onCollapseChange", "padded", "wrapperPadding", "contentStyle", "contentEffect", "labelEffect", "descriptionEffect", "descriptionIntent", "labelSize", "contentSize", "minimal", "badge", "iconColor", "iconProps", "fluid", "responsiveActions", "responsiveTitle", "size", "getContentRef", "labelProps", "disabled", "breadcrumbs", "showActionsWhenCollapsed", "showLabelTooltip", "customLabelTooltip", "resizable", "onLabelEdit", "responsiveActionsWrapperProps", "loading", "loadingIconType", "skeleton", "errorBoundaryOptions", "floatingActions"]);
|
|
239
266
|
var _t = (0, react_2.useState)(isCollapsed || false), _isCollapsed = _t[0], setIsCollapsed = _t[1];
|
|
240
267
|
var theme = (0, useTheme_1.useReqoreTheme)('main', customTheme ||
|
|
241
268
|
((contentEffect === null || contentEffect === void 0 ? void 0 : contentEffect.gradient) && minimal
|
|
@@ -244,9 +271,53 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
|
244
271
|
var isMobile = (0, useReqoreContext_1.useReqoreProperty)('isMobile');
|
|
245
272
|
var targetRef = (0, useCombinedRefs_1.useCombinedRefs)(ref).targetRef;
|
|
246
273
|
var _u = (0, react_use_1.useMeasure)(), measureRef = _u[0], width = _u[1].width;
|
|
274
|
+
var _v = (0, react_2.useState)(false), _isHovered = _v[0], setIsHovered = _v[1];
|
|
275
|
+
var floatingActionsRef = (0, react_2.useRef)(null);
|
|
276
|
+
var panelRef = (0, react_2.useRef)(null);
|
|
247
277
|
(0, react_use_1.useUpdateEffect)(function () {
|
|
248
278
|
setIsCollapsed(!!isCollapsed);
|
|
249
279
|
}, [isCollapsed]);
|
|
280
|
+
var floatingActionsList = (0, react_2.useMemo)(function () { return (floatingActions ? actions.filter(function (action) { return action.show === 'hover'; }) : []); }, [floatingActions, actions]);
|
|
281
|
+
var nonFloatingActions = (0, react_2.useMemo)(function () { return (floatingActions ? actions.filter(function (action) { return action.show !== 'hover'; }) : actions); }, [floatingActions, actions]);
|
|
282
|
+
var updateFloatingActionsPosition = (0, react_2.useCallback)(function () {
|
|
283
|
+
if (!floatingActionsRef.current || !panelRef.current)
|
|
284
|
+
return;
|
|
285
|
+
var panelRect = panelRef.current.getBoundingClientRect();
|
|
286
|
+
var floatingRect = floatingActionsRef.current.getBoundingClientRect();
|
|
287
|
+
floatingActionsRef.current.style.top = "".concat(panelRect.top - floatingRect.height, "px");
|
|
288
|
+
floatingActionsRef.current.style.left = "".concat(panelRect.right - floatingRect.width, "px");
|
|
289
|
+
}, []);
|
|
290
|
+
(0, react_2.useEffect)(function () {
|
|
291
|
+
if (!_isHovered || !floatingActions || !(0, lodash_1.size)(floatingActionsList))
|
|
292
|
+
return;
|
|
293
|
+
updateFloatingActionsPosition();
|
|
294
|
+
}, [_isHovered, floatingActions, floatingActionsList, updateFloatingActionsPosition]);
|
|
295
|
+
var handleMouseEnter = (0, react_2.useCallback)(function (e) {
|
|
296
|
+
var _a;
|
|
297
|
+
if (floatingActions)
|
|
298
|
+
setIsHovered(true);
|
|
299
|
+
(_a = rest.onMouseEnter) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
300
|
+
}, [floatingActions, rest.onMouseEnter]);
|
|
301
|
+
var handleMouseLeave = (0, react_2.useCallback)(function (e) {
|
|
302
|
+
var _a;
|
|
303
|
+
if (floatingActions) {
|
|
304
|
+
var relatedTarget = e.relatedTarget;
|
|
305
|
+
if (floatingActionsRef.current &&
|
|
306
|
+
relatedTarget &&
|
|
307
|
+
floatingActionsRef.current.contains(relatedTarget)) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
setIsHovered(false);
|
|
311
|
+
}
|
|
312
|
+
(_a = rest.onMouseLeave) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
313
|
+
}, [floatingActions, rest.onMouseLeave]);
|
|
314
|
+
var handleFloatingActionsMouseLeave = (0, react_2.useCallback)(function (e) {
|
|
315
|
+
var relatedTarget = e.relatedTarget;
|
|
316
|
+
if (panelRef.current && relatedTarget && panelRef.current.contains(relatedTarget)) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
setIsHovered(false);
|
|
320
|
+
}, []);
|
|
250
321
|
var _resizable = (0, react_2.useMemo)(function () {
|
|
251
322
|
var disabledProps = {
|
|
252
323
|
enable: {
|
|
@@ -271,10 +342,10 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
|
271
342
|
!!breadcrumbs ||
|
|
272
343
|
collapsible ||
|
|
273
344
|
!!onClose ||
|
|
274
|
-
!!(0, lodash_1.size)(
|
|
345
|
+
!!(0, lodash_1.size)(nonFloatingActions.filter(utils_1.isActionShown)) ||
|
|
275
346
|
!!((0, lodash_1.isArray)(badge) ? (0, lodash_1.size)(badge) : badge) ||
|
|
276
347
|
!!icon;
|
|
277
|
-
}, [label, collapsible, onClose,
|
|
348
|
+
}, [label, collapsible, onClose, nonFloatingActions, badge, icon]);
|
|
278
349
|
// Return true if the card has a title bar, otherwise return false.
|
|
279
350
|
var hasTitleHeader = (0, react_2.useMemo)(function () { return !!label || !!badge || !!icon || !!breadcrumbs; }, [label, icon, badge, breadcrumbs]);
|
|
280
351
|
var isSmall = (0, react_2.useMemo)(function () { return responsiveTitle && width < 480 && process.env.NODE_ENV !== 'test'; }, [width, responsiveTitle]);
|
|
@@ -386,11 +457,11 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
|
386
457
|
// OTHERWISE, ARE THERE ANY NON RESPONSIVE ACTIONS TO BE SHOWN?
|
|
387
458
|
// This either means actions where user specified responsive: false
|
|
388
459
|
// or user passed responsiveActions: false
|
|
389
|
-
if (hasNonResponsiveActions(
|
|
460
|
+
if (hasNonResponsiveActions(nonFloatingActions)) {
|
|
390
461
|
show = true;
|
|
391
462
|
}
|
|
392
463
|
return show;
|
|
393
|
-
}, [isSmall, collapsible,
|
|
464
|
+
}, [isSmall, collapsible, nonFloatingActions, hasNonResponsiveActions]);
|
|
394
465
|
var iconTooltip = (0, react_2.useMemo)(function () { return ({
|
|
395
466
|
content: label
|
|
396
467
|
}); }, [label]);
|
|
@@ -404,9 +475,14 @@ exports.ReqorePanel = (0, react_2.forwardRef)(function (_a, ref) {
|
|
|
404
475
|
if (skeleton) {
|
|
405
476
|
return (0, jsx_runtime_1.jsx)(exports.ReqorePanelSkeleton, { size: panelSize, isCollapsed: _isCollapsed });
|
|
406
477
|
}
|
|
407
|
-
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ReqoreErrorBoundary, __assign({}, errorBoundaryOptions, { children: (0, jsx_runtime_1.jsxs)(TooltipComponent_1.ReqoreTooltipComponent, __assign({}, (0, lodash_1.omit)(rest, ['onResize']), _resizable, { as: rest.as || (!!resizable && !disabled && !_isCollapsed) ? re_resizable_1.Resizable : 'div', isCollapsed: _isCollapsed, rounded: rounded, flat: flat, intent: intent, className: "".concat(className || '', " reqore-panel")
|
|
478
|
+
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ReqoreErrorBoundary, __assign({}, errorBoundaryOptions, { children: (0, jsx_runtime_1.jsxs)(TooltipComponent_1.ReqoreTooltipComponent, __assign({}, (0, lodash_1.omit)(rest, ['onResize']), _resizable, { as: rest.as || (!!resizable && !disabled && !_isCollapsed) ? re_resizable_1.Resizable : 'div', isCollapsed: _isCollapsed, rounded: rounded, flat: flat, intent: intent, className: "".concat(className || '', " reqore-panel").concat(_isHovered && (0, lodash_1.size)(floatingActionsList) > 0 ? ' reqore-panel-floating-active' : ''), interactive: interactive, theme: theme, effect: transformedContentEffect, opacity: opacity, fluid: fluid, disabled: disabled, Component: exports.StyledPanel, ref: function (node) {
|
|
479
|
+
handleRef(node);
|
|
480
|
+
panelRef.current = node;
|
|
481
|
+
}, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, { children: [_isHovered &&
|
|
482
|
+
(0, lodash_1.size)(floatingActionsList) > 0 &&
|
|
483
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(exports.StyledFloatingActions, __assign({ className: 'reqore-panel-floating-actions', theme: theme, opacity: opacity, size: panelSize, flat: flat, ref: floatingActionsRef, onMouseLeave: handleFloatingActionsMouseLeave }, { children: (0, jsx_runtime_1.jsx)(ControlGroup_1["default"], __assign({ size: panelSize, gapSize: panelSize }, { children: floatingActionsList.map(function (action, index) { return renderActions(action, index, true); }) })) })), document.body), hasTitleBar && ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTopBar, __assign({ flat: flat, isCollapsed: _isCollapsed, collapsible: collapsible, className: 'reqore-panel-title', onClick: handleCollapseClick, theme: theme, minimal: minimal, size: contentSize || panelSize, opacity: opacity !== null && opacity !== void 0 ? opacity : (minimal ? 0 : 1), noHorizontalPadding: noHorizontalPadding, responsive: responsiveTitle, isMobile: isMobile || isSmall, ref: measureRef, padded: padded, wrapperPadding: wrapperPadding, transparent: rest.transparent || opacity === 0, intent: intent, stickyHeader: rest.stickyHeader, stickyHeaderOffset: rest.stickyHeaderOffset }, { children: [hasTitleHeader && ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeader, { children: [breadcrumbs ? ((0, jsx_runtime_1.jsx)(Breadcrumbs_1["default"], __assign({}, breadcrumbs, { padded: false, margin: 'none', flat: true, responsive: true }))) : icon || iconImage || label || badge ? ((0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderContent, __assign({ size: panelSize }, labelProps, { hasLabel: !!label, hasIcon: !!icon || !!iconImage || loading, iconSize: sizes_1.ICON_FROM_HEADER_SIZE[labelSize || sizes_1.HEADER_SIZE_TO_NUMBER[panelSize]] }, { children: [icon || iconImage ? ((0, jsx_runtime_1.jsx)(Icon_1["default"], __assign({ size: "".concat(sizes_1.ICON_FROM_HEADER_SIZE[labelSize || sizes_1.HEADER_SIZE_TO_NUMBER[panelSize]], "px"), image: loading ? undefined : iconImage, margin: 'right', color: iconColor, tooltip: iconTooltip, effect: {
|
|
408
484
|
opacity: colors_1.CONTROL_ICON_OPACITY
|
|
409
|
-
} }, iconProps, { animation: loading ? 'spin' : iconProps === null || iconProps === void 0 ? void 0 : iconProps.animation, icon: loading ? "Loader".concat(loadingIconType || '', "Line") : icon || (iconProps === null || iconProps === void 0 ? void 0 : iconProps.icon) }))) : null, (0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndDescription, { children: [(0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndBadge, { children: [typeof label === 'string' ? ((0, jsx_runtime_1.jsx)(LabelEditor_1.LabelEditor, { size: labelSize || panelSize, customTheme: theme, effect: __assign({ noWrap: true }, labelEffect), style: { display: 'inline-flex', alignItems: 'center', minWidth: 0 }, label: label, onSubmit: onLabelEdit, tooltip: showLabelTooltip ? customLabelTooltip || label : undefined })) : (label), badge || badge === 0 ? ((0, jsx_runtime_1.jsx)(Button_1.ButtonBadge, { size: (0, utils_1.getOneHigherSize)(panelSize), content: badge, wrapGroup: isSmall, margin: label ? 'left' : 'none' })) : null] }), description && ((0, jsx_runtime_1.jsx)(Span_1.ReqoreSpan, __assign({ size: labelSize ? sizes_1.NUMBER_TO_SIZE[labelSize] : panelSize, effect: __assign({ opacity: 0.7 }, descriptionEffect), intent: descriptionIntent }, { children: description })))] })] }))) : null, breadcrumbs && (badge || badge === 0) ? ((0, jsx_runtime_1.jsx)(Button_1.ButtonBadge, { size: (0, utils_1.getOneHigherSize)(panelSize), content: badge, wrapGroup: isSmall, margin: label ? 'left' : 'none' })) : null, (0, jsx_runtime_1.jsx)(NonResponsiveActions_1.ReqorePanelNonResponsiveActions, { show: isSmall && (!!onClose || collapsible), isSmall: isSmall, showControlButtons: true, size: panelSize, hasResponsiveActions: hasResponsiveActions(
|
|
485
|
+
} }, iconProps, { animation: loading ? 'spin' : iconProps === null || iconProps === void 0 ? void 0 : iconProps.animation, icon: loading ? "Loader".concat(loadingIconType || '', "Line") : icon || (iconProps === null || iconProps === void 0 ? void 0 : iconProps.icon) }))) : null, (0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndDescription, { children: [(0, jsx_runtime_1.jsxs)(exports.StyledPanelTitleHeaderLabelAndBadge, { children: [typeof label === 'string' ? ((0, jsx_runtime_1.jsx)(LabelEditor_1.LabelEditor, { size: labelSize || panelSize, customTheme: theme, effect: __assign({ noWrap: true }, labelEffect), style: { display: 'inline-flex', alignItems: 'center', minWidth: 0 }, label: label, onSubmit: onLabelEdit, tooltip: showLabelTooltip ? customLabelTooltip || label : undefined })) : (label), badge || badge === 0 ? ((0, jsx_runtime_1.jsx)(Button_1.ButtonBadge, { size: (0, utils_1.getOneHigherSize)(panelSize), content: badge, wrapGroup: isSmall, margin: label ? 'left' : 'none' })) : null] }), description && ((0, jsx_runtime_1.jsx)(Span_1.ReqoreSpan, __assign({ size: labelSize ? sizes_1.NUMBER_TO_SIZE[labelSize] : panelSize, effect: __assign({ opacity: 0.7 }, descriptionEffect), intent: descriptionIntent }, { children: description })))] })] }))) : null, breadcrumbs && (badge || badge === 0) ? ((0, jsx_runtime_1.jsx)(Button_1.ButtonBadge, { size: (0, utils_1.getOneHigherSize)(panelSize), content: badge, wrapGroup: isSmall, margin: label ? 'left' : 'none' })) : null, (0, jsx_runtime_1.jsx)(NonResponsiveActions_1.ReqorePanelNonResponsiveActions, { show: isSmall && (!!onClose || collapsible), isSmall: isSmall, showControlButtons: true, size: panelSize, hasResponsiveActions: hasResponsiveActions(nonFloatingActions), customTheme: theme, isCollapsed: _isCollapsed, onCollapseClick: collapsible ? handleCollapseClick : undefined, onCloseClick: onClose, closeButtonProps: closeButtonProps, collapseButtonProps: collapseButtonProps, fluid: false, style: { marginLeft: 'auto' } })] })), hasResponsiveActions(nonFloatingActions) && ((0, jsx_runtime_1.jsx)(ControlGroup_1["default"], __assign({ responsive: responsiveActions, fluid: responsiveActions || isSmall, horizontalAlign: 'flex-end', customTheme: theme, size: panelSize }, responsiveActionsWrapperProps, { children: nonFloatingActions.map(renderResponsiveActions()) }))), (0, jsx_runtime_1.jsx)(NonResponsiveActions_1.ReqorePanelNonResponsiveActions, __assign({ show: showNonResponsiveGroup(), isSmall: isSmall, showControlButtons: !isSmall, size: panelSize, hasResponsiveActions: hasResponsiveActions(nonFloatingActions), customTheme: theme, isCollapsed: _isCollapsed, onCollapseClick: collapsible ? handleCollapseClick : undefined, onCloseClick: onClose, closeButtonProps: closeButtonProps, collapseButtonProps: collapseButtonProps, fluid: !hasTitleHeader || isSmall }, { children: nonFloatingActions.map(renderNonResponsiveActions()) }))] }))), !_isCollapsed || (_isCollapsed && !unMountContentOnCollapse) ? ((0, jsx_runtime_1.jsx)(exports.StyledPanelContent, __assign({ as: 'div', className: 'reqore-panel-content', hasLabel: !!hasTitleBar, hasBottomActions: hasBottomActions, isCollapsed: _isCollapsed, style: contentStyle, padded: padded, minimal: minimal, size: contentSize || panelSize, ref: getContentRef, noHorizontalPadding: noHorizontalPadding }, { children: children }))) : null, hasBottomActions && !_isCollapsed ? ((0, jsx_runtime_1.jsxs)(exports.StyledPanelBottomActions, __assign({ flat: flat, className: 'reqore-panel-bottom-actions', theme: theme, padded: padded, intent: intent, minimal: minimal, transparent: rest.transparent || opacity === 0, opacity: opacity !== null && opacity !== void 0 ? opacity : (minimal ? 0 : 1), size: contentSize || panelSize, noHorizontalPadding: noHorizontalPadding }, { children: [hasNonResponsiveActions(leftBottomActions) ? ((0, jsx_runtime_1.jsx)(ControlGroup_1["default"], __assign({ size: panelSize, style: { marginRight: 'auto' } }, { children: leftBottomActions.map(renderNonResponsiveActions('flex-start')) }))) : null, hasResponsiveActions(leftBottomActions) && ((0, jsx_runtime_1.jsx)(ControlGroup_1["default"], __assign({ fluid: responsiveActions, responsive: responsiveActions, customTheme: theme, size: panelSize, style: { marginRight: 'auto' } }, { children: leftBottomActions.map(renderResponsiveActions('flex-start')) }))), hasResponsiveActions(rightBottomActions) && ((0, jsx_runtime_1.jsx)(ControlGroup_1["default"], __assign({ fluid: responsiveActions, horizontalAlign: 'flex-end', responsive: responsiveActions, customTheme: theme, style: { marginLeft: 'auto' }, size: panelSize }, { children: rightBottomActions.map(renderResponsiveActions()) }))), hasNonResponsiveActions(rightBottomActions) ? ((0, jsx_runtime_1.jsx)(ControlGroup_1["default"], __assign({ horizontalAlign: 'flex-end', size: panelSize, style: { marginLeft: 'auto' } }, { children: rightBottomActions.map(renderNonResponsiveActions()) }))) : null] }))) : null] })) })));
|
|
410
486
|
});
|
|
411
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
487
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14;
|
|
412
488
|
//# sourceMappingURL=index.js.map
|