@nice2dev/ui 1.4.23 → 1.4.25
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/CHANGELOG.md +100 -0
- package/README.md +2 -4
- package/dist/NiceModuleLifecyclePanel-bsHwj1pO.cjs +1 -0
- package/dist/{NicePivotGrid-B5Fgi5E_.cjs → NicePivotGrid-D53CQ2cY.cjs} +1 -1
- package/dist/{NiceStreamDashboard.doc-74KUXya1.cjs → NiceStreamDashboard.doc-CdkHFf4Y.cjs} +2 -2
- package/dist/charts/NiceAdvancedCharts.mjs +586 -773
- package/dist/charts/NiceChartRangeSelector.mjs +159 -0
- package/dist/charts/NiceHeatMap.mjs +140 -70
- package/dist/charts/NiceOrganizationChart.mjs +183 -90
- package/dist/charts/NiceSankey.mjs +166 -93
- package/dist/charts/NiceStockChart.mjs +258 -157
- package/dist/charts-CSgOgfES.cjs +867 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +126 -102
- package/dist/charts.mjs +22 -24
- package/dist/core/lazy.mjs +50 -63
- package/dist/core-lazy-sO0xvg64.cjs +1 -0
- package/dist/data.cjs +1 -1
- package/dist/demo/docs/docPreviews.mjs +504 -546
- package/dist/demo/docs/docRegistry.mjs +9 -94
- package/dist/docs/NiceStreamDashboard.doc.json.mjs +1 -1
- package/dist/documentation/utils.mjs +1 -1
- package/dist/index.cjs +95 -121
- package/dist/index.d.ts +126 -217
- package/dist/index.mjs +829 -836
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +41 -23
- package/dist/lazy.mjs +1 -1
- package/dist/navigation/NiceDock.mjs +55 -48
- package/dist/navigation/NiceMenuTypes.mjs +197 -251
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +5 -16
- package/dist/navigation.mjs +53 -54
- package/dist/style.css +2 -2
- package/dist/tools/NiceShowcase.mjs +2 -4
- package/package.json +4 -4
- package/dist/NiceDiagram.doc-CASS0Tnj.cjs +0 -8
- package/dist/NiceModuleLifecyclePanel-jckyVqqt.cjs +0 -1
- package/dist/charts/NiceRangeSelector.mjs +0 -135
- package/dist/charts/NiceTreeMap.mjs +0 -100
- package/dist/charts/NiceVectorMap.mjs +0 -59
- package/dist/charts-C9B548D2.cjs +0 -924
- package/dist/core-lazy-B54FdghB.cjs +0 -1
- package/dist/docs/NiceDiagram.doc.json.mjs +0 -32
- package/dist/tools/NiceChat.mjs +0 -98
package/dist/lazy.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),n=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitGraph$1).then(e=>({default:e.NiceGitGraph}))),o=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceBranchManager$1).then(e=>({default:e.NiceBranchManager}))),l=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitDiffViewer$1).then(e=>({default:e.NiceGitDiffViewer}))),s=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitBlame$1).then(e=>({default:e.NiceGitBlame}))),h=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitConflictResolver$1).then(e=>({default:e.NiceGitConflictResolver}))),c=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NicePipelineEditor$1).then(e=>({default:e.NicePipelineEditor}))),y=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NicePipelineMonitor$1).then(e=>({default:e.NicePipelineMonitor}))),u=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitHooks$1).then(e=>({default:e.NiceGitHooks}))),z=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceMergeRequestBuilder$1).then(e=>({default:e.NiceMergeRequestBuilder}))),d=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceAPIFlow$1).then(e=>({default:e.NiceAPIFlow}))),f=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceCodeTemplate$1).then(e=>({default:e.NiceCodeTemplate}))),N=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceDataMapper$1).then(e=>({default:e.NiceDataMapper}))),L=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceEventOrchestrator$1).then(e=>({default:e.NiceEventOrchestrator}))),p=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceStateDesigner$1).then(e=>({default:e.NiceStateDesigner}))),v=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceTestBuilder$1).then(e=>({default:e.NiceTestBuilder}))),D=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataBranchManager$1).then(e=>({default:e.NiceDataBranchManager}))),P=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataDiffViewer$1).then(e=>({default:e.NiceDataDiffViewer}))),m=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataBranchGraph$1).then(e=>({default:e.NiceDataBranchGraph}))),q=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataMergeBuilder$1).then(e=>({default:e.NiceDataMergeBuilder}))),B=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataConflictResolver$1).then(e=>({default:e.NiceDataConflictResolver}))),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),n=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitGraph$1).then(e=>({default:e.NiceGitGraph}))),o=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceBranchManager$1).then(e=>({default:e.NiceBranchManager}))),l=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitDiffViewer$1).then(e=>({default:e.NiceGitDiffViewer}))),s=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitBlame$1).then(e=>({default:e.NiceGitBlame}))),h=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitConflictResolver$1).then(e=>({default:e.NiceGitConflictResolver}))),c=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NicePipelineEditor$1).then(e=>({default:e.NicePipelineEditor}))),y=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NicePipelineMonitor$1).then(e=>({default:e.NicePipelineMonitor}))),u=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceGitHooks$1).then(e=>({default:e.NiceGitHooks}))),z=a.lazy(()=>Promise.resolve().then(()=>require("./devops-o6Zm0VKB.cjs")).then(e=>e.NiceMergeRequestBuilder$1).then(e=>({default:e.NiceMergeRequestBuilder}))),d=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceAPIFlow$1).then(e=>({default:e.NiceAPIFlow}))),f=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceCodeTemplate$1).then(e=>({default:e.NiceCodeTemplate}))),N=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceDataMapper$1).then(e=>({default:e.NiceDataMapper}))),L=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceEventOrchestrator$1).then(e=>({default:e.NiceEventOrchestrator}))),p=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceStateDesigner$1).then(e=>({default:e.NiceStateDesigner}))),v=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(e=>e.NiceTestBuilder$1).then(e=>({default:e.NiceTestBuilder}))),D=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataBranchManager$1).then(e=>({default:e.NiceDataBranchManager}))),P=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataDiffViewer$1).then(e=>({default:e.NiceDataDiffViewer}))),m=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataBranchGraph$1).then(e=>({default:e.NiceDataBranchGraph}))),q=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataMergeBuilder$1).then(e=>({default:e.NiceDataMergeBuilder}))),B=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataConflictResolver$1).then(e=>({default:e.NiceDataConflictResolver}))),G=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataSnapshot$1).then(e=>({default:e.NiceDataSnapshot}))),M=a.lazy(()=>Promise.resolve().then(()=>require("./charts-CSgOgfES.cjs")).then(e=>e.NiceChart$1).then(e=>({default:e.NiceChart}))),g=a.lazy(()=>Promise.resolve().then(()=>require("./charts-CSgOgfES.cjs")).then(e=>e.NiceAdvancedCharts).then(e=>({default:e.NiceTreeMap}))),$=a.lazy(()=>Promise.resolve().then(()=>require("./charts-CSgOgfES.cjs")).then(e=>e.NiceSankey$1).then(e=>({default:e.NiceSankey}))),t=()=>{Promise.resolve().then(()=>require("./devops.cjs"))},r=()=>{Promise.resolve().then(()=>require("./no-code.cjs"))},i=()=>{Promise.resolve().then(()=>require("./data-branching.cjs"))},C=()=>{"requestIdleCallback"in window?requestIdleCallback(()=>{t(),r(),i()}):setTimeout(()=>{t(),r(),i()},2e3)};exports.LazyAPIFlow=d;exports.LazyBranchManager=o;exports.LazyChart=M;exports.LazyCodeTemplate=f;exports.LazyDataBranchGraph=m;exports.LazyDataBranchManager=D;exports.LazyDataConflictResolver=B;exports.LazyDataDiffViewer=P;exports.LazyDataMapper=N;exports.LazyDataMergeBuilder=q;exports.LazyDataSnapshot=G;exports.LazyEventOrchestrator=L;exports.LazyGitBlame=s;exports.LazyGitConflictResolver=h;exports.LazyGitDiffViewer=l;exports.LazyGitGraph=n;exports.LazyGitHooks=u;exports.LazyMergeRequestBuilder=z;exports.LazyPipelineEditor=c;exports.LazyPipelineMonitor=y;exports.LazySankey=$;exports.LazyStateDesigner=p;exports.LazyTestBuilder=v;exports.LazyTreemap=g;exports.preloadDataBranching=i;exports.preloadDevOps=t;exports.preloadHeavyModules=C;exports.preloadNoCode=r;
|
package/dist/lazy.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
3
2
|
import { LazyExoticComponent } from 'react';
|
|
4
3
|
import { NiceBaseProps } from '@nice2dev/ui-core';
|
|
5
4
|
import { NiceComponentTutorial } from '@nice2dev/ui-core';
|
|
6
5
|
import { NiceStandardProps } from '@nice2dev/ui-core';
|
|
7
|
-
import { RefAttributes } from 'react';
|
|
8
6
|
|
|
9
7
|
declare interface ActionParam {
|
|
10
8
|
id: string;
|
|
@@ -639,9 +637,7 @@ export declare const LazyStateDesigner: LazyExoticComponent<FC<NiceStateDesigner
|
|
|
639
637
|
|
|
640
638
|
export declare const LazyTestBuilder: LazyExoticComponent<FC<NiceTestBuilderProps>>;
|
|
641
639
|
|
|
642
|
-
export declare const LazyTreemap: LazyExoticComponent<
|
|
643
|
-
displayName: string;
|
|
644
|
-
}>;
|
|
640
|
+
export declare const LazyTreemap: LazyExoticComponent<FC<NiceTreeMapProps>>;
|
|
645
641
|
|
|
646
642
|
declare interface MappingDefinition {
|
|
647
643
|
id: string;
|
|
@@ -1287,14 +1283,18 @@ declare interface NiceSankeyLink {
|
|
|
1287
1283
|
target: string;
|
|
1288
1284
|
/** Flow magnitude. */
|
|
1289
1285
|
value: number;
|
|
1286
|
+
/** Link colour (default: a gradient from the source's colour to the target's). */
|
|
1287
|
+
color?: string;
|
|
1290
1288
|
}
|
|
1291
1289
|
|
|
1292
1290
|
/** A node in the {@link NiceSankey} diagram. */
|
|
1293
1291
|
declare interface NiceSankeyNode {
|
|
1294
1292
|
/** Unique identifier. */
|
|
1295
1293
|
id: string;
|
|
1296
|
-
/** Node label. */
|
|
1297
|
-
label
|
|
1294
|
+
/** Node label (default: `name`, then the id). */
|
|
1295
|
+
label?: string;
|
|
1296
|
+
/** Alias of `label`, as in the former NiceSankeyChart. */
|
|
1297
|
+
name?: string;
|
|
1298
1298
|
/** Node color. */
|
|
1299
1299
|
color?: string;
|
|
1300
1300
|
}
|
|
@@ -1315,6 +1315,16 @@ declare interface NiceSankeyProps extends NiceStandardProps {
|
|
|
1315
1315
|
nodePadding?: number;
|
|
1316
1316
|
/** Chart title. */
|
|
1317
1317
|
title?: string;
|
|
1318
|
+
/** Add each node's total to its label. 1.4.24. */
|
|
1319
|
+
showValues?: boolean;
|
|
1320
|
+
/** Native tooltips on nodes and links. Default `true`. 1.4.24. */
|
|
1321
|
+
showTooltip?: boolean;
|
|
1322
|
+
/** Links drawn as a gradient from the source's colour to the target's. Default `true`. 1.4.24. */
|
|
1323
|
+
gradientLinks?: boolean;
|
|
1324
|
+
/** Fires when a node is clicked. 1.4.24. */
|
|
1325
|
+
onNodeClick?: (node: NiceSankeyNode) => void;
|
|
1326
|
+
/** Fires when a link is clicked. 1.4.24. */
|
|
1327
|
+
onLinkClick?: (link: NiceSankeyLink) => void;
|
|
1318
1328
|
}
|
|
1319
1329
|
|
|
1320
1330
|
declare interface NiceStateDesignerProps extends NiceBaseProps {
|
|
@@ -1344,32 +1354,40 @@ declare interface NiceTestBuilderProps extends NiceBaseProps {
|
|
|
1344
1354
|
tutorial?: NiceComponentTutorial;
|
|
1345
1355
|
}
|
|
1346
1356
|
|
|
1347
|
-
/** A
|
|
1357
|
+
/** A node of a {@link NiceTreeMap}. */
|
|
1348
1358
|
declare interface NiceTreeMapNode {
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
/** Node label. */
|
|
1352
|
-
label: string;
|
|
1353
|
-
/** Numeric weight (determines area). */
|
|
1359
|
+
id: string;
|
|
1360
|
+
name: string;
|
|
1354
1361
|
value: number;
|
|
1355
|
-
/** Node color. */
|
|
1356
1362
|
color?: string;
|
|
1357
|
-
/** Child nodes. */
|
|
1358
1363
|
children?: NiceTreeMapNode[];
|
|
1359
1364
|
}
|
|
1360
1365
|
|
|
1361
|
-
/** Props for
|
|
1366
|
+
/** Props for {@link NiceTreeMap}. */
|
|
1362
1367
|
declare interface NiceTreeMapProps extends NiceStandardProps {
|
|
1363
|
-
/**
|
|
1364
|
-
data: NiceTreeMapNode
|
|
1365
|
-
|
|
1368
|
+
/** Dane hierarchiczne. Można też podać płaską listę — zostanie opakowana w wirtualny korzeń. */
|
|
1369
|
+
data: NiceTreeMapNode | Array<{
|
|
1370
|
+
label?: string;
|
|
1371
|
+
name?: string;
|
|
1372
|
+
value: number;
|
|
1373
|
+
color?: string;
|
|
1374
|
+
}>;
|
|
1375
|
+
/** Szerokość */
|
|
1366
1376
|
width?: number;
|
|
1367
|
-
/**
|
|
1377
|
+
/** Wysokość */
|
|
1368
1378
|
height?: number;
|
|
1369
|
-
/**
|
|
1370
|
-
|
|
1371
|
-
/**
|
|
1379
|
+
/** Pokaż etykiety */
|
|
1380
|
+
showLabels?: boolean;
|
|
1381
|
+
/** Pokaż wartości */
|
|
1382
|
+
showValues?: boolean;
|
|
1383
|
+
/** Callback po kliknięciu */
|
|
1384
|
+
onNodeClick?: (node: NiceTreeMapNode, path: string[]) => void;
|
|
1385
|
+
/** Umożliw drill-down */
|
|
1386
|
+
drilldownEnabled?: boolean;
|
|
1387
|
+
/** Kolory */
|
|
1372
1388
|
colors?: string[];
|
|
1389
|
+
/** Padding między kafelkami */
|
|
1390
|
+
tilePadding?: number;
|
|
1373
1391
|
}
|
|
1374
1392
|
|
|
1375
1393
|
declare interface ParamDefinition {
|
package/dist/lazy.mjs
CHANGED
|
@@ -50,7 +50,7 @@ const n = /* @__PURE__ */ t(
|
|
|
50
50
|
), w = /* @__PURE__ */ t(
|
|
51
51
|
() => import("./charts/NiceChart.mjs").then((e) => ({ default: e.NiceChart }))
|
|
52
52
|
), T = /* @__PURE__ */ t(
|
|
53
|
-
() => import("./charts/
|
|
53
|
+
() => import("./charts/NiceAdvancedCharts.mjs").then((e) => ({ default: e.NiceTreeMap }))
|
|
54
54
|
), k = /* @__PURE__ */ t(
|
|
55
55
|
() => import("./charts/NiceSankey.mjs").then((e) => ({ default: e.NiceSankey }))
|
|
56
56
|
), a = () => {
|
|
@@ -1,76 +1,83 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useControlId as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
const
|
|
5
|
-
/* @__PURE__ */
|
|
1
|
+
import { jsx as s, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { useControlId as C, useNiceTranslation as w, useRovingFocus as z } from "@nice2dev/ui-core";
|
|
3
|
+
import { forwardRef as B, useState as i, useCallback as L, useRef as O } from "react";
|
|
4
|
+
const W = [], Y = /* @__PURE__ */ Object.assign(
|
|
5
|
+
/* @__PURE__ */ B(
|
|
6
6
|
({
|
|
7
|
-
items:
|
|
8
|
-
position:
|
|
9
|
-
size:
|
|
10
|
-
magnify:
|
|
11
|
-
magnifyScale:
|
|
12
|
-
activeKey:
|
|
13
|
-
onItemClick:
|
|
14
|
-
contained:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
items: k = W,
|
|
8
|
+
position: n = "bottom",
|
|
9
|
+
size: h = "md",
|
|
10
|
+
magnify: d = !0,
|
|
11
|
+
magnifyScale: r = 1.5,
|
|
12
|
+
activeKey: v,
|
|
13
|
+
onItemClick: _,
|
|
14
|
+
contained: m = !1,
|
|
15
|
+
autoHide: t = !1,
|
|
16
|
+
className: N,
|
|
17
|
+
style: g,
|
|
18
|
+
id: $,
|
|
19
|
+
...M
|
|
20
|
+
}, p) => {
|
|
21
|
+
const I = C($), { t: T } = w(), [l, c] = i(null), [x, u] = i(!1), [D, b] = i(!1), E = t && !x && !D, F = L(
|
|
21
22
|
(e) => {
|
|
22
|
-
if (!
|
|
23
|
+
if (!d || l === null)
|
|
23
24
|
return 1;
|
|
24
25
|
const o = Math.abs(e - l);
|
|
25
|
-
return o === 0 ?
|
|
26
|
+
return o === 0 ? r : o === 1 ? 1 + (r - 1) * 0.5 : o === 2 ? 1 + (r - 1) * 0.2 : 1;
|
|
26
27
|
},
|
|
27
|
-
[
|
|
28
|
-
), a =
|
|
29
|
-
|
|
28
|
+
[d, l, r]
|
|
29
|
+
), a = n === "left" || n === "right", f = O(null);
|
|
30
|
+
z(f, {
|
|
30
31
|
orientation: a ? "vertical" : "horizontal",
|
|
31
32
|
itemSelector: "button"
|
|
32
33
|
});
|
|
33
|
-
const
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
const R = n === "left" ? "left center" : n === "right" ? "right center" : "bottom center";
|
|
35
|
+
return /* @__PURE__ */ s(
|
|
35
36
|
"div",
|
|
36
37
|
{
|
|
37
|
-
ref:
|
|
38
|
-
id:
|
|
39
|
-
className: `nice-dock nice-dock--${
|
|
40
|
-
style:
|
|
38
|
+
ref: p,
|
|
39
|
+
id: I,
|
|
40
|
+
className: `nice-dock nice-dock--${n} nice-dock--${h}${m ? " nice-dock--contained" : ""}${E ? " nice-dock--hidden" : ""} ${N ?? ""}`,
|
|
41
|
+
style: g,
|
|
42
|
+
onMouseEnter: t ? () => u(!0) : void 0,
|
|
43
|
+
onMouseLeave: t ? () => u(!1) : void 0,
|
|
44
|
+
onFocus: t ? () => b(!0) : void 0,
|
|
45
|
+
onBlur: t ? (e) => {
|
|
46
|
+
e.currentTarget.contains(e.relatedTarget) || b(!1);
|
|
47
|
+
} : void 0,
|
|
41
48
|
role: "toolbar",
|
|
42
|
-
"aria-label":
|
|
49
|
+
"aria-label": T("dock.label", "Dock"),
|
|
43
50
|
"aria-orientation": a ? "vertical" : "horizontal",
|
|
44
|
-
...
|
|
45
|
-
children: /* @__PURE__ */
|
|
51
|
+
...M,
|
|
52
|
+
children: /* @__PURE__ */ s(
|
|
46
53
|
"div",
|
|
47
54
|
{
|
|
48
|
-
ref:
|
|
55
|
+
ref: f,
|
|
49
56
|
className: "nice-dock__bar",
|
|
50
57
|
style: { flexDirection: a ? "column" : "row" },
|
|
51
|
-
children:
|
|
52
|
-
const
|
|
53
|
-
return /* @__PURE__ */
|
|
58
|
+
children: k.map((e, o) => {
|
|
59
|
+
const j = F(o);
|
|
60
|
+
return /* @__PURE__ */ y(
|
|
54
61
|
"button",
|
|
55
62
|
{
|
|
56
63
|
type: "button",
|
|
57
|
-
className: `nice-dock__item ${
|
|
64
|
+
className: `nice-dock__item ${v === e.key ? "nice-dock__item--active" : ""} ${e.disabled ? "nice-dock__item--disabled" : ""}`,
|
|
58
65
|
style: {
|
|
59
|
-
transform: `scale(${
|
|
60
|
-
transformOrigin:
|
|
66
|
+
transform: `scale(${j})`,
|
|
67
|
+
transformOrigin: R,
|
|
61
68
|
transition: "transform 0.15s ease-out"
|
|
62
69
|
},
|
|
63
70
|
disabled: e.disabled,
|
|
64
|
-
onClick: () =>
|
|
65
|
-
onMouseEnter: () =>
|
|
66
|
-
onMouseLeave: () =>
|
|
67
|
-
onFocus: () =>
|
|
68
|
-
onBlur: () =>
|
|
71
|
+
onClick: () => _?.(e.key),
|
|
72
|
+
onMouseEnter: () => c(o),
|
|
73
|
+
onMouseLeave: () => c(null),
|
|
74
|
+
onFocus: () => c(o),
|
|
75
|
+
onBlur: () => c(null),
|
|
69
76
|
"aria-label": e.label,
|
|
70
77
|
title: e.label,
|
|
71
78
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
e.badge !== void 0 && /* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ s("span", { className: "nice-dock__icon", children: e.icon }),
|
|
80
|
+
e.badge !== void 0 && /* @__PURE__ */ s("span", { className: "nice-dock__badge", children: e.badge })
|
|
74
81
|
]
|
|
75
82
|
},
|
|
76
83
|
e.key
|
|
@@ -85,5 +92,5 @@ const w = [], B = /* @__PURE__ */ Object.assign(
|
|
|
85
92
|
{ displayName: "NiceDock" }
|
|
86
93
|
);
|
|
87
94
|
export {
|
|
88
|
-
|
|
95
|
+
Y as NiceDock
|
|
89
96
|
};
|