@fibery/ui-kit 1.29.0 → 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 +5 -5
- 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 +1 -1
- 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/select/select-in-popover.tsx +1 -1
- package/src/tooltip.tsx +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"src/antd/styles.ts",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"screenfull": "6.0.1",
|
|
77
77
|
"ua-parser-js": "0.7.24",
|
|
78
78
|
"@fibery/emoji-data": "2.6.0",
|
|
79
|
-
"@fibery/
|
|
80
|
-
"@fibery/
|
|
79
|
+
"@fibery/react": "1.4.0",
|
|
80
|
+
"@fibery/helpers": "1.3.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"react": "^18.2.0",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
"svgo": "2.8.0",
|
|
111
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",
|
|
@@ -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
|
@@ -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],
|
|
@@ -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';
|
|
@@ -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}
|