@epam/ai-dial-ui-kit 0.5.0-rc.82 → 0.5.0-rc.83

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.
@@ -2943,12 +2943,12 @@ const mw = {
2943
2943
  );
2944
2944
  };
2945
2945
  var Li = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Error = "error", e))(Li || {});
2946
- const Cw = {
2947
- info: /* @__PURE__ */ v(ig, { size: 24, stroke: 2 }),
2948
- error: /* @__PURE__ */ v(UC, { size: 24, stroke: 2 }),
2949
- warning: /* @__PURE__ */ v(_C, { size: 24, stroke: 2 }),
2950
- success: /* @__PURE__ */ v(WC, { size: 24, stroke: 2 })
2951
- }, vw = {
2946
+ const Cw = (e) => ({
2947
+ info: /* @__PURE__ */ v(ig, { ...e }),
2948
+ error: /* @__PURE__ */ v(UC, { ...e }),
2949
+ warning: /* @__PURE__ */ v(_C, { ...e }),
2950
+ success: /* @__PURE__ */ v(WC, { ...e })
2951
+ }), vw = {
2952
2952
  [Li.Info]: "bg-info border-info text-info",
2953
2953
  [Li.Success]: "bg-success border-success text-success",
2954
2954
  [Li.Warning]: "bg-warning border-warning text-warning",
@@ -2957,34 +2957,39 @@ const Cw = {
2957
2957
  variant: e = Li.Info,
2958
2958
  message: t,
2959
2959
  className: s,
2960
- closable: i = !1,
2961
- onClose: o
2962
- }) => /* @__PURE__ */ z(
2963
- "div",
2964
- {
2965
- role: "alert",
2966
- className: X(
2967
- ww,
2968
- vw[e],
2969
- s
2970
- ),
2971
- children: [
2972
- /* @__PURE__ */ z("div", { className: "flex items-center gap-2", children: [
2973
- /* @__PURE__ */ v(He, { icon: Cw[e] }),
2974
- /* @__PURE__ */ v("div", { className: "text-primary", children: t })
2975
- ] }),
2976
- i && /* @__PURE__ */ v(
2977
- Te,
2978
- {
2979
- className: "ml-2 text-secondary hover:text-primary",
2980
- "aria-label": "Close alert",
2981
- iconBefore: /* @__PURE__ */ v(no, { size: 16 }),
2982
- onClick: o
2983
- }
2984
- )
2985
- ]
2986
- }
2987
- ), bw = "flex items-center justify-center text-secondary", Sw = "shrink-0 grow-0 basis-auto animate-spin-steps", yw = (e) => /* @__PURE__ */ me.createElement("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ me.createElement("path", { d: "M24 39V46.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.4, d: "M9 24H1.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.5, d: "M8.0918 8.0918L13.3994 13.3994", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.6, d: "M24 1.5V9", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.7, d: "M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.8, d: "M46.5 24H39", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.9, d: "M34.6055 34.6055L39.9082 39.9082", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.3, d: "M13.3936 34.6055L8.08594 39.9131", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" })), qr = ({
2960
+ iconSize: i = 24,
2961
+ iconStroke: o = 2,
2962
+ closable: n = !1,
2963
+ onClose: r
2964
+ }) => {
2965
+ const a = B(() => Cw({ size: i, stroke: o })[e], [e, i, o]);
2966
+ return /* @__PURE__ */ z(
2967
+ "div",
2968
+ {
2969
+ role: "alert",
2970
+ className: fe(
2971
+ ww,
2972
+ vw[e],
2973
+ s
2974
+ ),
2975
+ children: [
2976
+ /* @__PURE__ */ z("div", { className: "flex items-center gap-2", children: [
2977
+ /* @__PURE__ */ v(He, { icon: a }),
2978
+ /* @__PURE__ */ v("div", { className: "text-primary", children: t })
2979
+ ] }),
2980
+ n && /* @__PURE__ */ v(
2981
+ Te,
2982
+ {
2983
+ className: "ml-2 text-secondary hover:text-primary",
2984
+ "aria-label": "Close alert",
2985
+ iconBefore: /* @__PURE__ */ v(no, { size: 16 }),
2986
+ onClick: r
2987
+ }
2988
+ )
2989
+ ]
2990
+ }
2991
+ );
2992
+ }, bw = "flex items-center justify-center text-secondary", Sw = "shrink-0 grow-0 basis-auto animate-spin-steps", yw = (e) => /* @__PURE__ */ me.createElement("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ me.createElement("path", { d: "M24 39V46.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.4, d: "M9 24H1.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.5, d: "M8.0918 8.0918L13.3994 13.3994", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.6, d: "M24 1.5V9", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.7, d: "M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.8, d: "M46.5 24H39", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.9, d: "M34.6055 34.6055L39.9082 39.9082", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ me.createElement("path", { opacity: 0.3, d: "M13.3936 34.6055L8.08594 39.9131", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" })), qr = ({
2988
2993
  size: e = 18,
2989
2994
  className: t,
2990
2995
  iconClassName: s,
@@ -1,10 +1,12 @@
1
- import { FC, ReactNode, MouseEvent } from 'react';
1
+ import { FC, MouseEvent, ReactNode } from 'react';
2
2
  import { AlertVariant } from '../../types/alert';
3
3
  export interface DialAlertProps {
4
4
  variant?: AlertVariant;
5
5
  message: string | ReactNode;
6
6
  className?: string;
7
7
  closable?: boolean;
8
+ iconSize?: number;
9
+ iconStroke?: number;
8
10
  onClose?: (e: MouseEvent<HTMLButtonElement>) => void;
9
11
  }
10
12
  /**
@@ -37,6 +39,8 @@ export interface DialAlertProps {
37
39
  * @param message - Message text to display inside the alert
38
40
  * @param [className] - Additional CSS classes applied to the alert container
39
41
  * @param [closable=false] - Whether the alert has a close button
42
+ * @param [iconSize=24] - Size of the icon displayed in the alert
43
+ * @param [iconStroke=2] - Stroke width of the icon displayed in the alert
40
44
  * @param [onClose] - Callback fired when the close button is clicked
41
45
  */
42
46
  export declare const DialAlert: FC<DialAlertProps>;
@@ -1,5 +1,8 @@
1
1
  import { AlertVariant } from '../../types/alert';
2
- import { ReactNode } from 'react';
3
- export declare const variantIcons: Record<AlertVariant, ReactNode>;
2
+ import { ReactNode } from '@tabler/icons-react';
3
+ export declare const variantIcons: (props: {
4
+ size: number;
5
+ stroke: number;
6
+ }) => Record<AlertVariant, ReactNode>;
4
7
  export declare const alertVariantClassNameMap: Record<AlertVariant, string>;
5
8
  export declare const alertBaseClassName = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.5.0-rc.82",
3
+ "version": "0.5.0-rc.83",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",