bianic-ui 2.5.0 → 2.5.1-beta.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 +30 -12
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Forms/TextArea/index.d.ts +2 -1
- package/dist/esm/index.js +30 -12
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Forms/TextArea/index.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1552,10 +1552,10 @@ var ContextualButton = React.forwardRef(function (_a, ref) {
|
|
|
1552
1552
|
: 'text-primary-white'
|
|
1553
1553
|
: textColorConfig[variant];
|
|
1554
1554
|
var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
|
|
1555
|
-
return (React.createElement("button", __assign({ ref: ref, className: "bianic-contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1555
|
+
return (React.createElement("button", __assign({ ref: ref, className: "bianic-contextual-button box-border flex min-h-[22px] flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1556
1556
|
icon,
|
|
1557
|
-
label && (React.createElement("div", { className: "label flex max-h-[46px] items-center px-[5px] text-[12px] leading-none" },
|
|
1558
|
-
React.createElement("span",
|
|
1557
|
+
label && (React.createElement("div", { className: "label flex max-h-[46px] items-center gap-x-0.5 px-[5px] text-[12px] leading-none" },
|
|
1558
|
+
React.createElement("span", null, label),
|
|
1559
1559
|
actionElement))));
|
|
1560
1560
|
});
|
|
1561
1561
|
|
|
@@ -2240,7 +2240,7 @@ var styleConfig = {
|
|
|
2240
2240
|
iconStyle: '',
|
|
2241
2241
|
},
|
|
2242
2242
|
text: {
|
|
2243
|
-
fieldStyle: '
|
|
2243
|
+
fieldStyle: '',
|
|
2244
2244
|
iconStyle: 'pointer-events-none',
|
|
2245
2245
|
},
|
|
2246
2246
|
number: {
|
|
@@ -2301,9 +2301,13 @@ var TextInput = React.forwardRef(function (_a, ref) {
|
|
|
2301
2301
|
return (React.createElement("div", { className: "bianic-text-input-container bianic-fgc-container group/form flex w-full flex-col gap-y-2 text-bia-black" },
|
|
2302
2302
|
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
2303
2303
|
React.createElement("div", { className: "relative w-full ".concat(disabledClass) },
|
|
2304
|
-
React.createElement("input", __assign({ className: "bianic-text-input bianic-fgc-target w-full rounded read-only:pointer-events-none read-only:border-bia-grey-light-50 hover:rounded-b-none focus:rounded-b-none focus-visible:outline-none disabled:cursor-not-allowed disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName), disabled: disabled, id: id, placeholder: placeholder || label, readOnly: readOnly, required: required, type: typeVariant, value: value, onChange: function (e) { return onChange(e); }, maxLength: maxLength, autoComplete: autoComplete, ref: ref, style: {
|
|
2305
|
-
|
|
2306
|
-
|
|
2304
|
+
React.createElement("input", __assign({ className: "bianic-text-input bianic-fgc-target w-full rounded read-only:pointer-events-none read-only:border-bia-grey-light-50 hover:rounded-b-none focus:rounded-b-none focus-visible:outline-none disabled:cursor-not-allowed disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName), disabled: disabled, id: id, placeholder: placeholder || label, readOnly: readOnly, required: required, type: typeVariant, value: value, onChange: function (e) { return onChange(e); }, maxLength: maxLength, autoComplete: autoComplete, ref: ref, style: {
|
|
2305
|
+
paddingRight: iconElement
|
|
2306
|
+
? "".concat(10 + Number(iconSize), "px")
|
|
2307
|
+
: undefined,
|
|
2308
|
+
} }, props)),
|
|
2309
|
+
iconElement && (React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(actionElement ? '' : iconStyle, " ").concat(iconPosition, " ").concat(iconSizing) }, iconElement))),
|
|
2310
|
+
(descText || maxLength) && (React.createElement("div", { className: "bianic-text-input-desc flex justify-between gap-1 text-xs ".concat(descColor) },
|
|
2307
2311
|
React.createElement("span", null, descText),
|
|
2308
2312
|
maxLength && (React.createElement("span", null,
|
|
2309
2313
|
remainWords,
|
|
@@ -2380,17 +2384,31 @@ var sizeConfig$a = {
|
|
|
2380
2384
|
};
|
|
2381
2385
|
|
|
2382
2386
|
function TextArea(_a) {
|
|
2383
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, _d = _a.placeholder, placeholder = _d === void 0 ? '' : _d, required = _a.required, rows = _a.rows, _e = _a.maxLength, maxLength = _e === void 0 ? undefined : _e, value = _a.value, _f = _a.readOnly, readOnly = _f === void 0 ? false : _f, _g = _a.autoComplete, autoComplete = _g === void 0 ? 'off' : _g, props = __rest(_a, ["descText", "disabled", "id", "size", "label", "placeholder", "required", "rows", "maxLength", "value", "readOnly", "autoComplete"]);
|
|
2387
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, _d = _a.placeholder, placeholder = _d === void 0 ? '' : _d, required = _a.required, rows = _a.rows, _e = _a.maxLength, maxLength = _e === void 0 ? undefined : _e, value = _a.value, _f = _a.readOnly, readOnly = _f === void 0 ? false : _f, _g = _a.autoComplete, autoComplete = _g === void 0 ? 'off' : _g, _h = _a.isValid, isValid = _h === void 0 ? null : _h, props = __rest(_a, ["descText", "disabled", "id", "size", "label", "placeholder", "required", "rows", "maxLength", "value", "readOnly", "autoComplete", "isValid"]);
|
|
2384
2388
|
var inputRow = rows !== null && rows !== void 0 ? rows : 4;
|
|
2385
2389
|
var inputClass = sizeConfig$a[size].inputClass;
|
|
2386
2390
|
var remainWords = maxLength ? maxLength - (value ? value.length : 0) : 0;
|
|
2391
|
+
var isExistValidation = isValid !== null;
|
|
2392
|
+
var descColor = 'text-primary-cool';
|
|
2393
|
+
if (!disabled && isExistValidation && isValid)
|
|
2394
|
+
descColor = 'text-bia-green';
|
|
2395
|
+
if (!disabled && isExistValidation && !isValid)
|
|
2396
|
+
descColor = 'text-bia-red';
|
|
2397
|
+
var bottomBorderColor = 'enabled:hover:border-b-bia-blue enabled:focus:border-b-bia-blue';
|
|
2398
|
+
if (!disabled && isExistValidation && isValid)
|
|
2399
|
+
bottomBorderColor =
|
|
2400
|
+
'enabled:hover:border-b-bia-green enabled:focus:border-b-bia-green';
|
|
2401
|
+
if (!disabled && isExistValidation && !isValid)
|
|
2402
|
+
bottomBorderColor =
|
|
2403
|
+
'enabled:hover:border-b-bia-red enabled:focus:border-b-bia-red';
|
|
2387
2404
|
var disabledClass = disabled ? 'cursor-not-allowed' : '';
|
|
2405
|
+
var extendedInputClassName = "".concat(inputClass, " ").concat(bottomBorderColor);
|
|
2388
2406
|
return (React.createElement("div", { className: "field-group group/form flex w-full flex-col gap-y-2" },
|
|
2389
2407
|
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
2390
2408
|
React.createElement("div", { className: "relative h-fit w-full min-w-[250px] ".concat(disabledClass) },
|
|
2391
2409
|
React.createElement(ResizeIcon, { className: "absolute bottom-[11px] right-[5px]" }),
|
|
2392
|
-
React.createElement("textarea", __assign({ className: "field bianic-text-area w-full rounded border border-bia-grey-dark-10 bg-primary-white p-2.5 read-only:pointer-events-none focus-visible:outline-none enabled:hover:rounded-b-none enabled:
|
|
2393
|
-
React.createElement("div", { className: "desc flex justify-between gap-1 text-xs
|
|
2410
|
+
React.createElement("textarea", __assign({ className: "field bianic-text-area w-full rounded border border-bia-grey-dark-10 bg-primary-white p-2.5 read-only:pointer-events-none focus-visible:outline-none enabled:hover:rounded-b-none enabled:focus:rounded-b-none disabled:cursor-not-allowed disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName), rows: inputRow, id: id, placeholder: placeholder, disabled: disabled, maxLength: maxLength, value: value, autoComplete: autoComplete, readOnly: readOnly }, props))),
|
|
2411
|
+
React.createElement("div", { className: "desc flex justify-between gap-1 text-xs ".concat(descColor) },
|
|
2394
2412
|
descText && React.createElement("span", null, descText),
|
|
2395
2413
|
maxLength && (React.createElement("span", null,
|
|
2396
2414
|
remainWords,
|
|
@@ -3651,8 +3669,8 @@ var colorConfig$1 = {
|
|
|
3651
3669
|
};
|
|
3652
3670
|
var sizeConfig$3 = {
|
|
3653
3671
|
container: 'min-h-fit p-5 text-wrap',
|
|
3654
|
-
'form-sm': 'h-[30px] whitespace-nowrap
|
|
3655
|
-
'form-md': 'h-
|
|
3672
|
+
'form-sm': 'min-h-[30px] h-fit whitespace-nowrap p-[7px]',
|
|
3673
|
+
'form-md': 'min-h-[40px] h-fit whitespace-nowrap px-2.5 py-[9.5px]',
|
|
3656
3674
|
};
|
|
3657
3675
|
|
|
3658
3676
|
var InfoPanel = function (_a) {
|