bianic-ui 1.0.0-beta.2 → 1.0.0-beta.21
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 +188 -843
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +12 -0
- package/dist/cjs/types/components/Button/configs.d.ts +0 -6
- package/dist/cjs/types/components/Button/index.d.ts +5 -1
- package/dist/cjs/types/components/Dump/Dump.d.ts +3 -0
- package/dist/cjs/types/components/Dump/index.d.ts +1 -0
- package/dist/cjs/types/components/Forms/Checkbox.d.ts +7 -0
- package/dist/cjs/types/components/Forms/LiveSearch.d.ts +13 -0
- package/dist/cjs/types/components/Forms/Radio.d.ts +8 -0
- package/dist/cjs/types/components/Forms/SelectInput.d.ts +13 -0
- package/dist/cjs/types/components/Forms/TextArea.d.ts +10 -0
- package/dist/cjs/types/components/Forms/TextInput.d.ts +14 -0
- package/dist/cjs/types/components/Forms/Toggle.d.ts +8 -0
- package/dist/cjs/types/components/Modal/ModalBody.d.ts +10 -0
- package/dist/cjs/types/components/Modal/ModalFooter.d.ts +7 -0
- package/dist/cjs/types/components/Modal/index.d.ts +3 -0
- package/dist/cjs/types/components/Tag/TagLabel.d.ts +14 -0
- package/dist/cjs/types/components/Tag/index.d.ts +1 -0
- package/dist/cjs/types/components/TagLabel/TagLabelBlockSimulation.d.ts +15 -0
- package/dist/cjs/types/components/TagLabel/configs.d.ts +35 -651
- package/dist/cjs/types/components/TagLabel/index.d.ts +21 -7
- package/dist/cjs/types/components/Typography/Text.d.ts +7 -0
- package/dist/cjs/types/utility/helper.d.ts +3 -0
- package/dist/esm/index.js +188 -843
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +12 -0
- package/dist/esm/types/components/Button/configs.d.ts +0 -6
- package/dist/esm/types/components/Button/index.d.ts +5 -1
- package/dist/esm/types/components/Dump/Dump.d.ts +3 -0
- package/dist/esm/types/components/Dump/index.d.ts +1 -0
- package/dist/esm/types/components/Forms/Checkbox.d.ts +7 -0
- package/dist/esm/types/components/Forms/LiveSearch.d.ts +13 -0
- package/dist/esm/types/components/Forms/Radio.d.ts +8 -0
- package/dist/esm/types/components/Forms/SelectInput.d.ts +13 -0
- package/dist/esm/types/components/Forms/TextArea.d.ts +10 -0
- package/dist/esm/types/components/Forms/TextInput.d.ts +14 -0
- package/dist/esm/types/components/Forms/Toggle.d.ts +8 -0
- package/dist/esm/types/components/Modal/ModalBody.d.ts +10 -0
- package/dist/esm/types/components/Modal/ModalFooter.d.ts +7 -0
- package/dist/esm/types/components/Modal/index.d.ts +3 -0
- package/dist/esm/types/components/Tag/TagLabel.d.ts +14 -0
- package/dist/esm/types/components/Tag/index.d.ts +1 -0
- package/dist/esm/types/components/TagLabel/TagLabelBlockSimulation.d.ts +15 -0
- package/dist/esm/types/components/TagLabel/configs.d.ts +35 -651
- package/dist/esm/types/components/TagLabel/index.d.ts +21 -7
- package/dist/esm/types/components/Typography/Text.d.ts +7 -0
- package/dist/esm/types/utility/helper.d.ts +3 -0
- package/dist/index.d.ts +126 -569
- package/package.json +1 -1
- package/src/style/color.css +12 -0
- package/tailwind.config.js +21 -0
package/dist/esm/index.js
CHANGED
|
@@ -86,7 +86,7 @@ function IconBase(props) {
|
|
|
86
86
|
// THIS FILE IS AUTO GENERATED
|
|
87
87
|
function TbAlertTriangle (props) {
|
|
88
88
|
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M12 9v4"},"child":[]},{"tag":"path","attr":{"d":"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z"},"child":[]},{"tag":"path","attr":{"d":"M12 16h.01"},"child":[]}]})(props);
|
|
89
|
-
}function TbCheck
|
|
89
|
+
}function TbCheck (props) {
|
|
90
90
|
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M5 12l5 5l10 -10"},"child":[]}]})(props);
|
|
91
91
|
}function TbChevronDown (props) {
|
|
92
92
|
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M6 9l6 6l6 -6"},"child":[]}]})(props);
|
|
@@ -153,7 +153,7 @@ var AlertConfig = {
|
|
|
153
153
|
ContainerIcon: 'bg-bia-green',
|
|
154
154
|
close: 'text-bia-green',
|
|
155
155
|
icon: {
|
|
156
|
-
true: TbCheck
|
|
156
|
+
true: TbCheck,
|
|
157
157
|
false: '',
|
|
158
158
|
},
|
|
159
159
|
},
|
|
@@ -244,9 +244,38 @@ var textClasses = {
|
|
|
244
244
|
'tiny-text-bold': 'text-size-tiny font-bold font-["Arial"]',
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
+
var childrenElement = function (element) {
|
|
248
|
+
if (element === undefined)
|
|
249
|
+
return '';
|
|
250
|
+
// if (typeof element === 'object') return '';
|
|
251
|
+
return element;
|
|
252
|
+
};
|
|
253
|
+
var validUnion = function (value, union) {
|
|
254
|
+
return union.includes(value) ? value : union[0];
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
var variantUnion$2 = [
|
|
258
|
+
'normal-text',
|
|
259
|
+
'large-text',
|
|
260
|
+
'large-text-semibold',
|
|
261
|
+
'medium-text',
|
|
262
|
+
'medium-text-semibold',
|
|
263
|
+
'caption',
|
|
264
|
+
'caption-semibold',
|
|
265
|
+
'normal-text-semilight',
|
|
266
|
+
'normal-text-semibold',
|
|
267
|
+
'normal-text-bold',
|
|
268
|
+
'small-text',
|
|
269
|
+
'small-text-semibold',
|
|
270
|
+
'tiny-text',
|
|
271
|
+
'tiny-text-bold',
|
|
272
|
+
'script',
|
|
273
|
+
'link',
|
|
274
|
+
];
|
|
247
275
|
function Text(_a) {
|
|
248
276
|
var _b = _a.extended, extended = _b === void 0 ? '' : _b, variant = _a.variant, children = _a.children;
|
|
249
|
-
|
|
277
|
+
var validatedVariant = validUnion(variant, variantUnion$2);
|
|
278
|
+
return (React.createElement("span", { className: "text ".concat(textClasses[validatedVariant], " ").concat(extended) }, childrenElement(children)));
|
|
250
279
|
}
|
|
251
280
|
Text.defaultProps = {
|
|
252
281
|
extended: '',
|
|
@@ -347,13 +376,13 @@ var radiusConfig = {
|
|
|
347
376
|
tn: 'rounded-radius-full focus-visible:rounded-radius-full',
|
|
348
377
|
},
|
|
349
378
|
};
|
|
350
|
-
var sizeConfig$
|
|
351
|
-
lg: 'py-[10.5px] px-[13px] h-[48px] flex items-center justify-center gap-[10px]',
|
|
352
|
-
md: ' px-[11px] py-[9px] h-[40px] flex items-center justify-center gap-[5px] ',
|
|
353
|
-
sm: 'px-[8px] py-[6px] h-[30px] flex items-center justify-center gap-[5px] ',
|
|
354
|
-
tn: 'px-[4px] py-[2px] h-[22px] flex items-center justify-center gap-[3px]',
|
|
379
|
+
var sizeConfig$b = {
|
|
380
|
+
lg: 'py-[10.5px] px-[13px] h-[48px] flex items-center justify-center gap-[10px] text-size-md',
|
|
381
|
+
md: ' px-[11px] py-[9px] h-[40px] flex items-center justify-center gap-[5px] text-size-base',
|
|
382
|
+
sm: 'px-[8px] py-[6px] h-[30px] flex items-center justify-center gap-[5px] text-size-sm',
|
|
383
|
+
tn: 'px-[4px] py-[2px] h-[22px] flex items-center justify-center gap-[3px] text-size-tiny',
|
|
355
384
|
};
|
|
356
|
-
var iconOnlySizeConfig = {
|
|
385
|
+
var iconOnlySizeConfig$1 = {
|
|
357
386
|
lg: 'p-[13px] flex items-center justify-center gap-[10px]',
|
|
358
387
|
md: ' p-[11px] flex items-center justify-center gap-[5px]',
|
|
359
388
|
sm: 'p-[8px] flex items-center justify-center gap-[5px] ',
|
|
@@ -378,12 +407,38 @@ var variantConfig$1 = {
|
|
|
378
407
|
'danger-outlined': "\n text-bia-red \n border-solid \n border \n border-bia-red \n bg-primary-white \n active:text-bia-red-dark-10 \n active:border-bia-red-active \n active:bg-bia-red-light-90 \n active:border-bia-red-disabled \n hover:text-bia-red-hover \n hover:border-bia-red-hover \n disabled:cursor-not-allowed \n disabled:border-[1px]\n disabled:border-bia-red-light-50 \n disabled:text-bia-red-light-50\n focus-visible:outline-none \n focus-visible:outline-offset-0 \n focus-visible:outline-[3px] \n focus-visible:rounded-md \n focus-visible:outline-bia-red-light-50 \n focus-visible:border-none \n \n ",
|
|
379
408
|
};
|
|
380
409
|
|
|
410
|
+
var variantUnion$1 = [
|
|
411
|
+
'default',
|
|
412
|
+
'danger',
|
|
413
|
+
'info',
|
|
414
|
+
'link',
|
|
415
|
+
'primary',
|
|
416
|
+
'subtle',
|
|
417
|
+
'subtle-link',
|
|
418
|
+
'success',
|
|
419
|
+
'warning',
|
|
420
|
+
'default-outlined',
|
|
421
|
+
'danger-outlined',
|
|
422
|
+
'info-outlined',
|
|
423
|
+
'primary-outlined',
|
|
424
|
+
'success-outlined',
|
|
425
|
+
'warning-outlined',
|
|
426
|
+
];
|
|
427
|
+
var radiusUnion = ['default', 'full-rounded'];
|
|
428
|
+
var sizeUnion$4 = ['md', 'lg', 'sm', 'tn'];
|
|
381
429
|
function Button(_a) {
|
|
382
|
-
var label = _a.label, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.radius, radius = _d === void 0 ? 'default' : _d, _e = _a.size, size = _e === void 0 ? 'md' : _e, _f = _a.variant, variant = _f === void 0 ? 'default' : _f, _g = _a.iconLeft, iconLeft = _g === void 0 ? null : _g, _h = _a.iconRight, iconRight = _h === void 0 ? null : _h, props = __rest(_a, ["label", "className", "disabled", "radius", "size", "variant", "iconLeft", "iconRight"]);
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
430
|
+
var label = _a.label, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.radius, radius = _d === void 0 ? 'default' : _d, _e = _a.size, size = _e === void 0 ? 'md' : _e, _f = _a.variant, variant = _f === void 0 ? 'default' : _f, _g = _a.iconLeft, iconLeft = _g === void 0 ? null : _g, _h = _a.iconRight, iconRight = _h === void 0 ? null : _h, _j = _a.left, left = _j === void 0 ? null : _j, _k = _a.right, right = _k === void 0 ? null : _k, props = __rest(_a, ["label", "className", "disabled", "radius", "size", "variant", "iconLeft", "iconRight", "left", "right"]);
|
|
431
|
+
var validatedVariant = validUnion(variant, variantUnion$1);
|
|
432
|
+
var validatedSize = validUnion(size, sizeUnion$4);
|
|
433
|
+
var validatedRadius = validUnion(radius, radiusUnion);
|
|
434
|
+
var sizeClass = label
|
|
435
|
+
? sizeConfig$b[validatedSize]
|
|
436
|
+
: iconOnlySizeConfig$1[validatedSize];
|
|
437
|
+
var classString = "\n ".concat(variantConfig$1[validatedVariant], " \n ").concat(sizeClass, " \n ").concat(radiusConfig[validatedRadius][validatedSize], " \n ").concat(className, "\n ");
|
|
438
|
+
return (React.createElement("button", __assign({ type: "button", className: "button flex justify-center items-center ".concat(classString), disabled: disabled }, props),
|
|
439
|
+
childrenElement(iconLeft || left),
|
|
440
|
+
childrenElement(label),
|
|
441
|
+
childrenElement(iconRight || right)));
|
|
387
442
|
}
|
|
388
443
|
Button.defaultProps = {
|
|
389
444
|
label: null,
|
|
@@ -394,6 +449,8 @@ Button.defaultProps = {
|
|
|
394
449
|
variant: 'default',
|
|
395
450
|
iconLeft: null,
|
|
396
451
|
iconRight: null,
|
|
452
|
+
left: null,
|
|
453
|
+
right: null,
|
|
397
454
|
};
|
|
398
455
|
|
|
399
456
|
var AvatarConfig = {
|
|
@@ -1419,7 +1476,7 @@ Divider.defaultProps = {
|
|
|
1419
1476
|
classname: '',
|
|
1420
1477
|
};
|
|
1421
1478
|
|
|
1422
|
-
var sizeConfig$
|
|
1479
|
+
var sizeConfig$a = {
|
|
1423
1480
|
md: {
|
|
1424
1481
|
fieldSize: 'text-size-base p-2.5 font-[350] h-10',
|
|
1425
1482
|
iconPosition: 'right-[10px]',
|
|
@@ -1453,7 +1510,7 @@ var styleConfig = {
|
|
|
1453
1510
|
function ValidationIcon(_a) {
|
|
1454
1511
|
var isValid = _a.isValid, iconSize = _a.iconSize;
|
|
1455
1512
|
if (isValid) {
|
|
1456
|
-
return (React.createElement(TbCheck
|
|
1513
|
+
return (React.createElement(TbCheck, { className: "text-bia-green", style: { fontSize: iconSize } }));
|
|
1457
1514
|
}
|
|
1458
1515
|
return React.createElement(TbX, { className: "text-bia-red", style: { fontSize: iconSize } });
|
|
1459
1516
|
}
|
|
@@ -1474,7 +1531,7 @@ function TextInput(_a) {
|
|
|
1474
1531
|
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 ? false : _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 ? '' : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l;
|
|
1475
1532
|
var _m = useState(false), isShow = _m[0], setIsShow = _m[1];
|
|
1476
1533
|
var _o = styleConfig[variant], fieldStyle = _o.fieldStyle, iconStyle = _o.iconStyle;
|
|
1477
|
-
var _p = sizeConfig$
|
|
1534
|
+
var _p = sizeConfig$a[size], iconSize = _p.iconSize, fieldSize = _p.fieldSize, iconPosition = _p.iconPosition;
|
|
1478
1535
|
var typeVariant = variant;
|
|
1479
1536
|
if (variant === 'password')
|
|
1480
1537
|
typeVariant = isShow ? 'text' : 'password';
|
|
@@ -1531,7 +1588,7 @@ TextInputSimulation.defaultProps = {
|
|
|
1531
1588
|
};
|
|
1532
1589
|
|
|
1533
1590
|
// Desc: Radio button size configuration
|
|
1534
|
-
var sizeConfig$
|
|
1591
|
+
var sizeConfig$9 = {
|
|
1535
1592
|
md: {
|
|
1536
1593
|
checkSize: 'w-[22px] h-[22px]',
|
|
1537
1594
|
labelSize: 'text-size-base',
|
|
@@ -1542,14 +1599,16 @@ var sizeConfig$8 = {
|
|
|
1542
1599
|
},
|
|
1543
1600
|
};
|
|
1544
1601
|
|
|
1602
|
+
var sizeUnion$3 = ['md', 'sm'];
|
|
1545
1603
|
function Radio(_a) {
|
|
1546
1604
|
var label = _a.label, _b = _a.size, size = _b === void 0 ? 'md' : _b, id = _a.id, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.checked, checked = _e === void 0 ? false : _e;
|
|
1547
|
-
var
|
|
1605
|
+
var validatedSize = validUnion(size, sizeUnion$3);
|
|
1606
|
+
var _f = sizeConfig$9[validatedSize], checkSize = _f.checkSize, labelSize = _f.labelSize;
|
|
1548
1607
|
return (React.createElement("div", { className: "flex items-center" },
|
|
1549
1608
|
React.createElement("div", { className: "bg-white rounded-full flex flex-shrink-0 justify-center items-center relative ".concat(checkSize) },
|
|
1550
1609
|
React.createElement("input", { id: id, "aria-labelledby": "label1", type: "radio", className: "peer checkbox box-content appearance-none focus:opacity-100 focus:ring-1 focus:ring-offset-2 checked:disabled:border-bia-blue-disabled focus:ring-bia-blue focus:outline-none rounded-full border-bia-coolgrey-light-50 checked:border-bia-blue hover:border-bia-blue-hover disabled:border-bia-grey-dark-10 border-2 absolute cursor-pointer w-full h-full", onClick: function (e) { return onClick(e); }, checked: checked, disabled: disabled }),
|
|
1551
1610
|
React.createElement("div", { className: "check-icon flex text-bia-grey group justify-center border-2 border-primary-white peer-disabled:bg-bia-grey-light-80 peer-disabled:border-transparent peer-disabled:peer-checked:border-primary-white peer-checked:peer-disabled:bg-bia-blue-disabled peer-checked:hover:border-bia-blue-hover peer-checked:bg-bia-blue peer-checked:peer-hover:bg-bia-blue-hover outline-2 peer-checked:hover:outline-bia-blue-hover outline-bia-blue rounded-full w-full h-full z-1" })),
|
|
1552
|
-
React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 font-[350] ".concat(labelSize), style: { color: disabled ? '#8C8CA6' : '#2f2f2f' } }, label)));
|
|
1611
|
+
React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 font-[350] ".concat(labelSize), style: { color: disabled ? '#8C8CA6' : '#2f2f2f' } }, childrenElement(label))));
|
|
1553
1612
|
}
|
|
1554
1613
|
Radio.defaultProps = {
|
|
1555
1614
|
label: '',
|
|
@@ -1560,7 +1619,7 @@ Radio.defaultProps = {
|
|
|
1560
1619
|
checked: false,
|
|
1561
1620
|
};
|
|
1562
1621
|
|
|
1563
|
-
var sizeConfig$
|
|
1622
|
+
var sizeConfig$8 = {
|
|
1564
1623
|
md: {
|
|
1565
1624
|
inputClass: 'text-size-base font-[350] min-h-10',
|
|
1566
1625
|
},
|
|
@@ -1572,7 +1631,7 @@ var sizeConfig$7 = {
|
|
|
1572
1631
|
function TextArea(_a) {
|
|
1573
1632
|
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, props = __rest(_a, ["descText", "disabled", "id", "size", "label", "placeholder", "required", "rows"]);
|
|
1574
1633
|
var inputRow = rows !== null && rows !== void 0 ? rows : 4;
|
|
1575
|
-
var inputClass = sizeConfig$
|
|
1634
|
+
var inputClass = sizeConfig$8[size].inputClass;
|
|
1576
1635
|
return (React.createElement("div", { className: "field-group w-full flex flex-col" },
|
|
1577
1636
|
React.createElement("label", { htmlFor: id, className: "label text-xs pb-2 font-semibold" },
|
|
1578
1637
|
label,
|
|
@@ -1592,7 +1651,7 @@ TextArea.defaultProps = {
|
|
|
1592
1651
|
rows: 4,
|
|
1593
1652
|
};
|
|
1594
1653
|
|
|
1595
|
-
var sizeConfig$
|
|
1654
|
+
var sizeConfig$7 = {
|
|
1596
1655
|
md: {
|
|
1597
1656
|
checkClass: 'w-[22px] h-[22px]',
|
|
1598
1657
|
labelClass: 'text-size-base font-[350]',
|
|
@@ -1603,16 +1662,17 @@ var sizeConfig$6 = {
|
|
|
1603
1662
|
},
|
|
1604
1663
|
};
|
|
1605
1664
|
|
|
1665
|
+
var sizeUnion$2 = ['md', 'sm'];
|
|
1606
1666
|
function Checkbox(_a) {
|
|
1607
1667
|
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, _d = _a.checked, checked = _d === void 0 ? false : _d, label = _a.label, _e = _a.onChange, onChange = _e === void 0 ? function () { } : _e, value = _a.value;
|
|
1608
|
-
var _f = sizeConfig$
|
|
1668
|
+
var _f = sizeConfig$7[validUnion(size, sizeUnion$2)], checkClass = _f.checkClass, labelClass = _f.labelClass;
|
|
1609
1669
|
return (React.createElement("div", { className: "flex items-center" },
|
|
1610
1670
|
React.createElement("div", { className: "bg-white rounded-full flex flex-shrink-0 justify-center items-center relative ".concat(checkClass) },
|
|
1611
1671
|
React.createElement("input", { id: id, type: "checkbox", className: "peer checkbox box-content appearance-none focus-visible:opacity-100 focus-visible:ring-1 focus-visible:ring-offset-2 focus-visible:ring-bia-blue focus-visible:outline-none rounded-full border-bia-coolgrey-light-50 checked:border-bia-blue disabled:border-bia-coolgrey-light-50 hover:border-bia-blue-hover disabled:checked:border-bia-blue-light-50 border-2 absolute cursor-pointer w-full h-full", checked: checked, onChange: function (e) { return onChange(e); }, disabled: disabled, value: value }),
|
|
1612
1672
|
React.createElement("div", { className: "check-icon flex text-bia-grey group justify-center peer-checked:border-2 peer-checked:border-primary-white peer-checked:hover:border-bia-blue-hover peer-checked:bg-bia-blue peer-checked:peer-hover:bg-bia-blue-hover outline-2 peer-checked:hover:outline-bia-blue-hover outline-bia-blue peer-disabled:bg-bia-grey-light-80 peer-disabled:peer-checked:outline-bia-blue-light-50 peer-disabled:peer-checked:bg-bia-blue-light-50 rounded-full w-full h-full z-1" },
|
|
1613
1673
|
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: " fill-bia-grey-dark-10 peer-checked:group-[]:fill-primary-white peer-checked:peer-hover:group-[]:fill-primary-white peer-hover:group-[]:fill-bia-blue-hover peer-disabled:group-[]:fill-bia-grey-dark-10 peer-disabled:peer-checked:group-[]:fill-primary-white", viewBox: "-5 -7 24 24", width: "24" },
|
|
1614
1674
|
React.createElement("path", { d: "M5.486 9.73a.997.997 0 0 1-.707-.292L.537 5.195A1 1 0 1 1 1.95 3.78l3.535 3.535L11.85.952a1 1 0 0 1 1.415 1.414L6.193 9.438a.997.997 0 0 1-.707.292z" })))),
|
|
1615
|
-
React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 text-grey-800 ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, label)));
|
|
1675
|
+
React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 text-grey-800 ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, childrenElement(label))));
|
|
1616
1676
|
}
|
|
1617
1677
|
Checkbox.defaultProps = {
|
|
1618
1678
|
disabled: false,
|
|
@@ -1658,7 +1718,7 @@ CheckboxSimulation.defaultProps = {
|
|
|
1658
1718
|
size: 'md',
|
|
1659
1719
|
};
|
|
1660
1720
|
|
|
1661
|
-
var sizeConfig$
|
|
1721
|
+
var sizeConfig$6 = {
|
|
1662
1722
|
md: {
|
|
1663
1723
|
searchSize: 'text-size-base p-2.5 font-[350] h-10',
|
|
1664
1724
|
iconSize: 'right-[10px]',
|
|
@@ -1669,7 +1729,7 @@ var sizeConfig$5 = {
|
|
|
1669
1729
|
},
|
|
1670
1730
|
};
|
|
1671
1731
|
|
|
1672
|
-
var sizeConfig$
|
|
1732
|
+
var sizeConfig$5 = {
|
|
1673
1733
|
md: {
|
|
1674
1734
|
container: 'text-size-base font-[350] py-[3px] first:pt-[8px] last:pb-[8px]',
|
|
1675
1735
|
item: 'min-h-[34px] p-2.5',
|
|
@@ -1687,7 +1747,7 @@ function DefaultDropdownItem(_a) {
|
|
|
1687
1747
|
var _g = useState(false), isHoveredSubMenu = _g[0], setIsHoveredSubMenu = _g[1];
|
|
1688
1748
|
var isOpenDropdown = isHovered || isHoveredSubMenu;
|
|
1689
1749
|
var selectedClass = isSelected ? 'font-semibold' : 'font-normal';
|
|
1690
|
-
var _h = sizeConfig$
|
|
1750
|
+
var _h = sizeConfig$5[size], containerClass = _h.container, item = _h.item;
|
|
1691
1751
|
var itemClass = "".concat(item, " ").concat(selectedClass, " ").concat(className);
|
|
1692
1752
|
var isExistSubDropdown = options.length !== 0;
|
|
1693
1753
|
return (React.createElement("div", { className: "w-full relative focus-visible:outline-bia-blue-light-50 ".concat(containerClass), tabIndex: 0, role: "button", onClick: function (e) { return onClick(e); }, onMouseEnter: function () { return setisHovered(true); }, onMouseLeave: function () { return setisHovered(false); }, onKeyDown: function () { } },
|
|
@@ -1705,10 +1765,12 @@ DefaultDropdownItem.defaultProps = {
|
|
|
1705
1765
|
};
|
|
1706
1766
|
|
|
1707
1767
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1768
|
+
var sizeUnion$1 = ['md', 'sm'];
|
|
1708
1769
|
function SelectInput(_a) {
|
|
1709
1770
|
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, id = _a.id, label = _a.label, options = _a.options, _d = _a.required, required = _d === void 0 ? false : _d, selected = _a.selected, setSelected = _a.setSelected;
|
|
1710
1771
|
var _e = useState(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
1711
|
-
var
|
|
1772
|
+
var validatedSize = validUnion(size, sizeUnion$1);
|
|
1773
|
+
var _f = sizeConfig$6[validatedSize], searchSize = _f.searchSize, iconSize = _f.iconSize;
|
|
1712
1774
|
var inputRef = useRef(null);
|
|
1713
1775
|
var handleOutsideClick = function (e) {
|
|
1714
1776
|
if (inputRef.current && !inputRef.current.contains(e.target)) {
|
|
@@ -1723,14 +1785,14 @@ function SelectInput(_a) {
|
|
|
1723
1785
|
});
|
|
1724
1786
|
return (React.createElement("div", { className: "field-group w-full flex flex-col", ref: inputRef },
|
|
1725
1787
|
React.createElement("label", { htmlFor: id, className: "label text-xs pb-2 font-semibold" },
|
|
1726
|
-
label,
|
|
1788
|
+
childrenElement(label),
|
|
1727
1789
|
required && React.createElement("span", { className: "p-1 text-bia-red" }, "*")),
|
|
1728
1790
|
React.createElement("div", { className: "group w-full relative" },
|
|
1729
1791
|
React.createElement("input", { className: "field bg-primary-white disabled:bg-bia-grey-light-80 pe-8 w-full border border-bia-grey-dark-10 enabled:hover:border-b-bia-blue enabled:hover:rounded-b-none enabled:focus:border-b-bia-blue enabled:focus:rounded-b-none focus-visible:outline-none cursor-pointer rounded disabled:text-bia-coolgrey peer ".concat(searchSize), onClick: function () { return setIsOpen(!isOpen); }, value: selected === null || selected === void 0 ? void 0 : selected.label, readOnly: true, id: id, disabled: disabled }),
|
|
1730
1792
|
React.createElement("div", { className: "absolute inset-y-0 pl-3 flex items-center pointer-events-none text-bia-coolgrey peer-disabled:text-bia-coolgrey-light-50 ".concat(iconSize) }, isOpen ? (React.createElement(TbChevronUp, { className: "" })) : (React.createElement(TbChevronDown, { className: "" }))),
|
|
1731
1793
|
isOpen && (React.createElement("div", { className: "absolute border w-full bg-primary-white border-bia-grey-dark-10 rounded-b-md shadow-lg z-10" }, options.map(function (option) {
|
|
1732
1794
|
var isSelected = selected && selected.id && option.id === selected.id;
|
|
1733
|
-
return (React.createElement(DefaultDropdownItem, { label: option.label, size:
|
|
1795
|
+
return (React.createElement(DefaultDropdownItem, { label: option.label, size: validatedSize, isSelected: isSelected, onClick: function () {
|
|
1734
1796
|
setSelected(option);
|
|
1735
1797
|
setIsOpen(false);
|
|
1736
1798
|
} }));
|
|
@@ -1779,7 +1841,7 @@ function SelectInputSimulation(_a) {
|
|
|
1779
1841
|
return (React.createElement(SelectInput, { label: "Input Select", descText: "Deskripsi Input Select", options: optionData, selected: selected, setSelected: setSelected, size: size, id: "demo-id" }));
|
|
1780
1842
|
}
|
|
1781
1843
|
|
|
1782
|
-
var sizeConfig$
|
|
1844
|
+
var sizeConfig$4 = {
|
|
1783
1845
|
md: {
|
|
1784
1846
|
iconClass: 'right-[10px]',
|
|
1785
1847
|
iconSize: '18',
|
|
@@ -1798,7 +1860,7 @@ var sizeConfig$3 = {
|
|
|
1798
1860
|
function LiveSearch(_a) {
|
|
1799
1861
|
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, placeholder = _a.placeholder, _d = _a.required, required = _d === void 0 ? false : _d, options = _a.options, setValue = _a.setValue, value = _a.value;
|
|
1800
1862
|
var _e = useState(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
1801
|
-
var _f = sizeConfig$
|
|
1863
|
+
var _f = sizeConfig$4[size], iconClass = _f.iconClass, iconSize = _f.iconSize, inputClass = _f.inputClass;
|
|
1802
1864
|
var inputRef = useRef(null);
|
|
1803
1865
|
var handleOutsideClick = function (e) {
|
|
1804
1866
|
if (inputRef.current && !inputRef.current.contains(e.target)) {
|
|
@@ -1844,7 +1906,7 @@ LiveSearch.defaultProps = {
|
|
|
1844
1906
|
value: {},
|
|
1845
1907
|
};
|
|
1846
1908
|
|
|
1847
|
-
var sizeConfig$
|
|
1909
|
+
var sizeConfig$3 = {
|
|
1848
1910
|
md: {
|
|
1849
1911
|
containerSize: 'w-[42px] h-[22px]',
|
|
1850
1912
|
checkSize: 'p-2',
|
|
@@ -1859,7 +1921,7 @@ var sizeConfig$2 = {
|
|
|
1859
1921
|
|
|
1860
1922
|
function Toggle(_a) {
|
|
1861
1923
|
var _b = _a.label, label = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.checked, checked = _e === void 0 ? false : _e, _f = _a.id, id = _f === void 0 ? '' : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g;
|
|
1862
|
-
var _h = sizeConfig$
|
|
1924
|
+
var _h = sizeConfig$3[size], containerSize = _h.containerSize, checkSize = _h.checkSize, labelClass = _h.labelClass;
|
|
1863
1925
|
return (React.createElement("div", { className: "flex items-center" },
|
|
1864
1926
|
React.createElement("div", { className: "".concat(containerSize, " rounded-full py-[2px] flex flex-shrink-0 ").concat(checked ? 'justify-end' : 'justify-start', " items-center relative cursor-pointer"), onClick: onClick, onKeyDown: function () { }, role: "checkbox", tabIndex: 0, "aria-checked": checked },
|
|
1865
1927
|
React.createElement("input", { id: id, checked: checked, disabled: disabled, className: "".concat(checkSize, " peer checkbox appearance-none opacity-100 focus:ring-1 focus:ring-offset-2 focus:ring-bia-blue focus:outline-none rounded-full border-bia-grey checked:border-bia-blue bg-primary-white checked:bg-bia-blue checked:hover:bg-bia-blue-hover cursor-pointer hover:border-bia-blue-hover peer-hover:border-bia-blue-hover disabled:bg-bia-grey-light-80 disabled:checked:bg-bia-blue-light-50 disabled:border-none border-2 absolute w-full h-full"), type: "checkbox" }),
|
|
@@ -1885,7 +1947,7 @@ var roundedConfig = {
|
|
|
1885
1947
|
sm: 'first:rounded-l-radius-sm last:rounded-r-radius-lg',
|
|
1886
1948
|
tn: 'first:rounded-l-radius-tn last:rounded-r-radius-tn',
|
|
1887
1949
|
};
|
|
1888
|
-
var sizeConfig$
|
|
1950
|
+
var sizeConfig$2 = {
|
|
1889
1951
|
lg: 'text-size-md leading-[23.94px] px-[13px] py-[10.5px]',
|
|
1890
1952
|
md: 'text-size-base leading-[21px] px-[11px] py-[9px]',
|
|
1891
1953
|
sm: 'text-size-sm leading-[15.96px] px-[7px] py-[5px]',
|
|
@@ -1895,7 +1957,7 @@ var sizeConfig$1 = {
|
|
|
1895
1957
|
function SegmentButtonItem(_a) {
|
|
1896
1958
|
var _b = _a.selected, selected = _b === void 0 ? false : _b, size = _a.size, children = _a.children, disabled = _a.disabled, onClick = _a.onClick;
|
|
1897
1959
|
var isSelected = selected ? 'selected' : 'notSelected';
|
|
1898
|
-
return (React.createElement("button", { type: "button", onClick: onClick, disabled: disabled, className: "focus-visible:z-50 focus-visible:outline focus-visible:-outline-offset-1 focus-visible:outline-[3px] focus-visible:outline-bia-blue-light-50 border-[1px] border-l-0 first:border-l-[1px] border-bia-grey-dark-10 group:last:border-l-0 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-dark-10 disabled:cursor-not-allowed ".concat(isSelectedConfig[isSelected], " ").concat(roundedConfig[size], " ").concat(sizeConfig$
|
|
1960
|
+
return (React.createElement("button", { type: "button", onClick: onClick, disabled: disabled, className: "focus-visible:z-50 focus-visible:outline focus-visible:-outline-offset-1 focus-visible:outline-[3px] focus-visible:outline-bia-blue-light-50 border-[1px] border-l-0 first:border-l-[1px] border-bia-grey-dark-10 group:last:border-l-0 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-dark-10 disabled:cursor-not-allowed ".concat(isSelectedConfig[isSelected], " ").concat(roundedConfig[size], " ").concat(sizeConfig$2[size]) }, children));
|
|
1899
1961
|
}
|
|
1900
1962
|
|
|
1901
1963
|
function SegmentButtonGroup(_a) {
|
|
@@ -1938,7 +2000,7 @@ function SegmentButtonSimulation(_a) {
|
|
|
1938
2000
|
return (React.createElement(SegmentButtonItem, { selected: activeButton === index, size: size, disabled: disabled, onClick: function () { return handleClick(index); } },
|
|
1939
2001
|
React.createElement("div", { className: "flex items-center justify-center" },
|
|
1940
2002
|
React.createElement("div", { className: "mt-[1px] mr-[5px]" },
|
|
1941
|
-
React.createElement(TbCheck
|
|
2003
|
+
React.createElement(TbCheck, null)),
|
|
1942
2004
|
content)));
|
|
1943
2005
|
})));
|
|
1944
2006
|
}
|
|
@@ -1980,7 +2042,7 @@ Modal.defaultProps = {
|
|
|
1980
2042
|
title: null,
|
|
1981
2043
|
};
|
|
1982
2044
|
|
|
1983
|
-
var sizeConfig = {
|
|
2045
|
+
var sizeConfig$1 = {
|
|
1984
2046
|
md: 'w-[38px] h-[40px] text-[14px] font-semibold',
|
|
1985
2047
|
sm: 'w-[29px] h-[30px] mt-1 text-[12px] font-normal',
|
|
1986
2048
|
};
|
|
@@ -2030,7 +2092,7 @@ function PaginationBar(_a) {
|
|
|
2030
2092
|
};
|
|
2031
2093
|
return (React.createElement("div", { className: "flex w-screen max-w-4xl ".concat(positionConfig[position], " gap-[5px]") },
|
|
2032
2094
|
React.createElement(Button, { variant: "subtle-link", size: "md", type: "button", onClick: function () { return handlePageChange(currentPage - 1); }, className: "cursor-pointer", iconLeft: leftArrow }),
|
|
2033
|
-
showedPages.map(function (page) { return (React.createElement(Button, { key: page, variant: currentPage === page ? 'default' : 'subtle-link', size: "md", type: "button", onClick: function () { return handlePageChange(page); }, className: "cursor-pointer ".concat(sizeConfig[size]), label: page.toString() })); }),
|
|
2095
|
+
showedPages.map(function (page) { return (React.createElement(Button, { key: page, variant: currentPage === page ? 'default' : 'subtle-link', size: "md", type: "button", onClick: function () { return handlePageChange(page); }, className: "cursor-pointer ".concat(sizeConfig$1[size]), label: page.toString() })); }),
|
|
2034
2096
|
React.createElement(Button, { variant: "subtle-link", size: "md", type: "button", onClick: function () { return handlePageChange(currentPage + 1); }, className: "cursor-pointer", iconLeft: rightArrow })));
|
|
2035
2097
|
}
|
|
2036
2098
|
|
|
@@ -2120,7 +2182,7 @@ Popover.defaultProps = {
|
|
|
2120
2182
|
var config = {
|
|
2121
2183
|
success: {
|
|
2122
2184
|
container: 'border-bia-green',
|
|
2123
|
-
content: React.createElement(TbCheck
|
|
2185
|
+
content: React.createElement(TbCheck, { className: "text-[38px] text-bia-green" }),
|
|
2124
2186
|
},
|
|
2125
2187
|
failed: {
|
|
2126
2188
|
container: 'border-bia-red',
|
|
@@ -2408,816 +2470,99 @@ TableDemo.defaultProps = {
|
|
|
2408
2470
|
tableSize: 'md',
|
|
2409
2471
|
};
|
|
2410
2472
|
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
function TbCheckBlackSmall() {
|
|
2422
|
-
return (React.createElement("svg", { width: "8", height: "6", viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2423
|
-
React.createElement("path", { d: "M3.11607 5.75906C3.0395 5.75922 2.96365 5.74425 2.89288 5.71502C2.82211 5.68579 2.7578 5.64287 2.70366 5.58873L0.229157 3.11365C0.173406 3.05988 0.128922 2.99554 0.0983007 2.92439C0.0676795 2.85325 0.0515342 2.77671 0.050807 2.69926C0.0500797 2.62181 0.064785 2.54498 0.0940648 2.47327C0.123345 2.40156 0.166613 2.3364 0.221344 2.28159C0.276076 2.22679 0.341175 2.18343 0.412843 2.15404C0.484511 2.12466 0.561312 2.10985 0.638767 2.11047C0.716221 2.11108 0.792777 2.12712 0.863967 2.15764C0.935157 2.18816 0.999557 2.23256 1.05341 2.28823L3.11549 4.35031L6.82841 0.638564C6.93779 0.529107 7.08617 0.467584 7.24091 0.467529C7.39565 0.467475 7.54408 0.528893 7.65353 0.638272C7.76299 0.747652 7.82451 0.896034 7.82457 1.05077C7.82462 1.20552 7.7632 1.35394 7.65382 1.4634L3.52849 5.58873C3.47434 5.64287 3.41004 5.68579 3.33927 5.71502C3.26849 5.74425 3.19265 5.75922 3.11607 5.75906Z", fill: "#2F2F2F" })));
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
function TbCloseAbleBlack(_a) {
|
|
2427
|
-
var color = _a.color;
|
|
2428
|
-
return (React.createElement("svg", { width: "18.1", height: "18.1", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2429
|
-
React.createElement("rect", { width: "18", height: "18", rx: "9", fill: "#DADEEB" }),
|
|
2430
|
-
React.createElement("rect", { width: "18", height: "18", rx: "9", fill: "black", fillOpacity: "0.3" }),
|
|
2431
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.9118 5.91256C13.1396 5.68475 13.1396 5.31541 12.9118 5.0876C12.684 4.8598 12.3147 4.8598 12.0869 5.0876L8.99935 8.17512L5.91183 5.0876C5.68402 4.8598 5.31468 4.8598 5.08687 5.0876C4.85906 5.31541 4.85906 5.68475 5.08687 5.91256L8.17439 9.00008L5.08687 12.0876C4.85906 12.3154 4.85906 12.6848 5.08687 12.9126C5.31468 13.1404 5.68402 13.1404 5.91183 12.9126L8.99935 9.82504L12.0869 12.9126C12.3147 13.1404 12.684 13.1404 12.9118 12.9126C13.1396 12.6848 13.1396 12.3154 12.9118 12.0876L9.82431 9.00008L12.9118 5.91256Z", fill: color })));
|
|
2432
|
-
}
|
|
2433
|
-
|
|
2434
|
-
function TbCheckWhiteSmall() {
|
|
2435
|
-
return (React.createElement("svg", { width: "8", height: "6", viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2436
|
-
React.createElement("path", { d: "M3.11607 5.75906C3.0395 5.75922 2.96365 5.74425 2.89288 5.71502C2.82211 5.68579 2.7578 5.64287 2.70366 5.58873L0.229157 3.11365C0.173406 3.05988 0.128922 2.99554 0.0983007 2.92439C0.0676795 2.85325 0.0515342 2.77671 0.050807 2.69926C0.0500797 2.62181 0.064785 2.54498 0.0940648 2.47327C0.123345 2.40156 0.166613 2.3364 0.221344 2.28159C0.276076 2.22679 0.341175 2.18343 0.412843 2.15404C0.484511 2.12466 0.561312 2.10985 0.638767 2.11047C0.716221 2.11108 0.792777 2.12712 0.863967 2.15764C0.935157 2.18816 0.999557 2.23256 1.05341 2.28823L3.11549 4.35031L6.82841 0.638564C6.93779 0.529107 7.08617 0.467584 7.24091 0.467529C7.39565 0.467475 7.54408 0.528893 7.65353 0.638272C7.76299 0.747652 7.82451 0.896034 7.82457 1.05077C7.82462 1.20552 7.7632 1.35394 7.65382 1.4634L3.52849 5.58873C3.47434 5.64287 3.41004 5.68579 3.33927 5.71502C3.26849 5.74425 3.19265 5.75922 3.11607 5.75906Z", fill: "white" })));
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
function TbCloseAbleBlackSmall() {
|
|
2440
|
-
return (React.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2441
|
-
React.createElement("rect", { width: "12", height: "12", rx: "6", fill: "#DADEEB" }),
|
|
2442
|
-
React.createElement("rect", { width: "12", height: "12", rx: "6", fill: "black", fillOpacity: "0.3" }),
|
|
2443
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.60984 3.94171C8.76171 3.78984 8.76171 3.54361 8.60984 3.39173C8.45797 3.23986 8.21174 3.23986 8.05987 3.39173L6.00152 5.45008L3.94317 3.39173C3.7913 3.23986 3.54507 3.23986 3.3932 3.39173C3.24133 3.54361 3.24133 3.78984 3.3932 3.94171L5.45155 6.00005L3.3932 8.0584C3.24133 8.21027 3.24133 8.4565 3.3932 8.60837C3.54507 8.76024 3.7913 8.76024 3.94317 8.60837L6.00152 6.55003L8.05987 8.60837C8.21174 8.76024 8.45797 8.76024 8.60984 8.60837C8.76171 8.4565 8.76171 8.21027 8.60984 8.0584L6.55149 6.00005L8.60984 3.94171Z", fill: "white" })));
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
function TbCloseAbleWhiteSmall(_a) {
|
|
2447
|
-
var color = _a.color;
|
|
2448
|
-
return (React.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2449
|
-
React.createElement("rect", { width: "12", height: "12", rx: "6", fill: "white", fillOpacity: "0.5" }),
|
|
2450
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.60984 3.94171C8.76171 3.78984 8.76171 3.54361 8.60984 3.39174C8.45797 3.23986 8.21174 3.23986 8.05987 3.39174L6.00152 5.45008L3.94317 3.39174C3.7913 3.23986 3.54507 3.23986 3.3932 3.39174C3.24133 3.54361 3.24133 3.78984 3.3932 3.94171L5.45155 6.00005L3.3932 8.0584C3.24133 8.21027 3.24133 8.4565 3.3932 8.60837C3.54507 8.76024 3.7913 8.76024 3.94317 8.60837L6.00152 6.55003L8.05987 8.60837C8.21174 8.76024 8.45797 8.76024 8.60984 8.60837C8.76171 8.4565 8.76171 8.21027 8.60984 8.0584L6.55149 6.00005L8.60984 3.94171Z", fill: color })));
|
|
2451
|
-
}
|
|
2452
|
-
|
|
2453
|
-
function TbCloseAbleGraySmall() {
|
|
2454
|
-
return (React.createElement("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2455
|
-
React.createElement("rect", { width: "12", height: "12", rx: "6", fill: "#DADEEB" }),
|
|
2456
|
-
React.createElement("rect", { width: "12", height: "12", rx: "6", fill: "black", fillOpacity: "0.3" }),
|
|
2457
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.60984 3.94171C8.76171 3.78984 8.76171 3.54361 8.60984 3.39173C8.45797 3.23986 8.21174 3.23986 8.05987 3.39173L6.00152 5.45008L3.94317 3.39173C3.7913 3.23986 3.54507 3.23986 3.3932 3.39173C3.24133 3.54361 3.24133 3.78984 3.3932 3.94171L5.45155 6.00005L3.3932 8.0584C3.24133 8.21027 3.24133 8.4565 3.3932 8.60837C3.54507 8.76024 3.7913 8.76024 3.94317 8.60837L6.00152 6.55003L8.05987 8.60837C8.21174 8.76024 8.45797 8.76024 8.60984 8.60837C8.76171 8.4565 8.76171 8.21027 8.60984 8.0584L6.55149 6.00005L8.60984 3.94171Z", fill: "white" })));
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
function TbCloseable(_a) {
|
|
2461
|
-
var color = _a.color;
|
|
2462
|
-
return (React.createElement("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
2463
|
-
React.createElement("rect", { width: "18", height: "18", rx: "9", fill: "white", fillOpacity: "0.5" }),
|
|
2464
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.9118 5.91256C13.1396 5.68475 13.1396 5.31541 12.9118 5.0876C12.684 4.8598 12.3147 4.8598 12.0869 5.0876L8.99935 8.17512L5.91183 5.0876C5.68402 4.8598 5.31468 4.8598 5.08687 5.0876C4.85906 5.31541 4.85906 5.68475 5.08687 5.91256L8.17439 9.00008L5.08687 12.0876C4.85906 12.3154 4.85906 12.6848 5.08687 12.9126C5.31468 13.1404 5.68402 13.1404 5.91183 12.9126L8.99935 9.82504L12.0869 12.9126C12.3147 13.1404 12.684 13.1404 12.9118 12.9126C13.1396 12.6848 13.1396 12.3154 12.9118 12.0876L9.82431 9.00008L12.9118 5.91256Z", fill: color })));
|
|
2465
|
-
}
|
|
2466
|
-
|
|
2467
|
-
var TagLabelConfig = {
|
|
2468
|
-
default: {
|
|
2469
|
-
md: {
|
|
2470
|
-
iconColor: 'text-white',
|
|
2471
|
-
XColor: 'text-bia-coolgrey',
|
|
2472
|
-
XcolorV: 'text-primary-black',
|
|
2473
|
-
label: {
|
|
2474
|
-
bg: 'bg-bia-grey-light-50',
|
|
2475
|
-
text: 'text-[#2F2F2F] font-normal text-[14px] leading-[18px]',
|
|
2476
|
-
padding: 'px-[10px] py-[7px] ',
|
|
2477
|
-
radius: 'rounded-[50px]',
|
|
2478
|
-
Xicon: '',
|
|
2479
|
-
},
|
|
2480
|
-
closeable: {
|
|
2481
|
-
bg: 'bg-bia-grey-light-50',
|
|
2482
|
-
text: 'text-[#2F2F2F] font-normal text-[14px] leading-[18px]',
|
|
2483
|
-
padding: 'px-[10px] py-[7px] ',
|
|
2484
|
-
radius: 'rounded-[50px]',
|
|
2485
|
-
Xicon: TbCloseAbleBlack,
|
|
2486
|
-
},
|
|
2487
|
-
icon: {
|
|
2488
|
-
bg: 'bg-bia-grey-light-50',
|
|
2489
|
-
text: 'text-[#2F2F2F] text-[18.67px]',
|
|
2490
|
-
padding: 'p-[7px] ',
|
|
2491
|
-
radius: 'rounded-[50px]',
|
|
2492
|
-
Xicon: TbCheckBlack,
|
|
2493
|
-
},
|
|
2494
|
-
},
|
|
2495
|
-
sm: {
|
|
2496
|
-
iconColor: 'text-white',
|
|
2497
|
-
XColor: 'text-bia-coolgrey',
|
|
2498
|
-
XcolorV: 'text-primary-black',
|
|
2499
|
-
label: {
|
|
2500
|
-
bg: "bg-bia-grey-light-50",
|
|
2501
|
-
text: "text-[#2F2F2F] font-normal text-[12px] leading-[15.96px]",
|
|
2502
|
-
padding: "px-[10px] py-[5px] ",
|
|
2503
|
-
radius: "rounded-[12px]",
|
|
2504
|
-
Xicon: '',
|
|
2505
|
-
},
|
|
2506
|
-
closeable: {
|
|
2507
|
-
bg: "bg-bia-grey-light-50",
|
|
2508
|
-
text: "text-[#2F2F2F] font-normal text-[12px] leading-[15.96px]",
|
|
2509
|
-
padding: "px-[10px] py-[2px]",
|
|
2510
|
-
radius: "rounded-[12px]",
|
|
2511
|
-
Xicon: TbCloseAbleBlackSmall,
|
|
2512
|
-
},
|
|
2513
|
-
icon: {
|
|
2514
|
-
bg: "bg-bia-grey-light-50",
|
|
2515
|
-
text: "text-[#2F2F2F] text-[13.06px]",
|
|
2516
|
-
padding: "p-[4px]",
|
|
2517
|
-
radius: "rounded-[12px]",
|
|
2518
|
-
Xicon: TbCheckBlackSmall,
|
|
2519
|
-
},
|
|
2520
|
-
},
|
|
2521
|
-
tn: {
|
|
2522
|
-
iconColor: 'text-white',
|
|
2523
|
-
XColor: 'text-bia-coolgrey',
|
|
2524
|
-
XcolorV: 'text-primary-black',
|
|
2525
|
-
label: {
|
|
2526
|
-
bg: "bg-bia-grey-light-50",
|
|
2527
|
-
text: "text-[#2F2F2F] font-normal text-[12px] leading-[13px]",
|
|
2528
|
-
padding: "px-[8px] py-[2px]",
|
|
2529
|
-
radius: "rounded-[12px]",
|
|
2530
|
-
Xicon: '',
|
|
2531
|
-
},
|
|
2532
|
-
closeable: {
|
|
2533
|
-
bg: "bg-bia-grey-light-50",
|
|
2534
|
-
text: "text-[#2F2F2F] font-normal text-[12px] leading-[13px]",
|
|
2535
|
-
padding: "px-[8px] py-[2px]",
|
|
2536
|
-
radius: "rounded-[12px]",
|
|
2537
|
-
Xicon: TbCloseAbleBlackSmall,
|
|
2538
|
-
},
|
|
2539
|
-
icon: {
|
|
2540
|
-
bg: "bg-bia-grey-light-50",
|
|
2541
|
-
text: "text-[#2F2F2F] text-[11.2px]",
|
|
2542
|
-
padding: "p-[3px]",
|
|
2543
|
-
radius: "rounded-[12px]",
|
|
2544
|
-
Xicon: TbCheckBlackSmall,
|
|
2545
|
-
},
|
|
2546
|
-
},
|
|
2547
|
-
},
|
|
2548
|
-
blue: {
|
|
2549
|
-
md: {
|
|
2550
|
-
iconColor: 'text-bia-blue',
|
|
2551
|
-
XColor: 'text-bia-blue-light-50',
|
|
2552
|
-
XcolorV: 'text-white',
|
|
2553
|
-
label: {
|
|
2554
|
-
bg: "bg-bia-blue",
|
|
2555
|
-
text: "text-[#FFFFFF] font-normal text-[14px] leading-[18px]",
|
|
2556
|
-
padding: "px-[10px] py-[7px] ",
|
|
2557
|
-
radius: "rounded-[50px]",
|
|
2558
|
-
Xicon: '',
|
|
2559
|
-
},
|
|
2560
|
-
closeable: {
|
|
2561
|
-
bg: "bg-bia-blue",
|
|
2562
|
-
text: "text-[#FFFFFF] font-normal text-[14px] leading-[18px]",
|
|
2563
|
-
padding: "px-[10px] py-[7px] ",
|
|
2564
|
-
radius: "rounded-[50px]",
|
|
2565
|
-
Xicon: TbCloseable,
|
|
2566
|
-
},
|
|
2567
|
-
icon: {
|
|
2568
|
-
bg: "bg-bia-blue",
|
|
2569
|
-
text: "text-[#FFFFFF] text-[18.67px]",
|
|
2570
|
-
padding: "p-[7px] ",
|
|
2571
|
-
radius: "rounded-[50px]",
|
|
2572
|
-
Xicon: TbCheck,
|
|
2573
|
-
},
|
|
2574
|
-
},
|
|
2575
|
-
sm: {
|
|
2576
|
-
iconColor: 'text-bia-blue',
|
|
2577
|
-
XColor: 'text-white',
|
|
2578
|
-
XcolorV: 'text-white',
|
|
2579
|
-
label: {
|
|
2580
|
-
bg: "bg-bia-blue",
|
|
2581
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2582
|
-
padding: "px-[10px] py-[2px]",
|
|
2583
|
-
radius: "rounded-[12px]",
|
|
2584
|
-
Xicon: '',
|
|
2585
|
-
},
|
|
2586
|
-
closeable: {
|
|
2587
|
-
bg: "bg-bia-blue",
|
|
2588
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2589
|
-
padding: "px-[10px] py-[2px] ",
|
|
2590
|
-
radius: "rounded-[12px]",
|
|
2591
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2592
|
-
},
|
|
2593
|
-
icon: {
|
|
2594
|
-
bg: "bg-bia-blue",
|
|
2595
|
-
text: "text-[#FFF] text-[13.06px]",
|
|
2596
|
-
padding: "p-[4px] ",
|
|
2597
|
-
radius: "rounded-[12px]",
|
|
2598
|
-
Xicon: TbCheckWhiteSmall,
|
|
2599
|
-
},
|
|
2600
|
-
},
|
|
2601
|
-
tn: {
|
|
2602
|
-
iconColor: 'text-bia-blue',
|
|
2603
|
-
XColor: 'text-white',
|
|
2604
|
-
XcolorV: 'text-white',
|
|
2605
|
-
label: {
|
|
2606
|
-
bg: "bg-bia-blue",
|
|
2607
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2608
|
-
padding: "px-[8px] py-[2px]",
|
|
2609
|
-
radius: "rounded-[12px]",
|
|
2610
|
-
Xicon: '',
|
|
2611
|
-
},
|
|
2612
|
-
closeable: {
|
|
2613
|
-
bg: "bg-bia-blue",
|
|
2614
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2615
|
-
padding: "px-[8px] py-[2px]",
|
|
2616
|
-
radius: "rounded-[12px]",
|
|
2617
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2618
|
-
},
|
|
2619
|
-
icon: {
|
|
2620
|
-
bg: "bg-bia-blue",
|
|
2621
|
-
text: "text-[#FFF] text-[13.06px]",
|
|
2622
|
-
padding: "p-[3px]",
|
|
2623
|
-
radius: "rounded-[12px]",
|
|
2624
|
-
Xicon: TbCheckWhiteSmall,
|
|
2625
|
-
},
|
|
2626
|
-
},
|
|
2627
|
-
},
|
|
2628
|
-
teal: {
|
|
2629
|
-
md: {
|
|
2630
|
-
iconColor: 'text-bia-teal',
|
|
2631
|
-
XColor: 'text-bia-teal-light-50',
|
|
2632
|
-
XcolorV: 'text-white',
|
|
2633
|
-
label: {
|
|
2634
|
-
bg: "bg-bia-teal",
|
|
2635
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2636
|
-
padding: "px-[10px] py-[7px] ",
|
|
2637
|
-
radius: "rounded-[50px]",
|
|
2638
|
-
Xicon: '',
|
|
2639
|
-
},
|
|
2640
|
-
closeable: {
|
|
2641
|
-
bg: "bg-bia-teal",
|
|
2642
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2643
|
-
padding: "px-[10px] py-[7px] ",
|
|
2644
|
-
radius: "rounded-[50px]",
|
|
2645
|
-
Xicon: TbCloseable,
|
|
2646
|
-
},
|
|
2647
|
-
icon: {
|
|
2648
|
-
bg: "bg-bia-teal",
|
|
2649
|
-
text: "text-[#FFF] text-[18.67px]",
|
|
2650
|
-
padding: "p-[7px] ",
|
|
2651
|
-
radius: "rounded-[50px]",
|
|
2652
|
-
Xicon: TbCheck,
|
|
2653
|
-
},
|
|
2654
|
-
},
|
|
2655
|
-
sm: {
|
|
2656
|
-
iconColor: 'text-bia-teal',
|
|
2657
|
-
XColor: 'text-white',
|
|
2658
|
-
XcolorV: 'text-white',
|
|
2659
|
-
label: {
|
|
2660
|
-
bg: "bg-bia-teal",
|
|
2661
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2662
|
-
padding: "px-[10px] py-[2px]",
|
|
2663
|
-
radius: "rounded-[12px]",
|
|
2664
|
-
Xicon: '',
|
|
2665
|
-
},
|
|
2666
|
-
closeable: {
|
|
2667
|
-
bg: "bg-bia-teal",
|
|
2668
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2669
|
-
padding: "px-[10px] py-[2px]",
|
|
2670
|
-
radius: "rounded-[12px]",
|
|
2671
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2672
|
-
},
|
|
2673
|
-
icon: {
|
|
2674
|
-
bg: "bg-bia-teal",
|
|
2675
|
-
text: "text-[#FFF] text-[13.06px]",
|
|
2676
|
-
padding: "p-[4px]",
|
|
2677
|
-
radius: "rounded-[12px]",
|
|
2678
|
-
Xicon: TbCheckWhiteSmall,
|
|
2679
|
-
},
|
|
2680
|
-
},
|
|
2681
|
-
tn: {
|
|
2682
|
-
iconColor: 'text-bia-teal',
|
|
2683
|
-
XColor: 'text-white',
|
|
2684
|
-
XcolorV: 'text-white',
|
|
2685
|
-
label: {
|
|
2686
|
-
bg: "bg-bia-teal",
|
|
2687
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2688
|
-
padding: "px-[8px] py-[2px]",
|
|
2689
|
-
radius: "rounded-[12px]",
|
|
2690
|
-
Xicon: '',
|
|
2691
|
-
},
|
|
2692
|
-
closeable: {
|
|
2693
|
-
bg: "bg-bia-teal",
|
|
2694
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2695
|
-
padding: "px-[8px] py-[2px]",
|
|
2696
|
-
radius: "rounded-[12px]",
|
|
2697
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2698
|
-
},
|
|
2699
|
-
icon: {
|
|
2700
|
-
bg: "bg-bia-teal",
|
|
2701
|
-
text: "text-[#FFF] text-[11.2px]",
|
|
2702
|
-
padding: "p-[3px] ",
|
|
2703
|
-
radius: "rounded-[12px]",
|
|
2704
|
-
Xicon: TbCheckWhiteSmall,
|
|
2705
|
-
},
|
|
2706
|
-
},
|
|
2707
|
-
},
|
|
2708
|
-
green: {
|
|
2709
|
-
md: {
|
|
2710
|
-
iconColor: 'text-bia-green',
|
|
2711
|
-
XColor: 'text-bia-green-light-50',
|
|
2712
|
-
XcolorV: 'text-white',
|
|
2713
|
-
label: {
|
|
2714
|
-
bg: "bg-bia-green",
|
|
2715
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2716
|
-
padding: "px-[10px] py-[7px] ",
|
|
2717
|
-
radius: "rounded-[50px]",
|
|
2718
|
-
Xicon: '',
|
|
2719
|
-
},
|
|
2720
|
-
closeable: {
|
|
2721
|
-
bg: "bg-bia-green",
|
|
2722
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2723
|
-
padding: "px-[10px] py-[7px] ",
|
|
2724
|
-
radius: "rounded-[50px]",
|
|
2725
|
-
Xicon: TbCloseable,
|
|
2726
|
-
},
|
|
2727
|
-
icon: {
|
|
2728
|
-
bg: "bg-bia-green",
|
|
2729
|
-
text: "text-[#FFF] text-[18.67px]",
|
|
2730
|
-
padding: "p-[7px] ",
|
|
2731
|
-
radius: "rounded-[50px]",
|
|
2732
|
-
Xicon: TbCheck,
|
|
2733
|
-
},
|
|
2734
|
-
},
|
|
2735
|
-
sm: {
|
|
2736
|
-
iconColor: 'text-bia-green',
|
|
2737
|
-
XColor: 'text-white',
|
|
2738
|
-
XcolorV: 'text-white',
|
|
2739
|
-
label: {
|
|
2740
|
-
bg: "bg-bia-green",
|
|
2741
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2742
|
-
padding: "px-[10px] py-[2px]",
|
|
2743
|
-
radius: "rounded-[12px]",
|
|
2744
|
-
Xicon: '',
|
|
2745
|
-
},
|
|
2746
|
-
closeable: {
|
|
2747
|
-
bg: "bg-bia-green",
|
|
2748
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2749
|
-
padding: "px-[10px] py-[2px]",
|
|
2750
|
-
radius: "rounded-[12px]",
|
|
2751
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2752
|
-
},
|
|
2753
|
-
icon: {
|
|
2754
|
-
bg: "bg-bia-green",
|
|
2755
|
-
text: "text-[#FFF] text-[13.06px]",
|
|
2756
|
-
padding: "p-[4px] ",
|
|
2757
|
-
radius: "rounded-[12px]",
|
|
2758
|
-
Xicon: TbCheckWhiteSmall,
|
|
2759
|
-
},
|
|
2760
|
-
},
|
|
2761
|
-
tn: {
|
|
2762
|
-
iconColor: 'text-bia-green',
|
|
2763
|
-
XColor: 'text-white',
|
|
2764
|
-
XcolorV: 'text-white',
|
|
2765
|
-
label: {
|
|
2766
|
-
bg: "bg-bia-green",
|
|
2767
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2768
|
-
padding: "px-[8px] py-[2px] ",
|
|
2769
|
-
radius: "rounded-[12px]",
|
|
2770
|
-
Xicon: '',
|
|
2771
|
-
},
|
|
2772
|
-
closeable: {
|
|
2773
|
-
bg: "bg-bia-green",
|
|
2774
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2775
|
-
padding: "px-[8px] py-[2px] ",
|
|
2776
|
-
radius: "rounded-[12px]",
|
|
2777
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2778
|
-
},
|
|
2779
|
-
icon: {
|
|
2780
|
-
bg: "bg-bia-green",
|
|
2781
|
-
text: "text-[#FFF] text-[11.2px]",
|
|
2782
|
-
padding: "p-[3px] ",
|
|
2783
|
-
radius: "rounded-[12px]",
|
|
2784
|
-
Xicon: TbCheckWhiteSmall,
|
|
2785
|
-
},
|
|
2786
|
-
},
|
|
2787
|
-
},
|
|
2788
|
-
yellow: {
|
|
2789
|
-
md: {
|
|
2790
|
-
iconColor: 'text-bia-orange',
|
|
2791
|
-
XColor: 'text-bia-orange-light-50',
|
|
2792
|
-
XcolorV: 'text-white',
|
|
2793
|
-
label: {
|
|
2794
|
-
bg: "bg-[#FF7B00]",
|
|
2795
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2796
|
-
padding: "px-[10px] py-[7px] ",
|
|
2797
|
-
radius: "rounded-[50px]",
|
|
2798
|
-
Xicon: '',
|
|
2799
|
-
},
|
|
2800
|
-
closeable: {
|
|
2801
|
-
bg: "bg-[#FF7B00]",
|
|
2802
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2803
|
-
padding: "px-[10px] py-[7px] ",
|
|
2804
|
-
radius: "rounded-[50px]",
|
|
2805
|
-
Xicon: TbCloseable,
|
|
2806
|
-
},
|
|
2807
|
-
icon: {
|
|
2808
|
-
bg: "bg-[#FF7B00]",
|
|
2809
|
-
text: "text-[#FFF] text-[18.67px]",
|
|
2810
|
-
padding: "p-[7px] ",
|
|
2811
|
-
radius: "rounded-[50px]",
|
|
2812
|
-
Xicon: TbCheck,
|
|
2813
|
-
},
|
|
2814
|
-
},
|
|
2815
|
-
sm: {
|
|
2816
|
-
iconColor: 'text-bia-orange',
|
|
2817
|
-
XColor: 'text-white',
|
|
2818
|
-
XcolorV: 'text-white',
|
|
2819
|
-
label: {
|
|
2820
|
-
bg: "bg-[#FF7B00]",
|
|
2821
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2822
|
-
padding: "px-[10px] py-[2px]",
|
|
2823
|
-
radius: "rounded-[12px]",
|
|
2824
|
-
Xicon: '',
|
|
2825
|
-
},
|
|
2826
|
-
closeable: {
|
|
2827
|
-
bg: "bg-[#FF7B00]",
|
|
2828
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2829
|
-
padding: "px-[10px] py-[2px]",
|
|
2830
|
-
radius: "rounded-[12px]",
|
|
2831
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2832
|
-
},
|
|
2833
|
-
icon: {
|
|
2834
|
-
bg: "bg-[#FF7B00]",
|
|
2835
|
-
text: "text-[#FFF] text-[13.06px]",
|
|
2836
|
-
padding: "p-[4px]",
|
|
2837
|
-
radius: "rounded-[12px]",
|
|
2838
|
-
Xicon: TbCheckWhiteSmall,
|
|
2839
|
-
},
|
|
2840
|
-
},
|
|
2841
|
-
tn: {
|
|
2842
|
-
iconColor: 'text-bia-orange',
|
|
2843
|
-
XColor: 'text-white',
|
|
2844
|
-
XcolorV: 'text-white',
|
|
2845
|
-
label: {
|
|
2846
|
-
bg: "bg-[#FF7B00]",
|
|
2847
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2848
|
-
padding: "px-[8px] py-[2px]",
|
|
2849
|
-
radius: "rounded-[12px]",
|
|
2850
|
-
Xicon: '',
|
|
2851
|
-
},
|
|
2852
|
-
closeable: {
|
|
2853
|
-
bg: "bg-[#FF7B00]",
|
|
2854
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2855
|
-
padding: "px-[8px] py-[2px] ",
|
|
2856
|
-
radius: "rounded-[12px]",
|
|
2857
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2858
|
-
},
|
|
2859
|
-
icon: {
|
|
2860
|
-
bg: "bg-[#FF7B00]",
|
|
2861
|
-
text: "text-[#FFF] text-[11.2px]",
|
|
2862
|
-
padding: "p-[3px] ",
|
|
2863
|
-
radius: "rounded-[12px]",
|
|
2864
|
-
Xicon: TbCheckWhiteSmall,
|
|
2865
|
-
},
|
|
2866
|
-
},
|
|
2867
|
-
},
|
|
2868
|
-
red: {
|
|
2869
|
-
md: {
|
|
2870
|
-
iconColor: 'text-bia-red',
|
|
2871
|
-
XColor: 'text-bia-red-light-50',
|
|
2872
|
-
XcolorV: 'text-white',
|
|
2873
|
-
label: {
|
|
2874
|
-
bg: "bg-bia-red",
|
|
2875
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2876
|
-
padding: "px-[10px] py-[7px] ",
|
|
2877
|
-
radius: "rounded-[50px]",
|
|
2878
|
-
Xicon: '',
|
|
2879
|
-
},
|
|
2880
|
-
closeable: {
|
|
2881
|
-
bg: "bg-bia-red",
|
|
2882
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2883
|
-
padding: "px-[10px] py-[7px] ",
|
|
2884
|
-
radius: "rounded-[50px]",
|
|
2885
|
-
Xicon: TbCloseable,
|
|
2886
|
-
},
|
|
2887
|
-
icon: {
|
|
2888
|
-
bg: "bg-bia-red",
|
|
2889
|
-
text: "text-[#FFF] text-[18.67px]",
|
|
2890
|
-
padding: "p-[7px]",
|
|
2891
|
-
radius: "rounded-[50px]",
|
|
2892
|
-
Xicon: TbCheck,
|
|
2893
|
-
},
|
|
2894
|
-
},
|
|
2895
|
-
sm: {
|
|
2896
|
-
iconColor: 'text-bia-red',
|
|
2897
|
-
XColor: 'text-white',
|
|
2898
|
-
XcolorV: 'text-white',
|
|
2899
|
-
label: {
|
|
2900
|
-
bg: "bg-bia-red",
|
|
2901
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2902
|
-
padding: "px-[10px] py-[2px]",
|
|
2903
|
-
radius: "rounded-[12px]",
|
|
2904
|
-
Xicon: '',
|
|
2905
|
-
},
|
|
2906
|
-
closeable: {
|
|
2907
|
-
bg: "bg-bia-red",
|
|
2908
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2909
|
-
padding: "px-[10px] py-[2px] ",
|
|
2910
|
-
radius: "rounded-[12px]",
|
|
2911
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2912
|
-
},
|
|
2913
|
-
icon: {
|
|
2914
|
-
bg: "bg-bia-red",
|
|
2915
|
-
text: "text-[#FFF] text-[13.06px]",
|
|
2916
|
-
padding: "p-[4px] ",
|
|
2917
|
-
radius: "rounded-[12px]",
|
|
2918
|
-
Xicon: TbCheckWhiteSmall,
|
|
2919
|
-
},
|
|
2920
|
-
},
|
|
2921
|
-
tn: {
|
|
2922
|
-
iconColor: 'text-bia-red',
|
|
2923
|
-
XColor: 'text-white',
|
|
2924
|
-
XcolorV: 'text-white',
|
|
2925
|
-
label: {
|
|
2926
|
-
bg: "bg-bia-red",
|
|
2927
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2928
|
-
padding: "px-[8px] py-[2px] ",
|
|
2929
|
-
radius: "rounded-[12px]",
|
|
2930
|
-
Xicon: '',
|
|
2931
|
-
},
|
|
2932
|
-
closeable: {
|
|
2933
|
-
bg: "bg-bia-red",
|
|
2934
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
2935
|
-
padding: "px-[8px] py-[2px] ",
|
|
2936
|
-
radius: "rounded-[12px]",
|
|
2937
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2938
|
-
},
|
|
2939
|
-
icon: {
|
|
2940
|
-
bg: "bg-bia-red",
|
|
2941
|
-
text: "text-[#FFF] text-[11.2px]",
|
|
2942
|
-
padding: "p-[3px] ",
|
|
2943
|
-
radius: "rounded-[12px]",
|
|
2944
|
-
Xicon: TbCheckWhiteSmall,
|
|
2945
|
-
},
|
|
2946
|
-
},
|
|
2947
|
-
},
|
|
2948
|
-
black: {
|
|
2949
|
-
md: {
|
|
2950
|
-
iconColor: 'text-[#2f2f2f]',
|
|
2951
|
-
XColor: 'text-bia-coolgrey',
|
|
2952
|
-
XcolorV: 'text-white',
|
|
2953
|
-
label: {
|
|
2954
|
-
bg: "bg-primary-black",
|
|
2955
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2956
|
-
padding: "px-[10px] py-[7px] ",
|
|
2957
|
-
radius: "rounded-[50px]",
|
|
2958
|
-
Xicon: '',
|
|
2959
|
-
},
|
|
2960
|
-
closeable: {
|
|
2961
|
-
bg: "bg-primary-black",
|
|
2962
|
-
text: "text-[#FFF] font-normal text-[14px] leading-[18px]",
|
|
2963
|
-
padding: "px-[10px] py-[7px] ",
|
|
2964
|
-
radius: "rounded-[50px]",
|
|
2965
|
-
Xicon: TbCloseable,
|
|
2966
|
-
},
|
|
2967
|
-
icon: {
|
|
2968
|
-
bg: "bg-primary-black",
|
|
2969
|
-
text: "text-[#FFF] text-[18.67px]",
|
|
2970
|
-
padding: "p-[7px] ",
|
|
2971
|
-
radius: "rounded-[50px]",
|
|
2972
|
-
Xicon: TbCheck,
|
|
2973
|
-
},
|
|
2974
|
-
},
|
|
2975
|
-
sm: {
|
|
2976
|
-
iconColor: 'text-[#2f2f2f]',
|
|
2977
|
-
XColor: 'text-white',
|
|
2978
|
-
XcolorV: 'text-white',
|
|
2979
|
-
label: {
|
|
2980
|
-
bg: "bg-primary-black",
|
|
2981
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2982
|
-
padding: "px-[10px] py-[2px] ",
|
|
2983
|
-
radius: "rounded-[12px]",
|
|
2984
|
-
Xicon: '',
|
|
2985
|
-
},
|
|
2986
|
-
closeable: {
|
|
2987
|
-
bg: "bg-primary-black",
|
|
2988
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[15.96px]",
|
|
2989
|
-
padding: "px-[10px] py-[2px] ",
|
|
2990
|
-
radius: "rounded-[12px]",
|
|
2991
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
2992
|
-
},
|
|
2993
|
-
icon: {
|
|
2994
|
-
bg: "bg-primary-black",
|
|
2995
|
-
text: "text-[#FFF] text-[13.06px]",
|
|
2996
|
-
padding: "p-[4px] ",
|
|
2997
|
-
radius: "rounded-[12px]",
|
|
2998
|
-
Xicon: TbCheckWhiteSmall,
|
|
2999
|
-
},
|
|
3000
|
-
},
|
|
3001
|
-
tn: {
|
|
3002
|
-
iconColor: 'text-[#2f2f2f]',
|
|
3003
|
-
XColor: 'text-white',
|
|
3004
|
-
XcolorV: 'text-white',
|
|
3005
|
-
label: {
|
|
3006
|
-
bg: "bg-primary-black",
|
|
3007
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
3008
|
-
padding: "px-[8px] py-[2px] ",
|
|
3009
|
-
radius: "rounded-[12px]",
|
|
3010
|
-
Xicon: '',
|
|
3011
|
-
},
|
|
3012
|
-
closeable: {
|
|
3013
|
-
bg: "bg-primary-black",
|
|
3014
|
-
text: "text-[#FFF] font-normal text-[12px] leading-[13px]",
|
|
3015
|
-
padding: "px-[8px] py-[2px] ",
|
|
3016
|
-
radius: "rounded-[12px]",
|
|
3017
|
-
Xicon: TbCloseAbleWhiteSmall,
|
|
3018
|
-
},
|
|
3019
|
-
icon: {
|
|
3020
|
-
bg: "bg-primary-black",
|
|
3021
|
-
text: "text-[#FFF] text-[11.2px]",
|
|
3022
|
-
padding: "p-[3px] ",
|
|
3023
|
-
radius: "rounded-[12px]",
|
|
3024
|
-
Xicon: TbCheckWhiteSmall,
|
|
3025
|
-
},
|
|
3026
|
-
},
|
|
3027
|
-
},
|
|
3028
|
-
white: {
|
|
3029
|
-
md: {
|
|
3030
|
-
iconColor: 'text-white',
|
|
3031
|
-
XColor: 'text-bia-grey-dark-30 group-focus:outline-2',
|
|
3032
|
-
XcolorV: 'text-primary-black',
|
|
3033
|
-
label: {
|
|
3034
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3035
|
-
text: "text-[#2F2F2F] font-normal text-[14px] leading-[18px]",
|
|
3036
|
-
padding: "px-[10px] py-[7px] ",
|
|
3037
|
-
radius: "rounded-[50px]",
|
|
3038
|
-
Xicon: '',
|
|
3039
|
-
},
|
|
3040
|
-
closeable: {
|
|
3041
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3042
|
-
text: "text-[#2F2F2F] font-normal text-[14px] leading-[18px]",
|
|
3043
|
-
padding: "px-[10px] py-[7px] ",
|
|
3044
|
-
radius: "rounded-[50px]",
|
|
3045
|
-
Xicon: TbCloseAbleBlack,
|
|
3046
|
-
},
|
|
3047
|
-
icon: {
|
|
3048
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3049
|
-
text: "text-[#2F2F2F] text-[18.67px]",
|
|
3050
|
-
padding: "p-[7px]",
|
|
3051
|
-
radius: "rounded-[50px]",
|
|
3052
|
-
Xicon: TbCheckBlack,
|
|
3053
|
-
},
|
|
3054
|
-
},
|
|
3055
|
-
sm: {
|
|
3056
|
-
iconColor: 'text-white',
|
|
3057
|
-
XColor: 'text-bia-grey-dark-30 group-focus:outline-2',
|
|
3058
|
-
XcolorV: 'text-primary-black',
|
|
3059
|
-
label: {
|
|
3060
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3061
|
-
text: "text-[#2F2F2F] font-normal text-[12px] leading-[15.96px]",
|
|
3062
|
-
padding: "px-[10px] py-[2px] ",
|
|
3063
|
-
radius: "rounded-[12px]",
|
|
3064
|
-
Xicon: '',
|
|
3065
|
-
},
|
|
3066
|
-
closeable: {
|
|
3067
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3068
|
-
text: "text-[#2F2F2F] font-normal text-[12px] leading-[15.96px]",
|
|
3069
|
-
padding: "px-[10px] py-[2px] ",
|
|
3070
|
-
radius: "rounded-[12px]",
|
|
3071
|
-
Xicon: TbCloseAbleGraySmall,
|
|
3072
|
-
},
|
|
3073
|
-
icon: {
|
|
3074
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3075
|
-
text: "text-[#2F2F2F] text-[6.53px]",
|
|
3076
|
-
padding: "p-[4px] ",
|
|
3077
|
-
radius: "rounded-[12px]",
|
|
3078
|
-
Xicon: TbCheckBlackSmall,
|
|
3079
|
-
},
|
|
3080
|
-
},
|
|
3081
|
-
tn: {
|
|
3082
|
-
iconColor: 'text-white',
|
|
3083
|
-
XColor: 'text-bia-grey-dark-30 group-focus:outline-2',
|
|
3084
|
-
XcolorV: 'text-primary-black',
|
|
3085
|
-
label: {
|
|
3086
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3087
|
-
text: "text-[#2F2F2F] font-normal text-[12px] leading-[13px]",
|
|
3088
|
-
padding: "px-[8px] py-[2px] ",
|
|
3089
|
-
radius: "rounded-[12px]",
|
|
3090
|
-
Xicon: '',
|
|
3091
|
-
},
|
|
3092
|
-
closeable: {
|
|
3093
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3094
|
-
text: "text-[#2F2F2F] font-normal text-[12px] leading-[13px]",
|
|
3095
|
-
padding: "px-[8px] py-[2px] ",
|
|
3096
|
-
radius: "rounded-[12px]",
|
|
3097
|
-
Xicon: TbCloseAbleGraySmall,
|
|
3098
|
-
},
|
|
3099
|
-
icon: {
|
|
3100
|
-
bg: "bg-primary-white border-[1px] border-bia-grey-dark-10",
|
|
3101
|
-
text: "text-[#2F2F2F] text-[11.2px]",
|
|
3102
|
-
padding: "p-[3px] ",
|
|
3103
|
-
radius: "rounded-[12px]",
|
|
3104
|
-
Xicon: TbCheckBlackSmall,
|
|
3105
|
-
},
|
|
3106
|
-
},
|
|
3107
|
-
},
|
|
2473
|
+
var colorConfig = {
|
|
2474
|
+
default: 'bg-bia-grey-light-50 text-primary-black',
|
|
2475
|
+
blue: 'bg-bia-blue text-primary-white',
|
|
2476
|
+
teal: 'bg-bia-teal text-primary-white',
|
|
2477
|
+
green: 'bg-bia-green text-primary-white',
|
|
2478
|
+
yellow: 'bg-bia-yellow text-primary-white',
|
|
2479
|
+
red: 'bg-bia-red text-primary-white',
|
|
2480
|
+
black: 'bg-primary-black text-primary-white',
|
|
2481
|
+
white: 'bg-primary-white text-primary-black border border-primary-black',
|
|
3108
2482
|
};
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
2483
|
+
var sizeConfig = {
|
|
2484
|
+
md: 'px-[10px] py-[7px] h-[34px] text-size-base',
|
|
2485
|
+
sm: 'px-[10px] py-[4px] h-[22px] text-size-sm',
|
|
2486
|
+
tn: 'px-[8px] py-[2px] h-[18px] text-size-sm',
|
|
2487
|
+
};
|
|
2488
|
+
var iconOnlySizeConfig = {
|
|
2489
|
+
md: 'p-[7px]',
|
|
2490
|
+
sm: 'p-[4px]',
|
|
2491
|
+
tn: 'p-[2px]',
|
|
2492
|
+
};
|
|
2493
|
+
var closeConfig = {
|
|
2494
|
+
default: 'bg-bia-grey-dark-30 text-primary-white',
|
|
2495
|
+
blue: 'bg-bia-white-transparent-50 text-bia-blue',
|
|
2496
|
+
teal: 'bg-bia-white-transparent-50 text-bia-teal',
|
|
2497
|
+
green: 'bg-bia-white-transparent-50 text-bia-green',
|
|
2498
|
+
yellow: 'bg-bia-white-transparent-50 text-bia-yellow',
|
|
2499
|
+
red: 'bg-bia-white-transparent-50 text-bia-red',
|
|
2500
|
+
black: 'bg-bia-white-transparent-50 text-primary-black',
|
|
2501
|
+
white: 'bg-bia-grey-dark-30 text-primary-white',
|
|
2502
|
+
};
|
|
2503
|
+
var rightPaddingConfig = {
|
|
2504
|
+
md: 'pr-[8px]',
|
|
2505
|
+
sm: 'pr-[5px]',
|
|
2506
|
+
tn: 'pr-[3px]',
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2509
|
+
var colorUnion = [
|
|
2510
|
+
'default',
|
|
2511
|
+
'blue',
|
|
2512
|
+
'teal',
|
|
2513
|
+
'green',
|
|
2514
|
+
'yellow',
|
|
2515
|
+
'red',
|
|
2516
|
+
'black',
|
|
2517
|
+
'white',
|
|
2518
|
+
'custom',
|
|
2519
|
+
];
|
|
2520
|
+
var sizeUnion = ['md', 'sm', 'tn'];
|
|
2521
|
+
var variantUnion = ['label', 'icon', 'closeable'];
|
|
2522
|
+
var TagLabel = function (_a) {
|
|
2523
|
+
var color = _a.color, _b = _a.size, size = _b === void 0 ? 'md' : _b, variant = _a.variant, closeHandler = _a.closeHandler, open = _a.open, text = _a.text, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon; _a.left; _a.right; var bgColor = _a.bgColor, textColor = _a.textColor, isBlock = _a.isBlock, maxWidth = _a.maxWidth, isDark = _a.isDark, props = __rest(_a, ["color", "size", "variant", "closeHandler", "open", "text", "leftIcon", "rightIcon", "left", "right", "bgColor", "textColor", "isBlock", "maxWidth", "isDark"]);
|
|
2524
|
+
var validatedColor = validUnion(color, colorUnion);
|
|
2525
|
+
var validatedSize = validUnion(size, sizeUnion);
|
|
2526
|
+
var validatedVariant = validUnion(variant, variantUnion);
|
|
2527
|
+
var defaultIconSize = validatedSize === 'md' ? 'text-xl' : 'text-sm';
|
|
2528
|
+
var roundedClass = validatedVariant === 'icon' ? 'rounded-full' : 'rounded-[50px]';
|
|
2529
|
+
var sizeClass = validatedVariant === 'icon' ? iconOnlySizeConfig[validatedSize] : sizeConfig[validatedSize];
|
|
2530
|
+
var isCloseableClass = validatedVariant === 'closeable' && rightPaddingConfig[validatedSize];
|
|
2531
|
+
var colorClass = validatedColor === 'custom'
|
|
2532
|
+
? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor)
|
|
2533
|
+
: colorConfig[validatedColor];
|
|
2534
|
+
var blockclass = isBlock && validatedVariant !== 'icon' ? 'w-full' : "w-fit";
|
|
2535
|
+
var maxWidthStyle = !isBlock ? maxWidth + 'px' : '';
|
|
2536
|
+
var textClass = isBlock ? 'text-center' : 'text-left';
|
|
2537
|
+
var containerClass = "".concat(sizeClass, " ").concat(colorClass, " ").concat(roundedClass, " ").concat(isCloseableClass, " ").concat(blockclass);
|
|
2538
|
+
var closeClass = validatedColor === 'custom'
|
|
2539
|
+
? isDark ? "bg-bia-white-transparent-50 text-bia-".concat(bgColor) : "bg-bia-grey-dark-30 text-bia-".concat(bgColor)
|
|
2540
|
+
: closeConfig[validatedColor];
|
|
2541
|
+
return (open && (React.createElement("div", __assign({ className: "tag-label flex items-center gap-x-[5px] text-size-base h-fit ".concat(containerClass), style: { maxWidth: maxWidthStyle } }, props),
|
|
2542
|
+
leftIcon ||
|
|
2543
|
+
(validatedVariant === 'icon' && React.createElement(TbCheck, { className: defaultIconSize })),
|
|
2544
|
+
validatedVariant !== 'icon' && (React.createElement("span", { className: "pb-[2px] truncate w-full ".concat(textClass) },
|
|
2545
|
+
" ",
|
|
2546
|
+
text,
|
|
2547
|
+
" ")),
|
|
2548
|
+
validatedVariant !== 'icon' && rightIcon,
|
|
2549
|
+
validatedVariant === 'closeable' && (React.createElement("button", { type: "button", onClick: closeHandler, className: "aspect-square w-[18px] flex justify-center items-center rounded-full mt-[1px] ".concat(closeClass) },
|
|
2550
|
+
React.createElement(TbX, { className: "text-[18px]" }))))));
|
|
3129
2551
|
};
|
|
3130
|
-
|
|
3131
|
-
function TagLabel(_a) {
|
|
3132
|
-
var children = _a.children, _b = _a.closeHandler, closeHandler = _b === void 0 ? undefined : _b, _c = _a.size, size = _c === void 0 ? 'sm' : _c, _d = _a.variant, variant = _d === void 0 ? 'label' : _d, open = _a.open, color = _a.color, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon;
|
|
3133
|
-
var config = TagLabelConfig[color][size][variant];
|
|
3134
|
-
var configIcon = TagLabelConfig[color][size];
|
|
3135
|
-
var configbg = config.bg;
|
|
3136
|
-
var configtext = config.text;
|
|
3137
|
-
var configpadding = config.padding;
|
|
3138
|
-
var configradius = config.radius;
|
|
3139
|
-
var configX = config.Xicon;
|
|
3140
|
-
var configXcolor = configIcon.XColor;
|
|
3141
|
-
var configXcolorV = configIcon.XcolorV;
|
|
3142
|
-
var iconColor = configIcon.iconColor;
|
|
3143
|
-
var IconContainer = {
|
|
3144
|
-
sm: 'h-[14px] w-[14px]',
|
|
3145
|
-
tn: 'h-[14px] w-[14px]',
|
|
3146
|
-
md: 'h-[20px] w-[20px]',
|
|
3147
|
-
};
|
|
3148
|
-
var renderIcon = function (icon) {
|
|
3149
|
-
if (typeof icon === 'string') {
|
|
3150
|
-
return React.createElement("span", null, icon);
|
|
3151
|
-
}
|
|
3152
|
-
var IconComponent = icon;
|
|
3153
|
-
var textSize;
|
|
3154
|
-
if (size === 'md') {
|
|
3155
|
-
textSize = 'text-[20px]';
|
|
3156
|
-
}
|
|
3157
|
-
else if (size === 'sm' || size === 'tn') {
|
|
3158
|
-
textSize = 'text-[14px]';
|
|
3159
|
-
}
|
|
3160
|
-
else {
|
|
3161
|
-
textSize = 'text-[14px]';
|
|
3162
|
-
}
|
|
3163
|
-
var fillColor;
|
|
3164
|
-
if (color === 'blue') {
|
|
3165
|
-
fillColor = '#5d5dea';
|
|
3166
|
-
}
|
|
3167
|
-
else if (color === 'green') {
|
|
3168
|
-
fillColor = '#21ba4c';
|
|
3169
|
-
}
|
|
3170
|
-
else if (color === 'teal') {
|
|
3171
|
-
fillColor = '#00b5ad';
|
|
3172
|
-
}
|
|
3173
|
-
else if (color === 'yellow') {
|
|
3174
|
-
fillColor = '#ff7b00';
|
|
3175
|
-
}
|
|
3176
|
-
else if (color === 'red') {
|
|
3177
|
-
fillColor = '#db2828';
|
|
3178
|
-
}
|
|
3179
|
-
else if (color === 'black') {
|
|
3180
|
-
fillColor = '#2f2f2f';
|
|
3181
|
-
}
|
|
3182
|
-
else {
|
|
3183
|
-
fillColor = '#ffffff';
|
|
3184
|
-
}
|
|
3185
|
-
return (React.createElement(IconComponent, { className: "".concat(textSize, " ").concat(variant === 'icon' ? configXcolor : configXcolorV), color: fillColor }));
|
|
3186
|
-
};
|
|
3187
|
-
// const containerClass = `${container} ${capitalize && 'capitalize'}`;
|
|
3188
|
-
// const closeableMode = variant === 'closeable';
|
|
3189
|
-
// const iconMode = variant === 'icon';
|
|
3190
|
-
var closeButtonException;
|
|
3191
|
-
if (size === 'md') {
|
|
3192
|
-
closeButtonException = '-mr-[2px]';
|
|
3193
|
-
}
|
|
3194
|
-
else {
|
|
3195
|
-
closeButtonException = '-mr-[5px]';
|
|
3196
|
-
}
|
|
3197
|
-
var outlineColor;
|
|
3198
|
-
if (color === 'default' || color === 'white') {
|
|
3199
|
-
outlineColor = 'outline-primary-black';
|
|
3200
|
-
}
|
|
3201
|
-
else {
|
|
3202
|
-
outlineColor = 'outline-white';
|
|
3203
|
-
}
|
|
3204
|
-
if (!open)
|
|
3205
|
-
return null;
|
|
3206
|
-
return (React.createElement("div", { className: "flex items-center font-segoe font-normal justify-center ".concat(configradius, " ").concat(configtext, " ").concat(configbg, " ").concat(configpadding) },
|
|
3207
|
-
variant === 'icon' ? (React.createElement("div", { className: "flex justify-center items-center ".concat(IconContainer[size]) }, leftIcon || renderIcon(configX))) : (React.createElement(React.Fragment, null,
|
|
3208
|
-
React.createElement("span", null, leftIcon),
|
|
3209
|
-
React.createElement("div", { className: "flex justify-center items-center ".concat(size === 'md' && 'min-h-[20px] px-[5px]', " ").concat(size === 'sm' && 'min-h-[18px] px-[3px]', " ").concat(size === 'tn' && 'min-h-[14px] px-[3px] -mt-[2px]') }, children))),
|
|
3210
|
-
variant === 'label' && rightIcon && (React.createElement("div", { className: "flex justify-center items-center ".concat(IconContainer[size]) }, rightIcon)),
|
|
3211
|
-
variant === 'closeable' && closeHandler && (React.createElement("button", { type: "button", className: "flex justify-center items-center ".concat(size === 'tn' ? 'p-[1px]' : 'p-[2px]', " ").concat(outlineColor, " ").concat(iconColor, " ").concat(color === 'white' || color === 'default' ? 'bg-black/[.3]' : 'bg-white/[.5]', " focus:outline ").concat(size === 'tn' ? 'outline-[1.5px]' : 'outline-[2px]', " ").concat(closeButtonException, " rounded-full group"), onClick: function () { return closeHandler(); } },
|
|
3212
|
-
React.createElement(CloseIcon, { size: size })))));
|
|
3213
|
-
}
|
|
3214
2552
|
TagLabel.defaultProps = {
|
|
3215
2553
|
variant: 'default',
|
|
3216
2554
|
size: 'sm',
|
|
3217
2555
|
open: true,
|
|
3218
2556
|
closeHandler: function () { },
|
|
3219
|
-
rightIcon: null,
|
|
3220
2557
|
leftIcon: null,
|
|
2558
|
+
rightIcon: null,
|
|
2559
|
+
left: null,
|
|
2560
|
+
right: null,
|
|
2561
|
+
bgColor: null,
|
|
2562
|
+
textColor: null,
|
|
2563
|
+
isBlock: false,
|
|
2564
|
+
maxWidth: 300,
|
|
2565
|
+
isDark: false,
|
|
3221
2566
|
};
|
|
3222
2567
|
|
|
3223
2568
|
var classConfig = {
|