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