@epam/ai-dial-ui-kit 0.5.0-rc.39 → 0.5.0-rc.40
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 +15 -15
- package/dist/dial-ui-kit.es.js +18 -18
- package/dist/src/components/Field/Field.d.ts +2 -2
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +6 -3
- package/dist/src/components/Tab/Tab.d.ts +4 -4
- package/dist/src/components/Tabs/Tabs.d.ts +9 -9
- package/dist/src/models/tab.d.ts +2 -1
- package/dist/src/types/tab.d.ts +1 -1
- package/package.json +1 -1
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -3435,9 +3435,9 @@ const jv = "flex", Kv = "pb-1 mt-2", qv = {
|
|
|
3435
3435
|
icon: e,
|
|
3436
3436
|
title: t,
|
|
3437
3437
|
description: s,
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3438
|
+
containerClassName: o,
|
|
3439
|
+
titleClassName: i,
|
|
3440
|
+
descriptionClassName: n
|
|
3441
3441
|
}) => /* @__PURE__ */ z(
|
|
3442
3442
|
"div",
|
|
3443
3443
|
{
|
|
@@ -5819,7 +5819,7 @@ const hb = Y(
|
|
|
5819
5819
|
tab: e,
|
|
5820
5820
|
active: t,
|
|
5821
5821
|
invalid: s,
|
|
5822
|
-
|
|
5822
|
+
className: o,
|
|
5823
5823
|
horizontal: i,
|
|
5824
5824
|
onClick: n
|
|
5825
5825
|
}) => {
|
|
@@ -5849,7 +5849,7 @@ const hb = Y(
|
|
|
5849
5849
|
/* @__PURE__ */ v(
|
|
5850
5850
|
Yt,
|
|
5851
5851
|
{
|
|
5852
|
-
text: e.
|
|
5852
|
+
text: e.label,
|
|
5853
5853
|
contentClassName: "max-w-[200px]",
|
|
5854
5854
|
cssClass: "max-w-[200px]"
|
|
5855
5855
|
}
|
|
@@ -5875,9 +5875,9 @@ const vd = () => typeof window < "u" && window.innerWidth < 640, wd = () => {
|
|
|
5875
5875
|
activeTab: t,
|
|
5876
5876
|
onClick: s,
|
|
5877
5877
|
orientation: o = $a.Horizontal,
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5878
|
+
screenThreshold: i = Wn.Tablet,
|
|
5879
|
+
smallScreenContainerClassName: n,
|
|
5880
|
+
smallScreenDropdownItemClassName: r
|
|
5881
5881
|
}) => {
|
|
5882
5882
|
const [a, l] = I(!1), [c, d] = I(!1), [u, h] = I(!1), g = vb(), p = g === Gs.Mobile || i === Wn.Tablet && g === Gs.Tablet, f = o === $a.Horizontal, m = L(null), C = L(null), w = L(null), b = e.find((x) => x.id === t), S = B(
|
|
5883
5883
|
() => Y(
|
|
@@ -5927,7 +5927,7 @@ const vd = () => typeof window < "u" && window.innerWidth < 640, wd = () => {
|
|
|
5927
5927
|
onClick: (E) => {
|
|
5928
5928
|
s(E), l(!1);
|
|
5929
5929
|
},
|
|
5930
|
-
|
|
5930
|
+
className: be(
|
|
5931
5931
|
"w-full rounded-none h-11 items-center px-6",
|
|
5932
5932
|
r
|
|
5933
5933
|
)
|
|
@@ -5941,7 +5941,7 @@ const vd = () => typeof window < "u" && window.innerWidth < 640, wd = () => {
|
|
|
5941
5941
|
tab: b,
|
|
5942
5942
|
active: !0,
|
|
5943
5943
|
onClick: s,
|
|
5944
|
-
|
|
5944
|
+
className: "rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"
|
|
5945
5945
|
},
|
|
5946
5946
|
t
|
|
5947
5947
|
),
|
|
@@ -5962,7 +5962,7 @@ const vd = () => typeof window < "u" && window.innerWidth < 640, wd = () => {
|
|
|
5962
5962
|
) : (
|
|
5963
5963
|
// Desktop
|
|
5964
5964
|
/* @__PURE__ */ z("div", { ref: m, className: "flex w-full items-start", children: [
|
|
5965
|
-
/* @__PURE__ */ v("div", { ref: C, className: S, children: e.map((x) => /* @__PURE__ */ v(
|
|
5965
|
+
/* @__PURE__ */ v("div", { ref: C, role: "tablist", className: S, children: e.map((x) => /* @__PURE__ */ v(
|
|
5966
5966
|
"div",
|
|
5967
5967
|
{
|
|
5968
5968
|
ref: t === x.id ? w : void 0,
|
|
@@ -5974,7 +5974,7 @@ const vd = () => typeof window < "u" && window.innerWidth < 640, wd = () => {
|
|
|
5974
5974
|
active: t === x.id,
|
|
5975
5975
|
onClick: s,
|
|
5976
5976
|
horizontal: f,
|
|
5977
|
-
|
|
5977
|
+
className: "w-full"
|
|
5978
5978
|
}
|
|
5979
5979
|
)
|
|
5980
5980
|
},
|
|
@@ -5995,7 +5995,7 @@ const vd = () => typeof window < "u" && window.innerWidth < 640, wd = () => {
|
|
|
5995
5995
|
onClick: (E) => {
|
|
5996
5996
|
s(E), d(!1);
|
|
5997
5997
|
},
|
|
5998
|
-
|
|
5998
|
+
className: "w-full rounded-none h-[32px] items-center px-3 py-2"
|
|
5999
5999
|
},
|
|
6000
6000
|
x.id
|
|
6001
6001
|
)),
|
|
@@ -47691,8 +47691,8 @@ const qA = ({
|
|
|
47691
47691
|
{
|
|
47692
47692
|
title: m,
|
|
47693
47693
|
description: C,
|
|
47694
|
-
|
|
47695
|
-
|
|
47694
|
+
containerClassName: "gap-3",
|
|
47695
|
+
titleClassName: "mt-2 !text-lg",
|
|
47696
47696
|
icon: f || /* @__PURE__ */ v(
|
|
47697
47697
|
UC,
|
|
47698
47698
|
{
|
|
@@ -47788,9 +47788,9 @@ const Tm = () => {
|
|
|
47788
47788
|
tabs: e,
|
|
47789
47789
|
activeTab: t,
|
|
47790
47790
|
onClick: (C) => s(C),
|
|
47791
|
-
|
|
47792
|
-
|
|
47793
|
-
|
|
47791
|
+
screenThreshold: Wn.Tablet,
|
|
47792
|
+
smallScreenContainerClassName: "w-fit bg-transparent h-[38px]",
|
|
47793
|
+
smallScreenDropdownItemClassName: "px-3 h-[38px]"
|
|
47794
47794
|
}
|
|
47795
47795
|
) : null, f = () => /* @__PURE__ */ z(je, { children: [
|
|
47796
47796
|
/* @__PURE__ */ v(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FC, LabelHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
type NativeLabelProps = Omit<LabelHTMLAttributes<HTMLLabelElement>, 'children'>;
|
|
2
|
+
type NativeLabelProps = Omit<LabelHTMLAttributes<HTMLLabelElement>, 'children' | 'defaultValue' | 'onChange'>;
|
|
3
3
|
export interface DialFieldLabelProps extends NativeLabelProps {
|
|
4
4
|
fieldTitle?: string | ReactNode;
|
|
5
5
|
optional?: boolean;
|
|
6
6
|
optionalText?: string;
|
|
7
|
-
description?:
|
|
7
|
+
description?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* A field label component
|
|
@@ -3,9 +3,9 @@ export interface DialNoDataContentProps {
|
|
|
3
3
|
icon?: ReactNode;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
containerClassName?: string;
|
|
7
|
+
titleClassName?: string;
|
|
8
|
+
descriptionClassName?: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* A component for displaying a message and icon when there is no data to show.
|
|
@@ -21,5 +21,8 @@ export interface DialNoDataContentProps {
|
|
|
21
21
|
* @param [icon] - Custom icon to display (defaults to clipboard icon)
|
|
22
22
|
* @param title - The message to display when no data is present
|
|
23
23
|
* @param [description] - The description to display when no data is present
|
|
24
|
+
* @param [containerClassName] - Additional CSS classes for the container
|
|
25
|
+
* @param [titleClassName] - Additional CSS classes for the title text
|
|
26
|
+
* @param [descriptionClassName] - Additional CSS classes for the description text
|
|
24
27
|
*/
|
|
25
28
|
export declare const DialNoDataContent: FC<DialNoDataContentProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, FC } from 'react';
|
|
1
2
|
import { TabModel } from '../../models/tab';
|
|
2
|
-
|
|
3
|
-
export interface DialTabProps {
|
|
3
|
+
type NativeButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'children' | 'type' | 'role' | 'disabled'>;
|
|
4
|
+
export interface DialTabProps extends NativeButtonProps {
|
|
4
5
|
tab: TabModel;
|
|
5
6
|
active: boolean;
|
|
6
7
|
invalid?: boolean;
|
|
7
8
|
horizontal?: boolean;
|
|
8
|
-
cssClass?: string;
|
|
9
9
|
onClick: (id: string) => void;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
@@ -26,7 +26,7 @@ export interface DialTabProps {
|
|
|
26
26
|
* @param tab - The tab model containing its `id`, `name`, [`disabled`], [`invalid`].
|
|
27
27
|
* @param active - Whether the tab is currently active.
|
|
28
28
|
* @param [horizontal=false] - Whether the tab is displayed in horizontal orientation.
|
|
29
|
-
* @param [cssClass] - Additional CSS classes applied to the tab element.
|
|
30
29
|
* @param onClick - Callback fired when the tab is clicked. Receives the tab’s `id`.
|
|
31
30
|
*/
|
|
32
31
|
export declare const DialTab: FC<DialTabProps>;
|
|
32
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { TabModel } from '../../models/tab';
|
|
3
|
-
import {
|
|
3
|
+
import { ScreenResolution, TabOrientation } from '../../types/tab';
|
|
4
4
|
export interface DialTabsProps {
|
|
5
5
|
tabs: TabModel[];
|
|
6
6
|
activeTab: string;
|
|
7
7
|
onClick: (id: string) => void;
|
|
8
8
|
orientation?: TabOrientation;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
screenThreshold?: ScreenResolution;
|
|
10
|
+
smallScreenContainerClassName?: string;
|
|
11
|
+
smallScreenDropdownItemClassName?: string;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* A responsive and overflow-aware tabs component that automatically adapts its layout
|
|
@@ -43,17 +43,17 @@ export interface DialTabsProps {
|
|
|
43
43
|
* @param activeTab - The identifier of the currently active tab.
|
|
44
44
|
* @param onClick - Callback fired when a tab is selected. Receives the tab's `id` as an argument.
|
|
45
45
|
* @param [orientation=TabOrientation.Horizontal] - Layout direction of the tabs. Uses the {@link TabOrientation} enum.
|
|
46
|
-
* @param [
|
|
47
|
-
* below which tabs collapse into a dropdown. Uses the {@link
|
|
46
|
+
* @param [screenThreshold=ScreenResolution.Tablet] - Defines the screen size threshold
|
|
47
|
+
* below which tabs collapse into a dropdown. Uses the {@link ScreenRelosution} enum.
|
|
48
48
|
* When set to `Tablet`, both mobile and tablet screens will trigger dropdown mode.
|
|
49
|
-
* @param [
|
|
49
|
+
* @param [smallScreenContainerClassNames] - Optional CSS class applied to the dropdown container
|
|
50
50
|
* in small-screen (collapsed) mode.
|
|
51
|
-
* @param [
|
|
51
|
+
* @param [smallScreenDropdownItemClassName] - Optional CSS class applied to individual dropdown
|
|
52
52
|
* items in small-screen mode.
|
|
53
53
|
*
|
|
54
54
|
* @remarks
|
|
55
55
|
* - Automatically detects horizontal overflow via `ResizeObserver` and shows a dropdown when needed.
|
|
56
56
|
* - Smoothly scrolls to keep the active tab visible when navigating.
|
|
57
|
-
* - Switches layout responsively based on `
|
|
57
|
+
* - Switches layout responsively based on `screenThreshold`.
|
|
58
58
|
*/
|
|
59
59
|
export declare const DialTabs: FC<DialTabsProps>;
|
package/dist/src/models/tab.d.ts
CHANGED
package/dist/src/types/tab.d.ts
CHANGED