@fibery/ui-kit 9.0.2 → 9.1.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/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 +1 -0
- package/lib/comment.js +29 -20
- package/lib/comment.wyw-in-js.css +9 -7
- 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 +4 -4
- 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
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/icons/react/plus.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated. Do not edit manually.
|
|
4
|
-
*
|
|
5
|
-
* @see import("../svg/plus.svg")
|
|
6
|
-
* @see import("../../scripts/generate-icons.ts")
|
|
7
|
-
*/
|
|
8
|
-
declare const Plus: 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 { Plus as default };
|
package/lib/icons/react/plus.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Icon } from "../icon.js";
|
|
2
|
-
import Plus$1 from "../ast/plus.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
//#region src/icons/react/plus.tsx
|
|
6
|
-
/**
|
|
7
|
-
* This file was automatically generated. Do not edit manually.
|
|
8
|
-
*
|
|
9
|
-
* @see import("../svg/plus.svg")
|
|
10
|
-
* @see import("../../scripts/generate-icons.ts")
|
|
11
|
-
*/
|
|
12
|
-
var Plus = forwardRef(function Plus(props, ref) {
|
|
13
|
-
return /* @__PURE__ */ jsx(Icon, {
|
|
14
|
-
...props,
|
|
15
|
-
className: props.className,
|
|
16
|
-
ref,
|
|
17
|
-
icon: Plus$1
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
//#endregion
|
|
21
|
-
export { Plus as default };
|
package/lib/unit/primitive.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { UnitPrimitiveProps } from "./types.js";
|
|
2
|
-
//#region src/unit/primitive.d.ts
|
|
3
|
-
declare const UnitPrimitive: ({ overflow, inline, button, multiline, children, title, fieldIcon, description, hint, icons, navButton, big, pill, tooltip, withLabel, border, color, bgColor, fontWeight, shrinkable, clickable, setMinWidth, setMinHeight, onClick, onKeyDown, invalid }: UnitPrimitiveProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { UnitPrimitive };
|
package/lib/unit/primitive.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import "./primitive.wyw-in-js.css";
|
|
2
|
-
import { themeVars } from "../theming.generated.js";
|
|
3
|
-
import { Tooltip } from "../tooltip.js";
|
|
4
|
-
import { useTruncated } from "../tooltip-if-overflown.js";
|
|
5
|
-
import { FieldIcon } from "../field-icon.js";
|
|
6
|
-
import { LabeledUnit } from "./labeled-unit.js";
|
|
7
|
-
import { basicUnitClassName, bigSizeUnitClassName, positionUnitClass, regularSizeUnitClassName } from "./styles.js";
|
|
8
|
-
import { UnitButtonGroup } from "./unit-button-group.js";
|
|
9
|
-
import { UnitContent } from "./unit-content.js";
|
|
10
|
-
/* empty css */
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { forwardRef } from "react";
|
|
13
|
-
import cx from "classnames";
|
|
14
|
-
//#region src/unit/primitive.tsx
|
|
15
|
-
var unitDescriptionClassName = "uha1rmp-unitDescription";
|
|
16
|
-
var tooltipTitleClassName = "tlbybtz-tooltipTitle";
|
|
17
|
-
var resetButtonStylesClassName = "r1lb5dtf-resetButtonStyles";
|
|
18
|
-
var ButtonComponent = forwardRef((props, ref) => {
|
|
19
|
-
return /* @__PURE__ */ jsx("button", {
|
|
20
|
-
ref,
|
|
21
|
-
type: "button",
|
|
22
|
-
...props,
|
|
23
|
-
className: cx(props.className, resetButtonStylesClassName)
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
var DivComponent = forwardRef((props, ref) => /* @__PURE__ */ jsx("div", {
|
|
27
|
-
ref,
|
|
28
|
-
...props
|
|
29
|
-
}));
|
|
30
|
-
var UnitPrimitive = ({ overflow = true, inline = true, button = false, multiline = false, children, title, fieldIcon, description = null, hint = null, icons, navButton, big = false, pill = false, tooltip = true, withLabel = false, border = true, color = themeVars.textColor, bgColor = themeVars.transparent, fontWeight, shrinkable = true, clickable = false, setMinWidth = true, setMinHeight = true, onClick, onKeyDown, invalid }) => {
|
|
31
|
-
const { truncated, setNode } = useTruncated();
|
|
32
|
-
const truncate = !multiline && overflow;
|
|
33
|
-
const unitWrapperStyle = {
|
|
34
|
-
color,
|
|
35
|
-
backgroundColor: bgColor || themeVars.inputDisabledBgColor,
|
|
36
|
-
fontWeight
|
|
37
|
-
};
|
|
38
|
-
const unitWrapperClassName = cx(basicUnitClassName, big ? bigSizeUnitClassName : regularSizeUnitClassName, setMinWidth && (big ? "b1v5rpy3-bigSizeUnitMinWidth" : "rpdarf0-regularSizeUnitMinWidth"), setMinHeight && "ubaz4qk-unitMinHeight", border && "b4mqgwc-border", pill && "p1ebg4ic-pillRadius", invalid && "i14l2yxo-invalidUnit", clickable && "c18mqj2f-clickable");
|
|
39
|
-
const unitBody = /* @__PURE__ */ jsx(button ? ButtonComponent : DivComponent, {
|
|
40
|
-
onKeyDown,
|
|
41
|
-
onClick,
|
|
42
|
-
children: jsx(UnitContent, {
|
|
43
|
-
big,
|
|
44
|
-
icons,
|
|
45
|
-
shrinkable,
|
|
46
|
-
truncate,
|
|
47
|
-
setNode: tooltip ? setNode : void 0,
|
|
48
|
-
children
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
const renderUnit = (unit) => {
|
|
52
|
-
const content = /* @__PURE__ */ jsx(UnitButtonGroup, {
|
|
53
|
-
big,
|
|
54
|
-
inline,
|
|
55
|
-
style: unitWrapperStyle,
|
|
56
|
-
className: unitWrapperClassName,
|
|
57
|
-
unit,
|
|
58
|
-
navButton
|
|
59
|
-
});
|
|
60
|
-
return /* @__PURE__ */ jsx("div", {
|
|
61
|
-
className: positionUnitClass,
|
|
62
|
-
children: withLabel ? /* @__PURE__ */ jsx(LabeledUnit, {
|
|
63
|
-
label: title,
|
|
64
|
-
children: content
|
|
65
|
-
}) : content
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
if (!tooltip) return renderUnit(unitBody);
|
|
69
|
-
const tooltipTitle = /* @__PURE__ */ jsxs("div", {
|
|
70
|
-
className: tooltipTitleClassName,
|
|
71
|
-
children: [fieldIcon && /* @__PURE__ */ jsx(FieldIcon, {
|
|
72
|
-
iconName: fieldIcon,
|
|
73
|
-
iconSize: 14,
|
|
74
|
-
color: themeVars.whiteColor
|
|
75
|
-
}), title]
|
|
76
|
-
});
|
|
77
|
-
const tooltipContent = truncated && /* @__PURE__ */ jsx("div", {
|
|
78
|
-
className: "f1kzkp39-fullUnitWrapper",
|
|
79
|
-
children: jsx(UnitButtonGroup, {
|
|
80
|
-
big,
|
|
81
|
-
inline,
|
|
82
|
-
style: unitWrapperStyle,
|
|
83
|
-
className: unitWrapperClassName,
|
|
84
|
-
unit: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UnitContent, {
|
|
85
|
-
big,
|
|
86
|
-
icons,
|
|
87
|
-
children
|
|
88
|
-
}) })
|
|
89
|
-
})
|
|
90
|
-
});
|
|
91
|
-
return renderUnit(/* @__PURE__ */ jsx(Tooltip, {
|
|
92
|
-
side: "bottom",
|
|
93
|
-
align: "start",
|
|
94
|
-
openOnFocus: false,
|
|
95
|
-
title: tooltipTitle,
|
|
96
|
-
description: (description || tooltipContent || hint) && /* @__PURE__ */ jsxs("div", { children: [
|
|
97
|
-
description && /* @__PURE__ */ jsx("div", {
|
|
98
|
-
className: unitDescriptionClassName,
|
|
99
|
-
children: description
|
|
100
|
-
}),
|
|
101
|
-
tooltipContent,
|
|
102
|
-
hint
|
|
103
|
-
] }),
|
|
104
|
-
children: unitBody
|
|
105
|
-
}));
|
|
106
|
-
};
|
|
107
|
-
//#endregion
|
|
108
|
-
export { UnitPrimitive };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
.uha1rmp-unitDescription{margin-bottom:1px;}
|
|
2
|
-
.tlbybtz-tooltipTitle{display:flex;align-items:center;gap:4px;}
|
|
3
|
-
.r1lb5dtf-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;}.r1lb5dtf-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;}.r1lb5dtf-resetButtonStyles:focus:not(:focus-visible){outline:none;box-shadow:none!important;}.r1lb5dtf-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;}
|
package/lib/unit/types.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { KeyboardEvent, ReactNode } from "react";
|
|
2
|
-
//#region src/unit/types.d.ts
|
|
3
|
-
type UnitPrimitiveProps = {
|
|
4
|
-
overflow?: boolean;
|
|
5
|
-
inline?: boolean;
|
|
6
|
-
button?: boolean;
|
|
7
|
-
multiline?: boolean;
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
title?: ReactNode;
|
|
10
|
-
fieldIcon?: string;
|
|
11
|
-
description?: ReactNode;
|
|
12
|
-
icons?: React.ReactNode[];
|
|
13
|
-
hint?: ReactNode;
|
|
14
|
-
navButton?: ReactNode;
|
|
15
|
-
big?: boolean;
|
|
16
|
-
/** Round corners to half the height (pill/stadium shape). */
|
|
17
|
-
pill?: boolean;
|
|
18
|
-
tooltip?: boolean;
|
|
19
|
-
/** Render the field label above the value (full-size presentation). */
|
|
20
|
-
withLabel?: boolean;
|
|
21
|
-
border?: boolean;
|
|
22
|
-
color?: string;
|
|
23
|
-
bgColor?: string | null;
|
|
24
|
-
fontWeight?: number;
|
|
25
|
-
shrinkable?: boolean;
|
|
26
|
-
clickable?: boolean;
|
|
27
|
-
setMinWidth?: boolean;
|
|
28
|
-
setMinHeight?: boolean;
|
|
29
|
-
onKeyDown?: (e: KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
30
|
-
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
31
|
-
invalid?: boolean;
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
export { UnitPrimitiveProps };
|
package/lib/unit/types.js
DELETED
|
File without changes
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
//#region src/unit/unit-button-group.d.ts
|
|
3
|
-
type Props = {
|
|
4
|
-
big: boolean;
|
|
5
|
-
inline: boolean;
|
|
6
|
-
style: React.CSSProperties;
|
|
7
|
-
className: string;
|
|
8
|
-
unit?: ReactNode;
|
|
9
|
-
navButton?: ReactNode;
|
|
10
|
-
};
|
|
11
|
-
declare const UnitButtonGroup: ({ big, inline, style, className, unit, navButton }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { UnitButtonGroup };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { space } from "../design-system/layout.js";
|
|
2
|
-
import { getHeight } from "./unit-content-layout.js";
|
|
3
|
-
import { jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { Children, cloneElement } from "react";
|
|
5
|
-
//#region src/unit/unit-button-group.tsx
|
|
6
|
-
var UnitButtonGroup = ({ big, inline, style, className, unit, navButton }) => {
|
|
7
|
-
const navButtonNode = navButton && Children.only(navButton);
|
|
8
|
-
const navButtonSize = getHeight(big) + 2 * space.s2;
|
|
9
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
-
style: {
|
|
11
|
-
display: inline ? `inline-flex` : `flex`,
|
|
12
|
-
...style
|
|
13
|
-
},
|
|
14
|
-
className,
|
|
15
|
-
children: [unit, navButtonNode && cloneElement(navButtonNode, { style: {
|
|
16
|
-
...navButtonNode.props.style,
|
|
17
|
-
width: navButtonSize,
|
|
18
|
-
height: navButtonSize
|
|
19
|
-
} })]
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { UnitButtonGroup };
|