@fibery/ui-kit 9.1.3 → 9.2.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/lib/actions-menu/actions-menu-item.d.ts +2 -0
- package/lib/actions-menu/actions-menu-item.js +4 -4
- package/lib/actions-menu/context-actions-menu.js +11 -2
- package/lib/board-table-loader.js +1 -1
- package/lib/card-container.js +1 -1
- package/lib/design-system/alpha-coefficients.d.ts +2 -0
- package/lib/design-system/alpha-coefficients.js +2 -0
- package/lib/design-system/colors.d.ts +4 -0
- package/lib/design-system/colors.js +2 -0
- package/lib/design-system/skeleton.d.ts +7 -0
- package/lib/design-system/skeleton.js +18 -0
- package/lib/design-system/theme.d.ts +10 -0
- package/lib/design-system.d.ts +2 -1
- package/lib/design-system.js +2 -1
- package/lib/file-item.js +14 -14
- package/lib/file-item.wyw-in-js.css +10 -11
- package/lib/icons/react/integration-claude.js +1 -1
- package/lib/icons/react/integration-gemini.js +1 -1
- package/lib/icons/react/integration-openai.js +1 -1
- package/lib/loaders.js +4 -8
- package/lib/number-input/number-input.js +13 -5
- package/lib/pretty-size.d.ts +1 -1
- package/lib/pretty-size.js +3 -3
- package/lib/rich-input-loader.js +5 -11
- 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/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 +29 -7
- package/lib/skeleton.js +17 -6
- package/lib/skeleton.wyw-in-js.css +2 -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 +1 -1
- package/lib/theme-provider.d.ts +2 -0
- package/lib/theming.generated.d.ts +10 -0
- package/lib/theming.generated.js +10 -0
- package/lib/tooltip.js +1 -0
- package/lib/tree-utils.d.ts +11 -19
- package/lib/unit/loading-unit-value.d.ts +1 -2
- package/lib/unit/loading-unit-value.js +1 -2
- 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/package.json +3 -3
- package/lib/animated-number.d.ts +0 -12
- package/lib/animated-number.js +0 -32
- package/lib/tsfixme.d.ts +0 -4
- package/lib/tsfixme.js +0 -0
|
@@ -19,6 +19,8 @@ type ActionsMenuItemProps = {
|
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
/** Whether the action requires confirmation */
|
|
21
21
|
dangerous?: boolean;
|
|
22
|
+
/** Skip the "Really <action>?" confirmation text for a dangerous item, keeping the rest of the dangerous styling/behavior */
|
|
23
|
+
hideConfirmationText?: boolean;
|
|
22
24
|
loading?: boolean;
|
|
23
25
|
checked?: boolean;
|
|
24
26
|
children: ReactNode;
|
|
@@ -13,8 +13,8 @@ import { noop } from "@fibery/helpers/src/_";
|
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { useId } from "react";
|
|
15
15
|
import { cx } from "@linaria/core";
|
|
16
|
-
import { stopPropagation } from "@fibery/react/src/stop-propagation";
|
|
17
16
|
import { useCallbackRef } from "@fibery/react/src/use-callback-ref";
|
|
17
|
+
import { stopPropagation } from "@fibery/react/src/stop-propagation";
|
|
18
18
|
//#region src/actions-menu/actions-menu-item.tsx
|
|
19
19
|
var hiddenTextCss = "hq9y0ce-hiddenText";
|
|
20
20
|
var visibleTextCss = "v10chqgc-visibleText";
|
|
@@ -58,7 +58,7 @@ var LeftCorner = ({ Icon, iconColor }) => {
|
|
|
58
58
|
})
|
|
59
59
|
}) : null;
|
|
60
60
|
};
|
|
61
|
-
var ActionsMenuItemComponent = function ActionsMenuItemComponent({ id, testId, title, onSelect, description, Icon, iconColor, shortcut, disabled, dangerous, showWarning, loading, checked, children, className }) {
|
|
61
|
+
var ActionsMenuItemComponent = function ActionsMenuItemComponent({ id, testId, title, onSelect, description, Icon, iconColor, shortcut, disabled, dangerous, hideConfirmationText, showWarning, loading, checked, children, className }) {
|
|
62
62
|
const { MenuPrimitive } = useActionsMenuContext();
|
|
63
63
|
const setActiveDangerousRow = useSetActiveDangerousRow();
|
|
64
64
|
const handleSelect = async (e) => {
|
|
@@ -67,7 +67,7 @@ var ActionsMenuItemComponent = function ActionsMenuItemComponent({ id, testId, t
|
|
|
67
67
|
e.preventDefault();
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
if (dangerous && !showWarning) {
|
|
70
|
+
if (dangerous && !hideConfirmationText && !showWarning) {
|
|
71
71
|
e.preventDefault();
|
|
72
72
|
setActiveDangerousRow(id);
|
|
73
73
|
return;
|
|
@@ -90,7 +90,7 @@ var ActionsMenuItemComponent = function ActionsMenuItemComponent({ id, testId, t
|
|
|
90
90
|
/* @__PURE__ */ jsxs("div", {
|
|
91
91
|
className: rowContentCss,
|
|
92
92
|
children: [
|
|
93
|
-
dangerous && /* @__PURE__ */ jsxs("div", {
|
|
93
|
+
dangerous && !hideConfirmationText && /* @__PURE__ */ jsxs("div", {
|
|
94
94
|
className: cx(hiddenTextCss, showWarning && visibleTextCss),
|
|
95
95
|
children: [
|
|
96
96
|
"Really ",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useIsPhone } from "../use-is-phone.js";
|
|
2
|
+
import { useOpenPopoverTracker } from "../open-popover-tracker.js";
|
|
2
3
|
import { ActionsMenuContextProvider } from "./contexts/actions-menu-context.js";
|
|
3
4
|
import { ActionsMenuConfirmation } from "./actions-menu-confirmation.js";
|
|
4
5
|
import { ActionsMenuDangerousRowsProvider } from "./contexts/actions-menu-dangerous-rows.js";
|
|
@@ -6,7 +7,7 @@ import { ActionsMenu } from "./actions-menu.js";
|
|
|
6
7
|
import { Content, Portal, Root, Trigger, context_menu_exports } from "../context-menu/index.js";
|
|
7
8
|
import { noop } from "@fibery/helpers/src/_";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { useState } from "react";
|
|
10
|
+
import { useEffect, useState } from "react";
|
|
10
11
|
import { useControllableState } from "@fibery/react/src/use-controllable-state";
|
|
11
12
|
import { preventDefault } from "@fibery/react/src/prevent-default";
|
|
12
13
|
//#region src/actions-menu/context-actions-menu.tsx
|
|
@@ -17,6 +18,14 @@ var ContextActionsMenu = ({ open, onOpenChange = noop, trigger, children, disabl
|
|
|
17
18
|
onChange: onOpenChange
|
|
18
19
|
});
|
|
19
20
|
const [confirmation, setConfirmation] = useState(null);
|
|
21
|
+
const { onOpenChange: onOpenPopoverChange } = useOpenPopoverTracker();
|
|
22
|
+
const handleOpenChange = (nextOpen) => {
|
|
23
|
+
if (!(isPhone && supportsMobile)) onOpenPopoverChange(nextOpen);
|
|
24
|
+
setOpen(nextOpen);
|
|
25
|
+
};
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
return () => onOpenPopoverChange(false);
|
|
28
|
+
}, [onOpenPopoverChange]);
|
|
20
29
|
if (isPhone && supportsMobile) return /* @__PURE__ */ jsx(ActionsMenu, {
|
|
21
30
|
open,
|
|
22
31
|
onOpenChange,
|
|
@@ -32,7 +41,7 @@ var ContextActionsMenu = ({ open, onOpenChange = noop, trigger, children, disabl
|
|
|
32
41
|
showConfirmation: setConfirmation,
|
|
33
42
|
MenuPrimitive: context_menu_exports,
|
|
34
43
|
children: [/* @__PURE__ */ jsxs(Root, {
|
|
35
|
-
onOpenChange,
|
|
44
|
+
onOpenChange: handleOpenChange,
|
|
36
45
|
children: [/* @__PURE__ */ jsx(Trigger, {
|
|
37
46
|
disabled,
|
|
38
47
|
asChild: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./board-table-loader.wyw-in-js.css";
|
|
2
2
|
import { Skeleton, SkeletonList } from "./skeleton.js";
|
|
3
|
-
import { Delayed, defaultLoaderDelay } from "./delayed.js";
|
|
4
3
|
import { Box } from "./box.js";
|
|
4
|
+
import { Delayed, defaultLoaderDelay } from "./delayed.js";
|
|
5
5
|
import { AxisHeader } from "./axis-header.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/lib/card-container.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./card-container.wyw-in-js.css";
|
|
2
2
|
import { visuallyHidden } from "./styles-utils.js";
|
|
3
|
-
import { CardHiddenLink } from "./card-hidden-link.js";
|
|
4
3
|
import { getBg } from "./box.js";
|
|
4
|
+
import { CardHiddenLink } from "./card-hidden-link.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import cx from "classnames";
|
|
@@ -91,6 +91,8 @@ declare const alphaCoefficients: {
|
|
|
91
91
|
};
|
|
92
92
|
readonly border: {
|
|
93
93
|
readonly panel: readonly [AlphaCoefficient, AlphaCoefficient];
|
|
94
|
+
readonly panelFocused: readonly [AlphaCoefficient, AlphaCoefficient];
|
|
95
|
+
readonly panelUnfocused: readonly [AlphaCoefficient, AlphaCoefficient];
|
|
94
96
|
readonly dbSettingsCard: readonly [AlphaCoefficient, AlphaCoefficient];
|
|
95
97
|
readonly link: readonly [AlphaCoefficient, AlphaCoefficient];
|
|
96
98
|
readonly linkHover: readonly [AlphaCoefficient, AlphaCoefficient];
|
|
@@ -37,6 +37,8 @@ declare function defsFromPalette({ key, whiteA, white, blackA, blackish, black,
|
|
|
37
37
|
readonly mainBg: [string, string];
|
|
38
38
|
readonly panelBg: [string, string];
|
|
39
39
|
readonly panelBorder: Def;
|
|
40
|
+
readonly panelShadowFocused: readonly [string, string];
|
|
41
|
+
readonly panelShadowUnfocused: readonly [string, string];
|
|
40
42
|
readonly panelContentBg: [string, string];
|
|
41
43
|
readonly dbSettingsSidebarBg: [string, string];
|
|
42
44
|
readonly dbSettingsSidebarItemHover: [string, string];
|
|
@@ -644,6 +646,8 @@ declare function sideFromDefs(defs: ThemeDefs, mode: ThemeMode): {
|
|
|
644
646
|
readonly mainBg: string;
|
|
645
647
|
readonly panelBg: string;
|
|
646
648
|
readonly panelBorder: string;
|
|
649
|
+
readonly panelShadowFocused: string;
|
|
650
|
+
readonly panelShadowUnfocused: string;
|
|
647
651
|
readonly panelContentBg: string;
|
|
648
652
|
readonly dbSettingsSidebarBg: string;
|
|
649
653
|
readonly dbSettingsSidebarItemHover: string;
|
|
@@ -298,6 +298,8 @@ function defsFromPalette({ key, whiteA, white, blackA, blackish, black, base, ba
|
|
|
298
298
|
mainBg: surface.level3,
|
|
299
299
|
panelBg: surface.level0,
|
|
300
300
|
panelBorder: both(stroke1)(alphaPair(base[8], baseDark[8], alphaCoefficients.border.panel)),
|
|
301
|
+
panelShadowFocused: [steps([stroke1(alpha(base[8], alphaCoefficients.border.panelFocused[0])), elevationL(blackA[5])]), stroke1(alpha(baseDark[8], alphaCoefficients.border.panelFocused[1]))],
|
|
302
|
+
panelShadowUnfocused: [steps([stroke1(alpha(base[8], alphaCoefficients.border.panelUnfocused[0])), elevationS(blackA[3])]), stroke1(alpha(baseDark[8], alphaCoefficients.border.panelUnfocused[1]))],
|
|
301
303
|
panelContentBg: surface.level2_1,
|
|
302
304
|
dbSettingsSidebarBg: surface.level2,
|
|
303
305
|
dbSettingsSidebarItemHover: surface.level4,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/design-system/skeleton.d.ts
|
|
2
|
+
declare const skeletonHeights: readonly [8, 12, 16, 20];
|
|
3
|
+
declare const skeletonWidths: readonly [24, 40, 80, 120, 200, 300, 420];
|
|
4
|
+
type SkeletonHeight = (typeof skeletonHeights)[number];
|
|
5
|
+
type SkeletonWidth = (typeof skeletonWidths)[number];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { SkeletonHeight, SkeletonWidth, skeletonHeights, skeletonWidths };
|
|
@@ -41,6 +41,8 @@ declare function themeFromDefs(defs: ThemeDefs, mode: ThemeMode): {
|
|
|
41
41
|
readonly mainBg: string;
|
|
42
42
|
readonly panelBg: string;
|
|
43
43
|
readonly panelBorder: string;
|
|
44
|
+
readonly panelShadowFocused: string;
|
|
45
|
+
readonly panelShadowUnfocused: string;
|
|
44
46
|
readonly panelContentBg: string;
|
|
45
47
|
readonly dbSettingsSidebarBg: string;
|
|
46
48
|
readonly dbSettingsSidebarItemHover: string;
|
|
@@ -651,6 +653,8 @@ declare function themeFromPaletteImpl(palette: ThemePalette, mode: ThemeMode): {
|
|
|
651
653
|
readonly mainBg: string;
|
|
652
654
|
readonly panelBg: string;
|
|
653
655
|
readonly panelBorder: string;
|
|
656
|
+
readonly panelShadowFocused: string;
|
|
657
|
+
readonly panelShadowUnfocused: string;
|
|
654
658
|
readonly panelContentBg: string;
|
|
655
659
|
readonly dbSettingsSidebarBg: string;
|
|
656
660
|
readonly dbSettingsSidebarItemHover: string;
|
|
@@ -1260,6 +1264,8 @@ declare const themeFromPalette: typeof themeFromPaletteImpl & import("@fibery/he
|
|
|
1260
1264
|
readonly mainBg: string;
|
|
1261
1265
|
readonly panelBg: string;
|
|
1262
1266
|
readonly panelBorder: string;
|
|
1267
|
+
readonly panelShadowFocused: string;
|
|
1268
|
+
readonly panelShadowUnfocused: string;
|
|
1263
1269
|
readonly panelContentBg: string;
|
|
1264
1270
|
readonly dbSettingsSidebarBg: string;
|
|
1265
1271
|
readonly dbSettingsSidebarItemHover: string;
|
|
@@ -1870,6 +1876,8 @@ declare const stylesFromTheme: ((arg: Pick<{
|
|
|
1870
1876
|
readonly mainBg: string;
|
|
1871
1877
|
readonly panelBg: string;
|
|
1872
1878
|
readonly panelBorder: string;
|
|
1879
|
+
readonly panelShadowFocused: string;
|
|
1880
|
+
readonly panelShadowUnfocused: string;
|
|
1873
1881
|
readonly panelContentBg: string;
|
|
1874
1882
|
readonly dbSettingsSidebarBg: string;
|
|
1875
1883
|
readonly dbSettingsSidebarItemHover: string;
|
|
@@ -2478,6 +2486,8 @@ declare const stylesFromTheme: ((arg: Pick<{
|
|
|
2478
2486
|
readonly mainBg: string;
|
|
2479
2487
|
readonly panelBg: string;
|
|
2480
2488
|
readonly panelBorder: string;
|
|
2489
|
+
readonly panelShadowFocused: string;
|
|
2490
|
+
readonly panelShadowUnfocused: string;
|
|
2481
2491
|
readonly panelContentBg: string;
|
|
2482
2492
|
readonly dbSettingsSidebarBg: string;
|
|
2483
2493
|
readonly dbSettingsSidebarItemHover: string;
|
package/lib/design-system.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ import { getDarkenColor, getObjectColor } from "./design-system/colors-js.js";
|
|
|
9
9
|
import { palette } from "./design-system/colors-charts.js";
|
|
10
10
|
import { dateFormat, dateTimeFormat, timeFormat } from "./design-system/date.js";
|
|
11
11
|
import { border, iconSize, layout, minPanelWidth, space, spaceNestedTreeInterval, spaceNestedTreeLevel, viewBoxSize } from "./design-system/layout.js";
|
|
12
|
+
import { SkeletonHeight, SkeletonWidth, skeletonHeights, skeletonWidths } from "./design-system/skeleton.js";
|
|
12
13
|
import { Styles, Theme, stylesFromTheme, themeFromPalette } from "./design-system/theme.js";
|
|
13
14
|
import { fontFamily, fontFamilyCode, fontSize, fontWeight, lineHeight, tabularNumsClasses, tabularNumsOff, tabularNumsOn, textClasses, textStyles } from "./design-system/typography.js";
|
|
14
15
|
import { layoutVars, listRowSurfaceFontSizeVar, menuItemHeightVar, sidebarMenuIconSizeVar, sidebarMenuItemHeightVar, themeVars } from "./theming.generated.js";
|
|
15
|
-
export { type ColorScale, type Def, type DefMapper, type Defs, type EnumDefs, type HighlightDefs, type HighlightHueName, type HighlightHueNameCap, type ModeDef, type OneBasedScale, type Styles, Swatch, type Theme, type ThemeDefs, type ThemePalette, type ThemePaletteBase, type ThemePaletteCore, type ZeroBasedScale, alpha, alphaCoefficients, border, cardTypeColors, palette as chartColorPalette, dateFormat, dateTimeFormat, defineAlphaCoefficient, dropCursorColor, durations, fontFamily, fontFamilyCode, fontSize, fontWeight, getBgSwatchBorderColor, getBgSwatchFillColor, getDarkenColor, getEnumTextColor, getLinearGradient, getObjectColor, iconSize, layout, layoutVars, lineHeight, listRowSurfaceFontSizeVar, menuItemHeightVar, minPanelWidth, opacity, shadows, sidebarMenuIconSizeVar, sidebarMenuItemHeightVar, space, spaceNestedTreeInterval, spaceNestedTreeLevel, stylesFromTheme, swatches, tabularNumsClasses, tabularNumsOff, tabularNumsOn, textClasses, textStyles, themeFromPalette, themeVars, timeFormat, tooltipDelay, transition, transitionDuration, transitions, viewBoxSize };
|
|
16
|
+
export { type ColorScale, type Def, type DefMapper, type Defs, type EnumDefs, type HighlightDefs, type HighlightHueName, type HighlightHueNameCap, type ModeDef, type OneBasedScale, type SkeletonHeight, type SkeletonWidth, type Styles, Swatch, type Theme, type ThemeDefs, type ThemePalette, type ThemePaletteBase, type ThemePaletteCore, type ZeroBasedScale, alpha, alphaCoefficients, border, cardTypeColors, palette as chartColorPalette, dateFormat, dateTimeFormat, defineAlphaCoefficient, dropCursorColor, durations, fontFamily, fontFamilyCode, fontSize, fontWeight, getBgSwatchBorderColor, getBgSwatchFillColor, getDarkenColor, getEnumTextColor, getLinearGradient, getObjectColor, iconSize, layout, layoutVars, lineHeight, listRowSurfaceFontSizeVar, menuItemHeightVar, minPanelWidth, opacity, shadows, sidebarMenuIconSizeVar, sidebarMenuItemHeightVar, skeletonHeights, skeletonWidths, space, spaceNestedTreeInterval, spaceNestedTreeLevel, stylesFromTheme, swatches, tabularNumsClasses, tabularNumsOff, tabularNumsOn, textClasses, textStyles, themeFromPalette, themeVars, timeFormat, tooltipDelay, transition, transitionDuration, transitions, viewBoxSize };
|
package/lib/design-system.js
CHANGED
|
@@ -9,6 +9,7 @@ import { dropCursorColor, getBgSwatchBorderColor, getBgSwatchFillColor, getEnumT
|
|
|
9
9
|
import { palette } from "./design-system/colors-charts.js";
|
|
10
10
|
import { dateFormat, dateTimeFormat, timeFormat } from "./design-system/date.js";
|
|
11
11
|
import { border, iconSize, layout, minPanelWidth, space, spaceNestedTreeInterval, spaceNestedTreeLevel, viewBoxSize } from "./design-system/layout.js";
|
|
12
|
+
import { skeletonHeights, skeletonWidths } from "./design-system/skeleton.js";
|
|
12
13
|
import { stylesFromTheme, themeFromPalette } from "./design-system/theme.js";
|
|
13
14
|
import { fontFamily, fontFamilyCode, fontSize, fontWeight, lineHeight, tabularNumsClasses, tabularNumsOff, tabularNumsOn, textClasses, textStyles } from "./design-system/typography.js";
|
|
14
|
-
export { Swatch, alpha, alphaCoefficients, border, cardTypeColors, palette as chartColorPalette, dateFormat, dateTimeFormat, defineAlphaCoefficient, dropCursorColor, durations, fontFamily, fontFamilyCode, fontSize, fontWeight, getBgSwatchBorderColor, getBgSwatchFillColor, getDarkenColor, getEnumTextColor, getLinearGradient, getObjectColor, iconSize, layout, layoutVars, lineHeight, listRowSurfaceFontSizeVar, menuItemHeightVar, minPanelWidth, opacity, shadows, sidebarMenuIconSizeVar, sidebarMenuItemHeightVar, space, spaceNestedTreeInterval, spaceNestedTreeLevel, stylesFromTheme, swatches, tabularNumsClasses, tabularNumsOff, tabularNumsOn, textClasses, textStyles, themeFromPalette, themeVars, timeFormat, tooltipDelay, transition, transitionDuration, transitions, viewBoxSize };
|
|
15
|
+
export { Swatch, alpha, alphaCoefficients, border, cardTypeColors, palette as chartColorPalette, dateFormat, dateTimeFormat, defineAlphaCoefficient, dropCursorColor, durations, fontFamily, fontFamilyCode, fontSize, fontWeight, getBgSwatchBorderColor, getBgSwatchFillColor, getDarkenColor, getEnumTextColor, getLinearGradient, getObjectColor, iconSize, layout, layoutVars, lineHeight, listRowSurfaceFontSizeVar, menuItemHeightVar, minPanelWidth, opacity, shadows, sidebarMenuIconSizeVar, sidebarMenuItemHeightVar, skeletonHeights, skeletonWidths, space, spaceNestedTreeInterval, spaceNestedTreeLevel, stylesFromTheme, swatches, tabularNumsClasses, tabularNumsOff, tabularNumsOn, textClasses, textStyles, themeFromPalette, themeVars, timeFormat, tooltipDelay, transition, transitionDuration, transitions, viewBoxSize };
|
package/lib/file-item.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./file-item.wyw-in-js.css";
|
|
2
2
|
import { Icon } from "./icons/icon.js";
|
|
3
|
-
import {
|
|
3
|
+
import { SpinnerBox } from "./spinner-box.js";
|
|
4
4
|
import { ActionsMenu } from "./actions-menu/actions-menu.js";
|
|
5
5
|
import { ActionsButtonCompact } from "./button/actions-button-compact.js";
|
|
6
6
|
import { FileIcon } from "./file-item/file-icon.js";
|
|
@@ -34,23 +34,23 @@ function FileItem(props) {
|
|
|
34
34
|
onClick,
|
|
35
35
|
className: cx("c1pvbaru", fileItemStyle, showFileIcon ? iconOnlyStyle : thumbnailStyle, isPending && "c5okxkg"),
|
|
36
36
|
children: [
|
|
37
|
-
isPending && /* @__PURE__ */ jsx(
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
isPending && /* @__PURE__ */ jsx(SpinnerBox, {
|
|
38
|
+
height: "fill",
|
|
39
|
+
width: "fill"
|
|
40
40
|
}),
|
|
41
41
|
showFileIcon && /* @__PURE__ */ jsxs("div", {
|
|
42
|
-
className: cx(overlayStyle, fileOverlayStyle, "
|
|
42
|
+
className: cx(overlayStyle, fileOverlayStyle, "cc83qat"),
|
|
43
43
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
44
|
-
className: "
|
|
44
|
+
className: "cx9zid2",
|
|
45
45
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
46
46
|
containerSize: 40,
|
|
47
47
|
iconSize: 40,
|
|
48
48
|
children: /* @__PURE__ */ jsx(FileIcon, { contentType })
|
|
49
49
|
}), /* @__PURE__ */ jsx("div", {
|
|
50
|
-
className: "
|
|
50
|
+
className: "c9w3df3",
|
|
51
51
|
children: /* @__PURE__ */ jsx(FileTitle, {
|
|
52
52
|
title: name,
|
|
53
|
-
className: "
|
|
53
|
+
className: "c1y52bj6"
|
|
54
54
|
})
|
|
55
55
|
})]
|
|
56
56
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -68,9 +68,9 @@ function FileItem(props) {
|
|
|
68
68
|
!isPending && !showFileIcon && /* @__PURE__ */ jsx("div", {
|
|
69
69
|
className: cx(overlayStyle, isBackgroundReady ? imageOverlayStyle : fileOverlayStyle),
|
|
70
70
|
children: /* @__PURE__ */ jsxs("div", {
|
|
71
|
-
className: "
|
|
71
|
+
className: "c1ba9arf",
|
|
72
72
|
children: [/* @__PURE__ */ jsx("div", {
|
|
73
|
-
className: "
|
|
73
|
+
className: "ch3czly",
|
|
74
74
|
children: /* @__PURE__ */ jsx(FileActionsMenu, {
|
|
75
75
|
setIsActionsOpened,
|
|
76
76
|
data: props.data,
|
|
@@ -80,7 +80,7 @@ function FileItem(props) {
|
|
|
80
80
|
onRenameClick: props.onRenameClick
|
|
81
81
|
})
|
|
82
82
|
}), /* @__PURE__ */ jsx("div", {
|
|
83
|
-
className: "
|
|
83
|
+
className: "c1mipo1r",
|
|
84
84
|
children: /* @__PURE__ */ jsx(FileTitle, { title: name })
|
|
85
85
|
})]
|
|
86
86
|
})
|
|
@@ -99,7 +99,7 @@ function FileActionsMenu({ data, disabled, setIsActionsOpened, onDownloadClick,
|
|
|
99
99
|
onOpenChange: setIsActionsOpened,
|
|
100
100
|
supportsMobile: true,
|
|
101
101
|
mobileTitle: data.name,
|
|
102
|
-
trigger: jsx(ActionsButtonCompact, { className: "
|
|
102
|
+
trigger: jsx(ActionsButtonCompact, { className: "c1fc45k7" }),
|
|
103
103
|
children: jsx(FileMenuItems, {
|
|
104
104
|
file: data,
|
|
105
105
|
disabled,
|
|
@@ -111,10 +111,10 @@ function FileActionsMenu({ data, disabled, setIsActionsOpened, onDownloadClick,
|
|
|
111
111
|
}
|
|
112
112
|
function FileTitle({ title, className }) {
|
|
113
113
|
return /* @__PURE__ */ jsx("div", {
|
|
114
|
-
className: cx("
|
|
114
|
+
className: cx("c1oq0oxn", className),
|
|
115
115
|
children: jsx(FileTitle$1, {
|
|
116
116
|
title,
|
|
117
|
-
containerCss: "
|
|
117
|
+
containerCss: "cowg3oy-container"
|
|
118
118
|
})
|
|
119
119
|
});
|
|
120
120
|
}
|
|
@@ -12,14 +12,13 @@
|
|
|
12
12
|
.c18cm2yq .o1kzue6u-overlay{background-color:var(--colorBgMenuItemHover);}.c18cm2yq .a5now68-actionsButton{opacity:1;}
|
|
13
13
|
.c1pvbaru{flex-shrink:0;}
|
|
14
14
|
.c5okxkg{background-color:var(--entityCardSelectedColor);}
|
|
15
|
-
.cc83qat{
|
|
16
|
-
.cx9zid2{
|
|
17
|
-
.c9w3df3{display:flex;
|
|
18
|
-
.c1y52bj6{
|
|
19
|
-
.c1ba9arf{overflow:hidden;
|
|
20
|
-
.ch3czly{
|
|
21
|
-
.c1mipo1r{align-self:flex-end;}
|
|
22
|
-
.c1fc45k7{
|
|
23
|
-
.c1oq0oxn{
|
|
24
|
-
.cowg3oy
|
|
25
|
-
.c1end6bx-container{max-width:180px;}
|
|
15
|
+
.cc83qat{position:relative;}
|
|
16
|
+
.cx9zid2{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;width:100%;padding-top:1px;gap:2px;}
|
|
17
|
+
.c9w3df3{display:flex;width:100%;justify-content:center;gap:10px;flex-shrink:0;color:var(--colorTextMenuItem);text-overflow:ellipsis;overflow:hidden;}
|
|
18
|
+
.c1y52bj6{overflow:hidden;text-overflow:ellipsis;}
|
|
19
|
+
.c1ba9arf{position:relative;display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;overflow:hidden;box-sizing:border-box;gap:8px;}
|
|
20
|
+
.ch3czly{align-self:flex-end;}
|
|
21
|
+
.c1mipo1r{display:flex;width:100%;align-self:flex-start;align-items:flex-end;text-overflow:ellipsis;box-sizing:border-box;}
|
|
22
|
+
.c1fc45k7{z-index:1;}
|
|
23
|
+
.c1oq0oxn{border-radius:4px;background:var(--badgeBgColor);padding:2px 5px;height:100%;vertical-align:top;text-align:center;justify-content:center;overflow:hidden;font-size:10px;font-weight:500;line-height:1.3;text-transform:none;text-overflow:ellipsis;}.c1oq0oxn:hover{text-decoration:none;color:inherit;}
|
|
24
|
+
.cowg3oy-container{max-width:180px;}
|
|
@@ -5,7 +5,7 @@ import { forwardRef } from "react";
|
|
|
5
5
|
//#region src/icons/react/integration-claude.tsx
|
|
6
6
|
/**
|
|
7
7
|
* This file was automatically generated. Do not edit manually.
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* @see import("../svg/integration-claude.svg")
|
|
10
10
|
* @see import("../../scripts/generate-icons.ts")
|
|
11
11
|
*/
|
|
@@ -5,7 +5,7 @@ import { forwardRef } from "react";
|
|
|
5
5
|
//#region src/icons/react/integration-gemini.tsx
|
|
6
6
|
/**
|
|
7
7
|
* This file was automatically generated. Do not edit manually.
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* @see import("../svg/integration-gemini.svg")
|
|
10
10
|
* @see import("../../scripts/generate-icons.ts")
|
|
11
11
|
*/
|
|
@@ -5,7 +5,7 @@ import { forwardRef } from "react";
|
|
|
5
5
|
//#region src/icons/react/integration-openai.tsx
|
|
6
6
|
/**
|
|
7
7
|
* This file was automatically generated. Do not edit manually.
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* @see import("../svg/integration-openai.svg")
|
|
10
10
|
* @see import("../../scripts/generate-icons.ts")
|
|
11
11
|
*/
|
package/lib/loaders.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./loaders.wyw-in-js.css";
|
|
2
2
|
import { themeVars } from "./theming.generated.js";
|
|
3
|
-
import { layout
|
|
3
|
+
import { layout } from "./design-system/layout.js";
|
|
4
4
|
import { textClasses } from "./design-system/typography.js";
|
|
5
5
|
import { useTheme } from "./theme-provider.js";
|
|
6
6
|
import { Skeleton } from "./skeleton.js";
|
|
@@ -33,8 +33,7 @@ var LoadingPage = ({ absolute = true, contentLoader = true }) => /* @__PURE__ */
|
|
|
33
33
|
absolute,
|
|
34
34
|
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
35
35
|
height: 20,
|
|
36
|
-
|
|
37
|
-
maxWidth: 300,
|
|
36
|
+
width: 300,
|
|
38
37
|
animateAppearance: true
|
|
39
38
|
})
|
|
40
39
|
}), contentLoader && /* @__PURE__ */ jsx(LoadingView, { absolute })] });
|
|
@@ -50,10 +49,7 @@ var LoadingApp = ({ backgroundColor = "transparent", appName }) => /* @__PURE__
|
|
|
50
49
|
children: [/* @__PURE__ */ jsx("div", {
|
|
51
50
|
className: cx(textClasses.regular, loaderStyle),
|
|
52
51
|
children: `Loading ${appName} app…`
|
|
53
|
-
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
54
|
-
minWidth: 100,
|
|
55
|
-
maxWidth: 100
|
|
56
|
-
})]
|
|
52
|
+
}), /* @__PURE__ */ jsx(Skeleton, { width: 80 })]
|
|
57
53
|
});
|
|
58
54
|
var LoadingTreeMenuItem = ({ color, Icon, level, children }) => {
|
|
59
55
|
const theme = useTheme();
|
|
@@ -64,7 +60,7 @@ var LoadingTreeMenuItem = ({ color, Icon, level, children }) => {
|
|
|
64
60
|
containerSize: layout.newMenuItemHeight,
|
|
65
61
|
iconSize: 18
|
|
66
62
|
}), children || /* @__PURE__ */ jsx(Skeleton, {
|
|
67
|
-
height:
|
|
63
|
+
height: 8,
|
|
68
64
|
inverted: theme.mode === "dark"
|
|
69
65
|
})]
|
|
70
66
|
});
|
|
@@ -24,17 +24,25 @@ var NumberInput = ({ className, value, numberFormat, numberPrecision, format, on
|
|
|
24
24
|
numberFormat,
|
|
25
25
|
onChange
|
|
26
26
|
]);
|
|
27
|
-
const
|
|
28
|
-
return formatValue(value, isEditing, numberFormat
|
|
27
|
+
const numericValue = useMemo(() => {
|
|
28
|
+
return formatValue(value, isEditing, numberFormat);
|
|
29
29
|
}, [
|
|
30
30
|
value,
|
|
31
31
|
isEditing,
|
|
32
|
-
numberFormat
|
|
33
|
-
|
|
32
|
+
numberFormat
|
|
33
|
+
]);
|
|
34
|
+
const formatter = useMemo(() => {
|
|
35
|
+
if (!format || isEditing || isEmpty(value)) return;
|
|
36
|
+
return () => format(value);
|
|
37
|
+
}, [
|
|
38
|
+
format,
|
|
39
|
+
isEditing,
|
|
40
|
+
value
|
|
34
41
|
]);
|
|
35
42
|
return /* @__PURE__ */ jsx(AntInputNumber, {
|
|
36
43
|
className,
|
|
37
|
-
value:
|
|
44
|
+
value: numericValue,
|
|
45
|
+
formatter,
|
|
38
46
|
onFocus: handleFocus,
|
|
39
47
|
onBlur: handleBlur,
|
|
40
48
|
onChange: handleChange,
|
package/lib/pretty-size.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/pretty-size.d.ts
|
|
2
|
-
declare function prettySize(sizeBytes: number | bigint, unitDisplay?: "short" | "long" | "narrow" | undefined): string;
|
|
2
|
+
declare function prettySize(sizeBytes: number | bigint, unitDisplay?: "short" | "long" | "narrow" | undefined, bytesPerKB?: number): string;
|
|
3
3
|
//#endregion
|
|
4
4
|
export { prettySize };
|
package/lib/pretty-size.js
CHANGED
|
@@ -8,11 +8,11 @@ var UNITS = [
|
|
|
8
8
|
"petabyte"
|
|
9
9
|
];
|
|
10
10
|
var BYTES_PER_KB = 1e3;
|
|
11
|
-
function prettySize(sizeBytes, unitDisplay = "narrow") {
|
|
11
|
+
function prettySize(sizeBytes, unitDisplay = "narrow", bytesPerKB = BYTES_PER_KB) {
|
|
12
12
|
let size = Math.abs(Number(sizeBytes));
|
|
13
13
|
let unitIdx = 0;
|
|
14
|
-
while (size >=
|
|
15
|
-
size /=
|
|
14
|
+
while (size >= bytesPerKB && unitIdx < UNITS.length - 1) {
|
|
15
|
+
size /= bytesPerKB;
|
|
16
16
|
++unitIdx;
|
|
17
17
|
}
|
|
18
18
|
return new Intl.NumberFormat([], {
|
package/lib/rich-input-loader.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import "./rich-input-loader.wyw-in-js.css";
|
|
2
|
-
import { SkeletonList } from "./skeleton.js";
|
|
2
|
+
import { SkeletonList, SkeletonTextLine } from "./skeleton.js";
|
|
3
3
|
import { regularRichEditorHTMLStyles } from "./html-styles.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { noop } from "@fibery/helpers/src/_";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { createContext, memo, useContext, useEffect, useMemo, useState } from "react";
|
|
8
8
|
import { cx } from "@linaria/core";
|
|
9
|
-
import { styled } from "@linaria/react";
|
|
10
9
|
//#region src/rich-input-loader.tsx
|
|
11
|
-
var LoaderWrapper = /*#__PURE__*/ styled("div")({
|
|
12
|
-
name: "LoaderWrapper",
|
|
13
|
-
class: "lgnhmrn-LoaderWrapper",
|
|
14
|
-
propsAsIs: false
|
|
15
|
-
});
|
|
16
10
|
var loaderContext = createContext({
|
|
17
11
|
showLoader: true,
|
|
18
12
|
setShowLoader: noop
|
|
@@ -23,7 +17,7 @@ var RichInputLoader = memo(function RichInputLoaderComponent({ className = "", a
|
|
|
23
17
|
className,
|
|
24
18
|
children: showLoader && /* @__PURE__ */ jsx(SkeletonList, {
|
|
25
19
|
amount: 3,
|
|
26
|
-
WrapperComponent:
|
|
20
|
+
WrapperComponent: SkeletonTextLine,
|
|
27
21
|
animateAppearance
|
|
28
22
|
})
|
|
29
23
|
});
|
|
@@ -48,15 +42,15 @@ var RichFieldLoaderProvider = ({ children }) => {
|
|
|
48
42
|
function RichFieldLoader() {
|
|
49
43
|
const { showLoader } = useContext(loaderContext);
|
|
50
44
|
return /* @__PURE__ */ jsxs("div", {
|
|
51
|
-
className: cx("ProseMirror", regularRichEditorHTMLStyles, "
|
|
45
|
+
className: cx("ProseMirror", regularRichEditorHTMLStyles, "cgnhmrn"),
|
|
52
46
|
children: [/* @__PURE__ */ jsx("p", {
|
|
53
47
|
className: "empty-node",
|
|
54
48
|
children: /* @__PURE__ */ jsx("br", { className: "ProseMirror-trailingBreak" })
|
|
55
49
|
}), showLoader ? /* @__PURE__ */ jsx("div", {
|
|
56
|
-
className: "
|
|
50
|
+
className: "czwej5w",
|
|
57
51
|
children: /* @__PURE__ */ jsx(SkeletonList, {
|
|
58
52
|
amount: 1,
|
|
59
|
-
WrapperComponent:
|
|
53
|
+
WrapperComponent: SkeletonTextLine
|
|
60
54
|
})
|
|
61
55
|
}) : null]
|
|
62
56
|
});
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
.
|
|
2
|
-
.czwej5w{position:
|
|
3
|
-
.c1otohfa{position:absolute;inset:0;display:grid;align-content:center;}
|
|
1
|
+
.cgnhmrn{position:relative;}
|
|
2
|
+
.czwej5w{position:absolute;inset:0;display:grid;align-content:center;}
|