@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.
Files changed (97) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +40 -5
  3. package/dist/{ChartImageMenu-DDVNJNc6.js → ChartImageMenu-3OfqNFyt.js} +557 -546
  4. package/dist/{ChartView-CW3m4Z_1.js → ChartView-n4G5_2ro.js} +35 -31
  5. package/dist/{SummaryChart-CxRjK_HU.js → SummaryChart-i6fOdrDM.js} +2 -2
  6. package/dist/{SummaryImage-Crf1R-3a.js → SummaryImage-CCt5ozD9.js} +2 -2
  7. package/dist/{SummarySeeAll-BRHOMQRA.js → SummarySeeAll-BY8knsRe.js} +5 -5
  8. package/dist/{columnValue-DwUqueZ6.js → columnValue-74XDBcVF.js} +219 -192
  9. package/dist/{exportContext-BKFnNQ0q.js → exportContext-C52ZuHd8.js} +2 -2
  10. package/dist/{exportEngine-BFZD6djX.js → exportEngine-BmDly7iw.js} +1 -1
  11. package/dist/{geometry-yZmKN662.js → geometry-DG134nYI.js} +379 -273
  12. package/dist/index.js +12456 -9277
  13. package/dist/{labels-CnqqTrne.js → labels-BPItSeRU.js} +2 -0
  14. package/dist/scrollArea-D84Cwm4o.js +310 -0
  15. package/dist/style.css +1 -1
  16. package/dist/{summaryChartData-CARqGRUl.js → summaryChartData-BiQYJbYZ.js} +8 -2
  17. package/dist/types/components/Alert/Alert.d.ts +16 -0
  18. package/dist/types/components/Alert/index.d.ts +2 -0
  19. package/dist/types/components/Card/Card.d.ts +4 -3
  20. package/dist/types/components/Card/index.d.ts +1 -1
  21. package/dist/types/components/Charts/Funnel.d.ts +2 -1
  22. package/dist/types/components/Charts/chartImage.d.ts +1 -0
  23. package/dist/types/components/ChipInput/ChipTags.d.ts +3 -0
  24. package/dist/types/components/CommandPalette/CommandPaletteTrigger.d.ts +9 -0
  25. package/dist/types/components/CommandPalette/index.d.ts +2 -0
  26. package/dist/types/components/DataTable/TablePagination.d.ts +1 -1
  27. package/dist/types/components/DataTable/TableToolbar.d.ts +2 -1
  28. package/dist/types/components/DataTable/TableView.d.ts +1 -0
  29. package/dist/types/components/DataTable/cards/cardFields.d.ts +1 -0
  30. package/dist/types/components/DataTable/defaults.d.ts +4 -0
  31. package/dist/types/components/DataTable/index.d.ts +1 -1
  32. package/dist/types/components/DataTable/labels.d.ts +2 -0
  33. package/dist/types/components/DataTable/types.d.ts +18 -2
  34. package/dist/types/components/DataTable/ui-local/TableReorderList.d.ts +13 -0
  35. package/dist/types/components/DataTable/ui.d.ts +2 -1
  36. package/dist/types/components/DataTable/useTable.d.ts +1 -0
  37. package/dist/types/components/DatePicker/PeriodGrid.d.ts +13 -0
  38. package/dist/types/components/DatePicker/PeriodPicker.d.ts +19 -0
  39. package/dist/types/components/DatePicker/index.d.ts +1 -1
  40. package/dist/types/components/Dialog/dialogSlots.d.ts +9 -0
  41. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +8 -0
  42. package/dist/types/components/FieldWrapper/index.d.ts +1 -1
  43. package/dist/types/components/Fields/index.d.ts +1 -1
  44. package/dist/types/components/Image/ImageEditor.d.ts +21 -0
  45. package/dist/types/components/Image/ImagePicker.d.ts +10 -1
  46. package/dist/types/components/Image/imageRender.d.ts +33 -0
  47. package/dist/types/components/Image/index.d.ts +3 -1
  48. package/dist/types/components/Image/prepareImage.d.ts +4 -3
  49. package/dist/types/components/Link/Link.d.ts +22 -0
  50. package/dist/types/components/Link/index.d.ts +2 -0
  51. package/dist/types/components/NavList/NavList.d.ts +13 -0
  52. package/dist/types/components/NavList/index.d.ts +2 -0
  53. package/dist/types/components/PageProgress/PageProgress.d.ts +10 -0
  54. package/dist/types/components/PageProgress/index.d.ts +2 -0
  55. package/dist/types/components/Pagination/Pagination.d.ts +19 -0
  56. package/dist/types/components/Pagination/index.d.ts +2 -0
  57. package/dist/types/components/Popover/Popover.d.ts +1 -1
  58. package/dist/types/components/Popover/floatingPosition.d.ts +4 -0
  59. package/dist/types/components/ReorderList/ReorderGroup.d.ts +16 -0
  60. package/dist/types/components/ReorderList/ReorderList.d.ts +55 -0
  61. package/dist/types/components/ReorderList/crossListDrag.d.ts +61 -0
  62. package/dist/types/components/ReorderList/index.d.ts +5 -0
  63. package/dist/types/components/ReorderList/useReorderDrag.d.ts +28 -0
  64. package/dist/types/components/Tooltip/useTooltip.d.ts +4 -0
  65. package/dist/types/components/UIProvider/UILabelsContext.d.ts +86 -0
  66. package/dist/types/core/hooks/index.d.ts +1 -0
  67. package/dist/types/core/hooks/useMeasuredState.d.ts +1 -0
  68. package/dist/types/core/logic/alert.logic.d.ts +3 -0
  69. package/dist/types/core/logic/commandPalette.logic.d.ts +2 -0
  70. package/dist/types/core/logic/datePicker.logic.d.ts +12 -0
  71. package/dist/types/core/logic/fieldWrapper.logic.d.ts +6 -1
  72. package/dist/types/core/logic/imageEditor.logic.d.ts +132 -0
  73. package/dist/types/core/logic/imageTransform.logic.d.ts +57 -0
  74. package/dist/types/core/logic/index.d.ts +9 -0
  75. package/dist/types/core/logic/inertProps.d.ts +3 -0
  76. package/dist/types/core/logic/pageProgress.logic.d.ts +3 -0
  77. package/dist/types/core/logic/pagination.logic.d.ts +7 -0
  78. package/dist/types/core/logic/periodPicker.logic.d.ts +86 -0
  79. package/dist/types/core/logic/reorder.logic.d.ts +49 -0
  80. package/dist/types/core/types/chipinput.types.d.ts +3 -1
  81. package/dist/types/core/types/collapsible.types.d.ts +3 -0
  82. package/dist/types/core/types/datePicker.types.d.ts +7 -0
  83. package/dist/types/core/types/field.types.d.ts +6 -3
  84. package/dist/types/core/types/fieldWrapper.types.d.ts +2 -0
  85. package/dist/types/core/types/fields.types.d.ts +6 -1
  86. package/dist/types/core/types/form.types.d.ts +1 -0
  87. package/dist/types/core/types/format.types.d.ts +2 -0
  88. package/dist/types/core/types/input.types.d.ts +2 -0
  89. package/dist/types/core/types/navigation.types.d.ts +1 -0
  90. package/dist/types/core/types/select.types.d.ts +2 -6
  91. package/dist/types/core/types/suggest.types.d.ts +2 -0
  92. package/dist/types/index.d.ts +24 -6
  93. package/package.json +1 -1
  94. package/dist/scrollArea-DbYFqbIH.js +0 -269
  95. package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -4
  96. package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +0 -3
  97. 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-yZmKN662.js";
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, onSelect: i, selected: a = null, ...o }) {
937
- let { nf: u, L: d } = x(o), f = (t) => !!i && e[t].selectable !== !1, p = Q({
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: a === null ? null : e.findIndex((e) => e.key === a),
951
- onPick: i ? (t) => f(t) && i(e[t]) : void 0
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: d.empty,
957
+ text: f.empty,
958
958
  compact: r
959
959
  })
960
960
  });
961
- let m = ne(e), h = p.active === null ? null : m[p.active] ?? null, g = h?.step.key ?? a, _ = (e) => `${e.step.label}: ${u(e.step.value)}${e.drop === null ? "" : `, ${d.funnelDrop} ${b(e.drop)}`}`;
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${i ? " chart-plot--pick" : ""}`, r),
967
- role: i ? void 0 : "img",
968
- "aria-label": !i && h ? _(h) : t,
969
- ...p.plotProps,
970
- children: m.map(({ step: e, width: t, drop: n }, r) => /* @__PURE__ */ J("li", {
971
- "data-hit": p.pickable ? void 0 : r,
972
- className: `chart-funnel-item${r === p.active ? " chart-funnel-item--active" : ""}`,
973
- "aria-hidden": !p.pickable || void 0,
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
- ...p.pickable ? p.item(r, {
976
- pressed: a === e.key,
977
- disabled: !f(r)
978
+ ...m.pickable ? m.item(r, {
979
+ pressed: o === e.key,
980
+ disabled: !p(r)
978
981
  }) : {},
979
- "aria-label": p.pickable ? `${e.label}: ${u(e.value)}${n === null ? "" : `, ${b(n)}`}` : void 0,
980
- "aria-description": p.pickable && n !== null ? d.funnelDrop : void 0,
981
- className: `chart-funnel-row${g !== null && g !== e.key ? " chart-faded" : ""}`,
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 ? u(e.value) : ""
1001
+ children: t >= .18 ? d(e.value) : ""
999
1002
  }), t < .18 && /* @__PURE__ */ J("span", {
1000
1003
  className: "chart-funnel-outside",
1001
- children: u(e.value)
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: h ? _(h) : "" }),
1015
- p.tooltip(h && /* @__PURE__ */ J($, {
1017
+ /* @__PURE__ */ J(s, { text: g ? y(g) : "" }),
1018
+ m.tooltip(g && /* @__PURE__ */ J($, {
1016
1019
  rows: [{
1017
- key: h.step.key,
1018
- color: L(h.step.slot),
1019
- label: h.step.label,
1020
- value: u(h.step.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: [p.active > 0 ? `${d.funnelOfFirst}: ${c(h.ofFirst)}` : "", h.drop === null ? "" : `${d.funnelDrop}: ${b(h.drop)}`].filter(Boolean).join(" · ") || void 0
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-CW3m4Z_1.js";
3
- import { n as t } from "./summaryChartData-CARqGRUl.js";
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-DDVNJNc6.js";
3
- import { n as t } from "./summaryChartData-CARqGRUl.js";
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-DDVNJNc6.js";
3
- import { t } from "./ChartView-CW3m4Z_1.js";
4
- import { J as n, Tt as r, U as i, ot as a } from "./geometry-yZmKN662.js";
5
- import { n as o, o as s, s as c } from "./scrollArea-DbYFqbIH.js";
6
- import { r as l, t as u } from "./summaryChartData-CARqGRUl.js";
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 }) {