@hybridcore/ui 1.6.26 → 1.6.27

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.
@@ -1,7 +1,8 @@
1
- import { useThemeProps as u } from "@mui/material";
2
- import { a as w, b as k, I as v } from "../../IconTrendingUp-CW4SFYmc.js";
1
+ import { useThemeProps as w } from "@mui/material";
2
+ import { a as g, b as I, I as m } from "../../IconTrendingUp-CW4SFYmc.js";
3
3
  import { c as n } from "../../createReactComponent-C7L-DMHj.js";
4
- import { I } from "../../IconMinus-B6OPYVyo.js";
4
+ import { I as k } from "../../IconMinus-B6OPYVyo.js";
5
+ import { I as v, a as C } from "../../IconCheck-BcUcbvno.js";
5
6
  import { I as y } from "../../IconCircle-HcgE1lHy.js";
6
7
  /**
7
8
  * @license @tabler/icons-react v3.44.0 - MIT
@@ -9,28 +10,21 @@ import { I as y } from "../../IconCircle-HcgE1lHy.js";
9
10
  * This source code is licensed under the MIT license.
10
11
  * See the LICENSE file in the root directory of this source tree.
11
12
  */
12
- const M = [["path", { d: "M12 9v4", key: "svg-0" }], ["path", { d: "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]], m = n("outline", "alert-triangle", "AlertTriangle", M);
13
+ const M = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M18 13l-6 6", key: "svg-1" }], ["path", { d: "M6 13l6 6", key: "svg-2" }]], _ = n("outline", "arrow-down", "ArrowDown", M);
13
14
  /**
14
15
  * @license @tabler/icons-react v3.44.0 - MIT
15
16
  *
16
17
  * This source code is licensed under the MIT license.
17
18
  * See the LICENSE file in the root directory of this source tree.
18
19
  */
19
- const C = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M18 13l-6 6", key: "svg-1" }], ["path", { d: "M6 13l6 6", key: "svg-2" }]], _ = n("outline", "arrow-down", "ArrowDown", C);
20
+ const $ = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M18 11l-6 -6", key: "svg-1" }], ["path", { d: "M6 11l6 -6", key: "svg-2" }]], f = n("outline", "arrow-up", "ArrowUp", $);
20
21
  /**
21
22
  * @license @tabler/icons-react v3.44.0 - MIT
22
23
  *
23
24
  * This source code is licensed under the MIT license.
24
25
  * See the LICENSE file in the root directory of this source tree.
25
26
  */
26
- const $ = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M18 11l-6 -6", key: "svg-1" }], ["path", { d: "M6 11l6 -6", key: "svg-2" }]], N = n("outline", "arrow-up", "ArrowUp", $);
27
- /**
28
- * @license @tabler/icons-react v3.44.0 - MIT
29
- *
30
- * This source code is licensed under the MIT license.
31
- * See the LICENSE file in the root directory of this source tree.
32
- */
33
- const b = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }], ["path", { d: "M5.7 5.7l12.6 12.6", key: "svg-1" }]], f = n("outline", "ban", "Ban", b);
27
+ const b = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }], ["path", { d: "M5.7 5.7l12.6 12.6", key: "svg-1" }]], N = n("outline", "ban", "Ban", b);
34
28
  /**
35
29
  * @license @tabler/icons-react v3.44.0 - MIT
36
30
  *
@@ -44,42 +38,35 @@ const A = [["path", { d: "M6 10l6 6l6 -6h-12", key: "svg-0" }]], D = n("outline"
44
38
  * This source code is licensed under the MIT license.
45
39
  * See the LICENSE file in the root directory of this source tree.
46
40
  */
47
- const L = [["path", { d: "M18 14l-6 -6l-6 6h12", key: "svg-0" }]], T = n("outline", "caret-up", "CaretUp", L);
48
- /**
49
- * @license @tabler/icons-react v3.44.0 - MIT
50
- *
51
- * This source code is licensed under the MIT license.
52
- * See the LICENSE file in the root directory of this source tree.
53
- */
54
- const U = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], B = n("outline", "check", "Check", U);
41
+ const L = [["path", { d: "M18 14l-6 -6l-6 6h12", key: "svg-0" }]], U = n("outline", "caret-up", "CaretUp", L);
55
42
  /**
56
43
  * @license @tabler/icons-react v3.44.0 - MIT
57
44
  *
58
45
  * This source code is licensed under the MIT license.
59
46
  * See the LICENSE file in the root directory of this source tree.
60
47
  */
61
- const H = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 16v.01", key: "svg-1" }], ["path", { d: "M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483", key: "svg-2" }]], R = n("outline", "help-circle", "HelpCircle", H), x = {
62
- "trending-up": w,
63
- "trending-down": k,
64
- "arrow-right": v,
65
- "arrow-up": N,
48
+ const T = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 16v.01", key: "svg-1" }], ["path", { d: "M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483", key: "svg-2" }]], B = n("outline", "help-circle", "HelpCircle", T), H = {
49
+ "trending-up": g,
50
+ "trending-down": I,
51
+ "arrow-right": m,
52
+ "arrow-up": f,
66
53
  "arrow-down": _,
67
- "caret-up": T,
54
+ "caret-up": U,
68
55
  "caret-down": D,
69
- minus: I,
70
- ban: f,
71
- help: R,
72
- check: B,
73
- alert: m,
56
+ minus: k,
57
+ ban: N,
58
+ help: B,
59
+ check: v,
60
+ alert: C,
74
61
  circle: y
75
- }, z = (p) => {
76
- const t = u({ props: p, name: "HCStatusIndicator" }), {
77
- value: e,
78
- states: d = [],
62
+ }, q = (p) => {
63
+ const t = w({ props: p, name: "HCStatusIndicator" }), {
64
+ value: r,
65
+ states: i = [],
79
66
  variant: c = "prominent",
80
67
  showIcon: s = !0,
81
68
  emptyLabel: a = "—"
82
- } = t, r = e != null && `${e}`.trim() !== "", o = r ? d.find((g) => `${g.value}`.toLowerCase() === `${e}`.toLowerCase()) : void 0, l = (o == null ? void 0 : o.label) ?? (r ? `${e}` : a), i = s && (o != null && o.icon) ? x[o.icon] : void 0, h = {
69
+ } = t, e = r != null && `${r}`.trim() !== "", o = e ? i.find((h) => `${h.value}`.toLowerCase() === `${r}`.toLowerCase()) : void 0, l = (o == null ? void 0 : o.label) ?? (e ? `${r}` : a), d = s && (o != null && o.icon) ? H[o.icon] : void 0, u = {
83
70
  ...t,
84
71
  variant: c,
85
72
  showIcon: s,
@@ -87,19 +74,19 @@ const H = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }]
87
74
  activeLabel: l,
88
75
  resolvedColor: o == null ? void 0 : o.color,
89
76
  resolvedBackgroundColor: o == null ? void 0 : o.backgroundColor,
90
- hasValue: r
77
+ hasValue: e
91
78
  };
92
79
  return {
93
80
  refs: {},
94
81
  state: {
95
- ownerState: h,
82
+ ownerState: u,
96
83
  variant: c,
97
84
  activeLabel: l,
98
- Icon: i
85
+ Icon: d
99
86
  },
100
87
  actions: {}
101
88
  };
102
89
  };
103
90
  export {
104
- z as useStatusIndicatorLogic
91
+ q as useStatusIndicatorLogic
105
92
  };
package/dist/main.d.ts CHANGED
@@ -515,6 +515,169 @@ extends Omit<DataGridProps_2, "rows" | "columns"> {
515
515
  sx?: SxProps<Theme>;
516
516
  }
517
517
 
518
+ export declare const DataList: (props: DataListProps) => JSX_2.Element;
519
+
520
+ /**
521
+ * One entry in the badge state map: which raw status value renders which pill.
522
+ * Matched case-insensitively against `item.status`. Mirrors `DataListIconState`
523
+ * so both maps are authored the same way in widget config.
524
+ */
525
+ export declare interface DataListBadgeState {
526
+ value: string;
527
+ label?: string;
528
+ color?: string;
529
+ backgroundColor?: string;
530
+ /** Set for the outlined chip style; omit for the filled-tint style. */
531
+ borderColor?: string;
532
+ }
533
+
534
+ export declare type DataListComponentOverride<Theme = unknown> = {
535
+ defaultProps?: DataListProps;
536
+ styleOverrides?: ComponentsOverrides<Theme>["HCDataList"];
537
+ };
538
+
539
+ export declare type DataListEndSlot = "none" | "badge" | "progress" | "text";
540
+
541
+ export declare type DataListIconName =
542
+ | "shield"
543
+ | "shield-alert"
544
+ | "alert-triangle"
545
+ | "alert-circle"
546
+ | "info"
547
+ | "bell"
548
+ | "check"
549
+ | "clock"
550
+ | "flag"
551
+ | "file"
552
+ | "map-pin"
553
+ | "message"
554
+ | "thumb-up"
555
+ | "users"
556
+ | "circle";
557
+
558
+ export declare type DataListIconShape = "circle" | "rounded" | "plain";
559
+
560
+ /**
561
+ * One entry in the leading-icon state map: which raw value renders which icon and
562
+ * tint. Matched case-insensitively against `item.iconValue`.
563
+ *
564
+ * `color` / `backgroundColor` accept a theme-token path ("error.main") or a raw CSS
565
+ * color ("#f00"), resolved via `resolvePaletteColor`.
566
+ */
567
+ export declare interface DataListIconState {
568
+ value: string;
569
+ icon?: DataListIconName;
570
+ color?: string;
571
+ backgroundColor?: string;
572
+ /** Accessible name for the icon — read by screen readers, shown as the tooltip. */
573
+ label?: string;
574
+ }
575
+
576
+ export declare interface DataListItem {
577
+ id: string | number;
578
+ title: string;
579
+ /**
580
+ * Secondary line assembled from several fields — "District 3 • Maya Rousseau •
581
+ * Oct 19, 2026". Empty, null and undefined segments are dropped so a missing
582
+ * field never leaves a dangling separator. Takes precedence over `description`.
583
+ */
584
+ meta?: (string | number | null | undefined)[];
585
+ /** Secondary line as a single pre-composed string. Used when `meta` is absent. */
586
+ description?: string;
587
+ /** Matched against `iconStates` to pick the leading icon. */
588
+ iconValue?: string;
589
+ /** Leading-icon escape hatch for code callers. Wins over `iconValue`. */
590
+ icon?: ReactNode;
591
+ /** Matched against `badgeStates` when `endSlot` is "badge". */
592
+ status?: string;
593
+ /** Bar percentage (0–100) for `endSlot` "progress", or the text for "text". */
594
+ endValue?: number | string;
595
+ /** Short label beside the trailing slot, e.g. the "78%" next to a progress bar. */
596
+ endLabel?: string;
597
+ /** Trailing-slot escape hatch for code callers. Wins over `endSlot`. */
598
+ endContent?: ReactNode;
599
+ disabled?: boolean;
600
+ }
601
+
602
+ /**
603
+ * How the list reaches rows beyond the first screenful.
604
+ *
605
+ * - `infinite` — rows load as the user scrolls (default).
606
+ * - `buttons` — a `TablePagination` footer.
607
+ * - `none` — whatever is in `data` is all there is.
608
+ */
609
+ export declare type DataListPaginationMode = "infinite" | "buttons" | "none";
610
+
611
+ export declare interface DataListProps {
612
+ title?: string;
613
+ /** Header action link, e.g. "View all". Rendered only when a handler or href is set. */
614
+ actionLabel?: string;
615
+ actionHref?: string;
616
+ onActionClick?: () => void;
617
+ /**
618
+ * Header-action escape hatch — pass the widget menu here to seat it in the header
619
+ * row. Wins over `actionLabel`.
620
+ */
621
+ headerAction?: ReactNode;
622
+ /**
623
+ * Reserve space at the right edge of the header for chrome drawn *over* the
624
+ * component — the widget store's floating menu trigger sits at `top/right: 8px`
625
+ * and would otherwise cover the title or the action link. `true` reserves enough
626
+ * for the trigger; a number reserves that many pixels.
627
+ */
628
+ headerGutter?: boolean | number;
629
+
630
+ data: DataListItem[];
631
+ /** Row count on the server. Required for server-side paging (with `onChange`). */
632
+ totalCount?: number;
633
+ payload?: Partial<FV.SearchDTO>;
634
+ /** Set for server-side paging: the component stops slicing `data` itself. */
635
+ onChange?: (params: Partial<FV.SearchDTO>) => void;
636
+ onItemClick?: (item: DataListItem) => void;
637
+
638
+ /** Value → icon/tint map for the leading slot. */
639
+ iconStates?: DataListIconState[];
640
+ iconShape?: DataListIconShape;
641
+ /** Value → label/tint map for the trailing badge. */
642
+ badgeStates?: DataListBadgeState[];
643
+ endSlot?: DataListEndSlot;
644
+ /** Per-row leading-slot renderer. Wins over `icon` / `iconValue`. */
645
+ renderItemStart?: (item: DataListItem) => ReactNode;
646
+ /** Per-row trailing-slot renderer. Wins over `endContent` / `endSlot`. */
647
+ renderItemEnd?: (item: DataListItem) => ReactNode;
648
+
649
+ /** Joins `item.meta` segments. */
650
+ metaSeparator?: string;
651
+ /** Line clamp on the secondary line. 0 leaves it unclamped. */
652
+ descriptionLines?: number;
653
+ dense?: boolean;
654
+ divider?: boolean;
655
+ paginationMode?: DataListPaginationMode;
656
+ /** Rows revealed per scroll step, or per page in `buttons` mode. */
657
+ rowsPerPage?: number;
658
+ /** `buttons` mode only. */
659
+ rowsPerPageOptions?: number[];
660
+ /**
661
+ * Infinite scroll with server paging accumulates the pages it receives. Change
662
+ * this whenever the query behind `data` changes — a new filter, sort or search —
663
+ * and the accumulated rows are dropped so the list restarts at the first page.
664
+ */
665
+ resetKey?: string | number;
666
+ /** Set while a `onChange` page request is in flight, to draw the footer spinner. */
667
+ loadingMore?: boolean;
668
+ emptyMessage?: string;
669
+ loading?: boolean;
670
+ /** Skeleton rows drawn while `loading`. */
671
+ loadingRows?: number;
672
+ sx?: SxProps<Theme>;
673
+ }
674
+
675
+ /** Shape read off `data-snapshot` by the widget canvas when exporting a report. */
676
+ export declare interface DataListSnapshot {
677
+ title?: string;
678
+ data: DataListItem[];
679
+ }
680
+
518
681
  export declare const DataMap: (inProps: DataMapProps) => JSX_2.Element;
519
682
 
520
683
  export declare type DataMapComponentOverride<Theme = unknown> = {
@@ -3070,6 +3233,88 @@ declare module "@mui/material/styles" {
3070
3233
 
3071
3234
 
3072
3235
 
3236
+ declare module "@mui/material/styles" {
3237
+ interface ComponentNameToClassKey {
3238
+ HCLinearIndicator:
3239
+ | "root"
3240
+ | "barContainer"
3241
+ | "barBackground"
3242
+ | "bar"
3243
+ | "middleContainer"
3244
+ | "middle";
3245
+ }
3246
+
3247
+ interface ComponentsPropsList {
3248
+ HCLinearIndicator: LinearIndicatorProps;
3249
+ }
3250
+
3251
+ interface Components<Theme = unknown> {
3252
+ HCLinearIndicator?: LinearIndicatorComponentOverride<Theme>;
3253
+ }
3254
+ }
3255
+
3256
+
3257
+
3258
+ declare module "@mui/material/styles" {
3259
+ interface ComponentNameToClassKey {
3260
+ HCDataList:
3261
+ | "root"
3262
+ | "header"
3263
+ | "headerAction"
3264
+ | "content"
3265
+ | "list"
3266
+ | "item"
3267
+ | "itemButton"
3268
+ | "itemStart"
3269
+ | "itemMain"
3270
+ | "itemTitle"
3271
+ | "itemMeta"
3272
+ | "itemEnd"
3273
+ | "badge"
3274
+ | "empty"
3275
+ | "loadMore"
3276
+ | "pagination";
3277
+ }
3278
+
3279
+ interface ComponentsPropsList {
3280
+ HCDataList: DataListProps;
3281
+ }
3282
+
3283
+ interface Components<Theme = unknown> {
3284
+ HCDataList?: DataListComponentOverride<Theme>;
3285
+ }
3286
+ }
3287
+
3288
+
3289
+
3290
+ declare module "@mui/material/styles" {
3291
+ interface ComponentNameToClassKey {
3292
+ HCMetricCard:
3293
+ | "root"
3294
+ | "content"
3295
+ | "label"
3296
+ | "value"
3297
+ | "secondValue"
3298
+ | "trendContainer"
3299
+ | "description"
3300
+ | "icon"
3301
+ | "cornerIcon"
3302
+ | "chart"
3303
+ | "panel"
3304
+ | "sideChart";
3305
+ }
3306
+
3307
+ interface ComponentsPropsList {
3308
+ HCMetricCard: MetricCardProps;
3309
+ }
3310
+
3311
+ interface Components<Theme = unknown> {
3312
+ HCMetricCard?: MetricCardComponentOverride<Theme>;
3313
+ }
3314
+ }
3315
+
3316
+
3317
+
3073
3318
  declare namespace MAP {
3074
3319
  interface Coordinate {
3075
3320
  latitude: number;
@@ -3617,56 +3862,6 @@ declare module "@mui/material/styles" {
3617
3862
 
3618
3863
 
3619
3864
 
3620
- declare module "@mui/material/styles" {
3621
- interface ComponentNameToClassKey {
3622
- HCLinearIndicator:
3623
- | "root"
3624
- | "barContainer"
3625
- | "barBackground"
3626
- | "bar"
3627
- | "middleContainer"
3628
- | "middle";
3629
- }
3630
-
3631
- interface ComponentsPropsList {
3632
- HCLinearIndicator: LinearIndicatorProps;
3633
- }
3634
-
3635
- interface Components<Theme = unknown> {
3636
- HCLinearIndicator?: LinearIndicatorComponentOverride<Theme>;
3637
- }
3638
- }
3639
-
3640
-
3641
-
3642
- declare module "@mui/material/styles" {
3643
- interface ComponentNameToClassKey {
3644
- HCMetricCard:
3645
- | "root"
3646
- | "content"
3647
- | "label"
3648
- | "value"
3649
- | "secondValue"
3650
- | "trendContainer"
3651
- | "description"
3652
- | "icon"
3653
- | "cornerIcon"
3654
- | "chart"
3655
- | "panel"
3656
- | "sideChart";
3657
- }
3658
-
3659
- interface ComponentsPropsList {
3660
- HCMetricCard: MetricCardProps;
3661
- }
3662
-
3663
- interface Components<Theme = unknown> {
3664
- HCMetricCard?: MetricCardComponentOverride<Theme>;
3665
- }
3666
- }
3667
-
3668
-
3669
-
3670
3865
  declare module "@mui/material/styles" {
3671
3866
  interface ComponentNameToClassKey {
3672
3867
  HCObjectProfileCard: