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/esm/index.js
CHANGED
|
@@ -413,7 +413,7 @@ var sizeConfig$c = {
|
|
|
413
413
|
lg: 'py-[10.5px] h-[48px] flex items-center justify-center gap-[10px] text-size-md ',
|
|
414
414
|
md: 'py-[9px] h-[40px] flex items-center justify-center gap-[5px] text-size-base ',
|
|
415
415
|
sm: 'py-[6px] h-[30px] flex items-center justify-center gap-[5px] text-size-sm ',
|
|
416
|
-
tn: 'py-[2px] h-[22px] flex items-center justify-center gap-[3px] text-size-
|
|
416
|
+
tn: 'py-[2px] h-[22px] flex items-center justify-center gap-[3px] text-size-sm ',
|
|
417
417
|
};
|
|
418
418
|
var sidePaddingConfig = {
|
|
419
419
|
lg: 'px-[13px]',
|
|
@@ -486,7 +486,7 @@ function Button(_a) {
|
|
|
486
486
|
minWidthRules = '';
|
|
487
487
|
}
|
|
488
488
|
var sizingRules;
|
|
489
|
-
if (variant.includes('
|
|
489
|
+
if (variant.includes('link')) {
|
|
490
490
|
sizingRules = "".concat(sizeConfig$c[validatedSize]);
|
|
491
491
|
}
|
|
492
492
|
else {
|
|
@@ -1486,7 +1486,7 @@ var colorConfig$1 = {
|
|
|
1486
1486
|
var ButtonApp = function (_a) {
|
|
1487
1487
|
_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"]);
|
|
1488
1488
|
var buttonState = isActive ? 'active' : 'default';
|
|
1489
|
-
return (React.createElement("button", __assign({ className: "button-app px-[10px] pb-[8.8px] pt-[8px] text-size-tiny
|
|
1489
|
+
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));
|
|
1490
1490
|
};
|
|
1491
1491
|
|
|
1492
1492
|
var textColorConfig = {
|
|
@@ -1705,13 +1705,13 @@ function MenuItem(_a) {
|
|
|
1705
1705
|
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"]);
|
|
1706
1706
|
var _g = useState(false), isHovered = _g[0], setIsHovered = _g[1];
|
|
1707
1707
|
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); } },
|
|
1708
|
-
React.createElement("div", __assign({ className: "relative z-10 flex items-center p-[5px]
|
|
1708
|
+
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) {
|
|
1709
1709
|
onClick(e);
|
|
1710
1710
|
}, onKeyDown: function () { } }, props),
|
|
1711
|
-
React.createElement("div", { className: "mr-[5px] aspect-square w-[14px]" }, isChecked
|
|
1712
|
-
React.createElement("span", { className: "whitespace-nowrap text-[11px]" }, label),
|
|
1711
|
+
isChecked !== undefined && (React.createElement("div", { className: "mr-[5px] aspect-square w-[14px]" }, isChecked && React.createElement(TbCheck, { className: "text-primary-black", size: 14 }))),
|
|
1712
|
+
React.createElement("span", { className: "whitespace-nowrap font-arial text-[11px]" }, label),
|
|
1713
1713
|
React.createElement("div", { className: "ml-auto flex items-center" },
|
|
1714
|
-
children && React.createElement(TbChevronRight, { className: "ml-[10px] text-bia-coolgrey" }),
|
|
1714
|
+
children && (React.createElement(TbChevronRight, { className: "ml-[10px] text-bia-coolgrey" })),
|
|
1715
1715
|
children === undefined && caption && (React.createElement("span", { className: "ml-[30px] whitespace-nowrap text-[11px] text-bia-coolgrey" }, caption)))),
|
|
1716
1716
|
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))));
|
|
1717
1717
|
}
|
|
@@ -1776,7 +1776,7 @@ function PasswordIcon(_a) {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
|
|
1778
1778
|
function TextInput(_a) {
|
|
1779
|
-
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 ?
|
|
1779
|
+
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"]);
|
|
1780
1780
|
var isTransparent = variant.includes('transparent');
|
|
1781
1781
|
var _r = useState(false), isShow = _r[0], setIsShow = _r[1];
|
|
1782
1782
|
var _s = styleConfig[variant], fieldStyle = _s.fieldStyle, iconStyle = _s.iconStyle;
|
|
@@ -2904,7 +2904,7 @@ var TabMenu = function (_a) {
|
|
|
2904
2904
|
usedButtonConfig = defaultButtonConfigs[isActive];
|
|
2905
2905
|
usedActionButtonConfig = '';
|
|
2906
2906
|
}
|
|
2907
|
-
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),
|
|
2907
|
+
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),
|
|
2908
2908
|
text,
|
|
2909
2909
|
React.createElement("div", { className: "grid ".concat(usedButtonConfig, " ") },
|
|
2910
2910
|
validatedVariant === 'alternative' && React.createElement("div", { className: "order-first" }),
|
|
@@ -2918,32 +2918,32 @@ var alignConfig = {
|
|
|
2918
2918
|
left: 'justify-start',
|
|
2919
2919
|
};
|
|
2920
2920
|
var sizeConfig$1 = {
|
|
2921
|
-
md: 'px-2.5 py-[9px]
|
|
2922
|
-
sm: 'px-2.5 py-[7px]
|
|
2923
|
-
tn: 'px-2.5 py-[3px]
|
|
2921
|
+
md: 'px-2.5 py-[9px]',
|
|
2922
|
+
sm: 'px-2.5 py-[7px]',
|
|
2923
|
+
tn: 'px-2.5 py-[3px]',
|
|
2924
2924
|
};
|
|
2925
2925
|
var bodyTextConfig = {
|
|
2926
|
-
md: '
|
|
2927
|
-
sm: '
|
|
2928
|
-
tn: '
|
|
2926
|
+
md: 'text-size-base font-segoe font-light',
|
|
2927
|
+
sm: 'text-size-sm font-normal font-segoe',
|
|
2928
|
+
tn: 'text-size-sm font-normal font-segoe',
|
|
2929
2929
|
};
|
|
2930
2930
|
var headTextConfig = {
|
|
2931
|
-
md: '
|
|
2932
|
-
sm: '
|
|
2933
|
-
tn: '
|
|
2931
|
+
md: 'text-size-base font-segoe font-semibold',
|
|
2932
|
+
sm: 'text-size-sm font-semibold font-segoe',
|
|
2933
|
+
tn: 'text-size-sm font-semibold font-segoe',
|
|
2934
2934
|
};
|
|
2935
2935
|
|
|
2936
2936
|
function TableCell(_a) {
|
|
2937
2937
|
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"]);
|
|
2938
2938
|
var bottomLined = lined ? 'border-b border-bia-grey' : '';
|
|
2939
2939
|
var bgColorClass = "bg-bia-".concat(bgColor);
|
|
2940
|
-
var
|
|
2940
|
+
var isHead = variant === 'head';
|
|
2941
|
+
var textConfig = isHead ? headTextConfig[size] : bodyTextConfig[size];
|
|
2942
|
+
var columnClass = "p-0 ".concat(sizeConfig$1[size], " ").concat(bottomLined, " ").concat(bgColorClass, " ").concat(alignConfig[alignment], " ").concat(textConfig, " ").concat(className);
|
|
2941
2943
|
if (variant === 'head') {
|
|
2942
|
-
return (React.createElement("th", __assign({ className: "bianic-table-cell table-head bg-bia-grey-light-80 ".concat(columnClass) }, props),
|
|
2943
|
-
React.createElement(Text, { variant: headTextConfig[size], extended: "flex items-center gap-x-[5px] whitespace-nowrap ".concat(alignConfig[alignment]) }, children)));
|
|
2944
|
+
return (React.createElement("th", __assign({ className: "bianic-table-cell table-head bg-bia-grey-light-80 ".concat(columnClass) }, props), children));
|
|
2944
2945
|
}
|
|
2945
|
-
return (React.createElement("td", __assign({ className: "bianic-table-cell table-col ".concat(columnClass) }, props),
|
|
2946
|
-
React.createElement(Text, { variant: bodyTextConfig[size], extended: "flex items-center gap-x-[5px] whitespace-nowrap ".concat(alignConfig[alignment]) }, children)));
|
|
2946
|
+
return (React.createElement("td", __assign({ className: "bianic-table-cell table-col ".concat(columnClass) }, props), children));
|
|
2947
2947
|
}
|
|
2948
2948
|
TableCell.defaultProps = {
|
|
2949
2949
|
alignment: 'left',
|
|
@@ -3029,13 +3029,14 @@ var TagLabel = function (_a) {
|
|
|
3029
3029
|
setSizeCount(height);
|
|
3030
3030
|
}
|
|
3031
3031
|
}, []);
|
|
3032
|
+
var isCloseable = validatedVariant === 'closeable';
|
|
3032
3033
|
var defaultIconSize = validatedSize === 'md' ? 'text-xl' : 'text-sm';
|
|
3033
3034
|
var borderColorRules = outlineColor || bgColor;
|
|
3034
3035
|
var roundedClass = validatedVariant === 'icon' ? 'rounded-full' : 'rounded-[50px]';
|
|
3035
3036
|
var sizeClass = validatedVariant === 'icon'
|
|
3036
3037
|
? iconOnlySizeConfig[validatedSize]
|
|
3037
3038
|
: sizeConfig[validatedSize];
|
|
3038
|
-
var isCloseableClass =
|
|
3039
|
+
var isCloseableClass = isCloseable && rightPaddingConfig[validatedSize];
|
|
3039
3040
|
var colorClass = validatedColor === 'custom'
|
|
3040
3041
|
? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor, " border border-bia-").concat(borderColorRules)
|
|
3041
3042
|
: colorConfig[validatedColor];
|
|
@@ -3049,7 +3050,8 @@ var TagLabel = function (_a) {
|
|
|
3049
3050
|
: "bg-bia-grey-dark-30 text-bia-".concat(bgColor)
|
|
3050
3051
|
: closeColorConfig[validatedColor];
|
|
3051
3052
|
var closeClass = "".concat(closeColor, " ").concat(closeSizeConfig[validatedSize]);
|
|
3052
|
-
|
|
3053
|
+
var isOpen = isCloseable ? open : true;
|
|
3054
|
+
return (isOpen && (React.createElement("div", __assign({ className: "tag-label flex items-center gap-x-[5px] text-size-base ".concat(containerClass), style: {
|
|
3053
3055
|
maxWidth: maxWidthStyle,
|
|
3054
3056
|
} }, props),
|
|
3055
3057
|
leftIcon && (React.createElement("div", { style: {
|
|
@@ -3057,12 +3059,12 @@ var TagLabel = function (_a) {
|
|
|
3057
3059
|
height: sizeCount + 'px',
|
|
3058
3060
|
}, className: "flex items-center justify-center", ref: containerRef }, leftIcon ||
|
|
3059
3061
|
(validatedVariant === 'icon' && (React.createElement(TbCheck, { className: defaultIconSize }))))),
|
|
3060
|
-
validatedVariant !== 'icon' && text && (React.createElement("span", { className: "w-full truncate pb-[
|
|
3062
|
+
validatedVariant !== 'icon' && text && (React.createElement("span", { className: "w-full truncate pb-[1px] ".concat(textClass) }, text)),
|
|
3061
3063
|
validatedVariant === 'label' && rightIcon && (React.createElement("div", { className: "block" },
|
|
3062
3064
|
" ",
|
|
3063
3065
|
rightIcon,
|
|
3064
3066
|
" ")),
|
|
3065
|
-
|
|
3067
|
+
isCloseable && (React.createElement("button", { type: "button", onClick: closeHandler, className: "flex aspect-square items-center justify-center rounded-full pt-[1px] ".concat(closeClass) },
|
|
3066
3068
|
React.createElement(TbX, null))))));
|
|
3067
3069
|
};
|
|
3068
3070
|
TagLabel.defaultProps = {
|