bianic-ui 0.5.17 → 0.5.18
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 +163 -168
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Avatar/Avatar.d.ts +2 -1
- package/dist/cjs/types/components/Avatar/config.d.ts +5 -5
- package/dist/cjs/types/components/Breadcrumb/Breadcrumb.d.ts +3 -3
- package/dist/cjs/types/components/Button/configs.d.ts +20 -20
- package/dist/cjs/types/components/Button/index.d.ts +1 -1
- package/dist/cjs/types/components/Forms/Checkbox/Checkbox.d.ts +6 -6
- package/dist/cjs/types/components/Forms/Checkbox/Simulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/Checkbox/configs.d.ts +2 -2
- package/dist/cjs/types/components/Forms/DropdownItem/Custom.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DropdownItem/Default.d.ts +1 -1
- package/dist/cjs/types/components/Forms/DropdownItem/configs.d.ts +2 -2
- package/dist/cjs/types/components/Forms/LiveSearch/LiveSearch.d.ts +4 -4
- package/dist/cjs/types/components/Forms/LiveSearch/Simulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/LiveSearch/configs.d.ts +2 -2
- package/dist/cjs/types/components/Forms/Radio/configs.d.ts +2 -2
- package/dist/cjs/types/components/Forms/Radio/index.d.ts +6 -6
- package/dist/cjs/types/components/Forms/SegmentButton/SegmentButtonItem.d.ts +3 -3
- package/dist/cjs/types/components/Forms/SegmentButton/SegmentButtonSimulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/SegmentButton/config.d.ts +12 -12
- package/dist/cjs/types/components/Forms/SelectInput/SelectedInput.d.ts +4 -4
- package/dist/cjs/types/components/Forms/SelectInput/Simulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/SelectInput/configs.d.ts +2 -2
- package/dist/cjs/types/components/Forms/TextArea/configs.d.ts +2 -2
- package/dist/cjs/types/components/Forms/TextArea/index.d.ts +3 -3
- package/dist/cjs/types/components/Forms/TextInput/Simulation.d.ts +1 -1
- package/dist/cjs/types/components/Forms/TextInput/TextInput.d.ts +4 -4
- package/dist/cjs/types/components/Forms/TextInput/configs.d.ts +2 -2
- package/dist/cjs/types/components/Forms/Toggle/configs.d.ts +2 -2
- package/dist/cjs/types/components/Forms/Toggle/index.d.ts +6 -6
- package/dist/cjs/types/components/Modal/Modal.d.ts +1 -1
- package/dist/cjs/types/components/Modal/ModalContent.d.ts +1 -1
- package/dist/cjs/types/components/PaginationBar/PaginationBar.d.ts +1 -1
- package/dist/cjs/types/components/PaginationBar/config.d.ts +2 -2
- package/dist/cjs/types/components/Popover/index.d.ts +2 -2
- package/dist/cjs/types/components/Slider/index.d.ts +1 -0
- package/dist/cjs/types/components/Tab/ConfigTab.d.ts +2 -2
- package/dist/cjs/types/components/Tab/DividerConfig.d.ts +8 -8
- package/dist/cjs/types/components/Tab/Tab.d.ts +1 -1
- package/dist/cjs/types/components/Tab/TabHead.d.ts +1 -1
- package/dist/cjs/types/components/Table/Table.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableCol.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableDemo.d.ts +1 -1
- package/dist/cjs/types/components/Table/configs.d.ts +6 -6
- package/dist/cjs/types/components/TagLabel/CloseIcon.d.ts +1 -1
- package/dist/cjs/types/components/TagLabel/configs.d.ts +24 -24
- package/dist/cjs/types/components/TagLabel/index.d.ts +1 -1
- package/dist/cjs/types/stories/Button.stories.d.ts +4 -0
- package/dist/esm/index.js +163 -168
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Avatar/Avatar.d.ts +2 -1
- package/dist/esm/types/components/Avatar/config.d.ts +5 -5
- package/dist/esm/types/components/Breadcrumb/Breadcrumb.d.ts +3 -3
- package/dist/esm/types/components/Button/configs.d.ts +20 -20
- package/dist/esm/types/components/Button/index.d.ts +1 -1
- package/dist/esm/types/components/Forms/Checkbox/Checkbox.d.ts +6 -6
- package/dist/esm/types/components/Forms/Checkbox/Simulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/Checkbox/configs.d.ts +2 -2
- package/dist/esm/types/components/Forms/DropdownItem/Custom.d.ts +1 -1
- package/dist/esm/types/components/Forms/DropdownItem/Default.d.ts +1 -1
- package/dist/esm/types/components/Forms/DropdownItem/configs.d.ts +2 -2
- package/dist/esm/types/components/Forms/LiveSearch/LiveSearch.d.ts +4 -4
- package/dist/esm/types/components/Forms/LiveSearch/Simulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/LiveSearch/configs.d.ts +2 -2
- package/dist/esm/types/components/Forms/Radio/configs.d.ts +2 -2
- package/dist/esm/types/components/Forms/Radio/index.d.ts +6 -6
- package/dist/esm/types/components/Forms/SegmentButton/SegmentButtonItem.d.ts +3 -3
- package/dist/esm/types/components/Forms/SegmentButton/SegmentButtonSimulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/SegmentButton/config.d.ts +12 -12
- package/dist/esm/types/components/Forms/SelectInput/SelectedInput.d.ts +4 -4
- package/dist/esm/types/components/Forms/SelectInput/Simulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/SelectInput/configs.d.ts +2 -2
- package/dist/esm/types/components/Forms/TextArea/configs.d.ts +2 -2
- package/dist/esm/types/components/Forms/TextArea/index.d.ts +3 -3
- package/dist/esm/types/components/Forms/TextInput/Simulation.d.ts +1 -1
- package/dist/esm/types/components/Forms/TextInput/TextInput.d.ts +4 -4
- package/dist/esm/types/components/Forms/TextInput/configs.d.ts +2 -2
- package/dist/esm/types/components/Forms/Toggle/configs.d.ts +2 -2
- package/dist/esm/types/components/Forms/Toggle/index.d.ts +6 -6
- package/dist/esm/types/components/Modal/Modal.d.ts +1 -1
- package/dist/esm/types/components/Modal/ModalContent.d.ts +1 -1
- package/dist/esm/types/components/PaginationBar/PaginationBar.d.ts +1 -1
- package/dist/esm/types/components/PaginationBar/config.d.ts +2 -2
- package/dist/esm/types/components/Popover/index.d.ts +2 -2
- package/dist/esm/types/components/Slider/index.d.ts +1 -0
- package/dist/esm/types/components/Tab/ConfigTab.d.ts +2 -2
- package/dist/esm/types/components/Tab/DividerConfig.d.ts +8 -8
- package/dist/esm/types/components/Tab/Tab.d.ts +1 -1
- package/dist/esm/types/components/Tab/TabHead.d.ts +1 -1
- package/dist/esm/types/components/Table/Table.d.ts +1 -1
- package/dist/esm/types/components/Table/TableCol.d.ts +1 -1
- package/dist/esm/types/components/Table/TableDemo.d.ts +1 -1
- package/dist/esm/types/components/Table/configs.d.ts +6 -6
- package/dist/esm/types/components/TagLabel/CloseIcon.d.ts +1 -1
- package/dist/esm/types/components/TagLabel/configs.d.ts +24 -24
- package/dist/esm/types/components/TagLabel/index.d.ts +1 -1
- package/dist/esm/types/stories/Button.stories.d.ts +4 -0
- package/dist/index.d.ts +55 -54
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -337,35 +337,29 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
337
337
|
|
|
338
338
|
var radiusConfig = {
|
|
339
339
|
default: {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
340
|
+
sm: 'rounded-radius-sm focus-visible:rounded-radius-sm',
|
|
341
|
+
md: 'rounded-radius-md focus-visible:rounded-radius-md',
|
|
342
|
+
lg: 'rounded-radius-lg focus-visible:rounded-radius-lg',
|
|
343
|
+
tn: 'rounded-radius-tn focus-visible:rounded-radius-tn',
|
|
344
344
|
},
|
|
345
345
|
'full-rounded': {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
346
|
+
sm: 'rounded-radius-full focus-visible:rounded-radius-full',
|
|
347
|
+
md: 'rounded-radius-full focus-visible:rounded-radius-full',
|
|
348
|
+
lg: 'rounded-radius-full focus-visible:rounded-radius-full',
|
|
349
|
+
tn: 'rounded-radius-full focus-visible:rounded-radius-full',
|
|
350
350
|
},
|
|
351
351
|
};
|
|
352
352
|
var sizeConfig$a = {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
353
|
+
lg: 'py-[10.5px] px-[13px] h-[48px] flex items-center justify-center gap-[10px]',
|
|
354
|
+
md: ' px-[11px] py-[9px] h-[40px] flex items-center justify-center gap-[5px] ',
|
|
355
|
+
sm: 'px-[8px] py-[6px] h-[30px] flex items-center justify-center gap-[5px] ',
|
|
356
|
+
tn: 'px-[4px] py-[2px] h-[22px] flex items-center justify-center gap-[3px]',
|
|
357
357
|
};
|
|
358
358
|
var iconOnlySizeConfig = {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
};
|
|
364
|
-
var textConfig = {
|
|
365
|
-
large: 'medium-text-semibold',
|
|
366
|
-
medium: 'normal-text-semibold',
|
|
367
|
-
small: 'small-text-semibold',
|
|
368
|
-
tiny: 'small-text-semibold',
|
|
359
|
+
lg: 'p-[13px] flex items-center justify-center gap-[10px]',
|
|
360
|
+
md: ' p-[11px] flex items-center justify-center gap-[5px]',
|
|
361
|
+
sm: 'p-[8px] flex items-center justify-center gap-[5px] ',
|
|
362
|
+
tn: 'p-[4px] flex items-center justify-center gap-[3px]',
|
|
369
363
|
};
|
|
370
364
|
var shadow = 'shadow-[0px_6px_18px_1px_rgba(188,199,237,0.5)] disabled:shadow-none active:shadow-none';
|
|
371
365
|
var variantConfig$1 = {
|
|
@@ -387,10 +381,10 @@ var variantConfig$1 = {
|
|
|
387
381
|
};
|
|
388
382
|
|
|
389
383
|
function Button(_a) {
|
|
390
|
-
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 ? '
|
|
384
|
+
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"]);
|
|
391
385
|
return (React.createElement("button", __assign({ type: "button", className: "button flex justify-center items-center ".concat(variantConfig$1[variant], " ").concat(label ? sizeConfig$a[size] : iconOnlySizeConfig[size], " ").concat(radiusConfig[radius][size], " ").concat(className), disabled: disabled }, props),
|
|
392
386
|
iconLeft,
|
|
393
|
-
label
|
|
387
|
+
label,
|
|
394
388
|
iconRight));
|
|
395
389
|
}
|
|
396
390
|
Button.defaultProps = {
|
|
@@ -398,37 +392,37 @@ Button.defaultProps = {
|
|
|
398
392
|
className: '',
|
|
399
393
|
disabled: false,
|
|
400
394
|
radius: 'default',
|
|
401
|
-
size: '
|
|
395
|
+
size: 'md',
|
|
402
396
|
variant: 'default',
|
|
403
397
|
iconLeft: null,
|
|
404
398
|
iconRight: null,
|
|
405
399
|
};
|
|
406
400
|
|
|
407
401
|
var AvatarConfig = {
|
|
408
|
-
|
|
402
|
+
sm: {
|
|
409
403
|
picture: 'w-[24px] h-[24px] rounded-[12px] border-[1px] border-bia-coolgrey-light-90',
|
|
410
404
|
'no picture': 'font-semibold text-[12px] leading-[15.96px] text-primary-white flex items-center',
|
|
411
405
|
},
|
|
412
|
-
|
|
406
|
+
md: {
|
|
413
407
|
picture: 'w-[36px] h-[36px] rounded-[18px] border-[1px] border-bia-coolgrey-light-90',
|
|
414
408
|
'no picture': 'font-semibold text-[14px] leading-[18.62px] text-primary-white flex items-center',
|
|
415
409
|
},
|
|
416
|
-
|
|
410
|
+
lg: {
|
|
417
411
|
picture: 'w-[52px] h-[52px] rounded-[26px] border-[2px] border-bia-coolgrey-light-90',
|
|
418
412
|
'no picture': 'font-semibold text-[24px] leading-[31.92px] text-primary-white flex items-center',
|
|
419
413
|
},
|
|
420
|
-
|
|
414
|
+
xl: {
|
|
421
415
|
picture: 'w-[92px] h-[92px] rounded-[46px] border-[3px] border-bia-coolgrey-light-90',
|
|
422
416
|
'no picture': 'font-semibold text-[36px] leading-[47.88px] text-primary-white flex items-center',
|
|
423
417
|
},
|
|
424
|
-
|
|
418
|
+
xxl: {
|
|
425
419
|
picture: 'w-[160px] h-[160px] rounded-[80px] border-[5px] border-bia-coolgrey-light-90',
|
|
426
420
|
'no picture': 'font-semibold text-[64px] leading-[85.13px] text-primary-white flex items-center',
|
|
427
421
|
},
|
|
428
422
|
};
|
|
429
423
|
|
|
430
424
|
function Avatar(_a) {
|
|
431
|
-
var
|
|
425
|
+
var _b = _a.size, size = _b === void 0 ? 'md' : _b, variant = _a.variant, _c = _a.name, name = _c === void 0 ? 'Test' : _c;
|
|
432
426
|
var getInitials = function (initial) {
|
|
433
427
|
if (!initial)
|
|
434
428
|
return '';
|
|
@@ -460,6 +454,7 @@ function Avatar(_a) {
|
|
|
460
454
|
}
|
|
461
455
|
Avatar.defaultProps = {
|
|
462
456
|
name: '',
|
|
457
|
+
size: 'md',
|
|
463
458
|
};
|
|
464
459
|
|
|
465
460
|
var typeConfig = {
|
|
@@ -1352,15 +1347,15 @@ function Chevron() {
|
|
|
1352
1347
|
}
|
|
1353
1348
|
|
|
1354
1349
|
function Breadcrumb(_a) {
|
|
1355
|
-
var disabled = _a.disabled, _b = _a.
|
|
1356
|
-
var _c = BreadcrumbConfig[String(
|
|
1350
|
+
var disabled = _a.disabled, _b = _a.selected, selected = _b === void 0 ? false : _b, children = _a.children, onClick = _a.onClick, rest = __rest(_a, ["disabled", "selected", "children", "onClick"]);
|
|
1351
|
+
var _c = BreadcrumbConfig[String(selected)], container = _c.container, text = _c.text;
|
|
1357
1352
|
return (React.createElement("div", { className: "flex" },
|
|
1358
1353
|
React.createElement("button", __assign({ className: "".concat(text, " ").concat(disabled ? 'text-bia-coolgrey-light-50 cursor-pointer' : '', " whitespace-normal flex items-center justify-center bg-transparent rounded-radius-sm px-[5px] py-[3px] focus-visible:outline cursor-pointer ").concat(container, " ").concat(disabled ? 'hover:bg-transparent focus-visible:outline-transparent active:bg-transparent' : ''), disabled: disabled, type: "button", onClick: onClick }, rest), children),
|
|
1359
|
-
!
|
|
1354
|
+
!selected && (React.createElement("div", { className: "px-[5px] flex justify-center items-center" },
|
|
1360
1355
|
React.createElement(Chevron, null)))));
|
|
1361
1356
|
}
|
|
1362
1357
|
Breadcrumb.defaultProps = {
|
|
1363
|
-
|
|
1358
|
+
selected: false,
|
|
1364
1359
|
};
|
|
1365
1360
|
|
|
1366
1361
|
function Color() {
|
|
@@ -1429,12 +1424,12 @@ Divider.defaultProps = {
|
|
|
1429
1424
|
};
|
|
1430
1425
|
|
|
1431
1426
|
var sizeConfig$9 = {
|
|
1432
|
-
|
|
1427
|
+
md: {
|
|
1433
1428
|
fieldSize: 'text-size-base p-2.5 font-[350] h-10',
|
|
1434
1429
|
iconPosition: 'right-[10px]',
|
|
1435
1430
|
iconSize: 18,
|
|
1436
1431
|
},
|
|
1437
|
-
|
|
1432
|
+
sm: {
|
|
1438
1433
|
fieldSize: 'text-size-sm p-1.5 h-[30px]',
|
|
1439
1434
|
iconPosition: 'right-[7px]',
|
|
1440
1435
|
iconSize: 14,
|
|
@@ -1480,10 +1475,10 @@ function PasswordIcon(_a) {
|
|
|
1480
1475
|
}
|
|
1481
1476
|
|
|
1482
1477
|
function TextInput(_a) {
|
|
1483
|
-
var descText = _a.descText, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.
|
|
1478
|
+
var descText = _a.descText, _b = _a.isDisabled, isDisabled = _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;
|
|
1484
1479
|
var _m = React.useState(false), isShow = _m[0], setIsShow = _m[1];
|
|
1485
1480
|
var _o = styleConfig[variant], fieldStyle = _o.fieldStyle, iconStyle = _o.iconStyle;
|
|
1486
|
-
var _p = sizeConfig$9[
|
|
1481
|
+
var _p = sizeConfig$9[size], iconSize = _p.iconSize, fieldSize = _p.fieldSize, iconPosition = _p.iconPosition;
|
|
1487
1482
|
var typeVariant = variant;
|
|
1488
1483
|
if (variant === 'password')
|
|
1489
1484
|
typeVariant = isShow ? 'text' : 'password';
|
|
@@ -1520,7 +1515,7 @@ TextInput.defaultProps = {
|
|
|
1520
1515
|
isDisabled: false,
|
|
1521
1516
|
icon: null,
|
|
1522
1517
|
id: '',
|
|
1523
|
-
|
|
1518
|
+
size: 'md',
|
|
1524
1519
|
isValid: null,
|
|
1525
1520
|
label: '',
|
|
1526
1521
|
placeholder: '',
|
|
@@ -1533,55 +1528,55 @@ TextInput.defaultProps = {
|
|
|
1533
1528
|
function TextInputSimulation(_a) {
|
|
1534
1529
|
var size = _a.size;
|
|
1535
1530
|
var _b = React.useState(''), value = _b[0], setValue = _b[1];
|
|
1536
|
-
return (React.createElement(TextInput, { variant: "text", label: "Input", descText: "Deskripsi", placeholder: "Type here",
|
|
1531
|
+
return (React.createElement(TextInput, { variant: "text", label: "Input", descText: "Deskripsi", placeholder: "Type here", size: size, id: "demo-id", value: value, onChange: function (e) { return setValue(e.target.value); } }));
|
|
1537
1532
|
}
|
|
1538
1533
|
TextInputSimulation.defaultProps = {
|
|
1539
|
-
size: '
|
|
1534
|
+
size: 'md',
|
|
1540
1535
|
};
|
|
1541
1536
|
|
|
1542
1537
|
// Desc: Radio button size configuration
|
|
1543
1538
|
var sizeConfig$8 = {
|
|
1544
|
-
|
|
1539
|
+
md: {
|
|
1545
1540
|
checkSize: 'w-[22px] h-[22px]',
|
|
1546
1541
|
labelSize: 'text-size-base',
|
|
1547
1542
|
},
|
|
1548
|
-
|
|
1543
|
+
sm: {
|
|
1549
1544
|
checkSize: 'w-4 h-4',
|
|
1550
1545
|
labelSize: 'text-size-sm',
|
|
1551
1546
|
},
|
|
1552
1547
|
};
|
|
1553
1548
|
|
|
1554
1549
|
function Radio(_a) {
|
|
1555
|
-
var label = _a.label, _b = _a.
|
|
1556
|
-
var _f = sizeConfig$8[
|
|
1550
|
+
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.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.checked, checked = _e === void 0 ? false : _e;
|
|
1551
|
+
var _f = sizeConfig$8[size], checkSize = _f.checkSize, labelSize = _f.labelSize;
|
|
1557
1552
|
return (React.createElement("div", { className: "flex items-center" },
|
|
1558
1553
|
React.createElement("div", { className: "bg-white rounded-full flex flex-shrink-0 justify-center items-center relative ".concat(checkSize) },
|
|
1559
|
-
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:
|
|
1554
|
+
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: isDisabled }),
|
|
1560
1555
|
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" })),
|
|
1561
1556
|
React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 font-[350] ".concat(labelSize), style: { color: isDisabled ? '#8C8CA6' : '#2f2f2f' } }, label)));
|
|
1562
1557
|
}
|
|
1563
1558
|
Radio.defaultProps = {
|
|
1564
1559
|
label: '',
|
|
1565
|
-
|
|
1560
|
+
size: 'md',
|
|
1566
1561
|
id: '',
|
|
1567
1562
|
onClick: function () { },
|
|
1568
1563
|
isDisabled: false,
|
|
1569
|
-
|
|
1564
|
+
checked: false,
|
|
1570
1565
|
};
|
|
1571
1566
|
|
|
1572
1567
|
var sizeConfig$7 = {
|
|
1573
|
-
|
|
1568
|
+
md: {
|
|
1574
1569
|
inputClass: 'text-size-base font-[350] min-h-10',
|
|
1575
1570
|
},
|
|
1576
|
-
|
|
1571
|
+
sm: {
|
|
1577
1572
|
inputClass: 'text-size-sm min-h-[30px]',
|
|
1578
1573
|
},
|
|
1579
1574
|
};
|
|
1580
1575
|
|
|
1581
1576
|
function TextArea(_a) {
|
|
1582
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.
|
|
1577
|
+
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"]);
|
|
1583
1578
|
var inputRow = rows !== null && rows !== void 0 ? rows : 4;
|
|
1584
|
-
var inputClass = sizeConfig$7[
|
|
1579
|
+
var inputClass = sizeConfig$7[size].inputClass;
|
|
1585
1580
|
return (React.createElement("div", { className: "field-group w-full flex flex-col" },
|
|
1586
1581
|
React.createElement("label", { htmlFor: id, className: "label text-xs pb-2 font-semibold" },
|
|
1587
1582
|
label,
|
|
@@ -1594,7 +1589,7 @@ TextArea.defaultProps = {
|
|
|
1594
1589
|
disabled: false,
|
|
1595
1590
|
descText: '',
|
|
1596
1591
|
id: '',
|
|
1597
|
-
|
|
1592
|
+
size: 'md',
|
|
1598
1593
|
label: '',
|
|
1599
1594
|
placeholder: 'Write here ...',
|
|
1600
1595
|
required: false,
|
|
@@ -1602,22 +1597,22 @@ TextArea.defaultProps = {
|
|
|
1602
1597
|
};
|
|
1603
1598
|
|
|
1604
1599
|
var sizeConfig$6 = {
|
|
1605
|
-
|
|
1600
|
+
md: {
|
|
1606
1601
|
checkClass: 'w-[22px] h-[22px]',
|
|
1607
1602
|
labelClass: 'text-size-base font-[350]',
|
|
1608
1603
|
},
|
|
1609
|
-
|
|
1604
|
+
sm: {
|
|
1610
1605
|
checkClass: 'w-4 h-4',
|
|
1611
1606
|
labelClass: 'text-size-sm font-normal',
|
|
1612
1607
|
},
|
|
1613
1608
|
};
|
|
1614
1609
|
|
|
1615
1610
|
function Checkbox(_a) {
|
|
1616
|
-
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.
|
|
1617
|
-
var _f = sizeConfig$6[
|
|
1611
|
+
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;
|
|
1612
|
+
var _f = sizeConfig$6[size], checkClass = _f.checkClass, labelClass = _f.labelClass;
|
|
1618
1613
|
return (React.createElement("div", { className: "flex items-center" },
|
|
1619
1614
|
React.createElement("div", { className: "bg-white rounded-full flex flex-shrink-0 justify-center items-center relative ".concat(checkClass) },
|
|
1620
|
-
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:
|
|
1615
|
+
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 }),
|
|
1621
1616
|
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" },
|
|
1622
1617
|
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" },
|
|
1623
1618
|
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" })))),
|
|
@@ -1626,8 +1621,8 @@ function Checkbox(_a) {
|
|
|
1626
1621
|
Checkbox.defaultProps = {
|
|
1627
1622
|
disabled: false,
|
|
1628
1623
|
id: '',
|
|
1629
|
-
|
|
1630
|
-
|
|
1624
|
+
size: 'md',
|
|
1625
|
+
checked: false,
|
|
1631
1626
|
label: '',
|
|
1632
1627
|
onChange: function () { },
|
|
1633
1628
|
};
|
|
@@ -1661,29 +1656,29 @@ function CheckboxSimulation(_a) {
|
|
|
1661
1656
|
console.log('selected', selected);
|
|
1662
1657
|
return (React.createElement("div", { className: "flex flex-col gap-y-5" },
|
|
1663
1658
|
React.createElement("div", null, "Pick your hobby"),
|
|
1664
|
-
optionsData.map(function (option) { return (React.createElement(Checkbox, { label: option.label,
|
|
1659
|
+
optionsData.map(function (option) { return (React.createElement(Checkbox, { label: option.label, size: size, id: String(option.id), value: option.id, onChange: function (e) { return handleChange(e, option.id); }, checked: selected.includes(option.id) })); })));
|
|
1665
1660
|
}
|
|
1666
1661
|
CheckboxSimulation.defaultProps = {
|
|
1667
|
-
size: '
|
|
1662
|
+
size: 'md',
|
|
1668
1663
|
};
|
|
1669
1664
|
|
|
1670
1665
|
var sizeConfig$5 = {
|
|
1671
|
-
|
|
1666
|
+
md: {
|
|
1672
1667
|
searchSize: 'text-size-base p-2.5 font-[350] h-10',
|
|
1673
1668
|
iconSize: 'right-[10px]',
|
|
1674
1669
|
},
|
|
1675
|
-
|
|
1670
|
+
sm: {
|
|
1676
1671
|
searchSize: 'text-size-sm p-1.5 font-normal h-[30px]',
|
|
1677
1672
|
iconSize: 'right-[7px]',
|
|
1678
1673
|
},
|
|
1679
1674
|
};
|
|
1680
1675
|
|
|
1681
1676
|
var sizeConfig$4 = {
|
|
1682
|
-
|
|
1677
|
+
md: {
|
|
1683
1678
|
container: 'text-size-base font-[350] py-[3px] first:pt-[8px] last:pb-[8px]',
|
|
1684
1679
|
item: 'min-h-[34px] p-2.5',
|
|
1685
1680
|
},
|
|
1686
|
-
|
|
1681
|
+
sm: {
|
|
1687
1682
|
container: 'text-size-sm font-normal py-[2px] first:pt-[7px] last:pb-[7px]',
|
|
1688
1683
|
item: 'min-h-[26px] p-1.5',
|
|
1689
1684
|
},
|
|
@@ -1691,7 +1686,7 @@ var sizeConfig$4 = {
|
|
|
1691
1686
|
|
|
1692
1687
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1693
1688
|
function DefaultDropdownItem(_a) {
|
|
1694
|
-
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.label, label = _c === void 0 ? '' : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.size, size = _e === void 0 ? '
|
|
1689
|
+
var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.label, label = _c === void 0 ? '' : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.size, size = _e === void 0 ? 'md' : _e, isSelected = _a.isSelected, options = _a.options;
|
|
1695
1690
|
var _f = React.useState(false), isHovered = _f[0], setisHovered = _f[1];
|
|
1696
1691
|
var _g = React.useState(false), isHoveredSubMenu = _g[0], setIsHoveredSubMenu = _g[1];
|
|
1697
1692
|
var isOpenDropdown = isHovered || isHoveredSubMenu;
|
|
@@ -1708,16 +1703,16 @@ function DefaultDropdownItem(_a) {
|
|
|
1708
1703
|
DefaultDropdownItem.defaultProps = {
|
|
1709
1704
|
className: '',
|
|
1710
1705
|
onClick: function () { },
|
|
1711
|
-
size: '
|
|
1706
|
+
size: 'md',
|
|
1712
1707
|
options: [],
|
|
1713
1708
|
isSelected: false,
|
|
1714
1709
|
};
|
|
1715
1710
|
|
|
1716
1711
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1717
1712
|
function SelectInput(_a) {
|
|
1718
|
-
var descText = _a.descText, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = _a.
|
|
1713
|
+
var descText = _a.descText, _b = _a.isDisabled, isDisabled = _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.isRequired, isRequired = _d === void 0 ? false : _d, selected = _a.selected, setSelected = _a.setSelected;
|
|
1719
1714
|
var _e = React.useState(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
1720
|
-
var _f = sizeConfig$5[
|
|
1715
|
+
var _f = sizeConfig$5[size], searchSize = _f.searchSize, iconSize = _f.iconSize;
|
|
1721
1716
|
var inputRef = React.useRef(null);
|
|
1722
1717
|
var handleOutsideClick = function (e) {
|
|
1723
1718
|
if (inputRef.current && !inputRef.current.contains(e.target)) {
|
|
@@ -1739,7 +1734,7 @@ function SelectInput(_a) {
|
|
|
1739
1734
|
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: "" }))),
|
|
1740
1735
|
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) {
|
|
1741
1736
|
var isSelected = selected && selected.id && option.id === selected.id;
|
|
1742
|
-
return (React.createElement(DefaultDropdownItem, { label: option.label, size:
|
|
1737
|
+
return (React.createElement(DefaultDropdownItem, { label: option.label, size: size, isSelected: isSelected, onClick: function () {
|
|
1743
1738
|
setSelected(option);
|
|
1744
1739
|
setIsOpen(false);
|
|
1745
1740
|
} }));
|
|
@@ -1750,7 +1745,7 @@ SelectInput.defaultProps = {
|
|
|
1750
1745
|
descText: '',
|
|
1751
1746
|
isDisabled: false,
|
|
1752
1747
|
id: '',
|
|
1753
|
-
|
|
1748
|
+
size: 'md',
|
|
1754
1749
|
label: '',
|
|
1755
1750
|
isRequired: false,
|
|
1756
1751
|
selected: {},
|
|
@@ -1758,7 +1753,7 @@ SelectInput.defaultProps = {
|
|
|
1758
1753
|
};
|
|
1759
1754
|
|
|
1760
1755
|
function SelectInputSimulation(_a) {
|
|
1761
|
-
var _b = _a.size, size = _b === void 0 ? '
|
|
1756
|
+
var _b = _a.size, size = _b === void 0 ? 'md' : _b;
|
|
1762
1757
|
var _c = React.useState({
|
|
1763
1758
|
id: 1,
|
|
1764
1759
|
label: 'Mohammed Salah',
|
|
@@ -1785,17 +1780,17 @@ function SelectInputSimulation(_a) {
|
|
|
1785
1780
|
label: 'Ricardo Kaka',
|
|
1786
1781
|
},
|
|
1787
1782
|
];
|
|
1788
|
-
return (React.createElement(SelectInput, { label: "Input Select", descText: "Deskripsi Input Select", options: optionData, selected: selected, setSelected: setSelected,
|
|
1783
|
+
return (React.createElement(SelectInput, { label: "Input Select", descText: "Deskripsi Input Select", options: optionData, selected: selected, setSelected: setSelected, size: size, id: "demo-id" }));
|
|
1789
1784
|
}
|
|
1790
1785
|
|
|
1791
1786
|
var sizeConfig$3 = {
|
|
1792
|
-
|
|
1787
|
+
md: {
|
|
1793
1788
|
iconClass: 'right-[10px]',
|
|
1794
1789
|
iconSize: '18',
|
|
1795
1790
|
inputClass: 'text-size-base placeholder:text-size-base px-2.5 h-10',
|
|
1796
1791
|
optionClass: 'text-size-base px-2.5 py-[9.5px]',
|
|
1797
1792
|
},
|
|
1798
|
-
|
|
1793
|
+
sm: {
|
|
1799
1794
|
iconClass: 'right-[7px]',
|
|
1800
1795
|
iconSize: '14',
|
|
1801
1796
|
inputClass: 'text-size-sm placeholder:text-size-sm px-1.5 h-[30px]',
|
|
@@ -1805,9 +1800,9 @@ var sizeConfig$3 = {
|
|
|
1805
1800
|
|
|
1806
1801
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1807
1802
|
function LiveSearch(_a) {
|
|
1808
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.
|
|
1803
|
+
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;
|
|
1809
1804
|
var _e = React.useState(false), isOpen = _e[0], setIsOpen = _e[1];
|
|
1810
|
-
var _f = sizeConfig$3[
|
|
1805
|
+
var _f = sizeConfig$3[size], iconClass = _f.iconClass, iconSize = _f.iconSize, inputClass = _f.inputClass;
|
|
1811
1806
|
var inputRef = React.useRef(null);
|
|
1812
1807
|
var handleOutsideClick = function (e) {
|
|
1813
1808
|
if (inputRef.current && !inputRef.current.contains(e.target)) {
|
|
@@ -1833,7 +1828,7 @@ function LiveSearch(_a) {
|
|
|
1833
1828
|
React.createElement(TbZoom, { className: "text-primary-black", style: { fontSize: iconSize } })),
|
|
1834
1829
|
isOpen && (React.createElement("div", { className: "absolute border w-full max-h-60 overflow-y-auto bg-primary-white border-grey-100 rounded-b-md shadow-lg" }, filteredOptions.map(function (option) {
|
|
1835
1830
|
var isSelected = value && value.id && option.id === value.id;
|
|
1836
|
-
return (React.createElement(DefaultDropdownItem, { label: option.label, size:
|
|
1831
|
+
return (React.createElement(DefaultDropdownItem, { label: option.label, size: size, isSelected: isSelected, onClick: function () {
|
|
1837
1832
|
setValue(option);
|
|
1838
1833
|
setIsOpen(false);
|
|
1839
1834
|
} }));
|
|
@@ -1844,7 +1839,7 @@ LiveSearch.defaultProps = {
|
|
|
1844
1839
|
descText: '',
|
|
1845
1840
|
disabled: false,
|
|
1846
1841
|
id: '',
|
|
1847
|
-
|
|
1842
|
+
size: 'md',
|
|
1848
1843
|
label: '',
|
|
1849
1844
|
placeholder: '',
|
|
1850
1845
|
required: false,
|
|
@@ -1854,12 +1849,12 @@ LiveSearch.defaultProps = {
|
|
|
1854
1849
|
};
|
|
1855
1850
|
|
|
1856
1851
|
var sizeConfig$2 = {
|
|
1857
|
-
|
|
1852
|
+
md: {
|
|
1858
1853
|
containerSize: 'w-[42px] h-[22px]',
|
|
1859
1854
|
checkSize: 'p-2',
|
|
1860
1855
|
labelClass: 'text-bia-base',
|
|
1861
1856
|
},
|
|
1862
|
-
|
|
1857
|
+
sm: {
|
|
1863
1858
|
containerSize: 'w-[28px] h-[16px]',
|
|
1864
1859
|
checkSize: 'px-2 py-1',
|
|
1865
1860
|
labelClass: 'text-bia-sm',
|
|
@@ -1867,44 +1862,44 @@ var sizeConfig$2 = {
|
|
|
1867
1862
|
};
|
|
1868
1863
|
|
|
1869
1864
|
function Toggle(_a) {
|
|
1870
|
-
var _b = _a.label, label = _b === void 0 ? '' : _b, _c = _a.
|
|
1871
|
-
var _h = sizeConfig$2[
|
|
1865
|
+
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;
|
|
1866
|
+
var _h = sizeConfig$2[size], containerSize = _h.containerSize, checkSize = _h.checkSize, labelClass = _h.labelClass;
|
|
1872
1867
|
return (React.createElement("div", { className: "flex items-center" },
|
|
1873
|
-
React.createElement("div", { className: "".concat(containerSize, " rounded-full py-[2px] flex flex-shrink-0 ").concat(
|
|
1874
|
-
React.createElement("input", { id: id, checked:
|
|
1868
|
+
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 },
|
|
1869
|
+
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" }),
|
|
1875
1870
|
React.createElement("div", { className: "peer check-icon flex m-[2px] text-bia-grey group justify-center border-2 peer-checked:border-bia-blue border-primary-white peer-checked:hover:bg-primary-white peer-checked:bg-primary-white bg-bia-grey peer-checked:peer-hover:bg-primary-white peer-hover:bg-bia-blue-hover peer-disabled:bg-bia-grey-dark-10 peer-disabled:border-none peer-disabled:outline-none peer-disabled:peer-checked:bg-bia-blue-light-90 outline-2 rounded-full w-5/12 h-full z-10" })),
|
|
1876
1871
|
React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 font-normal text-grey-800 ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, label)));
|
|
1877
1872
|
}
|
|
1878
1873
|
Toggle.defaultProps = {
|
|
1879
1874
|
label: '',
|
|
1880
|
-
|
|
1875
|
+
size: 'md',
|
|
1881
1876
|
onClick: function () { },
|
|
1882
|
-
|
|
1877
|
+
checked: false,
|
|
1883
1878
|
id: '',
|
|
1884
1879
|
disabled: false,
|
|
1885
1880
|
};
|
|
1886
1881
|
|
|
1887
|
-
var
|
|
1888
|
-
|
|
1889
|
-
|
|
1882
|
+
var isSelectedConfig = {
|
|
1883
|
+
selected: 'bg-white text-black cursor-default',
|
|
1884
|
+
notSelected: 'bg-bia-grey-light-50 text-bia-coolgrey hover:bg-bia-grey-light-80 hover:text-bia-coolgrey',
|
|
1890
1885
|
};
|
|
1891
1886
|
var roundedConfig = {
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1887
|
+
lg: 'first:rounded-l-radius-lg last:rounded-r-radius-lg ',
|
|
1888
|
+
md: 'first:rounded-l-radius-md last:rounded-r-radius-md',
|
|
1889
|
+
sm: 'first:rounded-l-radius-sm last:rounded-r-radius-lg',
|
|
1890
|
+
tn: 'first:rounded-l-radius-tn last:rounded-r-radius-tn',
|
|
1896
1891
|
};
|
|
1897
1892
|
var sizeConfig$1 = {
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1893
|
+
lg: 'text-size-md leading-[23.94px] px-[13px] py-[10.5px]',
|
|
1894
|
+
md: 'text-size-base leading-[21px] px-[11px] py-[9px]',
|
|
1895
|
+
sm: 'text-size-sm leading-[15.96px] px-[7px] py-[5px]',
|
|
1896
|
+
tn: 'text-size-sm leading-[15.96px] px-[4px] py-[2px]',
|
|
1902
1897
|
};
|
|
1903
1898
|
|
|
1904
1899
|
function SegmentButtonItem(_a) {
|
|
1905
|
-
var _b = _a.
|
|
1906
|
-
var
|
|
1907
|
-
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(
|
|
1900
|
+
var _b = _a.selected, selected = _b === void 0 ? false : _b, size = _a.size, children = _a.children, disabled = _a.disabled, onClick = _a.onClick;
|
|
1901
|
+
var isSelected = selected ? 'selected' : 'notSelected';
|
|
1902
|
+
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$1[size]) }, children));
|
|
1908
1903
|
}
|
|
1909
1904
|
|
|
1910
1905
|
function SegmentButtonGroup(_a) {
|
|
@@ -1955,13 +1950,13 @@ function SegmentButtonSimulation(_a) {
|
|
|
1955
1950
|
function Modal(_a) {
|
|
1956
1951
|
var size = _a.size, title = _a.title, isShow = _a.isShow, setIsShow = _a.setIsShow, rest = __rest(_a, ["size", "title", "isShow", "setIsShow"]);
|
|
1957
1952
|
var modalSize;
|
|
1958
|
-
if (size === '
|
|
1953
|
+
if (size === 'sm') {
|
|
1959
1954
|
modalSize = 'w-[300px]';
|
|
1960
1955
|
}
|
|
1961
|
-
else if (size === '
|
|
1956
|
+
else if (size === 'lg') {
|
|
1962
1957
|
modalSize = 'w-[800px]';
|
|
1963
1958
|
}
|
|
1964
|
-
else if (size === '
|
|
1959
|
+
else if (size === 'xl') {
|
|
1965
1960
|
modalSize = 'w-[1140px]';
|
|
1966
1961
|
}
|
|
1967
1962
|
else {
|
|
@@ -1992,8 +1987,8 @@ Modal.defaultProps = {
|
|
|
1992
1987
|
};
|
|
1993
1988
|
|
|
1994
1989
|
var sizeConfig = {
|
|
1995
|
-
|
|
1996
|
-
|
|
1990
|
+
md: 'w-[38px] h-[40px] text-[14px] font-semibold',
|
|
1991
|
+
sm: 'w-[29px] h-[30px] mt-1 text-[12px] font-normal',
|
|
1997
1992
|
};
|
|
1998
1993
|
var positionConfig = {
|
|
1999
1994
|
start: 'justify-start',
|
|
@@ -2040,9 +2035,9 @@ function PaginationBar(_a) {
|
|
|
2040
2035
|
}
|
|
2041
2036
|
};
|
|
2042
2037
|
return (React.createElement("div", { className: "flex w-screen max-w-4xl ".concat(positionConfig[position], " gap-[5px]") },
|
|
2043
|
-
React.createElement(Button, { variant: "subtle-link", size: "
|
|
2044
|
-
showedPages.map(function (page) { return (React.createElement(Button, { key: page, variant: currentPage === page ? 'default' : 'subtle-link', size: "
|
|
2045
|
-
React.createElement(Button, { variant: "subtle-link", size: "
|
|
2038
|
+
React.createElement(Button, { variant: "subtle-link", size: "md", type: "button", onClick: function () { return handlePageChange(currentPage - 1); }, className: "cursor-pointer", iconLeft: leftArrow }),
|
|
2039
|
+
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() })); }),
|
|
2040
|
+
React.createElement(Button, { variant: "subtle-link", size: "md", type: "button", onClick: function () { return handlePageChange(currentPage + 1); }, className: "cursor-pointer", iconLeft: rightArrow })));
|
|
2046
2041
|
}
|
|
2047
2042
|
|
|
2048
2043
|
var activeConfig = {
|
|
@@ -2101,7 +2096,7 @@ var classConfig$1 = {
|
|
|
2101
2096
|
};
|
|
2102
2097
|
|
|
2103
2098
|
function Popover(_a) {
|
|
2104
|
-
var children = _a.children, content = _a.content, _b = _a.delay, delay = _b === void 0 ? 400 : _b, _c = _a.direction, direction = _c === void 0 ? 'bottom' : _c, _d = _a.title, title = _d === void 0 ? '' : _d,
|
|
2099
|
+
var children = _a.children, content = _a.content, _b = _a.delay, delay = _b === void 0 ? 400 : _b, _c = _a.direction, direction = _c === void 0 ? 'bottom' : _c, _d = _a.title, title = _d === void 0 ? '' : _d, open = _a.open, setIsActive = _a.setIsActive;
|
|
2105
2100
|
var timeout;
|
|
2106
2101
|
var showPopover = function () {
|
|
2107
2102
|
timeout = setTimeout(function () {
|
|
@@ -2115,7 +2110,7 @@ function Popover(_a) {
|
|
|
2115
2110
|
var _e = classConfig$1[direction], tooltipContainer = _e.tooltipContainer, triangleContainer = _e.triangleContainer, triangleShape = _e.triangleShape;
|
|
2116
2111
|
return (React.createElement("div", { className: "Popover-Wrapper relative block w-fit h-fit", onMouseEnter: showPopover, onMouseLeave: hidePopover },
|
|
2117
2112
|
children,
|
|
2118
|
-
|
|
2113
|
+
open && (React.createElement("div", { className: "Popover-Tip absolute px-[20px] py-[17.5px] text-bia-sm bg-primary-black text-primary-white z-50 rounded-[4px] w-[245px] space-y-[5px] ".concat(tooltipContainer) },
|
|
2119
2114
|
React.createElement("div", { className: "flex flex-col" },
|
|
2120
2115
|
React.createElement("div", { className: "text-[16px] leading-[19.42px] mb-[5px] font-humnst777 font-bold" }, title),
|
|
2121
2116
|
React.createElement("div", { className: "text-[12px] font-segoe font-normal break-words" }, content)),
|
|
@@ -2275,18 +2270,18 @@ var configTab = {
|
|
|
2275
2270
|
horizontal: 'w-full h-[1px] bg-bia-grey group-hover:bg-bia-blue-hover group-active:bg-bia-blue-active rounded-t-none -rotate-0',
|
|
2276
2271
|
vertical: 'h-full w-[1px] bg-bia-grey group-hover:bg-bia-blue-hover group-active:bg-bia-blue-active rounded-l-none ',
|
|
2277
2272
|
},
|
|
2278
|
-
|
|
2273
|
+
sm: {
|
|
2279
2274
|
text: 'text-[12px] leading-[15.96px] font-semibold',
|
|
2280
2275
|
icon: 'text-[14px]',
|
|
2281
2276
|
},
|
|
2282
|
-
|
|
2277
|
+
md: {
|
|
2283
2278
|
text: 'text-[14px] leading-[21px] font-semibold',
|
|
2284
2279
|
icon: 'text-[18px]',
|
|
2285
2280
|
},
|
|
2286
2281
|
};
|
|
2287
2282
|
|
|
2288
2283
|
function Tab(_a) {
|
|
2289
|
-
var children = _a.children, active = _a.active, icon = _a.icon, disabled = _a.disabled, _b = _a.mode, mode = _b === void 0 ? 'horizontal' : _b, _c = _a.fit, fit = _c === void 0 ? 'fit-content' : _c, _d = _a.size, size = _d === void 0 ? '
|
|
2284
|
+
var children = _a.children, active = _a.active, icon = _a.icon, disabled = _a.disabled, _b = _a.mode, mode = _b === void 0 ? 'horizontal' : _b, _c = _a.fit, fit = _c === void 0 ? 'fit-content' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.card, card = _e === void 0 ? false : _e, rest = __rest(_a, ["children", "active", "icon", "disabled", "mode", "fit", "size", "card"]);
|
|
2290
2285
|
var disabledKeyTab = disabled || active ? ' pointer-events-none' : '';
|
|
2291
2286
|
var cursor;
|
|
2292
2287
|
var cardColor;
|
|
@@ -2311,7 +2306,7 @@ function Tab(_a) {
|
|
|
2311
2306
|
: 'text-bia-coolgrey group-hover:text-bia-coolgrey-hover group-active:text-bia-coolgrey-active group-disabled:text-bia-coolgrey-disabled';
|
|
2312
2307
|
return (React.createElement("div", { className: "".concat(mode === 'horizontal' ? 'h-full' : 'w-full', " ").concat(cursor) },
|
|
2313
2308
|
React.createElement("button", __assign({ type: "button", disabled: disabled }, rest, { className: "flex -mb-[1px] justify-between items-stretch ".concat(card && cardColor, " ").concat(mode === 'horizontal' ? 'flex-col' : 'flex-row w-full', " group outline-none relative ").concat(disabledKeyTab, " ").concat(fit) }),
|
|
2314
|
-
React.createElement("div", { className: "flex justify-center items-center ".concat(size === '
|
|
2309
|
+
React.createElement("div", { className: "flex justify-center items-center ".concat(size === 'sm' ? " pt-[10px] ".concat(mode === 'vertical' ? 'pb-[10px] pe-[30px]' : 'px-[30px] pb-[8px]') : "px-[30px] pt-[13px] ".concat(mode === 'vertical' ? 'pb-[13px]' : 'pb-[10px]', " ")) },
|
|
2315
2310
|
React.createElement("div", { className: "flex items-center justify-center " },
|
|
2316
2311
|
React.createElement("div", { className: "flex text-nowrap space-x-1 ".concat(activeKeyTab, " ").concat(configTab[size].text) },
|
|
2317
2312
|
icon && React.createElement("div", { className: "mr-[5px]" }, icon),
|
|
@@ -2322,7 +2317,7 @@ Tab.defaultProps = {
|
|
|
2322
2317
|
children: null,
|
|
2323
2318
|
mode: 'horizontal',
|
|
2324
2319
|
fit: 'size-base',
|
|
2325
|
-
size: '
|
|
2320
|
+
size: 'md',
|
|
2326
2321
|
icon: null,
|
|
2327
2322
|
card: false,
|
|
2328
2323
|
};
|
|
@@ -2333,22 +2328,22 @@ var colAlign = {
|
|
|
2333
2328
|
left: 'justify-start',
|
|
2334
2329
|
};
|
|
2335
2330
|
var colSize = {
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2331
|
+
md: 'px-2.5 py-[9px] text-bia-base font-[350]',
|
|
2332
|
+
sm: 'px-2.5 py-[7px] text-bia-sm',
|
|
2333
|
+
tn: 'px-2.5 py-[3px] text-bia-sm',
|
|
2339
2334
|
};
|
|
2340
2335
|
var tableClass = {
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2336
|
+
md: 'text-bia-base',
|
|
2337
|
+
sm: 'text-bia-sm',
|
|
2338
|
+
tn: 'text-bia-sm',
|
|
2344
2339
|
};
|
|
2345
2340
|
|
|
2346
2341
|
function Table(_a) {
|
|
2347
|
-
var _b = _a.tableSize, tableSize = _b === void 0 ? '
|
|
2342
|
+
var _b = _a.tableSize, tableSize = _b === void 0 ? 'md' : _b, className = _a.className, children = _a.children;
|
|
2348
2343
|
return (React.createElement("table", { className: "table table-auto w-full font-['Segoe UI'] leading-[21px] rounded-[5px] ".concat(tableClass[tableSize], " ").concat(className, "}") }, children));
|
|
2349
2344
|
}
|
|
2350
2345
|
Table.defaultProps = {
|
|
2351
|
-
tableSize: '
|
|
2346
|
+
tableSize: 'md',
|
|
2352
2347
|
className: '',
|
|
2353
2348
|
};
|
|
2354
2349
|
|
|
@@ -2361,7 +2356,7 @@ TableRow.defaultProps = {
|
|
|
2361
2356
|
};
|
|
2362
2357
|
|
|
2363
2358
|
function TableCol(_a) {
|
|
2364
|
-
var _b = _a.variant, variant = _b === void 0 ? 'body' : _b, _c = _a.lined, lined = _c === void 0 ? false : _c, _d = _a.alignment, alignment = _d === void 0 ? 'left' : _d, className = _a.className, children = _a.children, _e = _a.size, size = _e === void 0 ? '
|
|
2359
|
+
var _b = _a.variant, variant = _b === void 0 ? 'body' : _b, _c = _a.lined, lined = _c === void 0 ? false : _c, _d = _a.alignment, alignment = _d === void 0 ? 'left' : _d, className = _a.className, children = _a.children, _e = _a.size, size = _e === void 0 ? 'md' : _e;
|
|
2365
2360
|
var borderBottom = lined ? 'border-b border-bia-grey' : '';
|
|
2366
2361
|
var defaultAlign = variant ? 'text-center' : 'text-left';
|
|
2367
2362
|
var columnClass = "p-0 ".concat(borderBottom, " ").concat(className, " ").concat(colSize[size], " ").concat(alignment ? colAlign[alignment] : defaultAlign);
|
|
@@ -2376,7 +2371,7 @@ TableCol.defaultProps = {
|
|
|
2376
2371
|
variant: 'body',
|
|
2377
2372
|
lined: false,
|
|
2378
2373
|
alignment: 'left',
|
|
2379
|
-
size: '
|
|
2374
|
+
size: 'md',
|
|
2380
2375
|
};
|
|
2381
2376
|
|
|
2382
2377
|
function TableHead(_a) {
|
|
@@ -2396,7 +2391,7 @@ TableBody.defaultProps = {
|
|
|
2396
2391
|
};
|
|
2397
2392
|
|
|
2398
2393
|
function TableDemo(_a) {
|
|
2399
|
-
var _b = _a.tableSize, tableSize = _b === void 0 ? '
|
|
2394
|
+
var _b = _a.tableSize, tableSize = _b === void 0 ? 'md' : _b;
|
|
2400
2395
|
return (React.createElement(Table, { tableSize: tableSize },
|
|
2401
2396
|
React.createElement("thead", null,
|
|
2402
2397
|
React.createElement(TableRow, null,
|
|
@@ -2416,7 +2411,7 @@ function TableDemo(_a) {
|
|
|
2416
2411
|
React.createElement(TableCol, { size: tableSize }, "Street Avenue no. 29")))));
|
|
2417
2412
|
}
|
|
2418
2413
|
TableDemo.defaultProps = {
|
|
2419
|
-
tableSize: '
|
|
2414
|
+
tableSize: 'md',
|
|
2420
2415
|
};
|
|
2421
2416
|
|
|
2422
2417
|
function TbCheck() {
|
|
@@ -2477,7 +2472,7 @@ function TbCloseable(_a) {
|
|
|
2477
2472
|
|
|
2478
2473
|
var TagLabelConfig = {
|
|
2479
2474
|
default: {
|
|
2480
|
-
|
|
2475
|
+
md: {
|
|
2481
2476
|
iconColor: 'text-white',
|
|
2482
2477
|
XColor: 'text-bia-coolgrey',
|
|
2483
2478
|
XcolorV: 'text-primary-black',
|
|
@@ -2503,7 +2498,7 @@ var TagLabelConfig = {
|
|
|
2503
2498
|
Xicon: TbCheckBlack,
|
|
2504
2499
|
},
|
|
2505
2500
|
},
|
|
2506
|
-
|
|
2501
|
+
sm: {
|
|
2507
2502
|
iconColor: 'text-white',
|
|
2508
2503
|
XColor: 'text-bia-coolgrey',
|
|
2509
2504
|
XcolorV: 'text-primary-black',
|
|
@@ -2529,7 +2524,7 @@ var TagLabelConfig = {
|
|
|
2529
2524
|
Xicon: TbCheckBlackSmall,
|
|
2530
2525
|
},
|
|
2531
2526
|
},
|
|
2532
|
-
|
|
2527
|
+
tn: {
|
|
2533
2528
|
iconColor: 'text-white',
|
|
2534
2529
|
XColor: 'text-bia-coolgrey',
|
|
2535
2530
|
XcolorV: 'text-primary-black',
|
|
@@ -2557,7 +2552,7 @@ var TagLabelConfig = {
|
|
|
2557
2552
|
},
|
|
2558
2553
|
},
|
|
2559
2554
|
blue: {
|
|
2560
|
-
|
|
2555
|
+
md: {
|
|
2561
2556
|
iconColor: 'text-bia-blue',
|
|
2562
2557
|
XColor: 'text-bia-blue-light-50',
|
|
2563
2558
|
XcolorV: 'text-white',
|
|
@@ -2583,7 +2578,7 @@ var TagLabelConfig = {
|
|
|
2583
2578
|
Xicon: TbCheck,
|
|
2584
2579
|
},
|
|
2585
2580
|
},
|
|
2586
|
-
|
|
2581
|
+
sm: {
|
|
2587
2582
|
iconColor: 'text-bia-blue',
|
|
2588
2583
|
XColor: 'text-white',
|
|
2589
2584
|
XcolorV: 'text-white',
|
|
@@ -2609,7 +2604,7 @@ var TagLabelConfig = {
|
|
|
2609
2604
|
Xicon: TbCheckWhiteSmall,
|
|
2610
2605
|
},
|
|
2611
2606
|
},
|
|
2612
|
-
|
|
2607
|
+
tn: {
|
|
2613
2608
|
iconColor: 'text-bia-blue',
|
|
2614
2609
|
XColor: 'text-white',
|
|
2615
2610
|
XcolorV: 'text-white',
|
|
@@ -2637,7 +2632,7 @@ var TagLabelConfig = {
|
|
|
2637
2632
|
},
|
|
2638
2633
|
},
|
|
2639
2634
|
teal: {
|
|
2640
|
-
|
|
2635
|
+
md: {
|
|
2641
2636
|
iconColor: 'text-bia-teal',
|
|
2642
2637
|
XColor: 'text-bia-teal-light-50',
|
|
2643
2638
|
XcolorV: 'text-white',
|
|
@@ -2663,7 +2658,7 @@ var TagLabelConfig = {
|
|
|
2663
2658
|
Xicon: TbCheck,
|
|
2664
2659
|
},
|
|
2665
2660
|
},
|
|
2666
|
-
|
|
2661
|
+
sm: {
|
|
2667
2662
|
iconColor: 'text-bia-teal',
|
|
2668
2663
|
XColor: 'text-white',
|
|
2669
2664
|
XcolorV: 'text-white',
|
|
@@ -2689,7 +2684,7 @@ var TagLabelConfig = {
|
|
|
2689
2684
|
Xicon: TbCheckWhiteSmall,
|
|
2690
2685
|
},
|
|
2691
2686
|
},
|
|
2692
|
-
|
|
2687
|
+
tn: {
|
|
2693
2688
|
iconColor: 'text-bia-teal',
|
|
2694
2689
|
XColor: 'text-white',
|
|
2695
2690
|
XcolorV: 'text-white',
|
|
@@ -2717,7 +2712,7 @@ var TagLabelConfig = {
|
|
|
2717
2712
|
},
|
|
2718
2713
|
},
|
|
2719
2714
|
green: {
|
|
2720
|
-
|
|
2715
|
+
md: {
|
|
2721
2716
|
iconColor: 'text-bia-green',
|
|
2722
2717
|
XColor: 'text-bia-green-light-50',
|
|
2723
2718
|
XcolorV: 'text-white',
|
|
@@ -2743,7 +2738,7 @@ var TagLabelConfig = {
|
|
|
2743
2738
|
Xicon: TbCheck,
|
|
2744
2739
|
},
|
|
2745
2740
|
},
|
|
2746
|
-
|
|
2741
|
+
sm: {
|
|
2747
2742
|
iconColor: 'text-bia-green',
|
|
2748
2743
|
XColor: 'text-white',
|
|
2749
2744
|
XcolorV: 'text-white',
|
|
@@ -2769,7 +2764,7 @@ var TagLabelConfig = {
|
|
|
2769
2764
|
Xicon: TbCheckWhiteSmall,
|
|
2770
2765
|
},
|
|
2771
2766
|
},
|
|
2772
|
-
|
|
2767
|
+
tn: {
|
|
2773
2768
|
iconColor: 'text-bia-green',
|
|
2774
2769
|
XColor: 'text-white',
|
|
2775
2770
|
XcolorV: 'text-white',
|
|
@@ -2797,7 +2792,7 @@ var TagLabelConfig = {
|
|
|
2797
2792
|
},
|
|
2798
2793
|
},
|
|
2799
2794
|
yellow: {
|
|
2800
|
-
|
|
2795
|
+
md: {
|
|
2801
2796
|
iconColor: 'text-bia-orange',
|
|
2802
2797
|
XColor: 'text-bia-orange-light-50',
|
|
2803
2798
|
XcolorV: 'text-white',
|
|
@@ -2823,7 +2818,7 @@ var TagLabelConfig = {
|
|
|
2823
2818
|
Xicon: TbCheck,
|
|
2824
2819
|
},
|
|
2825
2820
|
},
|
|
2826
|
-
|
|
2821
|
+
sm: {
|
|
2827
2822
|
iconColor: 'text-bia-orange',
|
|
2828
2823
|
XColor: 'text-white',
|
|
2829
2824
|
XcolorV: 'text-white',
|
|
@@ -2849,7 +2844,7 @@ var TagLabelConfig = {
|
|
|
2849
2844
|
Xicon: TbCheckWhiteSmall,
|
|
2850
2845
|
},
|
|
2851
2846
|
},
|
|
2852
|
-
|
|
2847
|
+
tn: {
|
|
2853
2848
|
iconColor: 'text-bia-orange',
|
|
2854
2849
|
XColor: 'text-white',
|
|
2855
2850
|
XcolorV: 'text-white',
|
|
@@ -2877,7 +2872,7 @@ var TagLabelConfig = {
|
|
|
2877
2872
|
},
|
|
2878
2873
|
},
|
|
2879
2874
|
red: {
|
|
2880
|
-
|
|
2875
|
+
md: {
|
|
2881
2876
|
iconColor: 'text-bia-red',
|
|
2882
2877
|
XColor: 'text-bia-red-light-50',
|
|
2883
2878
|
XcolorV: 'text-white',
|
|
@@ -2903,7 +2898,7 @@ var TagLabelConfig = {
|
|
|
2903
2898
|
Xicon: TbCheck,
|
|
2904
2899
|
},
|
|
2905
2900
|
},
|
|
2906
|
-
|
|
2901
|
+
sm: {
|
|
2907
2902
|
iconColor: 'text-bia-red',
|
|
2908
2903
|
XColor: 'text-white',
|
|
2909
2904
|
XcolorV: 'text-white',
|
|
@@ -2929,7 +2924,7 @@ var TagLabelConfig = {
|
|
|
2929
2924
|
Xicon: TbCheckWhiteSmall,
|
|
2930
2925
|
},
|
|
2931
2926
|
},
|
|
2932
|
-
|
|
2927
|
+
tn: {
|
|
2933
2928
|
iconColor: 'text-bia-red',
|
|
2934
2929
|
XColor: 'text-white',
|
|
2935
2930
|
XcolorV: 'text-white',
|
|
@@ -2957,7 +2952,7 @@ var TagLabelConfig = {
|
|
|
2957
2952
|
},
|
|
2958
2953
|
},
|
|
2959
2954
|
black: {
|
|
2960
|
-
|
|
2955
|
+
md: {
|
|
2961
2956
|
iconColor: 'text-[#2f2f2f]',
|
|
2962
2957
|
XColor: 'text-bia-coolgrey',
|
|
2963
2958
|
XcolorV: 'text-white',
|
|
@@ -2983,7 +2978,7 @@ var TagLabelConfig = {
|
|
|
2983
2978
|
Xicon: TbCheck,
|
|
2984
2979
|
},
|
|
2985
2980
|
},
|
|
2986
|
-
|
|
2981
|
+
sm: {
|
|
2987
2982
|
iconColor: 'text-[#2f2f2f]',
|
|
2988
2983
|
XColor: 'text-white',
|
|
2989
2984
|
XcolorV: 'text-white',
|
|
@@ -3009,7 +3004,7 @@ var TagLabelConfig = {
|
|
|
3009
3004
|
Xicon: TbCheckWhiteSmall,
|
|
3010
3005
|
},
|
|
3011
3006
|
},
|
|
3012
|
-
|
|
3007
|
+
tn: {
|
|
3013
3008
|
iconColor: 'text-[#2f2f2f]',
|
|
3014
3009
|
XColor: 'text-white',
|
|
3015
3010
|
XcolorV: 'text-white',
|
|
@@ -3037,7 +3032,7 @@ var TagLabelConfig = {
|
|
|
3037
3032
|
},
|
|
3038
3033
|
},
|
|
3039
3034
|
white: {
|
|
3040
|
-
|
|
3035
|
+
md: {
|
|
3041
3036
|
iconColor: 'text-white',
|
|
3042
3037
|
XColor: 'text-bia-grey-dark-30 group-focus:outline-2',
|
|
3043
3038
|
XcolorV: 'text-primary-black',
|
|
@@ -3063,7 +3058,7 @@ var TagLabelConfig = {
|
|
|
3063
3058
|
Xicon: TbCheckBlack,
|
|
3064
3059
|
},
|
|
3065
3060
|
},
|
|
3066
|
-
|
|
3061
|
+
sm: {
|
|
3067
3062
|
iconColor: 'text-white',
|
|
3068
3063
|
XColor: 'text-bia-grey-dark-30 group-focus:outline-2',
|
|
3069
3064
|
XcolorV: 'text-primary-black',
|
|
@@ -3089,7 +3084,7 @@ var TagLabelConfig = {
|
|
|
3089
3084
|
Xicon: TbCheckBlackSmall,
|
|
3090
3085
|
},
|
|
3091
3086
|
},
|
|
3092
|
-
|
|
3087
|
+
tn: {
|
|
3093
3088
|
iconColor: 'text-white',
|
|
3094
3089
|
XColor: 'text-bia-grey-dark-30 group-focus:outline-2',
|
|
3095
3090
|
XcolorV: 'text-primary-black',
|
|
@@ -3119,12 +3114,12 @@ var TagLabelConfig = {
|
|
|
3119
3114
|
};
|
|
3120
3115
|
|
|
3121
3116
|
function CloseIcon(_a) {
|
|
3122
|
-
var _b = _a.size, size = _b === void 0 ? '
|
|
3117
|
+
var _b = _a.size, size = _b === void 0 ? 'md' : _b;
|
|
3123
3118
|
var iconSize;
|
|
3124
|
-
if (size === '
|
|
3119
|
+
if (size === 'tn') {
|
|
3125
3120
|
iconSize = '10';
|
|
3126
3121
|
}
|
|
3127
|
-
else if (size === '
|
|
3122
|
+
else if (size === 'sm') {
|
|
3128
3123
|
iconSize = '10';
|
|
3129
3124
|
}
|
|
3130
3125
|
else {
|
|
@@ -3136,11 +3131,11 @@ function CloseIcon(_a) {
|
|
|
3136
3131
|
React.createElement("path", { d: "M6 6l12 12" })));
|
|
3137
3132
|
}
|
|
3138
3133
|
CloseIcon.defaultProps = {
|
|
3139
|
-
size: '
|
|
3134
|
+
size: 'md',
|
|
3140
3135
|
};
|
|
3141
3136
|
|
|
3142
3137
|
function TagLabel(_a) {
|
|
3143
|
-
var children = _a.children, _b = _a.closeHandler, closeHandler = _b === void 0 ? undefined : _b, _c = _a.size, size = _c === void 0 ? '
|
|
3138
|
+
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, isShow = _a.isShow, color = _a.color, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon;
|
|
3144
3139
|
var config = TagLabelConfig[color][size][variant];
|
|
3145
3140
|
var configIcon = TagLabelConfig[color][size];
|
|
3146
3141
|
var configbg = config.bg;
|
|
@@ -3152,9 +3147,9 @@ function TagLabel(_a) {
|
|
|
3152
3147
|
var configXcolorV = configIcon.XcolorV;
|
|
3153
3148
|
var iconColor = configIcon.iconColor;
|
|
3154
3149
|
var IconContainer = {
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3150
|
+
sm: 'h-[14px] w-[14px]',
|
|
3151
|
+
tn: 'h-[14px] w-[14px]',
|
|
3152
|
+
md: 'h-[20px] w-[20px]',
|
|
3158
3153
|
};
|
|
3159
3154
|
var renderIcon = function (icon) {
|
|
3160
3155
|
if (typeof icon === 'string') {
|
|
@@ -3162,10 +3157,10 @@ function TagLabel(_a) {
|
|
|
3162
3157
|
}
|
|
3163
3158
|
var IconComponent = icon;
|
|
3164
3159
|
var textSize;
|
|
3165
|
-
if (size === '
|
|
3160
|
+
if (size === 'md') {
|
|
3166
3161
|
textSize = 'text-[20px]';
|
|
3167
3162
|
}
|
|
3168
|
-
else if (size === '
|
|
3163
|
+
else if (size === 'sm' || size === 'tn') {
|
|
3169
3164
|
textSize = 'text-[14px]';
|
|
3170
3165
|
}
|
|
3171
3166
|
else {
|
|
@@ -3199,7 +3194,7 @@ function TagLabel(_a) {
|
|
|
3199
3194
|
// const closeableMode = variant === 'closeable';
|
|
3200
3195
|
// const iconMode = variant === 'icon';
|
|
3201
3196
|
var closeButtonException;
|
|
3202
|
-
if (size === '
|
|
3197
|
+
if (size === 'md') {
|
|
3203
3198
|
closeButtonException = '-mr-[2px]';
|
|
3204
3199
|
}
|
|
3205
3200
|
else {
|
|
@@ -3217,14 +3212,14 @@ function TagLabel(_a) {
|
|
|
3217
3212
|
return (React.createElement("div", { className: "flex items-center font-segoe font-normal justify-center ".concat(configradius, " ").concat(configtext, " ").concat(configbg, " ").concat(configpadding) },
|
|
3218
3213
|
variant === 'icon' ? (React.createElement("div", { className: "flex justify-center items-center ".concat(IconContainer[size]) }, leftIcon || renderIcon(configX))) : (React.createElement(React.Fragment, null,
|
|
3219
3214
|
React.createElement("span", null, leftIcon),
|
|
3220
|
-
React.createElement("div", { className: "flex justify-center items-center ".concat(size === '
|
|
3215
|
+
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))),
|
|
3221
3216
|
variant === 'label' && rightIcon && (React.createElement("div", { className: "flex justify-center items-center ".concat(IconContainer[size]) }, rightIcon)),
|
|
3222
|
-
variant === 'closeable' && closeHandler && (React.createElement("button", { type: "button", className: "flex justify-center items-center ".concat(size === '
|
|
3217
|
+
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(); } },
|
|
3223
3218
|
React.createElement(CloseIcon, { size: size })))));
|
|
3224
3219
|
}
|
|
3225
3220
|
TagLabel.defaultProps = {
|
|
3226
3221
|
variant: 'default',
|
|
3227
|
-
size: '
|
|
3222
|
+
size: 'sm',
|
|
3228
3223
|
isShow: true,
|
|
3229
3224
|
closeHandler: function () { },
|
|
3230
3225
|
rightIcon: null,
|