@epam/ai-dial-ui-kit 0.5.0-rc.35 → 0.5.0-rc.36
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/README.md +3 -3
- package/dist/dial-ui-kit.cjs.js +3 -3
- package/dist/dial-ui-kit.es.js +62 -67
- package/dist/src/components/Button/Button.d.ts +10 -20
- package/dist/src/components/CloseButton/CloseButton.d.ts +3 -3
- package/dist/src/components/RemoveButton/RemoveButton.d.ts +6 -8
- package/package.json +1 -1
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -2905,43 +2905,38 @@ const kv = {
|
|
|
2905
2905
|
[He.Tertiary]: "dial-tertiary-button",
|
|
2906
2906
|
[He.Danger]: "dial-danger-button"
|
|
2907
2907
|
}, Ie = ({
|
|
2908
|
-
|
|
2908
|
+
label: e,
|
|
2909
2909
|
variant: t,
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
hideTitleOnMobile: c,
|
|
2918
|
-
ariaLabel: d,
|
|
2919
|
-
type: u = "button"
|
|
2910
|
+
className: s,
|
|
2911
|
+
textClassName: o,
|
|
2912
|
+
iconAfter: i,
|
|
2913
|
+
iconBefore: n,
|
|
2914
|
+
hideTitleOnMobile: r,
|
|
2915
|
+
type: a = "button",
|
|
2916
|
+
...l
|
|
2920
2917
|
}) => {
|
|
2921
|
-
const
|
|
2918
|
+
const c = Y(
|
|
2922
2919
|
"dial-small-semi",
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2920
|
+
i ? "mr-2" : "",
|
|
2921
|
+
n ? "ml-2" : "",
|
|
2922
|
+
r ? "hidden sm:inline" : "inline",
|
|
2926
2923
|
o
|
|
2927
|
-
),
|
|
2924
|
+
), d = Y(
|
|
2928
2925
|
t && kv[t],
|
|
2929
|
-
|
|
2930
|
-
|
|
2926
|
+
"focus-visible:outline outline-offset-0",
|
|
2927
|
+
s
|
|
2931
2928
|
);
|
|
2932
2929
|
return /* @__PURE__ */ z(
|
|
2933
2930
|
"button",
|
|
2934
2931
|
{
|
|
2935
|
-
|
|
2936
|
-
type:
|
|
2937
|
-
className:
|
|
2938
|
-
|
|
2939
|
-
disabled: r,
|
|
2940
|
-
"aria-label": e || d,
|
|
2932
|
+
...l,
|
|
2933
|
+
type: a,
|
|
2934
|
+
className: d,
|
|
2935
|
+
"aria-label": e || l["aria-label"],
|
|
2941
2936
|
children: [
|
|
2942
|
-
/* @__PURE__ */ v(Ne, { icon:
|
|
2943
|
-
e && /* @__PURE__ */ v("span", { className:
|
|
2944
|
-
/* @__PURE__ */ v(Ne, { icon:
|
|
2937
|
+
/* @__PURE__ */ v(Ne, { icon: n }),
|
|
2938
|
+
e && /* @__PURE__ */ v("span", { className: c, children: e }),
|
|
2939
|
+
/* @__PURE__ */ v(Ne, { icon: i })
|
|
2945
2940
|
]
|
|
2946
2941
|
}
|
|
2947
2942
|
);
|
|
@@ -2980,8 +2975,8 @@ const Av = {
|
|
|
2980
2975
|
o && /* @__PURE__ */ v(
|
|
2981
2976
|
Ie,
|
|
2982
2977
|
{
|
|
2983
|
-
|
|
2984
|
-
|
|
2978
|
+
className: "ml-2 text-secondary hover:text-primary",
|
|
2979
|
+
"aria-label": "Close alert",
|
|
2985
2980
|
iconBefore: /* @__PURE__ */ v(Uo, { size: 16 }),
|
|
2986
2981
|
onClick: (n) => i?.(n)
|
|
2987
2982
|
}
|
|
@@ -3528,7 +3523,7 @@ const jv = "flex", Kv = "pb-1 mt-2", qv = {
|
|
|
3528
3523
|
/* @__PURE__ */ v(
|
|
3529
3524
|
Ie,
|
|
3530
3525
|
{
|
|
3531
|
-
|
|
3526
|
+
className: "hover:text-icon-accent-primary p-1",
|
|
3532
3527
|
onClick: w,
|
|
3533
3528
|
iconBefore: f ? /* @__PURE__ */ v(dC, { size: i, stroke: n }) : /* @__PURE__ */ v(uC, { size: i, stroke: n })
|
|
3534
3529
|
}
|
|
@@ -5583,14 +5578,14 @@ const hb = Y(
|
|
|
5583
5578
|
"dial-small h-[34px] rounded text-primary"
|
|
5584
5579
|
), fb = "opacity-75 !cursor-not-allowed", mb = "text-error", Cb = "my-1 border-t border-hover border-secondary", ni = 4, qh = ({
|
|
5585
5580
|
ariaLabel: e,
|
|
5586
|
-
|
|
5581
|
+
className: t,
|
|
5587
5582
|
size: s = 24,
|
|
5588
5583
|
onClose: o
|
|
5589
5584
|
}) => /* @__PURE__ */ v(
|
|
5590
5585
|
Ie,
|
|
5591
5586
|
{
|
|
5592
|
-
|
|
5593
|
-
|
|
5587
|
+
"aria-label": e,
|
|
5588
|
+
className: be("text-secondary hover:text-accent-primary", t),
|
|
5594
5589
|
onClick: o,
|
|
5595
5590
|
iconBefore: /* @__PURE__ */ v(Uo, { size: s })
|
|
5596
5591
|
}
|
|
@@ -6017,7 +6012,7 @@ const vd = () => typeof window < "u" && window.innerWidth < 640, wd = () => {
|
|
|
6017
6012
|
Ie,
|
|
6018
6013
|
{
|
|
6019
6014
|
iconBefore: /* @__PURE__ */ v(mr, { size: 18 }),
|
|
6020
|
-
|
|
6015
|
+
className: Y(
|
|
6021
6016
|
"w-8 h-8 flex items-center justify-center rounded border",
|
|
6022
6017
|
c ? "bg-layer-4 border-transparent" : "border-primary"
|
|
6023
6018
|
)
|
|
@@ -6181,13 +6176,13 @@ const vd = () => typeof window < "u" && window.innerWidth < 640, wd = () => {
|
|
|
6181
6176
|
}
|
|
6182
6177
|
);
|
|
6183
6178
|
}, Pb = ({
|
|
6184
|
-
|
|
6179
|
+
iconClassName: e,
|
|
6185
6180
|
...t
|
|
6186
6181
|
}) => /* @__PURE__ */ v(
|
|
6187
6182
|
Ie,
|
|
6188
6183
|
{
|
|
6189
|
-
|
|
6190
|
-
...
|
|
6184
|
+
...t,
|
|
6185
|
+
iconBefore: /* @__PURE__ */ v(Vi, { ...re, className: e || "" })
|
|
6191
6186
|
}
|
|
6192
6187
|
), Tb = ({
|
|
6193
6188
|
value: e,
|
|
@@ -6635,7 +6630,7 @@ const Gb = "flex justify-end gap-2 px-6 py-4", Vb = "text-secondary dial-small-1
|
|
|
6635
6630
|
Ie,
|
|
6636
6631
|
{
|
|
6637
6632
|
variant: He.Secondary,
|
|
6638
|
-
|
|
6633
|
+
label: n,
|
|
6639
6634
|
onClick: () => h ? h() : d?.()
|
|
6640
6635
|
}
|
|
6641
6636
|
),
|
|
@@ -6643,9 +6638,9 @@ const Gb = "flex justify-end gap-2 px-6 py-4", Vb = "text-secondary dial-small-1
|
|
|
6643
6638
|
Ie,
|
|
6644
6639
|
{
|
|
6645
6640
|
variant: Sd[f].confirmVariant,
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6641
|
+
className: c,
|
|
6642
|
+
label: i,
|
|
6643
|
+
disabled: a,
|
|
6649
6644
|
onClick: () => u()
|
|
6650
6645
|
}
|
|
6651
6646
|
)
|
|
@@ -6827,7 +6822,7 @@ const Gb = "flex justify-end gap-2 px-6 py-4", Vb = "text-secondary dial-small-1
|
|
|
6827
6822
|
Ie,
|
|
6828
6823
|
{
|
|
6829
6824
|
variant: He.Secondary,
|
|
6830
|
-
|
|
6825
|
+
label: g,
|
|
6831
6826
|
onClick: E
|
|
6832
6827
|
}
|
|
6833
6828
|
),
|
|
@@ -6835,9 +6830,9 @@ const Gb = "flex justify-end gap-2 px-6 py-4", Vb = "text-secondary dial-small-1
|
|
|
6835
6830
|
Ie,
|
|
6836
6831
|
{
|
|
6837
6832
|
variant: He.Primary,
|
|
6838
|
-
|
|
6833
|
+
label: p,
|
|
6839
6834
|
onClick: R,
|
|
6840
|
-
|
|
6835
|
+
disabled: !f
|
|
6841
6836
|
}
|
|
6842
6837
|
)
|
|
6843
6838
|
] }),
|
|
@@ -6879,7 +6874,7 @@ const Gb = "flex justify-end gap-2 px-6 py-4", Vb = "text-secondary dial-small-1
|
|
|
6879
6874
|
Ie,
|
|
6880
6875
|
{
|
|
6881
6876
|
variant: He.Secondary,
|
|
6882
|
-
|
|
6877
|
+
label: o,
|
|
6883
6878
|
onClick: () => d ? d() : l?.()
|
|
6884
6879
|
}
|
|
6885
6880
|
),
|
|
@@ -6887,9 +6882,9 @@ const Gb = "flex justify-end gap-2 px-6 py-4", Vb = "text-secondary dial-small-1
|
|
|
6887
6882
|
Ie,
|
|
6888
6883
|
{
|
|
6889
6884
|
variant: He.Primary,
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6885
|
+
className: a,
|
|
6886
|
+
label: s,
|
|
6887
|
+
disabled: n,
|
|
6893
6888
|
onClick: () => c()
|
|
6894
6889
|
}
|
|
6895
6890
|
)
|
|
@@ -7376,8 +7371,8 @@ const o0 = ({
|
|
|
7376
7371
|
b && /* @__PURE__ */ v(
|
|
7377
7372
|
Ie,
|
|
7378
7373
|
{
|
|
7379
|
-
|
|
7380
|
-
|
|
7374
|
+
"aria-label": "Close select",
|
|
7375
|
+
className: "shrink-0",
|
|
7381
7376
|
iconBefore: /* @__PURE__ */ v(Uo, { size: 16 }),
|
|
7382
7377
|
onClick: (W) => {
|
|
7383
7378
|
x?.(W), O(!1);
|
|
@@ -8232,7 +8227,7 @@ const C0 = function(t, s, o) {
|
|
|
8232
8227
|
Ie,
|
|
8233
8228
|
{
|
|
8234
8229
|
variant: He.Tertiary,
|
|
8235
|
-
|
|
8230
|
+
label: o,
|
|
8236
8231
|
onClick: () => u.current?.click()
|
|
8237
8232
|
}
|
|
8238
8233
|
)
|
|
@@ -8288,7 +8283,7 @@ const C0 = function(t, s, o) {
|
|
|
8288
8283
|
}, c = (u) => /* @__PURE__ */ v(
|
|
8289
8284
|
Pb,
|
|
8290
8285
|
{
|
|
8291
|
-
|
|
8286
|
+
"aria-label": a,
|
|
8292
8287
|
onClick: (h) => l(h, u)
|
|
8293
8288
|
}
|
|
8294
8289
|
), d = (u) => {
|
|
@@ -8351,9 +8346,9 @@ const C0 = function(t, s, o) {
|
|
|
8351
8346
|
Ie,
|
|
8352
8347
|
{
|
|
8353
8348
|
variant: He.Tertiary,
|
|
8354
|
-
|
|
8349
|
+
className: "!text-error",
|
|
8355
8350
|
iconBefore: /* @__PURE__ */ v(Vi, { ...re }),
|
|
8356
|
-
|
|
8351
|
+
label: c,
|
|
8357
8352
|
onClick: p
|
|
8358
8353
|
}
|
|
8359
8354
|
),
|
|
@@ -8362,7 +8357,7 @@ const C0 = function(t, s, o) {
|
|
|
8362
8357
|
{
|
|
8363
8358
|
variant: He.Tertiary,
|
|
8364
8359
|
iconBefore: /* @__PURE__ */ v(BC, { ...re }),
|
|
8365
|
-
|
|
8360
|
+
label: d,
|
|
8366
8361
|
onClick: g
|
|
8367
8362
|
}
|
|
8368
8363
|
)
|
|
@@ -47840,7 +47835,7 @@ const Tm = () => {
|
|
|
47840
47835
|
children: /* @__PURE__ */ v(
|
|
47841
47836
|
Ie,
|
|
47842
47837
|
{
|
|
47843
|
-
|
|
47838
|
+
className: "h-[38px]",
|
|
47844
47839
|
iconBefore: /* @__PURE__ */ v(
|
|
47845
47840
|
mr,
|
|
47846
47841
|
{
|
|
@@ -47938,7 +47933,7 @@ const JA = ({ selectionLabel: e, onClearSelection: t, actions: s }) => {
|
|
|
47938
47933
|
Ie,
|
|
47939
47934
|
{
|
|
47940
47935
|
iconBefore: d,
|
|
47941
|
-
|
|
47936
|
+
label: u,
|
|
47942
47937
|
variant: He.Secondary,
|
|
47943
47938
|
hideTitleOnMobile: !0
|
|
47944
47939
|
},
|
|
@@ -47957,9 +47952,9 @@ const JA = ({ selectionLabel: e, onClearSelection: t, actions: s }) => {
|
|
|
47957
47952
|
/* @__PURE__ */ v("div", { ref: n, children: /* @__PURE__ */ v(
|
|
47958
47953
|
Ie,
|
|
47959
47954
|
{
|
|
47960
|
-
|
|
47955
|
+
label: e,
|
|
47961
47956
|
onClick: t,
|
|
47962
|
-
|
|
47957
|
+
textClassName: "text-accent-primary whitespace-nowrap",
|
|
47963
47958
|
variant: He.Tertiary,
|
|
47964
47959
|
iconBefore: /* @__PURE__ */ v(Uo, { ...re, className: "text-accent-primary" })
|
|
47965
47960
|
}
|
|
@@ -47973,7 +47968,7 @@ const JA = ({ selectionLabel: e, onClearSelection: t, actions: s }) => {
|
|
|
47973
47968
|
children: /* @__PURE__ */ v(
|
|
47974
47969
|
Ie,
|
|
47975
47970
|
{
|
|
47976
|
-
|
|
47971
|
+
className: "h-[38px]",
|
|
47977
47972
|
iconBefore: /* @__PURE__ */ v(
|
|
47978
47973
|
mr,
|
|
47979
47974
|
{
|
|
@@ -47988,12 +47983,12 @@ const JA = ({ selectionLabel: e, onClearSelection: t, actions: s }) => {
|
|
|
47988
47983
|
a.map(({ key: c, icon: d, title: u, onClick: h, disabled: g }) => /* @__PURE__ */ v(
|
|
47989
47984
|
Ie,
|
|
47990
47985
|
{
|
|
47991
|
-
|
|
47986
|
+
className: "!p-[9px]",
|
|
47992
47987
|
iconBefore: d,
|
|
47993
|
-
|
|
47988
|
+
label: u,
|
|
47994
47989
|
variant: He.Secondary,
|
|
47995
47990
|
hideTitleOnMobile: !0,
|
|
47996
|
-
|
|
47991
|
+
disabled: g,
|
|
47997
47992
|
onClick: (p) => h?.({ key: c, domEvent: p })
|
|
47998
47993
|
},
|
|
47999
47994
|
c
|
|
@@ -48737,7 +48732,7 @@ const u8 = ({
|
|
|
48737
48732
|
/* @__PURE__ */ v(
|
|
48738
48733
|
Ie,
|
|
48739
48734
|
{
|
|
48740
|
-
|
|
48735
|
+
className: "hover:text-icon-accent-primary p-1",
|
|
48741
48736
|
onClick: Um,
|
|
48742
48737
|
iconBefore: /* @__PURE__ */ v(jC, { size: 24, stroke: 1.5 })
|
|
48743
48738
|
}
|
|
@@ -48909,7 +48904,7 @@ const u8 = ({
|
|
|
48909
48904
|
/* @__PURE__ */ v(
|
|
48910
48905
|
Ie,
|
|
48911
48906
|
{
|
|
48912
|
-
|
|
48907
|
+
label: n,
|
|
48913
48908
|
variant: He.Tertiary,
|
|
48914
48909
|
iconBefore: /* @__PURE__ */ v(KC, { ...re })
|
|
48915
48910
|
}
|
|
@@ -48939,7 +48934,7 @@ const u8 = ({
|
|
|
48939
48934
|
Ie,
|
|
48940
48935
|
{
|
|
48941
48936
|
onClick: e,
|
|
48942
|
-
|
|
48937
|
+
label: "Cancel",
|
|
48943
48938
|
variant: He.Secondary
|
|
48944
48939
|
}
|
|
48945
48940
|
),
|
|
@@ -48947,7 +48942,7 @@ const u8 = ({
|
|
|
48947
48942
|
Ie,
|
|
48948
48943
|
{
|
|
48949
48944
|
onClick: t,
|
|
48950
|
-
|
|
48945
|
+
label: r === "copy" ? o : i,
|
|
48951
48946
|
variant: He.Primary
|
|
48952
48947
|
}
|
|
48953
48948
|
)
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ButtonHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';
|
|
2
2
|
import { ButtonVariant } from '../../types/button';
|
|
3
|
-
export interface DialButtonProps {
|
|
4
|
-
type?: 'button' | 'submit' | 'reset';
|
|
3
|
+
export interface DialButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
5
4
|
variant?: ButtonVariant;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
disable?: boolean;
|
|
9
|
-
title?: string;
|
|
5
|
+
textClassName?: string;
|
|
6
|
+
label?: string;
|
|
10
7
|
iconBefore?: ReactNode;
|
|
11
8
|
iconAfter?: ReactNode;
|
|
12
|
-
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
-
ref?: Ref<HTMLButtonElement>;
|
|
14
9
|
hideTitleOnMobile?: boolean;
|
|
15
|
-
ariaLabel?: string;
|
|
16
10
|
}
|
|
17
11
|
/**
|
|
18
12
|
* A Button component with flexible icon and text positioning
|
|
@@ -20,24 +14,20 @@ export interface DialButtonProps {
|
|
|
20
14
|
* @example
|
|
21
15
|
* ```tsx
|
|
22
16
|
* <DialButton
|
|
23
|
-
*
|
|
17
|
+
* label="Click me"
|
|
24
18
|
* onClick={handleClick}
|
|
25
19
|
* iconBefore={<Icon />}
|
|
26
|
-
*
|
|
20
|
+
* className="custom-button"
|
|
27
21
|
* />
|
|
28
22
|
* ```
|
|
29
23
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
24
|
+
* inherits all properties from the `ButtonHTMLAttributes<HTMLButtonElement>`
|
|
25
|
+
*
|
|
26
|
+
* @param [label] - The text content of the button
|
|
32
27
|
* @param [variant=ButtonVariant.Primary] - Defines the visual style of the button
|
|
33
|
-
* @param [
|
|
34
|
-
* @param [textCssClass] - Additional CSS classes to apply specifically to the button text
|
|
35
|
-
* @param [onClick] - Click event handler for the button
|
|
36
|
-
* @param [disable=false] - Whether the button should be disabled
|
|
28
|
+
* @param [textClassName] - Additional CSS classes to apply specifically to the button text
|
|
37
29
|
* @param [iconAfter] - Icon or element to display after the button text
|
|
38
30
|
* @param [iconBefore] - Icon or element to display before the button text
|
|
39
31
|
* @param [hideTitleOnMobile=false] - Whether to hide the title text on mobile devices
|
|
40
|
-
* @param [ariaLabel] - Accessible label for screen readers when no title is provided
|
|
41
|
-
* @param [ref] - Ref to access the button DOM element
|
|
42
32
|
*/
|
|
43
33
|
export declare const DialButton: FC<DialButtonProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, MouseEvent } from 'react';
|
|
2
2
|
export interface DialCloseButtonProps {
|
|
3
3
|
ariaLabel?: string;
|
|
4
|
-
|
|
4
|
+
className?: string;
|
|
5
5
|
size?: number;
|
|
6
6
|
onClose: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
}
|
|
@@ -13,13 +13,13 @@ export interface DialCloseButtonProps {
|
|
|
13
13
|
* <DialCloseButton
|
|
14
14
|
* ariaLabel="Close dialog"
|
|
15
15
|
* onClose={handleClose}
|
|
16
|
-
*
|
|
16
|
+
* className="custom-close"
|
|
17
17
|
* size={32}
|
|
18
18
|
* />
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
21
21
|
* @param [ariaLabel] - Accessible label for screen readers
|
|
22
|
-
* @param [
|
|
22
|
+
* @param [className] - Additional CSS classes to apply to the button
|
|
23
23
|
* @param [size=24] - Size of the close icon
|
|
24
24
|
* @param onClose - Click event handler for the close button
|
|
25
25
|
*/
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
ariaLabel?: string;
|
|
6
|
-
onClick: (e: MouseEvent) => void;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DialButtonProps } from '../Button/Button';
|
|
3
|
+
export interface DialRemoveButtonProps extends Omit<DialButtonProps, 'iconBefore' | 'iconAfter'> {
|
|
4
|
+
iconClassName?: string;
|
|
7
5
|
}
|
|
8
6
|
/**
|
|
9
7
|
* A specialized button component for removal or delete actions.
|
|
@@ -14,11 +12,11 @@ export interface DialRemoveButtonProps {
|
|
|
14
12
|
* <DialRemoveButton
|
|
15
13
|
* label="Delete item"
|
|
16
14
|
* onClick={handleDelete}
|
|
17
|
-
*
|
|
15
|
+
* iconClassName="text-error"
|
|
18
16
|
* />
|
|
19
17
|
* @component
|
|
20
18
|
* @param {DialRemoveButtonProps} props - The properties for the remove button component.
|
|
21
|
-
* @param {string} [props.
|
|
19
|
+
* @param {string} [props.iconClassName] - Optional CSS class applied to the trash icon for styling or sizing.
|
|
22
20
|
* @returns {JSX.Element} The rendered remove button component.
|
|
23
21
|
*/
|
|
24
22
|
export declare const DialRemoveButton: FC<DialRemoveButtonProps>;
|