@qoretechnologies/reqore 0.25.4 → 0.25.5
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/__tests__/table.test.tsx +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +35 -21
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/containers/PopoverProvider.d.ts.map +1 -1
- package/dist/containers/PopoverProvider.js +2 -0
- package/dist/containers/PopoverProvider.js.map +1 -1
- package/dist/hooks/usePopover.d.ts +4 -1
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js +36 -23
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/hooks/useTooltip.js +1 -1
- package/dist/hooks/useTooltip.js.map +1 -1
- package/package.json +1 -1
- package/src/components/InternalPopover/index.tsx +33 -7
- package/src/containers/PopoverProvider.tsx +2 -0
- package/src/hooks/usePopover.tsx +20 -2
- package/src/hooks/useTooltip.ts +1 -1
- package/src/stories/Popover/Popover.stories.tsx +85 -16
- package/tests.json +1 -1
package/__tests__/table.test.tsx
CHANGED
|
@@ -393,7 +393,7 @@ test('Cells on <Table /> are interactive', () => {
|
|
|
393
393
|
dataId: 'data',
|
|
394
394
|
columns: [
|
|
395
395
|
{ dataId: 'occupation', header: 'Ocuppation', width: 200 },
|
|
396
|
-
{ dataId: 'group', header: '
|
|
396
|
+
{ dataId: 'group', header: 'Groups', width: 150 },
|
|
397
397
|
],
|
|
398
398
|
},
|
|
399
399
|
] as IReqoreTableColumn[],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/InternalPopover/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoE,MAAM,OAAO,CAAC;AAIzF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/InternalPopover/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoE,MAAM,OAAO,CAAC;AAIzF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AA0FhE,MAAM,WAAW,2BAA4B,SAAQ,YAAY;CAAG;AAEpE,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA+G1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -50,28 +50,41 @@ var ThemeProvider_1 = __importDefault(require("../../containers/ThemeProvider"))
|
|
|
50
50
|
var PopoverContext_1 = __importDefault(require("../../context/PopoverContext"));
|
|
51
51
|
var animations_1 = require("../../helpers/animations");
|
|
52
52
|
var colors_1 = require("../../helpers/colors");
|
|
53
|
+
var Drawer_1 = require("../Drawer");
|
|
53
54
|
var StyledPopoverArrow = styled_components_1["default"].div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 10px;\n height: 10px;\n position: absolute;\n z-index: -1;\n\n &:before {\n content: '';\n display: block;\n width: 10px;\n height: 10px;\n position: absolute;\n z-index: -1;\n transform: rotate(45deg);\n ", "\n }\n"], ["\n width: 10px;\n height: 10px;\n position: absolute;\n z-index: -1;\n\n &:before {\n content: '';\n display: block;\n width: 10px;\n height: 10px;\n position: absolute;\n z-index: -1;\n transform: rotate(45deg);\n ", "\n }\n"])), function (_a) {
|
|
54
55
|
var _b;
|
|
55
|
-
var theme = _a.theme;
|
|
56
|
-
return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n box-shadow:
|
|
56
|
+
var theme = _a.theme, opaque = _a.opaque;
|
|
57
|
+
return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n box-shadow: ", ";\n "], ["\n background-color: ", ";\n box-shadow: ", ";\n "])), ((_b = theme.popover) === null || _b === void 0 ? void 0 : _b.main) || theme.main, opaque ? undefined : 'rgba(31, 26, 34, 0.6) 0px 0px 4px');
|
|
57
58
|
});
|
|
58
|
-
var StyledPopoverWrapper = styled_components_1["default"].div(
|
|
59
|
+
var StyledPopoverWrapper = styled_components_1["default"].div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n animation: 0.2s ", " ease-out;\n max-width: ", ";\n max-height: ", ";\n\n ", "\n\n &[data-popper-placement^='top'] > ", " {\n bottom: -5px;\n }\n\n &[data-popper-placement^='bottom'] > ", " {\n top: -5px;\n }\n\n &[data-popper-placement^='left'] > ", " {\n right: -5px;\n }\n\n &[data-popper-placement^='right'] > ", " {\n left: -5px;\n }\n\n &[data-popper-reference-hidden='true'] {\n visibility: hidden;\n pointer-events: none;\n }\n"], ["\n animation: 0.2s ", " ease-out;\n max-width: ", ";\n max-height: ", ";\n\n ", "\n\n &[data-popper-placement^='top'] > ", " {\n bottom: -5px;\n }\n\n &[data-popper-placement^='bottom'] > ", " {\n top: -5px;\n }\n\n &[data-popper-placement^='left'] > ", " {\n right: -5px;\n }\n\n &[data-popper-placement^='right'] > ", " {\n left: -5px;\n }\n\n &[data-popper-reference-hidden='true'] {\n visibility: hidden;\n pointer-events: none;\n }\n"])), animations_1.fadeIn, function (_a) {
|
|
60
|
+
var _b = _a.maxWidth, maxWidth = _b === void 0 ? '80vw' : _b;
|
|
61
|
+
return maxWidth;
|
|
62
|
+
}, function (_a) {
|
|
63
|
+
var _b = _a.maxHeight, maxHeight = _b === void 0 ? '80vh' : _b;
|
|
64
|
+
return maxHeight;
|
|
65
|
+
}, function (_a) {
|
|
59
66
|
var _b;
|
|
60
|
-
var theme = _a.theme;
|
|
67
|
+
var theme = _a.theme, opaque = _a.opaque;
|
|
61
68
|
var defaultColor = ((_b = theme.popover) === null || _b === void 0 ? void 0 : _b.main) || theme.main;
|
|
62
|
-
|
|
69
|
+
if (opaque) {
|
|
70
|
+
return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n z-index: 999999;\n background-color: transparent;\n "], ["\n z-index: 999999;\n background-color: transparent;\n "])));
|
|
71
|
+
}
|
|
72
|
+
return (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n z-index: 999999;\n background-color: ", ";\n color: ", ";\n border-radius: 5.5px;\n box-shadow: rgba(31, 26, 34, 0.6) 0px 0px 4px;\n "], ["\n z-index: 999999;\n background-color: ", ";\n color: ", ";\n border-radius: 5.5px;\n box-shadow: rgba(31, 26, 34, 0.6) 0px 0px 4px;\n "])), defaultColor, (0, colors_1.getReadableColor)(theme, undefined, undefined, false, defaultColor));
|
|
63
73
|
}, StyledPopoverArrow, StyledPopoverArrow, StyledPopoverArrow, StyledPopoverArrow);
|
|
64
|
-
var StyledPopoverContent = styled_components_1["default"].div(
|
|
74
|
+
var StyledPopoverContent = styled_components_1["default"].div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n padding: ", ";\n z-index: 20;\n position: relative;\n overflow: hidden;\n background-color: ", ";\n border-radius: ", ";\n\n .reqore-popover-text {\n font-size: 14px;\n }\n"], ["\n width: 100%;\n height: 100%;\n padding: ", ";\n z-index: 20;\n position: relative;\n overflow: hidden;\n background-color: ", ";\n border-radius: ", ";\n\n .reqore-popover-text {\n font-size: 14px;\n }\n"])), function (_a) {
|
|
65
75
|
var isString = _a.isString;
|
|
66
76
|
return (isString ? '8px' : '0px');
|
|
67
77
|
}, function (_a) {
|
|
68
78
|
var _b;
|
|
69
|
-
var theme = _a.theme;
|
|
70
|
-
return ((_b = theme.popover) === null || _b === void 0 ? void 0 : _b.main) || theme.main;
|
|
79
|
+
var theme = _a.theme, opaque = _a.opaque;
|
|
80
|
+
return opaque ? 'transparent' : ((_b = theme.popover) === null || _b === void 0 ? void 0 : _b.main) || theme.main;
|
|
81
|
+
}, function (_a) {
|
|
82
|
+
var opaque = _a.opaque;
|
|
83
|
+
return (opaque ? undefined : '3.5px');
|
|
71
84
|
});
|
|
72
85
|
var InternalPopover = function (_a) {
|
|
73
86
|
var _b, _c;
|
|
74
|
-
var targetElement = _a.targetElement, content = _a.content, id = _a.id, placement = _a.placement, noArrow = _a.noArrow, useTargetWidth = _a.useTargetWidth;
|
|
87
|
+
var targetElement = _a.targetElement, content = _a.content, id = _a.id, placement = _a.placement, noArrow = _a.noArrow, useTargetWidth = _a.useTargetWidth, opaque = _a.opaque, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, blur = _a.blur;
|
|
75
88
|
var _d = (0, react_1.useContext)(PopoverContext_1["default"]), removePopover = _d.removePopover, updatePopover = _d.updatePopover, uiScale = _d.uiScale;
|
|
76
89
|
var _e = (0, react_1.useState)(null), popperElement = _e[0], setPopperElement = _e[1];
|
|
77
90
|
var _f = (0, react_1.useState)(null), arrowElement = _f[0], setArrowElement = _f[1];
|
|
@@ -97,6 +110,7 @@ var InternalPopover = function (_a) {
|
|
|
97
110
|
},
|
|
98
111
|
]
|
|
99
112
|
}), styles = _g.styles, attributes = _g.attributes;
|
|
113
|
+
console.log(opaque);
|
|
100
114
|
(0, react_1.useEffect)(function () {
|
|
101
115
|
if (popperRef.current) {
|
|
102
116
|
updatePopover === null || updatePopover === void 0 ? void 0 : updatePopover(id, { popperRef: popperRef });
|
|
@@ -115,18 +129,18 @@ var InternalPopover = function (_a) {
|
|
|
115
129
|
}
|
|
116
130
|
return parseInt(axis, 10);
|
|
117
131
|
});
|
|
118
|
-
return ((0, jsx_runtime_1.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
return ((0, jsx_runtime_1.jsxs)(ThemeProvider_1["default"], { children: [blur > 0 ? (0, jsx_runtime_1.jsx)(Drawer_1.StyledBackdrop, { zIndex: 999998, blur: blur, closable: true }) : null, (0, jsx_runtime_1.jsxs)(StyledPopoverWrapper, __assign({ maxWidth: maxWidth, maxHeight: maxHeight, opaque: opaque, className: 'reqore-popover-content', ref: function (el) {
|
|
133
|
+
setPopperElement(el);
|
|
134
|
+
popperRef.current = el;
|
|
135
|
+
}, style: __assign(__assign({}, styles.popper), { transform: "translate(".concat((translateValues === null || translateValues === void 0 ? void 0 : translateValues[0]) || 0, "px, ").concat((translateValues === null || translateValues === void 0 ? void 0 : translateValues[1]) || 0, "px)"), width: useTargetWidth && (((_c = targetElement === null || targetElement === void 0 ? void 0 : targetElement.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width) || undefined) }) }, attributes.popper, { children: [!noArrow && ((0, jsx_runtime_1.jsx)(StyledPopoverArrow, { opaque: opaque, ref: setArrowElement, style: styles.arrow, "data-popper-arrow": true })), (0, jsx_runtime_1.jsx)(StyledPopoverContent, __assign({ isString: (0, lodash_1.isString)(content), opaque: opaque }, { children: (0, lodash_1.isString)(content) ? ((0, jsx_runtime_1.jsx)("span", __assign({ className: 'reqore-popover-text' }, { children: content }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: react_1["default"].Children.map(content, function (child) {
|
|
136
|
+
return child
|
|
137
|
+
? react_1["default"].cloneElement(child, {
|
|
138
|
+
_insidePopover: true,
|
|
139
|
+
_popoverId: id
|
|
140
|
+
})
|
|
141
|
+
: null;
|
|
142
|
+
}) })) }))] }))] }));
|
|
129
143
|
};
|
|
130
144
|
exports["default"] = InternalPopover;
|
|
131
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
145
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
132
146
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/InternalPopover/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAkC;AAClC,6CAAyF;AACzF,6CAAyC;AACzC,qEAAgD;AAGhD,iFAAiE;AACjE,gFAA0D;AAC1D,uDAAkD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gBAAgB,CAAC,GAAG,CAAC,CAAC;CACnC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"PopoverProvider.d.ts","sourceRoot":"","sources":["../../src/containers/PopoverProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,gBAAgB,EAAoC,MAAM,OAAO,CAAC;AAGlF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;CACnC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAoE1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -40,6 +40,8 @@ var PopoverProvider = function (_a) {
|
|
|
40
40
|
(popperRef === null || popperRef === void 0 ? void 0 : popperRef.current) &&
|
|
41
41
|
!popperRef.current.contains(event.target) &&
|
|
42
42
|
!(targetElement === null || targetElement === void 0 ? void 0 : targetElement.contains(event.target)))) {
|
|
43
|
+
targetElement.style.position = 'initial';
|
|
44
|
+
targetElement.style.zIndex = 'initial';
|
|
43
45
|
removePopover(id);
|
|
44
46
|
}
|
|
45
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverProvider.js","sourceRoot":"","sources":["../../src/containers/PopoverProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA8B;AAC9B,+BAAkF;AAClF,kFAAoD;AACpD,6EAAuD;AAavD,IAAM,eAAe,GAA0C,UAAC,EAAqB;QAAnB,QAAQ,cAAA,EAAE,OAAO,aAAA;IAC3E,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string;
|
|
15
18
|
}
|
|
16
19
|
export interface IPopoverOptions extends IPopover {
|
|
17
20
|
targetElement?: HTMLElement;
|
|
18
21
|
}
|
|
19
|
-
declare const usePopover: ({ targetElement, content, handler, placement, show, noArrow, useTargetWidth, closeOnOutsideClick, openOnMount, delay, }: IPopoverOptions) => string;
|
|
22
|
+
declare const usePopover: ({ targetElement, content, handler, placement, show, noArrow, useTargetWidth, closeOnOutsideClick, openOnMount, delay, ...rest }: IPopoverOptions) => string;
|
|
20
23
|
export default usePopover;
|
|
21
24
|
//# sourceMappingURL=usePopover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoB3C,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;IACpD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoB3C,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;IACpD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,aAAa,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,QAAA,MAAM,UAAU,oIAYb,eAAe,WA+GjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/dist/hooks/usePopover.js
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
2
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
26
|
};
|
|
@@ -20,7 +42,7 @@ var endEvents = {
|
|
|
20
42
|
focus: null
|
|
21
43
|
};
|
|
22
44
|
var usePopover = function (_a) {
|
|
23
|
-
var targetElement = _a.targetElement, content = _a.content, _b = _a.handler, handler = _b === void 0 ? 'hover' : _b, placement = _a.placement, _c = _a.show, show = _c === void 0 ? true : _c, noArrow = _a.noArrow, useTargetWidth = _a.useTargetWidth, _d = _a.closeOnOutsideClick, closeOnOutsideClick = _d === void 0 ? true : _d, _e = _a.openOnMount, openOnMount = _e === void 0 ? false : _e, delay = _a.delay;
|
|
45
|
+
var targetElement = _a.targetElement, content = _a.content, _b = _a.handler, handler = _b === void 0 ? 'hover' : _b, placement = _a.placement, _c = _a.show, show = _c === void 0 ? true : _c, noArrow = _a.noArrow, useTargetWidth = _a.useTargetWidth, _d = _a.closeOnOutsideClick, closeOnOutsideClick = _d === void 0 ? true : _d, _e = _a.openOnMount, openOnMount = _e === void 0 ? false : _e, delay = _a.delay, rest = __rest(_a, ["targetElement", "content", "handler", "placement", "show", "noArrow", "useTargetWidth", "closeOnOutsideClick", "openOnMount", "delay"]);
|
|
24
46
|
var _f = (0, react_1.useContext)(PopoverContext_1["default"]), addPopover = _f.addPopover, removePopover = _f.removePopover, updatePopover = _f.updatePopover, popovers = _f.popovers;
|
|
25
47
|
var current = (0, react_1.useRef)(shortid_1["default"].generate()).current;
|
|
26
48
|
var timeout = (0, react_1.useRef)(0).current;
|
|
@@ -29,24 +51,25 @@ var usePopover = function (_a) {
|
|
|
29
51
|
var currentPopover = (0, react_1.useMemo)(function () { return popovers === null || popovers === void 0 ? void 0 : popovers.find(function (p) { return p.id === current; }); }, [popovers, current]);
|
|
30
52
|
var _addPopover = function () {
|
|
31
53
|
if (currentPopover) {
|
|
32
|
-
|
|
54
|
+
if (handler !== 'hoverStay') {
|
|
55
|
+
_removePopover === null || _removePopover === void 0 ? void 0 : _removePopover();
|
|
56
|
+
}
|
|
33
57
|
}
|
|
34
58
|
else if (show) {
|
|
35
59
|
timeout = setTimeout(function () {
|
|
36
|
-
addPopover === null || addPopover === void 0 ? void 0 : addPopover({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
targetElement
|
|
40
|
-
|
|
41
|
-
noArrow: noArrow,
|
|
42
|
-
useTargetWidth: useTargetWidth,
|
|
43
|
-
closeOnOutsideClick: closeOnOutsideClick,
|
|
44
|
-
closeOnAnyClick: handler === 'hover' || handler === 'hoverStay'
|
|
45
|
-
});
|
|
60
|
+
addPopover === null || addPopover === void 0 ? void 0 : addPopover(__assign({ id: current, content: content, targetElement: targetElement, placement: placement, noArrow: noArrow, useTargetWidth: useTargetWidth, closeOnOutsideClick: closeOnOutsideClick, closeOnAnyClick: handler === 'hover' || handler === 'hoverStay' }, rest));
|
|
61
|
+
if ((rest === null || rest === void 0 ? void 0 : rest.blur) > 0) {
|
|
62
|
+
targetElement.style.position = 'relative';
|
|
63
|
+
targetElement.style.zIndex = '999999';
|
|
64
|
+
}
|
|
46
65
|
}, delay || 0);
|
|
47
66
|
}
|
|
48
67
|
};
|
|
49
68
|
var _removePopover = function () {
|
|
69
|
+
if ((rest === null || rest === void 0 ? void 0 : rest.blur) > 0) {
|
|
70
|
+
targetElement.style.position = 'initial';
|
|
71
|
+
targetElement.style.zIndex = 'initial';
|
|
72
|
+
}
|
|
50
73
|
cancelTimeout();
|
|
51
74
|
removePopover === null || removePopover === void 0 ? void 0 : removePopover(current);
|
|
52
75
|
};
|
|
@@ -56,16 +79,7 @@ var usePopover = function (_a) {
|
|
|
56
79
|
};
|
|
57
80
|
(0, react_use_1.useUpdateEffect)(function () {
|
|
58
81
|
if (content && show) {
|
|
59
|
-
updatePopover === null || updatePopover === void 0 ? void 0 : updatePopover(current, {
|
|
60
|
-
id: current,
|
|
61
|
-
content: content,
|
|
62
|
-
targetElement: targetElement,
|
|
63
|
-
placement: placement,
|
|
64
|
-
noArrow: noArrow,
|
|
65
|
-
useTargetWidth: useTargetWidth,
|
|
66
|
-
closeOnOutsideClick: closeOnOutsideClick,
|
|
67
|
-
closeOnAnyClick: handler === 'hover' || handler === 'hoverStay'
|
|
68
|
-
});
|
|
82
|
+
updatePopover === null || updatePopover === void 0 ? void 0 : updatePopover(current, __assign({ id: current, content: content, targetElement: targetElement, placement: placement, noArrow: noArrow, useTargetWidth: useTargetWidth, closeOnOutsideClick: closeOnOutsideClick, closeOnAnyClick: handler === 'hover' || handler === 'hoverStay' }, rest));
|
|
69
83
|
}
|
|
70
84
|
}, [content === null || content === void 0 ? void 0 : content.toString()]);
|
|
71
85
|
(0, react_1.useEffect)(function () {
|
|
@@ -97,7 +111,6 @@ var usePopover = function (_a) {
|
|
|
97
111
|
};
|
|
98
112
|
}, [targetElement === null || targetElement === void 0 ? void 0 : targetElement.toString(), content === null || content === void 0 ? void 0 : content.toString(), current, currentPopover]);
|
|
99
113
|
(0, react_use_1.useUnmount)(function () {
|
|
100
|
-
console.log('UNMOUNTING POPOVER', content);
|
|
101
114
|
cancelTimeout();
|
|
102
115
|
});
|
|
103
116
|
return current;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopover.js","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePopover.js","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+BAAiF;AACjF,uCAAwD;AACxD,oDA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AmB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;iBAChE;aACF;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,EAAE,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IAE9E,IAAA,sBAAU,EAAC;QACT,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,qBAAe,UAAU,CAAC"}
|
package/dist/hooks/useTooltip.js
CHANGED
|
@@ -25,7 +25,7 @@ var useTooltip = function (targetElement, tooltip) {
|
|
|
25
25
|
setElement(targetElement);
|
|
26
26
|
setData(tooltip);
|
|
27
27
|
}
|
|
28
|
-
}, [targetElement === null || targetElement === void 0 ? void 0 : targetElement.toString(),
|
|
28
|
+
}, [targetElement === null || targetElement === void 0 ? void 0 : targetElement.toString(), tooltip === null || tooltip === void 0 ? void 0 : tooltip.toString()]);
|
|
29
29
|
var popoverData = typeof data === 'string' ? { content: data } : data;
|
|
30
30
|
(0, usePopover_1["default"])(__assign(__assign({}, popoverData), { targetElement: element, show: !!(popoverData === null || popoverData === void 0 ? void 0 : popoverData.content) }));
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.js","sourceRoot":"","sources":["../../src/hooks/useTooltip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+BAA4C;AAE5C,4DAAsC;AAE/B,IAAM,UAAU,GAAG,UACxB,aAAsC,EACtC,OAA4B;IAEtB,IAAA,KAAwB,IAAA,gBAAQ,EAA0B,SAAS,CAAC,EAAnE,OAAO,QAAA,EAAE,UAAU,QAAgD,CAAC;IACrE,IAAA,KAAkB,IAAA,gBAAQ,EAAsC,SAAS,CAAC,EAAzE,IAAI,QAAA,EAAE,OAAO,QAA4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/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import ReqoreThemeProvider from '../../containers/ThemeProvider';
|
|
|
8
8
|
import PopoverContext from '../../context/PopoverContext';
|
|
9
9
|
import { fadeIn } from '../../helpers/animations';
|
|
10
10
|
import { getReadableColor } from '../../helpers/colors';
|
|
11
|
+
import { StyledBackdrop } from '../Drawer';
|
|
11
12
|
|
|
12
13
|
const StyledPopoverArrow = styled.div<{ theme: IReqoreTheme }>`
|
|
13
14
|
width: 10px;
|
|
@@ -23,19 +24,28 @@ const StyledPopoverArrow = styled.div<{ theme: IReqoreTheme }>`
|
|
|
23
24
|
position: absolute;
|
|
24
25
|
z-index: -1;
|
|
25
26
|
transform: rotate(45deg);
|
|
26
|
-
${({ theme }) => css`
|
|
27
|
+
${({ theme, opaque }) => css`
|
|
27
28
|
background-color: ${theme.popover?.main || theme.main};
|
|
28
|
-
box-shadow: rgba(31, 26, 34, 0.6) 0px 0px 4px;
|
|
29
|
+
box-shadow: ${opaque ? undefined : 'rgba(31, 26, 34, 0.6) 0px 0px 4px'};
|
|
29
30
|
`}
|
|
30
31
|
}
|
|
31
32
|
`;
|
|
32
33
|
|
|
33
34
|
const StyledPopoverWrapper = styled.div<{ theme: IReqoreTheme }>`
|
|
34
35
|
animation: 0.2s ${fadeIn} ease-out;
|
|
36
|
+
max-width: ${({ maxWidth = '80vw' }) => maxWidth};
|
|
37
|
+
max-height: ${({ maxHeight = '80vh' }) => maxHeight};
|
|
35
38
|
|
|
36
|
-
${({ theme }) => {
|
|
39
|
+
${({ theme, opaque }) => {
|
|
37
40
|
const defaultColor: string = theme.popover?.main || theme.main;
|
|
38
41
|
|
|
42
|
+
if (opaque) {
|
|
43
|
+
return css`
|
|
44
|
+
z-index: 999999;
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
|
|
39
49
|
return css`
|
|
40
50
|
z-index: 999999;
|
|
41
51
|
background-color: ${defaultColor};
|
|
@@ -74,8 +84,9 @@ const StyledPopoverContent = styled.div<{ isString?: boolean }>`
|
|
|
74
84
|
z-index: 20;
|
|
75
85
|
position: relative;
|
|
76
86
|
overflow: hidden;
|
|
77
|
-
background-color: ${({ theme }) =>
|
|
78
|
-
|
|
87
|
+
background-color: ${({ theme, opaque }) =>
|
|
88
|
+
opaque ? 'transparent' : theme.popover?.main || theme.main};
|
|
89
|
+
border-radius: ${({ opaque }) => (opaque ? undefined : '3.5px')};
|
|
79
90
|
|
|
80
91
|
.reqore-popover-text {
|
|
81
92
|
font-size: 14px;
|
|
@@ -91,6 +102,10 @@ const InternalPopover: React.FC<IReqoreInternalPopoverProps> = ({
|
|
|
91
102
|
placement,
|
|
92
103
|
noArrow,
|
|
93
104
|
useTargetWidth,
|
|
105
|
+
opaque,
|
|
106
|
+
maxWidth,
|
|
107
|
+
maxHeight,
|
|
108
|
+
blur,
|
|
94
109
|
}) => {
|
|
95
110
|
const { removePopover, updatePopover, uiScale } = useContext(PopoverContext);
|
|
96
111
|
const [popperElement, setPopperElement] = useState(null);
|
|
@@ -118,6 +133,8 @@ const InternalPopover: React.FC<IReqoreInternalPopoverProps> = ({
|
|
|
118
133
|
],
|
|
119
134
|
});
|
|
120
135
|
|
|
136
|
+
console.log(opaque);
|
|
137
|
+
|
|
121
138
|
useEffect(() => {
|
|
122
139
|
if (popperRef.current) {
|
|
123
140
|
updatePopover?.(id, { popperRef });
|
|
@@ -145,7 +162,11 @@ const InternalPopover: React.FC<IReqoreInternalPopoverProps> = ({
|
|
|
145
162
|
|
|
146
163
|
return (
|
|
147
164
|
<ReqoreThemeProvider>
|
|
165
|
+
{blur > 0 ? <StyledBackdrop zIndex={999998} blur={blur} closable /> : null}
|
|
148
166
|
<StyledPopoverWrapper
|
|
167
|
+
maxWidth={maxWidth}
|
|
168
|
+
maxHeight={maxHeight}
|
|
169
|
+
opaque={opaque}
|
|
149
170
|
className='reqore-popover-content'
|
|
150
171
|
ref={(el) => {
|
|
151
172
|
setPopperElement(el);
|
|
@@ -159,9 +180,14 @@ const InternalPopover: React.FC<IReqoreInternalPopoverProps> = ({
|
|
|
159
180
|
{...attributes.popper}
|
|
160
181
|
>
|
|
161
182
|
{!noArrow && (
|
|
162
|
-
<StyledPopoverArrow
|
|
183
|
+
<StyledPopoverArrow
|
|
184
|
+
opaque={opaque}
|
|
185
|
+
ref={setArrowElement}
|
|
186
|
+
style={styles.arrow}
|
|
187
|
+
data-popper-arrow
|
|
188
|
+
/>
|
|
163
189
|
)}
|
|
164
|
-
<StyledPopoverContent isString={isString(content)}>
|
|
190
|
+
<StyledPopoverContent isString={isString(content)} opaque={opaque}>
|
|
165
191
|
{isString(content) ? (
|
|
166
192
|
<span className='reqore-popover-text'>{content}</span>
|
|
167
193
|
) : (
|
|
@@ -27,6 +27,8 @@ const PopoverProvider: React.FC<IReqorePopoverProviderProps> = ({ children, uiSc
|
|
|
27
27
|
!popperRef.current.contains(event.target) &&
|
|
28
28
|
!targetElement?.contains(event.target as Node))
|
|
29
29
|
) {
|
|
30
|
+
targetElement.style.position = 'initial';
|
|
31
|
+
targetElement.style.zIndex = 'initial';
|
|
30
32
|
removePopover(id);
|
|
31
33
|
}
|
|
32
34
|
});
|
package/src/hooks/usePopover.tsx
CHANGED
|
@@ -30,6 +30,9 @@ export interface IPopover {
|
|
|
30
30
|
closeOnAnyClick?: boolean;
|
|
31
31
|
delay?: number;
|
|
32
32
|
blur?: number;
|
|
33
|
+
opaque?: boolean;
|
|
34
|
+
maxWidth?: string;
|
|
35
|
+
maxHeight?: string;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
export interface IPopoverOptions extends IPopover {
|
|
@@ -47,6 +50,7 @@ const usePopover = ({
|
|
|
47
50
|
closeOnOutsideClick = true,
|
|
48
51
|
openOnMount = false,
|
|
49
52
|
delay,
|
|
53
|
+
...rest
|
|
50
54
|
}: IPopoverOptions) => {
|
|
51
55
|
const { addPopover, removePopover, updatePopover, popovers } = useContext(PopoverContext);
|
|
52
56
|
const { current }: MutableRefObject<string> = useRef(shortid.generate());
|
|
@@ -61,7 +65,9 @@ const usePopover = ({
|
|
|
61
65
|
|
|
62
66
|
const _addPopover = () => {
|
|
63
67
|
if (currentPopover) {
|
|
64
|
-
|
|
68
|
+
if (handler !== 'hoverStay') {
|
|
69
|
+
_removePopover?.();
|
|
70
|
+
}
|
|
65
71
|
} else if (show) {
|
|
66
72
|
timeout = setTimeout(() => {
|
|
67
73
|
addPopover?.({
|
|
@@ -73,12 +79,23 @@ const usePopover = ({
|
|
|
73
79
|
useTargetWidth,
|
|
74
80
|
closeOnOutsideClick,
|
|
75
81
|
closeOnAnyClick: handler === 'hover' || handler === 'hoverStay',
|
|
82
|
+
...rest,
|
|
76
83
|
});
|
|
84
|
+
|
|
85
|
+
if (rest?.blur > 0) {
|
|
86
|
+
targetElement.style.position = 'relative';
|
|
87
|
+
targetElement.style.zIndex = '999999';
|
|
88
|
+
}
|
|
77
89
|
}, delay || 0);
|
|
78
90
|
}
|
|
79
91
|
};
|
|
80
92
|
|
|
81
93
|
const _removePopover = () => {
|
|
94
|
+
if (rest?.blur > 0) {
|
|
95
|
+
targetElement.style.position = 'initial';
|
|
96
|
+
targetElement.style.zIndex = 'initial';
|
|
97
|
+
}
|
|
98
|
+
|
|
82
99
|
cancelTimeout();
|
|
83
100
|
removePopover?.(current);
|
|
84
101
|
};
|
|
@@ -99,6 +116,7 @@ const usePopover = ({
|
|
|
99
116
|
useTargetWidth,
|
|
100
117
|
closeOnOutsideClick,
|
|
101
118
|
closeOnAnyClick: handler === 'hover' || handler === 'hoverStay',
|
|
119
|
+
...rest,
|
|
102
120
|
});
|
|
103
121
|
}
|
|
104
122
|
}, [content?.toString()]);
|
|
@@ -125,6 +143,7 @@ const usePopover = ({
|
|
|
125
143
|
return () => {
|
|
126
144
|
if (targetElement && content) {
|
|
127
145
|
cancelTimeout();
|
|
146
|
+
|
|
128
147
|
targetElement.removeEventListener(startEvent, _addPopover);
|
|
129
148
|
|
|
130
149
|
if (endEvent) {
|
|
@@ -139,7 +158,6 @@ const usePopover = ({
|
|
|
139
158
|
}, [targetElement?.toString(), content?.toString(), current, currentPopover]);
|
|
140
159
|
|
|
141
160
|
useUnmount(() => {
|
|
142
|
-
console.log('UNMOUNTING POPOVER', content);
|
|
143
161
|
cancelTimeout();
|
|
144
162
|
});
|
|
145
163
|
|
package/src/hooks/useTooltip.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const useTooltip = (
|
|
|
14
14
|
setElement(targetElement);
|
|
15
15
|
setData(tooltip);
|
|
16
16
|
}
|
|
17
|
-
}, [targetElement?.toString(),
|
|
17
|
+
}, [targetElement?.toString(), tooltip?.toString()]);
|
|
18
18
|
|
|
19
19
|
const popoverData = typeof data === 'string' ? { content: data } : data;
|
|
20
20
|
|
|
@@ -2,64 +2,109 @@ import { Meta, Story } from '@storybook/react/types-6-0';
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { IReqorePopoverProps } from '../../components/Popover';
|
|
4
4
|
import usePopover from '../../hooks/usePopover';
|
|
5
|
-
import { ReqoreButton, ReqorePopover } from '../../index';
|
|
5
|
+
import { ReqoreButton, ReqoreMessage, ReqorePanel, ReqorePopover } from '../../index';
|
|
6
|
+
import { argManager } from '../utils/args';
|
|
7
|
+
|
|
8
|
+
const { createArg } = argManager<IReqorePopoverProps>();
|
|
6
9
|
|
|
7
10
|
export default {
|
|
8
11
|
title: 'Components/Popover',
|
|
12
|
+
argTypes: {
|
|
13
|
+
...createArg('opaque', {
|
|
14
|
+
defaultValue: false,
|
|
15
|
+
name: 'Opaque',
|
|
16
|
+
description: 'Makes the popover opaque',
|
|
17
|
+
type: 'boolean',
|
|
18
|
+
}),
|
|
19
|
+
...createArg('blur', {
|
|
20
|
+
defaultValue: 0,
|
|
21
|
+
name: 'Blur',
|
|
22
|
+
description: 'Makes the popover blurred',
|
|
23
|
+
type: 'number',
|
|
24
|
+
}),
|
|
25
|
+
...createArg('maxHeight', {
|
|
26
|
+
defaultValue: undefined,
|
|
27
|
+
name: 'Max Height',
|
|
28
|
+
description: 'Sets the max height of the popover',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
31
|
+
...createArg('maxWidth', {
|
|
32
|
+
defaultValue: undefined,
|
|
33
|
+
name: 'Max Width',
|
|
34
|
+
description: 'Sets the max width of the popover',
|
|
35
|
+
type: 'string',
|
|
36
|
+
}),
|
|
37
|
+
...createArg('content', {
|
|
38
|
+
defaultValue: 'This is a popover',
|
|
39
|
+
name: 'Content',
|
|
40
|
+
description: 'The content of the popover',
|
|
41
|
+
type: 'string',
|
|
42
|
+
}),
|
|
43
|
+
},
|
|
9
44
|
} as Meta<IReqorePopoverProps>;
|
|
10
45
|
|
|
11
|
-
const HoverButton = () => {
|
|
46
|
+
const HoverButton = (args: any) => {
|
|
12
47
|
return (
|
|
13
|
-
<ReqorePopover component={ReqoreButton}
|
|
48
|
+
<ReqorePopover component={ReqoreButton} isReqoreComponent {...args}>
|
|
14
49
|
Hover popover
|
|
15
50
|
</ReqorePopover>
|
|
16
51
|
);
|
|
17
52
|
};
|
|
18
53
|
|
|
19
|
-
const ClickButton = (
|
|
54
|
+
const ClickButton = (args: any) => {
|
|
20
55
|
const [refElement, setRefElement] = useState(null);
|
|
21
56
|
|
|
22
57
|
usePopover({
|
|
23
58
|
targetElement: refElement,
|
|
24
|
-
content: content || 'I am a tooltip on click',
|
|
25
59
|
handler: 'click',
|
|
26
|
-
placement,
|
|
27
60
|
closeOnOutsideClick: true,
|
|
28
61
|
noArrow: true,
|
|
29
62
|
useTargetWidth: true,
|
|
63
|
+
...args,
|
|
30
64
|
});
|
|
31
65
|
|
|
32
66
|
return <ReqoreButton ref={setRefElement}>Click popover</ReqoreButton>;
|
|
33
67
|
};
|
|
34
68
|
|
|
35
|
-
const DelayButton = (
|
|
69
|
+
const DelayButton = (args: any) => {
|
|
36
70
|
const [refElement, setRefElement] = useState(null);
|
|
37
71
|
|
|
38
72
|
usePopover({
|
|
39
73
|
targetElement: refElement,
|
|
40
|
-
|
|
41
|
-
placement,
|
|
74
|
+
|
|
42
75
|
delay: 500,
|
|
76
|
+
...args,
|
|
43
77
|
});
|
|
44
78
|
|
|
45
79
|
return <ReqoreButton ref={setRefElement}>Tooltip with delay of 500ms</ReqoreButton>;
|
|
46
80
|
};
|
|
47
81
|
|
|
82
|
+
const HoverStayButton = (args: any) => {
|
|
83
|
+
const [refElement, setRefElement] = useState(null);
|
|
84
|
+
|
|
85
|
+
usePopover({
|
|
86
|
+
targetElement: refElement,
|
|
87
|
+
handler: 'hoverStay',
|
|
88
|
+
...args,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<ReqoreButton ref={setRefElement}>Tooltip with hover start and click end events</ReqoreButton>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
48
96
|
const Template: Story<IReqorePopoverProps> = (args: IReqorePopoverProps) => {
|
|
49
97
|
return (
|
|
50
98
|
<>
|
|
51
|
-
<HoverButton />
|
|
99
|
+
<HoverButton {...args} />
|
|
52
100
|
<br />
|
|
53
101
|
<ClickButton {...args} />
|
|
54
102
|
<br />
|
|
55
103
|
<DelayButton {...args} />
|
|
56
104
|
<br />
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
isReqoreComponent
|
|
61
|
-
openOnMount
|
|
62
|
-
>
|
|
105
|
+
<HoverStayButton {...args} />
|
|
106
|
+
<br />
|
|
107
|
+
<ReqorePopover {...args} component={ReqoreButton} isReqoreComponent openOnMount>
|
|
63
108
|
Auto open popover
|
|
64
109
|
</ReqorePopover>
|
|
65
110
|
</>
|
|
@@ -67,3 +112,27 @@ const Template: Story<IReqorePopoverProps> = (args: IReqorePopoverProps) => {
|
|
|
67
112
|
};
|
|
68
113
|
|
|
69
114
|
export const Basic = Template.bind({});
|
|
115
|
+
export const CustomContent = Template.bind({});
|
|
116
|
+
CustomContent.args = {
|
|
117
|
+
content: (
|
|
118
|
+
<ReqorePanel label='This is a test' flat>
|
|
119
|
+
<ReqoreMessage flat>
|
|
120
|
+
In to am attended desirous raptures declared diverted confined at. Collected instantly
|
|
121
|
+
remaining up certainly to necessary as. Over walk dull into
|
|
122
|
+
</ReqoreMessage>
|
|
123
|
+
</ReqorePanel>
|
|
124
|
+
),
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const Blurred = Template.bind({});
|
|
128
|
+
Blurred.args = {
|
|
129
|
+
blur: 4,
|
|
130
|
+
content: (
|
|
131
|
+
<ReqorePanel label='This is a test' flat>
|
|
132
|
+
<ReqoreMessage flat>
|
|
133
|
+
In to am attended desirous raptures declared diverted confined at. Collected instantly
|
|
134
|
+
remaining up certainly to necessary as. Over walk dull into
|
|
135
|
+
</ReqoreMessage>
|
|
136
|
+
</ReqorePanel>
|
|
137
|
+
),
|
|
138
|
+
};
|
package/tests.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":24,"numPassedTests":100,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":24,"numTotalTests":100,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1668074554403,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Table /> properly","location":null,"status":"passed","title":"Renders basic <Table /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with grouped columns properly","location":null,"status":"passed","title":"Renders <Table /> with grouped columns properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with custom content","location":null,"status":"passed","title":"Renders <Table /> with custom content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with predefined content","location":null,"status":"passed","title":"Renders <Table /> with predefined content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Sorting on <Table /> works properly","location":null,"status":"passed","title":"Sorting on <Table /> works properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> can be selected","location":null,"status":"passed","title":"Rows on <Table /> can be selected"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> cannot be selected if _selectId is missing","location":null,"status":"passed","title":"Rows on <Table /> cannot be selected if _selectId is missing"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> are all selected/deselected when clicking on header","location":null,"status":"passed","title":"Rows on <Table /> are all selected/deselected when clicking on header"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Cells on <Table /> are interactive","location":null,"status":"passed","title":"Cells on <Table /> are interactive"}],"endTime":1668074568852,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/table.test.tsx","startTime":1668074554939,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders full <Tabs /> properly","location":null,"status":"passed","title":"Renders full <Tabs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders shortened <Tabs /> properly","location":null,"status":"passed","title":"Renders shortened <Tabs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Default active tab can be specified","location":null,"status":"passed","title":"Default active tab can be specified"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Changes tab and runs callback","location":null,"status":"passed","title":"Changes tab and runs callback"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not change tab and run callback when disabled","location":null,"status":"passed","title":"Does not change tab and run callback when disabled"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Changes tab programatically and runs callback","location":null,"status":"passed","title":"Changes tab programatically and runs callback"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Closable tab can be closed if not disabled","location":null,"status":"passed","title":"Closable tab can be closed if not disabled"}],"endTime":1668074570410,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tabs.test.tsx","startTime":1668074568875,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders sidebar","location":null,"status":"passed","title":"Renders sidebar"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Sidebar can be collapsed","location":null,"status":"passed","title":"Sidebar can be collapsed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Can open submenu manually","location":null,"status":"passed","title":"Can open submenu manually"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Submenu opens automatically if path matches","location":null,"status":"passed","title":"Submenu opens automatically if path matches"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Bookmarks can be added and removed","location":null,"status":"passed","title":"Bookmarks can be added and removed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Bookmarks clicks are not propagated through","location":null,"status":"passed","title":"Bookmarks clicks are not propagated through"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders item as <p> element with onClick","location":null,"status":"passed","title":"Renders item as <p> element with onClick"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders floating sidebar with item as <p> element with onClick, closes on item click","location":null,"status":"passed","title":"Renders floating sidebar with item as <p> element with onClick, closes on item click"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders custom item at the top","location":null,"status":"passed","title":"Renders custom item at the top"}],"endTime":1668074571773,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/sidebar.test.tsx","startTime":1668074570428,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> properly","location":null,"status":"passed","title":"Renders <Dropdown /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders disabled <Dropdown /> when children are empty","location":null,"status":"passed","title":"Renders disabled <Dropdown /> when children are empty"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> with custom component and custom handler","location":null,"status":"passed","title":"Renders <Dropdown /> with custom component and custom handler"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> is opened by default","location":null,"status":"passed","title":"Renders <Dropdown /> is opened by default"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders filterable <Dropdown /> and filters items correctly","location":null,"status":"passed","title":"Renders filterable <Dropdown /> and filters items correctly"}],"endTime":1668074573420,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/dropdown.test.tsx","startTime":1668074571787,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows popover on hover, hides on leave","location":null,"status":"passed","title":"Shows popover on hover, hides on leave"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows popover on click, hides only on click away","location":null,"status":"passed","title":"Shows popover on click, hides only on click away"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows custom content","location":null,"status":"passed","title":"Shows custom content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs callback function","location":null,"status":"passed","title":"Runs callback function"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the popover after a delay","location":null,"status":"passed","title":"Shows the popover after a delay"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not show the popover with delay if time not reached","location":null,"status":"passed","title":"Does not show the popover with delay if time not reached"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the hoverStay popover after a delay and stays, ","location":null,"status":"passed","title":"Shows the hoverStay popover after a delay and stays, "},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the hoverStay popover after a delay and stays, ","location":null,"status":"passed","title":"Shows the hoverStay popover after a delay and stays, "}],"endTime":1668074574360,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/popover.test.tsx","startTime":1668074573433,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Adds notifications and dismisses them automatically","location":null,"status":"passed","title":"Adds notifications and dismisses them automatically"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Adds a notification and updates it","location":null,"status":"passed","title":"Adds a notification and updates it"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a click event","location":null,"status":"passed","title":"Notification has a click event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a close event","location":null,"status":"passed","title":"Notification has a close event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a finish event","location":null,"status":"passed","title":"Notification has a finish event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Maximum of 5 notifications is shown at once","location":null,"status":"passed","title":"Maximum of 5 notifications is shown at once"}],"endTime":1668074575340,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/notifications.test.tsx","startTime":1668074574373,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> properly","location":null,"status":"passed","title":"Renders <Tag /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> group properly","location":null,"status":"passed","title":"Renders <Tag /> group properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> without remove button if disabled","location":null,"status":"passed","title":"Renders <Tag /> without remove button if disabled"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Fires onClick and onRemoveClick <Tag /> events","location":null,"status":"passed","title":"Fires onClick and onRemoveClick <Tag /> events"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> with the label key","location":null,"status":"passed","title":"Renders <Tag /> with the label key"}],"endTime":1668074576157,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tag.test.tsx","startTime":1668074575360,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> properly","location":null,"status":"passed","title":"Renders basic <Panel /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> with title properly","location":null,"status":"passed","title":"Renders basic <Panel /> with title properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> that is collapsed by default and can be expanded","location":null,"status":"passed","title":"Renders basic <Panel /> that is collapsed by default and can be expanded"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders closable <Panel /> properly","location":null,"status":"passed","title":"Renders closable <Panel /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Panel /> with actions","location":null,"status":"passed","title":"Renders <Panel /> with actions"}],"endTime":1668074576976,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/panel.test.tsx","startTime":1668074576175,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> properly","location":null,"status":"passed","title":"Renders <Button /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with size properly","location":null,"status":"passed","title":"Renders <Button /> with size properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with icon properly","location":null,"status":"passed","title":"Renders <Button /> with icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with intent properly","location":null,"status":"passed","title":"Renders <Button /> with intent properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with right icon properly","location":null,"status":"passed","title":"Renders <Button /> with right icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with icon and right icon properly","location":null,"status":"passed","title":"Renders <Button /> with icon and right icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with onClick function","location":null,"status":"passed","title":"Renders <Button /> with onClick function"}],"endTime":1668074577979,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/button.test.tsx","startTime":1668074576997,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Modal /> properly","location":null,"status":"passed","title":"Renders basic <Modal /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not renders <Modal /> if its not open","location":null,"status":"passed","title":"Does not renders <Modal /> if its not open"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Modal /> with custom dimensions","location":null,"status":"passed","title":"Renders <Modal /> with custom dimensions"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders confirmation <Modal /> ","location":null,"status":"passed","title":"Renders confirmation <Modal /> "}],"endTime":1668074578855,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/modal.test.tsx","startTime":1668074577994,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not render <Drawer /> if not open","location":null,"status":"passed","title":"Does not render <Drawer /> if not open"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders opened <Drawer /> properly","location":null,"status":"passed","title":"Renders opened <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders hidable <Drawer /> properly","location":null,"status":"passed","title":"Renders hidable <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders closable <Drawer /> properly","location":null,"status":"passed","title":"Renders closable <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Drawer /> with interactive backdrop","location":null,"status":"passed","title":"Renders <Drawer /> with interactive backdrop"}],"endTime":1668074579648,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/drawer.test.tsx","startTime":1668074578871,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Tree /> properly","location":null,"status":"passed","title":"Renders basic <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows textarea for <Tree /> properly","location":null,"status":"passed","title":"Shows textarea for <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Tree /> items can be expanded and collapsed","location":null,"status":"passed","title":"<Tree /> items can be expanded and collapsed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows types for <Tree /> properly","location":null,"status":"passed","title":"Shows types for <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tree /> with clickable items","location":null,"status":"passed","title":"Renders <Tree /> with clickable items"}],"endTime":1668074581112,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tree.test.tsx","startTime":1668074579659,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Collection /> properly","location":null,"status":"passed","title":"Renders basic <Collection /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Collection /> items can be filtered","location":null,"status":"passed","title":"<Collection /> items can be filtered"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Collection /> shows no data message when empty","location":null,"status":"passed","title":"<Collection /> shows no data message when empty"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Collection /> can be sorted","location":null,"status":"passed","title":"<Collection /> can be sorted"}],"endTime":1668074582555,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/collection.test.tsx","startTime":1668074581122,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Menu /> properly","location":null,"status":"passed","title":"Renders <Menu /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Menu /> item can be clicked","location":null,"status":"passed","title":"<Menu /> item can be clicked"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Menu /> item has right clickable button","location":null,"status":"passed","title":"<Menu /> item has right clickable button"}],"endTime":1668074583267,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/menu.test.tsx","startTime":1668074582576,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Input /> properly","location":null,"status":"passed","title":"Renders <Input /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Input /> with clear button properly","location":null,"status":"passed","title":"Renders <Input /> with clear button properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Disabled <Input /> cannot be cleared","location":null,"status":"passed","title":"Disabled <Input /> cannot be cleared"}],"endTime":1668074583964,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/input.test.tsx","startTime":1668074583278,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders full <Breadcrumbs /> properly","location":null,"status":"passed","title":"Renders full <Breadcrumbs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders shortened <Breadcrumbs /> properly","location":null,"status":"passed","title":"Renders shortened <Breadcrumbs /> properly"}],"endTime":1668074584501,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/breadcrumbs.test.tsx","startTime":1668074583975,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TextArea /> properly","location":null,"status":"passed","title":"Renders <TextArea /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TextArea /> with clear button properly","location":null,"status":"passed","title":"Renders <TextArea /> with clear button properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Disabled <TextArea /> cannot be cleared","location":null,"status":"passed","title":"Disabled <TextArea /> cannot be cleared"}],"endTime":1668074585099,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/textarea.test.tsx","startTime":1668074584523,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Message /> properly","location":null,"status":"passed","title":"Renders <Message /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs onFinish on message after duration","location":null,"status":"passed","title":"Runs onFinish on message after duration"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs onClose when closed","location":null,"status":"passed","title":"Runs onClose when closed"}],"endTime":1668074585693,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/messages.test.tsx","startTime":1668074585119,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Checkbox /> properly","location":null,"status":"passed","title":"Renders <Checkbox /> properly"}],"endTime":1668074586737,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/radiogroup.test.tsx","startTime":1668074585711,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders Layout properly","location":null,"status":"passed","title":"Renders Layout properly"}],"endTime":1668074587261,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/layout.test.tsx","startTime":1668074586748,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Icon /> properly","location":null,"status":"passed","title":"Renders <Icon /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders empty <Icon /> if icon does not exist","location":null,"status":"passed","title":"Renders empty <Icon /> if icon does not exist"}],"endTime":1668074588089,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/icon.test.tsx","startTime":1668074587279,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders Navbar properly","location":null,"status":"passed","title":"Renders Navbar properly"}],"endTime":1668074588562,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/navbar.test.tsx","startTime":1668074588099,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Checkbox /> properly","location":null,"status":"passed","title":"Renders <Checkbox /> properly"}],"endTime":1668074589066,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/checkbox.test.tsx","startTime":1668074588573,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TimeAgo /> data properly","location":null,"status":"passed","title":"Renders <TimeAgo /> data properly"}],"endTime":1668074589508,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/timeAgo.test.tsx","startTime":1668074589086,"status":"passed","summary":""}],"wasInterrupted":false}
|
|
1
|
+
{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":24,"numPassedTests":100,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":24,"numTotalTests":100,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1668086758462,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Table /> properly","location":null,"status":"passed","title":"Renders basic <Table /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with grouped columns properly","location":null,"status":"passed","title":"Renders <Table /> with grouped columns properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with custom content","location":null,"status":"passed","title":"Renders <Table /> with custom content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with predefined content","location":null,"status":"passed","title":"Renders <Table /> with predefined content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Sorting on <Table /> works properly","location":null,"status":"passed","title":"Sorting on <Table /> works properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> can be selected","location":null,"status":"passed","title":"Rows on <Table /> can be selected"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> cannot be selected if _selectId is missing","location":null,"status":"passed","title":"Rows on <Table /> cannot be selected if _selectId is missing"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> are all selected/deselected when clicking on header","location":null,"status":"passed","title":"Rows on <Table /> are all selected/deselected when clicking on header"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Cells on <Table /> are interactive","location":null,"status":"passed","title":"Cells on <Table /> are interactive"}],"endTime":1668086774976,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/table.test.tsx","startTime":1668086759055,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders full <Tabs /> properly","location":null,"status":"passed","title":"Renders full <Tabs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders shortened <Tabs /> properly","location":null,"status":"passed","title":"Renders shortened <Tabs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Default active tab can be specified","location":null,"status":"passed","title":"Default active tab can be specified"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Changes tab and runs callback","location":null,"status":"passed","title":"Changes tab and runs callback"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not change tab and run callback when disabled","location":null,"status":"passed","title":"Does not change tab and run callback when disabled"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Changes tab programatically and runs callback","location":null,"status":"passed","title":"Changes tab programatically and runs callback"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Closable tab can be closed if not disabled","location":null,"status":"passed","title":"Closable tab can be closed if not disabled"}],"endTime":1668086776729,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tabs.test.tsx","startTime":1668086775009,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders sidebar","location":null,"status":"passed","title":"Renders sidebar"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Sidebar can be collapsed","location":null,"status":"passed","title":"Sidebar can be collapsed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Can open submenu manually","location":null,"status":"passed","title":"Can open submenu manually"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Submenu opens automatically if path matches","location":null,"status":"passed","title":"Submenu opens automatically if path matches"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Bookmarks can be added and removed","location":null,"status":"passed","title":"Bookmarks can be added and removed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Bookmarks clicks are not propagated through","location":null,"status":"passed","title":"Bookmarks clicks are not propagated through"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders item as <p> element with onClick","location":null,"status":"passed","title":"Renders item as <p> element with onClick"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders floating sidebar with item as <p> element with onClick, closes on item click","location":null,"status":"passed","title":"Renders floating sidebar with item as <p> element with onClick, closes on item click"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders custom item at the top","location":null,"status":"passed","title":"Renders custom item at the top"}],"endTime":1668086778398,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/sidebar.test.tsx","startTime":1668086776758,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> properly","location":null,"status":"passed","title":"Renders <Dropdown /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders disabled <Dropdown /> when children are empty","location":null,"status":"passed","title":"Renders disabled <Dropdown /> when children are empty"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> with custom component and custom handler","location":null,"status":"passed","title":"Renders <Dropdown /> with custom component and custom handler"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> is opened by default","location":null,"status":"passed","title":"Renders <Dropdown /> is opened by default"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders filterable <Dropdown /> and filters items correctly","location":null,"status":"passed","title":"Renders filterable <Dropdown /> and filters items correctly"}],"endTime":1668086780320,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/dropdown.test.tsx","startTime":1668086778419,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows popover on hover, hides on leave","location":null,"status":"passed","title":"Shows popover on hover, hides on leave"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows popover on click, hides only on click away","location":null,"status":"passed","title":"Shows popover on click, hides only on click away"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows custom content","location":null,"status":"passed","title":"Shows custom content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs callback function","location":null,"status":"passed","title":"Runs callback function"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the popover after a delay","location":null,"status":"passed","title":"Shows the popover after a delay"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not show the popover with delay if time not reached","location":null,"status":"passed","title":"Does not show the popover with delay if time not reached"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the hoverStay popover after a delay and stays, ","location":null,"status":"passed","title":"Shows the hoverStay popover after a delay and stays, "},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the hoverStay popover after a delay and stays, ","location":null,"status":"passed","title":"Shows the hoverStay popover after a delay and stays, "}],"endTime":1668086781465,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/popover.test.tsx","startTime":1668086780332,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Adds notifications and dismisses them automatically","location":null,"status":"passed","title":"Adds notifications and dismisses them automatically"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Adds a notification and updates it","location":null,"status":"passed","title":"Adds a notification and updates it"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a click event","location":null,"status":"passed","title":"Notification has a click event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a close event","location":null,"status":"passed","title":"Notification has a close event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a finish event","location":null,"status":"passed","title":"Notification has a finish event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Maximum of 5 notifications is shown at once","location":null,"status":"passed","title":"Maximum of 5 notifications is shown at once"}],"endTime":1668086782685,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/notifications.test.tsx","startTime":1668086781480,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> properly","location":null,"status":"passed","title":"Renders <Tag /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> group properly","location":null,"status":"passed","title":"Renders <Tag /> group properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> without remove button if disabled","location":null,"status":"passed","title":"Renders <Tag /> without remove button if disabled"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Fires onClick and onRemoveClick <Tag /> events","location":null,"status":"passed","title":"Fires onClick and onRemoveClick <Tag /> events"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> with the label key","location":null,"status":"passed","title":"Renders <Tag /> with the label key"}],"endTime":1668086783656,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tag.test.tsx","startTime":1668086782697,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> properly","location":null,"status":"passed","title":"Renders basic <Panel /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> with title properly","location":null,"status":"passed","title":"Renders basic <Panel /> with title properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> that is collapsed by default and can be expanded","location":null,"status":"passed","title":"Renders basic <Panel /> that is collapsed by default and can be expanded"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders closable <Panel /> properly","location":null,"status":"passed","title":"Renders closable <Panel /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Panel /> with actions","location":null,"status":"passed","title":"Renders <Panel /> with actions"}],"endTime":1668086784674,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/panel.test.tsx","startTime":1668086783668,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> properly","location":null,"status":"passed","title":"Renders <Button /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with size properly","location":null,"status":"passed","title":"Renders <Button /> with size properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with icon properly","location":null,"status":"passed","title":"Renders <Button /> with icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with intent properly","location":null,"status":"passed","title":"Renders <Button /> with intent properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with right icon properly","location":null,"status":"passed","title":"Renders <Button /> with right icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with icon and right icon properly","location":null,"status":"passed","title":"Renders <Button /> with icon and right icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with onClick function","location":null,"status":"passed","title":"Renders <Button /> with onClick function"}],"endTime":1668086785862,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/button.test.tsx","startTime":1668086784687,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Modal /> properly","location":null,"status":"passed","title":"Renders basic <Modal /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not renders <Modal /> if its not open","location":null,"status":"passed","title":"Does not renders <Modal /> if its not open"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Modal /> with custom dimensions","location":null,"status":"passed","title":"Renders <Modal /> with custom dimensions"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders confirmation <Modal /> ","location":null,"status":"passed","title":"Renders confirmation <Modal /> "}],"endTime":1668086786903,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/modal.test.tsx","startTime":1668086785874,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not render <Drawer /> if not open","location":null,"status":"passed","title":"Does not render <Drawer /> if not open"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders opened <Drawer /> properly","location":null,"status":"passed","title":"Renders opened <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders hidable <Drawer /> properly","location":null,"status":"passed","title":"Renders hidable <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders closable <Drawer /> properly","location":null,"status":"passed","title":"Renders closable <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Drawer /> with interactive backdrop","location":null,"status":"passed","title":"Renders <Drawer /> with interactive backdrop"}],"endTime":1668086787897,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/drawer.test.tsx","startTime":1668086786916,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Tree /> properly","location":null,"status":"passed","title":"Renders basic <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows textarea for <Tree /> properly","location":null,"status":"passed","title":"Shows textarea for <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Tree /> items can be expanded and collapsed","location":null,"status":"passed","title":"<Tree /> items can be expanded and collapsed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows types for <Tree /> properly","location":null,"status":"passed","title":"Shows types for <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tree /> with clickable items","location":null,"status":"passed","title":"Renders <Tree /> with clickable items"}],"endTime":1668086789733,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tree.test.tsx","startTime":1668086787911,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Collection /> properly","location":null,"status":"passed","title":"Renders basic <Collection /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Collection /> items can be filtered","location":null,"status":"passed","title":"<Collection /> items can be filtered"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Collection /> shows no data message when empty","location":null,"status":"passed","title":"<Collection /> shows no data message when empty"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Collection /> can be sorted","location":null,"status":"passed","title":"<Collection /> can be sorted"}],"endTime":1668086791455,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/collection.test.tsx","startTime":1668086789754,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Menu /> properly","location":null,"status":"passed","title":"Renders <Menu /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Menu /> item can be clicked","location":null,"status":"passed","title":"<Menu /> item can be clicked"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Menu /> item has right clickable button","location":null,"status":"passed","title":"<Menu /> item has right clickable button"}],"endTime":1668086792296,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/menu.test.tsx","startTime":1668086791467,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Input /> properly","location":null,"status":"passed","title":"Renders <Input /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Input /> with clear button properly","location":null,"status":"passed","title":"Renders <Input /> with clear button properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Disabled <Input /> cannot be cleared","location":null,"status":"passed","title":"Disabled <Input /> cannot be cleared"}],"endTime":1668086793101,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/input.test.tsx","startTime":1668086792310,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders full <Breadcrumbs /> properly","location":null,"status":"passed","title":"Renders full <Breadcrumbs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders shortened <Breadcrumbs /> properly","location":null,"status":"passed","title":"Renders shortened <Breadcrumbs /> properly"}],"endTime":1668086793772,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/breadcrumbs.test.tsx","startTime":1668086793121,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TextArea /> properly","location":null,"status":"passed","title":"Renders <TextArea /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TextArea /> with clear button properly","location":null,"status":"passed","title":"Renders <TextArea /> with clear button properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Disabled <TextArea /> cannot be cleared","location":null,"status":"passed","title":"Disabled <TextArea /> cannot be cleared"}],"endTime":1668086794476,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/textarea.test.tsx","startTime":1668086793783,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Message /> properly","location":null,"status":"passed","title":"Renders <Message /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs onFinish on message after duration","location":null,"status":"passed","title":"Runs onFinish on message after duration"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs onClose when closed","location":null,"status":"passed","title":"Runs onClose when closed"}],"endTime":1668086795309,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/messages.test.tsx","startTime":1668086794491,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Checkbox /> properly","location":null,"status":"passed","title":"Renders <Checkbox /> properly"}],"endTime":1668086796460,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/radiogroup.test.tsx","startTime":1668086795635,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders Layout properly","location":null,"status":"passed","title":"Renders Layout properly"}],"endTime":1668086797160,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/layout.test.tsx","startTime":1668086796482,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Icon /> properly","location":null,"status":"passed","title":"Renders <Icon /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders empty <Icon /> if icon does not exist","location":null,"status":"passed","title":"Renders empty <Icon /> if icon does not exist"}],"endTime":1668086798140,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/icon.test.tsx","startTime":1668086797171,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders Navbar properly","location":null,"status":"passed","title":"Renders Navbar properly"}],"endTime":1668086798711,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/navbar.test.tsx","startTime":1668086798161,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Checkbox /> properly","location":null,"status":"passed","title":"Renders <Checkbox /> properly"}],"endTime":1668086799379,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/checkbox.test.tsx","startTime":1668086798731,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TimeAgo /> data properly","location":null,"status":"passed","title":"Renders <TimeAgo /> data properly"}],"endTime":1668086799966,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/timeAgo.test.tsx","startTime":1668086799390,"status":"passed","summary":""}],"wasInterrupted":false}
|