@epam/ai-dial-ui-kit 0.5.0-rc.37 → 0.5.0-rc.39
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/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +20 -29
- package/dist/src/components/Alert/Alert.d.ts +2 -2
- package/dist/src/components/Alert/constants.d.ts +2 -2
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +8 -8
- package/dist/src/components/DraggableItem/constants.d.ts +2 -2
- package/dist/src/components/Field/Field.d.ts +5 -7
- package/dist/src/components/Icon/Icon.d.ts +0 -1
- package/dist/src/components/Loader/Loader.d.ts +5 -5
- package/dist/src/components/Loader/constants.d.ts +2 -2
- package/package.json +1 -1
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -2872,24 +2872,24 @@ function be(...e) {
|
|
|
2872
2872
|
}
|
|
2873
2873
|
const Ko = ({
|
|
2874
2874
|
fieldTitle: e,
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2875
|
+
optional: t,
|
|
2876
|
+
optionalText: s,
|
|
2877
|
+
className: o,
|
|
2878
|
+
description: i,
|
|
2879
|
+
...n
|
|
2880
2880
|
}) => e ? /* @__PURE__ */ z(
|
|
2881
2881
|
"label",
|
|
2882
2882
|
{
|
|
2883
|
+
...n,
|
|
2883
2884
|
className: be(
|
|
2884
2885
|
"dial-tiny text-secondary flex gap-1",
|
|
2885
|
-
|
|
2886
|
-
!
|
|
2886
|
+
o,
|
|
2887
|
+
!o?.includes("mb") && "mb-2"
|
|
2887
2888
|
),
|
|
2888
|
-
htmlFor: t,
|
|
2889
2889
|
children: [
|
|
2890
2890
|
typeof e == "string" ? /* @__PURE__ */ v("span", { className: "min-h-4", children: e }) : e,
|
|
2891
|
-
|
|
2892
|
-
|
|
2891
|
+
t && /* @__PURE__ */ v("span", { children: s ?? "(Optional)" }),
|
|
2892
|
+
i && /* @__PURE__ */ v(Ts, { tooltip: i, children: /* @__PURE__ */ v(
|
|
2893
2893
|
Ne,
|
|
2894
2894
|
{
|
|
2895
2895
|
icon: /* @__PURE__ */ v(ch, { size: 14, className: "text-secondary" })
|
|
@@ -2955,7 +2955,7 @@ const Av = {
|
|
|
2955
2955
|
}, Ov = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex", M8 = ({
|
|
2956
2956
|
variant: e = bo.Info,
|
|
2957
2957
|
message: t,
|
|
2958
|
-
|
|
2958
|
+
className: s,
|
|
2959
2959
|
closable: o = !1,
|
|
2960
2960
|
onClose: i
|
|
2961
2961
|
}) => /* @__PURE__ */ z(
|
|
@@ -2978,15 +2978,15 @@ const Av = {
|
|
|
2978
2978
|
className: "ml-2 text-secondary hover:text-primary",
|
|
2979
2979
|
"aria-label": "Close alert",
|
|
2980
2980
|
iconBefore: /* @__PURE__ */ v(Uo, { size: 16 }),
|
|
2981
|
-
onClick:
|
|
2981
|
+
onClick: i
|
|
2982
2982
|
}
|
|
2983
2983
|
)
|
|
2984
2984
|
]
|
|
2985
2985
|
}
|
|
2986
2986
|
), Nv = "flex items-center justify-center text-secondary", Hv = "shrink-0 grow-0 basis-auto animate-spin-steps", Gv = (e) => /* @__PURE__ */ pe.createElement("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ pe.createElement("path", { d: "M24 39V46.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ pe.createElement("path", { opacity: 0.4, d: "M9 24H1.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ pe.createElement("path", { opacity: 0.5, d: "M8.0918 8.0918L13.3994 13.3994", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ pe.createElement("path", { opacity: 0.6, d: "M24 1.5V9", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ pe.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__ */ pe.createElement("path", { opacity: 0.8, d: "M46.5 24H39", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ pe.createElement("path", { opacity: 0.9, d: "M34.6055 34.6055L39.9082 39.9082", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ pe.createElement("path", { opacity: 0.3, d: "M13.3936 34.6055L8.08594 39.9131", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" })), Cr = ({
|
|
2987
2987
|
size: e = 18,
|
|
2988
|
-
|
|
2989
|
-
|
|
2988
|
+
className: t,
|
|
2989
|
+
iconClassName: s,
|
|
2990
2990
|
fullWidth: o = !0,
|
|
2991
2991
|
ariaLabel: i = "Loading"
|
|
2992
2992
|
}) => /* @__PURE__ */ v(
|
|
@@ -3319,7 +3319,7 @@ const Uv = "w-full flex", $v = {
|
|
|
3319
3319
|
fieldTitle: t,
|
|
3320
3320
|
optional: s,
|
|
3321
3321
|
optionalText: o,
|
|
3322
|
-
|
|
3322
|
+
className: be(
|
|
3323
3323
|
a && "sr-only",
|
|
3324
3324
|
c
|
|
3325
3325
|
),
|
|
@@ -5319,10 +5319,10 @@ function Wh(e, t) {
|
|
|
5319
5319
|
const fd = "column", X1 = "flex items-center", J1 = "mr-3 cursor-move text-secondary", A8 = ({
|
|
5320
5320
|
id: e,
|
|
5321
5321
|
children: t,
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5322
|
+
className: s,
|
|
5323
|
+
onFind: o,
|
|
5324
|
+
onMove: i,
|
|
5325
|
+
ariaLabel: n = "Drag item"
|
|
5326
5326
|
}) => {
|
|
5327
5327
|
const r = L(null), a = L(null), l = typeof o == "function" ? o(e) : -1, [{ isDragging: c }, d, u] = U1(
|
|
5328
5328
|
() => ({
|
|
@@ -5360,15 +5360,7 @@ const fd = "column", X1 = "flex items-center", J1 = "mr-3 cursor-move text-secon
|
|
|
5360
5360
|
style: { opacity: c ? 0 : 1 },
|
|
5361
5361
|
"aria-roledescription": "Draggable item",
|
|
5362
5362
|
children: [
|
|
5363
|
-
/* @__PURE__ */ v(
|
|
5364
|
-
"div",
|
|
5365
|
-
{
|
|
5366
|
-
ref: r,
|
|
5367
|
-
className: J1,
|
|
5368
|
-
"aria-label": n,
|
|
5369
|
-
children: /* @__PURE__ */ v(hC, { ...re })
|
|
5370
|
-
}
|
|
5371
|
-
),
|
|
5363
|
+
/* @__PURE__ */ v("div", { ref: r, className: J1, "aria-label": n, children: /* @__PURE__ */ v(hC, { ...re }) }),
|
|
5372
5364
|
t
|
|
5373
5365
|
]
|
|
5374
5366
|
}
|
|
@@ -5455,7 +5447,6 @@ const fd = "column", X1 = "flex items-center", J1 = "mr-3 cursor-move text-secon
|
|
|
5455
5447
|
Ne,
|
|
5456
5448
|
{
|
|
5457
5449
|
className: be("text-accent-primary", s),
|
|
5458
|
-
label: "Shared entity indicator",
|
|
5459
5450
|
icon: /* @__PURE__ */ v(
|
|
5460
5451
|
NC,
|
|
5461
5452
|
{
|
|
@@ -3,7 +3,7 @@ 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
8
|
onClose?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
9
9
|
}
|
|
@@ -35,7 +35,7 @@ export interface DialAlertProps {
|
|
|
35
35
|
*
|
|
36
36
|
* @param [variant=AlertVariant.Info] - Defines the visual style and icon of the alert
|
|
37
37
|
* @param message - Message text to display inside the alert
|
|
38
|
-
* @param [
|
|
38
|
+
* @param [className] - Additional CSS classes applied to the alert container
|
|
39
39
|
* @param [closable=false] - Whether the alert has a close button
|
|
40
40
|
* @param [onClose] - Callback fired when the close button is clicked
|
|
41
41
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AlertVariant } from '../../types/alert';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
export declare const variantIcons: Record<AlertVariant, ReactNode>;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
4
|
+
export declare const alertVariantClassNameMap: Record<AlertVariant, string>;
|
|
5
|
+
export declare const alertBaseClassName = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex";
|
|
@@ -2,10 +2,10 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
export interface DialDraggableItemProps {
|
|
3
3
|
id: string;
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
className?: string;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
onFind?: (field: string) => number;
|
|
8
|
+
onMove?: (field: string, atIndex: number) => void;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* A lightweight wrapper that makes its children sortable via drag-and-drop.
|
|
@@ -23,9 +23,9 @@ export interface DialDraggableItemProps {
|
|
|
23
23
|
*
|
|
24
24
|
* @param id - Unique identifier of the draggable item
|
|
25
25
|
* @param children - Content rendered within the draggable row
|
|
26
|
-
* @param [
|
|
27
|
-
* @param [
|
|
28
|
-
* @param [
|
|
29
|
-
* @param [
|
|
26
|
+
* @param [className] - Additional CSS classes applied to the root container
|
|
27
|
+
* @param [onFind] - Function to resolve an item's current index by id
|
|
28
|
+
* @param [onMove] - Function to move an item (by id) to a target index
|
|
29
|
+
* @param [ariaLabel='Drag item'] - Accessible label for the handle
|
|
30
30
|
*/
|
|
31
31
|
export declare const DialDraggableItem: FC<DialDraggableItemProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const DRAG_TYPE = "column";
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const containerBaseClassName = "flex items-center";
|
|
3
|
+
export declare const handleBaseClassName = "mr-3 cursor-move text-secondary";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
1
|
+
import { FC, LabelHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type NativeLabelProps = Omit<LabelHTMLAttributes<HTMLLabelElement>, 'children'>;
|
|
3
|
+
export interface DialFieldLabelProps extends NativeLabelProps {
|
|
3
4
|
fieldTitle?: string | ReactNode;
|
|
4
|
-
htmlFor: string;
|
|
5
5
|
optional?: boolean;
|
|
6
6
|
optionalText?: string;
|
|
7
|
-
|
|
8
|
-
description?: string;
|
|
7
|
+
description?: ReactNode;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
10
|
* A field label component
|
|
@@ -16,11 +15,10 @@ export interface DialFieldLabelProps {
|
|
|
16
15
|
* <DialFieldLabel htmlFor="email-input" fieldTitle="Email Address" />
|
|
17
16
|
* ```
|
|
18
17
|
*
|
|
19
|
-
* @param htmlFor - The ID of the form element this label is associated with
|
|
20
18
|
* @param [fieldTitle] - The title/label text to display for the field
|
|
21
19
|
* @param [optional=false] - Whether the field is optional (displays "(Optional)" text if optionalText is not provided)
|
|
22
20
|
* @param [optionalText="(Optional)"] - Custom text for optional indicator
|
|
23
|
-
* @param [cssClass] - Additional CSS classes to apply to the label element
|
|
24
21
|
* @param [description] - Additional description text, displayed below the label.
|
|
25
22
|
*/
|
|
26
23
|
export declare const DialFieldLabel: FC<DialFieldLabelProps>;
|
|
24
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
export interface DialLoaderProps {
|
|
3
3
|
size?: number;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
className?: string;
|
|
5
|
+
iconClassName?: string;
|
|
6
6
|
fullWidth?: boolean;
|
|
7
7
|
ariaLabel?: string;
|
|
8
8
|
}
|
|
@@ -20,12 +20,12 @@ export interface DialLoaderProps {
|
|
|
20
20
|
* <DialLoader fullWidth={false} />
|
|
21
21
|
*
|
|
22
22
|
* // Custom size and classes
|
|
23
|
-
* <DialLoader size={24}
|
|
23
|
+
* <DialLoader size={24} iconClassName="text-accent-primary" />
|
|
24
24
|
* ```
|
|
25
25
|
*
|
|
26
26
|
* @param [size=18] - Icon size in px
|
|
27
|
-
* @param [
|
|
28
|
-
* @param [
|
|
27
|
+
* @param [className] - Additional classes for the container
|
|
28
|
+
* @param [iconClassName] - Additional classes for the SVG icon
|
|
29
29
|
* @param [fullWidth=true] - Stretch to full width/height of container
|
|
30
30
|
* @param [ariaLabel='Loading'] - Accessible label for screen readers
|
|
31
31
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const loaderBaseClassName = "flex items-center justify-center text-secondary";
|
|
2
|
+
export declare const loaderIconBaseClassName = "shrink-0 grow-0 basis-auto animate-spin-steps";
|