bianic-ui 1.5.1-beta.9 → 1.6.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.
Files changed (32) hide show
  1. package/dist/cjs/index.js +186 -88
  2. package/dist/cjs/lib.css +1 -1
  3. package/dist/cjs/types/components/Button/ButtonApp.d.ts +2 -1
  4. package/dist/cjs/types/components/Color.d.ts +1 -0
  5. package/dist/cjs/types/components/Forms/LiveSearch/PropsInterface.d.ts +1 -0
  6. package/dist/cjs/types/components/Forms/LiveSearch/index.d.ts +1 -1
  7. package/dist/cjs/types/components/Forms/TextArea/index.d.ts +2 -1
  8. package/dist/cjs/types/components/Forms/TextInput/index.d.ts +2 -1
  9. package/dist/cjs/types/components/Popover/configs.d.ts +20 -0
  10. package/dist/cjs/types/components/Popover/index.d.ts +3 -4
  11. package/dist/cjs/types/components/TagLabel/configs.d.ts +2 -2
  12. package/dist/cjs/types/components/TagLabel/index.d.ts +5 -4
  13. package/dist/cjs/types/stories/{Color.stories.d.ts → ColorPallete/Color.stories.d.ts} +2 -2
  14. package/dist/cjs/types/utility/helper.d.ts +3 -1
  15. package/dist/esm/index.js +187 -89
  16. package/dist/esm/lib.css +1 -1
  17. package/dist/esm/types/components/Button/ButtonApp.d.ts +2 -1
  18. package/dist/esm/types/components/Color.d.ts +1 -0
  19. package/dist/esm/types/components/Forms/LiveSearch/PropsInterface.d.ts +1 -0
  20. package/dist/esm/types/components/Forms/LiveSearch/index.d.ts +1 -1
  21. package/dist/esm/types/components/Forms/TextArea/index.d.ts +2 -1
  22. package/dist/esm/types/components/Forms/TextInput/index.d.ts +2 -1
  23. package/dist/esm/types/components/Popover/configs.d.ts +20 -0
  24. package/dist/esm/types/components/Popover/index.d.ts +3 -4
  25. package/dist/esm/types/components/TagLabel/configs.d.ts +2 -2
  26. package/dist/esm/types/components/TagLabel/index.d.ts +5 -4
  27. package/dist/esm/types/stories/{Color.stories.d.ts → ColorPallete/Color.stories.d.ts} +2 -2
  28. package/dist/esm/types/utility/helper.d.ts +3 -1
  29. package/dist/index.d.ts +16 -12
  30. package/package.json +1 -1
  31. package/src/style/color.css +626 -344
  32. package/tailwind.config.js +13 -13
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',
@@ -1468,9 +1484,9 @@ var colorConfig$1 = {
1468
1484
  };
1469
1485
 
1470
1486
  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"]);
1487
+ _a.icon; _a.isNotified; var _c = _a.isActive, isActive = _c === void 0 ? false : _c, disabled = _a.disabled, _d = _a.color, color = _d === void 0 ? 'green' : _d, label = _a.label, extended = _a.extended, rest = __rest(_a, ["icon", "isNotified", "isActive", "disabled", "color", "label", "extended"]);
1472
1488
  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));
1489
+ 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
1490
  };
1475
1491
 
1476
1492
  var textColorConfig = {
@@ -1496,47 +1512,115 @@ var ContextualButton = function (_a) {
1496
1512
  };
1497
1513
 
1498
1514
  function Color() {
1499
- var colorList = [
1500
- 'bg-bia-red',
1501
- 'bg-bia-red-light-10',
1502
- 'bg-bia-red-dark-10',
1503
- 'bg-bia-yellow',
1504
- 'bg-bia-yellow-light-10',
1505
- 'bg-bia-yellow-dark-10',
1506
- 'bg-bia-green',
1507
- 'bg-bia-green-light-10',
1508
- 'bg-bia-green-dark-10',
1509
- 'bg-bia-teal',
1510
- 'bg-bia-teal-light-10',
1511
- 'bg-bia-teal-dark-10',
1512
- 'bg-bia-blue',
1513
- 'bg-bia-blue-light-10',
1514
- 'bg-bia-blue-dark-10',
1515
- 'bg-bia-pink',
1516
- 'bg-bia-pink-light-10',
1517
- 'bg-bia-pink-dark-10',
1518
- 'bg-bia-coolgrey',
1519
- 'bg-bia-coolgrey-light-10',
1520
- 'bg-bia-coolgrey-dark-10',
1521
- 'bg-bia-orange',
1522
- 'bg-bia-orange-light-10',
1523
- 'bg-bia-orange-dark-10',
1524
- 'bg-bia-sky',
1525
- 'bg-bia-sky-light-10',
1526
- 'bg-bia-sky-dark-10',
1527
- 'bg-bia-olympicblue',
1528
- 'bg-bia-olympicblue-light-10',
1529
- 'bg-bia-olympicblue-dark-10',
1530
- 'bg-bia-verdantgreen',
1531
- 'bg-bia-verdantgreen-light-10',
1532
- 'bg-bia-verdantgreen-dark-10',
1533
- 'bg-bia-margueriteblue',
1534
- 'bg-bia-margueriteblue-light-10',
1535
- 'bg-bia-margueriteblue-dark-10',
1515
+ var colors = [
1516
+ {
1517
+ css: 'red',
1518
+ tailwind: 'red',
1519
+ },
1520
+ {
1521
+ css: 'orange',
1522
+ tailwind: 'orange',
1523
+ },
1524
+ {
1525
+ css: 'yellow',
1526
+ tailwind: 'yellow',
1527
+ },
1528
+ {
1529
+ css: 'green',
1530
+ tailwind: 'green',
1531
+ },
1532
+ {
1533
+ css: 'verdant',
1534
+ tailwind: 'verdantgreen',
1535
+ },
1536
+ {
1537
+ css: 'teal',
1538
+ tailwind: 'teal',
1539
+ },
1540
+ {
1541
+ css: 'marguerite',
1542
+ tailwind: 'margueriteblue',
1543
+ },
1544
+ {
1545
+ css: 'blue',
1546
+ tailwind: 'blue',
1547
+ },
1548
+ {
1549
+ css: 'olympic',
1550
+ tailwind: 'olympicblue',
1551
+ },
1552
+ {
1553
+ css: 'sky',
1554
+ tailwind: 'skyblue',
1555
+ },
1556
+ {
1557
+ css: 'coolgrey',
1558
+ tailwind: 'coolgrey',
1559
+ },
1560
+ {
1561
+ css: 'grey',
1562
+ tailwind: 'grey',
1563
+ },
1564
+ {
1565
+ css: 'pink',
1566
+ tailwind: 'pink',
1567
+ },
1568
+ ];
1569
+ var lightLevels = [
1570
+ 'light-90',
1571
+ 'light-80',
1572
+ 'light-70',
1573
+ 'light-60',
1574
+ 'light-50',
1575
+ 'light-40',
1576
+ 'light-30',
1577
+ 'light-20',
1578
+ 'light-10',
1579
+ 'primary',
1580
+ 'dark-10',
1581
+ 'dark-20',
1582
+ 'dark-30',
1583
+ 'dark-40',
1584
+ 'dark-50',
1585
+ 'dark-60',
1586
+ 'dark-70',
1587
+ 'dark-80',
1588
+ 'dark-90',
1536
1589
  ];
1537
- return (React.createElement("div", { className: "grid grid-rows-3 grid-flow-col gap-5" }, colorList.map(function (colorItem) { return (React.createElement("div", { className: "w-fit" },
1538
- React.createElement("div", { className: "w-20 aspect-square ".concat(colorItem) }),
1539
- React.createElement("span", { className: "text-size-base font-semibold whitespace-nowrap" }, colorItem))); })));
1590
+ var aliases = {
1591
+ 'light-90': 'pastel',
1592
+ 'light-50': 'disabled',
1593
+ 'light-10': 'hover',
1594
+ 'dark-10': 'active',
1595
+ };
1596
+ return (React.createElement("div", { className: "color-pallete flex flex-col gap-y-10" },
1597
+ React.createElement("div", { className: "flex gap-x-5 justify-center" },
1598
+ React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3" },
1599
+ React.createElement("div", { className: "text-center text-xs font-semibold" }, "Black"),
1600
+ React.createElement("div", { className: "aspect-square w-10 rounded-lg", style: {
1601
+ backgroundColor: "var(--primary-black)",
1602
+ } })),
1603
+ React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3" },
1604
+ React.createElement("div", { className: "text-center text-xs font-semibold" }, "White"),
1605
+ React.createElement("div", { className: "aspect-square w-10 rounded-lg border border-bia-black", style: {
1606
+ backgroundColor: "var(--primary-white)",
1607
+ } }))),
1608
+ React.createElement("div", { className: "flex gap-x-5" },
1609
+ React.createElement("div", { className: "flex flex-col items-end justify-center space-y-3" },
1610
+ React.createElement("div", { className: "h-10 min-w-10" }),
1611
+ lightLevels.map(function (level) { return (React.createElement("div", { key: level, className: "flex h-10 w-fit items-center justify-end" },
1612
+ React.createElement("div", { className: "whitespace-nowrap text-center text-xs font-semibold" }, aliases[level] ? "(".concat(aliases[level], ") ").concat(level) : level))); })),
1613
+ colors.map(function (color, index) {
1614
+ return (React.createElement("div", { className: "flex w-fit flex-col items-center gap-y-3", key: index },
1615
+ React.createElement("div", { className: "h-10 w-fit" },
1616
+ React.createElement("div", { className: "text-center text-xs font-semibold" }, color.tailwind)),
1617
+ lightLevels.map(function (level) {
1618
+ var suffix = level === 'primary' ? '' : "-".concat(level);
1619
+ return (React.createElement("div", { key: level, className: "aspect-square w-10 rounded-lg", style: {
1620
+ backgroundColor: "var(--".concat(color.css).concat(suffix, ")"),
1621
+ } }));
1622
+ })));
1623
+ }))));
1540
1624
  }
1541
1625
 
1542
1626
  var DividerConfig = {
@@ -1692,13 +1776,13 @@ function PasswordIcon(_a) {
1692
1776
  }
1693
1777
 
1694
1778
  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 ? '' : _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, props = __rest(_a, ["descText", "disabled", "icon", "id", "size", "isValid", "label", "placeholder", "readOnly", "required", "variant", "value", "onChange", "maxLength", "inputClassName", "isFlatRight", "actionElement"]);
1779
+ var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, icon = _a.icon, _c = _a.id, id = _c === void 0 ? '' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.isValid, isValid = _e === void 0 ? 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, _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
1780
  var isTransparent = variant.includes('transparent');
1697
- var _q = React.useState(false), isShow = _q[0], setIsShow = _q[1];
1698
- var _r = styleConfig[variant], fieldStyle = _r.fieldStyle, iconStyle = _r.iconStyle;
1699
- var _s = isTransparent
1781
+ var _r = React.useState(false), isShow = _r[0], setIsShow = _r[1];
1782
+ var _s = styleConfig[variant], fieldStyle = _s.fieldStyle, iconStyle = _s.iconStyle;
1783
+ var _t = isTransparent
1700
1784
  ? __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 = _s.iconSize, fieldSize = _s.fieldSize, iconPosition = _s.iconPosition;
1785
+ " pe-[".concat(9 + sizeConfig$b[size].iconSize, "px]") }) : sizeConfig$b[size], iconSize = _t.iconSize, fieldSize = _t.fieldSize, iconPosition = _t.iconPosition;
1702
1786
  var borderStyle = isTransparent
1703
1787
  ? 'border-transparent bg-transparent' // customize border rule for transparent variant
1704
1788
  : 'border border-bia-grey-dark-10 bg-primary-white';
@@ -1735,7 +1819,7 @@ function TextInput(_a) {
1735
1819
  label,
1736
1820
  required && React.createElement("span", { className: "p-1 text-bia-red" }, "*")),
1737
1821
  React.createElement("div", { className: "relative w-full" },
1738
- React.createElement("input", __assign({ className: "field 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 }, props)),
1822
+ React.createElement("input", __assign({ className: "field 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
1823
  React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 ".concat(actionElement ? '' : iconStyle, " ").concat(iconPosition, " ").concat(iconSizing) }, iconElement)),
1740
1824
  React.createElement("div", { className: "desc flex justify-between gap-1 text-xs ".concat(descColor) },
1741
1825
  descText && React.createElement("span", null, descText),
@@ -1815,7 +1899,7 @@ var ResizeIcon = function (_a) {
1815
1899
  };
1816
1900
 
1817
1901
  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"]);
1902
+ 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
1903
  var inputRow = rows !== null && rows !== void 0 ? rows : 4;
1820
1904
  var inputClass = sizeConfig$9[size].inputClass;
1821
1905
  var remainWords = maxLength ? maxLength - (value ? value.length : 0) : 0;
@@ -1825,7 +1909,7 @@ function TextArea(_a) {
1825
1909
  required && React.createElement("span", { className: "p-1 text-bia-red" }, "*")),
1826
1910
  React.createElement("div", { className: "relative h-full w-full min-w-[250px]" },
1827
1911
  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 }, props, { readOnly: readOnly }))),
1912
+ 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
1913
  React.createElement("div", { className: "desc flex justify-between gap-1 text-xs text-primary-cool" },
1830
1914
  descText && React.createElement("span", null, descText),
1831
1915
  maxLength && (React.createElement("span", null,
@@ -2043,9 +2127,9 @@ var sizeConfig$5 = {
2043
2127
 
2044
2128
  /* eslint-disable @typescript-eslint/no-explicit-any */
2045
2129
  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 _h = React.useState(false), isOpen = _h[0], setIsOpen = _h[1];
2048
- var _j = sizeConfig$5[size], iconClass = _j.iconClass, iconSize = _j.iconSize, inputClass = _j.inputClass;
2130
+ 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;
2131
+ var _j = React.useState(false), isOpen = _j[0], setIsOpen = _j[1];
2132
+ var _k = sizeConfig$5[size], iconClass = _k.iconClass, iconSize = _k.iconSize, inputClass = _k.inputClass;
2049
2133
  var inputRef = React.useRef(null);
2050
2134
  var handleOutsideClick = function (e) {
2051
2135
  if (inputRef.current && !inputRef.current.contains(e.target)) {
@@ -2069,7 +2153,7 @@ function LiveSearch(_a) {
2069
2153
  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
2154
  onChangeText(e);
2071
2155
  setValue({ id: null, label: e.target.value });
2072
- }, type: "search", readOnly: readOnly }),
2156
+ }, type: "search", readOnly: readOnly, autoComplete: autoComplete }),
2073
2157
  React.createElement("div", { className: "absolute inset-y-0 flex items-center pl-3 peer-hover:hidden peer-focus:hidden ".concat(iconClass) },
2074
2158
  React.createElement(TbZoom, { className: "text-primary-black", style: { fontSize: iconSize } })),
2075
2159
  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) {
@@ -2289,48 +2373,60 @@ Piils.defaultProps = {
2289
2373
 
2290
2374
  var classConfig$1 = {
2291
2375
  top: {
2292
- tooltipContainer: 'bottom-[100%] mb-[8px] left-1/2 -translate-x-1/2',
2376
+ tooltipContainer: 'bottom-[calc(100%+10px)] left-1/2 -translate-x-1/2',
2293
2377
  triangleContainer: 'left-0 -bottom-[4px] flex justify-center w-full h-auto',
2294
- triangleShape: 'w-[7.07px] h-[7.07px] border-l-[7.07px] border-l-transparent border-t-[7.07px] border-t-primary-black border-r-[7.07px] border-r-transparent',
2378
+ triangleShape: 'border-l-[8px] border-l-transparent border-t-[5px] border-t-primary-black border-r-[8px] border-r-transparent',
2295
2379
  },
2296
2380
  right: {
2297
- tooltipContainer: 'left-[100%] ms-[8px] top-1/2 -translate-y-1/2',
2381
+ tooltipContainer: 'left-[calc(100%+10px)] top-1/2 -translate-y-1/2',
2298
2382
  triangleContainer: '-left-[4px] bottom-0 flex items-center w-auto h-full',
2299
- triangleShape: 'w-[7.07px] h-[7.07px] border-t-[7.07px] border-t-transparent border-r-[7.07px] border-r-primary-black border-b-[7.07px] border-b-transparent',
2383
+ triangleShape: 'border-t-[8px] border-t-transparent border-r-[5px] border-r-primary-black border-b-[8px] border-b-transparent',
2300
2384
  },
2301
2385
  bottom: {
2302
- tooltipContainer: 'top-[100%] mt-[8px] left-1/2 -translate-x-1/2',
2303
- triangleContainer: 'left-0 -top-[4px] flex justify-center w-full h-auto',
2304
- triangleShape: 'w-[7.07px] h-[7.07px] mt-[-5px] border-l-[7.07px] border-l-transparent border-b-[7.07px] border-b-primary-black border-r-[7.07px] border-r-transparent',
2386
+ tooltipContainer: 'top-[calc(100%+10px)] left-1/2 -translate-x-1/2',
2387
+ triangleContainer: 'px-[10px] left-0 -top-[9px] flex justify-center w-full h-auto',
2388
+ triangleShape: 'border-l-[8px] border-l-transparent border-b-[5px] border-b-primary-black border-r-[8px] border-r-transparent',
2305
2389
  },
2306
2390
  left: {
2307
- tooltipContainer: 'right-[100%] me-[8px] top-1/2 -translate-y-1/2',
2391
+ tooltipContainer: 'right-[calc(100%+10px)] top-1/2 -translate-y-1/2',
2308
2392
  triangleContainer: '-right-[4px] bottom-0 flex items-center w-auto h-full',
2309
- triangleShape: 'w-[7.07px] h-[7.07px] border-t-[7.07px] border-t-transparent border-l-[7.07px] border-l-primary-black border-b-[7.07px] border-b-transparent',
2393
+ triangleShape: 'border-t-[8px] border-t-transparent border-l-[5px] border-l-primary-black border-b-[8px] border-b-transparent',
2394
+ },
2395
+ 'top-right': {
2396
+ tooltipContainer: 'bottom-[calc(100%+10px)] right-0',
2397
+ triangleContainer: 'px-[10px] left-0 -bottom-[4px] flex justify-end w-full h-auto',
2398
+ triangleShape: 'border-l-[8px] border-l-transparent border-t-[5px] border-t-primary-black border-r-[8px] border-r-transparent',
2399
+ },
2400
+ 'top-left': {
2401
+ tooltipContainer: 'bottom-[calc(100%+10px)] left-0',
2402
+ triangleContainer: 'px-[10px] left-0 -bottom-[4px] flex justify-start w-full h-auto',
2403
+ triangleShape: 'border-l-[8px] border-l-transparent border-t-[5px] border-t-primary-black border-r-[8px] border-r-transparent',
2404
+ },
2405
+ 'bottom-right': {
2406
+ tooltipContainer: 'top-[calc(100%+10px)] right-0',
2407
+ triangleContainer: 'px-[10px] left-0 -top-[9px] flex justify-end w-full h-auto',
2408
+ triangleShape: 'border-l-[8px] border-l-transparent border-b-[5px] border-b-primary-black border-r-[8px] border-r-transparent',
2409
+ },
2410
+ 'bottom-left': {
2411
+ tooltipContainer: 'top-[calc(100%+10px)] left-0',
2412
+ triangleContainer: 'px-[10px] left-0 -top-[9px] flex justify-start w-full h-auto',
2413
+ triangleShape: 'border-l-[8px] border-l-transparent border-b-[5px] border-b-primary-black border-r-[8px] border-r-transparent',
2310
2414
  },
2311
2415
  };
2312
2416
 
2313
2417
  function Popover(_a) {
2314
- 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, setOpen = _a.setOpen;
2315
- var timeout;
2316
- var showPopover = function () {
2317
- timeout = setTimeout(function () {
2318
- setOpen(true);
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 },
2418
+ 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;
2419
+ var wrapperRef = React.useRef(null);
2420
+ var _e = useDetectOutsideClick(wrapperRef, false), isOpen = _e[0], setIsOpen = _e[1];
2421
+ var _f = classConfig$1[direction], tooltipContainer = _f.tooltipContainer, triangleContainer = _f.triangleContainer, triangleShape = _f.triangleShape;
2422
+ return (React.createElement("div", { className: "Bianic-popover-Wrapper relative block h-fit w-fit", role: "button", ref: wrapperRef, onClick: function () { return setIsOpen(true); } },
2327
2423
  children,
2328
- 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) },
2424
+ 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
2425
  React.createElement("div", { className: "flex flex-col" },
2330
- React.createElement("div", { className: "text-[16px] leading-[19.42px] mb-[5px] font-humnst777 font-bold" }, title),
2331
- React.createElement("div", { className: "text-[12px] font-segoe font-normal break-words" }, content)),
2332
- React.createElement("div", { className: "absolute ".concat(triangleContainer) },
2333
- React.createElement("div", { className: "w-0 h-0 ".concat(triangleShape) }))))));
2426
+ React.createElement("div", { className: "mb-[5px] font-humnst777 text-[16px] font-bold leading-[19.42px]" }, title),
2427
+ React.createElement("div", { className: "break-words font-segoe text-[12px] font-normal" }, content)),
2428
+ React.createElement("div", { className: "triangle absolute ".concat(triangleContainer) },
2429
+ React.createElement("div", { className: "h-0 w-0 ".concat(triangleShape) }))))));
2334
2430
  }
2335
2431
  Popover.defaultProps = {
2336
2432
  delay: 400,
@@ -2652,7 +2748,8 @@ var colorConfig = {
2652
2748
  blue: 'bg-bia-blue text-primary-white',
2653
2749
  teal: 'bg-bia-teal text-primary-white',
2654
2750
  green: 'bg-bia-green text-primary-white',
2655
- yellow: 'bg-bia-yellow text-primary-white',
2751
+ // yellow: 'bg-bia-yellow text-primary-black',
2752
+ orange: 'bg-bia-orange text-primary-white',
2656
2753
  red: 'bg-bia-red text-primary-white',
2657
2754
  black: 'bg-primary-black text-primary-white',
2658
2755
  white: 'bg-primary-white text-primary-black border border-primary-black',
@@ -2693,7 +2790,7 @@ var colorUnion = [
2693
2790
  'blue',
2694
2791
  'teal',
2695
2792
  'green',
2696
- 'yellow',
2793
+ 'orange',
2697
2794
  'red',
2698
2795
  'black',
2699
2796
  'white',
@@ -2702,12 +2799,12 @@ var colorUnion = [
2702
2799
  var sizeUnion = ['md', 'sm', 'tn'];
2703
2800
  var variantUnion = ['label', 'icon', 'closeable'];
2704
2801
  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 bgColor = _a.bgColor, textColor = _a.textColor, isBlock = _a.isBlock, maxWidth = _a.maxWidth, isDark = _a.isDark, props = __rest(_a, ["color", "size", "variant", "closeHandler", "open", "text", "leftIcon", "rightIcon", "left", "right", "bgColor", "textColor", "isBlock", "maxWidth", "isDark"]);
2802
+ 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
2803
  var validatedColor = validUnion(color, colorUnion);
2707
2804
  var validatedSize = validUnion(size, sizeUnion);
2708
2805
  var validatedVariant = validUnion(variant, variantUnion);
2709
2806
  var containerRef = React.useRef(null);
2710
- var _c = React.useState(null), sizeCount = _c[0], setSizeCount = _c[1];
2807
+ var _e = React.useState(null), sizeCount = _e[0], setSizeCount = _e[1];
2711
2808
  React.useEffect(function () {
2712
2809
  if (variant === 'icon') {
2713
2810
  // Get the size of the icon
@@ -2724,13 +2821,14 @@ var TagLabel = function (_a) {
2724
2821
  }
2725
2822
  }, []);
2726
2823
  var defaultIconSize = validatedSize === 'md' ? 'text-xl' : 'text-sm';
2824
+ var borderColorRules = outlineColor || bgColor;
2727
2825
  var roundedClass = validatedVariant === 'icon' ? 'rounded-full' : 'rounded-[50px]';
2728
2826
  var sizeClass = validatedVariant === 'icon'
2729
2827
  ? iconOnlySizeConfig[validatedSize]
2730
2828
  : sizeConfig[validatedSize];
2731
2829
  var isCloseableClass = validatedVariant === 'closeable' && rightPaddingConfig[validatedSize];
2732
2830
  var colorClass = validatedColor === 'custom'
2733
- ? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor)
2831
+ ? "bg-bia-".concat(bgColor, " text-bia-").concat(textColor, " border border-bia-").concat(borderColorRules)
2734
2832
  : colorConfig[validatedColor];
2735
2833
  var blockclass = isBlock && validatedVariant !== 'icon' ? 'w-full' : "w-fit";
2736
2834
  var maxWidthStyle = !isBlock ? maxWidth + 'px' : '';
@@ -2767,8 +2865,8 @@ TagLabel.defaultProps = {
2767
2865
  rightIcon: null,
2768
2866
  left: null,
2769
2867
  right: null,
2770
- bgColor: null,
2771
- textColor: null,
2868
+ bgColor: 'grey-light-50',
2869
+ textColor: 'black',
2772
2870
  isBlock: false,
2773
2871
  maxWidth: 300,
2774
2872
  isDark: false,