@epam/ai-dial-ui-kit 0.5.0-rc.61 → 0.5.0-rc.63
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
|
@@ -6469,6 +6469,7 @@ const Zd = () => typeof window < "u" && window.innerWidth < 640, Qd = () => {
|
|
|
6469
6469
|
}, [t]), p ? /* @__PURE__ */ C(
|
|
6470
6470
|
"div",
|
|
6471
6471
|
{
|
|
6472
|
+
role: "tablist",
|
|
6472
6473
|
className: be(
|
|
6473
6474
|
"h-11 flex items-center bg-layer-3 px-4",
|
|
6474
6475
|
n
|
|
@@ -48466,48 +48467,48 @@ function V8({
|
|
|
48466
48467
|
}
|
|
48467
48468
|
};
|
|
48468
48469
|
}
|
|
48469
|
-
const z8 = ({
|
|
48470
|
-
const
|
|
48471
|
-
refs: { containerRef:
|
|
48472
|
-
visibleActions:
|
|
48473
|
-
hiddenActions:
|
|
48470
|
+
const z8 = ({ getSelectionLabel: e, onClearSelection: t, actions: s, selectedCount: i }) => {
|
|
48471
|
+
const o = rC(), {
|
|
48472
|
+
refs: { containerRef: n, leftSectionRef: r, measureRef: a },
|
|
48473
|
+
visibleActions: l,
|
|
48474
|
+
hiddenActions: c
|
|
48474
48475
|
} = V8({
|
|
48475
48476
|
actions: s,
|
|
48476
48477
|
direction: Ai.Reverse,
|
|
48477
|
-
dependencies: [
|
|
48478
|
+
dependencies: [o],
|
|
48478
48479
|
actionsGap: G8,
|
|
48479
48480
|
containerPadding: B8
|
|
48480
|
-
});
|
|
48481
|
+
}), d = e(i);
|
|
48481
48482
|
return /* @__PURE__ */ z($e, { children: [
|
|
48482
48483
|
/* @__PURE__ */ C(
|
|
48483
48484
|
"div",
|
|
48484
48485
|
{
|
|
48485
|
-
ref:
|
|
48486
|
+
ref: a,
|
|
48486
48487
|
className: "absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",
|
|
48487
|
-
children: s.map(({ key:
|
|
48488
|
+
children: s.map(({ key: u, icon: h, title: g }) => /* @__PURE__ */ C(
|
|
48488
48489
|
Te,
|
|
48489
48490
|
{
|
|
48490
|
-
iconBefore:
|
|
48491
|
-
label:
|
|
48491
|
+
iconBefore: h,
|
|
48492
|
+
label: g,
|
|
48492
48493
|
variant: Ae.Secondary,
|
|
48493
48494
|
hideTitleOnMobile: !0
|
|
48494
48495
|
},
|
|
48495
|
-
|
|
48496
|
+
u
|
|
48496
48497
|
))
|
|
48497
48498
|
}
|
|
48498
48499
|
),
|
|
48499
48500
|
/* @__PURE__ */ z(
|
|
48500
48501
|
"div",
|
|
48501
48502
|
{
|
|
48502
|
-
ref:
|
|
48503
|
+
ref: n,
|
|
48503
48504
|
className: "rounded bg-layer-0 p-2 flex justify-between items-center w-full",
|
|
48504
48505
|
role: "toolbar",
|
|
48505
48506
|
"aria-label": "File bulk actions",
|
|
48506
48507
|
children: [
|
|
48507
|
-
/* @__PURE__ */ C("div", { ref:
|
|
48508
|
+
/* @__PURE__ */ C("div", { ref: r, children: /* @__PURE__ */ C(
|
|
48508
48509
|
Te,
|
|
48509
48510
|
{
|
|
48510
|
-
label:
|
|
48511
|
+
label: d,
|
|
48511
48512
|
onClick: t,
|
|
48512
48513
|
textClassName: "text-accent-primary whitespace-nowrap",
|
|
48513
48514
|
variant: Ae.Tertiary,
|
|
@@ -48515,10 +48516,10 @@ const z8 = ({ selectionLabel: e, onClearSelection: t, actions: s }) => {
|
|
|
48515
48516
|
}
|
|
48516
48517
|
) }),
|
|
48517
48518
|
/* @__PURE__ */ z("div", { className: "flex flex-1 w-full gap-3 items-center justify-end", children: [
|
|
48518
|
-
|
|
48519
|
+
c.length > 0 && /* @__PURE__ */ C(
|
|
48519
48520
|
Nt,
|
|
48520
48521
|
{
|
|
48521
|
-
menu: { items:
|
|
48522
|
+
menu: { items: c },
|
|
48522
48523
|
allowedPlacements: ["bottom", "bottom-start"],
|
|
48523
48524
|
children: /* @__PURE__ */ C(
|
|
48524
48525
|
Te,
|
|
@@ -48535,18 +48536,18 @@ const z8 = ({ selectionLabel: e, onClearSelection: t, actions: s }) => {
|
|
|
48535
48536
|
)
|
|
48536
48537
|
}
|
|
48537
48538
|
),
|
|
48538
|
-
|
|
48539
|
+
l.map(({ key: u, icon: h, title: g, onClick: p, disabled: f }) => /* @__PURE__ */ C(
|
|
48539
48540
|
Te,
|
|
48540
48541
|
{
|
|
48541
48542
|
className: "!p-[9px]",
|
|
48542
|
-
iconBefore:
|
|
48543
|
-
label:
|
|
48543
|
+
iconBefore: h,
|
|
48544
|
+
label: g,
|
|
48544
48545
|
variant: Ae.Secondary,
|
|
48545
48546
|
hideTitleOnMobile: !0,
|
|
48546
|
-
disabled:
|
|
48547
|
-
onClick: (
|
|
48547
|
+
disabled: f,
|
|
48548
|
+
onClick: (m) => p?.({ key: u, domEvent: m })
|
|
48548
48549
|
},
|
|
48549
|
-
|
|
48550
|
+
u
|
|
48550
48551
|
))
|
|
48551
48552
|
] })
|
|
48552
48553
|
]
|
|
@@ -50407,7 +50408,8 @@ const J8 = ({
|
|
|
50407
50408
|
children: /* @__PURE__ */ C(
|
|
50408
50409
|
z8,
|
|
50409
50410
|
{
|
|
50410
|
-
|
|
50411
|
+
...l,
|
|
50412
|
+
selectedCount: w.size,
|
|
50411
50413
|
onClearSelection: y,
|
|
50412
50414
|
actions: pn
|
|
50413
50415
|
}
|
|
@@ -63,7 +63,7 @@ export type ToolbarOptions = Omit<DialFileManagerToolbarProps, 'areHiddenFilesVi
|
|
|
63
63
|
uploadArchive?: string;
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
export type BulkActionsToolbarOptions = Omit<DialFileManagerBulkActionsToolbarProps, 'onClearSelection' | 'actions'> & {
|
|
66
|
+
export type BulkActionsToolbarOptions = Omit<DialFileManagerBulkActionsToolbarProps, 'onClearSelection' | 'actions' | 'selectedCount'> & {
|
|
67
67
|
actionLabels?: {
|
|
68
68
|
[DialFileManagerActions.Duplicate]?: string;
|
|
69
69
|
[DialFileManagerActions.Copy]?: string;
|
|
@@ -4,9 +4,10 @@ export interface DialActionDropdownItem extends DropdownItem {
|
|
|
4
4
|
title: string;
|
|
5
5
|
}
|
|
6
6
|
export interface DialFileManagerBulkActionsToolbarProps {
|
|
7
|
-
|
|
7
|
+
getSelectionLabel: (selectedCount: number) => string;
|
|
8
8
|
onClearSelection: () => void;
|
|
9
9
|
actions: DialActionDropdownItem[];
|
|
10
|
+
selectedCount: number;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* A responsive toolbar component displayed when files or items are selected
|
|
@@ -33,7 +34,7 @@ export interface DialFileManagerBulkActionsToolbarProps {
|
|
|
33
34
|
* @example
|
|
34
35
|
* ```tsx
|
|
35
36
|
* <DialFileManagerSelectionToolbar
|
|
36
|
-
*
|
|
37
|
+
* getSelectionLabel={(count) => `${count} files selected`}
|
|
37
38
|
* onClearSelection={() => console.log('Cleared')}
|
|
38
39
|
* actions={[
|
|
39
40
|
* { key: 'download', title: 'Download', icon: <IconDownload />, onClick: () => {} },
|
|
@@ -43,10 +44,11 @@ export interface DialFileManagerBulkActionsToolbarProps {
|
|
|
43
44
|
* ```
|
|
44
45
|
*
|
|
45
46
|
* @param {object} props
|
|
46
|
-
* @param {string} props.
|
|
47
|
+
* @param {() => string} props.getSelectionLabel - Function to get the label showing current selection status (e.g., "3 files selected").
|
|
47
48
|
* @param {() => void} props.onClearSelection - Callback invoked when the clear selection button is clicked.
|
|
48
49
|
* @param {DialActionDropdownItem[]} props.actions - List of available toolbar actions.
|
|
49
50
|
* Each action defines a title, icon, key, and optional click handler.
|
|
51
|
+
* @param {number} [props.selectedCount] - Count of currently selected items.
|
|
50
52
|
*
|
|
51
53
|
* @returns {JSX.Element} A responsive toolbar that adjusts visible actions based on available width.
|
|
52
54
|
*/
|