@qoretechnologies/reqore 0.32.0 → 0.32.2
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/.github/workflows/tests.yml +3 -1
- package/__tests__/breadcrumbs.test.tsx +46 -28
- package/__tests__/button.test.tsx +18 -0
- package/__tests__/checkbox.test.tsx +19 -1
- package/__tests__/collection.test.tsx +9 -0
- package/__tests__/icon.test.tsx +19 -1
- package/__tests__/input.test.tsx +18 -0
- package/__tests__/messages.test.tsx +16 -0
- package/__tests__/modal.test.tsx +4 -4
- package/__tests__/notifications.test.tsx +6 -6
- package/__tests__/panel.test.tsx +19 -1
- package/__tests__/textarea.test.tsx +18 -0
- package/__tests__/tree.test.tsx +3 -1
- package/dist/components/Breadcrumbs/item.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/item.js +6 -2
- package/dist/components/Breadcrumbs/item.js.map +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +18 -4
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +8 -4
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Collection/index.d.ts +2 -1
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +15 -12
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.js +2 -2
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/Comment/index.d.ts +0 -1
- package/dist/components/Comment/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +1 -1
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/Drawer/index.d.ts +1 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Dropdown/item.d.ts +0 -1
- package/dist/components/Dropdown/item.d.ts.map +1 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +8 -4
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +4 -4
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InputClearButton/index.d.ts +0 -1
- package/dist/components/InputClearButton/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +2 -1
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/Menu/item.d.ts +1 -1
- package/dist/components/Menu/item.d.ts.map +1 -1
- package/dist/components/Menu/item.js +3 -6
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +6 -2
- package/dist/components/Message/index.js.map +1 -1
- package/dist/components/Modal/index.d.ts +0 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Panel/index.d.ts +1 -0
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +13 -9
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Panel/panel.screenshot.d.ts +0 -1
- package/dist/components/Panel/panel.screenshot.d.ts.map +1 -1
- package/dist/components/Sidebar/item.d.ts +0 -1
- package/dist/components/Sidebar/item.d.ts.map +1 -1
- package/dist/components/Sidebar/item.js +1 -3
- package/dist/components/Sidebar/item.js.map +1 -1
- package/dist/components/Spinner/index.d.ts +0 -1
- package/dist/components/Spinner/index.d.ts.map +1 -1
- package/dist/components/Table/header.d.ts +0 -1
- package/dist/components/Table/header.d.ts.map +1 -1
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +7 -4
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +7 -6
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/components/Tree/index.d.ts +0 -1
- package/dist/components/Tree/index.d.ts.map +1 -1
- package/dist/components/Tree/index.js +2 -4
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/containers/PopoverProvider.d.ts.map +1 -1
- package/dist/containers/PopoverProvider.js +2 -2
- package/dist/containers/PopoverProvider.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +4 -0
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/ThemeProvider.d.ts +1 -2
- package/dist/containers/ThemeProvider.d.ts.map +1 -1
- package/dist/containers/ThemeProvider.js +3 -3
- package/dist/containers/ThemeProvider.js.map +1 -1
- package/dist/context/PopoverContext.d.ts +1 -2
- package/dist/context/PopoverContext.d.ts.map +1 -1
- package/dist/context/PopoverContext.js +2 -2
- package/dist/context/PopoverContext.js.map +1 -1
- package/dist/context/ReqoreContext.d.ts +3 -2
- package/dist/context/ReqoreContext.d.ts.map +1 -1
- package/dist/context/ReqoreContext.js +5 -3
- package/dist/context/ReqoreContext.js.map +1 -1
- package/dist/context/ThemeContext.d.ts +1 -2
- package/dist/context/ThemeContext.d.ts.map +1 -1
- package/dist/context/ThemeContext.js +2 -2
- package/dist/context/ThemeContext.js.map +1 -1
- package/dist/hooks/useLatestZIndex.d.ts.map +1 -1
- package/dist/hooks/useLatestZIndex.js +3 -2
- package/dist/hooks/useLatestZIndex.js.map +1 -1
- package/dist/hooks/usePopover.d.ts +0 -1
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js +4 -3
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/hooks/useReqore.js +2 -2
- package/dist/hooks/useReqore.js.map +1 -1
- package/dist/hooks/useReqoreContext.d.ts +3 -0
- package/dist/hooks/useReqoreContext.d.ts.map +1 -0
- package/dist/hooks/useReqoreContext.js +19 -0
- package/dist/hooks/useReqoreContext.js.map +1 -0
- package/dist/hooks/useReqoreEffect.js +2 -5
- package/dist/hooks/useReqoreEffect.js.map +1 -1
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useTheme.js +20 -20
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +18 -16
- package/src/components/Breadcrumbs/item.tsx +7 -3
- package/src/components/Button/index.tsx +25 -7
- package/src/components/Checkbox/index.tsx +9 -5
- package/src/components/Collection/index.tsx +21 -9
- package/src/components/Collection/item.tsx +3 -3
- package/src/components/ControlGroup/index.tsx +1 -1
- package/src/components/Drawer/index.tsx +4 -4
- package/src/components/Icon/index.tsx +9 -5
- package/src/components/Input/index.tsx +5 -9
- package/src/components/InternalPopover/index.tsx +2 -1
- package/src/components/Menu/item.tsx +6 -9
- package/src/components/Message/index.tsx +6 -2
- package/src/components/Panel/index.tsx +14 -7
- package/src/components/Sidebar/item.tsx +2 -4
- package/src/components/Tag/index.tsx +9 -6
- package/src/components/Textarea/index.tsx +6 -8
- package/src/components/Tree/index.tsx +5 -8
- package/src/containers/PopoverProvider.tsx +2 -2
- package/src/containers/ReqoreProvider.tsx +5 -1
- package/src/containers/ThemeProvider.tsx +3 -13
- package/src/context/PopoverContext.tsx +1 -1
- package/src/context/ReqoreContext.tsx +4 -1
- package/src/context/ThemeContext.tsx +1 -1
- package/src/hooks/useLatestZIndex.ts +5 -3
- package/src/hooks/usePopover.tsx +4 -3
- package/src/hooks/useReqore.ts +1 -1
- package/src/hooks/useReqoreContext.ts +16 -0
- package/src/hooks/useReqoreEffect.ts +3 -3
- package/src/hooks/useTheme.ts +21 -17
- package/src/index.tsx +1 -0
- package/src/stories/Button/Button.stories.tsx +7 -0
- package/src/stories/Collection/Collection.stories.tsx +6 -3
- package/src/stories/Drawer/Drawer.stories.tsx +4 -3
- package/src/stories/Modal/Modal.stories.tsx +3 -4
- package/src/stories/Notifications/Interactive.stories.tsx +3 -4
- package/src/stories/Panel/Panel.stories.tsx +1 -0
- package/tests.json +1 -1
package/dist/hooks/useReqore.js
CHANGED
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports.useReqore = void 0;
|
|
7
|
-
var
|
|
7
|
+
var use_context_selector_1 = require("use-context-selector");
|
|
8
8
|
var ReqoreContext_1 = __importDefault(require("../context/ReqoreContext"));
|
|
9
9
|
var useReqore = function () {
|
|
10
|
-
var reqore = (0,
|
|
10
|
+
var reqore = (0, use_context_selector_1.useContext)(ReqoreContext_1["default"]);
|
|
11
11
|
if (!reqore) {
|
|
12
12
|
throw new Error('Reqore context is not defined');
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReqore.js","sourceRoot":"","sources":["../../src/hooks/useReqore.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"useReqore.js","sourceRoot":"","sources":["../../src/hooks/useReqore.ts"],"names":[],"mappings":";;;;;;AAAA,6DAAkD;AAClD,2EAAyE;AAElE,IAAM,SAAS,GAAG;IACvB,IAAM,MAAM,GAAG,IAAA,iCAAU,EAAC,0BAAa,CAAC,CAAC;IAEzC,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;KAClD;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AARW,QAAA,SAAS,aAQpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReqoreContext.d.ts","sourceRoot":"","sources":["../../src/hooks/useReqoreContext.ts"],"names":[],"mappings":"AACA,OAAsB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEzE,eAAO,MAAM,iBAAiB,oEAY7B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.useReqoreProperty = void 0;
|
|
7
|
+
var use_context_selector_1 = require("use-context-selector");
|
|
8
|
+
var ReqoreContext_1 = __importDefault(require("../context/ReqoreContext"));
|
|
9
|
+
var useReqoreProperty = function (property) {
|
|
10
|
+
var contextProperty = (0, use_context_selector_1.useContextSelector)(ReqoreContext_1["default"], function (value) {
|
|
11
|
+
if (!(property in value)) {
|
|
12
|
+
throw new Error("Reqore context property ".concat(property, " not found"));
|
|
13
|
+
}
|
|
14
|
+
return value[property];
|
|
15
|
+
});
|
|
16
|
+
return contextProperty;
|
|
17
|
+
};
|
|
18
|
+
exports.useReqoreProperty = useReqoreProperty;
|
|
19
|
+
//# sourceMappingURL=useReqoreContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReqoreContext.js","sourceRoot":"","sources":["../../src/hooks/useReqoreContext.ts"],"names":[],"mappings":";;;;;;AAAA,6DAA0D;AAC1D,2EAAyE;AAElE,IAAM,iBAAiB,GAAG,UAC/B,QAAW;IAEX,IAAM,eAAe,GAAG,IAAA,yCAAkB,EAAC,0BAAa,EAAE,UAAC,KAAK;QAC9D,IAAI,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,kCAA2B,QAAQ,eAAY,CAAC,CAAC;SAClE;QAED,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B"}
|
|
@@ -10,15 +10,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
13
|
exports.__esModule = true;
|
|
17
14
|
exports.useReqoreEffect = void 0;
|
|
18
15
|
var react_1 = require("react");
|
|
19
|
-
var
|
|
16
|
+
var useTheme_1 = require("./useTheme");
|
|
20
17
|
var useReqoreEffect = function (component, theme, effect) {
|
|
21
|
-
var _theme = (0,
|
|
18
|
+
var _theme = (0, useTheme_1.useReqoreTheme)();
|
|
22
19
|
// Return the effect if the component is not defined in the theme
|
|
23
20
|
if (!theme[component]) {
|
|
24
21
|
return effect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReqoreEffect.js","sourceRoot":"","sources":["../../src/hooks/useReqoreEffect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useReqoreEffect.js","sourceRoot":"","sources":["../../src/hooks/useReqoreEffect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+BAAgC;AAOhC,uCAA4C;AAErC,IAAM,eAAe,GAAG,UAC7B,SAAoB,EACpB,KAAmB,EACnB,MAAsB;IAEtB,IAAI,MAAM,GAAiB,IAAA,yBAAc,GAAE,CAAC;IAE5C,iEAAiE;IACjE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;QACrB,OAAO,MAAM,CAAC;KACf;IAED,IAAI,KAAK,EAAE;QACT,2CAA2C;QAC3C,MAAM,GAAG,KAAK,CAAC;KAChB;IAED,IAAM,MAAM,GAAoB,IAAA,eAAO,EAAC;QACtC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9D,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAErB,IAAM,OAAO,GAA0C,IAAA,eAAO,EAAC;QAC7D,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC;IACnC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAErB,IAAM,OAAO,GAAG,IAAA,eAAO,EAAC;QACtB,6BACK,MAAM,KACT,QAAQ,aACN,MAAM,QAAA,EACN,OAAO,SAAA,IAGJ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,KAErB;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9B,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAvCW,QAAA,eAAe,mBAuC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIjE,MAAM,WAAW,kBAAmB,SAAQ,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACtF,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,kBAAkB,CAAC;QAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,aACf,MAAM,gBACH,kBAAkB,WACtB,aAAa,eACV,SAAS,GAAG,eAAe,KACtC,
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIjE,MAAM,WAAW,kBAAmB,SAAQ,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACtF,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,kBAAkB,CAAC;QAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,aACf,MAAM,gBACH,kBAAkB,WACtB,aAAa,eACV,SAAS,GAAG,eAAe,KACtC,YA0BF,CAAC"}
|
package/dist/hooks/useTheme.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
exports.__esModule = true;
|
|
6
3
|
exports.useReqoreTheme = void 0;
|
|
7
4
|
var lodash_1 = require("lodash");
|
|
8
5
|
var react_1 = require("react");
|
|
9
|
-
var ThemeContext_1 = __importDefault(require("../context/ThemeContext"));
|
|
10
6
|
var colors_1 = require("../helpers/colors");
|
|
7
|
+
var useReqoreContext_1 = require("./useReqoreContext");
|
|
11
8
|
var useReqoreTheme = function (element, customTheme, intent, intentsKey) {
|
|
12
|
-
var _a;
|
|
13
9
|
if (customTheme === void 0) { customTheme = {}; }
|
|
14
10
|
if (intentsKey === void 0) { intentsKey = 'intents'; }
|
|
15
|
-
var theme = (0,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_customTheme
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
var theme = (0, useReqoreContext_1.useReqoreProperty)('theme');
|
|
12
|
+
var finalTheme = (0, react_1.useMemo)(function () {
|
|
13
|
+
var _a;
|
|
14
|
+
if (!element) {
|
|
15
|
+
return theme;
|
|
16
|
+
}
|
|
17
|
+
var _customTheme = (0, lodash_1.cloneDeep)(customTheme);
|
|
18
|
+
if (_customTheme.main) {
|
|
19
|
+
_customTheme.main = (0, colors_1.getColorFromMaybeString)(theme, customTheme.main);
|
|
20
|
+
}
|
|
21
|
+
if ((_a = _customTheme.text) === null || _a === void 0 ? void 0 : _a.color) {
|
|
22
|
+
_customTheme.text.color = (0, colors_1.getColorFromMaybeString)(theme, customTheme.text.color);
|
|
23
|
+
}
|
|
24
|
+
if (element === 'main' && intent) {
|
|
25
|
+
_customTheme.main = theme[intentsKey][intent];
|
|
26
|
+
}
|
|
27
|
+
return (0, colors_1.mergeThemes)(element, theme, _customTheme);
|
|
28
|
+
}, [JSON.stringify(theme), element, JSON.stringify(customTheme), intent, intentsKey]);
|
|
29
|
+
return finalTheme;
|
|
30
30
|
};
|
|
31
31
|
exports.useReqoreTheme = useReqoreTheme;
|
|
32
32
|
//# sourceMappingURL=useTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.js","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTheme.js","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,+BAAgC;AAGhC,4CAAyE;AACzE,uDAAuD;AAWhD,IAAM,cAAc,GAAG,UAC5B,OAAgB,EAChB,WAAoC,EACpC,MAAsB,EACtB,UAAmD;IAFnD,4BAAA,EAAA,gBAAoC;IAEpC,2BAAA,EAAA,sBAAmD;IAEnD,IAAM,KAAK,GAAiB,IAAA,oCAAiB,EAAC,OAAO,CAAC,CAAC;IAEvD,IAAM,UAAU,GAAG,IAAA,eAAO,EAAC;;QACzB,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,KAAK,CAAC;SACd;QAED,IAAI,YAAY,GAAuB,IAAA,kBAAS,EAAC,WAAW,CAAC,CAAC;QAE9D,IAAI,YAAY,CAAC,IAAI,EAAE;YACrB,YAAY,CAAC,IAAI,GAAG,IAAA,gCAAuB,EAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;SACtE;QAED,IAAI,MAAA,YAAY,CAAC,IAAI,0CAAE,KAAK,EAAE;YAC5B,YAAY,CAAC,IAAI,CAAC,KAAK,GAAG,IAAA,gCAAuB,EAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClF;QAED,IAAI,OAAO,KAAK,MAAM,IAAI,MAAM,EAAE;YAChC,YAAY,CAAC,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;SAC/C;QAED,OAAO,IAAA,oBAAW,EAAC,OAAO,EAAE,KAAK,EAAE,YAAY,CAAiB,CAAC;IACnE,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAEtF,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AA/BW,QAAA,cAAc,kBA+BzB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -54,5 +54,6 @@ export { default as ReqoreContext } from './context/ReqoreContext';
|
|
|
54
54
|
export { default as ReqoreThemeContext } from './context/ThemeContext';
|
|
55
55
|
export { default as useLatestZIndex } from './hooks/useLatestZIndex';
|
|
56
56
|
export { useReqore } from './hooks/useReqore';
|
|
57
|
+
export { useReqoreProperty } from './hooks/useReqoreContext';
|
|
57
58
|
export { useReqoreTheme } from './hooks/useTheme';
|
|
58
59
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACjF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AwB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
12
12
|
}));
|
|
13
13
|
exports.__esModule = true;
|
|
14
14
|
exports.ReqoreTable = exports.ReqoreVerticalSpacer = exports.ReqoreSpacer = exports.ReqoreHorizontalSpacer = exports.ReqoreSidebar = exports.ReqoreRadioGroup = exports.ReqorePopover = exports.ReqoreParagraph = exports.ReqoreP = exports.ReqorePanel = exports.ReqoreNotification = exports.ReqoreNotificationsWrapper = exports.ReqoreNavbarItem = exports.ReqoreNavbarGroup = exports.ReqoreNavbarDivider = exports.ReqoreHeader = exports.ReqoreFooter = exports.ReqoreMultiSelect = exports.ReqoreModal = exports.ReqoreMessage = exports.ReqoreMenuItem = exports.ReqoreMenuDivider = exports.ReqoreMenu = exports.ReqoreLayoutContent = exports.ReqoreInput = exports.ReqoreIcon = exports.ReqoreHeading = exports.ReqoreH6 = exports.ReqoreH5 = exports.ReqoreH4 = exports.ReqoreH3 = exports.ReqoreH2 = exports.ReqoreH1 = exports.ReqoreTextEffect = exports.ReqoreEffect = exports.ReqoreDropdownItem = exports.ReqoreDropdownDivider = exports.ReqoreDropdown = exports.ReqoreDrawer = exports.ReqoreControlGroup = exports.ReqoreContent = exports.ReqoreCommentFeed = exports.ReqoreComment = exports.ReqoreColumn = exports.ReqoreColumns = exports.ReqoreCollection = exports.ReqoreCheckbox = exports.ReqoreButton = exports.ReqoreBreadcrumbsItem = exports.ReqoreBreadcrumbs = void 0;
|
|
15
|
-
exports.useReqoreTheme = exports.useReqore = exports.useLatestZIndex = exports.ReqoreThemeContext = exports.ReqoreContext = exports.ReqoreUIProvider = exports.ReqoreNotifications = exports.ReqoreIntents = exports.ReqoreSizes = exports.ReqoreColors = exports.ReqoreTree = exports.ReqoreTimeAgo = exports.ReqoreTextarea = exports.ReqoreTagGroup = exports.ReqoreTag = exports.ReqoreTabsList = exports.ReqoreTabsListItem = exports.ReqoreTabsContent = exports.ReqoreTabs = void 0;
|
|
15
|
+
exports.useReqoreTheme = exports.useReqoreProperty = exports.useReqore = exports.useLatestZIndex = exports.ReqoreThemeContext = exports.ReqoreContext = exports.ReqoreUIProvider = exports.ReqoreNotifications = exports.ReqoreIntents = exports.ReqoreSizes = exports.ReqoreColors = exports.ReqoreTree = exports.ReqoreTimeAgo = exports.ReqoreTextarea = exports.ReqoreTagGroup = exports.ReqoreTag = exports.ReqoreTabsList = exports.ReqoreTabsListItem = exports.ReqoreTabsContent = exports.ReqoreTabs = void 0;
|
|
16
16
|
var Breadcrumbs_1 = require("./components/Breadcrumbs");
|
|
17
17
|
__createBinding(exports, Breadcrumbs_1, "default", "ReqoreBreadcrumbs");
|
|
18
18
|
var item_1 = require("./components/Breadcrumbs/item");
|
|
@@ -137,6 +137,8 @@ var useLatestZIndex_1 = require("./hooks/useLatestZIndex");
|
|
|
137
137
|
__createBinding(exports, useLatestZIndex_1, "default", "useLatestZIndex");
|
|
138
138
|
var useReqore_1 = require("./hooks/useReqore");
|
|
139
139
|
__createBinding(exports, useReqore_1, "useReqore");
|
|
140
|
+
var useReqoreContext_1 = require("./hooks/useReqoreContext");
|
|
141
|
+
__createBinding(exports, useReqoreContext_1, "useReqoreProperty");
|
|
140
142
|
var useTheme_1 = require("./hooks/useTheme");
|
|
141
143
|
__createBinding(exports, useTheme_1, "useReqoreTheme");
|
|
142
144
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wDAAwE;AAA/D,wEAA4B;AACrC,sDAAiF;AAAxE,qEAAgC;AACzC,8CAA8D;AAArD,8DAAuB;AAChC,kDAAkE;AAAzD,kEAAyB;AAClC,sDAA2D;AAAlD,2DAAgB;AACzB,gDAAqD;AAA5C,qDAAa;AACtB,sDAA2D;AAAlD,mDAAY;AACrB,gDAAqD;AAA5C,qDAAa;AACtB,wDAA6D;AAApD,6DAAiB;AAC1B,gDAAgE;AAAvD,gEAAwB;AACjC,0DAA0E;AAAjE,0EAA6B;AACtC,8CAAmD;AAA1C,mDAAY;AACrB,kDAAkE;AAAzD,kEAAyB;AAClC,mDAAuF;AAA9E,0DAAqB;AAAE,uDAAkB;AAClD,8CAAqE;AAA5D,mDAAY;AAAE,uDAAgB;AACvC,8CAQ6B;AAP3B,+CAAQ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qC;AAC9C,wEAAwF;AAA/E,0EAA6B;AACtC,4CAAiD;AAAxC,iDAAW;AACpB,oDAA6E;AAApE,iDAAO;AAAE,oEAA0B;AAC5C,gDAAgE;AAAvD,gEAAwB;AACjC,sDAAsE;AAA7D,sEAA2B;AACpC,gDAAgE;AAAvD,gEAAwB;AACjC,8CAAiG;AAAxF,6DAAsB;AAAE,mDAAY;AAAE,2DAAoB;AACnE,4CAA4D;AAAnD,4DAAsB;AAC/B,0CAA0D;AAAjD,0DAAqB;AAC9B,qDAAyE;AAAhE,oEAA4B;AACrC,+CAAuE;AAA9D,kEAA6B;AACtC,+CAAmE;AAA1D,8DAAyB;AAClC,wCAAwD;AAA/C,wDAAoB;AAC7B,gDAAmE;AAA1D,+DAAyB;AAClC,kDAAkE;AAAzD,kEAAyB;AAClC,gDAAgE;AAAvD,gEAAwB;AACjC,0CAA+C;AAAtC,+CAAU;AACnB,6CAA4D;AAAnD,6DAAsB;AAC/B,2CAAgD;AAAvC,iDAAW;AACpB,2CAAkD;AAAzC,mDAAa;AACtB,8DAA6E;AAApE,6EAA8B;AACvC,sDAAsE;AAA7D,sEAA2B;AACpC,yDAAmE;AAA1D,sEAAwB;AACjC,uDAAuE;AAA9D,0EAA6B;AACtC,2DAAqE;AAA5D,0EAA0B;AACnC,+CAA8C;AAArC,mDAAS;AAClB,6DAA6D;AAApD,kEAAiB;AAC1B,6CAAkD;AAAzC,uDAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qoretechnologies/reqore",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.2",
|
|
4
4
|
"description": "ReQore is a highly theme-able and modular UI library for React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"test:ci": "./node_modules/.bin/jest --silent --json --outputFile=tests.json",
|
|
11
11
|
"build": "./node_modules/typescript/bin/tsc --project tsconfig.prod.json",
|
|
12
12
|
"build:test": "./node_modules/typescript/bin/tsc --noEmit",
|
|
13
|
+
"build:test:prod": "./node_modules/typescript/bin/tsc --project tsconfig.prod.json --noEmit",
|
|
13
14
|
"storybook": "start-storybook -p 6007 --no-dll",
|
|
14
15
|
"init-storybook": "yarn test:ci && yarn storybook",
|
|
15
16
|
"build-storybook": "build-storybook"
|
|
@@ -56,8 +57,8 @@
|
|
|
56
57
|
"@types/jest": "^26.0.19",
|
|
57
58
|
"@types/lodash": "^4.14.166",
|
|
58
59
|
"@types/node": "^14.14.14",
|
|
59
|
-
"@types/react": "^
|
|
60
|
-
"@types/react-dom": "^
|
|
60
|
+
"@types/react": "^18.0.28",
|
|
61
|
+
"@types/react-dom": "^18.0.11",
|
|
61
62
|
"babel-jest": "^26.6.3",
|
|
62
63
|
"babel-loader": "^8.2.2",
|
|
63
64
|
"chromatic": "^6.3.3",
|
|
@@ -66,13 +67,12 @@
|
|
|
66
67
|
"npm-cli-login": "^0.1.1",
|
|
67
68
|
"playwright": "^1.16.3",
|
|
68
69
|
"pre-push": "^0.1.4",
|
|
69
|
-
"react": "^
|
|
70
|
-
"react-dom": "^
|
|
70
|
+
"react": "^18.2.0",
|
|
71
|
+
"react-dom": "^18.2.0",
|
|
71
72
|
"react-intersection-observer": "^9.4.2",
|
|
72
|
-
"react-test-renderer": "^
|
|
73
|
+
"react-test-renderer": "^18.2.0",
|
|
73
74
|
"storybook-addon-outline": "^1.4.2",
|
|
74
75
|
"storybook-dark-mode": "^1.1.2",
|
|
75
|
-
"styled-components": "^5.2.1",
|
|
76
76
|
"ts-jest": "^26.4.4",
|
|
77
77
|
"ts-node": "^9.1.1",
|
|
78
78
|
"typescript": "^4.7.3",
|
|
@@ -83,20 +83,22 @@
|
|
|
83
83
|
"react-dom": "^18.2.0"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@popperjs/core": "^2.
|
|
87
|
-
"@react-spring/web": "^9.
|
|
86
|
+
"@popperjs/core": "^2.11.6",
|
|
87
|
+
"@react-spring/web": "^9.6.1",
|
|
88
88
|
"classnames": "^2.2.6",
|
|
89
89
|
"epoch-timeago": "^1.1.9",
|
|
90
|
-
"lodash": "^4.17.
|
|
91
|
-
"polished": "^4.
|
|
90
|
+
"lodash": "^4.17.21",
|
|
91
|
+
"polished": "^4.2.2",
|
|
92
92
|
"re-resizable": "^6.9.0",
|
|
93
|
-
"react-icons": "^4.
|
|
94
|
-
"react-popper": "^2.
|
|
93
|
+
"react-icons": "^4.7.1",
|
|
94
|
+
"react-popper": "^2.3.0",
|
|
95
95
|
"react-scrollbar": "^0.5.6",
|
|
96
|
-
"react-use": "^
|
|
96
|
+
"react-use": "^17.4.0",
|
|
97
97
|
"react-window": "^1.8.6",
|
|
98
|
+
"scheduler": "^0.23.0",
|
|
98
99
|
"shortid": "^2.2.16",
|
|
99
|
-
"styled-components": "^5.
|
|
100
|
-
"thenby": "^1.3.4"
|
|
100
|
+
"styled-components": "^5.3.6",
|
|
101
|
+
"thenby": "^1.3.4",
|
|
102
|
+
"use-context-selector": "^1.4.1"
|
|
101
103
|
}
|
|
102
104
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
1
|
+
import { forwardRef, useState } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { IReqoreBreadcrumbItem } from '.';
|
|
4
4
|
import { PADDING_FROM_SIZE, TEXT_FROM_SIZE, TSizes } from '../../constants/sizes';
|
|
@@ -124,13 +124,17 @@ const ReqoreBreadcrumbsItem = forwardRef<HTMLDivElement, IReqoreBreadcrumbItemPr
|
|
|
124
124
|
ref
|
|
125
125
|
) => {
|
|
126
126
|
const { targetRef } = useCombinedRefs(ref);
|
|
127
|
+
const [itemRef, setItemRef] = useState(undefined);
|
|
127
128
|
const theme = useReqoreTheme('breadcrumbs', customTheme);
|
|
128
129
|
|
|
129
|
-
useTooltip(
|
|
130
|
+
useTooltip(itemRef, tooltip);
|
|
130
131
|
|
|
131
132
|
return (
|
|
132
133
|
<StyledBreadcrumbItem
|
|
133
|
-
ref={
|
|
134
|
+
ref={(ref) => {
|
|
135
|
+
targetRef.current = ref;
|
|
136
|
+
setItemRef(ref);
|
|
137
|
+
}}
|
|
134
138
|
active={active}
|
|
135
139
|
interactive={interactive || !!props?.onClick}
|
|
136
140
|
className='reqore-breadcrumbs-item'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { rgba } from 'polished';
|
|
2
|
-
import React, { forwardRef, memo, useCallback,
|
|
2
|
+
import React, { forwardRef, memo, useCallback, useState } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
4
|
import {
|
|
5
5
|
ICON_FROM_SIZE,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
TSizes,
|
|
11
11
|
} from '../../constants/sizes';
|
|
12
12
|
import { IReqoreCustomTheme, IReqoreTheme } from '../../constants/theme';
|
|
13
|
-
import ReqoreContext from '../../context/ReqoreContext';
|
|
14
13
|
import { changeLightness, getReadableColor, getReadableColorFrom } from '../../helpers/colors';
|
|
15
14
|
import { alignToFlexAlign, getOneLessSize } from '../../helpers/utils';
|
|
16
15
|
import { useCombinedRefs } from '../../hooks/useCombinedRefs';
|
|
16
|
+
import { useReqoreProperty } from '../../hooks/useReqoreContext';
|
|
17
17
|
import { useReqoreEffect } from '../../hooks/useReqoreEffect';
|
|
18
18
|
import { useReqoreTheme } from '../../hooks/useTheme';
|
|
19
19
|
import { useTooltip } from '../../hooks/useTooltip';
|
|
@@ -398,12 +398,13 @@ const ReqoreButton = memo(
|
|
|
398
398
|
ref
|
|
399
399
|
) => {
|
|
400
400
|
const { targetRef } = useCombinedRefs(ref);
|
|
401
|
-
const
|
|
401
|
+
const [buttonRef, setButtonRef] = useState<HTMLButtonElement>(undefined);
|
|
402
|
+
const animations = useReqoreProperty('animations');
|
|
402
403
|
const theme = useReqoreTheme('main', customTheme, intent);
|
|
403
404
|
const fixedEffect = useReqoreEffect('buttons', theme, effect);
|
|
404
405
|
|
|
405
406
|
/* A custom hook that is used to add a tooltip to the button. */
|
|
406
|
-
useTooltip(
|
|
407
|
+
useTooltip(buttonRef, tooltip);
|
|
407
408
|
|
|
408
409
|
// If color or intent was specified, set the color
|
|
409
410
|
const customColor = intent ? theme.main : changeLightness(theme.main, 0.07);
|
|
@@ -428,7 +429,10 @@ const ReqoreButton = memo(
|
|
|
428
429
|
tabindex={rest.disabled ? -1 : 0}
|
|
429
430
|
as='button'
|
|
430
431
|
theme={theme}
|
|
431
|
-
ref={
|
|
432
|
+
ref={(ref) => {
|
|
433
|
+
targetRef.current = ref;
|
|
434
|
+
setButtonRef(ref);
|
|
435
|
+
}}
|
|
432
436
|
fluid={fluid}
|
|
433
437
|
fixed={fixed}
|
|
434
438
|
maxWidth={maxWidth}
|
|
@@ -450,7 +454,14 @@ const ReqoreButton = memo(
|
|
|
450
454
|
icon={icon}
|
|
451
455
|
size={size}
|
|
452
456
|
color={leftIconColor || iconColor}
|
|
453
|
-
style={
|
|
457
|
+
style={
|
|
458
|
+
textAlign !== 'left'
|
|
459
|
+
? {
|
|
460
|
+
marginRight: 'auto',
|
|
461
|
+
marginLeft: textAlign === 'center' ? 'auto' : undefined,
|
|
462
|
+
}
|
|
463
|
+
: undefined
|
|
464
|
+
}
|
|
454
465
|
/>
|
|
455
466
|
{children || badge || rightIcon ? (
|
|
456
467
|
<ReqoreSpacer width={PADDING_FROM_SIZE[size]} />
|
|
@@ -497,7 +508,14 @@ const ReqoreButton = memo(
|
|
|
497
508
|
<ReqoreIcon
|
|
498
509
|
icon={rightIcon}
|
|
499
510
|
size={size}
|
|
500
|
-
style={
|
|
511
|
+
style={
|
|
512
|
+
textAlign !== 'right'
|
|
513
|
+
? {
|
|
514
|
+
marginLeft: 'auto',
|
|
515
|
+
marginRight: textAlign === 'center' ? 'auto' : undefined,
|
|
516
|
+
}
|
|
517
|
+
: undefined
|
|
518
|
+
}
|
|
501
519
|
color={rightIconColor || iconColor}
|
|
502
520
|
/>
|
|
503
521
|
</>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { rgba } from 'polished';
|
|
2
|
-
import React, { forwardRef, useMemo } from 'react';
|
|
2
|
+
import React, { forwardRef, useMemo, useState } from 'react';
|
|
3
3
|
import { useMeasure } from 'react-use';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
import { PADDING_FROM_SIZE, SIZE_TO_PX, TEXT_FROM_SIZE, TSizes } from '../../constants/sizes';
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
changeLightness,
|
|
9
9
|
getNthGradientColor,
|
|
10
10
|
getReadableColor,
|
|
11
|
-
getReadableColorFrom
|
|
11
|
+
getReadableColorFrom,
|
|
12
12
|
} from '../../helpers/colors';
|
|
13
13
|
import { getOneLessSize } from '../../helpers/utils';
|
|
14
14
|
import { useCombinedRefs } from '../../hooks/useCombinedRefs';
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
IReqoreReadOnly,
|
|
22
22
|
IWithReqoreCustomTheme,
|
|
23
23
|
IWithReqoreEffect,
|
|
24
|
-
TReqoreTooltipProp
|
|
24
|
+
TReqoreTooltipProp,
|
|
25
25
|
} from '../../types/global';
|
|
26
26
|
import { IReqoreIconName } from '../../types/icons';
|
|
27
27
|
import { IReqoreEffect, ReqoreTextEffect, StyledEffect, StyledTextEffect } from '../Effect';
|
|
@@ -196,11 +196,12 @@ const Checkbox = forwardRef<HTMLDivElement, IReqoreCheckboxProps>(
|
|
|
196
196
|
ref
|
|
197
197
|
) => {
|
|
198
198
|
const { targetRef } = useCombinedRefs(ref);
|
|
199
|
+
const [itemRef, setItemRef] = useState<HTMLDivElement>(undefined);
|
|
199
200
|
const [offRef, { width: offWidth }] = useMeasure();
|
|
200
201
|
const [onRef, { width: onWidth }] = useMeasure();
|
|
201
202
|
const theme = useReqoreTheme('main', customTheme, intent);
|
|
202
203
|
|
|
203
|
-
useTooltip(
|
|
204
|
+
useTooltip(itemRef, tooltip);
|
|
204
205
|
|
|
205
206
|
const width = useMemo(() => {
|
|
206
207
|
if ((!image && !onText) || !offText) return undefined;
|
|
@@ -217,7 +218,10 @@ const Checkbox = forwardRef<HTMLDivElement, IReqoreCheckboxProps>(
|
|
|
217
218
|
return (
|
|
218
219
|
<StyledCheckbox
|
|
219
220
|
{...rest}
|
|
220
|
-
ref={
|
|
221
|
+
ref={(ref) => {
|
|
222
|
+
targetRef.current = ref;
|
|
223
|
+
setItemRef(ref);
|
|
224
|
+
}}
|
|
221
225
|
theme={theme}
|
|
222
226
|
size={size}
|
|
223
227
|
disabled={disabled}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { size } from 'lodash';
|
|
2
2
|
import { useMemo, useState } from 'react';
|
|
3
|
-
import { useUpdateEffect } from 'react-use';
|
|
3
|
+
import { useDebounce, useUpdateEffect } from 'react-use';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
import { PADDING_FROM_SIZE } from '../../constants/sizes';
|
|
6
6
|
import { IReqoreIconName } from '../../types/icons';
|
|
@@ -46,6 +46,7 @@ export interface IReqoreCollectionProps
|
|
|
46
46
|
showAs?: 'list' | 'grid';
|
|
47
47
|
showSelectedFirst?: boolean;
|
|
48
48
|
selectedIcon?: IReqoreIconName;
|
|
49
|
+
searchDelay?: number;
|
|
49
50
|
|
|
50
51
|
childrenBefore?: React.ReactNode;
|
|
51
52
|
childrenAfter?: React.ReactNode;
|
|
@@ -93,6 +94,7 @@ export const ReqoreCollection = ({
|
|
|
93
94
|
onQueryChange,
|
|
94
95
|
childrenBefore,
|
|
95
96
|
childrenAfter,
|
|
97
|
+
searchDelay = 300,
|
|
96
98
|
emptyMessage = 'No data in this collection, try changing your search query or filters',
|
|
97
99
|
sortButtonTooltip = (sort) => (sort === 'desc' ? 'Sort ascending' : 'Sort descending'),
|
|
98
100
|
displayButtonTooltip = (display) => (display === 'grid' ? 'Show as list' : 'Show as grid'),
|
|
@@ -102,6 +104,7 @@ export const ReqoreCollection = ({
|
|
|
102
104
|
const [_showAs, setShowAs] = useState<'list' | 'grid'>(showAs);
|
|
103
105
|
const [sort, setSort] = useState<'asc' | 'desc'>('asc');
|
|
104
106
|
const [query, setQuery] = useState<string>('');
|
|
107
|
+
const [preQuery, setPreQuery] = useState<string>('');
|
|
105
108
|
|
|
106
109
|
useUpdateEffect(() => {
|
|
107
110
|
setShowAs(showAs);
|
|
@@ -111,6 +114,14 @@ export const ReqoreCollection = ({
|
|
|
111
114
|
onQueryChange?.(query);
|
|
112
115
|
}, [query]);
|
|
113
116
|
|
|
117
|
+
useDebounce(
|
|
118
|
+
() => {
|
|
119
|
+
setQuery(preQuery);
|
|
120
|
+
},
|
|
121
|
+
searchDelay,
|
|
122
|
+
[preQuery]
|
|
123
|
+
);
|
|
124
|
+
|
|
114
125
|
const sortedItems: IReqoreCollectionItemProps[] = useMemo(() => {
|
|
115
126
|
if (!sortable) {
|
|
116
127
|
return items;
|
|
@@ -141,7 +152,7 @@ export const ReqoreCollection = ({
|
|
|
141
152
|
});
|
|
142
153
|
}, [items, sort]);
|
|
143
154
|
|
|
144
|
-
const
|
|
155
|
+
const finalItems: IReqoreCollectionItemProps[] = useMemo(() => {
|
|
145
156
|
if (!filterable || query === '') {
|
|
146
157
|
return sortedItems;
|
|
147
158
|
}
|
|
@@ -159,11 +170,10 @@ export const ReqoreCollection = ({
|
|
|
159
170
|
});
|
|
160
171
|
}, [items, query, sortedItems]);
|
|
161
172
|
|
|
162
|
-
const
|
|
163
|
-
|
|
173
|
+
const handlePreQueryChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
174
|
+
setPreQuery(event.target.value);
|
|
164
175
|
};
|
|
165
176
|
|
|
166
|
-
const finalItems = filteredItems;
|
|
167
177
|
const finalActions: TReqorePanelActions = useMemo(() => {
|
|
168
178
|
let actions: TReqorePanelActions = rest.actions ? [...rest.actions] : [];
|
|
169
179
|
|
|
@@ -171,10 +181,11 @@ export const ReqoreCollection = ({
|
|
|
171
181
|
responsive: false,
|
|
172
182
|
group: [
|
|
173
183
|
{
|
|
174
|
-
icon: _showAs === 'grid' ? '
|
|
184
|
+
icon: _showAs === 'grid' ? 'ListUnordered' : 'GridLine',
|
|
175
185
|
onClick: () => setShowAs(_showAs === 'grid' ? 'list' : 'grid'),
|
|
176
186
|
tooltip: displayButtonTooltip(_showAs),
|
|
177
187
|
disabled: !size(finalItems),
|
|
188
|
+
textAlign: 'center',
|
|
178
189
|
...displayButtonProps,
|
|
179
190
|
},
|
|
180
191
|
],
|
|
@@ -186,6 +197,7 @@ export const ReqoreCollection = ({
|
|
|
186
197
|
onClick: () => setSort(sort === 'desc' ? 'asc' : 'desc'),
|
|
187
198
|
tooltip: sortButtonTooltip(sort),
|
|
188
199
|
disabled: !size(finalItems),
|
|
200
|
+
textAlign: 'center',
|
|
189
201
|
...sortButtonProps,
|
|
190
202
|
});
|
|
191
203
|
}
|
|
@@ -200,8 +212,8 @@ export const ReqoreCollection = ({
|
|
|
200
212
|
fixed: false,
|
|
201
213
|
placeholder: inputPlaceholder(finalItems),
|
|
202
214
|
onClearClick: () => setQuery(''),
|
|
203
|
-
onChange:
|
|
204
|
-
value:
|
|
215
|
+
onChange: handlePreQueryChange,
|
|
216
|
+
value: preQuery,
|
|
205
217
|
icon: 'Search2Line',
|
|
206
218
|
minimal: false,
|
|
207
219
|
...inputProps,
|
|
@@ -211,7 +223,7 @@ export const ReqoreCollection = ({
|
|
|
211
223
|
}
|
|
212
224
|
|
|
213
225
|
return [...actions, toolbarGroup];
|
|
214
|
-
}, [filterable,
|
|
226
|
+
}, [filterable, preQuery, query, rest.actions, _showAs, sort, sortable, finalItems]);
|
|
215
227
|
|
|
216
228
|
return (
|
|
217
229
|
<ReqorePanel
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { map, size } from 'lodash';
|
|
2
2
|
import { rgba } from 'polished';
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { useDebounce, useMeasure } from 'react-use';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
|
-
import ReqoreContext from '../../context/ReqoreContext';
|
|
7
6
|
import { changeDarkness, getMainBackgroundColor } from '../../helpers/colors';
|
|
7
|
+
import { useReqoreProperty } from '../../hooks/useReqoreContext';
|
|
8
8
|
import { useReqoreTheme } from '../../hooks/useTheme';
|
|
9
9
|
import { StyledBackdrop } from '../Drawer';
|
|
10
10
|
import {
|
|
@@ -84,7 +84,7 @@ export const ReqoreCollectionItem = ({
|
|
|
84
84
|
...rest
|
|
85
85
|
}: IReqoreCollectionItemProps) => {
|
|
86
86
|
const [isSelected, setIsSelected] = useState(false);
|
|
87
|
-
const
|
|
87
|
+
const getAndIncreaseZIndex = useReqoreProperty('getAndIncreaseZIndex');
|
|
88
88
|
const ref = useRef<HTMLDivElement>(null);
|
|
89
89
|
const [contentRef, sizes] = useMeasure();
|
|
90
90
|
const originalDimensions = useRef(null);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { animated, useTransition } from '@react-spring/web';
|
|
2
2
|
import { rgba } from 'polished';
|
|
3
3
|
import { Resizable } from 're-resizable';
|
|
4
|
-
import {
|
|
4
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import styled, { css } from 'styled-components';
|
|
7
|
-
import {
|
|
7
|
+
import { useReqoreProperty } from '../..';
|
|
8
8
|
import { SPRING_CONFIG, SPRING_CONFIG_NO_ANIMATIONS } from '../../constants/animations';
|
|
9
9
|
import { IReqoreTheme } from '../../constants/theme';
|
|
10
10
|
import ReqoreThemeProvider from '../../containers/ThemeProvider';
|
|
@@ -147,7 +147,7 @@ const getSpringConfig = (isModal?: boolean, position?: TPosition, floating?: boo
|
|
|
147
147
|
leave: { opacity: 0, [position]: '-80px' },
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
export const ReqoreDrawer = ({
|
|
150
|
+
export const ReqoreDrawer: React.FC<IReqoreDrawerProps> = ({
|
|
151
151
|
children,
|
|
152
152
|
isOpen,
|
|
153
153
|
isHidden,
|
|
@@ -173,7 +173,7 @@ export const ReqoreDrawer = ({
|
|
|
173
173
|
actions = [],
|
|
174
174
|
...rest
|
|
175
175
|
}: IReqoreDrawerProps) => {
|
|
176
|
-
const
|
|
176
|
+
const animations = useReqoreProperty('animations');
|
|
177
177
|
const theme = useReqoreTheme('main', customTheme, intent);
|
|
178
178
|
const layout = useMemo(
|
|
179
179
|
() =>
|