@hybridcore/ui 1.6.5 → 1.6.7

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 (34) hide show
  1. package/dist/IconX-C2wmVYSK.js +11 -0
  2. package/dist/components/charts/_common/format.js +55 -0
  3. package/dist/components/charts/_common/utils.js +12 -7
  4. package/dist/components/charts/chart-wrapper/helpers.js +46 -21
  5. package/dist/components/charts/chart-wrapper/logic.js +57 -40
  6. package/dist/components/charts/column-line-mix/logic.js +87 -86
  7. package/dist/components/charts/donut-chart/logic.js +37 -36
  8. package/dist/components/charts/drill-down-treemap/logic.js +123 -123
  9. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +253 -252
  10. package/dist/components/charts/heatmap/logic.js +73 -73
  11. package/dist/components/charts/line/logic.js +201 -103
  12. package/dist/components/charts/logaritmic-scale/logic.js +65 -65
  13. package/dist/components/charts/multiple-value-axes/logic.js +96 -94
  14. package/dist/components/charts/nested-pie/logic.js +43 -42
  15. package/dist/components/charts/packed-circles/logic.js +111 -110
  16. package/dist/components/charts/pie-chart/logic.js +40 -39
  17. package/dist/components/charts/stacked-area-radar/logic.js +68 -67
  18. package/dist/components/charts/stacked-column-chart/logic.js +71 -70
  19. package/dist/components/charts/xy-chart/logic.js +82 -76
  20. package/dist/components/color-picker/index.js +1645 -1602
  21. package/dist/components/color-picker/logic.js +21 -12
  22. package/dist/components/color-picker/styled.js +4 -2
  23. package/dist/components/date-range-picker/index.js +359 -365
  24. package/dist/components/metric-card/helpers.js +12 -5
  25. package/dist/components/metric-card/index.js +58 -54
  26. package/dist/components/metric-card/logic.js +78 -61
  27. package/dist/components/metric-card/styled.js +63 -45
  28. package/dist/components/simple-pivot-table/index.js +129 -54
  29. package/dist/components/simple-pivot-table/logic.js +111 -45
  30. package/dist/components/simple-pivot-table/styled.js +31 -11
  31. package/dist/main.d.ts +125 -8
  32. package/dist/main.js +145 -141
  33. package/dist/{styled-Db1RdcPA.js → styled-SoqbyrkW.js} +116 -89
  34. package/package.json +1 -1
@@ -1,39 +1,39 @@
1
- import { styled as h, Box as z } from "@mui/material";
2
- import { a as i, _ as T } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
1
+ import { styled as l, Box as h, ButtonBase as U } from "@mui/material";
2
+ import { a as i, _ as D } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
3
3
  import * as d from "react";
4
4
  import { P as e } from "./index-C__OZmYy.js";
5
- import { c as U } from "./clsx-OuTLNxxd.js";
6
- import { s as u, r as I, g as D, a as F, b as p, f as G, u as V, c as H } from "./generateUtilityClasses-C3ivN9Ie.js";
7
- import { S as W } from "./SwitchBase-DTndTqI8.js";
8
- import { c as x } from "./createSvgIcon-Ch_cT8az.js";
9
- import { jsx as r, jsxs as q } from "react/jsx-runtime";
10
- import { c as L } from "./createChainedFunction-C0nujS3O.js";
11
- import { r as Z } from "./TransitionGroupContext-BDAp2T0O.js";
5
+ import { c as F } from "./clsx-OuTLNxxd.js";
6
+ import { s as f, r as I, g as H, a as G, b as u, f as V, u as W, c as q } from "./generateUtilityClasses-C3ivN9Ie.js";
7
+ import { S as L } from "./SwitchBase-DTndTqI8.js";
8
+ import { c as z } from "./createSvgIcon-Ch_cT8az.js";
9
+ import { jsx as s, jsxs as Z } from "react/jsx-runtime";
10
+ import { c as A } from "./createChainedFunction-C0nujS3O.js";
11
+ import { r as J } from "./TransitionGroupContext-BDAp2T0O.js";
12
12
  const P = /* @__PURE__ */ d.createContext(void 0);
13
13
  process.env.NODE_ENV !== "production" && (P.displayName = "RadioGroupContext");
14
- function A() {
14
+ function K() {
15
15
  return d.useContext(P);
16
16
  }
17
- const J = x(/* @__PURE__ */ r("path", {
17
+ const Q = z(/* @__PURE__ */ s("path", {
18
18
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
19
- }), "RadioButtonUnchecked"), K = x(/* @__PURE__ */ r("path", {
19
+ }), "RadioButtonUnchecked"), X = z(/* @__PURE__ */ s("path", {
20
20
  d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
21
- }), "RadioButtonChecked"), Q = u("span", {
21
+ }), "RadioButtonChecked"), Y = f("span", {
22
22
  name: "MuiRadioButtonIcon",
23
23
  shouldForwardProp: I
24
24
  })({
25
25
  position: "relative",
26
26
  display: "flex"
27
- }), X = u(J, {
27
+ }), oo = f(Q, {
28
28
  name: "MuiRadioButtonIcon"
29
29
  })({
30
30
  // Scale applied to prevent dot misalignment in Safari
31
31
  transform: "scale(1)"
32
- }), Y = u(K, {
32
+ }), eo = f(X, {
33
33
  name: "MuiRadioButtonIcon"
34
34
  })(({
35
35
  theme: o,
36
- ownerState: n
36
+ ownerState: a
37
37
  }) => i({
38
38
  left: 0,
39
39
  position: "absolute",
@@ -42,7 +42,7 @@ const J = x(/* @__PURE__ */ r("path", {
42
42
  easing: o.transitions.easing.easeIn,
43
43
  duration: o.transitions.duration.shortest
44
44
  })
45
- }, n.checked && {
45
+ }, a.checked && {
46
46
  transform: "scale(1)",
47
47
  transition: o.transitions.create("transform", {
48
48
  easing: o.transitions.easing.easeOut,
@@ -51,23 +51,23 @@ const J = x(/* @__PURE__ */ r("path", {
51
51
  }));
52
52
  function k(o) {
53
53
  const {
54
- checked: n = !1,
55
- classes: a = {},
56
- fontSize: t
57
- } = o, s = i({}, o, {
58
- checked: n
54
+ checked: a = !1,
55
+ classes: t = {},
56
+ fontSize: r
57
+ } = o, n = i({}, o, {
58
+ checked: a
59
59
  });
60
- return /* @__PURE__ */ q(Q, {
61
- className: a.root,
62
- ownerState: s,
63
- children: [/* @__PURE__ */ r(X, {
64
- fontSize: t,
65
- className: a.background,
66
- ownerState: s
67
- }), /* @__PURE__ */ r(Y, {
68
- fontSize: t,
69
- className: a.dot,
70
- ownerState: s
60
+ return /* @__PURE__ */ Z(Y, {
61
+ className: t.root,
62
+ ownerState: n,
63
+ children: [/* @__PURE__ */ s(oo, {
64
+ fontSize: r,
65
+ className: t.background,
66
+ ownerState: n
67
+ }), /* @__PURE__ */ s(eo, {
68
+ fontSize: r,
69
+ className: t.dot,
70
+ ownerState: n
71
71
  })]
72
72
  });
73
73
  }
@@ -86,92 +86,92 @@ process.env.NODE_ENV !== "production" && (k.propTypes = {
86
86
  */
87
87
  fontSize: e.oneOf(["small", "medium"])
88
88
  });
89
- function oo(o) {
90
- return F("MuiRadio", o);
89
+ function ao(o) {
90
+ return G("MuiRadio", o);
91
91
  }
92
- const b = D("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), eo = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"], no = (o) => {
92
+ const y = H("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), to = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"], ro = (o) => {
93
93
  const {
94
- classes: n,
95
- color: a,
96
- size: t
97
- } = o, s = {
98
- root: ["root", `color${p(a)}`, t !== "medium" && `size${p(t)}`]
94
+ classes: a,
95
+ color: t,
96
+ size: r
97
+ } = o, n = {
98
+ root: ["root", `color${u(t)}`, r !== "medium" && `size${u(r)}`]
99
99
  };
100
- return i({}, n, H(s, oo, n));
101
- }, ao = u(W, {
100
+ return i({}, a, q(n, ao, a));
101
+ }, no = f(L, {
102
102
  shouldForwardProp: (o) => I(o) || o === "classes",
103
103
  name: "MuiRadio",
104
104
  slot: "Root",
105
- overridesResolver: (o, n) => {
105
+ overridesResolver: (o, a) => {
106
106
  const {
107
- ownerState: a
107
+ ownerState: t
108
108
  } = o;
109
- return [n.root, a.size !== "medium" && n[`size${p(a.size)}`], n[`color${p(a.color)}`]];
109
+ return [a.root, t.size !== "medium" && a[`size${u(t.size)}`], a[`color${u(t.color)}`]];
110
110
  }
111
111
  })(({
112
112
  theme: o,
113
- ownerState: n
113
+ ownerState: a
114
114
  }) => i({
115
115
  color: (o.vars || o).palette.text.secondary
116
- }, !n.disableRipple && {
116
+ }, !a.disableRipple && {
117
117
  "&:hover": {
118
- backgroundColor: o.vars ? `rgba(${n.color === "default" ? o.vars.palette.action.activeChannel : o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : G(n.color === "default" ? o.palette.action.active : o.palette[n.color].main, o.palette.action.hoverOpacity),
118
+ backgroundColor: o.vars ? `rgba(${a.color === "default" ? o.vars.palette.action.activeChannel : o.vars.palette[a.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : V(a.color === "default" ? o.palette.action.active : o.palette[a.color].main, o.palette.action.hoverOpacity),
119
119
  // Reset on touch devices, it doesn't add specificity
120
120
  "@media (hover: none)": {
121
121
  backgroundColor: "transparent"
122
122
  }
123
123
  }
124
- }, n.color !== "default" && {
125
- [`&.${b.checked}`]: {
126
- color: (o.vars || o).palette[n.color].main
124
+ }, a.color !== "default" && {
125
+ [`&.${y.checked}`]: {
126
+ color: (o.vars || o).palette[a.color].main
127
127
  }
128
128
  }, {
129
- [`&.${b.disabled}`]: {
129
+ [`&.${y.disabled}`]: {
130
130
  color: (o.vars || o).palette.action.disabled
131
131
  }
132
132
  }));
133
- function to(o, n) {
134
- return typeof n == "object" && n !== null ? o === n : String(o) === String(n);
133
+ function so(o, a) {
134
+ return typeof a == "object" && a !== null ? o === a : String(o) === String(a);
135
135
  }
136
- const y = /* @__PURE__ */ r(k, {
136
+ const v = /* @__PURE__ */ s(k, {
137
137
  checked: !0
138
- }), v = /* @__PURE__ */ r(k, {}), S = /* @__PURE__ */ d.forwardRef(function(n, a) {
139
- var t, s;
140
- const l = V({
141
- props: n,
138
+ }), x = /* @__PURE__ */ s(k, {}), S = /* @__PURE__ */ d.forwardRef(function(a, t) {
139
+ var r, n;
140
+ const p = W({
141
+ props: a,
142
142
  name: "MuiRadio"
143
143
  }), {
144
- checked: B,
145
- checkedIcon: N = y,
144
+ checked: w,
145
+ checkedIcon: N = v,
146
146
  color: O = "primary",
147
- icon: $ = v,
148
- name: w,
149
- onChange: M,
150
- size: f = "medium",
151
- className: _
152
- } = l, j = T(l, eo), g = i({}, l, {
147
+ icon: $ = x,
148
+ name: M,
149
+ onChange: j,
150
+ size: m = "medium",
151
+ className: T
152
+ } = p, _ = D(p, to), b = i({}, p, {
153
153
  color: O,
154
- size: f
155
- }), R = no(g), c = A();
156
- let m = B;
157
- const E = L(M, c && c.onChange);
154
+ size: m
155
+ }), R = ro(b), c = K();
158
156
  let C = w;
159
- return c && (typeof m > "u" && (m = to(c.value, l.value)), typeof C > "u" && (C = c.name)), /* @__PURE__ */ r(ao, i({
157
+ const E = A(j, c && c.onChange);
158
+ let g = M;
159
+ return c && (typeof C > "u" && (C = so(c.value, p.value)), typeof g > "u" && (g = c.name)), /* @__PURE__ */ s(no, i({
160
160
  type: "radio",
161
161
  icon: /* @__PURE__ */ d.cloneElement($, {
162
- fontSize: (t = v.props.fontSize) != null ? t : f
162
+ fontSize: (r = x.props.fontSize) != null ? r : m
163
163
  }),
164
164
  checkedIcon: /* @__PURE__ */ d.cloneElement(N, {
165
- fontSize: (s = y.props.fontSize) != null ? s : f
165
+ fontSize: (n = v.props.fontSize) != null ? n : m
166
166
  }),
167
- ownerState: g,
167
+ ownerState: b,
168
168
  classes: R,
169
- name: C,
170
- checked: m,
169
+ name: g,
170
+ checked: C,
171
171
  onChange: E,
172
- ref: a,
173
- className: U(R.root, _)
174
- }, j));
172
+ ref: t,
173
+ className: F(R.root, T)
174
+ }, _));
175
175
  });
176
176
  process.env.NODE_ENV !== "production" && (S.propTypes = {
177
177
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -227,7 +227,7 @@ process.env.NODE_ENV !== "production" && (S.propTypes = {
227
227
  /**
228
228
  * Pass a ref to the `input` element.
229
229
  */
230
- inputRef: Z,
230
+ inputRef: J,
231
231
  /**
232
232
  * Name attribute of the `input` element.
233
233
  */
@@ -260,15 +260,15 @@ process.env.NODE_ENV !== "production" && (S.propTypes = {
260
260
  */
261
261
  value: e.any
262
262
  });
263
- const so = (o) => o !== "itemcolor", ko = h(z, {
263
+ const B = (o) => o !== "itemcolor", ko = l(h, {
264
264
  name: "HCColorPicker",
265
265
  slot: "root"
266
266
  })({
267
267
  display: "flex"
268
- }), go = h(S, {
268
+ }), bo = l(S, {
269
269
  name: "HCColorPicker",
270
270
  slot: "radio",
271
- shouldForwardProp: so
271
+ shouldForwardProp: B
272
272
  })(({ itemcolor: o }) => ({
273
273
  color: o,
274
274
  padding: 0,
@@ -306,7 +306,7 @@ const so = (o) => o !== "itemcolor", ko = h(z, {
306
306
  borderRadius: "50%"
307
307
  }
308
308
  }
309
- })), Ro = h(z, {
309
+ })), Ro = l(h, {
310
310
  name: "HCColorPicker",
311
311
  slot: "pickerWrapper"
312
312
  })({
@@ -314,10 +314,37 @@ const so = (o) => o !== "itemcolor", ko = h(z, {
314
314
  marginTop: 25.6,
315
315
  right: 32,
316
316
  zIndex: 9999
317
- });
317
+ }), yo = l(U, {
318
+ name: "HCColorPicker",
319
+ slot: "trigger"
320
+ })(({ theme: o }) => ({
321
+ display: "flex",
322
+ alignItems: "center",
323
+ gap: o.spacing(1),
324
+ width: "100%",
325
+ justifyContent: "flex-start",
326
+ padding: o.spacing(0.75, 1),
327
+ border: `1px solid ${o.palette.divider}`,
328
+ borderRadius: o.shape.borderRadius,
329
+ ...o.typography.body2,
330
+ color: o.palette.text.primary
331
+ })), vo = l(h, {
332
+ name: "HCColorPicker",
333
+ slot: "swatch",
334
+ shouldForwardProp: B
335
+ })(({ theme: o, itemcolor: a }) => ({
336
+ width: 18,
337
+ height: 18,
338
+ flexShrink: 0,
339
+ borderRadius: o.shape.borderRadius,
340
+ border: `1px solid ${o.palette.divider}`,
341
+ backgroundColor: a || "transparent"
342
+ }));
318
343
  export {
319
344
  ko as C,
320
345
  P as R,
321
- go as a,
322
- Ro as b
346
+ yo as a,
347
+ vo as b,
348
+ bo as c,
349
+ Ro as d
323
350
  };
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.5",
4
+ "version": "1.6.7",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",