@fibery/ui-kit 9.1.2 → 9.2.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/lib/actions-menu/actions-menu-item.js +1 -1
- package/lib/actions-menu/actions-menu-sub-command-menu.js +2 -2
- package/lib/actions-menu/contexts/actions-menu-context.js +2 -2
- package/lib/actions-menu/contexts/actions-menu-dangerous-rows.js +3 -3
- package/lib/antd/input.d.ts +1 -1
- package/lib/automation-avatar.d.ts +8 -0
- package/lib/automation-avatar.js +43 -0
- package/lib/board-table-loader.js +7 -7
- package/lib/card-container.js +1 -1
- package/lib/comment.js +3 -3
- package/lib/design-system/colors.d.ts +4 -4
- package/lib/design-system/colors.js +6 -6
- package/lib/design-system/skeleton.d.ts +7 -0
- package/lib/design-system/skeleton.js +18 -0
- package/lib/design-system.d.ts +2 -1
- package/lib/design-system.js +2 -1
- package/lib/emoji-picker/primitives/content.js +2 -2
- package/lib/emoji-picker/primitives/preview-provider.js +3 -3
- package/lib/emoji-picker/primitives/root.js +3 -3
- package/lib/emoji-picker/primitives/search-provider.js +3 -3
- package/lib/emoji-picker/primitives/skin-provider.js +3 -3
- package/lib/emoji-picker/stores/emoji-data-store.js +2 -2
- package/lib/file-item/file-preview-actions.js +1 -1
- package/lib/file-item.js +14 -14
- package/lib/file-item.wyw-in-js.css +10 -11
- package/lib/icons/ast/index.d.ts +4 -1
- package/lib/icons/ast/index.js +4 -1
- package/lib/icons/ast/integration-claude.d.ts +5 -0
- package/lib/icons/ast/integration-claude.js +25 -0
- package/lib/icons/ast/integration-gemini.d.ts +5 -0
- package/lib/icons/ast/integration-gemini.js +25 -0
- package/lib/icons/ast/integration-openai.d.ts +5 -0
- package/lib/icons/ast/integration-openai.js +25 -0
- package/lib/icons/react/index.d.ts +4 -1
- package/lib/icons/react/index.js +4 -1
- package/lib/icons/react/integration-claude.d.ts +15 -0
- package/lib/icons/react/integration-claude.js +21 -0
- package/lib/icons/react/integration-gemini.d.ts +15 -0
- package/lib/icons/react/integration-gemini.js +21 -0
- package/lib/icons/react/integration-openai.d.ts +15 -0
- package/lib/icons/react/integration-openai.js +21 -0
- package/lib/images-gallery/images-gallery.js +4 -4
- package/lib/loaders.js +7 -11
- package/lib/number-input/number-input.js +13 -5
- package/lib/open-popover-tracker.js +2 -2
- package/lib/popover/index.js +2 -2
- package/lib/popover/mobile-popover-context.js +2 -2
- package/lib/popover/popup-stack-context.js +2 -2
- package/lib/random.d.ts +4 -0
- package/lib/random.js +11 -0
- package/lib/rich-input-loader.js +7 -13
- package/lib/rich-input-loader.wyw-in-js.css +2 -3
- package/lib/root-theme-provider.wyw-in-js.css +1 -1
- package/lib/scroll-fade.d.ts +6 -0
- package/lib/scroll-fade.js +16 -0
- package/lib/scroll-fade.wyw-in-js.css +13 -0
- package/lib/select/index.js +4 -3
- package/lib/select/index.wyw-in-js.css +3 -3
- package/lib/select/select-control-settings-context.d.ts +3 -1
- package/lib/select/select-control-settings-context.js +5 -3
- package/lib/select/select-in-popover.js +2 -0
- package/lib/select/select-loader.js +2 -2
- package/lib/skeleton-card.d.ts +7 -0
- package/lib/skeleton-card.js +16 -0
- package/lib/skeleton-card.wyw-in-js.css +2 -0
- package/lib/skeleton.d.ts +45 -0
- package/lib/skeleton.js +58 -0
- package/lib/skeleton.wyw-in-js.css +6 -0
- package/lib/spinner-box.d.ts +12 -0
- package/lib/spinner-box.js +23 -0
- package/lib/spinner-box.wyw-in-js.css +2 -0
- package/lib/tab-nav/tab-nav.js +3 -3
- package/lib/theming.generated.d.ts +8 -8
- package/lib/theming.generated.js +8 -8
- package/lib/toast/toast-provider.js +2 -2
- package/lib/tree-utils.d.ts +11 -19
- package/lib/unit/loading-unit-value.d.ts +3 -4
- package/lib/unit/loading-unit-value.js +3 -4
- package/lib/unit/maybe-unit-value.js +1 -4
- package/lib/unit/nav-button.d.ts +1 -0
- package/lib/unit/nav-button.js +8 -5
- package/lib/use-is-phone.js +2 -2
- package/lib/use-on-screen-keyboard-data.js +3 -3
- package/package.json +3 -6
- package/lib/ai/model.d.ts +0 -8
- package/lib/ai/model.js +0 -55
- package/lib/ai/model.wyw-in-js.css +0 -1
- package/lib/antd/auto-width-transparent-textarea.d.ts +0 -8
- package/lib/antd/auto-width-transparent-textarea.js +0 -34
- package/lib/antd/auto-width-transparent-textarea.wyw-in-js.css +0 -2
- package/lib/get-trigger-node-popup-container.d.ts +0 -4
- package/lib/get-trigger-node-popup-container.js +0 -8
- package/lib/lists/actions-menu-row-surface.d.ts +0 -12
- package/lib/lists/actions-menu-row-surface.js +0 -65
- package/lib/lists/actions-menu-row-surface.wyw-in-js.css +0 -4
- package/lib/loading-sausage.d.ts +0 -24
- package/lib/loading-sausage.js +0 -54
- package/lib/loading-sausage.wyw-in-js.css +0 -4
- package/lib/nested-menu-item.d.ts +0 -1
- package/lib/nested-menu-item.js +0 -0
- package/lib/not-empty.d.ts +0 -4
- package/lib/not-empty.js +0 -6
- package/lib/use-why-did-you-update.d.ts +0 -4
- package/lib/use-why-did-you-update.js +0 -25
- package/lib/with-data.d.ts +0 -77
- package/lib/with-data.js +0 -55
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./skeleton-card.wyw-in-js.css";
|
|
2
|
+
import { Box } from "./box.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/skeleton-card.tsx
|
|
6
|
+
var cardStyle = "cp0t8zc-card";
|
|
7
|
+
var cardContentStyle = "c770980-cardContent";
|
|
8
|
+
var SkeletonCard = ({ children }) => /* @__PURE__ */ jsx("div", {
|
|
9
|
+
className: cardStyle,
|
|
10
|
+
children: jsx(Box, { children: /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: cardContentStyle,
|
|
12
|
+
children
|
|
13
|
+
}) })
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { SkeletonCard };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { SkeletonHeight, SkeletonWidth } from "./design-system/skeleton.js";
|
|
2
|
+
import "./design-system.js";
|
|
3
|
+
import { ComponentType, ReactNode } from "react";
|
|
4
|
+
//#region src/skeleton.d.ts
|
|
5
|
+
type SkeletonBaseProps = {
|
|
6
|
+
/** Bar height, one step of the scale — the type scale it stands in for picks the step. */
|
|
7
|
+
height?: SkeletonHeight;
|
|
8
|
+
/**
|
|
9
|
+
* 1:1 plate sized to the element it replaces — an icon, a checkbox, an avatar — rather than to a
|
|
10
|
+
* step of the bar scale. Overrides height and width. dt#1620 replaces it with the Square shape.
|
|
11
|
+
*/
|
|
12
|
+
size?: number;
|
|
13
|
+
inverted?: boolean;
|
|
14
|
+
animateAppearance?: boolean;
|
|
15
|
+
margins?: boolean;
|
|
16
|
+
index?: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A bar is either one known width, or a range to generate one within when the width is not
|
|
20
|
+
* known. Both ends are required for a range, so a fixed width has exactly one spelling.
|
|
21
|
+
*/
|
|
22
|
+
type SkeletonWidthProps = {
|
|
23
|
+
width?: SkeletonWidth;
|
|
24
|
+
minWidth?: never;
|
|
25
|
+
maxWidth?: never;
|
|
26
|
+
} | {
|
|
27
|
+
width?: never;
|
|
28
|
+
minWidth: SkeletonWidth;
|
|
29
|
+
maxWidth: SkeletonWidth;
|
|
30
|
+
};
|
|
31
|
+
type SkeletonProps = SkeletonBaseProps & SkeletonWidthProps;
|
|
32
|
+
declare const Skeleton: import("react").MemoExoticComponent<({ height, width, minWidth, maxWidth, size, index, margins, animateAppearance }: SkeletonProps) => JSX.Element>;
|
|
33
|
+
type SkeletonListProps = {
|
|
34
|
+
amount?: number;
|
|
35
|
+
minAmount?: number;
|
|
36
|
+
maxAmount?: number;
|
|
37
|
+
WrapperComponent?: ComponentType<{
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
}> | null;
|
|
40
|
+
} & Omit<SkeletonBaseProps, "index"> & SkeletonWidthProps;
|
|
41
|
+
declare const SkeletonList: import("react").NamedExoticComponent<SkeletonListProps>;
|
|
42
|
+
declare const SkeletonTextLine: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
43
|
+
declare const PageContentSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { PageContentSkeleton, Skeleton, SkeletonList, SkeletonProps, SkeletonTextLine };
|
package/lib/skeleton.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import "./skeleton.wyw-in-js.css";
|
|
2
|
+
import { getRandomInt } from "./random.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
import { memo, useState } from "react";
|
|
6
|
+
import cx from "classnames";
|
|
7
|
+
import { styled } from "@linaria/react";
|
|
8
|
+
//#region src/skeleton.tsx
|
|
9
|
+
var skeletonStyle = "slo3ayz-skeleton";
|
|
10
|
+
var marginStyle = "mzl91bk-margin";
|
|
11
|
+
var skeletonAppearanceStyle = "siugmrr-skeletonAppearance";
|
|
12
|
+
var _exp4 = () => ((props) => `${props.height / 2}px`);
|
|
13
|
+
var Container = /*#__PURE__*/ styled("div")({
|
|
14
|
+
name: "Container",
|
|
15
|
+
class: "cjtjcsl-Container",
|
|
16
|
+
propsAsIs: false,
|
|
17
|
+
vars: { "cjtjcsl-0": [_exp4()] }
|
|
18
|
+
});
|
|
19
|
+
var Skeleton = memo(function Skeleton({ height = 12, width, minWidth, maxWidth, size, index, margins = true, animateAppearance = false }) {
|
|
20
|
+
const [generatedWidth] = useState(() => getRandomInt(minWidth ?? width ?? 80, maxWidth ?? width ?? 120, index));
|
|
21
|
+
const barHeight = size ?? height;
|
|
22
|
+
return /* @__PURE__ */ jsx(Container, {
|
|
23
|
+
height: barHeight,
|
|
24
|
+
style: {
|
|
25
|
+
width: size ?? generatedWidth,
|
|
26
|
+
height: barHeight
|
|
27
|
+
},
|
|
28
|
+
className: cx(skeletonStyle, margins && marginStyle, animateAppearance && skeletonAppearanceStyle)
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
var SkeletonList = memo(function SkeletonList({ amount, minAmount = 1, maxAmount = 1, WrapperComponent, ...restProps }) {
|
|
32
|
+
const calculatedAmount = amount || getRandomInt(minAmount, maxAmount);
|
|
33
|
+
return /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: calculatedAmount }, (_, index) => {
|
|
34
|
+
const style = { opacity: (calculatedAmount - index) / calculatedAmount };
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
style,
|
|
37
|
+
children: WrapperComponent ? /* @__PURE__ */ jsx(WrapperComponent, { children: /* @__PURE__ */ jsx(Skeleton, {
|
|
38
|
+
index: index + 1,
|
|
39
|
+
...restProps
|
|
40
|
+
}) }) : /* @__PURE__ */ jsx(Skeleton, {
|
|
41
|
+
index: index + 1,
|
|
42
|
+
...restProps
|
|
43
|
+
})
|
|
44
|
+
}, index);
|
|
45
|
+
}) });
|
|
46
|
+
});
|
|
47
|
+
var SkeletonTextLine = /*#__PURE__*/ styled("div")({
|
|
48
|
+
name: "SkeletonTextLine",
|
|
49
|
+
class: "s1uzetk8-SkeletonTextLine",
|
|
50
|
+
propsAsIs: false
|
|
51
|
+
});
|
|
52
|
+
var pageContentStyle = "p13qksqz-pageContent";
|
|
53
|
+
var PageContentSkeleton = () => /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: pageContentStyle,
|
|
55
|
+
children: jsx(SkeletonList, { amount: 3 })
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
export { PageContentSkeleton, Skeleton, SkeletonList, SkeletonTextLine };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
.slo3ayz-skeleton{vertical-align:middle;position:relative;background:none;}.slo3ayz-skeleton::before,.slo3ayz-skeleton::after{content:"";display:block;position:absolute;top:0;bottom:0;left:0;right:0;}@keyframes OpacityAnim-slo3ayz-skeleton{0%{opacity:1;}100%{opacity:0;}}.slo3ayz-skeleton::before{background-image:linear-gradient(90deg, transparent 0%, var(--colorBgSkeleton) 100%);animation:OpacityAnim-slo3ayz-skeleton 2s ease-in-out 0s infinite alternate;}.slo3ayz-skeleton::after{background-image:linear-gradient(90deg, var(--colorBgSkeleton) 0%, transparent 100%);animation:OpacityAnim-slo3ayz-skeleton 2s ease-in-out -2s infinite alternate;}
|
|
2
|
+
.mzl91bk-margin{margin-top:4px;margin-bottom:4px;}
|
|
3
|
+
.siugmrr-skeletonAppearance{animation:OpacityAnim-siugmrr-skeletonAppearance 1s cubic-bezier(0.95, 0.05, 0.795, 0.035) 1;}@keyframes OpacityAnim-siugmrr-skeletonAppearance{0%{opacity:0;}100%{opacity:1;}}
|
|
4
|
+
.cjtjcsl-Container::before,.cjtjcsl-Container::after{border-radius:var(--cjtjcsl-0);}
|
|
5
|
+
.s1uzetk8-SkeletonTextLine{padding-top:1px;}
|
|
6
|
+
.p13qksqz-pageContent{padding:12px;}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IconBaseProps } from "./icons/types.js";
|
|
2
|
+
//#region src/spinner-box.d.ts
|
|
3
|
+
type SpinnerBoxProps = {
|
|
4
|
+
minHeight?: number;
|
|
5
|
+
height?: number | "fill";
|
|
6
|
+
width?: number | "fill";
|
|
7
|
+
overlay?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & IconBaseProps;
|
|
10
|
+
declare const SpinnerBox: import("react").NamedExoticComponent<SpinnerBoxProps>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { SpinnerBox, SpinnerBoxProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "./spinner-box.wyw-in-js.css";
|
|
2
|
+
import { Spinner } from "./spinner.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { memo } from "react";
|
|
6
|
+
import { cx } from "@linaria/core";
|
|
7
|
+
//#region src/spinner-box.tsx
|
|
8
|
+
var boxStyle = "ban45ip-box";
|
|
9
|
+
var overlayStyle = "om0do2z-overlay";
|
|
10
|
+
var fillable = (value) => value === "fill" ? "100%" : value;
|
|
11
|
+
var SpinnerBox = memo(function SpinnerBox({ minHeight, height, width, overlay = false, className, ...spinnerProps }) {
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
className: cx(boxStyle, overlay && overlayStyle, className),
|
|
14
|
+
style: {
|
|
15
|
+
minHeight,
|
|
16
|
+
height: fillable(height),
|
|
17
|
+
width: fillable(width)
|
|
18
|
+
},
|
|
19
|
+
children: jsx(Spinner, { ...spinnerProps })
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { SpinnerBox };
|
package/lib/tab-nav/tab-nav.js
CHANGED
|
@@ -3,12 +3,12 @@ import { TooltipIfOverflown } from "../tooltip-if-overflown.js";
|
|
|
3
3
|
import { ellipsis } from "../styles-utils.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { createContext } from "@fibery/react/src/create-context";
|
|
6
7
|
import { forwardRef, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
7
|
-
import { createContext as createContext$1 } from "@fibery/react/src/create-context";
|
|
8
8
|
import { cx } from "@linaria/core";
|
|
9
9
|
import { useResizeObserver } from "@fibery/react/src/use-resize-observer";
|
|
10
|
-
import { useComposedRefs } from "@fibery/react/src/use-composed-refs";
|
|
11
10
|
import { useCallbackRef } from "@fibery/react/src/use-callback-ref";
|
|
11
|
+
import { useComposedRefs } from "@fibery/react/src/use-composed-refs";
|
|
12
12
|
import { NavigationMenu, NavigationMenuItem, NavigationMenuLink, NavigationMenuList } from "@radix-ui/react-navigation-menu";
|
|
13
13
|
//#region src/tab-nav/tab-nav.tsx
|
|
14
14
|
var tabNavIndicatorWidth = 100;
|
|
@@ -24,7 +24,7 @@ var positionIndicator = (indicator, activeItem) => {
|
|
|
24
24
|
indicator.style.transform = `translateX(${activeItem.offsetLeft}px) scaleX(${activeItem.offsetWidth / tabNavIndicatorWidth})`;
|
|
25
25
|
indicator.classList.add(tabNavIndicatorMounted);
|
|
26
26
|
};
|
|
27
|
-
var [TabNavContextProvider, useTabNavCtx] = createContext
|
|
27
|
+
var [TabNavContextProvider, useTabNavCtx] = createContext("TabNavContext");
|
|
28
28
|
var TabNavRoot = ({ className, trackClassName, children, orientation = "horizontal", ...props }) => {
|
|
29
29
|
const indicatorRef = useRef(null);
|
|
30
30
|
const activeItemRef = useRef(null);
|
|
@@ -1399,10 +1399,10 @@ declare const neutralStyles: {
|
|
|
1399
1399
|
readonly "--cardBg": "rgb(51,51,51)";
|
|
1400
1400
|
readonly "--selectedImageBorder": "rgba(255,255,255,0.59)";
|
|
1401
1401
|
readonly "--transparent": "rgba(255, 255, 255, 0)";
|
|
1402
|
-
readonly "--progressBg": "rgb(
|
|
1403
|
-
readonly "--progressText": "rgb(
|
|
1404
|
-
readonly "--progressFillBg": "rgb(
|
|
1405
|
-
readonly "--progressFillText": "rgb(
|
|
1402
|
+
readonly "--progressBg": "rgb(41,41,41)";
|
|
1403
|
+
readonly "--progressText": "rgb(161,161,161)";
|
|
1404
|
+
readonly "--progressFillBg": "rgb(161,161,161)";
|
|
1405
|
+
readonly "--progressFillText": "rgb(28,28,28)";
|
|
1406
1406
|
readonly "--progressBarFillNeutral": "rgba(112, 112, 112, 0.2)";
|
|
1407
1407
|
readonly "--progressBarFill": "#5f85dd";
|
|
1408
1408
|
readonly "--progressBarBg": "rgba(95, 133, 221, 0.25)";
|
|
@@ -2499,10 +2499,10 @@ declare const warmStyles: {
|
|
|
2499
2499
|
readonly "--cardBg": "rgb(55,50,48)";
|
|
2500
2500
|
readonly "--selectedImageBorder": "rgba(255,255,254,0.59)";
|
|
2501
2501
|
readonly "--transparent": "rgba(255, 255, 255, 0)";
|
|
2502
|
-
readonly "--progressBg": "rgb(
|
|
2503
|
-
readonly "--progressText": "rgb(
|
|
2504
|
-
readonly "--progressFillBg": "rgb(
|
|
2505
|
-
readonly "--progressFillText": "rgb(
|
|
2502
|
+
readonly "--progressBg": "rgb(45,40,38)";
|
|
2503
|
+
readonly "--progressText": "rgb(166,159,157)";
|
|
2504
|
+
readonly "--progressFillBg": "rgb(166,159,157)";
|
|
2505
|
+
readonly "--progressFillText": "rgb(32,27,25)";
|
|
2506
2506
|
readonly "--progressBarFillNeutral": "rgba(117, 111, 109, 0.2)";
|
|
2507
2507
|
readonly "--progressBarFill": "rgb(22,152,183)";
|
|
2508
2508
|
readonly "--progressBarBg": "rgba(22, 152, 183, 0.25)";
|
package/lib/theming.generated.js
CHANGED
|
@@ -1399,10 +1399,10 @@ var neutralStyles = {
|
|
|
1399
1399
|
"--cardBg": "rgb(51,51,51)",
|
|
1400
1400
|
"--selectedImageBorder": "rgba(255,255,255,0.59)",
|
|
1401
1401
|
"--transparent": "rgba(255, 255, 255, 0)",
|
|
1402
|
-
"--progressBg": "rgb(
|
|
1403
|
-
"--progressText": "rgb(
|
|
1404
|
-
"--progressFillBg": "rgb(
|
|
1405
|
-
"--progressFillText": "rgb(
|
|
1402
|
+
"--progressBg": "rgb(41,41,41)",
|
|
1403
|
+
"--progressText": "rgb(161,161,161)",
|
|
1404
|
+
"--progressFillBg": "rgb(161,161,161)",
|
|
1405
|
+
"--progressFillText": "rgb(28,28,28)",
|
|
1406
1406
|
"--progressBarFillNeutral": "rgba(112, 112, 112, 0.2)",
|
|
1407
1407
|
"--progressBarFill": "#5f85dd",
|
|
1408
1408
|
"--progressBarBg": "rgba(95, 133, 221, 0.25)",
|
|
@@ -2499,10 +2499,10 @@ var warmStyles = {
|
|
|
2499
2499
|
"--cardBg": "rgb(55,50,48)",
|
|
2500
2500
|
"--selectedImageBorder": "rgba(255,255,254,0.59)",
|
|
2501
2501
|
"--transparent": "rgba(255, 255, 255, 0)",
|
|
2502
|
-
"--progressBg": "rgb(
|
|
2503
|
-
"--progressText": "rgb(
|
|
2504
|
-
"--progressFillBg": "rgb(
|
|
2505
|
-
"--progressFillText": "rgb(
|
|
2502
|
+
"--progressBg": "rgb(45,40,38)",
|
|
2503
|
+
"--progressText": "rgb(166,159,157)",
|
|
2504
|
+
"--progressFillBg": "rgb(166,159,157)",
|
|
2505
|
+
"--progressFillText": "rgb(32,27,25)",
|
|
2506
2506
|
"--progressBarFillNeutral": "rgba(117, 111, 109, 0.2)",
|
|
2507
2507
|
"--progressBarFill": "rgb(22,152,183)",
|
|
2508
2508
|
"--progressBarBg": "rgba(22, 152, 183, 0.25)",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext } from "@fibery/react/src/create-context";
|
|
2
3
|
import "react";
|
|
3
|
-
import { createContext as createContext$1 } from "@fibery/react/src/create-context";
|
|
4
4
|
import { ToastProvider as ToastProvider$1 } from "@radix-ui/react-toast";
|
|
5
5
|
//#region src/toast/toast-provider.tsx
|
|
6
|
-
var [Provider, useCtx] = createContext
|
|
6
|
+
var [Provider, useCtx] = createContext("ToastQueue");
|
|
7
7
|
var ToastProvider = ({ toastQueue, children }) => {
|
|
8
8
|
return /* @__PURE__ */ jsx(Provider, {
|
|
9
9
|
value: toastQueue,
|
package/lib/tree-utils.d.ts
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { $TSFixMe } from "./tsfixme.js";
|
|
2
1
|
//#region src/tree-utils.d.ts
|
|
3
2
|
type ItemId = string | number;
|
|
4
|
-
interface TreeData {
|
|
3
|
+
interface TreeData<Item extends TreeItem = TreeItem> {
|
|
5
4
|
rootId: ItemId;
|
|
6
|
-
items: Record<ItemId,
|
|
5
|
+
items: Record<ItemId, Item>;
|
|
7
6
|
}
|
|
8
|
-
type TreeItemData =
|
|
9
|
-
type TreeItem = {
|
|
7
|
+
type TreeItemData = object;
|
|
8
|
+
type TreeItem<Data extends TreeItemData = TreeItemData> = {
|
|
10
9
|
id: ItemId;
|
|
11
10
|
children: ItemId[];
|
|
12
11
|
hasChildren?: boolean;
|
|
13
12
|
isExpanded?: boolean;
|
|
14
13
|
isChildrenLoading?: boolean;
|
|
15
|
-
data?:
|
|
14
|
+
data?: Data;
|
|
16
15
|
};
|
|
17
|
-
type FlattenedTree = FlattenedItem[];
|
|
16
|
+
type FlattenedTree<Item extends TreeItem = TreeItem> = FlattenedItem<Item>[];
|
|
18
17
|
type Path = number[];
|
|
19
|
-
type FlattenedItem = {
|
|
20
|
-
item:
|
|
18
|
+
type FlattenedItem<Item extends TreeItem = TreeItem> = {
|
|
19
|
+
item: Item;
|
|
21
20
|
path: Path;
|
|
22
21
|
};
|
|
23
22
|
type TreeSourcePosition = {
|
|
@@ -28,15 +27,8 @@ type TreeDestinationPosition = {
|
|
|
28
27
|
parentId: ItemId;
|
|
29
28
|
index?: number;
|
|
30
29
|
};
|
|
31
|
-
type TreeItemMutation =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
hasChildren?: boolean;
|
|
35
|
-
isExpanded?: boolean;
|
|
36
|
-
isChildrenLoading?: boolean;
|
|
37
|
-
data?: TreeItemData;
|
|
38
|
-
};
|
|
39
|
-
declare const flattenTree: (tree: TreeData, path?: Path) => FlattenedTree;
|
|
40
|
-
declare const mutateTree: (tree: TreeData, itemId: ItemId, mutation: TreeItemMutation) => TreeData;
|
|
30
|
+
type TreeItemMutation<Item extends TreeItem = TreeItem> = Partial<Item>;
|
|
31
|
+
declare const flattenTree: <Item extends TreeItem>(tree: TreeData<Item>, path?: Path) => FlattenedTree<Item>;
|
|
32
|
+
declare const mutateTree: <Item extends TreeItem>(tree: TreeData<Item>, itemId: ItemId, mutation: TreeItemMutation<Item>) => TreeData<Item>;
|
|
41
33
|
//#endregion
|
|
42
34
|
export { FlattenedItem, FlattenedTree, ItemId, Path, TreeData, TreeDestinationPosition, TreeItem, TreeItemData, TreeItemMutation, TreeSourcePosition, flattenTree, mutateTree };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SkeletonProps } from "../skeleton.js";
|
|
2
2
|
//#region src/unit/loading-unit-value.d.ts
|
|
3
|
-
declare const
|
|
4
|
-
declare const LoadingUnitValue: (props: LoadingSausageProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const LoadingUnitValue: (props: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
//#endregion
|
|
6
|
-
export { LoadingUnitValue
|
|
5
|
+
export { LoadingUnitValue };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import "./loading-unit-value.wyw-in-js.css";
|
|
2
|
-
import {
|
|
2
|
+
import { Skeleton } from "../skeleton.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/unit/loading-unit-value.tsx
|
|
6
|
-
var unitTextHeight = 8;
|
|
7
6
|
var LoadingUnitValue = (props) => /* @__PURE__ */ jsx("div", {
|
|
8
7
|
className: "cl6zvo6",
|
|
9
|
-
children: jsx(
|
|
8
|
+
children: jsx(Skeleton, {
|
|
10
9
|
...props,
|
|
11
10
|
height: 8
|
|
12
11
|
})
|
|
13
12
|
});
|
|
14
13
|
//#endregion
|
|
15
|
-
export { LoadingUnitValue
|
|
14
|
+
export { LoadingUnitValue };
|
|
@@ -2,10 +2,7 @@ import { LoadingUnitValue } from "./loading-unit-value.js";
|
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/unit/maybe-unit-value.tsx
|
|
4
4
|
var MaybeUnitValue = ({ value }) => {
|
|
5
|
-
return value === void 0 ? /* @__PURE__ */ jsx(LoadingUnitValue, {
|
|
6
|
-
minWidth: 18,
|
|
7
|
-
maxWidth: 18
|
|
8
|
-
}) : /* @__PURE__ */ jsx(Fragment, { children: value });
|
|
5
|
+
return value === void 0 ? /* @__PURE__ */ jsx(LoadingUnitValue, { width: 24 }) : /* @__PURE__ */ jsx(Fragment, { children: value });
|
|
9
6
|
};
|
|
10
7
|
//#endregion
|
|
11
8
|
export { MaybeUnitValue };
|
package/lib/unit/nav-button.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ type UnitNavButtonProps = {
|
|
|
7
7
|
declare const getNavButtonSize: (size: UnitSize) => number;
|
|
8
8
|
declare const UnitNavButton: ({ children }: UnitNavButtonProps) => ReactElement<{
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
|
+
"data-unit-nav-button"?: string;
|
|
10
11
|
}, string | import("react").JSXElementConstructor<any>>;
|
|
11
12
|
//#endregion
|
|
12
13
|
export { UnitNavButton, UnitNavButtonProps, getNavButtonSize };
|
package/lib/unit/nav-button.js
CHANGED
|
@@ -8,11 +8,14 @@ var UnitNavButton = ({ children }) => {
|
|
|
8
8
|
const { size } = useUnitContext();
|
|
9
9
|
const element = Children.only(children);
|
|
10
10
|
const slotSize = getNavButtonSize(size);
|
|
11
|
-
return cloneElement(element, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
return cloneElement(element, {
|
|
12
|
+
style: {
|
|
13
|
+
...element.props.style,
|
|
14
|
+
width: slotSize,
|
|
15
|
+
height: slotSize
|
|
16
|
+
},
|
|
17
|
+
"data-unit-nav-button": ""
|
|
18
|
+
});
|
|
16
19
|
};
|
|
17
20
|
//#endregion
|
|
18
21
|
export { UnitNavButton, getNavButtonSize };
|
package/lib/use-is-phone.js
CHANGED
|
@@ -2,10 +2,10 @@ import { mobileRootClassName } from "./mobile-styles.js";
|
|
|
2
2
|
import { isPhoneApp, isPhoneMode, phoneMediaQuery, phoneMediaQueryDynamic } from "./phone.js";
|
|
3
3
|
import { useIsMediaQueryMatched } from "./use-is-media-query-matched.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { createContext } from "@fibery/react/src/create-context";
|
|
5
6
|
import { useLayoutEffect } from "react";
|
|
6
|
-
import { createContext as createContext$1 } from "@fibery/react/src/create-context";
|
|
7
7
|
//#region src/use-is-phone.tsx
|
|
8
|
-
var [Provider, useIsPhone] = createContext
|
|
8
|
+
var [Provider, useIsPhone] = createContext("PhoneContext", false);
|
|
9
9
|
function IsPhoneProvider({ children }) {
|
|
10
10
|
const isPhone = useIsMediaQueryMatched(phoneMediaQueryDynamic);
|
|
11
11
|
useLayoutEffect(() => {
|
|
@@ -2,12 +2,12 @@ import { keyboardHeightVar, mobileKeyboardOpenClassName } from "./mobile-styles.
|
|
|
2
2
|
import { isPhoneApp } from "./phone.js";
|
|
3
3
|
import { noop } from "@fibery/helpers/src/_";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { createContext } from "@fibery/react/src/create-context";
|
|
5
6
|
import { useEffect, useState } from "react";
|
|
6
|
-
import { createContext as createContext$1 } from "@fibery/react/src/create-context";
|
|
7
7
|
//#region src/use-on-screen-keyboard-data.tsx
|
|
8
8
|
var defaultKeyboardHeight = 350;
|
|
9
|
-
var [OnScreenKeyboardHeightValueProvider, useOnScreenKeyboardHeight] = createContext
|
|
10
|
-
var [IsOnScreenKeyboardOpenedValueProvider, useIsOnScreenKeyboardOpened] = createContext
|
|
9
|
+
var [OnScreenKeyboardHeightValueProvider, useOnScreenKeyboardHeight] = createContext("OnScreenKeyboardHeightProvider", defaultKeyboardHeight);
|
|
10
|
+
var [IsOnScreenKeyboardOpenedValueProvider, useIsOnScreenKeyboardOpened] = createContext("IsOnScreenKeyboardOpenedValueProvider", false);
|
|
11
11
|
function OnScreenKeyboardContextProvider({ children }) {
|
|
12
12
|
const [keyboardHeight, setKeyboardHeight] = useState(defaultKeyboardHeight);
|
|
13
13
|
const [keyboardVisible, setKeyboardVisible] = useState(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib"
|
|
@@ -113,8 +113,6 @@
|
|
|
113
113
|
"@types/apca-w3": "0.1.3",
|
|
114
114
|
"@types/d3-shape": "3.1.7",
|
|
115
115
|
"@types/history": "4.7.11",
|
|
116
|
-
"@types/react-select-country-list": "2.2.3",
|
|
117
|
-
"@types/setimmediate": "1.0.4",
|
|
118
116
|
"apca-w3": "0.1.9",
|
|
119
117
|
"chrono-node": "2.9.0",
|
|
120
118
|
"classnames": "2.3.1",
|
|
@@ -140,15 +138,14 @@
|
|
|
140
138
|
"react-day-picker": "8.10.1",
|
|
141
139
|
"react-popper": "2.3.0",
|
|
142
140
|
"react-select": "5.3.2",
|
|
143
|
-
"react-select-country-list": "2.2.1",
|
|
144
141
|
"react-virtuoso": "4.18.1",
|
|
145
142
|
"screenfull": "6.0.2",
|
|
146
143
|
"tabbable": "5.2.1",
|
|
147
144
|
"vaul": "1.1.2",
|
|
148
145
|
"virtua": "0.50.4",
|
|
149
146
|
"@fibery/emoji-data": "3.0.0",
|
|
150
|
-
"@fibery/
|
|
151
|
-
"@fibery/
|
|
147
|
+
"@fibery/helpers": "4.0.0",
|
|
148
|
+
"@fibery/react": "2.0.5"
|
|
152
149
|
},
|
|
153
150
|
"peerDependencies": {
|
|
154
151
|
"react": "18.3.1",
|
package/lib/ai/model.d.ts
DELETED
package/lib/ai/model.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import "./model.wyw-in-js.css";
|
|
2
|
-
import { Tooltip } from "../tooltip.js";
|
|
3
|
-
import { Emoji } from "../emoji.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { useCallback, useState } from "react";
|
|
7
|
-
//#region src/ai/model.tsx
|
|
8
|
-
var exampleItemCodeStyle = "e1jf3cc2-exampleItemCode";
|
|
9
|
-
var indicators = [{
|
|
10
|
-
name: "gpt-3.5-turbo-16k",
|
|
11
|
-
symbol: "🤖",
|
|
12
|
-
desc: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
|
-
/* @__PURE__ */ jsx("p", { children: "$0.003 / 1K tokens" }),
|
|
14
|
-
/* @__PURE__ */ jsx("p", { children: "Most capable GPT-3.5 model optimized for chat at 1/30th the cost of GPT-4 model" }),
|
|
15
|
-
/* @__PURE__ */ jsx("p", { children: "Good at: Complex intent, cause and effect, summarization for audience" })
|
|
16
|
-
] })
|
|
17
|
-
}, {
|
|
18
|
-
name: "gpt-4",
|
|
19
|
-
symbol: "🧠",
|
|
20
|
-
desc: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
|
-
/* @__PURE__ */ jsx("p", { children: "$0.0600 / 1K tokens." }),
|
|
22
|
-
/* @__PURE__ */ jsx("p", { children: "With broad general knowledge and domain expertise," }),
|
|
23
|
-
/* @__PURE__ */ jsx("p", { children: "GPT-4 can follow complex instructions in natural language and solve difficult problems with accuracy" }),
|
|
24
|
-
/* @__PURE__ */ jsx("p", { children: "Excellent at: Complex intent, cause and effect, summarization for audience" })
|
|
25
|
-
] })
|
|
26
|
-
}];
|
|
27
|
-
var delta = 1;
|
|
28
|
-
var rotate = (n, min, max) => n > max ? min : n;
|
|
29
|
-
var Model = ({ initialValue, onChange }) => {
|
|
30
|
-
const [index, setIndex] = useState(indicators.map(({ name }) => name).indexOf(initialValue));
|
|
31
|
-
const onUseButtonClick = useCallback(() => {
|
|
32
|
-
const nextIndex = rotate(index + delta, 0, indicators.length - 1);
|
|
33
|
-
onChange(indicators[nextIndex].name);
|
|
34
|
-
setIndex(nextIndex);
|
|
35
|
-
}, [onChange, index]);
|
|
36
|
-
const item = indicators[index];
|
|
37
|
-
return /* @__PURE__ */ jsx("div", { children: jsx(Tooltip, {
|
|
38
|
-
title: `Model: ${item.name}`,
|
|
39
|
-
description: item.desc,
|
|
40
|
-
instant: true,
|
|
41
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
42
|
-
type: "button",
|
|
43
|
-
onClick: onUseButtonClick,
|
|
44
|
-
className: exampleItemCodeStyle,
|
|
45
|
-
children: /* @__PURE__ */ jsx(Emoji, {
|
|
46
|
-
symbol: item.symbol,
|
|
47
|
-
label: item.name,
|
|
48
|
-
size: 1.25,
|
|
49
|
-
inline: true
|
|
50
|
-
})
|
|
51
|
-
})
|
|
52
|
-
}) });
|
|
53
|
-
};
|
|
54
|
-
//#endregion
|
|
55
|
-
export { Model };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.e1jf3cc2-exampleItemCode{font-family:"SFMono-Regular",Menlo,Consolas,"PT Mono","Liberation Mono",Courier,monospace;font-size:12px;line-height:1.5;font-weight:410;color:var(--textColor);white-space:initial;text-align:left;border-radius:4px;border:none;background-color:var(--transparent);cursor:pointer;}.e1jf3cc2-exampleItemCode:hover{background-color:var(--colorAccentBgSubtle);}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import TextArea from "rc-textarea";
|
|
2
|
-
//#region src/antd/auto-width-transparent-textarea.d.ts
|
|
3
|
-
declare const AutoWidthTransparentTextArea: import("react").ForwardRefExoticComponent<import("rc-textarea").TextAreaProps & {
|
|
4
|
-
wrapperClassName?: string;
|
|
5
|
-
bypassedRef?: React.ForwardedRef<React.ElementRef<typeof TextArea>>;
|
|
6
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { AutoWidthTransparentTextArea };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import "./auto-width-transparent-textarea.wyw-in-js.css";
|
|
2
|
-
import { TransparentInputWrapper } from "./input.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { forwardRef, useRef } from "react";
|
|
6
|
-
import { cx } from "@linaria/core";
|
|
7
|
-
import { useComposedRefs } from "@fibery/react/src/use-composed-refs";
|
|
8
|
-
import RcTextArea from "rc-textarea";
|
|
9
|
-
//#region src/antd/auto-width-transparent-textarea.tsx
|
|
10
|
-
var wrapper = "w1dk3li9-wrapper";
|
|
11
|
-
var textArea = "twcv412-textArea";
|
|
12
|
-
var AutoWidthTransparentTextArea = forwardRef(function AutoWidthTransparentTextArea({ onChange, style, className, wrapperClassName, ...props }, ref) {
|
|
13
|
-
const wrapperRef = useRef(null);
|
|
14
|
-
const composedRef = useComposedRefs(ref, wrapperRef);
|
|
15
|
-
const handleChange = (e) => {
|
|
16
|
-
if (wrapperRef.current) wrapperRef.current.dataset.value = e.target.value;
|
|
17
|
-
onChange?.(e);
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ jsx(TransparentInputWrapper, {
|
|
20
|
-
className: cx(wrapper, wrapperClassName),
|
|
21
|
-
"data-value": props.value || props.placeholder,
|
|
22
|
-
ref: composedRef,
|
|
23
|
-
children: jsx(RcTextArea, {
|
|
24
|
-
prefixCls: "ant-input",
|
|
25
|
-
className: cx("ant-input", textArea, className),
|
|
26
|
-
style,
|
|
27
|
-
onChange: handleChange,
|
|
28
|
-
cols: 1,
|
|
29
|
-
...props
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
//#endregion
|
|
34
|
-
export { AutoWidthTransparentTextArea };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { assert } from "@fibery/helpers/utils/trace";
|
|
2
|
-
//#region src/get-trigger-node-popup-container.ts
|
|
3
|
-
var getTriggerNodePopupContainer = (triggerNode) => {
|
|
4
|
-
assert(triggerNode, "triggerNode");
|
|
5
|
-
return triggerNode;
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { getTriggerNodePopupContainer };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ActionsMenuItemProps } from "../actions-menu/actions-menu-item.js";
|
|
2
|
-
import { ListRowContentProps, ListRowSurfaceProps } from "./list-row-surface.js";
|
|
3
|
-
//#region src/lists/actions-menu-row-surface.d.ts
|
|
4
|
-
interface ActionMenuItemSurfaceProps extends Omit<ActionsMenuItemProps, "description">, Omit<ListRowSurfaceProps, "children" | "darker" | "onSelect" | "id"> {}
|
|
5
|
-
declare const actionMenuItemSurface: import("@linaria/core").LinariaClassName;
|
|
6
|
-
declare const ActionMenuItemSurface: import("react").ForwardRefExoticComponent<ActionMenuItemSurfaceProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
interface ActionMenuItemContentProps extends ListRowContentProps {
|
|
8
|
-
description?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const ActionMenuItemContent: import("react").ForwardRefExoticComponent<ActionMenuItemContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { ActionMenuItemContent, ActionMenuItemSurface, actionMenuItemSurface };
|