@fibery/ui-kit 9.0.2 → 9.1.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/a11y-color.js +12 -10
- package/lib/actions-menu/actions-menu-props.d.ts +2 -0
- package/lib/actions-menu/actions-menu-sub-command-menu.js +5 -4
- package/lib/actions-menu/actions-menu.d.ts +1 -1
- package/lib/actions-menu/actions-menu.js +2 -1
- package/lib/actions-menu/contexts/actions-menu-context.js +12 -11
- package/lib/ai/max-tokens.js +6 -5
- package/lib/antd/ant-modal.d.ts +1 -1
- package/lib/antd/ant-modal.js +28 -1
- package/lib/antd/ant-upload.d.ts +1 -1
- package/lib/antd/ant-upload.js +23 -18
- package/lib/antd/input.js +5 -4
- package/lib/antd/utils.js +2 -1
- package/lib/avatar-colors.js +1 -1
- package/lib/avatar.d.ts +1 -10
- package/lib/avatar.js +48 -38
- package/lib/avatar.wyw-in-js.css +1 -1
- package/lib/banner/banner-action.js +2 -1
- package/lib/button/button.js +1 -1
- package/lib/button/icon-button.js +1 -1
- package/lib/canvas-colors.js +2 -2
- package/lib/card-container.d.ts +2 -6
- package/lib/card-container.js +4 -4
- package/lib/color-filter.js +2 -2
- package/lib/color-inspect.js +1 -1
- package/lib/color-picker/color-picker-or-loader.d.ts +2 -2
- package/lib/color-utils.js +1 -1
- package/lib/comment.d.ts +2 -1
- package/lib/comment.js +44 -27
- package/lib/comment.wyw-in-js.css +11 -8
- package/lib/context-menu/index.js +1 -0
- package/lib/context-menu/index.wyw-in-js.css +1 -1
- package/lib/date-picker/autocomplete.js +12 -10
- package/lib/date-picker/date-range-input.js +8 -6
- package/lib/date-picker/day-with-start-end-buttons.js +0 -2
- package/lib/date-picker/get-weekends-for-month.js +4 -2
- package/lib/date-picker/single-date-input.js +8 -6
- package/lib/day-select/day-select.js +2 -1
- package/lib/day-select/week-day-select.d.ts +2 -2
- package/lib/day-select/week-day-select.js +4 -3
- package/lib/design-system/alpha.js +5 -7
- package/lib/design-system/colors-charts.d.ts +4 -0
- package/lib/design-system/colors-charts.js +14 -0
- package/lib/design-system/colors-js.d.ts +2 -4
- package/lib/design-system/colors-js.js +8 -10
- package/lib/design-system/fns.enum.js +7 -4
- package/lib/design-system/fns.icon.js +1 -1
- package/lib/design-system/fns.js +7 -4
- package/lib/design-system/theme.d.ts +7 -7
- package/lib/design-system/theme.js +7 -12
- package/lib/design-system/vars.js +1 -2
- package/lib/design-system.d.ts +3 -2
- package/lib/design-system.js +3 -2
- package/lib/emoji-picker/primitives/content.js +10 -9
- package/lib/emoji-picker/primitives/emoji.js +22 -14
- package/lib/emoji-picker/primitives/emoji.wyw-in-js.css +4 -3
- package/lib/emoji-picker/primitives/grid.js +0 -1
- package/lib/emoji-picker/primitives/preview-provider.js +4 -3
- package/lib/emoji-picker/primitives/root.js +10 -9
- package/lib/emoji-picker/primitives/skin-provider.js +5 -4
- package/lib/emoji-picker/stores/emoji-data-store.d.ts +2 -2
- package/lib/emoji-picker/stores/emoji-data-store.js +8 -8
- package/lib/emoji-picker/stores/static-emoji-data-store.js +2 -1
- package/lib/emoji.js +5 -2
- package/lib/fibermoji-placeholder.js +5 -7
- package/lib/field-type-icon.js +2 -1
- package/lib/file-item/file-icon.js +2 -1
- package/lib/file-item.js +3 -10
- package/lib/highlight-colors.js +2 -1
- package/lib/hotkey-scope.js +2 -1
- package/lib/icons/ast/index.d.ts +1 -4
- package/lib/icons/ast/index.js +2 -5
- package/lib/icons/ast/spinner.js +1 -14
- package/lib/icons/icon.js +4 -3
- package/lib/icons/react/index.d.ts +1 -4
- package/lib/icons/react/index.js +2 -5
- package/lib/images-gallery/get-gallery-src.js +1 -1
- package/lib/images-gallery/slide-buttons.js +8 -4
- package/lib/images-gallery/thumbnails-mime-types-white-list.js +1 -1
- package/lib/integration-compact-info-button.js +1 -1
- package/lib/loading-sausage.js +7 -6
- package/lib/mobile-drawer.d.ts +2 -1
- package/lib/mobile-drawer.js +24 -12
- package/lib/mobile-drawer.wyw-in-js.css +3 -2
- package/lib/mobile-keyboard-aware-popup.js +6 -5
- package/lib/modal-menu/contexts/modal-menu-context.d.ts +1 -0
- package/lib/modal-menu/modal-menu-content.d.ts +1 -1
- package/lib/modal-menu/modal-menu-content.js +16 -6
- package/lib/modal-menu/modal-menu-drawer-content.d.ts +7 -0
- package/lib/modal-menu/modal-menu-drawer-content.js +13 -0
- package/lib/modal-menu/modal-menu-root.d.ts +2 -1
- package/lib/modal-menu/modal-menu-root.js +24 -21
- package/lib/modal-menu/modal-submenu.js +10 -9
- package/lib/nested-menu-item.d.ts +1 -1
- package/lib/number-input/number-input-inline-with-autosize.d.ts +1 -2
- package/lib/number-input/number-input-inline-with-autosize.js +9 -6
- package/lib/number-input/number-input-inline-with-autosize.wyw-in-js.css +0 -1
- package/lib/number-input/number-input.js +13 -11
- package/lib/number-input/styles.d.ts +1 -9
- package/lib/number-input/styles.js +3 -9
- package/lib/number-input/styles.wyw-in-js.css +2 -3
- package/lib/number-input/text-area-auto-sized.d.ts +1 -2
- package/lib/number-input/text-area-auto-sized.js +2 -2
- package/lib/number-input/text-input-auto-sized.d.ts +1 -2
- package/lib/number-input/text-input-auto-sized.js +2 -2
- package/lib/online-users.js +2 -2
- package/lib/open-popover-tracker.js +7 -6
- package/lib/palettes/neutral.js +1 -1
- package/lib/palettes/warm.js +1 -1
- package/lib/phone.js +1 -1
- package/lib/popover/index.d.ts +4 -2
- package/lib/popover/index.js +61 -59
- package/lib/popover/mobile-popover-context.js +12 -11
- package/lib/popover/mobile-popover.js +16 -15
- package/lib/popover/modifiers.js +4 -4
- package/lib/preference-setting.js +6 -8
- package/lib/reactions/reaction-button.js +36 -25
- package/lib/reactions/reaction-button.wyw-in-js.css +16 -16
- package/lib/reactions/reaction-picker.js +22 -10
- package/lib/reactions/reaction-picker.wyw-in-js.css +1 -0
- package/lib/reactions/tootltip.js +2 -1
- package/lib/select/components/option.js +2 -1
- package/lib/select/index.d.ts +2 -1
- package/lib/select/select-trigger.d.ts +4 -0
- package/lib/select/select-trigger.js +25 -0
- package/lib/select/select-trigger.wyw-in-js.css +1 -0
- package/lib/select/select.d.ts +6 -2
- package/lib/select/select.js +10 -5
- package/lib/spinner.d.ts +2 -6
- package/lib/spinner.js +11 -7
- package/lib/spinner.wyw-in-js.css +1 -0
- package/lib/tab-nav/tab-nav.d.ts +4 -2
- package/lib/tab-nav/tab-nav.js +2 -2
- package/lib/thematic.js +322 -321
- package/lib/theme-provider.d.ts +1 -3
- package/lib/toast/toast-action.js +2 -1
- package/lib/toast/toast-provider.d.ts +1 -2
- package/lib/toast/toast-queue.d.ts +1 -2
- package/lib/toast/toast-queue.js +7 -8
- package/lib/toast/toast.js +7 -6
- package/lib/toggle.js +3 -3
- package/lib/tooltip-if-overflown.js +2 -1
- package/lib/tooltip.js +1 -1
- package/lib/type-badge.d.ts +8 -28
- package/lib/type-badge.js +39 -50
- package/lib/type-badge.wyw-in-js.css +11 -10
- package/lib/unit/container.d.ts +12 -0
- package/lib/unit/container.js +50 -0
- package/lib/unit/context.d.ts +29 -0
- package/lib/unit/context.js +9 -0
- package/lib/unit/index.d.ts +4 -2
- package/lib/unit/index.js +2 -1
- package/lib/unit/nav-button.d.ts +12 -0
- package/lib/unit/nav-button.js +18 -0
- package/lib/unit/styles.d.ts +6 -9
- package/lib/unit/styles.js +13 -16
- package/lib/unit/styles.wyw-in-js.css +10 -16
- package/lib/unit/unit-content-layout.d.ts +4 -3
- package/lib/unit/unit-content-layout.js +9 -9
- package/lib/unit/unit-content.d.ts +6 -5
- package/lib/unit/unit-content.js +83 -18
- package/lib/unit/unit-content.wyw-in-js.css +6 -2
- package/lib/unit/unit.d.ts +38 -5
- package/lib/unit/unit.js +43 -12
- package/lib/workflow-progress-icon.js +2 -2
- package/package.json +6 -6
- package/lib/features.d.ts +0 -8
- package/lib/features.js +0 -15
- package/lib/flags.d.ts +0 -4
- package/lib/flags.js +0 -7
- package/lib/icons/ast/alert-triangle.d.ts +0 -5
- package/lib/icons/ast/alert-triangle.js +0 -25
- package/lib/icons/ast/field-units-large.d.ts +0 -5
- package/lib/icons/ast/field-units-large.js +0 -25
- package/lib/icons/ast/plus.d.ts +0 -5
- package/lib/icons/ast/plus.js +0 -25
- package/lib/icons/react/alert-triangle.d.ts +0 -15
- package/lib/icons/react/alert-triangle.js +0 -21
- package/lib/icons/react/field-units-large.d.ts +0 -15
- package/lib/icons/react/field-units-large.js +0 -21
- package/lib/icons/react/plus.d.ts +0 -15
- package/lib/icons/react/plus.js +0 -21
- package/lib/unit/primitive.d.ts +0 -5
- package/lib/unit/primitive.js +0 -108
- package/lib/unit/primitive.wyw-in-js.css +0 -3
- package/lib/unit/types.d.ts +0 -34
- package/lib/unit/types.js +0 -0
- package/lib/unit/unit-button-group.d.ts +0 -13
- package/lib/unit/unit-button-group.js +0 -23
package/lib/unit/styles.js
CHANGED
|
@@ -3,21 +3,18 @@ import { space } from "../design-system/layout.js";
|
|
|
3
3
|
import { fontSize } from "../design-system/typography.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/unit/styles.ts
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var regularTextUnitSize = fontSize.sm + space.s8;
|
|
6
|
+
var basicUnitClassName = "bnbrrsv-basicUnit";
|
|
7
|
+
var alignCenterClassName = "a60xcpq-alignCenter";
|
|
8
|
+
var mediumTextUnitSize = fontSize.sm + space.s8;
|
|
10
9
|
var smallTextUnitSize = fontSize.xs + space.s8;
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var unitMinHeightClassName = "
|
|
16
|
-
var invalidUnitClassName = "
|
|
17
|
-
var clickableClassName = "
|
|
18
|
-
var borderClassName = "
|
|
19
|
-
var
|
|
20
|
-
var fullUnitWrapperClassName = "f1kzkp39-fullUnitWrapper";
|
|
21
|
-
var positionUnitClass = "prmh9nr-positionUnit";
|
|
10
|
+
var mediumSizeCss = "mu50b8v-mediumSize";
|
|
11
|
+
var mediumSizeMinWidthCss = "m1yn8ezw-mediumSizeMinWidth";
|
|
12
|
+
var smallSizeCss = "s1v5rpy3-smallSize";
|
|
13
|
+
var smallSizeMinWidthCss = "s45fj0l-smallSizeMinWidth";
|
|
14
|
+
var unitMinHeightClassName = "updarf0-unitMinHeight";
|
|
15
|
+
var invalidUnitClassName = "ibaz4qk-invalidUnit";
|
|
16
|
+
var clickableClassName = "c14l2yxo-clickable";
|
|
17
|
+
var borderClassName = "b18mqj2f-border";
|
|
18
|
+
var positionUnitClass = "p4mqgwc-positionUnit";
|
|
22
19
|
//#endregion
|
|
23
|
-
export { alignCenterClassName, basicUnitClassName,
|
|
20
|
+
export { alignCenterClassName, basicUnitClassName, borderClassName, clickableClassName, invalidUnitClassName, mediumSizeCss, mediumSizeMinWidthCss, mediumTextUnitSize, positionUnitClass, smallSizeCss, smallSizeMinWidthCss, smallTextUnitSize, unitMinHeightClassName };
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
3
|
-
.
|
|
4
|
-
.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.ubaz4qk-unitMinHeight{min-height:24px;}
|
|
1
|
+
.bnbrrsv-basicUnit{border-radius:6px;border:none;}
|
|
2
|
+
.a60xcpq-alignCenter{display:flex;align-items:center;justify-content:center;line-height:0;}
|
|
3
|
+
.mu50b8v-mediumSize{font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:14px;line-height:1.5;font-weight:410;color:var(--textColor);text-transform:none;letter-spacing:normal;line-height:22px;}
|
|
4
|
+
.m1yn8ezw-mediumSizeMinWidth{min-width:26px;justify-content:center;}
|
|
5
|
+
.s1v5rpy3-smallSize{font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:12px;line-height:1.5;font-weight:410;color:var(--textColor);text-transform:none;line-height:20px;}
|
|
6
|
+
.s45fj0l-smallSizeMinWidth{min-width:24px;justify-content:center;}
|
|
7
|
+
.updarf0-unitMinHeight{min-height:24px;}
|
|
9
8
|
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
.
|
|
13
|
-
var(--colorBgButtonGhostNeutralHover),
|
|
14
|
-
var(--colorBgButtonGhostNeutralHover)
|
|
15
|
-
);}.p1ebg4ic-pillRadius.c18mqj2f-clickable:hover::before{box-shadow:var(--inputBorderHoverColorThin) inset;}.p1ebg4ic-pillRadius.c18mqj2f-clickable:focus::before{box-shadow:var(--inputBorderFocusColorThin) inset;}
|
|
16
|
-
.f1kzkp39-fullUnitWrapper{display:flex;align-items:center;padding:6px;border-radius:6px;background-color:var(--cardBg);margin-bottom:4px;}
|
|
17
|
-
.prmh9nr-positionUnit{line-height:0;position:relative;}
|
|
9
|
+
.c14l2yxo-clickable{cursor:pointer;}
|
|
10
|
+
.b18mqj2f-border{position:relative;}.b18mqj2f-border:focus{outline:none;}.b18mqj2f-border::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;box-shadow:var(--inputBorderColor) inset;mix-blend-mode:var(--inputBorderBlendMode);border-radius:6px;pointer-events:none;}.b18mqj2f-border.c14l2yxo-clickable:hover::before{box-shadow:var(--inputBorderHoverColor) inset;}.b18mqj2f-border.c14l2yxo-clickable:focus::before{box-shadow:var(--inputBorderFocusColor) inset;}.b18mqj2f-border.ibaz4qk-invalidUnit::before{box-shadow:none;border:1px solid var(--colorBorderButtonOutlineAccentDefault);}.b18mqj2f-border.ibaz4qk-invalidUnit.c14l2yxo-clickable:hover::before{box-shadow:none;border:1px solid var(--colorBorderReactionsSelectedHover);}.b18mqj2f-border.ibaz4qk-invalidUnit.c14l2yxo-clickable:focus::before{box-shadow:var(--inputBorderFocusColor) inset;border:none;}
|
|
11
|
+
.p4mqgwc-positionUnit{line-height:0;position:relative;}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { UnitSize } from "./context.js";
|
|
1
2
|
//#region src/unit/unit-content-layout.d.ts
|
|
2
3
|
type Props = {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
size: UnitSize;
|
|
5
|
+
hasIcon: boolean;
|
|
5
6
|
hasChildren: boolean;
|
|
6
7
|
shrinkable?: boolean;
|
|
7
8
|
};
|
|
8
|
-
declare const getHeight: (
|
|
9
|
+
declare const getHeight: (size: UnitSize) => number;
|
|
9
10
|
declare const UnitContentLayout: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Props>;
|
|
10
11
|
//#endregion
|
|
11
12
|
export { UnitContentLayout, getHeight };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "./unit-content-layout.wyw-in-js.css";
|
|
2
|
-
import {
|
|
2
|
+
import { mediumTextUnitSize, smallTextUnitSize } from "./styles.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { styled } from "@linaria/react";
|
|
5
5
|
//#region src/unit/unit-content-layout.tsx
|
|
6
|
-
var getHeight = (
|
|
7
|
-
return
|
|
6
|
+
var getHeight = (size) => {
|
|
7
|
+
return size === "medium" ? mediumTextUnitSize : smallTextUnitSize;
|
|
8
8
|
};
|
|
9
|
-
var getUnitGridTemplateRows = ({
|
|
10
|
-
if (
|
|
11
|
-
return `minmax(${getHeight(
|
|
9
|
+
var getUnitGridTemplateRows = ({ size, hasIcon }) => {
|
|
10
|
+
if (!hasIcon) return "auto";
|
|
11
|
+
return `minmax(${getHeight(size)}px, max-content)`;
|
|
12
12
|
};
|
|
13
|
-
var getUnitGridTemplateColumns = ({
|
|
13
|
+
var getUnitGridTemplateColumns = ({ size, hasIcon, shrinkable = true, hasChildren }) => {
|
|
14
14
|
const fitContent = "fit-content(200px)";
|
|
15
|
-
if (
|
|
16
|
-
return `
|
|
15
|
+
if (!hasIcon) return shrinkable ? "auto" : fitContent;
|
|
16
|
+
return `minmax(${getHeight(size)}px, max-content) ${hasChildren ? shrinkable ? `minmax(auto, 1fr)` : fitContent : ""}`;
|
|
17
17
|
};
|
|
18
18
|
var _exp2 = () => getUnitGridTemplateRows;
|
|
19
19
|
var _exp3 = () => getUnitGridTemplateColumns;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { KeyboardEvent, ReactNode } from "react";
|
|
2
2
|
//#region src/unit/unit-content.d.ts
|
|
3
3
|
type Props = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
button?: boolean;
|
|
5
|
+
icon?: ReactNode;
|
|
6
6
|
shrinkable?: boolean;
|
|
7
7
|
truncate?: boolean;
|
|
8
|
-
|
|
8
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
9
|
+
onKeyDown?: (e: KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
};
|
|
11
|
-
declare const UnitContent: ({
|
|
12
|
+
declare const UnitContent: ({ button, icon, shrinkable, truncate, onClick, onKeyDown, children }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//#endregion
|
|
13
14
|
export { UnitContent };
|
package/lib/unit/unit-content.js
CHANGED
|
@@ -1,29 +1,94 @@
|
|
|
1
1
|
import "./unit-content.wyw-in-js.css";
|
|
2
|
-
import {
|
|
2
|
+
import { themeVars } from "../theming.generated.js";
|
|
3
|
+
import { Tooltip } from "../tooltip.js";
|
|
4
|
+
import { useTruncated } from "../tooltip-if-overflown.js";
|
|
5
|
+
import "../styles-utils.js";
|
|
6
|
+
import { FieldIcon } from "../field-icon.js";
|
|
7
|
+
import { useUnitContext } from "./context.js";
|
|
8
|
+
import "./styles.js";
|
|
9
|
+
import { UnitContainer } from "./container.js";
|
|
3
10
|
import { UnitContentLayout } from "./unit-content-layout.js";
|
|
4
11
|
/* empty css */
|
|
5
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { forwardRef } from "react";
|
|
6
14
|
import { cx } from "@linaria/core";
|
|
7
15
|
//#region src/unit/unit-content.tsx
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
var resetButtonStylesCss = "r96bd8z-resetButtonStyles";
|
|
17
|
+
var ButtonComponent = forwardRef((props, ref) => {
|
|
18
|
+
return /* @__PURE__ */ jsx("button", {
|
|
19
|
+
ref,
|
|
20
|
+
type: "button",
|
|
21
|
+
...props,
|
|
22
|
+
className: cx(props.className, resetButtonStylesCss)
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
var DivComponent = forwardRef((props, ref) => /* @__PURE__ */ jsx("div", {
|
|
26
|
+
ref,
|
|
27
|
+
...props
|
|
28
|
+
}));
|
|
29
|
+
var contentContainerCss = "ccx18o4-contentContainer";
|
|
30
|
+
var contentCss = "c1l394rk-content";
|
|
31
|
+
var unitDescriptionCss = "u1he4b8w-unitDescription";
|
|
32
|
+
var fullUnitPreviewCss = "fcmj1jm-fullUnitPreview";
|
|
33
|
+
var tooltipTitleCss = "tum1nu9-tooltipTitle";
|
|
34
|
+
var UnitContent = ({ button = false, icon, shrinkable, truncate, onClick, onKeyDown, children }) => {
|
|
35
|
+
const { size, chipProps, tooltip } = useUnitContext();
|
|
36
|
+
const { truncated, setNode } = useTruncated();
|
|
37
|
+
const body = /* @__PURE__ */ jsx(button ? ButtonComponent : DivComponent, {
|
|
38
|
+
onClick,
|
|
39
|
+
onKeyDown,
|
|
40
|
+
children: jsxs(UnitContentLayout, {
|
|
41
|
+
size,
|
|
42
|
+
hasChildren: Boolean(children),
|
|
43
|
+
hasIcon: Boolean(icon),
|
|
44
|
+
shrinkable,
|
|
45
|
+
children: [icon && /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: "a60xcpq-alignCenter",
|
|
47
|
+
children: icon
|
|
48
|
+
}), children && /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: contentContainerCss,
|
|
50
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
51
|
+
ref: tooltip ? setNode : void 0,
|
|
52
|
+
className: cx(contentCss, truncate && "e190sqpi-ellipsis"),
|
|
53
|
+
children
|
|
54
|
+
})
|
|
55
|
+
})]
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
if (!tooltip) return body;
|
|
59
|
+
const { title, fieldIcon, description, hint } = tooltip;
|
|
60
|
+
const tooltipTitle = /* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: tooltipTitleCss,
|
|
62
|
+
children: [fieldIcon && /* @__PURE__ */ jsx(FieldIcon, {
|
|
63
|
+
iconName: fieldIcon,
|
|
64
|
+
iconSize: 14,
|
|
65
|
+
color: themeVars.whiteColor
|
|
66
|
+
}), title]
|
|
67
|
+
});
|
|
68
|
+
const preview = truncated && /* @__PURE__ */ jsx("div", {
|
|
69
|
+
className: fullUnitPreviewCss,
|
|
70
|
+
children: jsx(UnitContainer, {
|
|
71
|
+
...chipProps,
|
|
72
|
+
children: /* @__PURE__ */ jsx(UnitContent, {
|
|
73
|
+
icon,
|
|
24
74
|
children
|
|
25
75
|
})
|
|
26
|
-
})
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
79
|
+
side: "bottom",
|
|
80
|
+
align: "start",
|
|
81
|
+
openOnFocus: false,
|
|
82
|
+
title: tooltipTitle,
|
|
83
|
+
description: (description || preview || hint) && /* @__PURE__ */ jsxs("div", { children: [
|
|
84
|
+
description && /* @__PURE__ */ jsx("div", {
|
|
85
|
+
className: unitDescriptionCss,
|
|
86
|
+
children: description
|
|
87
|
+
}),
|
|
88
|
+
preview,
|
|
89
|
+
hint
|
|
90
|
+
] }),
|
|
91
|
+
children: body
|
|
27
92
|
});
|
|
28
93
|
};
|
|
29
94
|
//#endregion
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
.
|
|
2
|
-
.ccx18o4-
|
|
1
|
+
.r96bd8z-resetButtonStyles{all:unset;background-color:var(--transparent);--input-focus-border:0 0 0 1px var(--colorAccentStrokeFocus) inset;--input-focus-shadow:0 0 0 2px var(--colorAccentStroke);border-radius:6px;}.r96bd8z-resetButtonStyles:focus{outline:none;box-shadow:var(--input-focus-border, 0 0 0 1px var(--colorAccentStroke)),var(--input-focus-shadow)!important;transition:box-shadow 120ms ease-in-out;}.r96bd8z-resetButtonStyles:focus:not(:focus-visible){outline:none;box-shadow:none!important;}.r96bd8z-resetButtonStyles:focus-visible{outline:none;box-shadow:var(--input-focus-border, 0 0 0 1px var(--colorAccentStroke)),var(--input-focus-shadow)!important;transition:box-shadow 120ms ease-in-out;}
|
|
2
|
+
.ccx18o4-contentContainer{overflow:hidden;}
|
|
3
|
+
.c1l394rk-content{padding-left:4px;padding-right:4px;}
|
|
4
|
+
.u1he4b8w-unitDescription{margin-bottom:1px;}
|
|
5
|
+
.fcmj1jm-fullUnitPreview{display:flex;align-items:center;padding:6px;border-radius:6px;background-color:var(--cardBg);margin-top:4px;margin-bottom:4px;}
|
|
6
|
+
.tum1nu9-tooltipTitle{display:flex;align-items:center;gap:4px;}
|
package/lib/unit/unit.d.ts
CHANGED
|
@@ -1,12 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UnitSize } from "./context.js";
|
|
2
|
+
import { UnitContainer } from "./container.js";
|
|
3
|
+
import { UnitNavButton } from "./nav-button.js";
|
|
4
|
+
import { UnitContent } from "./unit-content.js";
|
|
5
|
+
import { KeyboardEvent, ReactNode } from "react";
|
|
2
6
|
//#region src/unit/unit.d.ts
|
|
3
7
|
type UnitVariant = "outlined" | "plain";
|
|
4
|
-
type
|
|
5
|
-
type UnitProps = Omit<UnitPrimitiveProps, "big"> & {
|
|
8
|
+
type UnitProps = {
|
|
6
9
|
variant?: UnitVariant;
|
|
7
10
|
size?: UnitSize;
|
|
8
11
|
readOnly?: boolean;
|
|
12
|
+
overflow?: boolean;
|
|
13
|
+
inline?: boolean;
|
|
14
|
+
button?: boolean;
|
|
15
|
+
multiline?: boolean;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
title?: ReactNode;
|
|
18
|
+
fieldIcon?: string;
|
|
19
|
+
description?: ReactNode;
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
hint?: ReactNode;
|
|
22
|
+
navButton?: ReactNode;
|
|
23
|
+
tooltip?: boolean;
|
|
24
|
+
/** Render the field label above the value (full-size presentation). */
|
|
25
|
+
withLabel?: boolean;
|
|
26
|
+
border?: boolean;
|
|
27
|
+
color?: string;
|
|
28
|
+
bgColor?: string | null;
|
|
29
|
+
fontWeight?: number;
|
|
30
|
+
shrinkable?: boolean;
|
|
31
|
+
clickable?: boolean;
|
|
32
|
+
setMinWidth?: boolean;
|
|
33
|
+
setMinHeight?: boolean;
|
|
34
|
+
onKeyDown?: (e: KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
35
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
36
|
+
invalid?: boolean;
|
|
37
|
+
};
|
|
38
|
+
declare const UnitComponent: ({ variant, size, readOnly, overflow, inline, button, multiline, children, title, fieldIcon, description, hint, icon, navButton, tooltip, withLabel, border, color, bgColor, fontWeight, shrinkable, clickable, setMinWidth, setMinHeight, onClick, onKeyDown, invalid }: UnitProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare const Unit: typeof UnitComponent & {
|
|
40
|
+
Container: typeof UnitContainer;
|
|
41
|
+
Content: typeof UnitContent;
|
|
42
|
+
NavButton: typeof UnitNavButton;
|
|
9
43
|
};
|
|
10
|
-
declare const Unit: ({ variant, size, readOnly, withLabel, invalid, color, bgColor, border, button, clickable, onClick, ...rest }: UnitProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
44
|
//#endregion
|
|
12
|
-
export { Unit, UnitProps, UnitSize, UnitVariant };
|
|
45
|
+
export { Unit, UnitProps, type UnitSize, UnitVariant };
|
package/lib/unit/unit.js
CHANGED
|
@@ -1,22 +1,53 @@
|
|
|
1
1
|
import { themeVars } from "../theming.generated.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { positionUnitClass } from "./styles.js";
|
|
3
|
+
import { UnitContainer } from "./container.js";
|
|
4
|
+
import { LabeledUnit } from "./labeled-unit.js";
|
|
5
|
+
import { UnitNavButton } from "./nav-button.js";
|
|
6
|
+
import { UnitContent } from "./unit-content.js";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
8
|
//#region src/unit/unit.tsx
|
|
5
9
|
var getVariantBgColor = (variant, readOnly) => variant === "outlined" && readOnly ? themeVars.inputDisabledBgColor : themeVars.transparent;
|
|
6
|
-
var
|
|
10
|
+
var UnitComponent = ({ variant = "outlined", size = "small", readOnly = false, overflow = true, inline = true, button, multiline = false, children, title, fieldIcon, description = null, hint = null, icon, navButton, tooltip = true, withLabel = false, border, color = themeVars.textColor, bgColor, fontWeight, shrinkable = true, clickable, setMinWidth = true, setMinHeight = true, onClick, onKeyDown, invalid }) => {
|
|
7
11
|
const interactive = variant === "outlined" && !readOnly;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
border: border ??
|
|
12
|
-
bgColor: bgColor ?? getVariantBgColor(variant, readOnly),
|
|
13
|
-
button: button ?? (interactive || Boolean(onClick)),
|
|
14
|
-
clickable: clickable ?? interactive,
|
|
15
|
-
withLabel,
|
|
12
|
+
const content = /* @__PURE__ */ jsxs(UnitContainer, {
|
|
13
|
+
size,
|
|
14
|
+
inline,
|
|
15
|
+
border: border ?? interactive,
|
|
16
16
|
invalid,
|
|
17
|
+
clickable: clickable ?? interactive,
|
|
18
|
+
setMinWidth,
|
|
19
|
+
setMinHeight,
|
|
17
20
|
color,
|
|
18
|
-
|
|
21
|
+
bgColor: bgColor ?? getVariantBgColor(variant, readOnly),
|
|
22
|
+
fontWeight,
|
|
23
|
+
tooltip: tooltip ? {
|
|
24
|
+
title,
|
|
25
|
+
fieldIcon,
|
|
26
|
+
description,
|
|
27
|
+
hint
|
|
28
|
+
} : void 0,
|
|
29
|
+
children: [/* @__PURE__ */ jsx(UnitContent, {
|
|
30
|
+
button: button ?? (interactive || Boolean(onClick)),
|
|
31
|
+
icon,
|
|
32
|
+
shrinkable,
|
|
33
|
+
truncate: !multiline && overflow,
|
|
34
|
+
onClick,
|
|
35
|
+
onKeyDown,
|
|
36
|
+
children
|
|
37
|
+
}), navButton && /* @__PURE__ */ jsx(UnitNavButton, { children: navButton })]
|
|
38
|
+
});
|
|
39
|
+
return /* @__PURE__ */ jsx("div", {
|
|
40
|
+
className: positionUnitClass,
|
|
41
|
+
children: withLabel ? /* @__PURE__ */ jsx(LabeledUnit, {
|
|
42
|
+
label: title,
|
|
43
|
+
children: content
|
|
44
|
+
}) : content
|
|
19
45
|
});
|
|
20
46
|
};
|
|
47
|
+
var Unit = Object.assign(UnitComponent, {
|
|
48
|
+
Container: UnitContainer,
|
|
49
|
+
Content: UnitContent,
|
|
50
|
+
NavButton: UnitNavButton
|
|
51
|
+
});
|
|
21
52
|
//#endregion
|
|
22
53
|
export { Unit };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./workflow-progress-icon.wyw-in-js.css";
|
|
2
2
|
import { themeVars } from "./theming.generated.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import {
|
|
4
|
+
import { memoizeLeak } from "@fibery/helpers/src/_";
|
|
5
5
|
import { arc } from "d3-shape";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/workflow-progress-icon.tsx
|
|
@@ -32,7 +32,7 @@ var WorkflowProgressIcon = ({ size, index, total, fillProgress = themeVars.progr
|
|
|
32
32
|
})
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
|
-
var getPath =
|
|
35
|
+
var getPath = memoizeLeak((index, total, size) => {
|
|
36
36
|
return arc().innerRadius(size / 2.75).outerRadius(size / 2).startAngle(0).endAngle(2 * (index / total) * Math.PI).cornerRadius(1)();
|
|
37
37
|
}, (...args) => args.join("/"));
|
|
38
38
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib"
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@linaria/core": "8.
|
|
99
|
-
"@linaria/react": "8.
|
|
98
|
+
"@linaria/core": "8.2.0",
|
|
99
|
+
"@linaria/react": "8.2.0",
|
|
100
100
|
"@popperjs/core": "2.11.6",
|
|
101
101
|
"@radix-ui/react-collapsible": "1.1.0",
|
|
102
102
|
"@radix-ui/react-context-menu": "2.2.1",
|
|
@@ -145,10 +145,10 @@
|
|
|
145
145
|
"screenfull": "6.0.2",
|
|
146
146
|
"tabbable": "5.2.1",
|
|
147
147
|
"vaul": "1.1.2",
|
|
148
|
-
"virtua": "0.
|
|
148
|
+
"virtua": "0.50.4",
|
|
149
149
|
"@fibery/emoji-data": "3.0.0",
|
|
150
|
-
"@fibery/
|
|
151
|
-
"@fibery/
|
|
150
|
+
"@fibery/helpers": "3.3.1",
|
|
151
|
+
"@fibery/react": "2.0.2"
|
|
152
152
|
},
|
|
153
153
|
"peerDependencies": {
|
|
154
154
|
"react": "18.3.1",
|
package/lib/features.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
//#region src/features.d.ts
|
|
2
|
-
declare function FeaturesProvider({ children, value }: {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
value: unknown;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function useFeatures<T = unknown>(): T;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { FeaturesProvider, useFeatures };
|
package/lib/features.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext } from "react";
|
|
3
|
-
//#region src/features.tsx
|
|
4
|
-
var featuresContext = createContext({});
|
|
5
|
-
function FeaturesProvider({ children, value }) {
|
|
6
|
-
return /* @__PURE__ */ jsx(featuresContext.Provider, {
|
|
7
|
-
value,
|
|
8
|
-
children
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
function useFeatures() {
|
|
12
|
-
return useContext(featuresContext);
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { FeaturesProvider, useFeatures };
|
package/lib/flags.d.ts
DELETED
package/lib/flags.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region src/icons/ast/alert-triangle.ts
|
|
2
|
-
var AlertTriangle = {
|
|
3
|
-
"icon": {
|
|
4
|
-
"type": "root",
|
|
5
|
-
"children": [{
|
|
6
|
-
"type": "element",
|
|
7
|
-
"tagName": "svg",
|
|
8
|
-
"properties": { "viewBox": "0 0 20 20" },
|
|
9
|
-
"children": [{
|
|
10
|
-
"type": "element",
|
|
11
|
-
"tagName": "path",
|
|
12
|
-
"properties": {
|
|
13
|
-
"fillRule": "evenodd",
|
|
14
|
-
"d": "M18.892 14.558 12.183 2.892a2.5 2.5 0 0 0-4.366 0L1.15 14.558a2.5 2.5 0 0 0 2.133 3.775h13.434a2.5 2.5 0 0 0 2.175-3.775M10 6.667a.833.833 0 0 0-.833.833v3.333a.833.833 0 0 0 1.666 0V7.5A.834.834 0 0 0 10 6.667m-.463 6.807a.833.833 0 1 1 .926 1.385.833.833 0 0 1-.926-1.385",
|
|
15
|
-
"clipRule": "evenodd"
|
|
16
|
-
},
|
|
17
|
-
"children": []
|
|
18
|
-
}],
|
|
19
|
-
"metadata": ""
|
|
20
|
-
}]
|
|
21
|
-
},
|
|
22
|
-
"name": "alert-triangle"
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
25
|
-
export { AlertTriangle as default };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region src/icons/ast/field-units-large.ts
|
|
2
|
-
var FieldUnitsLarge = {
|
|
3
|
-
"icon": {
|
|
4
|
-
"type": "root",
|
|
5
|
-
"children": [{
|
|
6
|
-
"type": "element",
|
|
7
|
-
"tagName": "svg",
|
|
8
|
-
"properties": { "viewBox": "0 0 20 20" },
|
|
9
|
-
"children": [{
|
|
10
|
-
"type": "element",
|
|
11
|
-
"tagName": "path",
|
|
12
|
-
"properties": {
|
|
13
|
-
"fillRule": "evenodd",
|
|
14
|
-
"d": "M2 12.75A2.25 2.25 0 0 0 4.25 15h11.5A2.25 2.25 0 0 0 18 12.75v-5.5A2.25 2.25 0 0 0 15.75 5H4.25A2.25 2.25 0 0 0 2 7.25zm1.5 0c0 .414.336.75.75.75h11.5a.75.75 0 0 0 .75-.75v-5.5a.75.75 0 0 0-.75-.75H4.25a.75.75 0 0 0-.75.75zm6.75-3.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5zM6 8.5a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1z",
|
|
15
|
-
"clipRule": "evenodd"
|
|
16
|
-
},
|
|
17
|
-
"children": []
|
|
18
|
-
}],
|
|
19
|
-
"metadata": ""
|
|
20
|
-
}]
|
|
21
|
-
},
|
|
22
|
-
"name": "field-units-large"
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
25
|
-
export { FieldUnitsLarge as default };
|
package/lib/icons/ast/plus.d.ts
DELETED
package/lib/icons/ast/plus.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region src/icons/ast/plus.ts
|
|
2
|
-
var Plus = {
|
|
3
|
-
"icon": {
|
|
4
|
-
"type": "root",
|
|
5
|
-
"children": [{
|
|
6
|
-
"type": "element",
|
|
7
|
-
"tagName": "svg",
|
|
8
|
-
"properties": { "viewBox": "0 0 20 20" },
|
|
9
|
-
"children": [{
|
|
10
|
-
"type": "element",
|
|
11
|
-
"tagName": "path",
|
|
12
|
-
"properties": {
|
|
13
|
-
"fillRule": "evenodd",
|
|
14
|
-
"d": "M10 4.25a.75.75 0 0 1 .75.75v4.25H15a.75.75 0 0 1 0 1.5h-4.25V15a.75.75 0 0 1-1.5 0v-4.25H5a.75.75 0 0 1 0-1.5h4.25V5a.75.75 0 0 1 .75-.75",
|
|
15
|
-
"clipRule": "evenodd"
|
|
16
|
-
},
|
|
17
|
-
"children": []
|
|
18
|
-
}],
|
|
19
|
-
"metadata": ""
|
|
20
|
-
}]
|
|
21
|
-
},
|
|
22
|
-
"name": "plus"
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
25
|
-
export { Plus as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/icons/react/alert-triangle.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated. Do not edit manually.
|
|
4
|
-
*
|
|
5
|
-
* @see import("../svg/alert-triangle.svg")
|
|
6
|
-
* @see import("../../scripts/generate-icons.ts")
|
|
7
|
-
*/
|
|
8
|
-
declare const AlertTriangle: import("react").ForwardRefExoticComponent<Omit<import("react").SVGProps<SVGSVGElement>, "color" | "ref"> & {
|
|
9
|
-
containerSize?: number;
|
|
10
|
-
iconSize?: number;
|
|
11
|
-
color?: string | null | undefined;
|
|
12
|
-
colorProcessed?: boolean;
|
|
13
|
-
} & import("react").RefAttributes<SVGSVGElement>>;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { AlertTriangle as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Icon } from "../icon.js";
|
|
2
|
-
import AlertTriangle$1 from "../ast/alert-triangle.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
//#region src/icons/react/alert-triangle.tsx
|
|
6
|
-
/**
|
|
7
|
-
* This file was automatically generated. Do not edit manually.
|
|
8
|
-
*
|
|
9
|
-
* @see import("../svg/alert-triangle.svg")
|
|
10
|
-
* @see import("../../scripts/generate-icons.ts")
|
|
11
|
-
*/
|
|
12
|
-
var AlertTriangle = forwardRef(function AlertTriangle(props, ref) {
|
|
13
|
-
return /* @__PURE__ */ jsx(Icon, {
|
|
14
|
-
...props,
|
|
15
|
-
className: props.className,
|
|
16
|
-
ref,
|
|
17
|
-
icon: AlertTriangle$1
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
//#endregion
|
|
21
|
-
export { AlertTriangle as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/icons/react/field-units-large.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated. Do not edit manually.
|
|
4
|
-
*
|
|
5
|
-
* @see import("../svg/field-units-large.svg")
|
|
6
|
-
* @see import("../../scripts/generate-icons.ts")
|
|
7
|
-
*/
|
|
8
|
-
declare const FieldUnitsLarge: import("react").ForwardRefExoticComponent<Omit<import("react").SVGProps<SVGSVGElement>, "color" | "ref"> & {
|
|
9
|
-
containerSize?: number;
|
|
10
|
-
iconSize?: number;
|
|
11
|
-
color?: string | null | undefined;
|
|
12
|
-
colorProcessed?: boolean;
|
|
13
|
-
} & import("react").RefAttributes<SVGSVGElement>>;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { FieldUnitsLarge as default };
|