@hybridcore/ui 1.6.31 → 1.6.32

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.
@@ -43,10 +43,7 @@ const i = [
43
43
  const e = (r = t == null ? void 0 : t.dataItem) == null ? void 0 : r.get("valuePercentTotal");
44
44
  return typeof e == "number" ? e : void 0;
45
45
  }, T = (t, e) => {
46
- t.valueLabels.template.set(
47
- "text",
48
- u({ percentDecimals: e })
49
- ), t.valueLabels.template.adapters.add("text", (r, a) => {
46
+ t.valueLabels.template.set("text", u({ percentDecimals: e })), t.valueLabels.template.adapters.add("text", (r, a) => {
50
47
  const n = b(a);
51
48
  return n === void 0 ? r : u({ percentDecimals: e, percent: n });
52
49
  });
@@ -87,11 +87,7 @@ const pe = (k) => {
87
87
  const l = a[0], u = l ? (F = c[0]) == null ? void 0 : F[l.value] : void 0;
88
88
  Y && n && l && u != null && u !== "" && y.children.push(
89
89
  _.new(e, {
90
- text: l.type === "date" ? O(
91
- u,
92
- l.dateFormat,
93
- l.value
94
- ) : String(u),
90
+ text: l.type === "date" ? O(u, l.dateFormat, l.value) : String(u),
95
91
  centerX: i(50),
96
92
  x: i(50),
97
93
  fill: v(m.palette.text.secondary),
@@ -173,9 +173,7 @@ const Oe = (P) => {
173
173
  })
174
174
  ), C = T.orderBy(i, [h.value]), C = C.map((w) => ({
175
175
  ...w,
176
- [h.value]: Z(w[h.value]).format(
177
- v
178
- )
176
+ [h.value]: Z(w[h.value]).format(v)
179
177
  }));
180
178
  } else
181
179
  k = d.xAxes.push(
@@ -72,11 +72,7 @@ const pe = (b) => {
72
72
  const i = t[0], p = i ? (F = l[0]) == null ? void 0 : F[i.value] : void 0;
73
73
  Y && n && i && p != null && p !== "" && y.children.push(
74
74
  _.new(e, {
75
- text: i.type === "date" ? k(
76
- p,
77
- i.dateFormat,
78
- i.value
79
- ) : String(p),
75
+ text: i.type === "date" ? k(p, i.dateFormat, i.value) : String(p),
80
76
  centerX: d(50),
81
77
  x: d(50),
82
78
  fill: Z(f.palette.text.secondary),
@@ -799,9 +799,7 @@ const et = (_) => {
799
799
  })
800
800
  ), v = H.orderBy(v, [x.value]), v = v.map((A) => ({
801
801
  ...A,
802
- [x.value]: ye(A[x.value]).format(
803
- P
804
- )
802
+ [x.value]: ye(A[x.value]).format(P)
805
803
  }));
806
804
  } else
807
805
  C = p.xAxes.push(
@@ -62,9 +62,7 @@ const Fe = (L) => {
62
62
  })
63
63
  ), m = C.orderBy(m, [a.value]), m = m.map((r) => ({
64
64
  ...r,
65
- [a.value]: P(r[a.value]).format(
66
- s
67
- )
65
+ [a.value]: P(r[a.value]).format(s)
68
66
  }));
69
67
  } else
70
68
  l = o.xAxes.push(
@@ -128,9 +126,7 @@ const Fe = (L) => {
128
126
  });
129
127
  }), j.data.push(r);
130
128
  }
131
- Object.keys(A).forEach(
132
- (t) => I($(t), t)
133
- ), o.set(
129
+ Object.keys(A).forEach((t) => I($(t), t)), o.set(
134
130
  "cursor",
135
131
  ae.new(e, { xAxis: l, behavior: "none" })
136
132
  ).lineY.set("visible", !1), G({
@@ -1,17 +1,17 @@
1
- import { jsxs as n, Fragment as g, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as n, Fragment as h, jsx as e } from "react/jsx-runtime";
2
2
  import { Typography as I, Divider as k, Checkbox as R, CircularProgress as H, TablePagination as T, Box as W, ListItem as B, ListItemIcon as J, ListItemText as q } from "@mui/material";
3
3
  import K from "lodash";
4
4
  import { joinMeta as Q } from "./helpers.js";
5
5
  import { usePaginatedListLogic as X } from "./logic.js";
6
- import { PaginatedListRoot as Y, PaginatedListHeader as Z, PaginatedListViewAll as $, PaginatedListContent as ee, PaginatedListCardRail as ie, PaginatedListCard as ne, PaginatedListCardHeader as ae, PaginatedListCardIcon as te, PaginatedListCardTitle as re, PaginatedListCardDescription as oe, PaginatedListCardFooter as de, PaginatedListCardMeta as se, PaginatedListCardAction as ce, PaginatedListLoadMore as le, PaginatedListPagination as M, PaginatedListList as he } from "./styled.js";
7
- import { c as ge } from "../../createReactComponent-C7L-DMHj.js";
6
+ import { PaginatedListRoot as Y, PaginatedListHeader as Z, PaginatedListViewAll as $, PaginatedListContent as ee, PaginatedListCardRail as ie, PaginatedListCard as ne, PaginatedListCardHeader as ae, PaginatedListCardIcon as te, PaginatedListCardTitle as re, PaginatedListCardDescription as oe, PaginatedListCardFooter as de, PaginatedListCardMeta as se, PaginatedListCardAction as ce, PaginatedListLoadMore as le, PaginatedListPagination as M, PaginatedListList as ge } from "./styled.js";
7
+ import { c as he } from "../../createReactComponent-C7L-DMHj.js";
8
8
  /**
9
9
  * @license @tabler/icons-react v3.44.0 - MIT
10
10
  *
11
11
  * This source code is licensed under the MIT license.
12
12
  * See the LICENSE file in the root directory of this source tree.
13
13
  */
14
- const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9 0l0 9", key: "svg-1" }]], O = ge("outline", "arrow-up-right", "ArrowUpRight", pe), A = [5, 10, 25, 50], xe = (_) => {
14
+ const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9 0l0 9", key: "svg-1" }]], O = he("outline", "arrow-up-right", "ArrowUpRight", pe), A = [5, 10, 25, 50], xe = (_) => {
15
15
  const {
16
16
  title: c,
17
17
  variant: b,
@@ -38,7 +38,7 @@ const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9
38
38
  ownerState: a,
39
39
  sx: V,
40
40
  other: G
41
- } = X(_), h = S, r = b === "cards", o = r && D === "grid", d = t || !!U;
41
+ } = X(_), g = S, o = b === "cards", r = o && D === "grid", d = t || !!U;
42
42
  return /* @__PURE__ */ n(
43
43
  Y,
44
44
  {
@@ -51,10 +51,10 @@ const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9
51
51
  }),
52
52
  ...G,
53
53
  children: [
54
- c && /* @__PURE__ */ n(g, { children: [
54
+ c && /* @__PURE__ */ n(h, { children: [
55
55
  /* @__PURE__ */ n(Z, { ownerState: a, children: [
56
56
  /* @__PURE__ */ e(I, { variant: "h3", children: c }),
57
- r && !o && P && /* @__PURE__ */ e(
57
+ o && !r && P && /* @__PURE__ */ e(
58
58
  $,
59
59
  {
60
60
  size: "small",
@@ -64,19 +64,20 @@ const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9
64
64
  }
65
65
  )
66
66
  ] }),
67
- !r && /* @__PURE__ */ e(k, {})
67
+ !o && /* @__PURE__ */ e(k, {})
68
68
  ] }),
69
- /* @__PURE__ */ e(ee, { ownerState: a, children: r ? /* @__PURE__ */ n(g, { children: [
70
- /* @__PURE__ */ n(ie, { grid: o, children: [
69
+ /* @__PURE__ */ e(ee, { ownerState: a, children: o ? /* @__PURE__ */ n(h, { children: [
70
+ /* @__PURE__ */ n(ie, { grid: r, children: [
71
71
  l.map((i, s) => {
72
72
  const w = Q(i.meta, z);
73
73
  return /* @__PURE__ */ n(
74
74
  ne,
75
75
  {
76
+ grid: r,
76
77
  onClick: y(i),
77
78
  sx: {
78
79
  cursor: d ? "pointer" : "default",
79
- ...o && { flex: "1 1 280px", maxWidth: 360 }
80
+ ...r && { flex: "1 1 280px", maxWidth: 360 }
80
81
  },
81
82
  children: [
82
83
  /* @__PURE__ */ n(ae, { children: [
@@ -87,7 +88,7 @@ const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9
87
88
  sx: { p: 0 },
88
89
  checked: v.indexOf(i.id) !== -1
89
90
  }
90
- ) : (i.icon || h) && /* @__PURE__ */ e(te, { children: i.icon ?? (h ? /* @__PURE__ */ e(h, {}) : null) }),
91
+ ) : (i.icon || g) && /* @__PURE__ */ e(te, { children: i.icon ?? (g ? /* @__PURE__ */ e(g, {}) : null) }),
91
92
  /* @__PURE__ */ e(re, { variant: "h4", title: i.title, children: i.title })
92
93
  ] }),
93
94
  /* @__PURE__ */ e(
@@ -109,7 +110,7 @@ const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9
109
110
  }),
110
111
  p && E && /* @__PURE__ */ e(le, { ref: F.sentinelRef, children: j && /* @__PURE__ */ e(H, { size: 18 }) })
111
112
  ] }),
112
- o && !p && /* @__PURE__ */ e(M, { ownerState: a, children: /* @__PURE__ */ e(
113
+ r && !p && /* @__PURE__ */ e(M, { ownerState: a, children: /* @__PURE__ */ e(
113
114
  T,
114
115
  {
115
116
  component: "div",
@@ -121,8 +122,8 @@ const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9
121
122
  onRowsPerPageChange: x
122
123
  }
123
124
  ) })
124
- ] }) : /* @__PURE__ */ n(g, { children: [
125
- /* @__PURE__ */ e(he, { disablePadding: !0, ownerState: a, children: l.map((i, s) => /* @__PURE__ */ n(W, { children: [
125
+ ] }) : /* @__PURE__ */ n(h, { children: [
126
+ /* @__PURE__ */ e(ge, { disablePadding: !0, ownerState: a, children: l.map((i, s) => /* @__PURE__ */ n(W, { children: [
126
127
  s !== 0 && /* @__PURE__ */ e(k, { component: "li" }),
127
128
  /* @__PURE__ */ n(
128
129
  B,
@@ -1,4 +1,4 @@
1
- import { styled as a, Paper as o, Box as e, List as s, Button as d, Typography as i } from "@mui/material";
1
+ import { styled as a, Paper as o, Box as e, List as s, Button as d, Typography as n } from "@mui/material";
2
2
  const g = a(o, {
3
3
  name: "HCPaginatedList",
4
4
  slot: "Root"
@@ -6,7 +6,7 @@ const g = a(o, {
6
6
  display: "flex",
7
7
  flexDirection: "column",
8
8
  height: "100%"
9
- })), c = a(e, {
9
+ })), p = a(e, {
10
10
  name: "HCPaginatedList",
11
11
  slot: "Header"
12
12
  })(({ theme: t }) => ({
@@ -18,7 +18,7 @@ const g = a(o, {
18
18
  alignItems: "center",
19
19
  justifyContent: "space-between",
20
20
  gap: t.spacing(1)
21
- })), p = a(e, {
21
+ })), c = a(e, {
22
22
  name: "HCPaginatedList",
23
23
  slot: "Content"
24
24
  })(() => ({
@@ -59,12 +59,12 @@ const g = a(o, {
59
59
  name: "HCPaginatedList",
60
60
  slot: "CardRail",
61
61
  shouldForwardProp: (t) => t !== "grid"
62
- })(({ theme: t, grid: n }) => ({
62
+ })(({ theme: t, grid: i }) => ({
63
63
  minHeight: 0,
64
64
  display: "flex",
65
65
  alignItems: "stretch",
66
66
  gap: t.spacing(2),
67
- ...n ? {
67
+ ...i ? {
68
68
  // Wraps and lets the *page* scroll. No `overflow` here on purpose: the rail
69
69
  // has no bounded height, so `auto` would produce no scrollbar and leave the
70
70
  // sentinel permanently in view, pulling page after page.
@@ -73,12 +73,20 @@ const g = a(o, {
73
73
  alignContent: "flex-start"
74
74
  } : {
75
75
  flex: "0 0 auto",
76
- overflow: "hidden"
76
+ overflow: "hidden",
77
+ [t.breakpoints.down("md")]: {
78
+ overflowX: "auto",
79
+ overflowY: "hidden",
80
+ scrollSnapType: "x mandatory",
81
+ scrollbarWidth: "none",
82
+ "&::-webkit-scrollbar": { display: "none" }
83
+ }
77
84
  }
78
85
  })), P = a(e, {
79
86
  name: "HCPaginatedList",
80
- slot: "Card"
81
- })(({ theme: t }) => ({
87
+ slot: "Card",
88
+ shouldForwardProp: (t) => t !== "grid"
89
+ })(({ theme: t, grid: i }) => ({
82
90
  // Equal shares of the row: the rail does not scroll, so cards divide the width
83
91
  // rather than spilling out of it. `flex-basis: 0` stops a long title widening its
84
92
  // card; the grid overrides the basis so cards wrap instead of shrinking to slivers.
@@ -93,7 +101,16 @@ const g = a(o, {
93
101
  padding: t.spacing(2),
94
102
  borderRadius: t.shape.borderRadius,
95
103
  backgroundColor: t.palette.background.paper,
96
- overflow: "hidden"
104
+ overflow: "hidden",
105
+ ...i ? {} : {
106
+ [t.breakpoints.down("md")]: {
107
+ flex: "0 0 42%",
108
+ scrollSnapAlign: "start"
109
+ },
110
+ [t.breakpoints.down("sm")]: {
111
+ flex: "0 0 78%"
112
+ }
113
+ }
97
114
  })), m = a(e, {
98
115
  name: "HCPaginatedList",
99
116
  slot: "CardHeader"
@@ -101,7 +118,7 @@ const g = a(o, {
101
118
  display: "flex",
102
119
  alignItems: "flex-start",
103
120
  gap: t.spacing(1)
104
- })), H = a(e, {
121
+ })), u = a(e, {
105
122
  name: "HCPaginatedList",
106
123
  slot: "CardIcon"
107
124
  })(() => ({
@@ -109,7 +126,7 @@ const g = a(o, {
109
126
  display: "flex",
110
127
  alignItems: "center",
111
128
  justifyContent: "center"
112
- })), u = a(i, {
129
+ })), H = a(n, {
113
130
  name: "HCPaginatedList",
114
131
  slot: "CardTitle"
115
132
  })(() => ({
@@ -118,7 +135,7 @@ const g = a(o, {
118
135
  WebkitBoxOrient: "vertical",
119
136
  WebkitLineClamp: 3,
120
137
  overflow: "hidden"
121
- })), y = a(i, {
138
+ })), y = a(n, {
122
139
  name: "HCPaginatedList",
123
140
  slot: "CardDescription"
124
141
  })(({ theme: t }) => ({
@@ -147,7 +164,7 @@ const g = a(o, {
147
164
  alignItems: "center",
148
165
  justifyContent: "space-between",
149
166
  gap: 8
150
- })), w = a(i, {
167
+ })), w = a(n, {
151
168
  name: "HCPaginatedList",
152
169
  slot: "CardMeta"
153
170
  })(({ theme: t }) => ({
@@ -176,12 +193,12 @@ export {
176
193
  y as PaginatedListCardDescription,
177
194
  b as PaginatedListCardFooter,
178
195
  m as PaginatedListCardHeader,
179
- H as PaginatedListCardIcon,
196
+ u as PaginatedListCardIcon,
180
197
  w as PaginatedListCardMeta,
181
198
  L as PaginatedListCardRail,
182
- u as PaginatedListCardTitle,
183
- p as PaginatedListContent,
184
- c as PaginatedListHeader,
199
+ H as PaginatedListCardTitle,
200
+ c as PaginatedListContent,
201
+ p as PaginatedListHeader,
185
202
  C as PaginatedListList,
186
203
  v as PaginatedListLoadMore,
187
204
  f as PaginatedListPagination,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.6.31",
4
+ "version": "1.6.32",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",