@amateescu/portal-ui-components 0.0.7-beta1 → 0.0.7-beta2

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,26 +1,15 @@
1
- import * as $ from "react";
2
- import { ThemeContext as N, css as w, keyframes as O } from "@emotion/react";
3
- import { d as R, f as E, g as U, u as z, h as l, i as I, j as g, c as F, P as t, k as K } from "./generateUtilityClasses-yRWzVVZS.js";
4
- import { _ as V, a as i } from "./index-kNWC7pFF.js";
5
- import { jsx as y } from "react/jsx-runtime";
6
- function W(e) {
7
- return Object.keys(e).length === 0;
8
- }
9
- function B(e = null) {
10
- const r = $.useContext(N);
11
- return !r || W(r) ? e : r;
12
- }
13
- const G = R();
14
- function oe(e = G) {
15
- return B(e);
16
- }
17
- function L(e) {
18
- return E("MuiCircularProgress", e);
1
+ import { _ as R, a as i } from "./index-kNWC7pFF.js";
2
+ import * as T from "react";
3
+ import { g as j, a as U, u as z, c as l, b as E, s as y, d as I, P as e, e as F } from "./generateUtilityClasses-BzhjuzcK.js";
4
+ import { jsx as g } from "react/jsx-runtime";
5
+ import { css as w, keyframes as _ } from "@emotion/react";
6
+ function K(r) {
7
+ return j("MuiCircularProgress", r);
19
8
  }
20
9
  U("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
21
- const Y = ["className", "color", "disableShrink", "size", "style", "thickness", "value", "variant"];
22
- let u = (e) => e, P, S, T, D;
23
- const o = 44, Z = O(P || (P = u`
10
+ const V = ["className", "color", "disableShrink", "size", "style", "thickness", "value", "variant"];
11
+ let d = (r) => r, P, S, D, $;
12
+ const a = 44, W = _(P || (P = d`
24
13
  0% {
25
14
  transform: rotate(0deg);
26
15
  }
@@ -28,7 +17,7 @@ const o = 44, Z = O(P || (P = u`
28
17
  100% {
29
18
  transform: rotate(360deg);
30
19
  }
31
- `)), q = O(S || (S = u`
20
+ `)), B = _(S || (S = d`
32
21
  0% {
33
22
  stroke-dasharray: 1px, 200px;
34
23
  stroke-dashoffset: 0;
@@ -43,125 +32,125 @@ const o = 44, Z = O(P || (P = u`
43
32
  stroke-dasharray: 100px, 200px;
44
33
  stroke-dashoffset: -125px;
45
34
  }
46
- `)), A = (e) => {
35
+ `)), G = (r) => {
47
36
  const {
48
- classes: r,
49
- variant: s,
50
- color: a,
51
- disableShrink: m
52
- } = e, d = {
53
- root: ["root", s, `color${l(a)}`],
37
+ classes: s,
38
+ variant: t,
39
+ color: o,
40
+ disableShrink: u
41
+ } = r, m = {
42
+ root: ["root", t, `color${l(o)}`],
54
43
  svg: ["svg"],
55
- circle: ["circle", `circle${l(s)}`, m && "circleDisableShrink"]
44
+ circle: ["circle", `circle${l(t)}`, u && "circleDisableShrink"]
56
45
  };
57
- return I(d, L, r);
58
- }, H = g("span", {
46
+ return E(m, K, s);
47
+ }, L = y("span", {
59
48
  name: "MuiCircularProgress",
60
49
  slot: "Root",
61
- overridesResolver: (e, r) => {
50
+ overridesResolver: (r, s) => {
62
51
  const {
63
- ownerState: s
64
- } = e;
65
- return [r.root, r[s.variant], r[`color${l(s.color)}`]];
52
+ ownerState: t
53
+ } = r;
54
+ return [s.root, s[t.variant], s[`color${l(t.color)}`]];
66
55
  }
67
56
  })(({
68
- ownerState: e,
69
- theme: r
57
+ ownerState: r,
58
+ theme: s
70
59
  }) => i({
71
60
  display: "inline-block"
72
- }, e.variant === "determinate" && {
73
- transition: r.transitions.create("transform")
74
- }, e.color !== "inherit" && {
75
- color: (r.vars || r).palette[e.color].main
61
+ }, r.variant === "determinate" && {
62
+ transition: s.transitions.create("transform")
63
+ }, r.color !== "inherit" && {
64
+ color: (s.vars || s).palette[r.color].main
76
65
  }), ({
77
- ownerState: e
78
- }) => e.variant === "indeterminate" && w(T || (T = u`
66
+ ownerState: r
67
+ }) => r.variant === "indeterminate" && w(D || (D = d`
79
68
  animation: ${0} 1.4s linear infinite;
80
- `), Z)), J = g("svg", {
69
+ `), W)), Y = y("svg", {
81
70
  name: "MuiCircularProgress",
82
71
  slot: "Svg",
83
- overridesResolver: (e, r) => r.svg
72
+ overridesResolver: (r, s) => s.svg
84
73
  })({
85
74
  display: "block"
86
75
  // Keeps the progress centered
87
- }), Q = g("circle", {
76
+ }), Z = y("circle", {
88
77
  name: "MuiCircularProgress",
89
78
  slot: "Circle",
90
- overridesResolver: (e, r) => {
79
+ overridesResolver: (r, s) => {
91
80
  const {
92
- ownerState: s
93
- } = e;
94
- return [r.circle, r[`circle${l(s.variant)}`], s.disableShrink && r.circleDisableShrink];
81
+ ownerState: t
82
+ } = r;
83
+ return [s.circle, s[`circle${l(t.variant)}`], t.disableShrink && s.circleDisableShrink];
95
84
  }
96
85
  })(({
97
- ownerState: e,
98
- theme: r
86
+ ownerState: r,
87
+ theme: s
99
88
  }) => i({
100
89
  stroke: "currentColor"
101
- }, e.variant === "determinate" && {
102
- transition: r.transitions.create("stroke-dashoffset")
103
- }, e.variant === "indeterminate" && {
90
+ }, r.variant === "determinate" && {
91
+ transition: s.transitions.create("stroke-dashoffset")
92
+ }, r.variant === "indeterminate" && {
104
93
  // Some default value that looks fine waiting for the animation to kicks in.
105
94
  strokeDasharray: "80px, 200px",
106
95
  strokeDashoffset: 0
107
96
  // Add the unit to fix a Edge 16 and below bug.
108
97
  }), ({
109
- ownerState: e
110
- }) => e.variant === "indeterminate" && !e.disableShrink && w(D || (D = u`
98
+ ownerState: r
99
+ }) => r.variant === "indeterminate" && !r.disableShrink && w($ || ($ = d`
111
100
  animation: ${0} 1.4s ease-in-out infinite;
112
- `), q)), X = /* @__PURE__ */ $.forwardRef(function(r, s) {
113
- const a = z({
114
- props: r,
101
+ `), B)), q = /* @__PURE__ */ T.forwardRef(function(s, t) {
102
+ const o = z({
103
+ props: s,
115
104
  name: "MuiCircularProgress"
116
105
  }), {
117
- className: m,
118
- color: d = "primary",
119
- disableShrink: _ = !1,
106
+ className: u,
107
+ color: m = "primary",
108
+ disableShrink: M = !1,
120
109
  size: f = 40,
121
- style: j,
110
+ style: N,
122
111
  thickness: n = 3.6,
123
- value: h = 0,
112
+ value: p = 0,
124
113
  variant: k = "indeterminate"
125
- } = a, M = V(a, Y), c = i({}, a, {
126
- color: d,
127
- disableShrink: _,
114
+ } = o, O = R(o, V), c = i({}, o, {
115
+ color: m,
116
+ disableShrink: M,
128
117
  size: f,
129
118
  thickness: n,
130
- value: h,
119
+ value: p,
131
120
  variant: k
132
- }), p = A(c), v = {}, b = {}, x = {};
121
+ }), h = G(c), v = {}, b = {}, x = {};
133
122
  if (k === "determinate") {
134
- const C = 2 * Math.PI * ((o - n) / 2);
135
- v.strokeDasharray = C.toFixed(3), x["aria-valuenow"] = Math.round(h), v.strokeDashoffset = `${((100 - h) / 100 * C).toFixed(3)}px`, b.transform = "rotate(-90deg)";
123
+ const C = 2 * Math.PI * ((a - n) / 2);
124
+ v.strokeDasharray = C.toFixed(3), x["aria-valuenow"] = Math.round(p), v.strokeDashoffset = `${((100 - p) / 100 * C).toFixed(3)}px`, b.transform = "rotate(-90deg)";
136
125
  }
137
- return /* @__PURE__ */ y(H, i({
138
- className: F(p.root, m),
126
+ return /* @__PURE__ */ g(L, i({
127
+ className: I(h.root, u),
139
128
  style: i({
140
129
  width: f,
141
130
  height: f
142
- }, b, j),
131
+ }, b, N),
143
132
  ownerState: c,
144
- ref: s,
133
+ ref: t,
145
134
  role: "progressbar"
146
- }, x, M, {
147
- children: /* @__PURE__ */ y(J, {
148
- className: p.svg,
135
+ }, x, O, {
136
+ children: /* @__PURE__ */ g(Y, {
137
+ className: h.svg,
149
138
  ownerState: c,
150
- viewBox: `${o / 2} ${o / 2} ${o} ${o}`,
151
- children: /* @__PURE__ */ y(Q, {
152
- className: p.circle,
139
+ viewBox: `${a / 2} ${a / 2} ${a} ${a}`,
140
+ children: /* @__PURE__ */ g(Z, {
141
+ className: h.circle,
153
142
  style: v,
154
143
  ownerState: c,
155
- cx: o,
156
- cy: o,
157
- r: (o - n) / 2,
144
+ cx: a,
145
+ cy: a,
146
+ r: (a - n) / 2,
158
147
  fill: "none",
159
148
  strokeWidth: n
160
149
  })
161
150
  })
162
151
  }));
163
152
  });
164
- process.env.NODE_ENV !== "production" && (X.propTypes = {
153
+ process.env.NODE_ENV !== "production" && (q.propTypes = {
165
154
  // ┌────────────────────────────── Warning ──────────────────────────────┐
166
155
  // │ These PropTypes are generated from the TypeScript type definitions. │
167
156
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -169,58 +158,57 @@ process.env.NODE_ENV !== "production" && (X.propTypes = {
169
158
  /**
170
159
  * Override or extend the styles applied to the component.
171
160
  */
172
- classes: t.object,
161
+ classes: e.object,
173
162
  /**
174
163
  * @ignore
175
164
  */
176
- className: t.string,
165
+ className: e.string,
177
166
  /**
178
167
  * The color of the component.
179
168
  * It supports both default and custom theme colors, which can be added as shown in the
180
169
  * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
181
170
  * @default 'primary'
182
171
  */
183
- color: t.oneOfType([t.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), t.string]),
172
+ color: e.oneOfType([e.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
184
173
  /**
185
174
  * If `true`, the shrink animation is disabled.
186
175
  * This only works if variant is `indeterminate`.
187
176
  * @default false
188
177
  */
189
- disableShrink: K(t.bool, (e) => e.disableShrink && e.variant && e.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
178
+ disableShrink: F(e.bool, (r) => r.disableShrink && r.variant && r.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
190
179
  /**
191
180
  * The size of the component.
192
181
  * If using a number, the pixel unit is assumed.
193
182
  * If using a string, you need to provide the CSS unit, for example '3rem'.
194
183
  * @default 40
195
184
  */
196
- size: t.oneOfType([t.number, t.string]),
185
+ size: e.oneOfType([e.number, e.string]),
197
186
  /**
198
187
  * @ignore
199
188
  */
200
- style: t.object,
189
+ style: e.object,
201
190
  /**
202
191
  * The system prop that allows defining system overrides as well as additional CSS styles.
203
192
  */
204
- sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
193
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
205
194
  /**
206
195
  * The thickness of the circle.
207
196
  * @default 3.6
208
197
  */
209
- thickness: t.number,
198
+ thickness: e.number,
210
199
  /**
211
200
  * The value of the progress indicator for the determinate variant.
212
201
  * Value between 0 and 100.
213
202
  * @default 0
214
203
  */
215
- value: t.number,
204
+ value: e.number,
216
205
  /**
217
206
  * The variant to use.
218
207
  * Use indeterminate when there is no progress value.
219
208
  * @default 'indeterminate'
220
209
  */
221
- variant: t.oneOf(["determinate", "indeterminate"])
210
+ variant: e.oneOf(["determinate", "indeterminate"])
222
211
  });
223
212
  export {
224
- X as C,
225
- oe as u
213
+ q as C
226
214
  };