bianic-ui 2.6.0-beta.0 → 2.6.0-beta.4

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.
@@ -2,9 +2,12 @@ import React, { ComponentPropsWithoutRef } from 'react';
2
2
  export interface AvatarProps extends ComponentPropsWithoutRef<'div'> {
3
3
  size?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
4
4
  variant?: 'image' | 'picture' | 'initial';
5
+ imageSrc: string;
5
6
  name?: string;
7
+ bgColor?: string;
8
+ outlineColor?: string;
6
9
  }
7
- declare function Avatar({ size, variant, name, }: AvatarProps): React.JSX.Element | null;
10
+ declare function Avatar({ size, variant, name, bgColor, outlineColor, className, }: AvatarProps): React.JSX.Element | null;
8
11
  declare namespace Avatar {
9
12
  var defaultProps: {
10
13
  name: string;
package/dist/esm/index.js CHANGED
@@ -559,30 +559,30 @@ Button.defaultProps = {
559
559
 
560
560
  var AvatarConfig = {
561
561
  sm: {
562
- picture: 'w-[24px] h-[24px] rounded-[12px] border-[1px] border-bia-coolgrey-light-90',
562
+ picture: 'w-[24px] h-[24px] rounded-[12px] border-[1px] ',
563
563
  'no picture': 'font-semibold text-[12px] leading-[15.96px] text-primary-white flex items-center',
564
564
  },
565
565
  md: {
566
- picture: 'w-[36px] h-[36px] rounded-[18px] border-[1px] border-bia-coolgrey-light-90',
566
+ picture: 'w-[36px] h-[36px] rounded-[18px] border-[1px] ',
567
567
  'no picture': 'font-semibold text-[14px] leading-[18.62px] text-primary-white flex items-center',
568
568
  },
569
569
  lg: {
570
- picture: 'w-[52px] h-[52px] rounded-[26px] border-[2px] border-bia-coolgrey-light-90',
570
+ picture: 'w-[52px] h-[52px] rounded-[26px] border-[2px]',
571
571
  'no picture': 'font-semibold text-[24px] leading-[31.92px] text-primary-white flex items-center',
572
572
  },
573
573
  xl: {
574
- picture: 'w-[92px] h-[92px] rounded-[46px] border-[3px] border-bia-coolgrey-light-90',
574
+ picture: 'w-[92px] h-[92px] rounded-[46px] border-[3px]',
575
575
  'no picture': 'font-semibold text-[36px] leading-[47.88px] text-primary-white flex items-center',
576
576
  },
577
577
  xxl: {
578
- picture: 'w-[160px] h-[160px] rounded-[80px] border-[5px] border-bia-coolgrey-light-90',
578
+ picture: 'w-[160px] h-[160px] rounded-[80px] border-[5px]',
579
579
  'no picture': 'font-semibold text-[64px] leading-[85.13px] text-primary-white flex items-center',
580
580
  },
581
581
  };
582
582
 
583
583
  function Avatar(_a) {
584
584
  var _b, _c, _d, _e;
585
- var _f = _a.size, size = _f === void 0 ? 'md' : _f, _g = _a.variant, variant = _g === void 0 ? 'initial' : _g, _h = _a.name, name = _h === void 0 ? 'Test' : _h;
585
+ var _f = _a.size, size = _f === void 0 ? 'md' : _f, _g = _a.variant, variant = _g === void 0 ? 'initial' : _g, _h = _a.name, name = _h === void 0 ? 'Test' : _h, _j = _a.bgColor, bgColor = _j === void 0 ? 'bia-sky-dark-40' : _j, _k = _a.outlineColor, outlineColor = _k === void 0 ? 'bia-coolgrey' : _k, className = _a.className;
586
586
  var getInitials = function (initial) {
587
587
  if (!initial)
588
588
  return '';
@@ -597,14 +597,14 @@ function Avatar(_a) {
597
597
  var avatarResult = null;
598
598
  switch (usedVariant) {
599
599
  case 'picture':
600
- avatarResult = (React.createElement("img", { src: "https://img.freepik.com/free-psd/girl-avatar-emoji-3d-icon_23-2150579870.jpg", alt: "avatar", className: "".concat((_b = AvatarConfig[usedSize]) === null || _b === void 0 ? void 0 : _b.picture) }));
600
+ avatarResult = (React.createElement("img", { src: "https://img.freepik.com/free-psd/girl-avatar-emoji-3d-icon_23-2150579870.jpg", alt: "avatar", className: "".concat((_b = AvatarConfig[usedSize]) === null || _b === void 0 ? void 0 : _b.picture, " ").concat(className) }));
601
601
  break;
602
602
  case 'initial':
603
- avatarResult = (React.createElement("div", { className: "".concat((_c = AvatarConfig[usedSize]) === null || _c === void 0 ? void 0 : _c.picture, " flex items-center justify-center bg-bia-sky") },
603
+ avatarResult = (React.createElement("div", { className: "".concat((_c = AvatarConfig[usedSize]) === null || _c === void 0 ? void 0 : _c.picture, " flex items-center justify-center border-").concat(outlineColor, " bg-").concat(bgColor, " ").concat(className) },
604
604
  React.createElement("div", { className: "".concat((_d = AvatarConfig[usedSize]) === null || _d === void 0 ? void 0 : _d['no picture']) }, getInitials(name))));
605
605
  break;
606
606
  case 'image':
607
- avatarResult = (React.createElement("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", className: "".concat((_e = AvatarConfig[usedSize]) === null || _e === void 0 ? void 0 : _e.picture, " flex items-center justify-center") },
607
+ avatarResult = (React.createElement("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", className: "".concat((_e = AvatarConfig[usedSize]) === null || _e === void 0 ? void 0 : _e.picture, " flex items-center justify-center ").concat(className) },
608
608
  React.createElement("rect", { width: "160", height: "160", fill: "url(#pattern0_9212_4625)" }),
609
609
  React.createElement("defs", null,
610
610
  React.createElement("pattern", { id: "pattern0_9212_4625", patternContentUnits: "objectBoundingBox", width: "1", height: "1" },
@@ -1534,7 +1534,7 @@ var colorConfig$2 = {
1534
1534
  var ButtonApp = function (_a) {
1535
1535
  _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"]);
1536
1536
  var buttonState = isActive ? 'active' : 'default';
1537
- return (React.createElement("button", __assign({ className: "button-app flex items-center justify-center px-[10px] pb-[8.3px] pt-[8.5px] font-arial text-size-tiny ".concat(colorConfig$2[color][buttonState], " ").concat(extended), type: "button", disabled: disabled }, rest), label));
1537
+ return (React.createElement("button", __assign({ className: "button-app flex max-h-[30px] items-center justify-center px-[10px] pb-[8.3px] pt-[8.5px] font-arial text-size-tiny ".concat(colorConfig$2[color][buttonState], " ").concat(extended), type: "button", disabled: disabled }, rest), label));
1538
1538
  };
1539
1539
 
1540
1540
  var textColorConfig = {