@variamosple/variamos-components 0.0.23 → 0.1.0

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/Components/AuthWrapper/index.js +18 -38
  2. package/dist/Components/ConfirmationModal/index.d.ts +1 -1
  3. package/dist/Components/ConfirmationModal/index.js +19 -280
  4. package/dist/Components/Footer/index.js +6 -6
  5. package/dist/Components/Header/BugFormModal.d.ts +14 -0
  6. package/dist/Components/Header/BugFormModal.js +100 -0
  7. package/dist/Components/Header/HeaderOptions.js +85 -31
  8. package/dist/Components/Header/MenuItem.js +19 -20
  9. package/dist/Components/Header/SubHeader.js +35 -9
  10. package/dist/Components/Header/index.js +24 -25
  11. package/dist/Components/NotAuthorized/index.js +10 -11
  12. package/dist/Components/Paginator/index.js +56 -128
  13. package/dist/Components/ProtectedRoute/index.js +10 -10
  14. package/dist/Context/AnalyticsContext.js +7 -7
  15. package/dist/Context/MenuContext.js +16 -16
  16. package/dist/Context/SessionContext.js +35 -35
  17. package/dist/HOC/WithPageVisit.d.ts +1 -1
  18. package/dist/HOC/WithPageVisit.js +6 -6
  19. package/dist/assets/index.css +1 -1
  20. package/package.json +10 -7
  21. package/dist/AbstractModalHeader-UzCRSxIO.js +0 -1690
  22. package/dist/Anchor-DJG5WYYF.js +0 -40
  23. package/dist/Button-DWo2Fl71.js +0 -78
  24. package/dist/Button-GQJKgb76.js +0 -33
  25. package/dist/Container-BLjzOisH.js +0 -22
  26. package/dist/Nav-CdxSljzW.js +0 -144
  27. package/dist/NavDropdown-AuV3RgfC.js +0 -1764
  28. package/dist/NavLink-ebvp1HCw.js +0 -173
  29. package/dist/SubHeader-gTVD9DIX.js +0 -481
  30. package/dist/ThemeProvider-Q3gZ4GF2.js +0 -72
  31. package/dist/jsx-runtime-Drh4NO5G.js +0 -633
  32. package/dist/useEventCallback-Bfo0-hwZ.js +0 -16
  33. package/dist/useMergedRefs-BpAaCckn.js +0 -16
  34. package/dist/useWindow-rGE2GXIv.js +0 -118
@@ -1,40 +0,0 @@
1
- import * as u from "react";
2
- import { u as c } from "./useEventCallback-Bfo0-hwZ.js";
3
- import { u as f } from "./Button-DWo2Fl71.js";
4
- import { j as a } from "./jsx-runtime-Drh4NO5G.js";
5
- const l = ["onKeyDown"];
6
- function p(o, e) {
7
- if (o == null) return {};
8
- var t = {};
9
- for (var n in o) if ({}.hasOwnProperty.call(o, n)) {
10
- if (e.indexOf(n) >= 0) continue;
11
- t[n] = o[n];
12
- }
13
- return t;
14
- }
15
- function m(o) {
16
- return !o || o.trim() === "#";
17
- }
18
- const j = /* @__PURE__ */ u.forwardRef((o, e) => {
19
- let {
20
- onKeyDown: t
21
- } = o, n = p(o, l);
22
- const [r] = f(Object.assign({
23
- tagName: "a"
24
- }, n)), i = c((s) => {
25
- r.onKeyDown(s), t == null || t(s);
26
- });
27
- return m(n.href) || n.role === "button" ? /* @__PURE__ */ a.jsx("a", Object.assign({
28
- ref: e
29
- }, n, r, {
30
- onKeyDown: i
31
- })) : /* @__PURE__ */ a.jsx("a", Object.assign({
32
- ref: e
33
- }, n, {
34
- onKeyDown: t
35
- }));
36
- });
37
- j.displayName = "Anchor";
38
- export {
39
- j as A
40
- };
@@ -1,78 +0,0 @@
1
- import * as d from "react";
2
- import { j as b } from "./jsx-runtime-Drh4NO5G.js";
3
- const x = ["as", "disabled"];
4
- function j(n, t) {
5
- if (n == null) return {};
6
- var o = {};
7
- for (var u in n) if ({}.hasOwnProperty.call(n, u)) {
8
- if (t.indexOf(u) >= 0) continue;
9
- o[u] = n[u];
10
- }
11
- return o;
12
- }
13
- function y(n) {
14
- return !n || n.trim() === "#";
15
- }
16
- function P({
17
- tagName: n,
18
- disabled: t,
19
- href: o,
20
- target: u,
21
- rel: e,
22
- role: r,
23
- onClick: s,
24
- tabIndex: a = 0,
25
- type: p
26
- }) {
27
- n || (o != null || u != null || e != null ? n = "a" : n = "button");
28
- const f = {
29
- tagName: n
30
- };
31
- if (n === "button")
32
- return [{
33
- type: p || "button",
34
- disabled: t
35
- }, f];
36
- const l = (i) => {
37
- if ((t || n === "a" && y(o)) && i.preventDefault(), t) {
38
- i.stopPropagation();
39
- return;
40
- }
41
- s == null || s(i);
42
- }, c = (i) => {
43
- i.key === " " && (i.preventDefault(), l(i));
44
- };
45
- return n === "a" && (o || (o = "#"), t && (o = void 0)), [{
46
- role: r ?? "button",
47
- // explicitly undefined so that it overrides the props disabled in a spread
48
- // e.g. <Tag {...props} {...hookProps} />
49
- disabled: void 0,
50
- tabIndex: t ? void 0 : a,
51
- href: o,
52
- target: n === "a" ? u : void 0,
53
- "aria-disabled": t || void 0,
54
- rel: n === "a" ? e : void 0,
55
- onClick: l,
56
- onKeyDown: c
57
- }, f];
58
- }
59
- const w = /* @__PURE__ */ d.forwardRef((n, t) => {
60
- let {
61
- as: o,
62
- disabled: u
63
- } = n, e = j(n, x);
64
- const [r, {
65
- tagName: s
66
- }] = P(Object.assign({
67
- tagName: o,
68
- disabled: u
69
- }, e));
70
- return /* @__PURE__ */ b.jsx(s, Object.assign({}, e, r, {
71
- ref: t
72
- }));
73
- });
74
- w.displayName = "Button";
75
- export {
76
- w as B,
77
- P as u
78
- };
@@ -1,33 +0,0 @@
1
- import { u as x, c as l } from "./ThemeProvider-Q3gZ4GF2.js";
2
- import * as B from "react";
3
- import { u as N } from "./Button-DWo2Fl71.js";
4
- import { j as $ } from "./jsx-runtime-Drh4NO5G.js";
5
- const j = /* @__PURE__ */ B.forwardRef(({
6
- as: e,
7
- bsPrefix: m,
8
- variant: a = "primary",
9
- size: r,
10
- active: f = !1,
11
- disabled: t = !1,
12
- className: n,
13
- ...o
14
- }, u) => {
15
- const s = x(m, "btn"), [c, {
16
- tagName: p
17
- }] = N({
18
- tagName: e,
19
- disabled: t,
20
- ...o
21
- }), i = p;
22
- return /* @__PURE__ */ $.jsx(i, {
23
- ...c,
24
- ...o,
25
- ref: u,
26
- disabled: t,
27
- className: l(n, s, f && "active", a && `${s}-${a}`, r && `${s}-${r}`, o.href && t && "disabled")
28
- });
29
- });
30
- j.displayName = "Button";
31
- export {
32
- j as B
33
- };
@@ -1,22 +0,0 @@
1
- import { u as f, c as m } from "./ThemeProvider-Q3gZ4GF2.js";
2
- import * as p from "react";
3
- import { j as c } from "./jsx-runtime-Drh4NO5G.js";
4
- const x = /* @__PURE__ */ p.forwardRef(({
5
- bsPrefix: a,
6
- fluid: s = !1,
7
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
8
- as: o = "div",
9
- className: t,
10
- ...e
11
- }, i) => {
12
- const r = f(a, "container"), n = typeof s == "string" ? `-${s}` : "-fluid";
13
- return /* @__PURE__ */ c.jsx(o, {
14
- ref: i,
15
- ...e,
16
- className: m(t, s ? `${r}${n}` : r)
17
- });
18
- });
19
- x.displayName = "Container";
20
- export {
21
- x as C
22
- };
@@ -1,144 +0,0 @@
1
- import { u as A, c as E } from "./ThemeProvider-Q3gZ4GF2.js";
2
- import * as K from "react";
3
- import { useRef as I, useContext as w, useEffect as L } from "react";
4
- import { N as q, u as U, S as R, T as H, a as _, m as F, b as M, c as V, d as W } from "./NavLink-ebvp1HCw.js";
5
- import { d as Y, a as z, q as G } from "./useWindow-rGE2GXIv.js";
6
- import { u as J } from "./useMergedRefs-BpAaCckn.js";
7
- import { j as p } from "./jsx-runtime-Drh4NO5G.js";
8
- const O = /* @__PURE__ */ K.createContext(null);
9
- O.displayName = "CardHeaderContext";
10
- const Q = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
11
- function X(t, n) {
12
- if (t == null) return {};
13
- var o = {};
14
- for (var r in t) if ({}.hasOwnProperty.call(t, r)) {
15
- if (n.indexOf(r) >= 0) continue;
16
- o[r] = t[r];
17
- }
18
- return o;
19
- }
20
- const P = () => {
21
- }, S = Y("event-key"), D = /* @__PURE__ */ K.forwardRef((t, n) => {
22
- let {
23
- // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
24
- as: o = "div",
25
- onSelect: r,
26
- activeKey: s,
27
- role: u,
28
- onKeyDown: N
29
- } = t, y = X(t, Q);
30
- const $ = U(), v = I(!1), C = w(R), c = w(H);
31
- let i, f;
32
- c && (u = u || "tablist", s = c.activeKey, i = c.getControlledId, f = c.getControllerId);
33
- const l = I(null), d = (e) => {
34
- const a = l.current;
35
- if (!a) return null;
36
- const g = G(a, `[${S}]:not([aria-disabled=true])`), h = a.querySelector("[aria-selected=true]");
37
- if (!h || h !== document.activeElement) return null;
38
- const j = g.indexOf(h);
39
- if (j === -1) return null;
40
- let x = j + e;
41
- return x >= g.length && (x = 0), x < 0 && (x = g.length - 1), g[x];
42
- }, m = (e, a) => {
43
- e != null && (r == null || r(e, a), C == null || C(e, a));
44
- }, b = (e) => {
45
- if (N == null || N(e), !c)
46
- return;
47
- let a;
48
- switch (e.key) {
49
- case "ArrowLeft":
50
- case "ArrowUp":
51
- a = d(-1);
52
- break;
53
- case "ArrowRight":
54
- case "ArrowDown":
55
- a = d(1);
56
- break;
57
- default:
58
- return;
59
- }
60
- a && (e.preventDefault(), m(a.dataset[z("EventKey")] || null, e), v.current = !0, $());
61
- };
62
- L(() => {
63
- if (l.current && v.current) {
64
- const e = l.current.querySelector(`[${S}][aria-selected=true]`);
65
- e == null || e.focus();
66
- }
67
- v.current = !1;
68
- });
69
- const B = J(n, l);
70
- return /* @__PURE__ */ p.jsx(R.Provider, {
71
- value: m,
72
- children: /* @__PURE__ */ p.jsx(_.Provider, {
73
- value: {
74
- role: u,
75
- // used by NavLink to determine it's role
76
- activeKey: F(s),
77
- getControlledId: i || P,
78
- getControllerId: f || P
79
- },
80
- children: /* @__PURE__ */ p.jsx(o, Object.assign({}, y, {
81
- onKeyDown: b,
82
- ref: B,
83
- role: u
84
- }))
85
- })
86
- });
87
- });
88
- D.displayName = "Nav";
89
- const Z = Object.assign(D, {
90
- Item: q
91
- }), T = /* @__PURE__ */ K.forwardRef(({
92
- className: t,
93
- bsPrefix: n,
94
- as: o = "div",
95
- ...r
96
- }, s) => (n = A(n, "nav-item"), /* @__PURE__ */ p.jsx(o, {
97
- ref: s,
98
- className: E(t, n),
99
- ...r
100
- })));
101
- T.displayName = "NavItem";
102
- const k = /* @__PURE__ */ K.forwardRef((t, n) => {
103
- const {
104
- as: o = "div",
105
- bsPrefix: r,
106
- variant: s,
107
- fill: u = !1,
108
- justify: N = !1,
109
- navbar: y,
110
- navbarScroll: $,
111
- className: v,
112
- activeKey: C,
113
- ...c
114
- } = V(t, {
115
- activeKey: "onSelect"
116
- }), i = A(r, "nav");
117
- let f, l, d = !1;
118
- const m = w(W), b = w(O);
119
- return m ? (f = m.bsPrefix, d = y ?? !0) : b && ({
120
- cardHeaderBsPrefix: l
121
- } = b), /* @__PURE__ */ p.jsx(Z, {
122
- as: o,
123
- ref: n,
124
- activeKey: C,
125
- className: E(v, {
126
- [i]: !d,
127
- [`${f}-nav`]: d,
128
- [`${f}-nav-scroll`]: d && $,
129
- [`${l}-${s}`]: !!l,
130
- [`${i}-${s}`]: !!s,
131
- [`${i}-fill`]: u,
132
- [`${i}-justified`]: N
133
- }),
134
- ...c
135
- });
136
- });
137
- k.displayName = "Nav";
138
- const se = Object.assign(k, {
139
- Item: T,
140
- Link: M
141
- });
142
- export {
143
- se as N
144
- };