@youngonesworks/ui 0.1.100 → 0.1.103

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.
@@ -1,9 +1,9 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { type HTMLAttributes } from 'react';
2
2
  type AlertType = 'success' | 'warning' | 'error';
3
3
  interface AlertProps extends HTMLAttributes<HTMLDivElement> {
4
4
  show: boolean;
5
5
  title: string;
6
- description?: string;
6
+ description?: string | React.ReactNode;
7
7
  type?: AlertType;
8
8
  button?: React.ReactNode;
9
9
  plain?: boolean;
@@ -1,6 +1,5 @@
1
- interface IAvatarIndicator {
1
+ interface IAvatarIndicator extends React.HTMLAttributes<HTMLDivElement> {
2
2
  indicatorCount?: number;
3
- className?: string;
4
3
  }
5
- export declare const AvatarIndicator: ({ indicatorCount, className }: IAvatarIndicator) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const AvatarIndicator: ({ indicatorCount, className, ...props }: IAvatarIndicator) => import("react/jsx-runtime").JSX.Element;
6
5
  export {};
package/dist/index.cjs CHANGED
@@ -245,7 +245,7 @@ const Alert = ({ show, title, description, type = "warning", button, plain = fal
245
245
  };
246
246
  const config = typeConfig[type];
247
247
  const { bg, iconColor, Icon } = config;
248
- const descriptionId = description ? `alert-desc` : undefined;
248
+ const descriptionId = description ? "alert-desc" : undefined;
249
249
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
250
250
  role: "alert",
251
251
  "aria-live": "assertive",
@@ -274,11 +274,15 @@ const Alert = ({ show, title, description, type = "warning", button, plain = fal
274
274
  children: title
275
275
  })]
276
276
  }),
277
- description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
277
+ description && (typeof description === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
278
278
  id: descriptionId,
279
279
  className: "text-sm text-color-gray-900",
280
280
  children: description
281
- }),
281
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
282
+ id: descriptionId,
283
+ className: "text-sm text-color-gray-900",
284
+ children: description
285
+ })),
282
286
  button && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: button })
283
287
  ]
284
288
  }), closable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
@@ -646,12 +650,13 @@ Avatar.displayName = "Avatar";
646
650
 
647
651
  //#endregion
648
652
  //#region src/components/avatarIndicator/index.tsx
649
- const AvatarIndicator = ({ indicatorCount, className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
650
- className: cn("inline-flex h-5 min-w-5 flex-col items-center justify-center gap-2.5 rounded border-2 border-solid border-white bg-blue-950 px-1.5", className),
653
+ const AvatarIndicator = ({ indicatorCount, className,...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
654
+ className: cn("grid h-5 min-w-5 w-fit flex-col place-content-center items-center justify-center rounded-full bg-white px-0.5", className),
651
655
  "data-component": "AvatarIndicator",
652
656
  "data-testid": "AvatarIndicator",
657
+ ...props,
653
658
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
654
- className: "font-['Gotham'] text-[10px] leading-[10px] font-bold text-white",
659
+ className: "font-['Gotham'] text-[10px] leading-[10px] text-black",
655
660
  children: `+${indicatorCount}`
656
661
  })
657
662
  });