bianic-ui 1.5.1-beta.9 → 1.7.0
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 +212 -107
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +2 -14
- package/dist/cjs/types/components/Button/ButtonApp.d.ts +2 -1
- package/dist/cjs/types/components/Button/PropInterfaceButton.d.ts +14 -0
- package/dist/cjs/types/components/Button/buttonConfigs.d.ts +1 -0
- package/dist/cjs/types/components/Color.d.ts +1 -0
- package/dist/cjs/types/components/Forms/Group/FormGroup.d.ts +8 -0
- package/dist/cjs/types/components/Forms/Group/FormGroupButton.d.ts +5 -0
- package/dist/cjs/types/components/Forms/Group/FormGroupLabel.d.ts +9 -0
- package/dist/cjs/types/components/Forms/Group/Simulation.d.ts +6 -0
- package/dist/cjs/types/components/Forms/Group/configs.d.ts +4 -0
- package/dist/cjs/types/components/Forms/Group/index.d.ts +4 -0
- package/dist/cjs/types/components/Forms/LiveSearch/PropsInterface.d.ts +1 -0
- package/dist/cjs/types/components/Forms/LiveSearch/index.d.ts +1 -1
- package/dist/cjs/types/components/Forms/TextArea/index.d.ts +2 -1
- package/dist/cjs/types/components/Forms/TextInput/PropsInterface.d.ts +20 -0
- package/dist/cjs/types/components/Forms/TextInput/Simulation.d.ts +2 -1
- package/dist/cjs/types/components/Forms/TextInput/index.d.ts +4 -21
- package/dist/cjs/types/components/Icons/AlertRoundedSquare.d.ts +4 -0
- package/dist/cjs/types/components/Icons/CubeHeader.d.ts +4 -0
- package/dist/cjs/types/components/Icons/Discrepancy.d.ts +4 -0
- package/dist/cjs/types/components/Icons/FQAnalytical.d.ts +4 -0
- package/dist/cjs/types/components/Icons/FQGetaway.d.ts +4 -0
- package/dist/cjs/types/components/Icons/FQModeler.d.ts +4 -0
- package/dist/cjs/types/components/Icons/FQOperation.d.ts +4 -0
- package/dist/cjs/types/components/Icons/FQWelldone.d.ts +4 -0
- package/dist/cjs/types/components/Icons/Flowqount.d.ts +4 -0
- package/dist/cjs/types/components/Icons/Inlet.d.ts +4 -0
- package/dist/cjs/types/components/Icons/Legend.d.ts +4 -0
- package/dist/cjs/types/components/Icons/ModelBalance.d.ts +4 -0
- package/dist/cjs/types/components/Icons/Outlet.d.ts +4 -0
- package/dist/cjs/types/components/Icons/SelectAllAdd.d.ts +4 -0
- package/dist/cjs/types/components/Icons/SelectAllRemove.d.ts +4 -0
- package/dist/cjs/types/components/Icons/Spinner.d.ts +4 -0
- package/dist/cjs/types/components/Icons/Stack.d.ts +4 -0
- package/dist/cjs/types/components/Icons/index.d.ts +21 -4
- package/dist/cjs/types/components/Pills/Pills.d.ts +4 -3
- package/dist/cjs/types/components/Pills/config.d.ts +4 -0
- package/dist/cjs/types/components/Popover/configs.d.ts +20 -0
- package/dist/cjs/types/components/Popover/index.d.ts +3 -4
- package/dist/cjs/types/components/TagLabel/configs.d.ts +2 -2
- package/dist/cjs/types/components/TagLabel/index.d.ts +5 -4
- package/dist/cjs/types/stories/{Color.stories.d.ts → ColorPallete/Color.stories.d.ts} +2 -2
- package/dist/cjs/types/stories/Form/Group/GroupButton.stories.d.ts +17 -0
- package/dist/cjs/types/stories/Form/Group/SampleTest.stories.d.ts +13 -0
- package/dist/cjs/types/stories/Form/TextInput/TextInputSimulation.stories.d.ts +13 -0
- package/dist/cjs/types/stories/Icons/AlertRoundedSquare.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/CubeHeader.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/Discrepancy.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/FQAnalytical.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/FQGetaway.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/FQModeler.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/FQOperation.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/FQWelldone.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/Flowqount.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/Inlet.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/Legend.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/ModalBalance.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/Outlet.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/SelectAllAdd.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/SelectAllRemove.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/Spinner.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Icons/Stack.stories.d.ts +14 -0
- package/dist/cjs/types/utility/helper.d.ts +3 -1
- package/dist/esm/index.js +213 -108
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +2 -14
- package/dist/esm/types/components/Button/ButtonApp.d.ts +2 -1
- package/dist/esm/types/components/Button/PropInterfaceButton.d.ts +14 -0
- package/dist/esm/types/components/Button/buttonConfigs.d.ts +1 -0
- package/dist/esm/types/components/Color.d.ts +1 -0
- package/dist/esm/types/components/Forms/Group/FormGroup.d.ts +8 -0
- package/dist/esm/types/components/Forms/Group/FormGroupButton.d.ts +5 -0
- package/dist/esm/types/components/Forms/Group/FormGroupLabel.d.ts +9 -0
- package/dist/esm/types/components/Forms/Group/Simulation.d.ts +6 -0
- package/dist/esm/types/components/Forms/Group/configs.d.ts +4 -0
- package/dist/esm/types/components/Forms/Group/index.d.ts +4 -0
- package/dist/esm/types/components/Forms/LiveSearch/PropsInterface.d.ts +1 -0
- package/dist/esm/types/components/Forms/LiveSearch/index.d.ts +1 -1
- package/dist/esm/types/components/Forms/TextArea/index.d.ts +2 -1
- package/dist/esm/types/components/Forms/TextInput/PropsInterface.d.ts +20 -0
- package/dist/esm/types/components/Forms/TextInput/Simulation.d.ts +2 -1
- package/dist/esm/types/components/Forms/TextInput/index.d.ts +4 -21
- package/dist/esm/types/components/Icons/AlertRoundedSquare.d.ts +4 -0
- package/dist/esm/types/components/Icons/CubeHeader.d.ts +4 -0
- package/dist/esm/types/components/Icons/Discrepancy.d.ts +4 -0
- package/dist/esm/types/components/Icons/FQAnalytical.d.ts +4 -0
- package/dist/esm/types/components/Icons/FQGetaway.d.ts +4 -0
- package/dist/esm/types/components/Icons/FQModeler.d.ts +4 -0
- package/dist/esm/types/components/Icons/FQOperation.d.ts +4 -0
- package/dist/esm/types/components/Icons/FQWelldone.d.ts +4 -0
- package/dist/esm/types/components/Icons/Flowqount.d.ts +4 -0
- package/dist/esm/types/components/Icons/Inlet.d.ts +4 -0
- package/dist/esm/types/components/Icons/Legend.d.ts +4 -0
- package/dist/esm/types/components/Icons/ModelBalance.d.ts +4 -0
- package/dist/esm/types/components/Icons/Outlet.d.ts +4 -0
- package/dist/esm/types/components/Icons/SelectAllAdd.d.ts +4 -0
- package/dist/esm/types/components/Icons/SelectAllRemove.d.ts +4 -0
- package/dist/esm/types/components/Icons/Spinner.d.ts +4 -0
- package/dist/esm/types/components/Icons/Stack.d.ts +4 -0
- package/dist/esm/types/components/Icons/index.d.ts +21 -4
- package/dist/esm/types/components/Pills/Pills.d.ts +4 -3
- package/dist/esm/types/components/Pills/config.d.ts +4 -0
- package/dist/esm/types/components/Popover/configs.d.ts +20 -0
- package/dist/esm/types/components/Popover/index.d.ts +3 -4
- package/dist/esm/types/components/TagLabel/configs.d.ts +2 -2
- package/dist/esm/types/components/TagLabel/index.d.ts +5 -4
- package/dist/esm/types/stories/{Color.stories.d.ts → ColorPallete/Color.stories.d.ts} +2 -2
- package/dist/esm/types/stories/Form/Group/GroupButton.stories.d.ts +17 -0
- package/dist/esm/types/stories/Form/Group/SampleTest.stories.d.ts +13 -0
- package/dist/esm/types/stories/Form/TextInput/TextInputSimulation.stories.d.ts +13 -0
- package/dist/esm/types/stories/Icons/AlertRoundedSquare.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/CubeHeader.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/Discrepancy.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/FQAnalytical.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/FQGetaway.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/FQModeler.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/FQOperation.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/FQWelldone.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/Flowqount.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/Inlet.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/Legend.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/ModalBalance.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/Outlet.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/SelectAllAdd.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/SelectAllRemove.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/Spinner.stories.d.ts +14 -0
- package/dist/esm/types/stories/Icons/Stack.stories.d.ts +14 -0
- package/dist/esm/types/utility/helper.d.ts +3 -1
- package/dist/index.d.ts +29 -23
- package/package.json +1 -1
- package/src/style/color.css +626 -344
- package/tailwind.config.js +13 -13
- /package/dist/cjs/types/stories/FileTree/{FileTree.stories.d.ts → FIleTree.stories.d.ts} +0 -0
- /package/dist/esm/types/stories/FileTree/{FileTree.stories.d.ts → FIleTree.stories.d.ts} +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -263,6 +263,22 @@ var childrenElement = function (element) {
|
|
|
263
263
|
var validUnion = function (value, union) {
|
|
264
264
|
return union.includes(value) ? value : union[0];
|
|
265
265
|
};
|
|
266
|
+
var useDetectOutsideClick = function (ref, initialState) {
|
|
267
|
+
var _a = React.useState(initialState), isActive = _a[0], setIsActive = _a[1];
|
|
268
|
+
React.useEffect(function () {
|
|
269
|
+
var pageClickEvent = function (event) {
|
|
270
|
+
// If the active element exists and is clicked outside of
|
|
271
|
+
if (ref.current !== null && !ref.current.contains(event.target)) {
|
|
272
|
+
setIsActive(!isActive);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
// If the item is active (ie open) then listen for clicks
|
|
276
|
+
if (isActive)
|
|
277
|
+
window.addEventListener('click', pageClickEvent);
|
|
278
|
+
return function () { return window.removeEventListener('click', pageClickEvent); };
|
|
279
|
+
}, [isActive, ref]);
|
|
280
|
+
return [isActive, setIsActive];
|
|
281
|
+
};
|
|
266
282
|
|
|
267
283
|
var variantUnion$2 = [
|
|
268
284
|
'normal-text',
|
|
@@ -436,6 +452,7 @@ var variantConfig$2 = {
|
|
|
436
452
|
'success-outlined': "text-bia-green bg-primary-white bg-primary-white border-solid border border-bia-greenactive:text-bia-green-active active:bg-bia-green-pastel active:border-bia-green-active hover:text-bia-green-hover hover:border-bia-green-hover disabled:border-[1px] disabled:border-bia-green-light-50 disabled:text-bia-green-light-50 focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:outline-[3px] focus-visible:rounded-md focus-visible:outline-bia-green-light-50 focus-visible:border-none ",
|
|
437
453
|
'warning-outlined': "text-bia-orange bg-primary-white border-solid border border-bia-orange active:text-bia-orange-dark-10 active:bg-bia-orange-light-90 active:border-bia-orange-active active:outline-none hover:text-bia-orange-hover hover:border-bia-orange-hover disabled:border-[1px]disabled:border-bia-orange-light-50 disabled:text-bia-orange-light-50 focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:outline-[3px] focus-visible:rounded-md focus-visible:outline-bia-orange-light-50 focus-visible:border-none",
|
|
438
454
|
'danger-outlined': "text-bia-red border-solid border border-bia-red bg-primary-white active:text-bia-red-dark-10 active:border-bia-red-active active:bg-bia-red-light-90 active:border-bia-red-disabled hover:text-bia-red-hover hover:border-bia-red-hover disabled:border-[1px]disabled:border-bia-red-light-50 disabled:text-bia-red-light-50 focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:outline-[3px] focus-visible:rounded-md focus-visible:outline-bia-red-light-50 focus-visible:border-none \n ",
|
|
455
|
+
'form-group': "text-bia-black border-solid border border-bia-grey-dark-10 bg-bia-white active:bg-bia-grey-light-20 hover:bg-bia-grey-light-80 disabled:text-bia-grey-dark-10 focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:outline-[3px] focus-visible:rounded-md focus-visible:outline-bia-grey-dark-10 focus-visible:border-none \n ",
|
|
439
456
|
};
|
|
440
457
|
|
|
441
458
|
var variantUnion$1 = [
|
|
@@ -454,6 +471,7 @@ var variantUnion$1 = [
|
|
|
454
471
|
'primary-outlined',
|
|
455
472
|
'success-outlined',
|
|
456
473
|
'warning-outlined',
|
|
474
|
+
'form-group'
|
|
457
475
|
];
|
|
458
476
|
var radiusUnion = ['default', 'full-rounded'];
|
|
459
477
|
var sizeUnion$4 = ['md', 'lg', 'sm', 'tn'];
|
|
@@ -463,7 +481,7 @@ function Button(_a) {
|
|
|
463
481
|
var validatedSize = validUnion(size, sizeUnion$4);
|
|
464
482
|
var validatedRadius = validUnion(radius, radiusUnion);
|
|
465
483
|
var minWidthRules = minWidthConfig$1[size];
|
|
466
|
-
if (minWidth) {
|
|
484
|
+
if (minWidth !== undefined) {
|
|
467
485
|
minWidthRules = "min-w-[".concat(minWidth, "px]");
|
|
468
486
|
}
|
|
469
487
|
else if (variant.includes('link')) {
|
|
@@ -476,11 +494,11 @@ function Button(_a) {
|
|
|
476
494
|
else {
|
|
477
495
|
sizingRules = "".concat(sizeConfig$c[validatedSize], " ").concat(sidePaddingConfig[validatedSize]);
|
|
478
496
|
}
|
|
479
|
-
var sizeClass = label
|
|
497
|
+
var sizeClass = label || variant === 'form-group'
|
|
480
498
|
? " ".concat(minWidthRules, " ").concat(sizingRules)
|
|
481
499
|
: iconOnlySizeConfig$1[validatedSize];
|
|
482
500
|
var classString = "\n ".concat(variantConfig$2[validatedVariant], " \n ").concat(sizeClass, " \n ").concat(radiusConfig$1[validatedRadius][validatedSize], " \n ").concat(className, "\n ");
|
|
483
|
-
return (React.createElement("button", __assign({ type: "button", className: "button flex items-center justify-center font-semibold ".concat(classString), disabled: disabled }, props),
|
|
501
|
+
return (React.createElement("button", __assign({ type: "button", className: "bianic-button bianic-fgc-target flex items-center justify-center font-semibold ".concat(classString), disabled: disabled }, props),
|
|
484
502
|
childrenElement(iconLeft || left),
|
|
485
503
|
childrenElement(label),
|
|
486
504
|
childrenElement(iconRight || right)));
|
|
@@ -1468,9 +1486,9 @@ var colorConfig$1 = {
|
|
|
1468
1486
|
};
|
|
1469
1487
|
|
|
1470
1488
|
var ButtonApp = function (_a) {
|
|
1471
|
-
_a.icon; _a.isNotified; var _c = _a.isActive, isActive = _c === void 0 ? false : _c, disabled = _a.disabled, _d = _a.color, color = _d === void 0 ? 'green' : _d, label = _a.label, rest = __rest(_a, ["icon", "isNotified", "isActive", "disabled", "color", "label"]);
|
|
1489
|
+
_a.icon; _a.isNotified; var _c = _a.isActive, isActive = _c === void 0 ? false : _c, disabled = _a.disabled, _d = _a.color, color = _d === void 0 ? 'green' : _d, label = _a.label, extended = _a.extended, rest = __rest(_a, ["icon", "isNotified", "isActive", "disabled", "color", "label", "extended"]);
|
|
1472
1490
|
var buttonState = isActive ? 'active' : 'default';
|
|
1473
|
-
return (React.createElement("button", __assign({ className: "button-app px-[10px] pb-[8.8px] pt-[8px] text-size-tiny ".concat(colorConfig$1[color][buttonState], " "), type: "button", disabled: disabled }, rest), label));
|
|
1491
|
+
return (React.createElement("button", __assign({ className: "button-app px-[10px] pb-[8.8px] pt-[8px] text-size-tiny ".concat(colorConfig$1[color][buttonState], " ").concat(extended, " "), type: "button", disabled: disabled }, rest), label));
|
|
1474
1492
|
};
|
|
1475
1493
|
|
|
1476
1494
|
var textColorConfig = {
|
|
@@ -1496,47 +1514,115 @@ var ContextualButton = function (_a) {
|
|
|
1496
1514
|
};
|
|
1497
1515
|
|
|
1498
1516
|
function Color() {
|
|
1499
|
-
var
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1517
|
+
var colors = [
|
|
1518
|
+
{
|
|
1519
|
+
css: 'red',
|
|
1520
|
+
tailwind: 'red',
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
css: 'orange',
|
|
1524
|
+
tailwind: 'orange',
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
css: 'yellow',
|
|
1528
|
+
tailwind: 'yellow',
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
css: 'green',
|
|
1532
|
+
tailwind: 'green',
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
css: 'verdant',
|
|
1536
|
+
tailwind: 'verdantgreen',
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
css: 'teal',
|
|
1540
|
+
tailwind: 'teal',
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
css: 'marguerite',
|
|
1544
|
+
tailwind: 'margueriteblue',
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
css: 'blue',
|
|
1548
|
+
tailwind: 'blue',
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
css: 'olympic',
|
|
1552
|
+
tailwind: 'olympicblue',
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
css: 'sky',
|
|
1556
|
+
tailwind: 'skyblue',
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
css: 'coolgrey',
|
|
1560
|
+
tailwind: 'coolgrey',
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
css: 'grey',
|
|
1564
|
+
tailwind: 'grey',
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
css: 'pink',
|
|
1568
|
+
tailwind: 'pink',
|
|
1569
|
+
},
|
|
1570
|
+
];
|
|
1571
|
+
var lightLevels = [
|
|
1572
|
+
'light-90',
|
|
1573
|
+
'light-80',
|
|
1574
|
+
'light-70',
|
|
1575
|
+
'light-60',
|
|
1576
|
+
'light-50',
|
|
1577
|
+
'light-40',
|
|
1578
|
+
'light-30',
|
|
1579
|
+
'light-20',
|
|
1580
|
+
'light-10',
|
|
1581
|
+
'primary',
|
|
1582
|
+
'dark-10',
|
|
1583
|
+
'dark-20',
|
|
1584
|
+
'dark-30',
|
|
1585
|
+
'dark-40',
|
|
1586
|
+
'dark-50',
|
|
1587
|
+
'dark-60',
|
|
1588
|
+
'dark-70',
|
|
1589
|
+
'dark-80',
|
|
1590
|
+
'dark-90',
|
|
1536
1591
|
];
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1592
|
+
var aliases = {
|
|
1593
|
+
'light-90': 'pastel',
|
|
1594
|
+
'light-50': 'disabled',
|
|
1595
|
+
'light-10': 'hover',
|
|
1596
|
+
'dark-10': 'active',
|
|
1597
|
+
};
|
|
1598
|
+
return (React.createElement("div", { className: "color-pallete flex flex-col gap-y-10" },
|
|
1599
|
+
React.createElement("div", { className: "flex gap-x-5 justify-center" },
|
|
1600
|
+
React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3" },
|
|
1601
|
+
React.createElement("div", { className: "text-center text-xs font-semibold" }, "Black"),
|
|
1602
|
+
React.createElement("div", { className: "aspect-square w-10 rounded-lg", style: {
|
|
1603
|
+
backgroundColor: "var(--primary-black)",
|
|
1604
|
+
} })),
|
|
1605
|
+
React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3" },
|
|
1606
|
+
React.createElement("div", { className: "text-center text-xs font-semibold" }, "White"),
|
|
1607
|
+
React.createElement("div", { className: "aspect-square w-10 rounded-lg border border-bia-black", style: {
|
|
1608
|
+
backgroundColor: "var(--primary-white)",
|
|
1609
|
+
} }))),
|
|
1610
|
+
React.createElement("div", { className: "flex gap-x-5" },
|
|
1611
|
+
React.createElement("div", { className: "flex flex-col items-end justify-center space-y-3" },
|
|
1612
|
+
React.createElement("div", { className: "h-10 min-w-10" }),
|
|
1613
|
+
lightLevels.map(function (level) { return (React.createElement("div", { key: level, className: "flex h-10 w-fit items-center justify-end" },
|
|
1614
|
+
React.createElement("div", { className: "whitespace-nowrap text-center text-xs font-semibold" }, aliases[level] ? "(".concat(aliases[level], ") ").concat(level) : level))); })),
|
|
1615
|
+
colors.map(function (color, index) {
|
|
1616
|
+
return (React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3", key: index },
|
|
1617
|
+
React.createElement("div", { className: "h-10 w-fit" },
|
|
1618
|
+
React.createElement("div", { className: "text-center text-xs font-semibold" }, color.tailwind)),
|
|
1619
|
+
lightLevels.map(function (level) {
|
|
1620
|
+
var suffix = level === 'primary' ? '' : "-".concat(level);
|
|
1621
|
+
return (React.createElement("div", { key: level, className: "aspect-square w-10 rounded-lg", style: {
|
|
1622
|
+
backgroundColor: "var(--".concat(color.css).concat(suffix, ")"),
|
|
1623
|
+
} }));
|
|
1624
|
+
})));
|
|
1625
|
+
}))));
|
|
1540
1626
|
}
|
|
1541
1627
|
|
|
1542
1628
|
var DividerConfig = {
|
|
@@ -1692,13 +1778,13 @@ function PasswordIcon(_a) {
|
|
|
1692
1778
|
}
|
|
1693
1779
|
|
|
1694
1780
|
function TextInput(_a) {
|
|
1695
|
-
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 ?
|
|
1781
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? 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 ? undefined : _k, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.maxLength, maxLength = _m === void 0 ? undefined : _m, _o = _a.inputClassName, inputClassName = _o === void 0 ? '' : _o; _a.isFlatRight; var actionElement = _a.actionElement, _q = _a.autoComplete, autoComplete = _q === void 0 ? 'off' : _q, props = __rest(_a, ["descText", "disabled", "icon", "id", "size", "isValid", "label", "placeholder", "readOnly", "required", "variant", "value", "onChange", "maxLength", "inputClassName", "isFlatRight", "actionElement", "autoComplete"]);
|
|
1696
1782
|
var isTransparent = variant.includes('transparent');
|
|
1697
|
-
var
|
|
1698
|
-
var
|
|
1699
|
-
var
|
|
1783
|
+
var _r = React.useState(false), isShow = _r[0], setIsShow = _r[1];
|
|
1784
|
+
var _s = styleConfig[variant], fieldStyle = _s.fieldStyle, iconStyle = _s.iconStyle;
|
|
1785
|
+
var _t = isTransparent
|
|
1700
1786
|
? __assign(__assign({}, sizeConfig$b[size]), { iconPosition: "right-0 ", fieldSize: sizeConfig$b[size].fieldSize +
|
|
1701
|
-
" pe-[".concat(9 + sizeConfig$b[size].iconSize, "px]") }) : sizeConfig$b[size], iconSize =
|
|
1787
|
+
" pe-[".concat(9 + sizeConfig$b[size].iconSize, "px]") }) : sizeConfig$b[size], iconSize = _t.iconSize, fieldSize = _t.fieldSize, iconPosition = _t.iconPosition;
|
|
1702
1788
|
var borderStyle = isTransparent
|
|
1703
1789
|
? 'border-transparent bg-transparent' // customize border rule for transparent variant
|
|
1704
1790
|
: 'border border-bia-grey-dark-10 bg-primary-white';
|
|
@@ -1730,20 +1816,19 @@ function TextInput(_a) {
|
|
|
1730
1816
|
}
|
|
1731
1817
|
var extendedInputClassName = "".concat(fieldStyle, " ").concat(fieldSize, " ").concat(bottomBorderColor, " ").concat(inputClassName, " ").concat(borderStyle);
|
|
1732
1818
|
var labelStatus = readOnly ? 'read-only:pointer-events-none' : '';
|
|
1733
|
-
return (React.createElement("div", { className: "
|
|
1734
|
-
React.createElement("label", { htmlFor: id, className: "label text-xs font-semibold ".concat(labelStatus) },
|
|
1819
|
+
return (React.createElement("div", { className: "bianic-text-input-container bianic-fgc-container flex w-full flex-col gap-y-2 text-bia-black" },
|
|
1820
|
+
label && (React.createElement("label", { htmlFor: id, className: "bianic-text-input-label text-xs font-semibold ".concat(labelStatus) },
|
|
1735
1821
|
label,
|
|
1736
|
-
required && React.createElement("span", { className: "p-1 text-bia-red" }, "*")),
|
|
1822
|
+
required && React.createElement("span", { className: "p-1 text-bia-red" }, "*"))),
|
|
1737
1823
|
React.createElement("div", { className: "relative w-full" },
|
|
1738
|
-
React.createElement("input", __assign({ className: "
|
|
1824
|
+
React.createElement("input", __assign({ className: "bianic-text-input bianic-fgc-target w-full rounded read-only:pointer-events-none read-only:border-bia-grey-light-50 hover:rounded-b-none focus:rounded-b-none focus-visible:outline-none disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(extendedInputClassName), disabled: disabled, id: id, placeholder: placeholder || label, readOnly: readOnly, required: required, type: typeVariant, value: value, onChange: function (e) { return onChange(e); }, maxLength: maxLength, autoComplete: autoComplete }, props)),
|
|
1739
1825
|
React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(actionElement ? '' : iconStyle, " ").concat(iconPosition, " ").concat(iconSizing) }, iconElement)),
|
|
1740
|
-
React.createElement("div", { className: "desc flex justify-between gap-1 text-xs ".concat(descColor) },
|
|
1741
|
-
|
|
1826
|
+
(descText || maxLength) && (React.createElement("div", { className: "bianic-text-input-desc flex justify-between gap-1 text-xs ".concat(descColor) },
|
|
1827
|
+
React.createElement("span", null, descText),
|
|
1742
1828
|
maxLength && (React.createElement("span", null,
|
|
1743
1829
|
remainWords,
|
|
1744
1830
|
"/",
|
|
1745
|
-
maxLength
|
|
1746
|
-
' ')))));
|
|
1831
|
+
maxLength))))));
|
|
1747
1832
|
}
|
|
1748
1833
|
TextInput.defaultProps = {
|
|
1749
1834
|
descText: '',
|
|
@@ -1756,7 +1841,7 @@ TextInput.defaultProps = {
|
|
|
1756
1841
|
placeholder: '',
|
|
1757
1842
|
readOnly: false,
|
|
1758
1843
|
variant: 'text',
|
|
1759
|
-
value:
|
|
1844
|
+
value: undefined,
|
|
1760
1845
|
onChange: function () { },
|
|
1761
1846
|
inputClassName: '',
|
|
1762
1847
|
isFlatRight: false,
|
|
@@ -1815,7 +1900,7 @@ var ResizeIcon = function (_a) {
|
|
|
1815
1900
|
};
|
|
1816
1901
|
|
|
1817
1902
|
function TextArea(_a) {
|
|
1818
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, _d = _a.placeholder, placeholder = _d === void 0 ? '' : _d, required = _a.required, rows = _a.rows, _e = _a.maxLength, maxLength = _e === void 0 ? undefined : _e, value = _a.value, _f = _a.readOnly, readOnly = _f === void 0 ? false : _f, props = __rest(_a, ["descText", "disabled", "id", "size", "label", "placeholder", "required", "rows", "maxLength", "value", "readOnly"]);
|
|
1903
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, _d = _a.placeholder, placeholder = _d === void 0 ? '' : _d, required = _a.required, rows = _a.rows, _e = _a.maxLength, maxLength = _e === void 0 ? undefined : _e, value = _a.value, _f = _a.readOnly, readOnly = _f === void 0 ? false : _f, _g = _a.autoComplete, autoComplete = _g === void 0 ? 'off' : _g, props = __rest(_a, ["descText", "disabled", "id", "size", "label", "placeholder", "required", "rows", "maxLength", "value", "readOnly", "autoComplete"]);
|
|
1819
1904
|
var inputRow = rows !== null && rows !== void 0 ? rows : 4;
|
|
1820
1905
|
var inputClass = sizeConfig$9[size].inputClass;
|
|
1821
1906
|
var remainWords = maxLength ? maxLength - (value ? value.length : 0) : 0;
|
|
@@ -1825,7 +1910,7 @@ function TextArea(_a) {
|
|
|
1825
1910
|
required && React.createElement("span", { className: "p-1 text-bia-red" }, "*")),
|
|
1826
1911
|
React.createElement("div", { className: "relative h-full w-full min-w-[250px]" },
|
|
1827
1912
|
React.createElement(ResizeIcon, { className: "absolute bottom-[11px] right-[5px]" }),
|
|
1828
|
-
React.createElement("textarea", __assign({ className: "field w-full rounded border border-bia-grey-dark-10 bg-primary-white p-2.5 read-only:pointer-events-none focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(inputClass), rows: inputRow, id: id, placeholder: placeholder, disabled: disabled, maxLength: maxLength, value: value
|
|
1913
|
+
React.createElement("textarea", __assign({ className: "field bianic-text-area w-full rounded border border-bia-grey-dark-10 bg-primary-white p-2.5 read-only:pointer-events-none focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:bg-bia-grey-light-80 disabled:text-bia-grey-active ".concat(inputClass), rows: inputRow, id: id, placeholder: placeholder, disabled: disabled, maxLength: maxLength, value: value, autoComplete: autoComplete, readOnly: readOnly }, props))),
|
|
1829
1914
|
React.createElement("div", { className: "desc flex justify-between gap-1 text-xs text-primary-cool" },
|
|
1830
1915
|
descText && React.createElement("span", null, descText),
|
|
1831
1916
|
maxLength && (React.createElement("span", null,
|
|
@@ -2043,9 +2128,9 @@ var sizeConfig$5 = {
|
|
|
2043
2128
|
|
|
2044
2129
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2045
2130
|
function LiveSearch(_a) {
|
|
2046
|
-
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, _e = _a.readOnly, readOnly = _e === void 0 ? false : _e, _f = _a.onChangeText, onChangeText = _f === void 0 ? function () { } : _f, _g = _a.onClickDropdown, onClickDropdown = _g === void 0 ? function () { } : _g;
|
|
2047
|
-
var
|
|
2048
|
-
var
|
|
2131
|
+
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, _e = _a.readOnly, readOnly = _e === void 0 ? false : _e, _f = _a.onChangeText, onChangeText = _f === void 0 ? function () { } : _f, _g = _a.onClickDropdown, onClickDropdown = _g === void 0 ? function () { } : _g, _h = _a.autoComplete, autoComplete = _h === void 0 ? 'off' : _h;
|
|
2132
|
+
var _j = React.useState(false), isOpen = _j[0], setIsOpen = _j[1];
|
|
2133
|
+
var _k = sizeConfig$5[size], iconClass = _k.iconClass, iconSize = _k.iconSize, inputClass = _k.inputClass;
|
|
2049
2134
|
var inputRef = React.useRef(null);
|
|
2050
2135
|
var handleOutsideClick = function (e) {
|
|
2051
2136
|
if (inputRef.current && !inputRef.current.contains(e.target)) {
|
|
@@ -2069,7 +2154,7 @@ function LiveSearch(_a) {
|
|
|
2069
2154
|
React.createElement("input", { className: "field peer w-full rounded border border-bia-grey-dark-10 bg-primary-white read-only:pointer-events-none read-only:border-bia-grey-disabled focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:border-bia-grey-dark-10 disabled:bg-bia-grey-light-10 disabled:text-bia-coolgrey ".concat(inputClass), onClick: function () { return setIsOpen(!isOpen); }, value: value.label, required: required, disabled: disabled, id: id, placeholder: placeholder, onChange: function (e) {
|
|
2070
2155
|
onChangeText(e);
|
|
2071
2156
|
setValue({ id: null, label: e.target.value });
|
|
2072
|
-
}, type: "search", readOnly: readOnly }),
|
|
2157
|
+
}, type: "search", readOnly: readOnly, autoComplete: autoComplete }),
|
|
2073
2158
|
React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 peer-hover:hidden peer-focus:hidden ".concat(iconClass) },
|
|
2074
2159
|
React.createElement(TbZoom, { className: "text-primary-black", style: { fontSize: iconSize } })),
|
|
2075
2160
|
isOpen && (React.createElement("div", { className: "border-grey-100 absolute z-10 max-h-60 w-full overflow-y-auto rounded-b-md border bg-primary-white shadow-lg", onClick: onClickDropdown }, filteredOptions.map(function (option) {
|
|
@@ -2269,68 +2354,86 @@ var activeConfig = {
|
|
|
2269
2354
|
ActiveText: 'text-bia-coolgrey font-semibold',
|
|
2270
2355
|
},
|
|
2271
2356
|
};
|
|
2357
|
+
var sizingConfig = {
|
|
2358
|
+
small: 'px-[15px] py-[4.5px]',
|
|
2359
|
+
medium: 'px-[18px] py-[7.5px]',
|
|
2360
|
+
};
|
|
2272
2361
|
|
|
2273
|
-
function
|
|
2274
|
-
var title = _a.title, _b = _a.iconLeft, iconLeft = _b === void 0 ? null : _b, _c = _a.iconRight, iconRight = _c === void 0 ? null : _c, selected = _a.selected, onClick = _a.onClick, props = __rest(_a, ["title", "iconLeft", "iconRight", "selected", "onClick"]);
|
|
2275
|
-
var
|
|
2362
|
+
function Pills(_a) {
|
|
2363
|
+
var title = _a.title, _b = _a.iconLeft, iconLeft = _b === void 0 ? null : _b, _c = _a.iconRight, iconRight = _c === void 0 ? null : _c, selected = _a.selected, onClick = _a.onClick, _d = _a.size, size = _d === void 0 ? 'medium' : _d, props = __rest(_a, ["title", "iconLeft", "iconRight", "selected", "onClick", "size"]);
|
|
2364
|
+
var _e = activeConfig[String(selected)], ActiveContainer = _e.ActiveContainer, ActiveIcon = _e.ActiveIcon, ActiveText = _e.ActiveText, ActivePointer = _e.ActivePointer;
|
|
2276
2365
|
var disabledContainer = props.disabled ? 'opacity-50 ' : '';
|
|
2366
|
+
var sizingStyles = sizingConfig[size] || sizingConfig.medium;
|
|
2367
|
+
var textVariable = size === 'small' ? 'small-text-semibold' : 'normal-text-semibold';
|
|
2277
2368
|
return (React.createElement("div", { className: "flex justify-between" },
|
|
2278
2369
|
React.createElement("button", __assign({ type: "button", className: "flex ".concat(disabledContainer, " ").concat(ActiveContainer, " ").concat(props.disabled ? 'cursor-not-allowed' : ActivePointer, " cursor rounded-radius-full"), onClick: props.disabled ? function () { } : onClick, role: "button" }, props),
|
|
2279
|
-
React.createElement("div", { className: "flex
|
|
2370
|
+
React.createElement("div", { className: "flex items-center justify-center gap-[5px] ".concat(sizingStyles, " ").concat(ActiveText) },
|
|
2280
2371
|
iconLeft && React.createElement("div", { className: "icon ".concat(ActiveIcon) }, iconLeft),
|
|
2281
|
-
React.createElement("div", { className: "h-[21px]
|
|
2282
|
-
React.createElement(Text, { variant:
|
|
2372
|
+
React.createElement("div", { className: "flex h-[21px] items-center justify-center" },
|
|
2373
|
+
React.createElement(Text, { variant: textVariable }, title)),
|
|
2283
2374
|
iconRight && React.createElement("div", { className: "icon ".concat(ActiveIcon) }, iconRight)))));
|
|
2284
2375
|
}
|
|
2285
|
-
|
|
2376
|
+
Pills.defaultProps = {
|
|
2286
2377
|
iconLeft: null,
|
|
2287
2378
|
iconRight: null,
|
|
2288
2379
|
};
|
|
2289
2380
|
|
|
2290
2381
|
var classConfig$1 = {
|
|
2291
2382
|
top: {
|
|
2292
|
-
tooltipContainer: 'bottom-[100
|
|
2383
|
+
tooltipContainer: 'bottom-[calc(100%+10px)] left-1/2 -translate-x-1/2',
|
|
2293
2384
|
triangleContainer: 'left-0 -bottom-[4px] flex justify-center w-full h-auto',
|
|
2294
|
-
triangleShape: '
|
|
2385
|
+
triangleShape: 'border-l-[8px] border-l-transparent border-t-[5px] border-t-primary-black border-r-[8px] border-r-transparent',
|
|
2295
2386
|
},
|
|
2296
2387
|
right: {
|
|
2297
|
-
tooltipContainer: 'left-[100
|
|
2388
|
+
tooltipContainer: 'left-[calc(100%+10px)] top-1/2 -translate-y-1/2',
|
|
2298
2389
|
triangleContainer: '-left-[4px] bottom-0 flex items-center w-auto h-full',
|
|
2299
|
-
triangleShape: '
|
|
2390
|
+
triangleShape: 'border-t-[8px] border-t-transparent border-r-[5px] border-r-primary-black border-b-[8px] border-b-transparent',
|
|
2300
2391
|
},
|
|
2301
2392
|
bottom: {
|
|
2302
|
-
tooltipContainer: 'top-[100
|
|
2303
|
-
triangleContainer: 'left-0 -top-[
|
|
2304
|
-
triangleShape: '
|
|
2393
|
+
tooltipContainer: 'top-[calc(100%+10px)] left-1/2 -translate-x-1/2',
|
|
2394
|
+
triangleContainer: 'px-[10px] left-0 -top-[9px] flex justify-center w-full h-auto',
|
|
2395
|
+
triangleShape: 'border-l-[8px] border-l-transparent border-b-[5px] border-b-primary-black border-r-[8px] border-r-transparent',
|
|
2305
2396
|
},
|
|
2306
2397
|
left: {
|
|
2307
|
-
tooltipContainer: 'right-[100
|
|
2398
|
+
tooltipContainer: 'right-[calc(100%+10px)] top-1/2 -translate-y-1/2',
|
|
2308
2399
|
triangleContainer: '-right-[4px] bottom-0 flex items-center w-auto h-full',
|
|
2309
|
-
triangleShape: '
|
|
2400
|
+
triangleShape: 'border-t-[8px] border-t-transparent border-l-[5px] border-l-primary-black border-b-[8px] border-b-transparent',
|
|
2401
|
+
},
|
|
2402
|
+
'top-right': {
|
|
2403
|
+
tooltipContainer: 'bottom-[calc(100%+10px)] right-0',
|
|
2404
|
+
triangleContainer: 'px-[10px] left-0 -bottom-[4px] flex justify-end w-full h-auto',
|
|
2405
|
+
triangleShape: 'border-l-[8px] border-l-transparent border-t-[5px] border-t-primary-black border-r-[8px] border-r-transparent',
|
|
2406
|
+
},
|
|
2407
|
+
'top-left': {
|
|
2408
|
+
tooltipContainer: 'bottom-[calc(100%+10px)] left-0',
|
|
2409
|
+
triangleContainer: 'px-[10px] left-0 -bottom-[4px] flex justify-start w-full h-auto',
|
|
2410
|
+
triangleShape: 'border-l-[8px] border-l-transparent border-t-[5px] border-t-primary-black border-r-[8px] border-r-transparent',
|
|
2411
|
+
},
|
|
2412
|
+
'bottom-right': {
|
|
2413
|
+
tooltipContainer: 'top-[calc(100%+10px)] right-0',
|
|
2414
|
+
triangleContainer: 'px-[10px] left-0 -top-[9px] flex justify-end w-full h-auto',
|
|
2415
|
+
triangleShape: 'border-l-[8px] border-l-transparent border-b-[5px] border-b-primary-black border-r-[8px] border-r-transparent',
|
|
2416
|
+
},
|
|
2417
|
+
'bottom-left': {
|
|
2418
|
+
tooltipContainer: 'top-[calc(100%+10px)] left-0',
|
|
2419
|
+
triangleContainer: 'px-[10px] left-0 -top-[9px] flex justify-start w-full h-auto',
|
|
2420
|
+
triangleShape: 'border-l-[8px] border-l-transparent border-b-[5px] border-b-primary-black border-r-[8px] border-r-transparent',
|
|
2310
2421
|
},
|
|
2311
2422
|
};
|
|
2312
2423
|
|
|
2313
2424
|
function Popover(_a) {
|
|
2314
|
-
var children = _a.children, content = _a.content
|
|
2315
|
-
var
|
|
2316
|
-
var
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
}, delay);
|
|
2320
|
-
};
|
|
2321
|
-
var hidePopover = function () {
|
|
2322
|
-
clearInterval(timeout);
|
|
2323
|
-
setOpen(false);
|
|
2324
|
-
};
|
|
2325
|
-
var _e = classConfig$1[direction], tooltipContainer = _e.tooltipContainer, triangleContainer = _e.triangleContainer, triangleShape = _e.triangleShape;
|
|
2326
|
-
return (React.createElement("div", { className: "Popover-Wrapper relative block w-fit h-fit", onMouseEnter: showPopover, onMouseLeave: hidePopover },
|
|
2425
|
+
var children = _a.children, content = _a.content; _a.delay; var _c = _a.direction, direction = _c === void 0 ? 'bottom' : _c, _d = _a.title, title = _d === void 0 ? '' : _d; _a.maxWidth;
|
|
2426
|
+
var wrapperRef = React.useRef(null);
|
|
2427
|
+
var _e = useDetectOutsideClick(wrapperRef, false), isOpen = _e[0], setIsOpen = _e[1];
|
|
2428
|
+
var _f = classConfig$1[direction], tooltipContainer = _f.tooltipContainer, triangleContainer = _f.triangleContainer, triangleShape = _f.triangleShape;
|
|
2429
|
+
return (React.createElement("div", { className: "Bianic-popover-Wrapper relative block h-fit w-fit", role: "button", ref: wrapperRef, onClick: function () { return setIsOpen(true); } },
|
|
2327
2430
|
children,
|
|
2328
|
-
|
|
2431
|
+
isOpen && (React.createElement("div", { className: "Bianic-popover-Tip text-bia-sm absolute z-50 w-[245px] space-y-[5px] rounded-[4px] bg-primary-black px-[20px] py-[17.5px] text-primary-white ".concat(tooltipContainer) },
|
|
2329
2432
|
React.createElement("div", { className: "flex flex-col" },
|
|
2330
|
-
React.createElement("div", { className: "
|
|
2331
|
-
React.createElement("div", { className: "text-[12px] font-
|
|
2332
|
-
React.createElement("div", { className: "absolute ".concat(triangleContainer) },
|
|
2333
|
-
React.createElement("div", { className: "
|
|
2433
|
+
React.createElement("div", { className: "mb-[5px] font-humnst777 text-[16px] font-bold leading-[19.42px]" }, title),
|
|
2434
|
+
React.createElement("div", { className: "break-words font-segoe text-[12px] font-normal" }, content)),
|
|
2435
|
+
React.createElement("div", { className: "triangle absolute ".concat(triangleContainer) },
|
|
2436
|
+
React.createElement("div", { className: "h-0 w-0 ".concat(triangleShape) }))))));
|
|
2334
2437
|
}
|
|
2335
2438
|
Popover.defaultProps = {
|
|
2336
2439
|
delay: 400,
|
|
@@ -2652,7 +2755,8 @@ var colorConfig = {
|
|
|
2652
2755
|
blue: 'bg-bia-blue text-primary-white',
|
|
2653
2756
|
teal: 'bg-bia-teal text-primary-white',
|
|
2654
2757
|
green: 'bg-bia-green text-primary-white',
|
|
2655
|
-
yellow: 'bg-bia-yellow text-primary-
|
|
2758
|
+
// yellow: 'bg-bia-yellow text-primary-black',
|
|
2759
|
+
orange: 'bg-bia-orange text-primary-white',
|
|
2656
2760
|
red: 'bg-bia-red text-primary-white',
|
|
2657
2761
|
black: 'bg-primary-black text-primary-white',
|
|
2658
2762
|
white: 'bg-primary-white text-primary-black border border-primary-black',
|
|
@@ -2693,7 +2797,7 @@ var colorUnion = [
|
|
|
2693
2797
|
'blue',
|
|
2694
2798
|
'teal',
|
|
2695
2799
|
'green',
|
|
2696
|
-
'
|
|
2800
|
+
'orange',
|
|
2697
2801
|
'red',
|
|
2698
2802
|
'black',
|
|
2699
2803
|
'white',
|
|
@@ -2702,12 +2806,12 @@ var colorUnion = [
|
|
|
2702
2806
|
var sizeUnion = ['md', 'sm', 'tn'];
|
|
2703
2807
|
var variantUnion = ['label', 'icon', 'closeable'];
|
|
2704
2808
|
var TagLabel = function (_a) {
|
|
2705
|
-
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
|
|
2809
|
+
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 _c = _a.bgColor, bgColor = _c === void 0 ? 'grey-light-50' : _c, _d = _a.textColor, textColor = _d === void 0 ? 'black' : _d, outlineColor = _a.outlineColor, isBlock = _a.isBlock, maxWidth = _a.maxWidth, isDark = _a.isDark; _a.style; var props = __rest(_a, ["color", "size", "variant", "closeHandler", "open", "text", "leftIcon", "rightIcon", "left", "right", "bgColor", "textColor", "outlineColor", "isBlock", "maxWidth", "isDark", "style"]);
|
|
2706
2810
|
var validatedColor = validUnion(color, colorUnion);
|
|
2707
2811
|
var validatedSize = validUnion(size, sizeUnion);
|
|
2708
2812
|
var validatedVariant = validUnion(variant, variantUnion);
|
|
2709
2813
|
var containerRef = React.useRef(null);
|
|
2710
|
-
var
|
|
2814
|
+
var _e = React.useState(null), sizeCount = _e[0], setSizeCount = _e[1];
|
|
2711
2815
|
React.useEffect(function () {
|
|
2712
2816
|
if (variant === 'icon') {
|
|
2713
2817
|
// Get the size of the icon
|
|
@@ -2724,13 +2828,14 @@ var TagLabel = function (_a) {
|
|
|
2724
2828
|
}
|
|
2725
2829
|
}, []);
|
|
2726
2830
|
var defaultIconSize = validatedSize === 'md' ? 'text-xl' : 'text-sm';
|
|
2831
|
+
var borderColorRules = outlineColor || bgColor;
|
|
2727
2832
|
var roundedClass = validatedVariant === 'icon' ? 'rounded-full' : 'rounded-[50px]';
|
|
2728
2833
|
var sizeClass = validatedVariant === 'icon'
|
|
2729
2834
|
? iconOnlySizeConfig[validatedSize]
|
|
2730
2835
|
: sizeConfig[validatedSize];
|
|
2731
2836
|
var isCloseableClass = validatedVariant === 'closeable' && rightPaddingConfig[validatedSize];
|
|
2732
2837
|
var colorClass = validatedColor === 'custom'
|
|
2733
|
-
? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor)
|
|
2838
|
+
? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor, " border border-bia-").concat(borderColorRules)
|
|
2734
2839
|
: colorConfig[validatedColor];
|
|
2735
2840
|
var blockclass = isBlock && validatedVariant !== 'icon' ? 'w-full' : "w-fit";
|
|
2736
2841
|
var maxWidthStyle = !isBlock ? maxWidth + 'px' : '';
|
|
@@ -2767,8 +2872,8 @@ TagLabel.defaultProps = {
|
|
|
2767
2872
|
rightIcon: null,
|
|
2768
2873
|
left: null,
|
|
2769
2874
|
right: null,
|
|
2770
|
-
bgColor:
|
|
2771
|
-
textColor:
|
|
2875
|
+
bgColor: 'grey-light-50',
|
|
2876
|
+
textColor: 'black',
|
|
2772
2877
|
isBlock: false,
|
|
2773
2878
|
maxWidth: 300,
|
|
2774
2879
|
isDark: false,
|
|
@@ -2902,7 +3007,7 @@ exports.MenuItem = MenuItem;
|
|
|
2902
3007
|
exports.Modal = Modal;
|
|
2903
3008
|
exports.P = P;
|
|
2904
3009
|
exports.PaginationBar = PaginationBar;
|
|
2905
|
-
exports.Pills =
|
|
3010
|
+
exports.Pills = Pills;
|
|
2906
3011
|
exports.Popover = Popover;
|
|
2907
3012
|
exports.ProgressBar = ProgressBar;
|
|
2908
3013
|
exports.ProgressCircle = ProgressCircle;
|