@qoretechnologies/reqore 0.28.6 → 0.29.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/.vscode/settings.json +2 -1
- package/__tests__/multiselect.test.tsx +361 -0
- package/__tests__/popover.test.tsx +35 -8
- package/dist/components/Collection/item.js +2 -2
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts +3 -4
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +7 -9
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts +2 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +3 -3
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts +6 -3
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Dropdown/list.js +19 -1
- package/dist/components/Dropdown/list.js.map +1 -1
- package/dist/components/Effect/index.d.ts +3 -1
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +24 -19
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/Input/index.js +3 -3
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InputClearButton/index.d.ts.map +1 -1
- package/dist/components/InputClearButton/index.js +1 -1
- package/dist/components/InputClearButton/index.js.map +1 -1
- package/dist/components/InternalPopover/index.js +3 -3
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/Menu/divider.d.ts +3 -2
- package/dist/components/Menu/divider.d.ts.map +1 -1
- package/dist/components/Menu/divider.js +2 -2
- package/dist/components/Menu/divider.js.map +1 -1
- package/dist/components/Menu/index.js +4 -3
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +32 -0
- package/dist/components/MultiSelect/index.d.ts.map +1 -0
- package/dist/components/MultiSelect/index.js +177 -0
- package/dist/components/MultiSelect/index.js.map +1 -0
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +5 -2
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Table/row.js +2 -2
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Tabs/item.js +1 -1
- 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 +5 -4
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/group.d.ts +3 -3
- package/dist/components/Tag/group.d.ts.map +1 -1
- package/dist/components/Tag/group.js +6 -3
- package/dist/components/Tag/group.js.map +1 -1
- package/dist/components/Tag/index.js +5 -5
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Tree/index.js +1 -1
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/containers/PopoverProvider.d.ts.map +1 -1
- package/dist/containers/PopoverProvider.js +28 -3
- package/dist/containers/PopoverProvider.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +6 -5
- 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.map +1 -1
- package/dist/context/PopoverContext.d.ts +1 -0
- package/dist/context/PopoverContext.d.ts.map +1 -1
- package/dist/context/PopoverContext.js.map +1 -1
- package/dist/context/ReqoreContext.d.ts +1 -0
- 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/colors.d.ts +3 -0
- package/dist/helpers/colors.d.ts.map +1 -1
- package/dist/helpers/colors.js +27 -3
- package/dist/helpers/colors.js.map +1 -1
- package/dist/hooks/usePopover.d.ts +8 -1
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js +12 -7
- package/dist/hooks/usePopover.js.map +1 -1
- package/dist/hooks/useReqore.d.ts +3 -0
- package/dist/hooks/useReqore.d.ts.map +1 -0
- package/dist/hooks/useReqore.js +17 -0
- package/dist/hooks/useReqore.js.map +1 -0
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useTheme.js +3 -0
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Collection/item.tsx +2 -2
- package/src/components/ControlGroup/index.tsx +46 -35
- package/src/components/Dropdown/index.tsx +5 -0
- package/src/components/Dropdown/list.tsx +29 -15
- package/src/components/Effect/index.tsx +58 -51
- package/src/components/Input/index.tsx +3 -3
- package/src/components/InputClearButton/index.tsx +1 -0
- package/src/components/InternalPopover/index.tsx +3 -3
- package/src/components/Menu/divider.tsx +15 -4
- package/src/components/Menu/index.tsx +3 -3
- package/src/components/MultiSelect/index.tsx +283 -0
- package/src/components/Panel/index.tsx +6 -4
- package/src/components/Popover/index.tsx +8 -3
- package/src/components/Table/row.tsx +2 -2
- package/src/components/Tabs/item.tsx +1 -1
- package/src/components/Tabs/list.tsx +11 -11
- package/src/components/Tag/group.tsx +10 -2
- package/src/components/Tag/index.tsx +7 -7
- package/src/components/Tree/index.tsx +3 -3
- package/src/containers/PopoverProvider.tsx +35 -3
- package/src/containers/ReqoreProvider.tsx +6 -4
- package/src/containers/UIProvider.tsx +1 -0
- package/src/context/PopoverContext.tsx +1 -0
- package/src/context/ReqoreContext.tsx +2 -0
- package/src/helpers/colors.ts +52 -4
- package/src/hooks/usePopover.tsx +24 -10
- package/src/hooks/useReqore.ts +12 -0
- package/src/hooks/useTheme.ts +6 -1
- package/src/index.tsx +3 -0
- package/src/mock/multiSelect.ts +61 -0
- package/src/stories/Button/Button.stories.tsx +20 -8
- package/src/stories/ControlGroup/ControlGroup.stories.tsx +7 -2
- package/src/stories/Dropdown/Dropdown.stories.tsx +6 -1
- package/src/stories/Input/Input.stories.tsx +25 -0
- package/src/stories/Menu/Menu.stories.tsx +3 -2
- package/src/stories/MultiSelect/MultiSelect.stories.tsx +99 -0
- package/src/stories/Tabs/Tabs.stories.tsx +23 -3
- package/src/stories/Tag/Tag.stories.tsx +8 -1
- package/tests.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { default as ReqoreMenuDivider } from './components/Menu/divider';
|
|
|
22
22
|
export { default as ReqoreMenuItem } from './components/Menu/item';
|
|
23
23
|
export { default as ReqoreMessage } from './components/Message';
|
|
24
24
|
export { ReqoreModal } from './components/Modal';
|
|
25
|
+
export { ReqoreMultiSelect } from './components/MultiSelect';
|
|
25
26
|
export { ReqoreFooter, ReqoreHeader } from './components/Navbar';
|
|
26
27
|
export { default as ReqoreNavbarDivider } from './components/Navbar/divider';
|
|
27
28
|
export { default as ReqoreNavbarGroup } from './components/Navbar/group';
|
|
@@ -50,4 +51,6 @@ export { default as ReqoreUIProvider } from './containers/UIProvider';
|
|
|
50
51
|
export { default as ReqoreContext } from './context/ReqoreContext';
|
|
51
52
|
export { default as ReqoreThemeContext } from './context/ThemeContext';
|
|
52
53
|
export { default as useLatestZIndex } from './hooks/useLatestZIndex';
|
|
54
|
+
export { useReqore } from './hooks/useReqore';
|
|
55
|
+
export { useReqoreTheme } from './hooks/useTheme';
|
|
53
56
|
//# 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,qB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,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5D,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,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,8 +11,8 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
13
|
exports.__esModule = true;
|
|
14
|
-
exports.
|
|
15
|
-
exports.useLatestZIndex = exports.ReqoreThemeContext = exports.ReqoreContext = exports.ReqoreUIProvider = exports.ReqoreNotifications = exports.ReqoreColors = exports.ReqoreTree = exports.ReqoreTimeAgo = exports.ReqoreTextarea = exports.ReqoreTagGroup = exports.ReqoreTag = exports.ReqoreTabsList = void 0;
|
|
14
|
+
exports.ReqoreTabsContent = exports.ReqoreTabs = exports.ReqoreTable = exports.ReqoreSpacer = 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.ReqoreColors = exports.ReqoreTree = exports.ReqoreTimeAgo = exports.ReqoreTextarea = exports.ReqoreTagGroup = exports.ReqoreTag = exports.ReqoreTabsList = exports.ReqoreTabsListItem = 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");
|
|
@@ -69,6 +69,8 @@ var Message_1 = require("./components/Message");
|
|
|
69
69
|
__createBinding(exports, Message_1, "default", "ReqoreMessage");
|
|
70
70
|
var Modal_1 = require("./components/Modal");
|
|
71
71
|
__createBinding(exports, Modal_1, "ReqoreModal");
|
|
72
|
+
var MultiSelect_1 = require("./components/MultiSelect");
|
|
73
|
+
__createBinding(exports, MultiSelect_1, "ReqoreMultiSelect");
|
|
72
74
|
var Navbar_1 = require("./components/Navbar");
|
|
73
75
|
__createBinding(exports, Navbar_1, "ReqoreFooter");
|
|
74
76
|
__createBinding(exports, Navbar_1, "ReqoreHeader");
|
|
@@ -127,4 +129,8 @@ var ThemeContext_1 = require("./context/ThemeContext");
|
|
|
127
129
|
__createBinding(exports, ThemeContext_1, "default", "ReqoreThemeContext");
|
|
128
130
|
var useLatestZIndex_1 = require("./hooks/useLatestZIndex");
|
|
129
131
|
__createBinding(exports, useLatestZIndex_1, "default", "useLatestZIndex");
|
|
132
|
+
var useReqore_1 = require("./hooks/useReqore");
|
|
133
|
+
__createBinding(exports, useReqore_1, "useReqore");
|
|
134
|
+
var useTheme_1 = require("./hooks/useTheme");
|
|
135
|
+
__createBinding(exports, useTheme_1, "useReqoreTheme");
|
|
130
136
|
//# 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;AACR,+CAAQ;AACR,+CAAQ;AACR,+CAAQ;AACR,+CAAQ;AACR,+CAAQ;AACR,oDAAa;AAEf,0CAA0D;AAAjD,0DAAqB;AAC9B,4CAA4D;AAAnD,4DAAsB;AAC/B,uDAA6E;AAApE,sEAA8B;AACvC,0CAA0D;AAAjD,0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D,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,8DAA6E;AAApE,6EAA8B;AACvC,sDAAsE;AAA7D,sEAA2B;AACpC,yDAAmE;AAA1D,sEAAwB;AACjC,uDAAuE;AAA9D,0EAA6B;AACtC,2DAAqE;AAA5D,0EAA0B;AACnC,+CAA8C;AAArC,mDAAS;AAClB,6CAAkD;AAAzC,uDAAc"}
|
package/package.json
CHANGED
|
@@ -170,7 +170,7 @@ export const ReqoreCollectionItem = ({
|
|
|
170
170
|
setIsSelected(!isSelected);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
rest
|
|
173
|
+
rest.onClick?.(event);
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
const actualContent: string | React.ReactNode =
|
|
@@ -239,5 +239,5 @@ export const ReqoreCollectionItem = ({
|
|
|
239
239
|
);
|
|
240
240
|
};
|
|
241
241
|
|
|
242
|
-
return
|
|
242
|
+
return renderContent();
|
|
243
243
|
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { GAP_FROM_SIZE, RADIUS_FROM_SIZE, TSizes } from '../../constants/sizes';
|
|
4
4
|
import { IReqoreTheme } from '../../constants/theme';
|
|
5
|
+
import { IWithReqoreFlat, IWithReqoreMinimal, IWithReqoreSize } from '../../types/global';
|
|
5
6
|
|
|
6
|
-
export interface IReqoreControlGroupProps
|
|
7
|
+
export interface IReqoreControlGroupProps
|
|
8
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
9
|
+
IWithReqoreFlat,
|
|
10
|
+
IWithReqoreSize,
|
|
11
|
+
IWithReqoreMinimal {
|
|
7
12
|
stack?: boolean;
|
|
8
|
-
minimal?: boolean;
|
|
9
|
-
size?: TSizes;
|
|
10
13
|
children: any;
|
|
11
14
|
fluid?: boolean;
|
|
12
15
|
rounded?: boolean;
|
|
@@ -98,37 +101,45 @@ export const StyledReqoreControlGroup = styled.div<IReqoreControlGroupStyle>`
|
|
|
98
101
|
`}
|
|
99
102
|
`;
|
|
100
103
|
|
|
101
|
-
const ReqoreControlGroup = (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
104
|
+
const ReqoreControlGroup = forwardRef<HTMLDivElement, IReqoreControlGroupProps>(
|
|
105
|
+
(
|
|
106
|
+
{
|
|
107
|
+
children,
|
|
108
|
+
className,
|
|
109
|
+
minimal,
|
|
110
|
+
size = 'normal',
|
|
111
|
+
gapSize = 'normal',
|
|
112
|
+
fluid,
|
|
113
|
+
flat,
|
|
114
|
+
rounded = true,
|
|
115
|
+
...rest
|
|
116
|
+
}: IReqoreControlGroupProps,
|
|
117
|
+
ref
|
|
118
|
+
) => (
|
|
119
|
+
<StyledReqoreControlGroup
|
|
120
|
+
{...rest}
|
|
121
|
+
size={size}
|
|
122
|
+
gapSize={gapSize}
|
|
123
|
+
ref={ref}
|
|
124
|
+
rounded={rounded}
|
|
125
|
+
fluid={fluid}
|
|
126
|
+
className={`${className || ''} reqore-control-group`}
|
|
127
|
+
>
|
|
128
|
+
{React.Children.map(children, (child) =>
|
|
129
|
+
child
|
|
130
|
+
? React.cloneElement(child, {
|
|
131
|
+
minimal:
|
|
132
|
+
child.props?.minimal || child.props?.minimal === false
|
|
133
|
+
? child.props.minimal
|
|
134
|
+
: minimal,
|
|
135
|
+
size: child.props?.size || size,
|
|
136
|
+
flat: child.props?.flat || child.props?.flat === false ? child.props.flat : flat,
|
|
137
|
+
fluid,
|
|
138
|
+
})
|
|
139
|
+
: null
|
|
140
|
+
)}
|
|
141
|
+
</StyledReqoreControlGroup>
|
|
142
|
+
)
|
|
132
143
|
);
|
|
133
144
|
|
|
134
145
|
export default ReqoreControlGroup;
|
|
@@ -16,6 +16,7 @@ export interface IReqoreDropdownProps extends Partial<IPopoverOptions> {
|
|
|
16
16
|
label?: any;
|
|
17
17
|
children?: any;
|
|
18
18
|
listWidth?: string;
|
|
19
|
+
listHeight?: string;
|
|
19
20
|
icon?: IReqoreIconName;
|
|
20
21
|
rightIcon?: IReqoreIconName;
|
|
21
22
|
caretPosition?: 'left' | 'right';
|
|
@@ -53,6 +54,8 @@ function ReqoreDropdown<T extends unknown = IReqoreButtonProps>({
|
|
|
53
54
|
targetElement,
|
|
54
55
|
useTargetWidth,
|
|
55
56
|
listWidth,
|
|
57
|
+
listHeight,
|
|
58
|
+
passPopoverData,
|
|
56
59
|
...rest
|
|
57
60
|
}: IReqoreDropdownProps & T) {
|
|
58
61
|
const componentProps = useMemo(
|
|
@@ -74,6 +77,7 @@ function ReqoreDropdown<T extends unknown = IReqoreButtonProps>({
|
|
|
74
77
|
multiSelect={multiSelect}
|
|
75
78
|
listStyle={listStyle}
|
|
76
79
|
width={useTargetWidth ? '100%' : listWidth}
|
|
80
|
+
height={listHeight}
|
|
77
81
|
items={items}
|
|
78
82
|
filterable={filterable}
|
|
79
83
|
onItemSelect={onItemSelect}
|
|
@@ -99,6 +103,7 @@ function ReqoreDropdown<T extends unknown = IReqoreButtonProps>({
|
|
|
99
103
|
handler={handler || 'click'}
|
|
100
104
|
openOnMount={isDefaultOpen}
|
|
101
105
|
content={popoverContent}
|
|
106
|
+
passPopoverData={passPopoverData}
|
|
102
107
|
>
|
|
103
108
|
{children || label}
|
|
104
109
|
</ReqorePopover>
|
|
@@ -2,18 +2,23 @@ import React, { memo, useEffect, useMemo, useState } from 'react';
|
|
|
2
2
|
import { IReqoreComponent } from '../../types/global';
|
|
3
3
|
import ReqoreInput from '../Input';
|
|
4
4
|
import ReqoreMenu from '../Menu';
|
|
5
|
+
import ReqoreMenuDivider from '../Menu/divider';
|
|
5
6
|
import ReqoreMenuItem, { IReqoreMenuItemProps } from '../Menu/item';
|
|
6
7
|
|
|
7
8
|
export type TDropdownItemOnClick = (item: IReqoreDropdownItem) => void;
|
|
8
9
|
export interface IReqoreDropdownItem
|
|
9
10
|
extends Omit<IReqoreMenuItemProps, 'onClick' | 'rightIcon' | 'onRightIconClick'> {
|
|
10
|
-
value
|
|
11
|
-
label?: string;
|
|
11
|
+
value?: any;
|
|
12
12
|
onClick?: TDropdownItemOnClick;
|
|
13
|
+
divider?: boolean;
|
|
14
|
+
dividerAlign?: 'left' | 'center' | 'right';
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
export type TReqoreDropdownItem = IReqoreDropdownItem;
|
|
18
|
+
export type TReqoreDropdownItems = TReqoreDropdownItem[];
|
|
19
|
+
|
|
15
20
|
export interface IReqoreDropdownListProps extends IReqoreComponent {
|
|
16
|
-
items?:
|
|
21
|
+
items?: TReqoreDropdownItems;
|
|
17
22
|
multiSelect?: boolean;
|
|
18
23
|
listStyle?: React.CSSProperties;
|
|
19
24
|
width?: string;
|
|
@@ -33,20 +38,24 @@ const ReqoreDropdownList = memo(
|
|
|
33
38
|
height,
|
|
34
39
|
onItemSelect,
|
|
35
40
|
}: IReqoreDropdownListProps) => {
|
|
36
|
-
const [_items, setItems] = useState<
|
|
41
|
+
const [_items, setItems] = useState<TReqoreDropdownItems>(items);
|
|
37
42
|
const [query, setQuery] = useState<string>('');
|
|
38
43
|
|
|
39
44
|
useEffect(() => {
|
|
40
45
|
setItems(items);
|
|
41
46
|
}, [items]);
|
|
42
47
|
|
|
43
|
-
const filteredItems:
|
|
48
|
+
const filteredItems: TReqoreDropdownItems = useMemo(() => {
|
|
44
49
|
if (!filterable || query === '') {
|
|
45
50
|
return _items;
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
return _items.filter((item) => {
|
|
49
|
-
|
|
54
|
+
if (item.divider) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const text: string | undefined = item.label || item.value || item.children;
|
|
50
59
|
|
|
51
60
|
if (!text) {
|
|
52
61
|
return false;
|
|
@@ -88,15 +97,20 @@ const ReqoreDropdownList = memo(
|
|
|
88
97
|
/>
|
|
89
98
|
</>
|
|
90
99
|
)}
|
|
91
|
-
{filteredItems.map(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
{filteredItems.map(
|
|
101
|
+
({ onClick, dividerAlign, divider, ...item }: IReqoreDropdownItem, index: number) =>
|
|
102
|
+
divider ? (
|
|
103
|
+
<ReqoreMenuDivider key={index} {...item} align={dividerAlign} />
|
|
104
|
+
) : (
|
|
105
|
+
<ReqoreMenuItem
|
|
106
|
+
key={index}
|
|
107
|
+
{...item}
|
|
108
|
+
label={item.label || item.value}
|
|
109
|
+
onClick={() => handleItemClick({ ...item, onClick })}
|
|
110
|
+
rightIcon={item.selected ? 'CheckLine' : undefined}
|
|
111
|
+
/>
|
|
112
|
+
)
|
|
113
|
+
)}
|
|
100
114
|
</ReqoreMenu>
|
|
101
115
|
);
|
|
102
116
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mix } from 'polished';
|
|
1
|
+
import { rgba } from 'polished';
|
|
3
2
|
import { HTMLAttributes } from 'react';
|
|
4
3
|
import styled, { css } from 'styled-components';
|
|
5
4
|
import { TEXT_FROM_SIZE, TSizes, WEIGHT_TO_NUMBER } from '../../constants/sizes';
|
|
6
5
|
import { IReqoreTheme, TReqoreIntent } from '../../constants/theme';
|
|
7
6
|
import {
|
|
8
7
|
changeLightness,
|
|
8
|
+
createEffectGradient,
|
|
9
9
|
getColorFromMaybeString,
|
|
10
|
+
getGradientMix,
|
|
10
11
|
getReadableColorFrom,
|
|
11
12
|
} from '../../helpers/colors';
|
|
13
|
+
import { IWithReqoreMinimal } from '../../types/global';
|
|
12
14
|
|
|
13
15
|
export type TReqoreEffectColorManipulation = 'darken' | 'lighten';
|
|
14
16
|
export type TReqoreEffectColorManipulationMultiplier = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
@@ -53,83 +55,91 @@ export interface IReqoreEffect {
|
|
|
53
55
|
interactive?: boolean;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
export interface IReqoreTextEffectProps
|
|
58
|
+
export interface IReqoreTextEffectProps
|
|
59
|
+
extends HTMLAttributes<HTMLSpanElement>,
|
|
60
|
+
IWithReqoreMinimal {
|
|
57
61
|
children: React.ReactNode;
|
|
58
62
|
effect: IReqoreEffect;
|
|
59
63
|
as?: React.ElementType;
|
|
60
64
|
theme?: IReqoreTheme;
|
|
65
|
+
active?: boolean;
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
export const StyledEffect = styled.span`
|
|
64
69
|
transition: all 0.2s ease-in-out;
|
|
65
70
|
|
|
66
71
|
// If gradient was supplied
|
|
67
|
-
${({ effect, theme }: IReqoreTextEffectProps) => {
|
|
72
|
+
${({ effect, theme, minimal, active }: IReqoreTextEffectProps) => {
|
|
68
73
|
if (!effect || !effect.gradient) {
|
|
69
74
|
return undefined;
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
const gradientType: string = effect.gradient.type || 'linear';
|
|
73
|
-
const gradientColors =
|
|
74
|
-
|
|
75
|
-
(colorsString, color, percentage) =>
|
|
76
|
-
`${colorsString}, ${
|
|
77
|
-
color === 'transparent' || !effect.interactive
|
|
78
|
-
? getColorFromMaybeString(theme, color)
|
|
79
|
-
: changeLightness(getColorFromMaybeString(theme, color), 0.03)
|
|
80
|
-
} ${percentage}%`,
|
|
81
|
-
''
|
|
82
|
-
);
|
|
83
|
-
const gradientColorsActive = reduce(
|
|
78
|
+
const gradientColors = createEffectGradient(
|
|
79
|
+
theme,
|
|
84
80
|
effect.gradient.colors,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
''
|
|
81
|
+
0,
|
|
82
|
+
minimal && !active
|
|
88
83
|
);
|
|
84
|
+
const gradientColorsActive = createEffectGradient(theme, effect.gradient.colors, 0.05);
|
|
89
85
|
|
|
90
86
|
const gradientDirectionOrShape =
|
|
91
87
|
gradientType === 'linear'
|
|
92
88
|
? effect.gradient.direction || 'to right'
|
|
93
89
|
: effect.gradient.shape || 'circle';
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
let gradient = `${gradientType}-gradient(${gradientDirectionOrShape}${gradientColors}) padding-box`;
|
|
91
|
+
let gradientActive = `${gradientType}-gradient(${gradientDirectionOrShape}${gradientColorsActive}) padding-box`;
|
|
96
92
|
|
|
97
93
|
// Determine the text color based on the gradient colors
|
|
98
94
|
let color: TReqoreHexColor | undefined;
|
|
99
95
|
// Only works if there are 2 colors not more and color was not provided
|
|
100
96
|
if (!effect.color) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
97
|
+
color = getGradientMix(theme, effect.gradient.colors);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
let borderColor: string;
|
|
101
|
+
let borderHoverColor: string;
|
|
102
|
+
|
|
103
|
+
// The user provided a border color - we will use that
|
|
104
|
+
if (effect.gradient.borderColor) {
|
|
105
|
+
borderColor = `${getColorFromMaybeString(theme, effect.gradient.borderColor)}`;
|
|
106
|
+
borderHoverColor = `${changeLightness(
|
|
107
|
+
getColorFromMaybeString(theme, effect.gradient.borderColor),
|
|
108
|
+
0.15
|
|
109
|
+
)}`;
|
|
110
|
+
} else {
|
|
111
|
+
// We will use border-image and create a gradient border
|
|
112
|
+
borderColor = 'transparent';
|
|
113
|
+
borderHoverColor = 'transparent';
|
|
114
|
+
|
|
115
|
+
const borderGradientColors: string = createEffectGradient(
|
|
116
|
+
theme,
|
|
117
|
+
effect.gradient.colors,
|
|
118
|
+
0.15
|
|
119
|
+
);
|
|
120
|
+
const borderGradientColorsActive: string = createEffectGradient(
|
|
121
|
+
theme,
|
|
122
|
+
effect.gradient.colors,
|
|
123
|
+
0.25
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
gradient = `${gradient}, ${gradientType}-gradient(${gradientDirectionOrShape}${borderGradientColors}) border-box`;
|
|
127
|
+
gradientActive = `${gradientActive}, ${gradientType}-gradient(${gradientDirectionOrShape}${borderGradientColorsActive}) border-box`;
|
|
117
128
|
}
|
|
118
129
|
|
|
119
130
|
return css`
|
|
120
|
-
background
|
|
121
|
-
|
|
122
|
-
border-color: ${changeLightness(
|
|
123
|
-
getColorFromMaybeString(
|
|
124
|
-
theme,
|
|
125
|
-
effect.gradient.borderColor || Object.values(effect.gradient.colors)[0]
|
|
126
|
-
),
|
|
127
|
-
0.04
|
|
128
|
-
)} !important;
|
|
131
|
+
background: ${active ? gradientActive : gradient};
|
|
132
|
+
border-color: ${borderColor} !important;
|
|
129
133
|
|
|
130
134
|
${color &&
|
|
131
135
|
css`
|
|
132
136
|
color: ${getReadableColorFrom(getColorFromMaybeString(theme, color), false)} !important;
|
|
137
|
+
&::placeholder {
|
|
138
|
+
color: ${rgba(
|
|
139
|
+
getReadableColorFrom(getColorFromMaybeString(theme, color), false),
|
|
140
|
+
0.7
|
|
141
|
+
)} !important;
|
|
142
|
+
}
|
|
133
143
|
`}
|
|
134
144
|
|
|
135
145
|
${effect.interactive &&
|
|
@@ -139,11 +149,8 @@ export const StyledEffect = styled.span`
|
|
|
139
149
|
&:hover,
|
|
140
150
|
&:focus,
|
|
141
151
|
&:active {
|
|
142
|
-
background
|
|
143
|
-
border-color: ${
|
|
144
|
-
theme,
|
|
145
|
-
effect.gradient.borderColor || Object.values(effect.gradient.colors)[0]
|
|
146
|
-
)} !important;
|
|
152
|
+
background: ${gradientActive};
|
|
153
|
+
border-color: ${borderHoverColor} !important;
|
|
147
154
|
}
|
|
148
155
|
`}
|
|
149
156
|
`;
|
|
@@ -162,7 +169,7 @@ export const StyledEffect = styled.span`
|
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
return css`
|
|
165
|
-
box-shadow: ${effect.glow.inset ? 'inset ' : ''} 0 0 ${effect.glow.blur || 0}
|
|
172
|
+
box-shadow: ${effect.glow.inset ? 'inset ' : ''} 0 0 ${effect.glow.blur || 0}px
|
|
166
173
|
${effect.glow.size || 2}px ${getColorFromMaybeString(theme, effect.glow.color)};
|
|
167
174
|
`;
|
|
168
175
|
}}
|
|
@@ -90,9 +90,9 @@ export const StyledInput = styled(StyledEffect)<IReqoreInputStyle>`
|
|
|
90
90
|
border-radius: ${({ minimal, rounded, _size }) =>
|
|
91
91
|
minimal || !rounded ? 0 : RADIUS_FROM_SIZE[_size]}px;
|
|
92
92
|
border: ${({ minimal, theme, flat }) =>
|
|
93
|
-
!minimal && !flat ? `1px solid ${changeLightness(theme.main, 0.
|
|
93
|
+
!minimal && !flat ? `1px solid ${changeLightness(theme.main, 0.2)}` : 0};
|
|
94
94
|
border-bottom: ${({ minimal, theme, flat }) =>
|
|
95
|
-
minimal && !flat ? `0.5px solid ${changeLightness(theme.main, 0.
|
|
95
|
+
minimal && !flat ? `0.5px solid ${changeLightness(theme.main, 0.2)}` : undefined};
|
|
96
96
|
|
|
97
97
|
${({ disabled, readOnly }) =>
|
|
98
98
|
!disabled && !readOnly
|
|
@@ -101,7 +101,7 @@ export const StyledInput = styled(StyledEffect)<IReqoreInputStyle>`
|
|
|
101
101
|
&:focus,
|
|
102
102
|
&:hover {
|
|
103
103
|
outline: none;
|
|
104
|
-
border-color: ${({ theme }) => changeLightness(theme.main, 0.
|
|
104
|
+
border-color: ${({ theme }) => changeLightness(theme.main, 0.25)};
|
|
105
105
|
}
|
|
106
106
|
`
|
|
107
107
|
: undefined}
|
|
@@ -165,7 +165,7 @@ const InternalPopover: React.FC<IReqoreInternalPopoverProps> = ({
|
|
|
165
165
|
{
|
|
166
166
|
name: 'offset',
|
|
167
167
|
options: {
|
|
168
|
-
offset: [0, noArrow ?
|
|
168
|
+
offset: [0, noArrow ? 5 : 10],
|
|
169
169
|
},
|
|
170
170
|
},
|
|
171
171
|
{
|
|
@@ -188,10 +188,10 @@ const InternalPopover: React.FC<IReqoreInternalPopoverProps> = ({
|
|
|
188
188
|
}, [popperRef]);
|
|
189
189
|
|
|
190
190
|
useEffect(() => {
|
|
191
|
-
if (attributes
|
|
191
|
+
if (attributes.popper?.['data-popper-reference-hidden']) {
|
|
192
192
|
removePopover?.(id);
|
|
193
193
|
}
|
|
194
|
-
}, [attributes
|
|
194
|
+
}, [attributes.popper]);
|
|
195
195
|
|
|
196
196
|
/* Getting the x and y values from the transform property of the popper element. */
|
|
197
197
|
const translateValues = styles.popper.transform
|
|
@@ -7,11 +7,12 @@ import { IWithReqoreEffect, IWithReqoreSize } from '../../types/global';
|
|
|
7
7
|
import { IReqoreEffect, StyledTextEffect } from '../Effect';
|
|
8
8
|
|
|
9
9
|
export interface IReqoreMenuDividerProps
|
|
10
|
-
extends React.HTMLAttributes<HTMLDivElement>,
|
|
10
|
+
extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>,
|
|
11
11
|
IWithReqoreEffect,
|
|
12
12
|
IWithReqoreSize {
|
|
13
|
-
label?: string;
|
|
13
|
+
label?: string | number;
|
|
14
14
|
margin?: 'left' | 'right' | 'both';
|
|
15
|
+
align?: 'left' | 'center' | 'right';
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export const StyledMenuDivider = styled(StyledTextEffect)`
|
|
@@ -38,7 +39,17 @@ export const StyledMenuDivider = styled(StyledTextEffect)`
|
|
|
38
39
|
`;
|
|
39
40
|
|
|
40
41
|
const ReqoreMenuDivider = forwardRef<HTMLDivElement, IReqoreMenuDividerProps>(
|
|
41
|
-
(
|
|
42
|
+
(
|
|
43
|
+
{
|
|
44
|
+
label,
|
|
45
|
+
className,
|
|
46
|
+
effect,
|
|
47
|
+
size = 'normal',
|
|
48
|
+
align = 'center',
|
|
49
|
+
...rest
|
|
50
|
+
}: IReqoreMenuDividerProps,
|
|
51
|
+
ref: any
|
|
52
|
+
) => (
|
|
42
53
|
<StyledMenuDivider
|
|
43
54
|
as='div'
|
|
44
55
|
{...rest}
|
|
@@ -49,7 +60,7 @@ const ReqoreMenuDivider = forwardRef<HTMLDivElement, IReqoreMenuDividerProps>(
|
|
|
49
60
|
{
|
|
50
61
|
uppercase: true,
|
|
51
62
|
spaced: 2,
|
|
52
|
-
textAlign:
|
|
63
|
+
textAlign: align,
|
|
53
64
|
textSize: getOneLessSize(size),
|
|
54
65
|
weight: 'bold',
|
|
55
66
|
...effect,
|
|
@@ -81,10 +81,10 @@ const ReqoreMenu = forwardRef<HTMLDivElement, IReqoreMenuProps>(
|
|
|
81
81
|
React.cloneElement(child, {
|
|
82
82
|
_insidePopover,
|
|
83
83
|
_popoverId,
|
|
84
|
-
customTheme: child?.
|
|
84
|
+
customTheme: child.props?.customTheme || theme,
|
|
85
85
|
wrap: wrapText,
|
|
86
|
-
flat: 'flat' in child
|
|
87
|
-
minimal: 'minimal' in child
|
|
86
|
+
flat: 'flat' in (child.props || {}) ? child.props.flat : flat,
|
|
87
|
+
minimal: 'minimal' in (child.props || {}) ? child.props.minimal : minimal,
|
|
88
88
|
})
|
|
89
89
|
: null;
|
|
90
90
|
})}
|