@fibery/ui-kit 1.28.4 → 1.29.1
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/package.json +8 -8
- package/src/actions-menu/actions-menu-item.tsx +15 -4
- package/src/actions-menu/actions-menu-props.tsx +1 -0
- package/src/actions-menu/actions-menu.tsx +2 -0
- package/src/actions-menu/utils/insert-separators.tsx +1 -3
- package/src/design-system.ts +5 -3
- package/src/dropdown-menu/index.tsx +3 -2
- package/src/icons/ast/LayoutDouble.ts +8 -0
- package/src/icons/ast/LayoutSingle.ts +8 -0
- package/src/icons/ast/UserRole.ts +8 -0
- package/src/icons/ast/index.tsx +3 -0
- package/src/icons/react/LayoutDouble.tsx +12 -0
- package/src/icons/react/LayoutSingle.tsx +12 -0
- package/src/icons/react/UserRole.tsx +12 -0
- package/src/icons/react/index.tsx +3 -0
- package/src/loaders.tsx +1 -1
- package/src/select/select-in-popover.tsx +1 -1
- package/src/tooltip.tsx +3 -1
- /package/src/{pallete.ts → palette.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"src/antd/styles.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"src/select",
|
|
21
21
|
"src/error-alert",
|
|
22
22
|
"src/actions-menu",
|
|
23
|
-
"src/
|
|
23
|
+
"src/palette.ts",
|
|
24
24
|
"src/tooltip.tsx",
|
|
25
25
|
"src/tooltip-if-overflown.tsx",
|
|
26
26
|
"src/back-button.tsx",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"react-virtuoso": "4.6.0",
|
|
76
76
|
"screenfull": "6.0.1",
|
|
77
77
|
"ua-parser-js": "0.7.24",
|
|
78
|
-
"@fibery/emoji-data": "2.
|
|
79
|
-
"@fibery/
|
|
80
|
-
"@fibery/
|
|
78
|
+
"@fibery/emoji-data": "2.6.0",
|
|
79
|
+
"@fibery/react": "1.4.0",
|
|
80
|
+
"@fibery/helpers": "1.3.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"react": "^18.2.0",
|
|
@@ -108,10 +108,10 @@
|
|
|
108
108
|
"react-dom": "18.2.0",
|
|
109
109
|
"svg-parser": "2.0.4",
|
|
110
110
|
"svgo": "2.8.0",
|
|
111
|
-
"typescript": "5.
|
|
111
|
+
"typescript": "5.4.3",
|
|
112
112
|
"unist-util-reduce": "0.2.2",
|
|
113
|
-
"@fibery/
|
|
114
|
-
"@fibery/
|
|
113
|
+
"@fibery/eslint-config": "8.6.0",
|
|
114
|
+
"@fibery/babel-preset": "7.4.0"
|
|
115
115
|
},
|
|
116
116
|
"jest": {
|
|
117
117
|
"testEnvironment": "jsdom",
|
|
@@ -117,10 +117,11 @@ export type ActionsMenuItemProps = {
|
|
|
117
117
|
loading?: boolean;
|
|
118
118
|
checked?: boolean;
|
|
119
119
|
children: ReactNode;
|
|
120
|
+
className?: string;
|
|
120
121
|
};
|
|
121
122
|
|
|
122
123
|
const ActionsMenuItemComponent: React.FC<
|
|
123
|
-
ActionsMenuItemProps & {id?: string; showWarning?: boolean; onSelect: (e: Event) => void}
|
|
124
|
+
ActionsMenuItemProps & {id?: string; showWarning?: boolean; onSelect: (e: Event) => void; className?: string}
|
|
124
125
|
> = memo(function ActionsMenuItemComponent({
|
|
125
126
|
id,
|
|
126
127
|
testId,
|
|
@@ -135,6 +136,7 @@ const ActionsMenuItemComponent: React.FC<
|
|
|
135
136
|
loading,
|
|
136
137
|
checked,
|
|
137
138
|
children,
|
|
139
|
+
className,
|
|
138
140
|
}) {
|
|
139
141
|
const {MenuPrimitive} = useActionsMenuContext();
|
|
140
142
|
const setActiveDangerousRow = useSetActiveDangerousRow();
|
|
@@ -167,7 +169,8 @@ const ActionsMenuItemComponent: React.FC<
|
|
|
167
169
|
rowCss,
|
|
168
170
|
dangerous && dangerousItemCss,
|
|
169
171
|
showWarning && dangerousConfirmationCss,
|
|
170
|
-
description && rowWithDescriptionCss
|
|
172
|
+
description && rowWithDescriptionCss,
|
|
173
|
+
className
|
|
171
174
|
)}
|
|
172
175
|
disabled={disabled}
|
|
173
176
|
>
|
|
@@ -191,11 +194,19 @@ const ActionsMenuItemComponent: React.FC<
|
|
|
191
194
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
192
195
|
const noop = () => {};
|
|
193
196
|
|
|
194
|
-
export const ActionsMenuItem: React.FC<ActionsMenuItemProps> = (props) => {
|
|
197
|
+
export const ActionsMenuItem: React.FC<ActionsMenuItemProps> = ({className, ...props}) => {
|
|
195
198
|
const id = useId();
|
|
196
199
|
const activeDangerousRow = useActiveDangerousRow();
|
|
197
200
|
|
|
198
201
|
const onSelect = useCallbackRef(props.onSelect || noop);
|
|
199
202
|
|
|
200
|
-
return
|
|
203
|
+
return (
|
|
204
|
+
<ActionsMenuItemComponent
|
|
205
|
+
{...props}
|
|
206
|
+
className={className}
|
|
207
|
+
id={id}
|
|
208
|
+
showWarning={activeDangerousRow === id}
|
|
209
|
+
onSelect={onSelect}
|
|
210
|
+
/>
|
|
211
|
+
);
|
|
201
212
|
};
|
|
@@ -10,6 +10,7 @@ export type ActionsMenuProps = {
|
|
|
10
10
|
align?: ContentProps["align"];
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
portalled?: boolean;
|
|
13
|
+
container?: HTMLElement | null | undefined;
|
|
13
14
|
wide?: boolean;
|
|
14
15
|
/** The controlled open state of the ActionsMenu. Must be used in conjunction with onOpenChange. */
|
|
15
16
|
open?: boolean;
|
|
@@ -27,6 +27,7 @@ export const ActionsMenu = ({
|
|
|
27
27
|
onOpenChange,
|
|
28
28
|
children,
|
|
29
29
|
portalled,
|
|
30
|
+
container,
|
|
30
31
|
disabled,
|
|
31
32
|
contentStyles,
|
|
32
33
|
modal,
|
|
@@ -55,6 +56,7 @@ export const ActionsMenu = ({
|
|
|
55
56
|
sideOffset={sideOffset}
|
|
56
57
|
className={cx(wide && wideCss, contentStyles)}
|
|
57
58
|
portalled={portalled}
|
|
59
|
+
container={container}
|
|
58
60
|
collisionPadding={collisionPadding}
|
|
59
61
|
onCloseAutoFocus={autoFocusOnClose ? undefined : preventDefault}
|
|
60
62
|
>
|
|
@@ -9,8 +9,7 @@ import {ActionsMenuSeparator} from "../actions-menu-separator";
|
|
|
9
9
|
*/
|
|
10
10
|
export const insertSeparators = (sections: (React.ReactNode[] | React.ReactNode)[]) => {
|
|
11
11
|
const nodes: React.ReactNode[] = [];
|
|
12
|
-
|
|
13
|
-
sections.forEach((section, idx) => {
|
|
12
|
+
sections.filter(Boolean).forEach((section, idx) => {
|
|
14
13
|
if (Array.isArray(section)) {
|
|
15
14
|
const filtered = section.filter(Boolean);
|
|
16
15
|
if (nodes.length > 0 && filtered.length > 0) {
|
|
@@ -23,6 +22,5 @@ export const insertSeparators = (sections: (React.ReactNode[] | React.ReactNode)
|
|
|
23
22
|
nodes.push(section);
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
|
-
|
|
27
25
|
return nodes;
|
|
28
26
|
};
|
package/src/design-system.ts
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
whiteA,
|
|
18
18
|
yellow,
|
|
19
19
|
yellowDark,
|
|
20
|
-
} from "./
|
|
20
|
+
} from "./palette";
|
|
21
21
|
import {a11yColor} from "./a11y-color";
|
|
22
22
|
import {createInlineTheme as createInlineStyles, varPrefix} from "./create-inline-theme";
|
|
23
23
|
import {ThemeMode} from "./theme-settings";
|
|
@@ -158,7 +158,7 @@ export const themeColors = {
|
|
|
158
158
|
menuSelectedTextColor: [slate.slate2, slate.slate2],
|
|
159
159
|
menuFooterColor: [getOpacities(whiteA.whiteA0).opacity20, getOpacities(slateDark.slate3).opacity40],
|
|
160
160
|
menuFooterHoverColor: [getOpacities(whiteA.whiteA0).opacity60, slateDark.slate4],
|
|
161
|
-
menuIconColor: [getOpacities(slate.
|
|
161
|
+
menuIconColor: [getOpacities(slate.slate11).opacity90, getOpacities(slateDark.slate11).opacity90],
|
|
162
162
|
menuSelectedIconColor: [getOpacities(slate.slate1).opacity90, getOpacities(slate.slate1).opacity90],
|
|
163
163
|
textColor: [slateDark.slate3, slate.slate6],
|
|
164
164
|
textSelectionColor: [getOpacities(blue.blue10).opacity20, getOpacities(blueDark.blue10).opacity40],
|
|
@@ -448,6 +448,7 @@ export const themeColors = {
|
|
|
448
448
|
colorBgNotificationSelected: [indigo.indigo3, indigoDark.indigo4],
|
|
449
449
|
colorBgNotificationSelectedHover: [indigo.indigo4, indigoDark.indigo6],
|
|
450
450
|
disabledInversedTextColor: [shades.opacity25, lights.opacity25],
|
|
451
|
+
success: [teal.teal9, tealDark.teal9],
|
|
451
452
|
danger: [red.red9, redDark.red10],
|
|
452
453
|
active: [red.red9, redDark.red10],
|
|
453
454
|
warning: ["#FFD41E", "#FFD41E"],
|
|
@@ -691,7 +692,7 @@ export const getIconColor = _.memoize(
|
|
|
691
692
|
export const cardTypeColors = [
|
|
692
693
|
"#4A4A4A",
|
|
693
694
|
"#6A849B",
|
|
694
|
-
"#
|
|
695
|
+
"#99A2AB",
|
|
695
696
|
"#D40915",
|
|
696
697
|
"#E72065",
|
|
697
698
|
"#9C2BAF",
|
|
@@ -778,6 +779,7 @@ export const layout = {
|
|
|
778
779
|
viewSetupWidth: "30vw",
|
|
779
780
|
viewSetupMinWidth: 380,
|
|
780
781
|
inputHeight: 36, //TODO: merge input and item height?
|
|
782
|
+
timelineToolbarHeight: 60,
|
|
781
783
|
timelineLineHeight: 48,
|
|
782
784
|
timelineGroupPadding: 0,
|
|
783
785
|
timelineItemHeightRatio: 36 / 48,
|
|
@@ -98,6 +98,7 @@ const dropdownMenuContentStyles = css`
|
|
|
98
98
|
export type ContentProps = DropdownMenuPrimitive.DropdownMenuContentProps & {
|
|
99
99
|
/* render content in portal. NOTE: Changing this prop will lead to re-mount */
|
|
100
100
|
portalled?: boolean;
|
|
101
|
+
container?: HTMLElement | null | undefined;
|
|
101
102
|
collisionPadding?: number;
|
|
102
103
|
};
|
|
103
104
|
|
|
@@ -111,11 +112,11 @@ const onContentKeyDown = (e: React.KeyboardEvent) => {
|
|
|
111
112
|
};
|
|
112
113
|
|
|
113
114
|
export const Content = forwardRef<HTMLDivElement, ContentProps>(function DropdownMenuContent(
|
|
114
|
-
{className, portalled = true, collisionPadding = space.s12, ...rest},
|
|
115
|
+
{className, portalled = true, container, collisionPadding = space.s12, ...rest},
|
|
115
116
|
ref
|
|
116
117
|
) {
|
|
117
118
|
return (
|
|
118
|
-
<Wrap if={portalled} with={DropdownMenuPrimitive.Portal}>
|
|
119
|
+
<Wrap if={portalled} with={DropdownMenuPrimitive.Portal} container={container}>
|
|
119
120
|
<DropdownMenuPrimitive.Content
|
|
120
121
|
onKeyDown={onContentKeyDown}
|
|
121
122
|
ref={ref}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
// This icon file is generated automatically.
|
|
3
|
+
|
|
4
|
+
import { IconDefinition } from '../types';
|
|
5
|
+
|
|
6
|
+
const LayoutDouble: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M4.25 4.5a.75.75 0 0 0-.75.75v9.5c0 .414.336.75.75.75h11.5a.75.75 0 0 0 .75-.75v-9.5a.75.75 0 0 0-.75-.75H4.25ZM2 5.25A2.25 2.25 0 0 1 4.25 3h11.5A2.25 2.25 0 0 1 18 5.25v9.5A2.25 2.25 0 0 1 15.75 17H4.25A2.25 2.25 0 0 1 2 14.75v-9.5ZM12.75 6a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5h-1.5ZM12 9.75a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5h-1.5a.75.75 0 0 1-.75-.75ZM5.5 6a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5H10a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 10 6H5.5Z"},"children":[]}],"metadata":""}]},"name":"layout-double"};
|
|
7
|
+
|
|
8
|
+
export default LayoutDouble;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
// This icon file is generated automatically.
|
|
3
|
+
|
|
4
|
+
import { IconDefinition } from '../types';
|
|
5
|
+
|
|
6
|
+
const LayoutSingle: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M4.25 4.5a.75.75 0 0 0-.75.75v9.5c0 .414.336.75.75.75h11.5a.75.75 0 0 0 .75-.75v-9.5a.75.75 0 0 0-.75-.75H4.25ZM2 5.25A2.25 2.25 0 0 1 4.25 3h11.5A2.25 2.25 0 0 1 18 5.25v9.5A2.25 2.25 0 0 1 15.75 17H4.25A2.25 2.25 0 0 1 2 14.75v-9.5Zm3 1.5A.75.75 0 0 1 5.75 6h2.5a.75.75 0 0 1 0 1.5h-2.5A.75.75 0 0 1 5 6.75ZM5.5 9a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-9Z"},"children":[]}],"metadata":""}]},"name":"layout-single"};
|
|
7
|
+
|
|
8
|
+
export default LayoutSingle;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
// This icon file is generated automatically.
|
|
3
|
+
|
|
4
|
+
import { IconDefinition } from '../types';
|
|
5
|
+
|
|
6
|
+
const UserRole: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M6.804 1.75h6.392c.442 0 .818 0 1.126.025.325.027.64.085.942.238.455.232.824.602 1.056 1.057.154.301.212.617.238.94.025.31.025.686.025 1.127v9.726c0 .441 0 .817-.025 1.126-.026.324-.084.64-.238.941a2.417 2.417 0 0 1-1.056 1.057c-.302.153-.617.211-.942.238-.308.025-.684.025-1.126.025H6.804c-.442 0-.818 0-1.126-.025-.325-.027-.64-.085-.942-.238A2.417 2.417 0 0 1 3.68 16.93c-.154-.302-.212-.618-.238-.942-.025-.309-.025-.685-.025-1.126V5.137c0-.441 0-.817.025-1.126.026-.324.084-.64.238-.941a2.417 2.417 0 0 1 1.056-1.057c.302-.153.617-.211.942-.238.308-.025.684-.025 1.126-.025ZM5.8 3.27c-.232.02-.328.052-.383.08a.917.917 0 0 0-.4.4c-.028.055-.061.152-.08.383-.02.24-.02.555-.02 1.034v9.666c0 .48 0 .794.02 1.034.019.232.052.328.08.383a.917.917 0 0 0 .4.4c.055.028.151.06.383.08.24.02.554.02 1.033.02h6.334c.479 0 .793 0 1.033-.02.232-.02.328-.052.383-.08a.917.917 0 0 0 .4-.4c.028-.055.061-.151.08-.383.02-.24.02-.555.02-1.034V5.167c0-.48 0-.794-.02-1.034-.019-.231-.052-.328-.08-.382a.917.917 0 0 0-.4-.401c-.055-.028-.151-.06-.383-.08-.24-.02-.554-.02-1.033-.02H6.833c-.479 0-.793 0-1.033.02ZM7.583 5a.75.75 0 0 1 .75-.75h3.334a.75.75 0 0 1 0 1.5H8.333a.75.75 0 0 1-.75-.75Zm.834 4.167a1.583 1.583 0 1 1 3.166 0 1.583 1.583 0 0 1-3.166 0ZM10 13.25c-.982 0-1.64.563-1.772 1.098a.75.75 0 0 1-1.456-.362c.34-1.368 1.742-2.236 3.228-2.236 1.486 0 2.888.868 3.228 2.236a.75.75 0 0 1-1.456.362c-.133-.535-.79-1.098-1.772-1.098Z"},"children":[]}],"metadata":""}]},"name":"user-role"};
|
|
7
|
+
|
|
8
|
+
export default UserRole;
|
package/src/icons/ast/index.tsx
CHANGED
|
@@ -111,6 +111,8 @@ export { default as InvitePeople } from './InvitePeople';
|
|
|
111
111
|
export { default as Items } from './Items';
|
|
112
112
|
export { default as Jira } from './Jira';
|
|
113
113
|
export { default as Lab } from './Lab';
|
|
114
|
+
export { default as LayoutDouble } from './LayoutDouble';
|
|
115
|
+
export { default as LayoutSingle } from './LayoutSingle';
|
|
114
116
|
export { default as LeftPanel } from './LeftPanel';
|
|
115
117
|
export { default as Levels } from './Levels';
|
|
116
118
|
export { default as LineDivider } from './LineDivider';
|
|
@@ -243,6 +245,7 @@ export { default as TypeText } from './TypeText';
|
|
|
243
245
|
export { default as TypeUrl } from './TypeUrl';
|
|
244
246
|
export { default as Upgrade } from './Upgrade';
|
|
245
247
|
export { default as UsbFlashDrive } from './UsbFlashDrive';
|
|
248
|
+
export { default as UserRole } from './UserRole';
|
|
246
249
|
export { default as ViewBoard } from './ViewBoard';
|
|
247
250
|
export { default as ViewCalendar } from './ViewCalendar';
|
|
248
251
|
export { default as ViewCanvas } from './ViewCanvas';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import LayoutDoubleSvg from '../ast/LayoutDouble';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const LayoutDouble = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={LayoutDoubleSvg} />;
|
|
10
|
+
|
|
11
|
+
LayoutDouble.displayName = 'LayoutDouble';
|
|
12
|
+
export default LayoutDouble;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import LayoutSingleSvg from '../ast/LayoutSingle';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const LayoutSingle = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={LayoutSingleSvg} />;
|
|
10
|
+
|
|
11
|
+
LayoutSingle.displayName = 'LayoutSingle';
|
|
12
|
+
export default LayoutSingle;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import UserRoleSvg from '../ast/UserRole';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const UserRole = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={UserRoleSvg} />;
|
|
10
|
+
|
|
11
|
+
UserRole.displayName = 'UserRole';
|
|
12
|
+
export default UserRole;
|
|
@@ -111,6 +111,8 @@ export { default as InvitePeople } from './InvitePeople';
|
|
|
111
111
|
export { default as Items } from './Items';
|
|
112
112
|
export { default as Jira } from './Jira';
|
|
113
113
|
export { default as Lab } from './Lab';
|
|
114
|
+
export { default as LayoutDouble } from './LayoutDouble';
|
|
115
|
+
export { default as LayoutSingle } from './LayoutSingle';
|
|
114
116
|
export { default as LeftPanel } from './LeftPanel';
|
|
115
117
|
export { default as Levels } from './Levels';
|
|
116
118
|
export { default as LineDivider } from './LineDivider';
|
|
@@ -243,6 +245,7 @@ export { default as TypeText } from './TypeText';
|
|
|
243
245
|
export { default as TypeUrl } from './TypeUrl';
|
|
244
246
|
export { default as Upgrade } from './Upgrade';
|
|
245
247
|
export { default as UsbFlashDrive } from './UsbFlashDrive';
|
|
248
|
+
export { default as UserRole } from './UserRole';
|
|
246
249
|
export { default as ViewBoard } from './ViewBoard';
|
|
247
250
|
export { default as ViewCalendar } from './ViewCalendar';
|
|
248
251
|
export { default as ViewCanvas } from './ViewCanvas';
|
package/src/loaders.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import {getShiftStyle} from "./icons/get-shift-style";
|
|
|
7
7
|
import {LoadingSausage} from "./loading-sausage";
|
|
8
8
|
import {useTheme} from "./theme-provider";
|
|
9
9
|
|
|
10
|
-
export const LoadingView = styled.div<{absolute
|
|
10
|
+
export const LoadingView = styled.div<{absolute?: boolean; backgroundColor?: string}>`
|
|
11
11
|
position: ${(props) => (props.absolute ? "absolute" : "static")};
|
|
12
12
|
height: ${(props) => (props.absolute ? "auto" : "100%")};
|
|
13
13
|
background: ${(props) => props.backgroundColor || themeVars.mainBg};
|
|
@@ -123,7 +123,7 @@ type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = {
|
|
|
123
123
|
virtualized?: boolean;
|
|
124
124
|
defaultMenuIsOpen?: boolean;
|
|
125
125
|
placeholder?: string;
|
|
126
|
-
noOptionsMessage
|
|
126
|
+
noOptionsMessage?: () => string | JSX.Element | null;
|
|
127
127
|
options: OptionsOrGroups<Option, Group>;
|
|
128
128
|
filterOption?: SelectProps<Option>["filterOption"];
|
|
129
129
|
inputValue?: string;
|
package/src/tooltip.tsx
CHANGED
|
@@ -98,6 +98,7 @@ export type TooltipProps = Omit<TooltipPrimitive.TooltipTriggerProps, "title"> &
|
|
|
98
98
|
description?: ReactNode;
|
|
99
99
|
setContentElement?: (el: HTMLDivElement | null) => void;
|
|
100
100
|
content?: ReactNode;
|
|
101
|
+
container?: HTMLElement | null | undefined;
|
|
101
102
|
side?: TooltipPrimitive.TooltipContentProps["side"];
|
|
102
103
|
sideOffset?: TooltipPrimitive.TooltipContentProps["sideOffset"];
|
|
103
104
|
align?: TooltipPrimitive.TooltipContentProps["align"];
|
|
@@ -144,6 +145,7 @@ export const Tooltip = forwardRef<HTMLButtonElement, TooltipProps>(
|
|
|
144
145
|
keepOnClick,
|
|
145
146
|
disabled,
|
|
146
147
|
setContentElement,
|
|
148
|
+
container,
|
|
147
149
|
...triggerProps
|
|
148
150
|
},
|
|
149
151
|
ref
|
|
@@ -170,7 +172,7 @@ export const Tooltip = forwardRef<HTMLButtonElement, TooltipProps>(
|
|
|
170
172
|
<TooltipPrimitive.Trigger ref={ref} {...triggerProps} {...keepOnClickProps} asChild>
|
|
171
173
|
{children}
|
|
172
174
|
</TooltipPrimitive.Trigger>
|
|
173
|
-
<TooltipPrimitive.Portal>
|
|
175
|
+
<TooltipPrimitive.Portal container={container}>
|
|
174
176
|
<TooltipPrimitive.Content
|
|
175
177
|
ref={setContentElement}
|
|
176
178
|
side={side}
|
|
File without changes
|