@net-advantage/nabs-ui-layout 0.30.0 → 0.33.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.
- package/dist/nabs-ui-layout.cjs +1 -6
- package/dist/nabs-ui-layout.js +35 -213
- package/package.json +1 -1
package/dist/nabs-ui-layout.cjs
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
2
|
-
let props = %s;
|
|
3
|
-
<%s {...props} />
|
|
4
|
-
React keys must be passed directly to JSX without using spread:
|
|
5
|
-
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require("react"),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),r=e(((e,r)=>{process.env.NODE_ENV===`production`?r.exports=t():r.exports=n()}))();function i({as:e=`div`,className:t=``,children:n,...i}){return(0,r.jsx)(e,{className:t,...i,children:n})}function a({header:e,footer:t,leftSidePanel:n,rightSidePanel:a,children:o,className:s=``,headerClassName:c=``,footerClassName:l=``,leftSidePanelClassName:u=``,rightSidePanelClassName:d=``,contentClassName:f=``,...p}){let m=e!=null&&e!==!1,h=t!=null&&t!==!1,g=n!=null&&n!==!1,_=a!=null&&a!==!1,v=[`nabs-ui-layout__body`,g&&_?`nabs-ui-layout__body--with-both-panels`:``,g&&!_?`nabs-ui-layout__body--with-left-panel`:``,!g&&_?`nabs-ui-layout__body--with-right-panel`:``].filter(Boolean).join(` `);return(0,r.jsxs)(`div`,{className:[`nabs-ui-layout`,s].filter(Boolean).join(` `),...p,children:[m?(0,r.jsx)(i,{as:`header`,className:`nabs-ui-layout__headerWrapper`,children:(0,r.jsx)(`div`,{className:[`nabs-ui-layout__header`,c].filter(Boolean).join(` `),children:e})}):null,(0,r.jsxs)(`div`,{className:v,children:[g?(0,r.jsx)(i,{as:`aside`,className:[`nabs-ui-layout__panel`,`nabs-ui-layout__panel--left`,u].filter(Boolean).join(` `),children:n}):null,(0,r.jsx)(i,{as:`section`,className:[`nabs-ui-layout__content`,f].filter(Boolean).join(` `),children:o}),_?(0,r.jsx)(i,{as:`aside`,className:[`nabs-ui-layout__panel`,`nabs-ui-layout__panel--right`,d].filter(Boolean).join(` `),children:a}):null]}),h?(0,r.jsx)(i,{as:`footer`,className:`nabs-ui-layout__footerWrapper`,children:(0,r.jsx)(`div`,{className:[`nabs-ui-layout__footer`,l].filter(Boolean).join(` `),children:t})}):null]})}exports.Layout=a;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react/jsx-runtime");function t({as:t=`div`,className:n=``,children:r,...i}){return(0,e.jsx)(t,{className:n,...i,children:r})}function n({header:n,footer:r,leftSidePanel:i,rightSidePanel:a,children:o,className:s=``,headerClassName:c=``,footerClassName:l=``,leftSidePanelClassName:u=``,rightSidePanelClassName:d=``,contentClassName:f=``,...p}){let m=n!=null&&n!==!1,h=r!=null&&r!==!1,g=i!=null&&i!==!1,_=a!=null&&a!==!1,v=[`nabs-ui-layout__body`,g&&_?`nabs-ui-layout__body--with-both-panels`:``,g&&!_?`nabs-ui-layout__body--with-left-panel`:``,!g&&_?`nabs-ui-layout__body--with-right-panel`:``].filter(Boolean).join(` `);return(0,e.jsxs)(`div`,{className:[`nabs-ui-layout`,s].filter(Boolean).join(` `),...p,children:[m?(0,e.jsx)(t,{as:`header`,className:`nabs-ui-layout__headerWrapper`,children:(0,e.jsx)(`div`,{className:[`nabs-ui-layout__header`,c].filter(Boolean).join(` `),children:n})}):null,(0,e.jsxs)(`div`,{className:v,children:[g?(0,e.jsx)(t,{as:`aside`,className:[`nabs-ui-layout__panel`,`nabs-ui-layout__panel--left`,u].filter(Boolean).join(` `),children:i}):null,(0,e.jsx)(t,{as:`section`,className:[`nabs-ui-layout__content`,f].filter(Boolean).join(` `),children:o}),_?(0,e.jsx)(t,{as:`aside`,className:[`nabs-ui-layout__panel`,`nabs-ui-layout__panel--right`,d].filter(Boolean).join(` `),children:a}):null]}),h?(0,e.jsx)(t,{as:`footer`,className:`nabs-ui-layout__footerWrapper`,children:(0,e.jsx)(`div`,{className:[`nabs-ui-layout__footer`,l].filter(Boolean).join(` `),children:r})}):null]})}exports.Layout=n;
|
package/dist/nabs-ui-layout.js
CHANGED
|
@@ -1,247 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var i = null;
|
|
9
|
-
if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
|
|
10
|
-
else r = n;
|
|
11
|
-
return n = r.ref, {
|
|
12
|
-
$$typeof: t,
|
|
13
|
-
type: e,
|
|
14
|
-
key: i,
|
|
15
|
-
ref: n === void 0 ? null : n,
|
|
16
|
-
props: r
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
20
|
-
})), r = /* @__PURE__ */ e(((e) => {
|
|
21
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
22
|
-
function n(e) {
|
|
23
|
-
if (e == null) return null;
|
|
24
|
-
if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
|
|
25
|
-
if (typeof e == "string") return e;
|
|
26
|
-
switch (e) {
|
|
27
|
-
case v: return "Fragment";
|
|
28
|
-
case b: return "Profiler";
|
|
29
|
-
case y: return "StrictMode";
|
|
30
|
-
case w: return "Suspense";
|
|
31
|
-
case T: return "SuspenseList";
|
|
32
|
-
case O: return "Activity";
|
|
33
|
-
}
|
|
34
|
-
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
35
|
-
case _: return "Portal";
|
|
36
|
-
case S: return e.displayName || "Context";
|
|
37
|
-
case x: return (e._context.displayName || "Context") + ".Consumer";
|
|
38
|
-
case C:
|
|
39
|
-
var t = e.render;
|
|
40
|
-
return e = e.displayName, e ||= (e = t.displayName || t.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
41
|
-
case E: return t = e.displayName || null, t === null ? n(e.type) || "Memo" : t;
|
|
42
|
-
case D:
|
|
43
|
-
t = e._payload, e = e._init;
|
|
44
|
-
try {
|
|
45
|
-
return n(e(t));
|
|
46
|
-
} catch {}
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
function r(e) {
|
|
51
|
-
return "" + e;
|
|
52
|
-
}
|
|
53
|
-
function i(e) {
|
|
54
|
-
try {
|
|
55
|
-
r(e);
|
|
56
|
-
var t = !1;
|
|
57
|
-
} catch {
|
|
58
|
-
t = !0;
|
|
59
|
-
}
|
|
60
|
-
if (t) {
|
|
61
|
-
t = console;
|
|
62
|
-
var n = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
63
|
-
return n.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), r(e);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function a(e) {
|
|
67
|
-
if (e === v) return "<>";
|
|
68
|
-
if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
|
|
69
|
-
try {
|
|
70
|
-
var t = n(e);
|
|
71
|
-
return t ? "<" + t + ">" : "<...>";
|
|
72
|
-
} catch {
|
|
73
|
-
return "<...>";
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function o() {
|
|
77
|
-
var e = A.A;
|
|
78
|
-
return e === null ? null : e.getOwner();
|
|
79
|
-
}
|
|
80
|
-
function s() {
|
|
81
|
-
return Error("react-stack-top-frame");
|
|
82
|
-
}
|
|
83
|
-
function c(e) {
|
|
84
|
-
if (j.call(e, "key")) {
|
|
85
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
86
|
-
if (t && t.isReactWarning) return !1;
|
|
87
|
-
}
|
|
88
|
-
return e.key !== void 0;
|
|
89
|
-
}
|
|
90
|
-
function l(e, t) {
|
|
91
|
-
function n() {
|
|
92
|
-
P || (P = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
93
|
-
}
|
|
94
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
95
|
-
get: n,
|
|
96
|
-
configurable: !0
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function u() {
|
|
100
|
-
var e = n(this.type);
|
|
101
|
-
return F[e] || (F[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
102
|
-
}
|
|
103
|
-
function d(e, t, n, r, i, a) {
|
|
104
|
-
var o = n.ref;
|
|
105
|
-
return e = {
|
|
106
|
-
$$typeof: g,
|
|
107
|
-
type: e,
|
|
108
|
-
key: t,
|
|
109
|
-
props: n,
|
|
110
|
-
_owner: r
|
|
111
|
-
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
112
|
-
enumerable: !1,
|
|
113
|
-
value: null
|
|
114
|
-
}) : Object.defineProperty(e, "ref", {
|
|
115
|
-
enumerable: !1,
|
|
116
|
-
get: u
|
|
117
|
-
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
118
|
-
configurable: !1,
|
|
119
|
-
enumerable: !1,
|
|
120
|
-
writable: !0,
|
|
121
|
-
value: 0
|
|
122
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
123
|
-
configurable: !1,
|
|
124
|
-
enumerable: !1,
|
|
125
|
-
writable: !0,
|
|
126
|
-
value: null
|
|
127
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
128
|
-
configurable: !1,
|
|
129
|
-
enumerable: !1,
|
|
130
|
-
writable: !0,
|
|
131
|
-
value: i
|
|
132
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
133
|
-
configurable: !1,
|
|
134
|
-
enumerable: !1,
|
|
135
|
-
writable: !0,
|
|
136
|
-
value: a
|
|
137
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
138
|
-
}
|
|
139
|
-
function f(e, t, r, a, s, u) {
|
|
140
|
-
var f = t.children;
|
|
141
|
-
if (f !== void 0) if (a) if (M(f)) {
|
|
142
|
-
for (a = 0; a < f.length; a++) p(f[a]);
|
|
143
|
-
Object.freeze && Object.freeze(f);
|
|
144
|
-
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
145
|
-
else p(f);
|
|
146
|
-
if (j.call(t, "key")) {
|
|
147
|
-
f = n(e);
|
|
148
|
-
var m = Object.keys(t).filter(function(e) {
|
|
149
|
-
return e !== "key";
|
|
150
|
-
});
|
|
151
|
-
a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[f + a] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", a, f, m, f), R[f + a] = !0);
|
|
152
|
-
}
|
|
153
|
-
if (f = null, r !== void 0 && (i(r), f = "" + r), c(t) && (i(t.key), f = "" + t.key), "key" in t) for (var h in r = {}, t) h !== "key" && (r[h] = t[h]);
|
|
154
|
-
else r = t;
|
|
155
|
-
return f && l(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, r, o(), s, u);
|
|
156
|
-
}
|
|
157
|
-
function p(e) {
|
|
158
|
-
m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
159
|
-
}
|
|
160
|
-
function m(e) {
|
|
161
|
-
return typeof e == "object" && !!e && e.$$typeof === g;
|
|
162
|
-
}
|
|
163
|
-
var h = t("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), A = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
164
|
-
return null;
|
|
165
|
-
};
|
|
166
|
-
h = { react_stack_bottom_frame: function(e) {
|
|
167
|
-
return e();
|
|
168
|
-
} };
|
|
169
|
-
var P, F = {}, I = h.react_stack_bottom_frame.bind(h, s)(), L = N(a(s)), R = {};
|
|
170
|
-
e.Fragment = v, e.jsx = function(e, t, n) {
|
|
171
|
-
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
172
|
-
return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(a(e)) : L);
|
|
173
|
-
}, e.jsxs = function(e, t, n) {
|
|
174
|
-
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
175
|
-
return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(a(e)) : L);
|
|
176
|
-
};
|
|
177
|
-
})();
|
|
178
|
-
})), i = (/* @__PURE__ */ e(((e, t) => {
|
|
179
|
-
process.env.NODE_ENV === "production" ? t.exports = n() : t.exports = r();
|
|
180
|
-
})))();
|
|
181
|
-
function a({ as: e = "div", className: t = "", children: n, ...r }) {
|
|
182
|
-
return /* @__PURE__ */ (0, i.jsx)(e, {
|
|
183
|
-
className: t,
|
|
184
|
-
...r,
|
|
185
|
-
children: n
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
//#region src/Layout.tsx
|
|
3
|
+
function n({ as: t = "div", className: n = "", children: r, ...i }) {
|
|
4
|
+
return /* @__PURE__ */ e(t, {
|
|
5
|
+
className: n,
|
|
6
|
+
...i,
|
|
7
|
+
children: r
|
|
186
8
|
});
|
|
187
9
|
}
|
|
188
|
-
function
|
|
189
|
-
let
|
|
10
|
+
function r({ header: r, footer: i, leftSidePanel: a, rightSidePanel: o, children: s, className: c = "", headerClassName: l = "", footerClassName: u = "", leftSidePanelClassName: d = "", rightSidePanelClassName: f = "", contentClassName: p = "", ...m }) {
|
|
11
|
+
let h = r != null && r !== !1, g = i != null && i !== !1, _ = a != null && a !== !1, v = o != null && o !== !1, y = [
|
|
190
12
|
"nabs-ui-layout__body",
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
!
|
|
13
|
+
_ && v ? "nabs-ui-layout__body--with-both-panels" : "",
|
|
14
|
+
_ && !v ? "nabs-ui-layout__body--with-left-panel" : "",
|
|
15
|
+
!_ && v ? "nabs-ui-layout__body--with-right-panel" : ""
|
|
194
16
|
].filter(Boolean).join(" ");
|
|
195
|
-
return /* @__PURE__ */ (
|
|
196
|
-
className: ["nabs-ui-layout",
|
|
197
|
-
...
|
|
17
|
+
return /* @__PURE__ */ t("div", {
|
|
18
|
+
className: ["nabs-ui-layout", c].filter(Boolean).join(" "),
|
|
19
|
+
...m,
|
|
198
20
|
children: [
|
|
199
|
-
|
|
21
|
+
h ? /* @__PURE__ */ e(n, {
|
|
200
22
|
as: "header",
|
|
201
23
|
className: "nabs-ui-layout__headerWrapper",
|
|
202
|
-
children: /* @__PURE__ */ (
|
|
203
|
-
className: ["nabs-ui-layout__header",
|
|
204
|
-
children:
|
|
24
|
+
children: /* @__PURE__ */ e("div", {
|
|
25
|
+
className: ["nabs-ui-layout__header", l].filter(Boolean).join(" "),
|
|
26
|
+
children: r
|
|
205
27
|
})
|
|
206
28
|
}) : null,
|
|
207
|
-
/* @__PURE__ */ (
|
|
208
|
-
className:
|
|
29
|
+
/* @__PURE__ */ t("div", {
|
|
30
|
+
className: y,
|
|
209
31
|
children: [
|
|
210
|
-
|
|
32
|
+
_ ? /* @__PURE__ */ e(n, {
|
|
211
33
|
as: "aside",
|
|
212
34
|
className: [
|
|
213
35
|
"nabs-ui-layout__panel",
|
|
214
36
|
"nabs-ui-layout__panel--left",
|
|
215
|
-
|
|
37
|
+
d
|
|
216
38
|
].filter(Boolean).join(" "),
|
|
217
|
-
children:
|
|
39
|
+
children: a
|
|
218
40
|
}) : null,
|
|
219
|
-
/* @__PURE__ */ (
|
|
41
|
+
/* @__PURE__ */ e(n, {
|
|
220
42
|
as: "section",
|
|
221
|
-
className: ["nabs-ui-layout__content",
|
|
222
|
-
children:
|
|
43
|
+
className: ["nabs-ui-layout__content", p].filter(Boolean).join(" "),
|
|
44
|
+
children: s
|
|
223
45
|
}),
|
|
224
|
-
|
|
46
|
+
v ? /* @__PURE__ */ e(n, {
|
|
225
47
|
as: "aside",
|
|
226
48
|
className: [
|
|
227
49
|
"nabs-ui-layout__panel",
|
|
228
50
|
"nabs-ui-layout__panel--right",
|
|
229
|
-
|
|
51
|
+
f
|
|
230
52
|
].filter(Boolean).join(" "),
|
|
231
|
-
children:
|
|
53
|
+
children: o
|
|
232
54
|
}) : null
|
|
233
55
|
]
|
|
234
56
|
}),
|
|
235
|
-
|
|
57
|
+
g ? /* @__PURE__ */ e(n, {
|
|
236
58
|
as: "footer",
|
|
237
59
|
className: "nabs-ui-layout__footerWrapper",
|
|
238
|
-
children: /* @__PURE__ */ (
|
|
239
|
-
className: ["nabs-ui-layout__footer",
|
|
240
|
-
children:
|
|
60
|
+
children: /* @__PURE__ */ e("div", {
|
|
61
|
+
className: ["nabs-ui-layout__footer", u].filter(Boolean).join(" "),
|
|
62
|
+
children: i
|
|
241
63
|
})
|
|
242
64
|
}) : null
|
|
243
65
|
]
|
|
244
66
|
});
|
|
245
67
|
}
|
|
246
68
|
//#endregion
|
|
247
|
-
export {
|
|
69
|
+
export { r as Layout };
|