@dcs-tech/ui 0.9.0 → 0.10.0
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 +126 -0
- package/README.md +40 -5
- package/dist/{ChartImageMenu-DDVNJNc6.js → ChartImageMenu-3OfqNFyt.js} +557 -546
- package/dist/{ChartView-CW3m4Z_1.js → ChartView-n4G5_2ro.js} +35 -31
- package/dist/{SummaryChart-CxRjK_HU.js → SummaryChart-i6fOdrDM.js} +2 -2
- package/dist/{SummaryImage-Crf1R-3a.js → SummaryImage-CCt5ozD9.js} +2 -2
- package/dist/{SummarySeeAll-BRHOMQRA.js → SummarySeeAll-BY8knsRe.js} +5 -5
- package/dist/{columnValue-DwUqueZ6.js → columnValue-74XDBcVF.js} +219 -192
- package/dist/{exportContext-BKFnNQ0q.js → exportContext-C52ZuHd8.js} +2 -2
- package/dist/{exportEngine-BFZD6djX.js → exportEngine-BmDly7iw.js} +1 -1
- package/dist/{geometry-yZmKN662.js → geometry-DG134nYI.js} +379 -273
- package/dist/index.js +12456 -9277
- package/dist/{labels-CnqqTrne.js → labels-BPItSeRU.js} +2 -0
- package/dist/scrollArea-D84Cwm4o.js +310 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-CARqGRUl.js → summaryChartData-BiQYJbYZ.js} +8 -2
- package/dist/types/components/Alert/Alert.d.ts +16 -0
- package/dist/types/components/Alert/index.d.ts +2 -0
- package/dist/types/components/Card/Card.d.ts +4 -3
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Charts/Funnel.d.ts +2 -1
- package/dist/types/components/Charts/chartImage.d.ts +1 -0
- package/dist/types/components/ChipInput/ChipTags.d.ts +3 -0
- package/dist/types/components/CommandPalette/CommandPaletteTrigger.d.ts +9 -0
- package/dist/types/components/CommandPalette/index.d.ts +2 -0
- package/dist/types/components/DataTable/TablePagination.d.ts +1 -1
- package/dist/types/components/DataTable/TableToolbar.d.ts +2 -1
- package/dist/types/components/DataTable/TableView.d.ts +1 -0
- package/dist/types/components/DataTable/cards/cardFields.d.ts +1 -0
- package/dist/types/components/DataTable/defaults.d.ts +4 -0
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DataTable/labels.d.ts +2 -0
- package/dist/types/components/DataTable/types.d.ts +18 -2
- package/dist/types/components/DataTable/ui-local/TableReorderList.d.ts +13 -0
- package/dist/types/components/DataTable/ui.d.ts +2 -1
- package/dist/types/components/DataTable/useTable.d.ts +1 -0
- package/dist/types/components/DatePicker/PeriodGrid.d.ts +13 -0
- package/dist/types/components/DatePicker/PeriodPicker.d.ts +19 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -1
- package/dist/types/components/Dialog/dialogSlots.d.ts +9 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +8 -0
- package/dist/types/components/FieldWrapper/index.d.ts +1 -1
- package/dist/types/components/Fields/index.d.ts +1 -1
- package/dist/types/components/Image/ImageEditor.d.ts +21 -0
- package/dist/types/components/Image/ImagePicker.d.ts +10 -1
- package/dist/types/components/Image/imageRender.d.ts +33 -0
- package/dist/types/components/Image/index.d.ts +3 -1
- package/dist/types/components/Image/prepareImage.d.ts +4 -3
- package/dist/types/components/Link/Link.d.ts +22 -0
- package/dist/types/components/Link/index.d.ts +2 -0
- package/dist/types/components/NavList/NavList.d.ts +13 -0
- package/dist/types/components/NavList/index.d.ts +2 -0
- package/dist/types/components/PageProgress/PageProgress.d.ts +10 -0
- package/dist/types/components/PageProgress/index.d.ts +2 -0
- package/dist/types/components/Pagination/Pagination.d.ts +19 -0
- package/dist/types/components/Pagination/index.d.ts +2 -0
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Popover/floatingPosition.d.ts +4 -0
- package/dist/types/components/ReorderList/ReorderGroup.d.ts +16 -0
- package/dist/types/components/ReorderList/ReorderList.d.ts +55 -0
- package/dist/types/components/ReorderList/crossListDrag.d.ts +61 -0
- package/dist/types/components/ReorderList/index.d.ts +5 -0
- package/dist/types/components/ReorderList/useReorderDrag.d.ts +28 -0
- package/dist/types/components/Tooltip/useTooltip.d.ts +4 -0
- package/dist/types/components/UIProvider/UILabelsContext.d.ts +86 -0
- package/dist/types/core/hooks/index.d.ts +1 -0
- package/dist/types/core/hooks/useMeasuredState.d.ts +1 -0
- package/dist/types/core/logic/alert.logic.d.ts +3 -0
- package/dist/types/core/logic/commandPalette.logic.d.ts +2 -0
- package/dist/types/core/logic/datePicker.logic.d.ts +12 -0
- package/dist/types/core/logic/fieldWrapper.logic.d.ts +6 -1
- package/dist/types/core/logic/imageEditor.logic.d.ts +132 -0
- package/dist/types/core/logic/imageTransform.logic.d.ts +57 -0
- package/dist/types/core/logic/index.d.ts +9 -0
- package/dist/types/core/logic/inertProps.d.ts +3 -0
- package/dist/types/core/logic/pageProgress.logic.d.ts +3 -0
- package/dist/types/core/logic/pagination.logic.d.ts +7 -0
- package/dist/types/core/logic/periodPicker.logic.d.ts +86 -0
- package/dist/types/core/logic/reorder.logic.d.ts +49 -0
- package/dist/types/core/types/chipinput.types.d.ts +3 -1
- package/dist/types/core/types/collapsible.types.d.ts +3 -0
- package/dist/types/core/types/datePicker.types.d.ts +7 -0
- package/dist/types/core/types/field.types.d.ts +6 -3
- package/dist/types/core/types/fieldWrapper.types.d.ts +2 -0
- package/dist/types/core/types/fields.types.d.ts +6 -1
- package/dist/types/core/types/form.types.d.ts +1 -0
- package/dist/types/core/types/format.types.d.ts +2 -0
- package/dist/types/core/types/input.types.d.ts +2 -0
- package/dist/types/core/types/navigation.types.d.ts +1 -0
- package/dist/types/core/types/select.types.d.ts +2 -6
- package/dist/types/core/types/suggest.types.d.ts +2 -0
- package/dist/types/index.d.ts +24 -6
- package/package.json +1 -1
- package/dist/scrollArea-DbYFqbIH.js +0 -269
- package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -4
- package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +0 -3
- package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +0 -70
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as e, C as t, Cn as n, D as r, E as i, En as a, F as o, G as s, J as c, K as l, L as u, M as d, N as f, O as p, R as m, S as h, T as g, Tn as _, W as v, X as y, Y as b, Z as x, _ as S, b as C, c as w, ct as T, d as E, f as D, ft as O, g as k, h as A, i as j, j as M, k as N, l as P, m as F, o as I, ot as L, p as R, q as z, r as B, s as V, t as H, u as ee, v as U, vt as te, w as ne, y as re, z as ie } from "./geometry-
|
|
2
|
+
import { A as e, C as t, Cn as n, D as r, E as i, En as a, F as o, G as s, J as c, K as l, L as u, M as d, N as f, O as p, R as m, S as h, T as g, Tn as _, W as v, X as y, Y as b, Z as x, _ as S, b as C, c as w, ct as T, d as E, f as D, ft as O, g as k, h as A, i as j, j as M, k as N, l as P, m as F, o as I, ot as L, p as R, q as z, r as B, s as V, t as H, u as ee, v as U, vt as te, w as ne, y as re, z as ie } from "./geometry-DG134nYI.js";
|
|
3
3
|
import { useCallback as W, useEffect as ae, useLayoutEffect as G, useMemo as oe, useRef as K, useState as q } from "react";
|
|
4
4
|
import { Fragment as se, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
5
5
|
import { createPortal as ce } from "react-dom";
|
|
@@ -933,8 +933,8 @@ function Le({ slices: n, ariaLabel: r, title: i, size: a, compact: o = !1, varia
|
|
|
933
933
|
});
|
|
934
934
|
}
|
|
935
935
|
// src/components/Charts/Funnel.tsx
|
|
936
|
-
function Re({ steps: e, ariaLabel: t, title: n, compact: r = !1,
|
|
937
|
-
let { nf:
|
|
936
|
+
function Re({ steps: e, ariaLabel: t, title: n, compact: r = !1, showChange: i = !0, onSelect: a, selected: o = null, ...u }) {
|
|
937
|
+
let { nf: d, L: f } = x(u), p = (t) => !!a && e[t].selectable !== !1, m = Q({
|
|
938
938
|
count: e.length,
|
|
939
939
|
pick: (e, t, n, r) => de(t, xe(r).map((e) => e ? {
|
|
940
940
|
start: e.top,
|
|
@@ -947,38 +947,41 @@ function Re({ steps: e, ariaLabel: t, title: n, compact: r = !1, onSelect: i, se
|
|
|
947
947
|
ArrowLeft: 0,
|
|
948
948
|
ArrowRight: 0
|
|
949
949
|
},
|
|
950
|
-
start:
|
|
951
|
-
onPick:
|
|
950
|
+
start: o === null ? null : e.findIndex((e) => e.key === o),
|
|
951
|
+
onPick: a ? (t) => p(t) && a(e[t]) : void 0
|
|
952
952
|
});
|
|
953
953
|
if (!e.some((e) => e.value > 0)) return /* @__PURE__ */ J(l, {
|
|
954
954
|
title: n,
|
|
955
955
|
children: /* @__PURE__ */ J(v, {
|
|
956
956
|
ariaLabel: t,
|
|
957
|
-
text:
|
|
957
|
+
text: f.empty,
|
|
958
958
|
compact: r
|
|
959
959
|
})
|
|
960
960
|
});
|
|
961
|
-
let
|
|
961
|
+
let h = ne(e).map((e) => i ? e : {
|
|
962
|
+
...e,
|
|
963
|
+
drop: null
|
|
964
|
+
}), g = m.active === null ? null : h[m.active] ?? null, _ = g?.step.key ?? o, y = (e) => `${e.step.label}: ${d(e.step.value)}${e.drop === null ? "" : `, ${f.funnelDrop} ${b(e.drop)}`}`;
|
|
962
965
|
return /* @__PURE__ */ Y(l, {
|
|
963
966
|
title: n,
|
|
964
967
|
children: [
|
|
965
968
|
/* @__PURE__ */ J("ol", {
|
|
966
|
-
className: z(`chart-funnel chart-plot chart-plot--rows${
|
|
967
|
-
role:
|
|
968
|
-
"aria-label": !
|
|
969
|
-
...
|
|
970
|
-
children:
|
|
971
|
-
"data-hit":
|
|
972
|
-
className: `chart-funnel-item${r ===
|
|
973
|
-
"aria-hidden": !
|
|
969
|
+
className: z(`chart-funnel${i ? "" : " chart-funnel--no-change"} chart-plot chart-plot--rows${a ? " chart-plot--pick" : ""}`, r),
|
|
970
|
+
role: a ? void 0 : "img",
|
|
971
|
+
"aria-label": !a && g ? y(g) : t,
|
|
972
|
+
...m.plotProps,
|
|
973
|
+
children: h.map(({ step: e, width: t, drop: n }, r) => /* @__PURE__ */ J("li", {
|
|
974
|
+
"data-hit": m.pickable ? void 0 : r,
|
|
975
|
+
className: `chart-funnel-item${r === m.active ? " chart-funnel-item--active" : ""}`,
|
|
976
|
+
"aria-hidden": !m.pickable || void 0,
|
|
974
977
|
children: /* @__PURE__ */ Y("span", {
|
|
975
|
-
...
|
|
976
|
-
pressed:
|
|
977
|
-
disabled: !
|
|
978
|
+
...m.pickable ? m.item(r, {
|
|
979
|
+
pressed: o === e.key,
|
|
980
|
+
disabled: !p(r)
|
|
978
981
|
}) : {},
|
|
979
|
-
"aria-label":
|
|
980
|
-
"aria-description":
|
|
981
|
-
className: `chart-funnel-row${
|
|
982
|
+
"aria-label": m.pickable ? `${e.label}: ${d(e.value)}${n === null ? "" : `, ${b(n)}`}` : void 0,
|
|
983
|
+
"aria-description": m.pickable && n !== null ? f.funnelDrop : void 0,
|
|
984
|
+
className: `chart-funnel-row${_ !== null && _ !== e.key ? " chart-faded" : ""}`,
|
|
982
985
|
children: [
|
|
983
986
|
/* @__PURE__ */ J("span", {
|
|
984
987
|
className: "chart-funnel-label",
|
|
@@ -995,14 +998,14 @@ function Re({ steps: e, ariaLabel: t, title: n, compact: r = !1, onSelect: i, se
|
|
|
995
998
|
background: L(e.slot),
|
|
996
999
|
color: te(e.slot)
|
|
997
1000
|
},
|
|
998
|
-
children: t >= .18 ?
|
|
1001
|
+
children: t >= .18 ? d(e.value) : ""
|
|
999
1002
|
}), t < .18 && /* @__PURE__ */ J("span", {
|
|
1000
1003
|
className: "chart-funnel-outside",
|
|
1001
|
-
children:
|
|
1004
|
+
children: d(e.value)
|
|
1002
1005
|
})]
|
|
1003
1006
|
}),
|
|
1004
1007
|
" ",
|
|
1005
|
-
/* @__PURE__ */ J("span", {
|
|
1008
|
+
i && /* @__PURE__ */ J("span", {
|
|
1006
1009
|
className: "chart-funnel-drop",
|
|
1007
1010
|
"data-change": n === null ? void 0 : n > 0 ? "drop" : n < 0 ? "rise" : "flat",
|
|
1008
1011
|
children: n === null ? "" : b(n)
|
|
@@ -1011,15 +1014,15 @@ function Re({ steps: e, ariaLabel: t, title: n, compact: r = !1, onSelect: i, se
|
|
|
1011
1014
|
})
|
|
1012
1015
|
}, e.key))
|
|
1013
1016
|
}),
|
|
1014
|
-
/* @__PURE__ */ J(s, { text:
|
|
1015
|
-
|
|
1017
|
+
/* @__PURE__ */ J(s, { text: g ? y(g) : "" }),
|
|
1018
|
+
m.tooltip(g && /* @__PURE__ */ J($, {
|
|
1016
1019
|
rows: [{
|
|
1017
|
-
key:
|
|
1018
|
-
color: L(
|
|
1019
|
-
label:
|
|
1020
|
-
value:
|
|
1020
|
+
key: g.step.key,
|
|
1021
|
+
color: L(g.step.slot),
|
|
1022
|
+
label: g.step.label,
|
|
1023
|
+
value: d(g.step.value)
|
|
1021
1024
|
}],
|
|
1022
|
-
note: [
|
|
1025
|
+
note: [i && m.active > 0 ? `${f.funnelOfFirst}: ${c(g.ofFirst)}` : "", g.drop === null ? "" : `${f.funnelDrop}: ${b(g.drop)}`].filter(Boolean).join(" · ") || void 0
|
|
1023
1026
|
}))
|
|
1024
1027
|
]
|
|
1025
1028
|
});
|
|
@@ -1664,6 +1667,7 @@ function qe({ chart: e, ariaLabel: t, compact: n = !1, height: r, size: i, onSel
|
|
|
1664
1667
|
});
|
|
1665
1668
|
case "funnel": return /* @__PURE__ */ J(Re, {
|
|
1666
1669
|
steps: e.steps,
|
|
1670
|
+
showChange: e.showChange,
|
|
1667
1671
|
onSelect: f,
|
|
1668
1672
|
selected: o,
|
|
1669
1673
|
...d
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./ChartView-
|
|
3
|
-
import { n as t } from "./summaryChartData-
|
|
2
|
+
import { t as e } from "./ChartView-n4G5_2ro.js";
|
|
3
|
+
import { n as t } from "./summaryChartData-BiQYJbYZ.js";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
// src/components/DataTable/summary/SummaryChart.tsx
|
|
6
6
|
var r = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./ChartImageMenu-
|
|
3
|
-
import { n as t } from "./summaryChartData-
|
|
2
|
+
import { t as e } from "./ChartImageMenu-3OfqNFyt.js";
|
|
3
|
+
import { n as t } from "./summaryChartData-BiQYJbYZ.js";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
// src/components/DataTable/summary/SummaryImage.tsx
|
|
6
6
|
function r({ item: r, report: i, context: a, branding: o, format: s, locale: c, labels: l }) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./ChartImageMenu-
|
|
3
|
-
import { t } from "./ChartView-
|
|
4
|
-
import { J as n, Tt as r, U as i, ot as a } from "./geometry-
|
|
5
|
-
import { n as o, o as s, s as c } from "./scrollArea-
|
|
6
|
-
import { r as l, t as u } from "./summaryChartData-
|
|
2
|
+
import { t as e } from "./ChartImageMenu-3OfqNFyt.js";
|
|
3
|
+
import { t } from "./ChartView-n4G5_2ro.js";
|
|
4
|
+
import { J as n, Tt as r, U as i, ot as a } from "./geometry-DG134nYI.js";
|
|
5
|
+
import { n as o, o as s, s as c } from "./scrollArea-D84Cwm4o.js";
|
|
6
|
+
import { r as l, t as u } from "./summaryChartData-BiQYJbYZ.js";
|
|
7
7
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
8
|
// src/components/DataTable/summary/SummarySeeAll.tsx
|
|
9
9
|
function m({ item: m, all: h, onClose: g, onSelect: _, image: v, labels: y }) {
|