@smart-factor/gem-ui-components 0.0.113 → 0.0.115

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 (35) hide show
  1. package/dist/{Drawer-CR1frcWF.js → Drawer-DbJg-t8M.js} +50 -50
  2. package/dist/SignEditor.js +10186 -10573
  3. package/dist/{Stack-CP81SpOh.js → Stack-Bsa5WF4E.js} +50 -49
  4. package/dist/{Tree-6R0L5vqg.js → Tree-BScJ4KG_.js} +782 -1103
  5. package/dist/components/Drawer/index.js +1 -1
  6. package/dist/components/Login/AppVersion.d.ts +2 -0
  7. package/dist/components/Login/Login.d.ts +7 -0
  8. package/dist/components/Login/Login.stories.d.ts +7 -0
  9. package/dist/components/Login/Login.styles.d.ts +24 -0
  10. package/dist/components/Login/index.d.ts +2 -0
  11. package/dist/components/LoginModal/LoginModal.d.ts +0 -4
  12. package/dist/components/Sidebar/Sidebar.d.ts +31 -0
  13. package/dist/components/Sidebar/Sidebar.stories.d.ts +17 -0
  14. package/dist/components/Sidebar/SidebarCollapseButton/SidebarCollapseButton.d.ts +7 -0
  15. package/dist/components/Sidebar/SidebarCollapseButton/index.d.ts +2 -0
  16. package/dist/components/Sidebar/SidebarLogo.d.ts +5 -0
  17. package/dist/components/Sidebar/SidebarLogoutButton/SidebarLogoutButton.d.ts +6 -0
  18. package/dist/components/Sidebar/SidebarLogoutButton/index.d.ts +2 -0
  19. package/dist/components/Sidebar/SidebarMenuItem/SidebarMenuItem.d.ts +11 -0
  20. package/dist/components/Sidebar/SidebarMenuItem/SidebarMenuItem.styles.d.ts +5 -0
  21. package/dist/components/Sidebar/SidebarMenuItem/index.d.ts +2 -0
  22. package/dist/components/Sidebar/index.d.ts +2 -0
  23. package/dist/components/Tree/index.js +1 -1
  24. package/dist/licenses.txt +103 -103
  25. package/dist/main.d.ts +4 -1
  26. package/dist/main.js +1491 -1511
  27. package/dist/services/auth/clearAuthStorage.d.ts +4 -0
  28. package/dist/services/mutations/auth/useLogout.d.ts +4 -0
  29. package/dist/services/mutations/auth/useResetPassword.d.ts +5 -0
  30. package/dist/services/queries/auth/useGetAppDetails.d.ts +19 -0
  31. package/dist/services/queryKeys.d.ts +1 -0
  32. package/dist/{theme-CyElD8XL.js → theme-Dfrivrji.js} +27884 -26717
  33. package/dist/warning-BcYeNKLQ.js +416 -0
  34. package/package.json +1 -1
  35. package/dist/warning-CJpi1iFg.js +0 -95
@@ -0,0 +1,416 @@
1
+ import * as a from "react";
2
+ import { r as oe, m as re, u as _, a as ie, b as se, d as ae, T as le, g as ce, c as pe, e as ue, f as de, h as fe, i as he, j as me, s as P, k as ge, l as ye, n as H, o as Ee, P as e, p as we, q as k } from "./Stack-Bsa5WF4E.js";
3
+ import { jsx as y } from "react/jsx-runtime";
4
+ function Re(o, t, r, s, i) {
5
+ if (process.env.NODE_ENV === "production")
6
+ return null;
7
+ const f = i || t;
8
+ return typeof o[t] < "u" ? new Error(`The prop \`${f}\` is not supported. Please remove it.`) : null;
9
+ }
10
+ function $e({
11
+ controlled: o,
12
+ default: t,
13
+ name: r,
14
+ state: s = "value"
15
+ }) {
16
+ const {
17
+ current: i
18
+ } = a.useRef(o !== void 0), [f, p] = a.useState(t), u = i ? o : f;
19
+ if (process.env.NODE_ENV !== "production") {
20
+ a.useEffect(() => {
21
+ i !== (o !== void 0) && console.error([`MUI: A component is changing the ${i ? "" : "un"}controlled ${s} state of ${r} to be ${i ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
22
+ `));
23
+ }, [s, r, o]);
24
+ const {
25
+ current: d
26
+ } = a.useRef(t);
27
+ a.useEffect(() => {
28
+ !i && !Object.is(d, t) && console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
29
+ `));
30
+ }, [JSON.stringify(t)]);
31
+ }
32
+ const E = a.useCallback((d) => {
33
+ i || p(d);
34
+ }, []);
35
+ return [u, E];
36
+ }
37
+ function Ne(o) {
38
+ var w;
39
+ const {
40
+ elementType: t,
41
+ externalSlotProps: r,
42
+ ownerState: s,
43
+ skipResolvingSlotProps: i = !1,
44
+ ...f
45
+ } = o, p = i ? {} : oe(r, s), {
46
+ props: u,
47
+ internalRef: E
48
+ } = re({
49
+ ...f,
50
+ externalSlotProps: p
51
+ }), d = _(E, p == null ? void 0 : p.ref, (w = o.additionalProps) == null ? void 0 : w.ref);
52
+ return ie(t, {
53
+ ...u,
54
+ ref: d
55
+ }, s);
56
+ }
57
+ function De({
58
+ props: o,
59
+ name: t
60
+ }) {
61
+ return se({
62
+ props: o,
63
+ name: t,
64
+ defaultTheme: ae,
65
+ themeId: le
66
+ });
67
+ }
68
+ function xe(o) {
69
+ return ce("MuiCollapse", o);
70
+ }
71
+ pe("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
72
+ const ve = (o) => {
73
+ const {
74
+ orientation: t,
75
+ classes: r
76
+ } = o, s = {
77
+ root: ["root", `${t}`],
78
+ entered: ["entered"],
79
+ hidden: ["hidden"],
80
+ wrapper: ["wrapper", `${t}`],
81
+ wrapperInner: ["wrapperInner", `${t}`]
82
+ };
83
+ return ye(s, xe, r);
84
+ }, Ce = P("div", {
85
+ name: "MuiCollapse",
86
+ slot: "Root",
87
+ overridesResolver: (o, t) => {
88
+ const {
89
+ ownerState: r
90
+ } = o;
91
+ return [t.root, t[r.orientation], r.state === "entered" && t.entered, r.state === "exited" && !r.in && r.collapsedSize === "0px" && t.hidden];
92
+ }
93
+ })(Ee(({
94
+ theme: o
95
+ }) => ({
96
+ height: 0,
97
+ overflow: "hidden",
98
+ transition: o.transitions.create("height"),
99
+ variants: [{
100
+ props: {
101
+ orientation: "horizontal"
102
+ },
103
+ style: {
104
+ height: "auto",
105
+ width: 0,
106
+ transition: o.transitions.create("width")
107
+ }
108
+ }, {
109
+ props: {
110
+ state: "entered"
111
+ },
112
+ style: {
113
+ height: "auto",
114
+ overflow: "visible"
115
+ }
116
+ }, {
117
+ props: {
118
+ state: "entered",
119
+ orientation: "horizontal"
120
+ },
121
+ style: {
122
+ width: "auto"
123
+ }
124
+ }, {
125
+ props: ({
126
+ ownerState: t
127
+ }) => t.state === "exited" && !t.in && t.collapsedSize === "0px",
128
+ style: {
129
+ visibility: "hidden"
130
+ }
131
+ }]
132
+ }))), Se = P("div", {
133
+ name: "MuiCollapse",
134
+ slot: "Wrapper",
135
+ overridesResolver: (o, t) => t.wrapper
136
+ })({
137
+ // Hack to get children with a negative margin to not falsify the height computation.
138
+ display: "flex",
139
+ width: "100%",
140
+ variants: [{
141
+ props: {
142
+ orientation: "horizontal"
143
+ },
144
+ style: {
145
+ width: "auto",
146
+ height: "100%"
147
+ }
148
+ }]
149
+ }), Te = P("div", {
150
+ name: "MuiCollapse",
151
+ slot: "WrapperInner",
152
+ overridesResolver: (o, t) => t.wrapperInner
153
+ })({
154
+ width: "100%",
155
+ variants: [{
156
+ props: {
157
+ orientation: "horizontal"
158
+ },
159
+ style: {
160
+ width: "auto",
161
+ height: "100%"
162
+ }
163
+ }]
164
+ }), M = /* @__PURE__ */ a.forwardRef(function(t, r) {
165
+ const s = ue({
166
+ props: t,
167
+ name: "MuiCollapse"
168
+ }), {
169
+ addEndListener: i,
170
+ children: f,
171
+ className: p,
172
+ collapsedSize: u = "0px",
173
+ component: E,
174
+ easing: d,
175
+ in: R,
176
+ onEnter: w,
177
+ onEntered: I,
178
+ onEntering: V,
179
+ onExit: j,
180
+ onExited: J,
181
+ onExiting: F,
182
+ orientation: A = "vertical",
183
+ style: $,
184
+ timeout: h = de.standard,
185
+ // eslint-disable-next-line react/prop-types
186
+ TransitionComponent: B = fe,
187
+ ...G
188
+ } = s, T = {
189
+ ...s,
190
+ orientation: A,
191
+ collapsedSize: u
192
+ }, x = ve(T), U = he(), K = me(), m = a.useRef(null), N = a.useRef(), b = typeof u == "number" ? `${u}px` : u, v = A === "horizontal", C = v ? "width" : "height", z = a.useRef(null), Q = _(r, z), g = (n) => (l) => {
193
+ if (n) {
194
+ const c = z.current;
195
+ l === void 0 ? n(c) : n(c, l);
196
+ }
197
+ }, D = () => m.current ? m.current[v ? "clientWidth" : "clientHeight"] : 0, X = g((n, l) => {
198
+ m.current && v && (m.current.style.position = "absolute"), n.style[C] = b, w && w(n, l);
199
+ }), Y = g((n, l) => {
200
+ const c = D();
201
+ m.current && v && (m.current.style.position = "");
202
+ const {
203
+ duration: S,
204
+ easing: O
205
+ } = H({
206
+ style: $,
207
+ timeout: h,
208
+ easing: d
209
+ }, {
210
+ mode: "enter"
211
+ });
212
+ if (h === "auto") {
213
+ const W = U.transitions.getAutoHeightDuration(c);
214
+ n.style.transitionDuration = `${W}ms`, N.current = W;
215
+ } else
216
+ n.style.transitionDuration = typeof S == "string" ? S : `${S}ms`;
217
+ n.style[C] = `${c}px`, n.style.transitionTimingFunction = O, V && V(n, l);
218
+ }), Z = g((n, l) => {
219
+ n.style[C] = "auto", I && I(n, l);
220
+ }), ee = g((n) => {
221
+ n.style[C] = `${D()}px`, j && j(n);
222
+ }), te = g(J), ne = g((n) => {
223
+ const l = D(), {
224
+ duration: c,
225
+ easing: S
226
+ } = H({
227
+ style: $,
228
+ timeout: h,
229
+ easing: d
230
+ }, {
231
+ mode: "exit"
232
+ });
233
+ if (h === "auto") {
234
+ const O = U.transitions.getAutoHeightDuration(l);
235
+ n.style.transitionDuration = `${O}ms`, N.current = O;
236
+ } else
237
+ n.style.transitionDuration = typeof c == "string" ? c : `${c}ms`;
238
+ n.style[C] = b, n.style.transitionTimingFunction = S, F && F(n);
239
+ });
240
+ return /* @__PURE__ */ y(B, {
241
+ in: R,
242
+ onEnter: X,
243
+ onEntered: Z,
244
+ onEntering: Y,
245
+ onExit: ee,
246
+ onExited: te,
247
+ onExiting: ne,
248
+ addEndListener: (n) => {
249
+ h === "auto" && K.start(N.current || 0, n), i && i(z.current, n);
250
+ },
251
+ nodeRef: z,
252
+ timeout: h === "auto" ? null : h,
253
+ ...G,
254
+ children: (n, {
255
+ ownerState: l,
256
+ ...c
257
+ }) => /* @__PURE__ */ y(Ce, {
258
+ as: E,
259
+ className: ge(x.root, p, {
260
+ entered: x.entered,
261
+ exited: !R && b === "0px" && x.hidden
262
+ }[n]),
263
+ style: {
264
+ [v ? "minWidth" : "minHeight"]: b,
265
+ ...$
266
+ },
267
+ ref: Q,
268
+ ownerState: {
269
+ ...T,
270
+ state: n
271
+ },
272
+ ...c,
273
+ children: /* @__PURE__ */ y(Se, {
274
+ ownerState: {
275
+ ...T,
276
+ state: n
277
+ },
278
+ className: x.wrapper,
279
+ ref: m,
280
+ children: /* @__PURE__ */ y(Te, {
281
+ ownerState: {
282
+ ...T,
283
+ state: n
284
+ },
285
+ className: x.wrapperInner,
286
+ children: f
287
+ })
288
+ })
289
+ })
290
+ });
291
+ });
292
+ process.env.NODE_ENV !== "production" && (M.propTypes = {
293
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
294
+ // │ These PropTypes are generated from the TypeScript type definitions. │
295
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
296
+ // └─────────────────────────────────────────────────────────────────────┘
297
+ /**
298
+ * Add a custom transition end trigger. Called with the transitioning DOM
299
+ * node and a done callback. Allows for more fine grained transition end
300
+ * logic. Note: Timeouts are still used as a fallback if provided.
301
+ */
302
+ addEndListener: e.func,
303
+ /**
304
+ * The content node to be collapsed.
305
+ */
306
+ children: e.node,
307
+ /**
308
+ * Override or extend the styles applied to the component.
309
+ */
310
+ classes: e.object,
311
+ /**
312
+ * @ignore
313
+ */
314
+ className: e.string,
315
+ /**
316
+ * The width (horizontal) or height (vertical) of the container when collapsed.
317
+ * @default '0px'
318
+ */
319
+ collapsedSize: e.oneOfType([e.number, e.string]),
320
+ /**
321
+ * The component used for the root node.
322
+ * Either a string to use a HTML element or a component.
323
+ */
324
+ component: we,
325
+ /**
326
+ * The transition timing function.
327
+ * You may specify a single easing or a object containing enter and exit values.
328
+ */
329
+ easing: e.oneOfType([e.shape({
330
+ enter: e.string,
331
+ exit: e.string
332
+ }), e.string]),
333
+ /**
334
+ * If `true`, the component will transition in.
335
+ */
336
+ in: e.bool,
337
+ /**
338
+ * @ignore
339
+ */
340
+ onEnter: e.func,
341
+ /**
342
+ * @ignore
343
+ */
344
+ onEntered: e.func,
345
+ /**
346
+ * @ignore
347
+ */
348
+ onEntering: e.func,
349
+ /**
350
+ * @ignore
351
+ */
352
+ onExit: e.func,
353
+ /**
354
+ * @ignore
355
+ */
356
+ onExited: e.func,
357
+ /**
358
+ * @ignore
359
+ */
360
+ onExiting: e.func,
361
+ /**
362
+ * The transition orientation.
363
+ * @default 'vertical'
364
+ */
365
+ orientation: e.oneOf(["horizontal", "vertical"]),
366
+ /**
367
+ * @ignore
368
+ */
369
+ style: e.object,
370
+ /**
371
+ * The system prop that allows defining system overrides as well as additional CSS styles.
372
+ */
373
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
374
+ /**
375
+ * The duration for the transition, in milliseconds.
376
+ * You may specify a single timeout for all transitions, or individually with an object.
377
+ *
378
+ * Set to 'auto' to automatically calculate transition time based on height.
379
+ * @default duration.standard
380
+ */
381
+ timeout: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
382
+ appear: e.number,
383
+ enter: e.number,
384
+ exit: e.number
385
+ })])
386
+ });
387
+ M && (M.muiSupportAuto = !0);
388
+ const q = /* @__PURE__ */ a.createContext(void 0);
389
+ process.env.NODE_ENV !== "production" && (q.displayName = "FormControlContext");
390
+ function Me() {
391
+ return a.useContext(q);
392
+ }
393
+ const Pe = k(/* @__PURE__ */ y("path", {
394
+ d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"
395
+ }), "Visibility"), Ie = k(/* @__PURE__ */ y("path", {
396
+ d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"
397
+ }), "VisibilityOff"), L = /* @__PURE__ */ new Set();
398
+ function Ve(o, t = "warning") {
399
+ if (process.env.NODE_ENV === "production")
400
+ return;
401
+ const r = Array.isArray(o) ? o.join(`
402
+ `) : o;
403
+ L.has(r) || (L.add(r), t === "error" ? console.error(r) : console.warn(r));
404
+ }
405
+ export {
406
+ M as C,
407
+ q as F,
408
+ Pe as V,
409
+ Me as a,
410
+ De as b,
411
+ Ne as c,
412
+ Re as d,
413
+ Ie as e,
414
+ $e as u,
415
+ Ve as w
416
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-factor/gem-ui-components",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "private": false,
5
5
  "description": "Gem UI Components",
6
6
  "type": "module",
@@ -1,95 +0,0 @@
1
- import * as r from "react";
2
- import { r as C, m as E, u as g, a as v, b as S, d as b, T as w, c as p } from "./Stack-CP81SpOh.js";
3
- import { jsx as m } from "react/jsx-runtime";
4
- function y(e, o, n, s, t) {
5
- if (process.env.NODE_ENV === "production")
6
- return null;
7
- const c = t || o;
8
- return typeof e[o] < "u" ? new Error(`The prop \`${c}\` is not supported. Please remove it.`) : null;
9
- }
10
- function M({
11
- controlled: e,
12
- default: o,
13
- name: n,
14
- state: s = "value"
15
- }) {
16
- const {
17
- current: t
18
- } = r.useRef(e !== void 0), [c, i] = r.useState(o), a = t ? e : c;
19
- if (process.env.NODE_ENV !== "production") {
20
- r.useEffect(() => {
21
- t !== (e !== void 0) && console.error([`MUI: A component is changing the ${t ? "" : "un"}controlled ${s} state of ${n} to be ${t ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
22
- `));
23
- }, [s, n, e]);
24
- const {
25
- current: l
26
- } = r.useRef(o);
27
- r.useEffect(() => {
28
- !t && !Object.is(l, o) && console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
29
- `));
30
- }, [JSON.stringify(o)]);
31
- }
32
- const u = r.useCallback((l) => {
33
- t || i(l);
34
- }, []);
35
- return [a, u];
36
- }
37
- function $(e) {
38
- var f;
39
- const {
40
- elementType: o,
41
- externalSlotProps: n,
42
- ownerState: s,
43
- skipResolvingSlotProps: t = !1,
44
- ...c
45
- } = e, i = t ? {} : C(n, s), {
46
- props: a,
47
- internalRef: u
48
- } = E({
49
- ...c,
50
- externalSlotProps: i
51
- }), l = g(u, i == null ? void 0 : i.ref, (f = e.additionalProps) == null ? void 0 : f.ref);
52
- return v(o, {
53
- ...a,
54
- ref: l
55
- }, s);
56
- }
57
- function T({
58
- props: e,
59
- name: o
60
- }) {
61
- return S({
62
- props: e,
63
- name: o,
64
- defaultTheme: b,
65
- themeId: w
66
- });
67
- }
68
- const h = /* @__PURE__ */ r.createContext(void 0);
69
- process.env.NODE_ENV !== "production" && (h.displayName = "FormControlContext");
70
- function x() {
71
- return r.useContext(h);
72
- }
73
- const P = p(/* @__PURE__ */ m("path", {
74
- d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"
75
- }), "Visibility"), I = p(/* @__PURE__ */ m("path", {
76
- d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"
77
- }), "VisibilityOff"), d = /* @__PURE__ */ new Set();
78
- function D(e, o = "warning") {
79
- if (process.env.NODE_ENV === "production")
80
- return;
81
- const n = Array.isArray(e) ? e.join(`
82
- `) : e;
83
- d.has(n) || (d.add(n), o === "error" ? console.error(n) : console.warn(n));
84
- }
85
- export {
86
- h as F,
87
- P as V,
88
- x as a,
89
- T as b,
90
- $ as c,
91
- y as d,
92
- I as e,
93
- M as u,
94
- D as w
95
- };