@qoretechnologies/reqore 0.26.0 → 0.27.0
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/.gitpod.yml +2 -2
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Breadcrumbs/index.js.map +1 -1
- package/dist/components/Button/index.d.ts +7 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +50 -21
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +3 -1
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +2 -1
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +3 -2
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Menu/item.d.ts.map +1 -1
- package/dist/components/Menu/item.js +2 -2
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Notifications/notification.js +1 -1
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +5 -2
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Spacer/index.d.ts.map +1 -1
- package/dist/components/Spacer/index.js +1 -1
- package/dist/components/Spacer/index.js.map +1 -1
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/item.d.ts +2 -1
- package/dist/components/Tabs/item.d.ts.map +1 -1
- package/dist/components/Tabs/item.js +2 -2
- package/dist/components/Tabs/item.js.map +1 -1
- package/dist/components/Tabs/list.d.ts.map +1 -1
- package/dist/components/Tabs/list.js +1 -1
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +3 -3
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Tree/index.d.ts +1 -0
- package/dist/components/Tree/index.d.ts.map +1 -1
- package/dist/components/Tree/index.js +4 -3
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/constants/animations.d.ts +4 -0
- package/dist/constants/animations.d.ts.map +1 -1
- package/dist/constants/animations.js +5 -1
- package/dist/constants/animations.js.map +1 -1
- package/dist/constants/sizes.d.ts +21 -0
- package/dist/constants/sizes.d.ts.map +1 -1
- package/dist/constants/sizes.js +22 -1
- package/dist/constants/sizes.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +1 -2
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +1 -0
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js +0 -1
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/context/ReqoreContext.d.ts.map +1 -1
- package/dist/context/ReqoreContext.js +2 -1
- package/dist/context/ReqoreContext.js.map +1 -1
- package/dist/helpers/utils.d.ts +2 -0
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +11 -1
- package/dist/helpers/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Breadcrumbs/index.tsx +1 -0
- package/src/components/Button/index.tsx +164 -88
- package/src/components/Drawer/index.tsx +5 -3
- package/src/components/Effect/index.tsx +3 -0
- package/src/components/Menu/index.tsx +13 -1
- package/src/components/Menu/item.tsx +3 -2
- package/src/components/Notifications/notification.tsx +1 -1
- package/src/components/Panel/index.tsx +4 -3
- package/src/components/Spacer/index.tsx +1 -0
- package/src/components/Tabs/index.tsx +1 -1
- package/src/components/Tabs/item.tsx +7 -3
- package/src/components/Tabs/list.tsx +1 -0
- package/src/components/Tag/index.tsx +3 -2
- package/src/components/Tree/index.tsx +6 -2
- package/src/constants/animations.ts +5 -0
- package/src/constants/sizes.ts +24 -0
- package/src/containers/ReqoreProvider.tsx +1 -3
- package/src/containers/UIProvider.tsx +1 -2
- package/src/context/ReqoreContext.tsx +1 -0
- package/src/helpers/utils.ts +10 -0
- package/src/stories/Button/Button.stories.tsx +72 -1
- package/src/stories/Menu/Menu.stories.tsx +30 -5
- package/src/stories/Tabs/Tabs.stories.tsx +10 -5
- package/src/stories/Tag/Tag.stories.tsx +42 -4
- package/tests.json +1 -1
|
@@ -36,7 +36,6 @@ var ReqoreUIProvider = function (_a) {
|
|
|
36
36
|
var _theme = (0, lodash_1.cloneDeep)(theme || {});
|
|
37
37
|
var _defaultTheme = (0, lodash_1.cloneDeep)(theme_1.DEFAULT_THEME);
|
|
38
38
|
var rebuiltTheme = (0, colors_1.buildTheme)((0, merge_1["default"])(_defaultTheme, _theme));
|
|
39
|
-
console.log(options);
|
|
40
39
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ThemeContext_1["default"].Provider, __assign({ value: __assign({}, rebuiltTheme) }, { children: (0, jsx_runtime_1.jsx)(Layout_1["default"], __assign({ withSidebar: options === null || options === void 0 ? void 0 : options.withSidebar }, { children: modalPortal ? ((0, jsx_runtime_1.jsx)(ReqoreProvider_1["default"], __assign({ options: options }, { children: (0, jsx_runtime_1.jsx)(PopoverProvider_1["default"], __assign({ uiScale: options === null || options === void 0 ? void 0 : options.uiScale }, { children: children })) }))) : null })) })), (0, jsx_runtime_1.jsx)(StyledPortal, { id: 'reqore-portal', ref: setModalPortal })] }));
|
|
41
40
|
};
|
|
42
41
|
exports["default"] = ReqoreUIProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIProvider.js","sourceRoot":"","sources":["../../src/containers/UIProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,uDAAiC;AACjC,+BAAwC;AACxC,wEAAuC;AACvC,gEAAuD;AAEvD,4CAAiE;AACjE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,EAAE,EAAC,eAAe,EAAC,GAAG,EAAE,cAAc,GAAI,IACvD,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReqoreContext.d.ts","sourceRoot":"","sources":["../../src/context/ReqoreContext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,aAAa,CAAC,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAAC;IAC1D,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,GAAG,CAAC;IAClE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,GAAG,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,MAAM,CAAC;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;CACpD;;AAED,
|
|
1
|
+
{"version":3,"file":"ReqoreContext.d.ts","sourceRoot":"","sources":["../../src/context/ReqoreContext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,aAAa,CAAC,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAAC;IAC1D,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,GAAG,CAAC;IAClE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,GAAG,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,MAAM,CAAC;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;CACpD;;AAED,wBASG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReqoreContext.js","sourceRoot":"","sources":["../../src/context/ReqoreContext.tsx"],"names":[],"mappings":";;AAAA,+BAAsC;AAgBtC,qBAAe,IAAA,qBAAa,EAAiB;IAC3C,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAE,IAAI;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,IAAI;KACd;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"ReqoreContext.js","sourceRoot":"","sources":["../../src/context/ReqoreContext.tsx"],"names":[],"mappings":";;AAAA,+BAAsC;AAgBtC,qBAAe,IAAA,qBAAa,EAAiB;IAC3C,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAE,IAAI;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACd;CACF,CAAC,CAAC"}
|
package/dist/helpers/utils.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { TSizes } from '../constants/sizes';
|
|
1
2
|
export declare const sleep: (ms: number) => Promise<unknown>;
|
|
2
3
|
export declare const getTypeFromValue: Function;
|
|
3
4
|
export declare const getLineCount: (value: string) => number;
|
|
4
5
|
export declare const calculateStringSizeInPixels: (value: string, fontSize: number) => number;
|
|
6
|
+
export declare const getOneLessSize: (size: TSizes) => TSizes;
|
|
5
7
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":"AAUA,OAAO,EAAkC,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5E,eAAO,MAAM,KAAK,OAAc,MAAM,qBAAgD,CAAC;AAEvF,eAAO,MAAM,gBAAgB,EAAE,QA8B9B,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,MAAM,KAAG,MAM5C,CAAC;AAEF,eAAO,MAAM,2BAA2B,UAAW,MAAM,YAAiB,MAAM,KAAG,MAqBlF,CAAC;AAEF,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,MAO7C,CAAC"}
|
package/dist/helpers/utils.js
CHANGED
|
@@ -36,8 +36,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
exports.__esModule = true;
|
|
39
|
-
exports.calculateStringSizeInPixels = exports.getLineCount = exports.getTypeFromValue = exports.sleep = void 0;
|
|
39
|
+
exports.getOneLessSize = exports.calculateStringSizeInPixels = exports.getLineCount = exports.getTypeFromValue = exports.sleep = void 0;
|
|
40
40
|
var lodash_1 = require("lodash");
|
|
41
|
+
var sizes_1 = require("../constants/sizes");
|
|
41
42
|
var sleep = function (ms) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
42
43
|
switch (_a.label) {
|
|
43
44
|
case 0: return [4 /*yield*/, new Promise(function (r) { return setTimeout(r, ms); })];
|
|
@@ -100,4 +101,13 @@ var calculateStringSizeInPixels = function (value, fontSize) {
|
|
|
100
101
|
return (Array.from(value).reduce(function (acc, cur) { var _a; return acc + ((_a = widths[cur.charCodeAt(0)]) !== null && _a !== void 0 ? _a : avg); }, 0) * fontSize);
|
|
101
102
|
};
|
|
102
103
|
exports.calculateStringSizeInPixels = calculateStringSizeInPixels;
|
|
104
|
+
var getOneLessSize = function (size) {
|
|
105
|
+
// Get the initial sizes number
|
|
106
|
+
var initialSizeNumber = sizes_1.SIZE_TO_NUMBER[size];
|
|
107
|
+
// Reduce the size number by one
|
|
108
|
+
var oneLessSizeNumber = initialSizeNumber - 1 === 0 ? 1 : initialSizeNumber - 1;
|
|
109
|
+
// Get the size name from the number
|
|
110
|
+
return sizes_1.NUMBER_TO_SIZE[oneLessSizeNumber];
|
|
111
|
+
};
|
|
112
|
+
exports.getOneLessSize = getOneLessSize;
|
|
103
113
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCASgB;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCASgB;AAChB,4CAA4E;AAErE,IAAM,KAAK,GAAG,UAAO,EAAU;;gBAAK,qBAAM,IAAI,OAAO,CAAC,UAAC,CAAC,IAAK,OAAA,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,EAAjB,CAAiB,CAAC,EAAA;gBAA3C,sBAAA,SAA2C,EAAA;;S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SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;QACxF,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS;KACzC,CAAC;IACF,IAAM,GAAG,GAAG,kBAAkB,CAAC;IAE/B,uDAAuD;IACvD,OAAO,CACL,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG,YAAK,OAAA,GAAG,GAAG,CAAC,MAAA,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,mCAAI,GAAG,CAAC,CAAA,EAAA,EAAE,CAAC,CAAC,GAAG,QAAQ,CAC/F,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,2BAA2B,+BAqBtC;AAEK,IAAM,cAAc,GAAG,UAAC,IAAY;IACzC,+BAA+B;IAC/B,IAAM,iBAAiB,GAAW,sBAAc,CAAC,IAAI,CAAC,CAAC;IACvD,gCAAgC;IAChC,IAAM,iBAAiB,GAAW,iBAAiB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,GAAG,CAAC,CAAC;IAC1F,oCAAoC;IACpC,OAAO,sBAAc,CAAC,iBAAiB,CAAC,CAAC;AAC3C,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef, useContext } from 'react';
|
|
1
|
+
import React, { forwardRef, memo, useContext } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import {
|
|
4
4
|
PADDING_FROM_SIZE,
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import { IReqoreCustomTheme, IReqoreTheme } from '../../constants/theme';
|
|
11
11
|
import ReqoreContext from '../../context/ReqoreContext';
|
|
12
12
|
import { changeLightness, getReadableColor, getReadableColorFrom } from '../../helpers/colors';
|
|
13
|
+
import { getOneLessSize } from '../../helpers/utils';
|
|
13
14
|
import { useCombinedRefs } from '../../hooks/useCombinedRefs';
|
|
14
15
|
import { useReqoreTheme } from '../../hooks/useTheme';
|
|
15
16
|
import { useTooltip } from '../../hooks/useTooltip';
|
|
@@ -28,8 +29,10 @@ import {
|
|
|
28
29
|
TReqoreTooltipProp,
|
|
29
30
|
} from '../../types/global';
|
|
30
31
|
import { IReqoreIconName } from '../../types/icons';
|
|
31
|
-
import { StyledEffect } from '../Effect';
|
|
32
|
+
import { ReqoreTextEffect, StyledEffect, StyledTextEffect } from '../Effect';
|
|
32
33
|
import ReqoreIcon from '../Icon';
|
|
34
|
+
import { ReqoreSpacer } from '../Spacer';
|
|
35
|
+
import ReqoreTag, { IReqoreTagProps } from '../Tag';
|
|
33
36
|
|
|
34
37
|
export interface IReqoreButtonProps
|
|
35
38
|
extends React.HTMLAttributes<HTMLButtonElement>,
|
|
@@ -48,6 +51,10 @@ export interface IReqoreButtonProps
|
|
|
48
51
|
rightIcon?: IReqoreIconName;
|
|
49
52
|
customTheme?: IReqoreCustomTheme;
|
|
50
53
|
wrap?: boolean;
|
|
54
|
+
badge?: string | number | IReqoreTagProps;
|
|
55
|
+
description?: string | number;
|
|
56
|
+
maxWidth?: string;
|
|
57
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
export interface IReqoreButtonStyle extends Omit<IReqoreButtonProps, 'intent'> {
|
|
@@ -67,6 +74,7 @@ export const StyledAnimatedTextWrapper = styled.span`
|
|
|
67
74
|
overflow: hidden;
|
|
68
75
|
position: relative;
|
|
69
76
|
padding: 4px 0;
|
|
77
|
+
text-align: left;
|
|
70
78
|
`;
|
|
71
79
|
|
|
72
80
|
export const StyledActiveContent = styled.span`
|
|
@@ -77,7 +85,7 @@ export const StyledActiveContent = styled.span`
|
|
|
77
85
|
filter: blur(10px);
|
|
78
86
|
|
|
79
87
|
${({ wrap }) =>
|
|
80
|
-
wrap &&
|
|
88
|
+
!wrap &&
|
|
81
89
|
css`
|
|
82
90
|
overflow: hidden;
|
|
83
91
|
text-overflow: ellipsis;
|
|
@@ -92,7 +100,7 @@ export const StyledInActiveContent = styled.span`
|
|
|
92
100
|
transition: all 0.2s ease-out;
|
|
93
101
|
|
|
94
102
|
${({ wrap }) =>
|
|
95
|
-
wrap &&
|
|
103
|
+
!wrap &&
|
|
96
104
|
css`
|
|
97
105
|
overflow: hidden;
|
|
98
106
|
text-overflow: ellipsis;
|
|
@@ -107,7 +115,7 @@ export const StyledInvisibleContent = styled.span`
|
|
|
107
115
|
overflow: hidden;
|
|
108
116
|
|
|
109
117
|
${({ wrap }) =>
|
|
110
|
-
wrap &&
|
|
118
|
+
!wrap &&
|
|
111
119
|
css`
|
|
112
120
|
white-space: nowrap;
|
|
113
121
|
`}
|
|
@@ -115,8 +123,9 @@ export const StyledInvisibleContent = styled.span`
|
|
|
115
123
|
|
|
116
124
|
export const StyledButton = styled(StyledEffect)<IReqoreButtonStyle>`
|
|
117
125
|
display: flex;
|
|
118
|
-
|
|
126
|
+
flex-flow: column;
|
|
119
127
|
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
120
129
|
margin: 0;
|
|
121
130
|
font-weight: 600;
|
|
122
131
|
position: relative;
|
|
@@ -129,13 +138,8 @@ export const StyledButton = styled(StyledEffect)<IReqoreButtonStyle>`
|
|
|
129
138
|
|
|
130
139
|
min-height: ${({ size }) => SIZE_TO_PX[size]}px;
|
|
131
140
|
|
|
132
|
-
${({ wrap }) =>
|
|
133
|
-
wrap &&
|
|
134
|
-
css`
|
|
135
|
-
max-height: ${({ size }) => SIZE_TO_PX[size]}px;
|
|
136
|
-
`}
|
|
137
|
-
|
|
138
141
|
min-width: ${({ size }) => SIZE_TO_PX[size]}px;
|
|
142
|
+
max-width: ${({ maxWidth }) => maxWidth || undefined};
|
|
139
143
|
|
|
140
144
|
flex: ${({ fluid, fixed }) => (fixed ? '0 auto' : fluid ? '1 auto' : '0 0 auto')};
|
|
141
145
|
|
|
@@ -168,7 +172,7 @@ export const StyledButton = styled(StyledEffect)<IReqoreButtonStyle>`
|
|
|
168
172
|
transition: all 0.2s ease-out;
|
|
169
173
|
|
|
170
174
|
&:active {
|
|
171
|
-
transform:
|
|
175
|
+
transform: translateY(2px);
|
|
172
176
|
}
|
|
173
177
|
|
|
174
178
|
&:hover,
|
|
@@ -179,6 +183,13 @@ export const StyledButton = styled(StyledEffect)<IReqoreButtonStyle>`
|
|
|
179
183
|
getReadableColor({ main: getButtonMainColor(theme, color) }, undefined, undefined)};
|
|
180
184
|
border-color: ${({ minimal, theme, color }) =>
|
|
181
185
|
minimal ? undefined : changeLightness(getButtonMainColor(theme, color), 0.1)};
|
|
186
|
+
box-shadow: ${({ theme, color, effect }) => {
|
|
187
|
+
return `0 0 0 2px ${
|
|
188
|
+
effect?.gradient
|
|
189
|
+
? Object.values(effect.gradient.colors)[0]
|
|
190
|
+
: changeLightness(getButtonMainColor(theme, color), 0.1)
|
|
191
|
+
}`;
|
|
192
|
+
}};
|
|
182
193
|
|
|
183
194
|
${animate &&
|
|
184
195
|
css`
|
|
@@ -226,84 +237,149 @@ export const StyledButton = styled(StyledEffect)<IReqoreButtonStyle>`
|
|
|
226
237
|
border-color: ${({ minimal, theme, color }) =>
|
|
227
238
|
minimal ? undefined : changeLightness(getButtonMainColor(theme, color), 0.4)};
|
|
228
239
|
}
|
|
240
|
+
|
|
241
|
+
${StyledTextEffect} {
|
|
242
|
+
padding-bottom: ${({ size }) => PADDING_FROM_SIZE[getOneLessSize(size)]}px;
|
|
243
|
+
}
|
|
229
244
|
`;
|
|
230
245
|
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
<ReqoreIcon
|
|
299
|
-
icon={rightIcon}
|
|
300
|
-
margin={children ? 'left' : undefined}
|
|
301
|
-
size={`${TEXT_FROM_SIZE[size]}px`}
|
|
246
|
+
export const StyledButtonContent = styled.div`
|
|
247
|
+
display: flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
width: 100%;
|
|
250
|
+
height: 100%;
|
|
251
|
+
flex: 1;
|
|
252
|
+
flex-shrink: 0;
|
|
253
|
+
min-height: ${({ size }) => SIZE_TO_PX[size]}px;
|
|
254
|
+
${({ wrap, description }) =>
|
|
255
|
+
!wrap && !description
|
|
256
|
+
? css`
|
|
257
|
+
max-height: ${({ size }) => SIZE_TO_PX[size]}px;
|
|
258
|
+
`
|
|
259
|
+
: null}
|
|
260
|
+
`;
|
|
261
|
+
|
|
262
|
+
const ReqoreButton = memo(
|
|
263
|
+
forwardRef(
|
|
264
|
+
(
|
|
265
|
+
{
|
|
266
|
+
icon,
|
|
267
|
+
size = 'normal',
|
|
268
|
+
minimal,
|
|
269
|
+
children,
|
|
270
|
+
tooltip,
|
|
271
|
+
className,
|
|
272
|
+
fluid,
|
|
273
|
+
fixed,
|
|
274
|
+
intent,
|
|
275
|
+
active,
|
|
276
|
+
flat,
|
|
277
|
+
rightIcon,
|
|
278
|
+
customTheme,
|
|
279
|
+
wrap,
|
|
280
|
+
readOnly,
|
|
281
|
+
badge,
|
|
282
|
+
description,
|
|
283
|
+
maxWidth,
|
|
284
|
+
textAlign = 'left',
|
|
285
|
+
...rest
|
|
286
|
+
}: IReqoreButtonProps,
|
|
287
|
+
ref
|
|
288
|
+
) => {
|
|
289
|
+
const { targetRef } = useCombinedRefs(ref);
|
|
290
|
+
const { animations } = useContext(ReqoreContext);
|
|
291
|
+
const theme: IReqoreTheme = useReqoreTheme('main', customTheme, intent);
|
|
292
|
+
|
|
293
|
+
/* A custom hook that is used to add a tooltip to the button. */
|
|
294
|
+
useTooltip(targetRef.current, tooltip);
|
|
295
|
+
|
|
296
|
+
// If color or intent was specified, set the color
|
|
297
|
+
const customColor = theme.main;
|
|
298
|
+
const _flat = minimal ? flat : flat !== false;
|
|
299
|
+
const color = customColor
|
|
300
|
+
? minimal
|
|
301
|
+
? getReadableColor(theme, undefined, undefined, true, theme.originalMain)
|
|
302
|
+
: getReadableColorFrom(customColor, true)
|
|
303
|
+
: getReadableColor(theme, undefined, undefined, true);
|
|
304
|
+
|
|
305
|
+
const renderBadge = () => (
|
|
306
|
+
<>
|
|
307
|
+
<ReqoreSpacer width={PADDING_FROM_SIZE[size]} />
|
|
308
|
+
<ReqoreTag
|
|
309
|
+
size={getOneLessSize(size)}
|
|
310
|
+
badge
|
|
311
|
+
color={`${color}70`}
|
|
312
|
+
{...(typeof badge === 'string' || typeof badge === 'number' ? { label: badge } : badge)}
|
|
302
313
|
/>
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
314
|
+
</>
|
|
315
|
+
);
|
|
316
|
+
|
|
317
|
+
return (
|
|
318
|
+
<StyledButton
|
|
319
|
+
{...rest}
|
|
320
|
+
as='button'
|
|
321
|
+
theme={theme}
|
|
322
|
+
ref={targetRef}
|
|
323
|
+
fluid={fluid}
|
|
324
|
+
fixed={fixed}
|
|
325
|
+
maxWidth={maxWidth}
|
|
326
|
+
minimal={minimal}
|
|
327
|
+
size={size}
|
|
328
|
+
color={customColor}
|
|
329
|
+
animate={animations.buttons}
|
|
330
|
+
flat={_flat}
|
|
331
|
+
active={active}
|
|
332
|
+
readOnly={readOnly}
|
|
333
|
+
wrap={wrap}
|
|
334
|
+
description={description}
|
|
335
|
+
className={`${className || ''} reqore-control reqore-button`}
|
|
336
|
+
>
|
|
337
|
+
<StyledButtonContent size={size} wrap={wrap} description={description}>
|
|
338
|
+
{icon && (
|
|
339
|
+
<>
|
|
340
|
+
<ReqoreIcon icon={icon} size={`${TEXT_FROM_SIZE[size]}px`} />
|
|
341
|
+
{children || badge || rightIcon ? (
|
|
342
|
+
<ReqoreSpacer width={PADDING_FROM_SIZE[size]} />
|
|
343
|
+
) : null}
|
|
344
|
+
</>
|
|
345
|
+
)}
|
|
346
|
+
{children && (
|
|
347
|
+
<StyledAnimatedTextWrapper textAlign={textAlign}>
|
|
348
|
+
<StyledActiveContent wrap={wrap}>{children}</StyledActiveContent>
|
|
349
|
+
<StyledInActiveContent wrap={wrap}>{children}</StyledInActiveContent>
|
|
350
|
+
<StyledInvisibleContent wrap={wrap}>{children}</StyledInvisibleContent>
|
|
351
|
+
{badge && wrap ? renderBadge() : null}
|
|
352
|
+
</StyledAnimatedTextWrapper>
|
|
353
|
+
)}
|
|
354
|
+
{badge && !wrap ? renderBadge() : null}
|
|
355
|
+
{rightIcon && (
|
|
356
|
+
<>
|
|
357
|
+
{children || badge ? <ReqoreSpacer width={PADDING_FROM_SIZE[size]} /> : null}
|
|
358
|
+
<ReqoreIcon
|
|
359
|
+
icon={rightIcon}
|
|
360
|
+
size={`${TEXT_FROM_SIZE[size]}px`}
|
|
361
|
+
style={{ marginLeft: 'auto' }}
|
|
362
|
+
/>
|
|
363
|
+
</>
|
|
364
|
+
)}
|
|
365
|
+
</StyledButtonContent>
|
|
366
|
+
|
|
367
|
+
{description && (
|
|
368
|
+
<ReqoreTextEffect
|
|
369
|
+
effect={{
|
|
370
|
+
textSize: getOneLessSize(size),
|
|
371
|
+
weight: 'light',
|
|
372
|
+
color: `${color}90`,
|
|
373
|
+
textAlign,
|
|
374
|
+
}}
|
|
375
|
+
>
|
|
376
|
+
{description}
|
|
377
|
+
</ReqoreTextEffect>
|
|
378
|
+
)}
|
|
379
|
+
</StyledButton>
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
)
|
|
307
383
|
);
|
|
308
384
|
|
|
309
385
|
export default ReqoreButton;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { animated, useTransition } from '@react-spring/web';
|
|
2
2
|
import { rgba } from 'polished';
|
|
3
3
|
import { Resizable } from 're-resizable';
|
|
4
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
4
|
+
import { useContext, useEffect, useMemo, useState } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import styled, { css } from 'styled-components';
|
|
7
|
-
import {
|
|
7
|
+
import { ReqoreContext } from '../..';
|
|
8
|
+
import { SPRING_CONFIG, SPRING_CONFIG_NO_ANIMATIONS } from '../../constants/animations';
|
|
8
9
|
import { IReqoreTheme } from '../../constants/theme';
|
|
9
10
|
import ReqoreThemeProvider from '../../containers/ThemeProvider';
|
|
10
11
|
import { getMainBackgroundColor } from '../../helpers/colors';
|
|
@@ -171,6 +172,7 @@ export const ReqoreDrawer = ({
|
|
|
171
172
|
height,
|
|
172
173
|
...rest
|
|
173
174
|
}: IReqoreDrawerProps) => {
|
|
175
|
+
const { animations } = useContext(ReqoreContext);
|
|
174
176
|
const theme = useReqoreTheme('main', customTheme, intent);
|
|
175
177
|
const layout = useMemo(
|
|
176
178
|
() =>
|
|
@@ -192,7 +194,7 @@ export const ReqoreDrawer = ({
|
|
|
192
194
|
|
|
193
195
|
const transitions = useTransition(isOpen, {
|
|
194
196
|
...getSpringConfig(_isModal, position, floating),
|
|
195
|
-
config: SPRING_CONFIG,
|
|
197
|
+
config: animations.dialogs ? SPRING_CONFIG : SPRING_CONFIG_NO_ANIMATIONS,
|
|
196
198
|
});
|
|
197
199
|
|
|
198
200
|
const zIndex = useLatestZIndex();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { reduce } from 'lodash';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { TEXT_FROM_SIZE, TSizes, WEIGHT_TO_NUMBER } from '../../constants/sizes';
|
|
4
|
+
import { changeDarkness } from '../../helpers/colors';
|
|
4
5
|
|
|
5
6
|
export interface IReqoreEffect {
|
|
6
7
|
gradient?: {
|
|
@@ -45,6 +46,8 @@ export const StyledEffect = styled.span`
|
|
|
45
46
|
|
|
46
47
|
return css`
|
|
47
48
|
background-image: ${gradient};
|
|
49
|
+
// Get the first color from the colors object
|
|
50
|
+
border-color: ${changeDarkness(Object.values(effect.gradient.colors)[0], 0.05)} !important;
|
|
48
51
|
`;
|
|
49
52
|
}}
|
|
50
53
|
|
|
@@ -15,6 +15,7 @@ export interface IReqoreMenuProps extends IReqoreComponent, React.HTMLAttributes
|
|
|
15
15
|
customTheme?: IReqoreCustomTheme;
|
|
16
16
|
intent?: TReqoreIntent;
|
|
17
17
|
wrapText?: boolean;
|
|
18
|
+
flat?: boolean;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export interface IReqoreMenuStyle extends IReqoreMenuProps {
|
|
@@ -48,7 +49,17 @@ const StyledReqoreMenu = styled.div<IReqoreMenuStyle>`
|
|
|
48
49
|
|
|
49
50
|
const ReqoreMenu: React.FC<IReqoreMenuProps> = forwardRef(
|
|
50
51
|
(
|
|
51
|
-
{
|
|
52
|
+
{
|
|
53
|
+
children,
|
|
54
|
+
position,
|
|
55
|
+
_insidePopover,
|
|
56
|
+
_popoverId,
|
|
57
|
+
customTheme,
|
|
58
|
+
intent,
|
|
59
|
+
wrapText,
|
|
60
|
+
flat = true,
|
|
61
|
+
...rest
|
|
62
|
+
},
|
|
52
63
|
ref: any
|
|
53
64
|
) => {
|
|
54
65
|
const theme = useReqoreTheme('main', customTheme, intent);
|
|
@@ -64,6 +75,7 @@ const ReqoreMenu: React.FC<IReqoreMenuProps> = forwardRef(
|
|
|
64
75
|
_popoverId,
|
|
65
76
|
customTheme: theme,
|
|
66
77
|
wrap: wrapText,
|
|
78
|
+
flat,
|
|
67
79
|
})
|
|
68
80
|
: null
|
|
69
81
|
)}
|
|
@@ -50,6 +50,7 @@ const ReqoreMenuItem: React.FC<IReqoreMenuItemProps> = forwardRef(
|
|
|
50
50
|
_popoverId,
|
|
51
51
|
tooltip,
|
|
52
52
|
intent,
|
|
53
|
+
flat = true,
|
|
53
54
|
...rest
|
|
54
55
|
},
|
|
55
56
|
ref: any
|
|
@@ -88,7 +89,7 @@ const ReqoreMenuItem: React.FC<IReqoreMenuItemProps> = forwardRef(
|
|
|
88
89
|
//@ts-ignore
|
|
89
90
|
as={as}
|
|
90
91
|
{...rest}
|
|
91
|
-
flat
|
|
92
|
+
flat={flat}
|
|
92
93
|
className='reqore-menu-item'
|
|
93
94
|
fluid
|
|
94
95
|
onClick={handleClick}
|
|
@@ -103,7 +104,7 @@ const ReqoreMenuItem: React.FC<IReqoreMenuItemProps> = forwardRef(
|
|
|
103
104
|
{rightIcon && (
|
|
104
105
|
<ReqoreButton
|
|
105
106
|
icon={rightIcon}
|
|
106
|
-
flat
|
|
107
|
+
flat={flat}
|
|
107
108
|
fixed
|
|
108
109
|
minimal={!onRightIconClick}
|
|
109
110
|
customTheme={rest.customTheme}
|
|
@@ -66,7 +66,7 @@ export const StyledReqoreNotification = styled(StyledEffect)<IReqoreNotification
|
|
|
66
66
|
border-radius: 5px;
|
|
67
67
|
min-height: ${({ size = 'normal' }: IReqoreNotificationStyle) => TABS_SIZE_TO_PX[size]}px;
|
|
68
68
|
display: flex;
|
|
69
|
-
flex: 0 auto;
|
|
69
|
+
flex: 0 0 auto;
|
|
70
70
|
overflow: auto;
|
|
71
71
|
position: relative;
|
|
72
72
|
transition: all 0.2s ease-out;
|
|
@@ -142,7 +142,9 @@ export const StyledPanelTitle = styled.div<IStyledPanel>`
|
|
|
142
142
|
height: 40px;
|
|
143
143
|
align-items: center;
|
|
144
144
|
padding: ${({ noHorizontalPadding, contentSize }: IStyledPanel) =>
|
|
145
|
-
`0
|
|
145
|
+
`0 ${noHorizontalPadding ? 0 : '5px'} 0 ${
|
|
146
|
+
noHorizontalPadding ? 0 : `${TEXT_FROM_SIZE[contentSize]}px`
|
|
147
|
+
}`};
|
|
146
148
|
border-bottom: ${({ theme, isCollapsed, flat, opacity = 1 }) =>
|
|
147
149
|
!isCollapsed && !flat
|
|
148
150
|
? `1px solid ${rgba(changeLightness(getMainBackgroundColor(theme), 0.2), opacity)}`
|
|
@@ -163,8 +165,7 @@ export const StyledPanelTitle = styled.div<IStyledPanel>`
|
|
|
163
165
|
`;
|
|
164
166
|
|
|
165
167
|
export const StyledPanelBottomActions = styled(StyledPanelTitle)`
|
|
166
|
-
padding
|
|
167
|
-
padding-right: 5px;
|
|
168
|
+
padding: ${({ noHorizontalPadding }: IStyledPanel) => `0 ${noHorizontalPadding ? 0 : '5px'}`};
|
|
168
169
|
border-bottom: 0;
|
|
169
170
|
border-top: ${({ theme, flat, opacity = 1 }) =>
|
|
170
171
|
!flat
|