@fibery/ui-kit 9.1.1 → 9.1.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/lib/actions-menu/actions-menu-item.js +3 -3
- package/lib/button/base-button.js +5 -5
- package/lib/checkbox.d.ts +1 -1
- package/lib/checkbox.js +3 -3
- package/lib/design-system/alpha-coefficients.d.ts +1 -0
- package/lib/design-system/alpha-coefficients.js +1 -0
- package/lib/design-system/colors.d.ts +2 -4
- package/lib/design-system/colors.js +1 -2
- package/lib/design-system/theme.d.ts +5 -10
- package/lib/design-system/theme.js +1 -1
- package/lib/loading-sausage.d.ts +1 -1
- package/lib/loading-sausage.js +8 -11
- package/lib/loading-sausage.wyw-in-js.css +4 -6
- package/lib/popover/styles.wyw-in-js.css +1 -1
- package/lib/root-theme-provider.js +2 -1
- package/lib/root-theme-provider.wyw-in-js.css +1 -1
- package/lib/select/select-in-popover.js +5 -3
- package/lib/select/select.js +11 -4
- package/lib/sidebar/sidebar-handle.d.ts +14 -0
- package/lib/sidebar/sidebar-handle.js +51 -0
- package/lib/sidebar/sidebar-handle.wyw-in-js.css +7 -0
- package/lib/sidebar/sidebar.d.ts +25 -0
- package/lib/sidebar/sidebar.js +60 -0
- package/lib/sidebar/sidebar.wyw-in-js.css +3 -0
- package/lib/sidebar/use-resize-drag.d.ts +22 -0
- package/lib/sidebar/use-resize-drag.js +71 -0
- package/lib/theme-provider.d.ts +1 -2
- package/lib/theme-styles.js +5 -2
- package/lib/theming.generated.d.ts +5 -10
- package/lib/theming.generated.js +5 -10
- package/lib/toast/toast-provider.d.ts +1 -0
- package/lib/toast/toast-queue.d.ts +2 -0
- package/lib/toast/toast-queue.js +6 -0
- package/lib/tooltip.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode, Ref } from "react";
|
|
2
|
+
//#region src/sidebar/sidebar.d.ts
|
|
3
|
+
declare const sidebarWidthVar = "--sidebar-width";
|
|
4
|
+
declare const sidebarTransitionDuration = 300;
|
|
5
|
+
declare const sidebarTransition = "300ms cubic-bezier(0.16, 0.84, 0.44, 1)";
|
|
6
|
+
declare const Sidebar: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "onResize"> & {
|
|
7
|
+
side: "left" | "right";
|
|
8
|
+
/** Number in px, or a css length when not resizable */
|
|
9
|
+
width: number | string;
|
|
10
|
+
collapsed?: boolean;
|
|
11
|
+
minWidth: number;
|
|
12
|
+
maxWidth: number;
|
|
13
|
+
resizable?: boolean;
|
|
14
|
+
onResizeStart?: () => void;
|
|
15
|
+
/** Live width is written straight to the DOM; this only reports it */
|
|
16
|
+
onResize?: (width: number, rawWidth: number) => void;
|
|
17
|
+
onResizeEnd?: (width: number) => void;
|
|
18
|
+
onHandleClick?: () => void;
|
|
19
|
+
handleHotkeyNode?: ReactNode;
|
|
20
|
+
panelClassName?: string;
|
|
21
|
+
panelRef?: Ref<HTMLDivElement>;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Sidebar, sidebarTransition, sidebarTransitionDuration, sidebarWidthVar };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "./sidebar.wyw-in-js.css";
|
|
2
|
+
import { useResizeDrag } from "./use-resize-drag.js";
|
|
3
|
+
import { SidebarHandle } from "./sidebar-handle.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { forwardRef, useRef } from "react";
|
|
7
|
+
import { cx } from "@linaria/core";
|
|
8
|
+
import { useComposedRefs } from "@fibery/react/src/use-composed-refs";
|
|
9
|
+
//#region src/sidebar/sidebar.tsx
|
|
10
|
+
var sidebarWidthVar = "--sidebar-width";
|
|
11
|
+
var sidebarTransitionDuration = 300;
|
|
12
|
+
var sidebarTransition = `300ms cubic-bezier(0.16, 0.84, 0.44, 1)`;
|
|
13
|
+
var rootCss = "rotdw5d-root";
|
|
14
|
+
var gapCss = "g15gx138-gap";
|
|
15
|
+
var panelCss = "p1yy31y7-panel";
|
|
16
|
+
var Sidebar = forwardRef(function Sidebar({ side, width, collapsed = false, minWidth, maxWidth, resizable = true, onResizeStart, onResize, onResizeEnd, onHandleClick, handleHotkeyNode, panelClassName, panelRef, className, style, children, ...rest }, forwardedRef) {
|
|
17
|
+
const rootRef = useRef(null);
|
|
18
|
+
const setRootRef = useComposedRefs(forwardedRef, rootRef);
|
|
19
|
+
const isNumericWidth = typeof width === "number";
|
|
20
|
+
const { isResizing, handleProps } = useResizeDrag({
|
|
21
|
+
side,
|
|
22
|
+
size: isNumericWidth ? width : 0,
|
|
23
|
+
minSize: minWidth,
|
|
24
|
+
maxSize: maxWidth,
|
|
25
|
+
disabled: !resizable || !isNumericWidth,
|
|
26
|
+
onResizeStart,
|
|
27
|
+
onResize: (size, rawSize) => {
|
|
28
|
+
rootRef.current?.style.setProperty(sidebarWidthVar, `${size}px`);
|
|
29
|
+
onResize?.(size, rawSize);
|
|
30
|
+
},
|
|
31
|
+
onResizeEnd,
|
|
32
|
+
onClick: onHandleClick
|
|
33
|
+
});
|
|
34
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
ref: setRootRef,
|
|
36
|
+
"data-side": side,
|
|
37
|
+
"data-state": collapsed ? "collapsed" : "expanded",
|
|
38
|
+
"data-resizing": isResizing,
|
|
39
|
+
className: cx(rootCss, className),
|
|
40
|
+
style: {
|
|
41
|
+
...style,
|
|
42
|
+
[sidebarWidthVar]: isNumericWidth ? `${width}px` : width
|
|
43
|
+
},
|
|
44
|
+
...rest,
|
|
45
|
+
children: [/* @__PURE__ */ jsx("div", { className: gapCss }), /* @__PURE__ */ jsxs("div", {
|
|
46
|
+
ref: panelRef,
|
|
47
|
+
className: cx(panelCss, panelClassName),
|
|
48
|
+
children: [children, resizable ? /* @__PURE__ */ jsx(SidebarHandle, {
|
|
49
|
+
edge: side === "left" ? "right" : "left",
|
|
50
|
+
dragging: isResizing,
|
|
51
|
+
collapseOnClick: Boolean(onHandleClick),
|
|
52
|
+
hotkeyNode: handleHotkeyNode,
|
|
53
|
+
hidden: collapsed && !isResizing,
|
|
54
|
+
...handleProps
|
|
55
|
+
}) : null]
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
60
|
+
export { Sidebar, sidebarTransition, sidebarTransitionDuration, sidebarWidthVar };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
.rotdw5d-root{position:relative;flex:none;height:100%;}
|
|
2
|
+
.g15gx138-gap{width:var(--sidebar-width);height:100%;transition:width 300ms cubic-bezier(0.16, 0.84, 0.44, 1);}:where([data-state="collapsed"])>.g15gx138-gap{width:0;}:where([data-resizing="true"])>.g15gx138-gap{transition:none;}
|
|
3
|
+
.p1yy31y7-panel{position:absolute;top:0;bottom:0;display:flex;width:var(--sidebar-width);transition:left 300ms cubic-bezier(0.16, 0.84, 0.44, 1),right 300ms cubic-bezier(0.16, 0.84, 0.44, 1),width 300ms cubic-bezier(0.16, 0.84, 0.44, 1);}:where([data-side="left"])>.p1yy31y7-panel{left:0;}:where([data-side="right"])>.p1yy31y7-panel{right:0;}:where([data-side="left"][data-state="collapsed"])>.p1yy31y7-panel{left:calc(-1 * var(--sidebar-width));}:where([data-side="right"][data-state="collapsed"])>.p1yy31y7-panel{right:calc(-1 * var(--sidebar-width));}:where([data-resizing="true"])>.p1yy31y7-panel{transition:none;}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PointerEvent } from "react";
|
|
2
|
+
//#region src/sidebar/use-resize-drag.d.ts
|
|
3
|
+
type ResizeDragOptions = {
|
|
4
|
+
/** Side of the layout the resizable element sits on */
|
|
5
|
+
side: "left" | "right";
|
|
6
|
+
size: number;
|
|
7
|
+
minSize: number;
|
|
8
|
+
maxSize: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onResizeStart?: () => void;
|
|
11
|
+
onResize?: (size: number, rawSize: number) => void;
|
|
12
|
+
onResizeEnd?: (size: number) => void;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
};
|
|
15
|
+
declare function useResizeDrag(options: ResizeDragOptions): {
|
|
16
|
+
isResizing: boolean;
|
|
17
|
+
handleProps: {
|
|
18
|
+
onPointerDown: (event: PointerEvent<HTMLElement>) => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ResizeDragOptions, useResizeDrag };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
//#region src/sidebar/use-resize-drag.ts
|
|
3
|
+
var dragThreshold = 3;
|
|
4
|
+
function setBodyDragStyles(active) {
|
|
5
|
+
const style = document.body.style;
|
|
6
|
+
style.cursor = active ? "col-resize" : "";
|
|
7
|
+
style.userSelect = active ? "none" : "";
|
|
8
|
+
style.webkitUserSelect = active ? "none" : "";
|
|
9
|
+
}
|
|
10
|
+
function useResizeDrag(options) {
|
|
11
|
+
const optionsRef = useRef(options);
|
|
12
|
+
optionsRef.current = options;
|
|
13
|
+
const dragRef = useRef(null);
|
|
14
|
+
const [isResizing, setIsResizing] = useState(false);
|
|
15
|
+
const onPointerDown = useCallback((event) => {
|
|
16
|
+
const { disabled, size } = optionsRef.current;
|
|
17
|
+
if (disabled || event.button !== 0 || dragRef.current) return;
|
|
18
|
+
const element = event.currentTarget;
|
|
19
|
+
const drag = {
|
|
20
|
+
pointerId: event.pointerId,
|
|
21
|
+
startX: event.clientX,
|
|
22
|
+
startSize: size,
|
|
23
|
+
size,
|
|
24
|
+
moved: false
|
|
25
|
+
};
|
|
26
|
+
dragRef.current = drag;
|
|
27
|
+
element.setPointerCapture(event.pointerId);
|
|
28
|
+
const onPointerMove = (e) => {
|
|
29
|
+
if (e.pointerId !== drag.pointerId) return;
|
|
30
|
+
const delta = e.clientX - drag.startX;
|
|
31
|
+
if (!drag.moved) {
|
|
32
|
+
if (Math.abs(delta) < dragThreshold) return;
|
|
33
|
+
drag.moved = true;
|
|
34
|
+
setBodyDragStyles(true);
|
|
35
|
+
setIsResizing(true);
|
|
36
|
+
optionsRef.current.onResizeStart?.();
|
|
37
|
+
}
|
|
38
|
+
const { side, minSize, maxSize, onResize } = optionsRef.current;
|
|
39
|
+
const rawSize = drag.startSize + (side === "left" ? delta : -delta);
|
|
40
|
+
drag.size = Math.min(maxSize, Math.max(minSize, rawSize));
|
|
41
|
+
onResize?.(drag.size, rawSize);
|
|
42
|
+
};
|
|
43
|
+
const finish = (e) => {
|
|
44
|
+
if (e.pointerId !== drag.pointerId) return;
|
|
45
|
+
element.removeEventListener("pointermove", onPointerMove);
|
|
46
|
+
element.removeEventListener("pointerup", finish);
|
|
47
|
+
element.removeEventListener("pointercancel", finish);
|
|
48
|
+
dragRef.current = null;
|
|
49
|
+
const { onResizeEnd, onClick } = optionsRef.current;
|
|
50
|
+
if (drag.moved) {
|
|
51
|
+
setBodyDragStyles(false);
|
|
52
|
+
setIsResizing(false);
|
|
53
|
+
onResizeEnd?.(drag.size);
|
|
54
|
+
} else onClick?.();
|
|
55
|
+
};
|
|
56
|
+
element.addEventListener("pointermove", onPointerMove);
|
|
57
|
+
element.addEventListener("pointerup", finish);
|
|
58
|
+
element.addEventListener("pointercancel", finish);
|
|
59
|
+
}, []);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
return () => {
|
|
62
|
+
if (dragRef.current?.moved) setBodyDragStyles(false);
|
|
63
|
+
};
|
|
64
|
+
}, []);
|
|
65
|
+
return {
|
|
66
|
+
isResizing,
|
|
67
|
+
handleProps: { onPointerDown }
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { useResizeDrag };
|
package/lib/theme-provider.d.ts
CHANGED
|
@@ -500,8 +500,7 @@ declare const ThemeContext: import("react").Context<{
|
|
|
500
500
|
readonly colorBgLogoCardTransparent: string;
|
|
501
501
|
readonly colorBgLogoCardDark: string;
|
|
502
502
|
readonly colorBgLogoCardMedium: string;
|
|
503
|
-
readonly
|
|
504
|
-
readonly colorBgSkeletonTo: string;
|
|
503
|
+
readonly colorBgSkeleton: string;
|
|
505
504
|
readonly colorShadowInsetEdge: string;
|
|
506
505
|
readonly colorShadowBorder: string;
|
|
507
506
|
readonly colorShadowElevation: string;
|
package/lib/theme-styles.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { neutralUserPalette } from "./palettes/neutral-user.js";
|
|
2
2
|
import { warmUserPalette } from "./palettes/warm-user.js";
|
|
3
3
|
import { defsFromPalette } from "./design-system/colors.js";
|
|
4
|
-
import { themeFromDefs } from "./design-system/theme.js";
|
|
4
|
+
import { themeFromDefs, themeFromPalette } from "./design-system/theme.js";
|
|
5
5
|
//#region src/theme-styles.ts
|
|
6
6
|
function make(palette) {
|
|
7
7
|
const defs = defsFromPalette(palette);
|
|
8
|
+
const themes = [themeFromDefs(defs, "light"), themeFromDefs(defs, "dark")];
|
|
9
|
+
themeFromPalette.cache.set(`${palette.key}-light`, themes[0]);
|
|
10
|
+
themeFromPalette.cache.set(`${palette.key}-dark`, themes[1]);
|
|
8
11
|
return {
|
|
9
12
|
defs,
|
|
10
13
|
palette,
|
|
11
|
-
themes
|
|
14
|
+
themes
|
|
12
15
|
};
|
|
13
16
|
}
|
|
14
17
|
var neutral = make(neutralUserPalette);
|
|
@@ -514,8 +514,7 @@ declare const themeVars: {
|
|
|
514
514
|
readonly colorBgLogoCardTransparent: "var(--colorBgLogoCardTransparent)";
|
|
515
515
|
readonly colorBgLogoCardDark: "var(--colorBgLogoCardDark)";
|
|
516
516
|
readonly colorBgLogoCardMedium: "var(--colorBgLogoCardMedium)";
|
|
517
|
-
readonly
|
|
518
|
-
readonly colorBgSkeletonTo: "var(--colorBgSkeletonTo)";
|
|
517
|
+
readonly colorBgSkeleton: "var(--colorBgSkeleton)";
|
|
519
518
|
readonly colorShadowInsetEdge: "var(--colorShadowInsetEdge)";
|
|
520
519
|
readonly colorShadowBorder: "var(--colorShadowBorder)";
|
|
521
520
|
readonly colorShadowElevation: "var(--colorShadowElevation)";
|
|
@@ -1075,8 +1074,7 @@ declare const neutralStyles: {
|
|
|
1075
1074
|
readonly "--colorBgLogoCardTransparent": "rgb(255,255,255)";
|
|
1076
1075
|
readonly "--colorBgLogoCardDark": "rgb(199,199,199)";
|
|
1077
1076
|
readonly "--colorBgLogoCardMedium": "rgb(237,237,237)";
|
|
1078
|
-
readonly "--
|
|
1079
|
-
readonly "--colorBgSkeletonTo": "rgba(255, 255, 255, 0.1)";
|
|
1077
|
+
readonly "--colorBgSkeleton": "rgba(0, 0, 0, 0.1)";
|
|
1080
1078
|
readonly "--colorShadowInsetEdge": "rgba(255, 255, 255, 0.05)";
|
|
1081
1079
|
readonly "--colorShadowBorder": "rgba(255, 255, 255, 0.1)";
|
|
1082
1080
|
readonly "--colorShadowElevation": "rgba(0, 0, 0, 0.1)";
|
|
@@ -1625,8 +1623,7 @@ declare const neutralStyles: {
|
|
|
1625
1623
|
readonly "--colorBgLogoCardTransparent": "rgb(28,28,28)";
|
|
1626
1624
|
readonly "--colorBgLogoCardDark": "rgb(82,82,82)";
|
|
1627
1625
|
readonly "--colorBgLogoCardMedium": "rgb(41,41,41)";
|
|
1628
|
-
readonly "--
|
|
1629
|
-
readonly "--colorBgSkeletonTo": "rgba(0, 0, 0, 0.1)";
|
|
1626
|
+
readonly "--colorBgSkeleton": "rgba(255, 255, 255, 0.1)";
|
|
1630
1627
|
readonly "--colorShadowInsetEdge": "rgba(0, 0, 0, 0.05)";
|
|
1631
1628
|
readonly "--colorShadowBorder": "rgba(0, 0, 0, 0.1)";
|
|
1632
1629
|
readonly "--colorShadowElevation": "rgba(255, 255, 255, 0.1)";
|
|
@@ -2177,8 +2174,7 @@ declare const warmStyles: {
|
|
|
2177
2174
|
readonly "--colorBgLogoCardTransparent": "rgb(255,253,250)";
|
|
2178
2175
|
readonly "--colorBgLogoCardDark": "rgb(204,198,191)";
|
|
2179
2176
|
readonly "--colorBgLogoCardMedium": "rgb(243,236,229)";
|
|
2180
|
-
readonly "--
|
|
2181
|
-
readonly "--colorBgSkeletonTo": "rgba(255, 253, 250, 0.1)";
|
|
2177
|
+
readonly "--colorBgSkeleton": "rgba(31, 26, 24, 0.1)";
|
|
2182
2178
|
readonly "--colorShadowInsetEdge": "rgba(255, 253, 250, 0.05)";
|
|
2183
2179
|
readonly "--colorShadowBorder": "rgba(255, 253, 250, 0.1)";
|
|
2184
2180
|
readonly "--colorShadowElevation": "rgba(31, 26, 24, 0.1)";
|
|
@@ -2727,8 +2723,7 @@ declare const warmStyles: {
|
|
|
2727
2723
|
readonly "--colorBgLogoCardTransparent": "rgb(32,27,25)";
|
|
2728
2724
|
readonly "--colorBgLogoCardDark": "rgb(86,80,78)";
|
|
2729
2725
|
readonly "--colorBgLogoCardMedium": "rgb(45,40,38)";
|
|
2730
|
-
readonly "--
|
|
2731
|
-
readonly "--colorBgSkeletonTo": "rgba(31, 26, 24, 0.1)";
|
|
2726
|
+
readonly "--colorBgSkeleton": "rgba(255, 253, 250, 0.1)";
|
|
2732
2727
|
readonly "--colorShadowInsetEdge": "rgba(31, 26, 24, 0.05)";
|
|
2733
2728
|
readonly "--colorShadowBorder": "rgba(31, 26, 24, 0.1)";
|
|
2734
2729
|
readonly "--colorShadowElevation": "rgba(255, 253, 250, 0.1)";
|
package/lib/theming.generated.js
CHANGED
|
@@ -514,8 +514,7 @@ var themeVars = {
|
|
|
514
514
|
colorBgLogoCardTransparent: "var(--colorBgLogoCardTransparent)",
|
|
515
515
|
colorBgLogoCardDark: "var(--colorBgLogoCardDark)",
|
|
516
516
|
colorBgLogoCardMedium: "var(--colorBgLogoCardMedium)",
|
|
517
|
-
|
|
518
|
-
colorBgSkeletonTo: "var(--colorBgSkeletonTo)",
|
|
517
|
+
colorBgSkeleton: "var(--colorBgSkeleton)",
|
|
519
518
|
colorShadowInsetEdge: "var(--colorShadowInsetEdge)",
|
|
520
519
|
colorShadowBorder: "var(--colorShadowBorder)",
|
|
521
520
|
colorShadowElevation: "var(--colorShadowElevation)",
|
|
@@ -1075,8 +1074,7 @@ var neutralStyles = {
|
|
|
1075
1074
|
"--colorBgLogoCardTransparent": "rgb(255,255,255)",
|
|
1076
1075
|
"--colorBgLogoCardDark": "rgb(199,199,199)",
|
|
1077
1076
|
"--colorBgLogoCardMedium": "rgb(237,237,237)",
|
|
1078
|
-
"--
|
|
1079
|
-
"--colorBgSkeletonTo": "rgba(255, 255, 255, 0.1)",
|
|
1077
|
+
"--colorBgSkeleton": "rgba(0, 0, 0, 0.1)",
|
|
1080
1078
|
"--colorShadowInsetEdge": "rgba(255, 255, 255, 0.05)",
|
|
1081
1079
|
"--colorShadowBorder": "rgba(255, 255, 255, 0.1)",
|
|
1082
1080
|
"--colorShadowElevation": "rgba(0, 0, 0, 0.1)",
|
|
@@ -1625,8 +1623,7 @@ var neutralStyles = {
|
|
|
1625
1623
|
"--colorBgLogoCardTransparent": "rgb(28,28,28)",
|
|
1626
1624
|
"--colorBgLogoCardDark": "rgb(82,82,82)",
|
|
1627
1625
|
"--colorBgLogoCardMedium": "rgb(41,41,41)",
|
|
1628
|
-
"--
|
|
1629
|
-
"--colorBgSkeletonTo": "rgba(0, 0, 0, 0.1)",
|
|
1626
|
+
"--colorBgSkeleton": "rgba(255, 255, 255, 0.1)",
|
|
1630
1627
|
"--colorShadowInsetEdge": "rgba(0, 0, 0, 0.05)",
|
|
1631
1628
|
"--colorShadowBorder": "rgba(0, 0, 0, 0.1)",
|
|
1632
1629
|
"--colorShadowElevation": "rgba(255, 255, 255, 0.1)",
|
|
@@ -2177,8 +2174,7 @@ var warmStyles = {
|
|
|
2177
2174
|
"--colorBgLogoCardTransparent": "rgb(255,253,250)",
|
|
2178
2175
|
"--colorBgLogoCardDark": "rgb(204,198,191)",
|
|
2179
2176
|
"--colorBgLogoCardMedium": "rgb(243,236,229)",
|
|
2180
|
-
"--
|
|
2181
|
-
"--colorBgSkeletonTo": "rgba(255, 253, 250, 0.1)",
|
|
2177
|
+
"--colorBgSkeleton": "rgba(31, 26, 24, 0.1)",
|
|
2182
2178
|
"--colorShadowInsetEdge": "rgba(255, 253, 250, 0.05)",
|
|
2183
2179
|
"--colorShadowBorder": "rgba(255, 253, 250, 0.1)",
|
|
2184
2180
|
"--colorShadowElevation": "rgba(31, 26, 24, 0.1)",
|
|
@@ -2727,8 +2723,7 @@ var warmStyles = {
|
|
|
2727
2723
|
"--colorBgLogoCardTransparent": "rgb(32,27,25)",
|
|
2728
2724
|
"--colorBgLogoCardDark": "rgb(86,80,78)",
|
|
2729
2725
|
"--colorBgLogoCardMedium": "rgb(45,40,38)",
|
|
2730
|
-
"--
|
|
2731
|
-
"--colorBgSkeletonTo": "rgba(31, 26, 24, 0.1)",
|
|
2726
|
+
"--colorBgSkeleton": "rgba(255, 253, 250, 0.1)",
|
|
2732
2727
|
"--colorShadowInsetEdge": "rgba(31, 26, 24, 0.05)",
|
|
2733
2728
|
"--colorShadowBorder": "rgba(31, 26, 24, 0.1)",
|
|
2734
2729
|
"--colorShadowElevation": "rgba(255, 253, 250, 0.1)",
|
|
@@ -10,6 +10,7 @@ declare const useToast: () => {
|
|
|
10
10
|
add: ({ id, ...toast }: AddToastProps) => string;
|
|
11
11
|
close(id: string): void;
|
|
12
12
|
remove(id: string): void;
|
|
13
|
+
removeFromQueue(id: string): void;
|
|
13
14
|
getActiveToasts(): (Pick<ToastProps, "action" | "dismissable" | "duration" | "icon" | "onOpenChange" | "open" | "subTitle" | "title" | "type" | "variant"> & {
|
|
14
15
|
id?: string;
|
|
15
16
|
} & {
|
|
@@ -22,6 +22,8 @@ declare const makeToastQueue: ({ maxActiveToasts, onToastAdd, transformToast }?:
|
|
|
22
22
|
close(id: string): void;
|
|
23
23
|
/** remove toast from active ones, should be called after exit animation */
|
|
24
24
|
remove(id: string): void;
|
|
25
|
+
/** sometimes backend answers faster than active toast changes to one which needed to be removed */
|
|
26
|
+
removeFromQueue(id: string): void;
|
|
25
27
|
getActiveToasts(): QueuedToast[];
|
|
26
28
|
addBottomOffset: (bottomOffset: number) => () => void;
|
|
27
29
|
getBottomOffset(): number;
|
package/lib/toast/toast-queue.js
CHANGED
|
@@ -48,6 +48,12 @@ var makeToastQueue = ({ maxActiveToasts = 1, onToastAdd, transformToast } = {})
|
|
|
48
48
|
activeToasts = activeToasts.filter((t) => t.id !== id);
|
|
49
49
|
updateActiveToasts();
|
|
50
50
|
},
|
|
51
|
+
/** sometimes backend answers faster than active toast changes to one which needed to be removed */
|
|
52
|
+
removeFromQueue(id) {
|
|
53
|
+
activeToasts = activeToasts.filter((t) => t.id !== id);
|
|
54
|
+
queue = queue.filter((x) => x.id !== id);
|
|
55
|
+
updateActiveToasts();
|
|
56
|
+
},
|
|
51
57
|
getActiveToasts() {
|
|
52
58
|
return activeToasts;
|
|
53
59
|
},
|
package/lib/tooltip.js
CHANGED
|
@@ -47,7 +47,7 @@ var TooltipProvider = (props) => /* @__PURE__ */ jsx(TooltipPrimitive.Provider,
|
|
|
47
47
|
*
|
|
48
48
|
* Ref: https://github.com/radix-ui/primitives/issues/602
|
|
49
49
|
*/
|
|
50
|
-
var Tooltip = forwardRef(({ title, description, content = (title || description) && /* @__PURE__ */ jsxs(Fragment, { children: [title && /* @__PURE__ */ jsx(TooltipTitle, { children: title }), description && /* @__PURE__ */ jsx(TooltipDescription, { children: description })] }), side, sideOffset = space.s4, align, alignOffset, instant, children, whiteBg, visible, onVisibleChange, keepOnClick, openOnFocus = true, disabled, setContentElement, container, tooltipContentStyle, disableHoverableContent, ...triggerProps }, ref)
|
|
50
|
+
var Tooltip = forwardRef(function UiKitTooltip({ title, description, content = (title || description) && /* @__PURE__ */ jsxs(Fragment, { children: [title && /* @__PURE__ */ jsx(TooltipTitle, { children: title }), description && /* @__PURE__ */ jsx(TooltipDescription, { children: description })] }), side, sideOffset = space.s4, align, alignOffset, instant, children, whiteBg, visible, onVisibleChange, keepOnClick, openOnFocus = true, disabled, setContentElement, container, tooltipContentStyle, disableHoverableContent, ...triggerProps }, ref) {
|
|
51
51
|
const [open, setOpen] = useControllableState({
|
|
52
52
|
value: visible,
|
|
53
53
|
defaultValue: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.2",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib"
|
|
@@ -147,8 +147,8 @@
|
|
|
147
147
|
"vaul": "1.1.2",
|
|
148
148
|
"virtua": "0.50.4",
|
|
149
149
|
"@fibery/emoji-data": "3.0.0",
|
|
150
|
-
"@fibery/
|
|
151
|
-
"@fibery/
|
|
150
|
+
"@fibery/react": "2.0.3",
|
|
151
|
+
"@fibery/helpers": "3.4.0"
|
|
152
152
|
},
|
|
153
153
|
"peerDependencies": {
|
|
154
154
|
"react": "18.3.1",
|