bianic-ui 1.7.2 → 1.7.3-alpha.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/dist/cjs/index.js +29 -27
- package/dist/cjs/lib.css +1 -1
- package/dist/esm/index.js +29 -27
- package/dist/esm/lib.css +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -415,7 +415,7 @@ var sizeConfig$c = {
|
|
|
415
415
|
lg: 'py-[10.5px] h-[48px] flex items-center justify-center gap-[10px] text-size-md ',
|
|
416
416
|
md: 'py-[9px] h-[40px] flex items-center justify-center gap-[5px] text-size-base ',
|
|
417
417
|
sm: 'py-[6px] h-[30px] flex items-center justify-center gap-[5px] text-size-sm ',
|
|
418
|
-
tn: 'py-[2px] h-[22px] flex items-center justify-center gap-[3px] text-size-
|
|
418
|
+
tn: 'py-[2px] h-[22px] flex items-center justify-center gap-[3px] text-size-sm ',
|
|
419
419
|
};
|
|
420
420
|
var sidePaddingConfig = {
|
|
421
421
|
lg: 'px-[13px]',
|
|
@@ -488,7 +488,7 @@ function Button(_a) {
|
|
|
488
488
|
minWidthRules = '';
|
|
489
489
|
}
|
|
490
490
|
var sizingRules;
|
|
491
|
-
if (variant.includes('
|
|
491
|
+
if (variant.includes('link')) {
|
|
492
492
|
sizingRules = "".concat(sizeConfig$c[validatedSize]);
|
|
493
493
|
}
|
|
494
494
|
else {
|
|
@@ -1488,7 +1488,7 @@ var colorConfig$1 = {
|
|
|
1488
1488
|
var ButtonApp = function (_a) {
|
|
1489
1489
|
_a.icon; _a.isNotified; var _c = _a.isActive, isActive = _c === void 0 ? false : _c, disabled = _a.disabled, _d = _a.color, color = _d === void 0 ? 'green' : _d, label = _a.label, extended = _a.extended, rest = __rest(_a, ["icon", "isNotified", "isActive", "disabled", "color", "label", "extended"]);
|
|
1490
1490
|
var buttonState = isActive ? 'active' : 'default';
|
|
1491
|
-
return (React.createElement("button", __assign({ className: "button-app px-[10px] pb-[8.8px] pt-[8px] text-size-tiny
|
|
1491
|
+
return (React.createElement("button", __assign({ className: "button-app px-[10px] pb-[8.8px] pt-[8px] font-arial text-size-tiny ".concat(colorConfig$1[color][buttonState], " ").concat(extended), type: "button", disabled: disabled }, rest), label));
|
|
1492
1492
|
};
|
|
1493
1493
|
|
|
1494
1494
|
var textColorConfig = {
|
|
@@ -1707,13 +1707,13 @@ function MenuItem(_a) {
|
|
|
1707
1707
|
var _b = _a.className, className = _b === void 0 ? '' : _b, label = _a.label, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.caption, caption = _d === void 0 ? undefined : _d, _e = _a.isChecked, isChecked = _e === void 0 ? undefined : _e, _f = _a.onClose, onClose = _f === void 0 ? function () { } : _f, children = _a.children, props = __rest(_a, ["className", "label", "onClick", "caption", "isChecked", "onClose", "children"]);
|
|
1708
1708
|
var _g = React.useState(false), isHovered = _g[0], setIsHovered = _g[1];
|
|
1709
1709
|
return (React.createElement("div", { className: "group/main relative cursor-pointer first:rounded-t-radius-sm first:pt-[6px] last:rounded-b-radius-sm last:pb-[6px] ".concat(!isHovered && 'z-10'), onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } },
|
|
1710
|
-
React.createElement("div", __assign({ className: "relative z-10 flex items-center p-[5px]
|
|
1710
|
+
React.createElement("div", __assign({ className: "relative z-10 flex items-center p-[5px] hover:bg-bia-blue-pastel ".concat(className, "}"), role: "button", tabIndex: 0, onClick: function (e) {
|
|
1711
1711
|
onClick(e);
|
|
1712
1712
|
}, onKeyDown: function () { } }, props),
|
|
1713
|
-
React.createElement("div", { className: "mr-[5px] aspect-square w-[14px]" }, isChecked
|
|
1714
|
-
React.createElement("span", { className: "whitespace-nowrap text-[11px]" }, label),
|
|
1713
|
+
isChecked !== undefined && (React.createElement("div", { className: "mr-[5px] aspect-square w-[14px]" }, isChecked && React.createElement(TbCheck, { className: "text-primary-black", size: 14 }))),
|
|
1714
|
+
React.createElement("span", { className: "whitespace-nowrap font-arial text-[11px]" }, label),
|
|
1715
1715
|
React.createElement("div", { className: "ml-auto flex items-center" },
|
|
1716
|
-
children && React.createElement(TbChevronRight, { className: "ml-[10px] text-bia-coolgrey" }),
|
|
1716
|
+
children && (React.createElement(TbChevronRight, { className: "ml-[10px] text-bia-coolgrey" })),
|
|
1717
1717
|
children === undefined && caption && (React.createElement("span", { className: "ml-[30px] whitespace-nowrap text-[11px] text-bia-coolgrey" }, caption)))),
|
|
1718
1718
|
children && (React.createElement(MenuContainer, { open: isHovered, onClose: onClose, className: "absolute right-0 top-0 translate-x-full bg-primary-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.20)] group-first/main:top-[6px]" }, children))));
|
|
1719
1719
|
}
|
|
@@ -1778,7 +1778,7 @@ function PasswordIcon(_a) {
|
|
|
1778
1778
|
}
|
|
1779
1779
|
|
|
1780
1780
|
function TextInput(_a) {
|
|
1781
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ?
|
|
1781
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? null : _e, label = _a.label, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.required, required = _h === void 0 ? false : _h, _j = _a.variant, variant = _j === void 0 ? 'text' : _j, _k = _a.value, value = _k === void 0 ? undefined : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.maxLength, maxLength = _m === void 0 ? undefined : _m, _o = _a.inputClassName, inputClassName = _o === void 0 ? '' : _o; _a.isFlatRight; var actionElement = _a.actionElement, _q = _a.autoComplete, autoComplete = _q === void 0 ? 'off' : _q, props = __rest(_a, ["descText", "disabled", "icon", "id", "size", "isValid", "label", "placeholder", "readOnly", "required", "variant", "value", "onChange", "maxLength", "inputClassName", "isFlatRight", "actionElement", "autoComplete"]);
|
|
1782
1782
|
var isTransparent = variant.includes('transparent');
|
|
1783
1783
|
var _r = React.useState(false), isShow = _r[0], setIsShow = _r[1];
|
|
1784
1784
|
var _s = styleConfig[variant], fieldStyle = _s.fieldStyle, iconStyle = _s.iconStyle;
|
|
@@ -2906,7 +2906,7 @@ var TabMenu = function (_a) {
|
|
|
2906
2906
|
usedButtonConfig = defaultButtonConfigs[isActive];
|
|
2907
2907
|
usedActionButtonConfig = '';
|
|
2908
2908
|
}
|
|
2909
|
-
return (React.createElement("div", __assign({ className: "tab-menu flex flex-row font-arial text-size-tiny font-normal ".concat(radiusConfig[validatedRadius], " ").concat(variantConfig[validatedVariant], " ").concat(usedBaseConfig, " ") }, rest),
|
|
2909
|
+
return (React.createElement("div", __assign({ className: "tab-menu flex flex-row font-arial text-size-tiny font-normal ".concat(radiusConfig[validatedRadius], " ").concat(variantConfig[validatedVariant], " ").concat(usedBaseConfig, " ").concat(rest.className) }, rest),
|
|
2910
2910
|
text,
|
|
2911
2911
|
React.createElement("div", { className: "grid ".concat(usedButtonConfig, " ") },
|
|
2912
2912
|
validatedVariant === 'alternative' && React.createElement("div", { className: "order-first" }),
|
|
@@ -2920,32 +2920,32 @@ var alignConfig = {
|
|
|
2920
2920
|
left: 'justify-start',
|
|
2921
2921
|
};
|
|
2922
2922
|
var sizeConfig$1 = {
|
|
2923
|
-
md: 'px-2.5 py-[9px]
|
|
2924
|
-
sm: 'px-2.5 py-[7px]
|
|
2925
|
-
tn: 'px-2.5 py-[3px]
|
|
2923
|
+
md: 'px-2.5 py-[9px]',
|
|
2924
|
+
sm: 'px-2.5 py-[7px]',
|
|
2925
|
+
tn: 'px-2.5 py-[3px]',
|
|
2926
2926
|
};
|
|
2927
2927
|
var bodyTextConfig = {
|
|
2928
|
-
md: '
|
|
2929
|
-
sm: '
|
|
2930
|
-
tn: '
|
|
2928
|
+
md: 'text-size-base font-segoe font-light',
|
|
2929
|
+
sm: 'text-size-sm font-normal font-segoe',
|
|
2930
|
+
tn: 'text-size-sm font-normal font-segoe',
|
|
2931
2931
|
};
|
|
2932
2932
|
var headTextConfig = {
|
|
2933
|
-
md: '
|
|
2934
|
-
sm: '
|
|
2935
|
-
tn: '
|
|
2933
|
+
md: 'text-size-base font-segoe font-semibold',
|
|
2934
|
+
sm: 'text-size-sm font-semibold font-segoe',
|
|
2935
|
+
tn: 'text-size-sm font-semibold font-segoe',
|
|
2936
2936
|
};
|
|
2937
2937
|
|
|
2938
2938
|
function TableCell(_a) {
|
|
2939
2939
|
var _b = _a.variant, variant = _b === void 0 ? 'body' : _b, _c = _a.alignment, alignment = _c === void 0 ? 'left' : _c, className = _a.className, children = _a.children, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.lined, lined = _e === void 0 ? false : _e, _f = _a.bgColor, bgColor = _f === void 0 ? '' : _f, props = __rest(_a, ["variant", "alignment", "className", "children", "size", "lined", "bgColor"]);
|
|
2940
2940
|
var bottomLined = lined ? 'border-b border-bia-grey' : '';
|
|
2941
2941
|
var bgColorClass = "bg-bia-".concat(bgColor);
|
|
2942
|
-
var
|
|
2942
|
+
var isHead = variant === 'head';
|
|
2943
|
+
var textConfig = isHead ? headTextConfig[size] : bodyTextConfig[size];
|
|
2944
|
+
var columnClass = "p-0 ".concat(sizeConfig$1[size], " ").concat(bottomLined, " ").concat(bgColorClass, " ").concat(alignConfig[alignment], " ").concat(textConfig, " ").concat(className);
|
|
2943
2945
|
if (variant === 'head') {
|
|
2944
|
-
return (React.createElement("th", __assign({ className: "bianic-table-cell table-head bg-bia-grey-light-80 ".concat(columnClass) }, props),
|
|
2945
|
-
React.createElement(Text, { variant: headTextConfig[size], extended: "flex items-center gap-x-[5px] whitespace-nowrap ".concat(alignConfig[alignment]) }, children)));
|
|
2946
|
+
return (React.createElement("th", __assign({ className: "bianic-table-cell table-head bg-bia-grey-light-80 ".concat(columnClass) }, props), children));
|
|
2946
2947
|
}
|
|
2947
|
-
return (React.createElement("td", __assign({ className: "bianic-table-cell table-col ".concat(columnClass) }, props),
|
|
2948
|
-
React.createElement(Text, { variant: bodyTextConfig[size], extended: "flex items-center gap-x-[5px] whitespace-nowrap ".concat(alignConfig[alignment]) }, children)));
|
|
2948
|
+
return (React.createElement("td", __assign({ className: "bianic-table-cell table-col ".concat(columnClass) }, props), children));
|
|
2949
2949
|
}
|
|
2950
2950
|
TableCell.defaultProps = {
|
|
2951
2951
|
alignment: 'left',
|
|
@@ -3031,13 +3031,14 @@ var TagLabel = function (_a) {
|
|
|
3031
3031
|
setSizeCount(height);
|
|
3032
3032
|
}
|
|
3033
3033
|
}, []);
|
|
3034
|
+
var isCloseable = validatedVariant === 'closeable';
|
|
3034
3035
|
var defaultIconSize = validatedSize === 'md' ? 'text-xl' : 'text-sm';
|
|
3035
3036
|
var borderColorRules = outlineColor || bgColor;
|
|
3036
3037
|
var roundedClass = validatedVariant === 'icon' ? 'rounded-full' : 'rounded-[50px]';
|
|
3037
3038
|
var sizeClass = validatedVariant === 'icon'
|
|
3038
3039
|
? iconOnlySizeConfig[validatedSize]
|
|
3039
3040
|
: sizeConfig[validatedSize];
|
|
3040
|
-
var isCloseableClass =
|
|
3041
|
+
var isCloseableClass = isCloseable && rightPaddingConfig[validatedSize];
|
|
3041
3042
|
var colorClass = validatedColor === 'custom'
|
|
3042
3043
|
? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor, " border border-bia-").concat(borderColorRules)
|
|
3043
3044
|
: colorConfig[validatedColor];
|
|
@@ -3051,7 +3052,8 @@ var TagLabel = function (_a) {
|
|
|
3051
3052
|
: "bg-bia-grey-dark-30 text-bia-".concat(bgColor)
|
|
3052
3053
|
: closeColorConfig[validatedColor];
|
|
3053
3054
|
var closeClass = "".concat(closeColor, " ").concat(closeSizeConfig[validatedSize]);
|
|
3054
|
-
|
|
3055
|
+
var isOpen = isCloseable ? open : true;
|
|
3056
|
+
return (isOpen && (React.createElement("div", __assign({ className: "tag-label flex items-center gap-x-[5px] text-size-base ".concat(containerClass), style: {
|
|
3055
3057
|
maxWidth: maxWidthStyle,
|
|
3056
3058
|
} }, props),
|
|
3057
3059
|
leftIcon && (React.createElement("div", { style: {
|
|
@@ -3059,12 +3061,12 @@ var TagLabel = function (_a) {
|
|
|
3059
3061
|
height: sizeCount + 'px',
|
|
3060
3062
|
}, className: "flex items-center justify-center", ref: containerRef }, leftIcon ||
|
|
3061
3063
|
(validatedVariant === 'icon' && (React.createElement(TbCheck, { className: defaultIconSize }))))),
|
|
3062
|
-
validatedVariant !== 'icon' && text && (React.createElement("span", { className: "w-full truncate pb-[
|
|
3064
|
+
validatedVariant !== 'icon' && text && (React.createElement("span", { className: "w-full truncate pb-[1px] ".concat(textClass) }, text)),
|
|
3063
3065
|
validatedVariant === 'label' && rightIcon && (React.createElement("div", { className: "block" },
|
|
3064
3066
|
" ",
|
|
3065
3067
|
rightIcon,
|
|
3066
3068
|
" ")),
|
|
3067
|
-
|
|
3069
|
+
isCloseable && (React.createElement("button", { type: "button", onClick: closeHandler, className: "flex aspect-square items-center justify-center rounded-full pt-[1px] ".concat(closeClass) },
|
|
3068
3070
|
React.createElement(TbX, null))))));
|
|
3069
3071
|
};
|
|
3070
3072
|
TagLabel.defaultProps = {
|