bianic-ui 1.0.0-beta.30 → 1.0.0-beta.31

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 CHANGED
@@ -377,7 +377,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
377
377
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
378
378
  };
379
379
 
380
- var radiusConfig = {
380
+ var radiusConfig$1 = {
381
381
  default: {
382
382
  sm: 'rounded-radius-sm focus-visible:rounded-radius-sm',
383
383
  md: 'rounded-radius-md focus-visible:rounded-radius-md',
@@ -404,7 +404,7 @@ var iconOnlySizeConfig$1 = {
404
404
  tn: 'p-[4px] flex items-center justify-center gap-[3px]',
405
405
  };
406
406
  var shadow = 'shadow-[0px_6px_18px_1px_rgba(188,199,237,0.5)] disabled:shadow-none active:shadow-none';
407
- var variantConfig$1 = {
407
+ var variantConfig$2 = {
408
408
  default: "\n text-primary-black \n bg-bia-grey \n active:bg-bia-grey-dark-10 \n hover:bg-bia-grey-hover \n disabled:bg-bia-grey-disabled \n disabled:text-bia-grey-active \n disabled:cursor-not-allowed \n focus-visible:outline \n focus-visible:outline-offset-0 \n focus-visible:outline-bia-blue-light-50\n focus-visible:outline-[3px] \n focus-visible:rounded-md\n shadow-[0px_6px_18px_1px_#BCC7ED80] ".concat(shadow),
409
409
  primary: "\n text-primary-white \n bg-bia-blue \n active:bg-bia-blue-dark-10 \n hover:bg-bia-blue-hover \n disabled:bg-bia-blue-disabled \n disabled:text-bia-blue-light-90 \n disabled:cursor-not-allowed \n focus-visible:outline\n focus-visible:outline-offset-0\n focus-visible:outline-bia-blue-light-50 \n focus-visible:outline-[3px] \n focus-visible:rounded-md\n shadow-bia-blue-disabled ".concat(shadow),
410
410
  info: "\n text-primary-white \n bg-bia-teal \n active:bg-bia-teal-dark-10 \n hover:bg-bia-teal-hover \n disabled:bg-bia-teal-light-50 \n disabled:text-bia-teal-light-90 \n disabled:cursor-not-allowed \n focus-visible:outline \n focus-visible:outline-offset-0\n focus-visible:outline-bia-teal-light-50 \n focus-visible:outline-[3px] \n focus-visible:rounded-md \n shadow-bia-teal-disabled ".concat(shadow),
@@ -449,7 +449,7 @@ function Button(_a) {
449
449
  var sizeClass = label
450
450
  ? sizeConfig$b[validatedSize]
451
451
  : iconOnlySizeConfig$1[validatedSize];
452
- var classString = "\n ".concat(variantConfig$1[validatedVariant], " \n ").concat(sizeClass, " \n ").concat(radiusConfig[validatedRadius][validatedSize], " \n ").concat(className, "\n ");
452
+ var classString = "\n ".concat(variantConfig$2[validatedVariant], " \n ").concat(sizeClass, " \n ").concat(radiusConfig$1[validatedRadius][validatedSize], " \n ").concat(className, "\n ");
453
453
  return (React.createElement("button", __assign({ type: "button", className: "button flex justify-center items-center font-semibold ".concat(classString), disabled: disabled }, props),
454
454
  childrenElement(iconLeft || left),
455
455
  childrenElement(label),
@@ -565,7 +565,7 @@ Badge.defaultProps = {
565
565
  color: undefined,
566
566
  };
567
567
 
568
- var variantConfig = {
568
+ var variantConfig$1 = {
569
569
  black: {
570
570
  bg: 'bg-primary-black',
571
571
  active: 'active:bg-bia-coolgrey-dark-30 active:rounded-sm',
@@ -601,11 +601,11 @@ var variantConfig = {
601
601
  function Banner(_a) {
602
602
  var children = _a.children, _b = _a.closeable, closeable = _b === void 0 ? true : _b, _c = _a.variant, variant = _c === void 0 ? 'black' : _c, open = _a.open, onClose = _a.onClose;
603
603
  if (open) {
604
- return (React.createElement("div", { className: "w-full h-[42px] py-[22px] text-size-base font-semibold flex justify-center items-center text-white relative ".concat(variantConfig[variant].bg) },
604
+ return (React.createElement("div", { className: "w-full h-[42px] py-[22px] text-size-base font-semibold flex justify-center items-center text-white relative ".concat(variantConfig$1[variant].bg) },
605
605
  React.createElement("div", { className: "w-full flex justify-center items-center gap-[10px]" },
606
606
  React.createElement("div", { className: "font-semibold font-segoe text-[14px] leading-[21px]" }, children),
607
- React.createElement("div", { className: "flex items-center justify-center" }, closeable && (React.createElement("button", { className: "ml-auto text-xs outline-2 text-white absolute right-4 w-[18px] h-[18px] flex justify-center items-center ".concat(variantConfig[variant].focus), type: "button", onClick: function () { return onClose(false); } },
608
- React.createElement(TbX, { className: "text-[18px] ".concat(variantConfig[variant].hover, " ").concat(variantConfig[variant].active) })))))));
607
+ React.createElement("div", { className: "flex items-center justify-center" }, closeable && (React.createElement("button", { className: "ml-auto text-xs outline-2 text-white absolute right-4 w-[18px] h-[18px] flex justify-center items-center ".concat(variantConfig$1[variant].focus), type: "button", onClick: function () { return onClose(false); } },
608
+ React.createElement(TbX, { className: "text-[18px] ".concat(variantConfig$1[variant].hover, " ").concat(variantConfig$1[variant].active) })))))));
609
609
  }
610
610
  }
611
611
  Banner.defaultProps = {
@@ -2029,7 +2029,7 @@ function SegmentButtonSimulation(_a) {
2029
2029
  }
2030
2030
 
2031
2031
  function Modal(_a) {
2032
- var size = _a.size, title = _a.title, open = _a.open, onClose = _a.onClose, rest = __rest(_a, ["size", "title", "open", "onClose"]);
2032
+ var size = _a.size, title = _a.title, open = _a.open, zIndex = _a.zIndex, onClose = _a.onClose, rest = __rest(_a, ["size", "title", "open", "zIndex", "onClose"]);
2033
2033
  var modalSize;
2034
2034
  if (size === 'sm') {
2035
2035
  modalSize = 'w-[300px]';
@@ -2051,12 +2051,12 @@ function Modal(_a) {
2051
2051
  if (open) {
2052
2052
  return (
2053
2053
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
2054
- React.createElement("div", { className: "fixed inset-0 flex justify-center items-center bg-bia-black-transparent-75", id: "wrapper", onClick: handleClose },
2055
- React.createElement("div", { className: "modal flex flex-col gap-[20px] bg-white rounded-[5px] p-[20px] ".concat(modalSize) },
2054
+ React.createElement("div", { className: "fixed inset-0 flex items-center justify-center bg-bia-black-transparent-75", style: { zIndex: !zIndex && isNaN(zIndex) ? 'auto' : zIndex }, id: "wrapper", onClick: handleClose },
2055
+ React.createElement("div", { className: "modal flex flex-col gap-[20px] rounded-[5px] bg-white p-[20px] ".concat(modalSize) },
2056
2056
  React.createElement("div", { className: "flex justify-between" },
2057
- React.createElement("div", { className: " font-humnst777 font-bold text-[18px] leading-[21.85px] text-primary-black w-[260px] text-wrap" }, title),
2058
- React.createElement("button", { type: "button", title: "button", className: "w-[22px] h-[22px] rounded-radius-full flex items-center justify-center bg-bia-grey-light-50 hover:bg-bia-grey-light-30 cursor-pointer", onClick: function () { return onClose(); } },
2059
- React.createElement(TbX, { className: "text-bia-coolgrey text-[14px]" }))),
2057
+ React.createElement("div", { className: " w-[260px] text-wrap font-humnst777 text-[18px] font-bold leading-[21.85px] text-primary-black" }, title),
2058
+ React.createElement("button", { type: "button", title: "button", className: "flex h-[22px] w-[22px] cursor-pointer items-center justify-center rounded-radius-full bg-bia-grey-light-50 hover:bg-bia-grey-light-30", onClick: function () { return onClose(); } },
2059
+ React.createElement(TbX, { className: "text-[14px] text-bia-coolgrey" }))),
2060
2060
  React.createElement("div", { className: "flex flex-col gap-[20px]" }, rest.children))));
2061
2061
  }
2062
2062
  return null;
@@ -2401,6 +2401,60 @@ Tab.defaultProps = {
2401
2401
  card: false,
2402
2402
  };
2403
2403
 
2404
+ var radiusConfig = {
2405
+ none: '',
2406
+ all: 'rounded-radius-sm',
2407
+ top: 'rounded-t-radius-sm',
2408
+ right: 'rounded-tr-radius-sm',
2409
+ left: 'rounded-tl-radius-sm',
2410
+ };
2411
+ var variantConfig = {
2412
+ default: 'py-[7px] ps-[15px] pe-[10px] gap-[10px]',
2413
+ alternative: 'pt-[4px] pb-[4.8px] px-[20px] relative',
2414
+ };
2415
+ var defaultConfigs = {
2416
+ true: 'cursor-default bg-bia-grey-light-80 hover:bg-bia-coolgrey-light-90 text-primary-black ',
2417
+ false: 'cursor-pointer bg-bia-grey hover:bg-bia-grey-light-50 text-bia-coolgrey-dark-10',
2418
+ };
2419
+ var defaultButtonConfigs = {
2420
+ true: 'text-primary-black',
2421
+ false: 'text-primary-black',
2422
+ };
2423
+ var alternativeConfigs = {
2424
+ true: 'cursor-default bg-primary-white text-primary-black overflow-hidden',
2425
+ false: 'cursor-pointer bg-bia-verdantgreen-dark-40 hover:bg-bia-verdantgreen-dark-50 text-primary-white overflow-hidden',
2426
+ };
2427
+ var alternativeButtonConfigs = {
2428
+ true: 'absolute px-[5px] opacity-0 hover:opacity-100 grid-cols-2 gap-[2px] bg-gradient-to-l from-primary-white from-50% to-primary-white/[.0] inset-y-0 right-0',
2429
+ false: ' absolute px-[5px] opacity-0 hover:opacity-100 grid-cols-2 gap-[2px] bg-gradient-to-l from-bia-verdantgreen-dark-50 from-50% to-bia-verdantgreen-dark-50/[.0] inset-y-0 right-0',
2430
+ };
2431
+
2432
+ var TabMenu = function (_a) {
2433
+ var variant = _a.variant, _b = _a.text, text = _b === void 0 ? '' : _b, _c = _a.rounded, rounded = _c === void 0 ? 'none' : _c, _d = _a.isActive, isActive = _d === void 0 ? false : _d, _e = _a.onClose, onClose = _e === void 0 ? function () { } : _e, rest = __rest(_a, ["variant", "text", "rounded", "isActive", "onClose"]);
2434
+ // valiated parameter
2435
+ var validatedVariant = validUnion(variant, [
2436
+ 'default',
2437
+ 'alternative',
2438
+ ]);
2439
+ var validatedRadius = validUnion(rounded, ['none', 'all', 'top', 'right', 'left']);
2440
+ var usedBaseConfig;
2441
+ var usedButtonConfig;
2442
+ if (validatedVariant === 'alternative') {
2443
+ usedBaseConfig = alternativeConfigs[isActive];
2444
+ usedButtonConfig = alternativeButtonConfigs[isActive];
2445
+ }
2446
+ else {
2447
+ usedBaseConfig = defaultConfigs[isActive];
2448
+ usedButtonConfig = defaultButtonConfigs[isActive];
2449
+ }
2450
+ return (React.createElement("div", __assign({ className: "tab-menu flex flex-row text-size-tiny font-normal ".concat(radiusConfig[validatedRadius], " ").concat(variantConfig[validatedVariant], " ").concat(usedBaseConfig, " ") }, rest),
2451
+ text,
2452
+ React.createElement("div", { className: "grid ".concat(usedButtonConfig, " ") },
2453
+ validatedVariant === 'alternative' && React.createElement("div", { className: "order-first" }),
2454
+ React.createElement("button", { className: "order-last", onClick: onClose },
2455
+ React.createElement(TbX, { size: 14 })))));
2456
+ };
2457
+
2404
2458
  var colAlign = {
2405
2459
  middle: 'justify-center',
2406
2460
  right: 'justify-end',
@@ -2735,6 +2789,7 @@ exports.SelectInputSimulation = SelectInputSimulation;
2735
2789
  exports.Slider = Slider;
2736
2790
  exports.Spinner = Spinner;
2737
2791
  exports.Tab = Tab;
2792
+ exports.TabMenu = TabMenu;
2738
2793
  exports.Table = Table;
2739
2794
  exports.TableBody = TableBody;
2740
2795
  exports.TableCol = TableCol;