@fibery/ui-kit 1.40.1 → 1.40.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +3 -3
- package/src/design-system.ts +6 -3
- package/src/icons/ast/Dividers.ts +8 -0
- package/src/icons/ast/DoubleLine.ts +8 -0
- package/src/icons/ast/LineJump.ts +8 -0
- package/src/icons/ast/index.tsx +3 -0
- package/src/icons/react/Dividers.tsx +13 -0
- package/src/icons/react/DoubleLine.tsx +13 -0
- package/src/icons/react/LineJump.tsx +13 -0
- package/src/icons/react/index.tsx +3 -0
- package/src/icons/svg/dividers.svg +3 -0
- package/src/icons/svg/double-line.svg +3 -0
- package/src/icons/svg/line-jump.svg +4 -0
- package/src/popover/index.tsx +19 -12
- package/src/toast/toast.tsx +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"dependencies": {
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"svgo": "2.8.0",
|
|
84
84
|
"typescript": "5.9.3",
|
|
85
85
|
"unist-util-reduce": "0.2.2",
|
|
86
|
-
"@fibery/
|
|
87
|
-
"@fibery/
|
|
86
|
+
"@fibery/babel-preset": "7.4.1",
|
|
87
|
+
"@fibery/eslint-config": "8.6.2"
|
|
88
88
|
},
|
|
89
89
|
"jest": {
|
|
90
90
|
"testEnvironment": "jsdom",
|
package/src/design-system.ts
CHANGED
|
@@ -532,7 +532,7 @@ export const themeColors = {
|
|
|
532
532
|
todayMarkerColor: [red.red8, redDark.red6],
|
|
533
533
|
viewBgOverlayColor: [getOpacities(slate.slate8).opacity20, getOpacities(slateDark.slate1).opacity60],
|
|
534
534
|
floatEditorMenuBg: [slate.slate1, slateDark.slate6],
|
|
535
|
-
floatEditorActiveColor: [
|
|
535
|
+
floatEditorActiveColor: [indigo.indigo11, indigoDark.indigo11],
|
|
536
536
|
planBadgeBgColor: [yellow.yellow10, yellowDark.yellow10],
|
|
537
537
|
commentColor: [getOpacities(yellow.yellow6).opacity60, getOpacities(yellowDark.yellow9).opacity40],
|
|
538
538
|
cellBackgroundColor: [slate.slate2, slateDark.slate2],
|
|
@@ -685,8 +685,8 @@ export const themeColors = {
|
|
|
685
685
|
getOpacities(indigo.indigo11).opacity80,
|
|
686
686
|
getOpacities(indigoDark.indigo11).opacity80,
|
|
687
687
|
],
|
|
688
|
-
colorTextButtonSoftNeutral: [slate.
|
|
689
|
-
colorTextButtonSoftNeutralActive: [getOpacities(slate.
|
|
688
|
+
colorTextButtonSoftNeutral: [slate.slate11, slateDark.slate11],
|
|
689
|
+
colorTextButtonSoftNeutralActive: [getOpacities(slate.slate11).opacity80, getOpacities(slateDark.slate11).opacity80],
|
|
690
690
|
colorTextButtonSoftDestructive: [red.red11, redDark.red11],
|
|
691
691
|
colorTextButtonSoftDestructiveActive: [getOpacities(red.red11).opacity80, getOpacities(redDark.red11).opacity80],
|
|
692
692
|
colorIconButtonSoftAccent: [indigo.indigo11, indigoDark.indigo11],
|
|
@@ -740,6 +740,9 @@ export const themeColors = {
|
|
|
740
740
|
|
|
741
741
|
// Text editor
|
|
742
742
|
colorBgEditorImageZoomed: [slate.slate3, slateDark.slate6],
|
|
743
|
+
colorMermaidPrimaryColor: [slate.slate2, slateDark.slate8],
|
|
744
|
+
colorMermaidPrimaryBorderColor: [slate.slate9, slateDark.slate9],
|
|
745
|
+
colorMermaidLineColor: [slate.slate10, slateDark.slate9],
|
|
743
746
|
|
|
744
747
|
//Whiteboard
|
|
745
748
|
instrumentsMenuBg: [getOpacities(whiteA.whiteA0).opacity100, getOpacities(slateDark.slate4).opacity100],
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
// This icon file is generated automatically.
|
|
3
|
+
|
|
4
|
+
import { IconDefinition } from '../types';
|
|
5
|
+
|
|
6
|
+
const Dividers: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"width":20,"height":20},"children":[{"type":"element","tagName":"path","properties":{"d":"M5 16.027 5.221 18l1.435-1.369L9.11 9.876a3.465 3.465 0 0 1-1.568-.872L5 16.027Zm7.45-7.023a3.51 3.51 0 0 1-1.569.872l2.454 6.755L14.77 18l.23-1.973-2.55-7.023Zm.15-2.026a2.665 2.665 0 0 0-1.719-3.04v-1.05A.89.89 0 0 0 9.996 2a.89.89 0 0 0-.886.889v1.049a2.675 2.675 0 0 0-1.772 2.506 2.661 2.661 0 0 0 3.154 2.623 2.674 2.674 0 0 0 2.108-2.09Zm-2.604.355a.89.89 0 0 1 0-1.777.89.89 0 0 1 0 1.777Z"},"children":[]}],"metadata":""}]},"name":"dividers"};
|
|
7
|
+
|
|
8
|
+
export default Dividers;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
// This icon file is generated automatically.
|
|
3
|
+
|
|
4
|
+
import { IconDefinition } from '../types';
|
|
5
|
+
|
|
6
|
+
const DoubleLine: 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":"M1.5 7.5a.75.75 0 0 1 .75-.75h15.5a.75.75 0 0 1 0 1.5H2.25a.75.75 0 0 1-.75-.75Zm0 5a.75.75 0 0 1 .75-.75h15.5a.75.75 0 0 1 0 1.5H2.25a.75.75 0 0 1-.75-.75Z"},"children":[]}],"metadata":""}]},"name":"double-line"};
|
|
7
|
+
|
|
8
|
+
export default DoubleLine;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
// This icon file is generated automatically.
|
|
3
|
+
|
|
4
|
+
import { IconDefinition } from '../types';
|
|
5
|
+
|
|
6
|
+
const LineJump: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"d":"M3.05 6.11h2.69c.37 0 .72.14.98.4L9.4 9.19a.83.83 0 0 0 1.18 0 .83.83 0 0 0 0-1.18L7.9 5.33a3.03 3.03 0 0 0-2.16-.89H3.05a.83.83 0 0 0 0 1.66v.01Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"m18.63 10.79-3.06-3.05a.83.83 0 1 0-1.17 1.17l1.63 1.64H.83a.83.83 0 1 0 0 1.66h15.2l-1.63 1.63a.83.83 0 1 0 1.17 1.18l3.05-3.05a.831.831 0 0 0 0-1.18h.01Z"},"children":[]}],"metadata":""}]},"name":"line-jump"};
|
|
7
|
+
|
|
8
|
+
export default LineJump;
|
package/src/icons/ast/index.tsx
CHANGED
|
@@ -96,9 +96,11 @@ export { default as DateRange } from './DateRange';
|
|
|
96
96
|
export { default as Delete } from './Delete';
|
|
97
97
|
export { default as Demo } from './Demo';
|
|
98
98
|
export { default as Dependency } from './Dependency';
|
|
99
|
+
export { default as Dividers } from './Dividers';
|
|
99
100
|
export { default as Document } from './Document';
|
|
100
101
|
export { default as DoubleArrowLeft } from './DoubleArrowLeft';
|
|
101
102
|
export { default as DoubleArrowRight } from './DoubleArrowRight';
|
|
103
|
+
export { default as DoubleLine } from './DoubleLine';
|
|
102
104
|
export { default as DragBlockHandleSingle } from './DragBlockHandleSingle';
|
|
103
105
|
export { default as DragBlockHandle } from './DragBlockHandle';
|
|
104
106
|
export { default as DragHandle } from './DragHandle';
|
|
@@ -190,6 +192,7 @@ export { default as LeftPanel } from './LeftPanel';
|
|
|
190
192
|
export { default as LevelPlus } from './LevelPlus';
|
|
191
193
|
export { default as Levels } from './Levels';
|
|
192
194
|
export { default as LineDivider } from './LineDivider';
|
|
195
|
+
export { default as LineJump } from './LineJump';
|
|
193
196
|
export { default as Link } from './Link';
|
|
194
197
|
export { default as LocationEdit } from './LocationEdit';
|
|
195
198
|
export { default as LockOutline } from './LockOutline';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import {forwardRef} from 'react';
|
|
4
|
+
import DividersSvg from '../ast/Dividers';
|
|
5
|
+
import { Icon } from '../Icon';
|
|
6
|
+
import { IconBaseProps } from '../types';
|
|
7
|
+
|
|
8
|
+
const Dividers = forwardRef<SVGSVGElement, IconBaseProps>(function Dividers(
|
|
9
|
+
props: IconBaseProps,
|
|
10
|
+
ref: React.Ref<SVGSVGElement>
|
|
11
|
+
) {return <Icon {...props} className={props.className} ref={ref} icon={DividersSvg} />});
|
|
12
|
+
|
|
13
|
+
export default Dividers;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import {forwardRef} from 'react';
|
|
4
|
+
import DoubleLineSvg from '../ast/DoubleLine';
|
|
5
|
+
import { Icon } from '../Icon';
|
|
6
|
+
import { IconBaseProps } from '../types';
|
|
7
|
+
|
|
8
|
+
const DoubleLine = forwardRef<SVGSVGElement, IconBaseProps>(function DoubleLine(
|
|
9
|
+
props: IconBaseProps,
|
|
10
|
+
ref: React.Ref<SVGSVGElement>
|
|
11
|
+
) {return <Icon {...props} className={props.className} ref={ref} icon={DoubleLineSvg} />});
|
|
12
|
+
|
|
13
|
+
export default DoubleLine;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import {forwardRef} from 'react';
|
|
4
|
+
import LineJumpSvg from '../ast/LineJump';
|
|
5
|
+
import { Icon } from '../Icon';
|
|
6
|
+
import { IconBaseProps } from '../types';
|
|
7
|
+
|
|
8
|
+
const LineJump = forwardRef<SVGSVGElement, IconBaseProps>(function LineJump(
|
|
9
|
+
props: IconBaseProps,
|
|
10
|
+
ref: React.Ref<SVGSVGElement>
|
|
11
|
+
) {return <Icon {...props} className={props.className} ref={ref} icon={LineJumpSvg} />});
|
|
12
|
+
|
|
13
|
+
export default LineJump;
|
|
@@ -96,9 +96,11 @@ export { default as DateRange } from './DateRange';
|
|
|
96
96
|
export { default as Delete } from './Delete';
|
|
97
97
|
export { default as Demo } from './Demo';
|
|
98
98
|
export { default as Dependency } from './Dependency';
|
|
99
|
+
export { default as Dividers } from './Dividers';
|
|
99
100
|
export { default as Document } from './Document';
|
|
100
101
|
export { default as DoubleArrowLeft } from './DoubleArrowLeft';
|
|
101
102
|
export { default as DoubleArrowRight } from './DoubleArrowRight';
|
|
103
|
+
export { default as DoubleLine } from './DoubleLine';
|
|
102
104
|
export { default as DragBlockHandleSingle } from './DragBlockHandleSingle';
|
|
103
105
|
export { default as DragBlockHandle } from './DragBlockHandle';
|
|
104
106
|
export { default as DragHandle } from './DragHandle';
|
|
@@ -190,6 +192,7 @@ export { default as LeftPanel } from './LeftPanel';
|
|
|
190
192
|
export { default as LevelPlus } from './LevelPlus';
|
|
191
193
|
export { default as Levels } from './Levels';
|
|
192
194
|
export { default as LineDivider } from './LineDivider';
|
|
195
|
+
export { default as LineJump } from './LineJump';
|
|
193
196
|
export { default as Link } from './Link';
|
|
194
197
|
export { default as LocationEdit } from './LocationEdit';
|
|
195
198
|
export { default as LockOutline } from './LockOutline';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
|
|
2
|
+
<path d="M5 16.0267L5.22143 18L6.65633 16.6311L9.10983 9.87556C8.50753 9.72444 7.97608 9.42222 7.54207 9.00444L5 16.0267ZM12.4491 9.00444C12.0151 9.42222 11.4748 9.72444 10.8813 9.87556L13.3348 16.6311L14.7697 18L15 16.0267L12.4491 9.00444ZM12.5996 6.97778C12.8654 5.59111 12.0682 4.36444 10.8813 3.93778V2.88889C10.8813 2.4 10.4827 2 9.99557 2C9.50841 2 9.10983 2.4 9.10983 2.88889V3.93778C8.08237 4.31111 7.33835 5.28889 7.33835 6.44444C7.33835 8.08 8.80868 9.37778 10.4916 9.06667C11.5368 8.87111 12.3959 8.02667 12.5996 6.97778ZM9.99557 7.33333C9.50841 7.33333 9.10983 6.93333 9.10983 6.44444C9.10983 5.95556 9.50841 5.55556 9.99557 5.55556C10.4827 5.55556 10.8813 5.95556 10.8813 6.44444C10.8813 6.93333 10.4827 7.33333 9.99557 7.33333Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 7.5C1.5 7.08579 1.83579 6.75 2.25 6.75H17.75C18.1642 6.75 18.5 7.08579 18.5 7.5C18.5 7.91421 18.1642 8.25 17.75 8.25H2.25C1.83579 8.25 1.5 7.91421 1.5 7.5ZM1.5 12.5C1.5 12.0858 1.83579 11.75 2.25 11.75H17.75C18.1642 11.75 18.5 12.0858 18.5 12.5C18.5 12.9142 18.1642 13.25 17.75 13.25H2.25C1.83579 13.25 1.5 12.9142 1.5 12.5Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M3.05 6.11H5.74C6.11 6.11 6.46 6.25 6.72 6.51L9.4 9.19C9.47718 9.26801 9.56907 9.32993 9.67034 9.3722C9.77162 9.41446 9.88026 9.43622 9.99 9.43622C10.0997 9.43622 10.2084 9.41446 10.3097 9.3722C10.4109 9.32993 10.5028 9.26801 10.58 9.19C10.658 9.11282 10.7199 9.02093 10.7622 8.91966C10.8045 8.81839 10.8262 8.70974 10.8262 8.6C10.8262 8.49026 10.8045 8.38162 10.7622 8.28034C10.7199 8.17907 10.658 8.08718 10.58 8.01L7.9 5.33C7.61677 5.04609 7.28001 4.82123 6.90922 4.66846C6.53844 4.51568 6.14102 4.43803 5.74 4.44H3.05C2.82987 4.44 2.61876 4.52745 2.4631 4.6831C2.30745 4.83876 2.22 5.04987 2.22 5.27C2.22 5.49013 2.30745 5.70124 2.4631 5.8569C2.61876 6.01255 2.82987 6.1 3.05 6.1V6.11Z" />
|
|
3
|
+
<path d="M18.63 10.79L15.57 7.74C15.4957 7.6527 15.4042 7.58173 15.3011 7.53156C15.1981 7.48139 15.0857 7.45311 14.9712 7.4485C14.8567 7.44389 14.7424 7.46305 14.6357 7.50478C14.5289 7.5465 14.432 7.60988 14.3509 7.69093C14.2699 7.77198 14.2065 7.86894 14.1648 7.97569C14.1231 8.08245 14.1039 8.19669 14.1085 8.31121C14.1131 8.42574 14.1414 8.53807 14.1916 8.64112C14.2417 8.74418 14.3127 8.83573 14.4 8.91L16.03 10.55H0.83C0.60987 10.55 0.398757 10.6374 0.243101 10.7931C0.0874462 10.9488 0 11.1599 0 11.38C0 11.6001 0.0874462 11.8112 0.243101 11.9669C0.398757 12.1226 0.60987 12.21 0.83 12.21H16.03L14.4 13.84C14.2435 13.9952 14.1551 14.2061 14.1542 14.4265C14.1532 14.6468 14.2398 14.8585 14.395 15.015C14.5502 15.1715 14.7611 15.2599 14.9815 15.2609C15.2018 15.2618 15.4135 15.1752 15.57 15.02L18.62 11.97C18.698 11.8928 18.7599 11.8009 18.8022 11.6997C18.8445 11.5984 18.8662 11.4897 18.8662 11.38C18.8662 11.2703 18.8445 11.1616 18.8022 11.0603C18.7599 10.9591 18.698 10.8672 18.62 10.79H18.63Z" />
|
|
4
|
+
</svg>
|
package/src/popover/index.tsx
CHANGED
|
@@ -44,6 +44,7 @@ import {usePopupStackContext} from "./popup-stack-context";
|
|
|
44
44
|
import {useComposedRefs} from "@fibery/react/src/use-composed-refs";
|
|
45
45
|
import {createContext} from "@fibery/react/src/create-context";
|
|
46
46
|
import {Wrap} from "@fibery/react/src/wrap";
|
|
47
|
+
import {composeEventHandlers} from "@fibery/react/src/compose-event-handlers";
|
|
47
48
|
|
|
48
49
|
export const mobileZIndex = 1002;
|
|
49
50
|
|
|
@@ -232,20 +233,25 @@ type TriggerProps = {
|
|
|
232
233
|
asChild?: boolean;
|
|
233
234
|
// Support case when popup trigger is virtual reference
|
|
234
235
|
reference?: Reference;
|
|
235
|
-
|
|
236
|
-
};
|
|
236
|
+
} & React.ComponentPropsWithoutRef<"div">;
|
|
237
237
|
|
|
238
|
-
const Trigger = ({asChild = false, reference, children}: TriggerProps) => {
|
|
238
|
+
const Trigger = ({asChild = false, reference, children, onMouseDown, ...props}: TriggerProps) => {
|
|
239
239
|
const {setTriggerElement, disabled, open, onOpen, onClose} = useContext();
|
|
240
240
|
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
241
|
+
const onMouseDownCb: React.MouseEventHandler<HTMLElement> = composeEventHandlers(
|
|
242
|
+
onMouseDown,
|
|
243
|
+
(e) => {
|
|
244
|
+
if (disabled) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (e.button === 0) {
|
|
248
|
+
open ? onClose?.(e as unknown as Event) : onOpen?.();
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
checkForDefaultPrevented: false,
|
|
247
253
|
}
|
|
248
|
-
|
|
254
|
+
);
|
|
249
255
|
|
|
250
256
|
useEffect(() => {
|
|
251
257
|
if (reference) {
|
|
@@ -263,12 +269,13 @@ const Trigger = ({asChild = false, reference, children}: TriggerProps) => {
|
|
|
263
269
|
ref: setTriggerElement,
|
|
264
270
|
"aria-expanded": open,
|
|
265
271
|
"aria-haspopup": true,
|
|
266
|
-
onMouseDown,
|
|
272
|
+
onMouseDown: onMouseDownCb,
|
|
273
|
+
...props,
|
|
267
274
|
});
|
|
268
275
|
}
|
|
269
276
|
|
|
270
277
|
return (
|
|
271
|
-
<div ref={setTriggerElement} onMouseDown={
|
|
278
|
+
<div ref={setTriggerElement} onMouseDown={onMouseDownCb} {...props}>
|
|
272
279
|
{children}
|
|
273
280
|
</div>
|
|
274
281
|
);
|