@epam/ai-dial-ui-kit 0.4.0-rc.19 → 0.4.0-rc.20
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.es.js
CHANGED
|
@@ -6449,7 +6449,7 @@ const c1 = "flex justify-end gap-2 px-6 py-4", d1 = "text-secondary dial-small-1
|
|
|
6449
6449
|
children: b()
|
|
6450
6450
|
}
|
|
6451
6451
|
);
|
|
6452
|
-
}, Yu = ({ selectedItems: e, listCssClass: t, listElementCssClass: s }) =>
|
|
6452
|
+
}, Yu = ({ selectedItems: e, listCssClass: t, listElementCssClass: s, placeholder: o }) => e?.length ? /* @__PURE__ */ w(
|
|
6453
6453
|
"ul",
|
|
6454
6454
|
{
|
|
6455
6455
|
className: q(
|
|
@@ -6457,15 +6457,15 @@ const c1 = "flex justify-end gap-2 px-6 py-4", d1 = "text-secondary dial-small-1
|
|
|
6457
6457
|
"flex gap-x-2 gap-y-1",
|
|
6458
6458
|
t
|
|
6459
6459
|
),
|
|
6460
|
-
children: e?.map((
|
|
6460
|
+
children: e?.map((i) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ w($s, { tooltip: i, children: /* @__PURE__ */ w(
|
|
6461
6461
|
Ja,
|
|
6462
6462
|
{
|
|
6463
|
-
tag:
|
|
6463
|
+
tag: i,
|
|
6464
6464
|
cssClass: q([s])
|
|
6465
6465
|
}
|
|
6466
|
-
) }) },
|
|
6466
|
+
) }) }, i))
|
|
6467
6467
|
}
|
|
6468
|
-
), Rc = (e) => /* @__PURE__ */ ae.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ ae.createElement("path", { d: "M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z", fill: "currentColor" })), g1 = ({
|
|
6468
|
+
) : o ? /* @__PURE__ */ w("span", { className: "text-secondary", children: o }) : null, Rc = (e) => /* @__PURE__ */ ae.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ ae.createElement("path", { d: "M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z", fill: "currentColor" })), g1 = ({
|
|
6469
6469
|
children: e,
|
|
6470
6470
|
open: t,
|
|
6471
6471
|
disabled: s = !1,
|
|
@@ -6475,11 +6475,13 @@ const c1 = "flex justify-end gap-2 px-6 py-4", d1 = "text-secondary dial-small-1
|
|
|
6475
6475
|
onOpen: r,
|
|
6476
6476
|
elementId: a,
|
|
6477
6477
|
errorText: l,
|
|
6478
|
-
|
|
6478
|
+
invalid: c,
|
|
6479
|
+
emptyValueText: d,
|
|
6480
|
+
placeholder: u
|
|
6479
6481
|
}) => {
|
|
6480
|
-
const
|
|
6482
|
+
const h = Array.isArray(o) && o.length > 0, g = typeof o == "string" && !!o.trim(), p = h || g ? o : u ? void 0 : d, f = s ? void 0 : r;
|
|
6481
6483
|
return /* @__PURE__ */ $(It, { children: [
|
|
6482
|
-
|
|
6484
|
+
h ? /* @__PURE__ */ w("div", { className: "w-full", onClick: f, children: /* @__PURE__ */ $(
|
|
6483
6485
|
"div",
|
|
6484
6486
|
{
|
|
6485
6487
|
className: q(
|
|
@@ -6487,7 +6489,13 @@ const c1 = "flex justify-end gap-2 px-6 py-4", d1 = "text-secondary dial-small-1
|
|
|
6487
6489
|
s && "dial-input-disable"
|
|
6488
6490
|
),
|
|
6489
6491
|
children: [
|
|
6490
|
-
/* @__PURE__ */ w(
|
|
6492
|
+
/* @__PURE__ */ w(
|
|
6493
|
+
Yu,
|
|
6494
|
+
{
|
|
6495
|
+
placeholder: u,
|
|
6496
|
+
selectedItems: p
|
|
6497
|
+
}
|
|
6498
|
+
),
|
|
6491
6499
|
!s && /* @__PURE__ */ w("div", { className: "ml-1", children: /* @__PURE__ */ w(
|
|
6492
6500
|
De,
|
|
6493
6501
|
{
|
|
@@ -6509,7 +6517,7 @@ const c1 = "flex justify-end gap-2 px-6 py-4", d1 = "text-secondary dial-small-1
|
|
|
6509
6517
|
{
|
|
6510
6518
|
type: "button",
|
|
6511
6519
|
className: "w-full",
|
|
6512
|
-
onClick:
|
|
6520
|
+
onClick: f,
|
|
6513
6521
|
"aria-label": "open-popup",
|
|
6514
6522
|
id: a,
|
|
6515
6523
|
children: /* @__PURE__ */ $(
|
|
@@ -6519,10 +6527,10 @@ const c1 = "flex justify-end gap-2 px-6 py-4", d1 = "text-secondary dial-small-1
|
|
|
6519
6527
|
"dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",
|
|
6520
6528
|
n,
|
|
6521
6529
|
s && "dial-input-disable",
|
|
6522
|
-
l && "dial-input-error"
|
|
6530
|
+
(l || c) && "dial-input-error"
|
|
6523
6531
|
),
|
|
6524
6532
|
children: [
|
|
6525
|
-
/* @__PURE__ */ w($s, { tooltip: String(
|
|
6533
|
+
/* @__PURE__ */ w($s, { tooltip: String(p), children: p || !u ? /* @__PURE__ */ w("span", { className: i, children: p }) : /* @__PURE__ */ w("span", { className: "text-secondary", children: u }) }),
|
|
6526
6534
|
!s && /* @__PURE__ */ w("div", { className: "flex-shrink-0", children: /* @__PURE__ */ w(
|
|
6527
6535
|
De,
|
|
6528
6536
|
{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
export interface DialAutocompleteInputValueProps {
|
|
3
|
+
placeholder?: string;
|
|
3
4
|
selectedItems?: string[];
|
|
4
5
|
listCssClass?: string;
|
|
5
6
|
listElementCssClass?: string;
|
|
@@ -19,6 +20,7 @@ export interface DialAutocompleteInputValueProps {
|
|
|
19
20
|
* />
|
|
20
21
|
* ```
|
|
21
22
|
*
|
|
23
|
+
* @param [placeholder] - Placeholder text to display when no items are selected.
|
|
22
24
|
* @param [selectedItems] - An array of strings representing the selected items to display. If empty or undefined, the component renders nothing.
|
|
23
25
|
* @param [listCssClass] - Additional CSS classes applied to the `<ul>` element containing the list of selected items.
|
|
24
26
|
* @param [listElementCssClass] - Additional CSS classes applied to each `<li>` element representing an individual selected item.
|
|
@@ -7,9 +7,11 @@ export interface DialInputPopupProps {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
valueCssClasses?: string;
|
|
9
9
|
inputCssClasses?: string;
|
|
10
|
+
placeholder?: string;
|
|
10
11
|
elementId?: string;
|
|
11
12
|
errorText?: string;
|
|
12
|
-
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
emptyValueText?: string;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* An input field that opens a popup when clicked, displaying a selected value or a list of values.
|
|
@@ -35,6 +37,7 @@ export interface DialInputPopupProps {
|
|
|
35
37
|
*
|
|
36
38
|
* @param [open] - The current state of the modal, indicating whether it is opened or closed.
|
|
37
39
|
* @param [selectedValue] - The currently selected value(s). Can be a string for a single value or an array of strings for multiple values.
|
|
40
|
+
* @param [placeholder] - Placeholder text displayed when no value is selected.
|
|
38
41
|
* @param children - The content to render inside the modal when it is opened.
|
|
39
42
|
* @param onOpen - A callback function triggered when the modal open button is clicked.
|
|
40
43
|
* @param [disabled=false] - Whether the input is disabled, preventing user interaction.
|
|
@@ -42,6 +45,7 @@ export interface DialInputPopupProps {
|
|
|
42
45
|
* @param [inputCssClasses] - Additional CSS classes applied to the input container.
|
|
43
46
|
* @param [elementId] - A unique identifier for the input element, useful for accessibility and testing.
|
|
44
47
|
* @param [errorText] - An optional error message displayed below the input when an error state is present.
|
|
45
|
-
* @param
|
|
48
|
+
* @param [invalid] - Whether the input is in an invalid state, affecting styling. Applyed automatically if errorText is provided.
|
|
49
|
+
* @param [emptyValueText] - The text displayed when no value is selected and placeholder is not provided.
|
|
46
50
|
*/
|
|
47
51
|
export declare const DialInputPopup: FC<DialInputPopupProps>;
|