@net-advantage/nabs-ui-shell 0.1.0 → 0.19.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-shell.cjs +1 -6
- package/dist/nabs-ui-shell.css +3 -77
- package/dist/nabs-ui-shell.js +11 -255
- package/package.json +7 -7
package/dist/nabs-ui-shell.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)}})()})),i=e(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=n():t.exports=r()}))();function a({as:e=`div`,className:t=``,children:n,...r}){return(0,i.jsx)(e,{className:t,...r,children:n})}function o({header:e,footer:t,leftSidePanel:n,rightSidePanel:r,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,_=r!=null&&r!==!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,i.jsxs)(`div`,{className:[`nabs-ui-layout`,s].filter(Boolean).join(` `),...p,children:[m?(0,i.jsx)(a,{as:`header`,className:`nabs-ui-layout__headerWrapper`,children:(0,i.jsx)(`div`,{className:[`nabs-ui-layout__header`,c].filter(Boolean).join(` `),children:e})}):null,(0,i.jsxs)(`div`,{className:v,children:[g?(0,i.jsx)(a,{as:`aside`,className:[`nabs-ui-layout__panel`,`nabs-ui-layout__panel--left`,u].filter(Boolean).join(` `),children:n}):null,(0,i.jsx)(a,{as:`section`,className:[`nabs-ui-layout__content`,f].filter(Boolean).join(` `),children:o}),_?(0,i.jsx)(a,{as:`aside`,className:[`nabs-ui-layout__panel`,`nabs-ui-layout__panel--right`,d].filter(Boolean).join(` `),children:r}):null]}),h?(0,i.jsx)(a,{as:`footer`,className:`nabs-ui-layout__footerWrapper`,children:(0,i.jsx)(`div`,{className:[`nabs-ui-layout__footer`,l].filter(Boolean).join(` `),children:t})}):null]})}var s=(0,t.forwardRef)(({header:e,navigation:t,footer:n,children:r,className:a=``,headerClassName:s=``,navigationClassName:c=``,contentClassName:l=``,footerClassName:u=``,...d},f)=>{let p=[`nabs-ui-shell`,a].filter(Boolean).join(` `),m=[`flex flex-wrap items-center justify-between gap-4 px-5 py-4`,s].filter(Boolean).join(` `),h=[`flex h-full min-h-0 flex-col gap-4 overflow-y-auto p-4`,c].filter(Boolean).join(` `),g=[`min-w-0`,l].filter(Boolean).join(` `),_=[`flex flex-wrap items-center justify-between gap-4 px-5 py-4`,u].filter(Boolean).join(` `);return(0,i.jsx)(`div`,{ref:f,className:p,...d,children:(0,i.jsx)(o,{className:`nabs-ui-shell__layout`,header:e,footer:n,leftSidePanel:t,headerClassName:m,footerClassName:_,leftSidePanelClassName:h,contentClassName:g,children:r})})});s.displayName=`Shell`,exports.Shell=s;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("@net-advantage/nabs-ui-layout/Layout"),n=require("react/jsx-runtime");var r=(0,e.forwardRef)(({header:e,navigation:r,footer:i,children:a,className:o=``,headerClassName:s=``,navigationClassName:c=``,contentClassName:l=``,footerClassName:u=``,...d},f)=>{let p=[`nabs-ui-shell`,o].filter(Boolean).join(` `),m=[`flex flex-wrap items-center justify-between gap-4 px-5 py-4`,s].filter(Boolean).join(` `),h=[`flex h-full min-h-0 flex-col gap-4 overflow-y-auto p-4`,c].filter(Boolean).join(` `),g=[`min-w-0`,l].filter(Boolean).join(` `),_=[`flex flex-wrap items-center justify-between gap-4 px-5 py-4`,u].filter(Boolean).join(` `);return(0,n.jsx)(`div`,{ref:f,className:p,...d,children:(0,n.jsx)(t.Layout,{className:`nabs-ui-shell__layout`,header:e,footer:i,leftSidePanel:r,headerClassName:m,footerClassName:_,leftSidePanelClassName:h,contentClassName:g,children:a})})});r.displayName=`Shell`,exports.Shell=r;
|
package/dist/nabs-ui-shell.css
CHANGED
|
@@ -1,78 +1,4 @@
|
|
|
1
|
-
.
|
|
2
|
-
--nabs-ui-layout-gap: 1rem;
|
|
3
|
-
--nabs-ui-layout-border: #cbd5e1;
|
|
4
|
-
--nabs-ui-layout-surface: #ffffff;
|
|
5
|
-
--nabs-ui-layout-panel-surface: #f8fafc;
|
|
6
|
-
--nabs-ui-layout-content-surface: #ffffff;
|
|
7
|
-
--nabs-ui-layout-radius: 1rem;
|
|
8
|
-
display: grid;
|
|
9
|
-
gap: var(--nabs-ui-layout-gap);
|
|
10
|
-
min-width: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.nabs-ui-layout__headerWrapper,
|
|
14
|
-
.nabs-ui-layout__footerWrapper {
|
|
15
|
-
min-width: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.nabs-ui-layout__header,
|
|
19
|
-
.nabs-ui-layout__footer,
|
|
20
|
-
.nabs-ui-layout__panel,
|
|
21
|
-
.nabs-ui-layout__content {
|
|
22
|
-
border: 1px solid var(--nabs-ui-layout-border);
|
|
23
|
-
border-radius: var(--nabs-ui-layout-radius);
|
|
24
|
-
min-width: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.nabs-ui-layout__header,
|
|
28
|
-
.nabs-ui-layout__footer,
|
|
29
|
-
.nabs-ui-layout__panel,
|
|
30
|
-
.nabs-ui-layout__content {
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
padding: 1rem;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.nabs-ui-layout__header,
|
|
36
|
-
.nabs-ui-layout__footer {
|
|
37
|
-
background: var(--nabs-ui-layout-surface);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.nabs-ui-layout__body {
|
|
41
|
-
display: grid;
|
|
42
|
-
gap: var(--nabs-ui-layout-gap);
|
|
43
|
-
min-width: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.nabs-ui-layout__body--with-both-panels {
|
|
47
|
-
grid-template-columns:
|
|
48
|
-
minmax(0, var(--nabs-ui-layout-left-panel-width, 18rem))
|
|
49
|
-
minmax(0, 1fr)
|
|
50
|
-
minmax(0, var(--nabs-ui-layout-right-panel-width, 18rem));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.nabs-ui-layout__body--with-left-panel {
|
|
54
|
-
grid-template-columns: minmax(0, var(--nabs-ui-layout-left-panel-width, 18rem)) minmax(0, 1fr);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.nabs-ui-layout__body--with-right-panel {
|
|
58
|
-
grid-template-columns: minmax(0, 1fr) minmax(0, var(--nabs-ui-layout-right-panel-width, 18rem));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.nabs-ui-layout__panel {
|
|
62
|
-
background: var(--nabs-ui-layout-panel-surface);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.nabs-ui-layout__content {
|
|
66
|
-
background: var(--nabs-ui-layout-content-surface);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.nabs-ui-layout__content > :first-child {
|
|
70
|
-
margin-top: 0;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.nabs-ui-layout__content > :last-child {
|
|
74
|
-
margin-bottom: 0;
|
|
75
|
-
}/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
1
|
+
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
76
2
|
@layer theme {
|
|
77
3
|
:root, :host {
|
|
78
4
|
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
@@ -348,11 +274,11 @@
|
|
|
348
274
|
}
|
|
349
275
|
|
|
350
276
|
.min-h-0 {
|
|
351
|
-
min-height: 0;
|
|
277
|
+
min-height: calc(var(--spacing) * 0);
|
|
352
278
|
}
|
|
353
279
|
|
|
354
280
|
.min-w-0 {
|
|
355
|
-
min-width: 0;
|
|
281
|
+
min-width: calc(var(--spacing) * 0);
|
|
356
282
|
}
|
|
357
283
|
|
|
358
284
|
.flex-col {
|
package/dist/nabs-ui-shell.js
CHANGED
|
@@ -1,270 +1,26 @@
|
|
|
1
1
|
import { forwardRef as e } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
5
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
6
|
-
}), r = /* @__PURE__ */ t(((e) => {
|
|
7
|
-
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
8
|
-
function r(e, n, r) {
|
|
9
|
-
var i = null;
|
|
10
|
-
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]);
|
|
11
|
-
else r = n;
|
|
12
|
-
return n = r.ref, {
|
|
13
|
-
$$typeof: t,
|
|
14
|
-
type: e,
|
|
15
|
-
key: i,
|
|
16
|
-
ref: n === void 0 ? null : n,
|
|
17
|
-
props: r
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
21
|
-
})), i = /* @__PURE__ */ t(((e) => {
|
|
22
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
23
|
-
function t(e) {
|
|
24
|
-
if (e == null) return null;
|
|
25
|
-
if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
|
|
26
|
-
if (typeof e == "string") return e;
|
|
27
|
-
switch (e) {
|
|
28
|
-
case v: return "Fragment";
|
|
29
|
-
case b: return "Profiler";
|
|
30
|
-
case y: return "StrictMode";
|
|
31
|
-
case w: return "Suspense";
|
|
32
|
-
case T: return "SuspenseList";
|
|
33
|
-
case O: return "Activity";
|
|
34
|
-
}
|
|
35
|
-
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) {
|
|
36
|
-
case _: return "Portal";
|
|
37
|
-
case S: return e.displayName || "Context";
|
|
38
|
-
case x: return (e._context.displayName || "Context") + ".Consumer";
|
|
39
|
-
case C:
|
|
40
|
-
var n = e.render;
|
|
41
|
-
return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
42
|
-
case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
|
|
43
|
-
case D:
|
|
44
|
-
n = e._payload, e = e._init;
|
|
45
|
-
try {
|
|
46
|
-
return t(e(n));
|
|
47
|
-
} catch {}
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
function r(e) {
|
|
52
|
-
return "" + e;
|
|
53
|
-
}
|
|
54
|
-
function i(e) {
|
|
55
|
-
try {
|
|
56
|
-
r(e);
|
|
57
|
-
var t = !1;
|
|
58
|
-
} catch {
|
|
59
|
-
t = !0;
|
|
60
|
-
}
|
|
61
|
-
if (t) {
|
|
62
|
-
t = console;
|
|
63
|
-
var n = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
64
|
-
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);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function a(e) {
|
|
68
|
-
if (e === v) return "<>";
|
|
69
|
-
if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
|
|
70
|
-
try {
|
|
71
|
-
var n = t(e);
|
|
72
|
-
return n ? "<" + n + ">" : "<...>";
|
|
73
|
-
} catch {
|
|
74
|
-
return "<...>";
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
function o() {
|
|
78
|
-
var e = A.A;
|
|
79
|
-
return e === null ? null : e.getOwner();
|
|
80
|
-
}
|
|
81
|
-
function s() {
|
|
82
|
-
return Error("react-stack-top-frame");
|
|
83
|
-
}
|
|
84
|
-
function c(e) {
|
|
85
|
-
if (j.call(e, "key")) {
|
|
86
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
87
|
-
if (t && t.isReactWarning) return !1;
|
|
88
|
-
}
|
|
89
|
-
return e.key !== void 0;
|
|
90
|
-
}
|
|
91
|
-
function l(e, t) {
|
|
92
|
-
function n() {
|
|
93
|
-
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));
|
|
94
|
-
}
|
|
95
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
96
|
-
get: n,
|
|
97
|
-
configurable: !0
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function u() {
|
|
101
|
-
var e = t(this.type);
|
|
102
|
-
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;
|
|
103
|
-
}
|
|
104
|
-
function d(e, t, n, r, i, a) {
|
|
105
|
-
var o = n.ref;
|
|
106
|
-
return e = {
|
|
107
|
-
$$typeof: g,
|
|
108
|
-
type: e,
|
|
109
|
-
key: t,
|
|
110
|
-
props: n,
|
|
111
|
-
_owner: r
|
|
112
|
-
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
113
|
-
enumerable: !1,
|
|
114
|
-
value: null
|
|
115
|
-
}) : Object.defineProperty(e, "ref", {
|
|
116
|
-
enumerable: !1,
|
|
117
|
-
get: u
|
|
118
|
-
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
119
|
-
configurable: !1,
|
|
120
|
-
enumerable: !1,
|
|
121
|
-
writable: !0,
|
|
122
|
-
value: 0
|
|
123
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
124
|
-
configurable: !1,
|
|
125
|
-
enumerable: !1,
|
|
126
|
-
writable: !0,
|
|
127
|
-
value: null
|
|
128
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
129
|
-
configurable: !1,
|
|
130
|
-
enumerable: !1,
|
|
131
|
-
writable: !0,
|
|
132
|
-
value: i
|
|
133
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
134
|
-
configurable: !1,
|
|
135
|
-
enumerable: !1,
|
|
136
|
-
writable: !0,
|
|
137
|
-
value: a
|
|
138
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
139
|
-
}
|
|
140
|
-
function f(e, n, r, a, s, u) {
|
|
141
|
-
var f = n.children;
|
|
142
|
-
if (f !== void 0) if (a) if (M(f)) {
|
|
143
|
-
for (a = 0; a < f.length; a++) p(f[a]);
|
|
144
|
-
Object.freeze && Object.freeze(f);
|
|
145
|
-
} 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.");
|
|
146
|
-
else p(f);
|
|
147
|
-
if (j.call(n, "key")) {
|
|
148
|
-
f = t(e);
|
|
149
|
-
var m = Object.keys(n).filter(function(e) {
|
|
150
|
-
return e !== "key";
|
|
151
|
-
});
|
|
152
|
-
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);
|
|
153
|
-
}
|
|
154
|
-
if (f = null, r !== void 0 && (i(r), f = "" + r), c(n) && (i(n.key), f = "" + n.key), "key" in n) for (var h in r = {}, n) h !== "key" && (r[h] = n[h]);
|
|
155
|
-
else r = n;
|
|
156
|
-
return f && l(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, r, o(), s, u);
|
|
157
|
-
}
|
|
158
|
-
function p(e) {
|
|
159
|
-
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));
|
|
160
|
-
}
|
|
161
|
-
function m(e) {
|
|
162
|
-
return typeof e == "object" && !!e && e.$$typeof === g;
|
|
163
|
-
}
|
|
164
|
-
var h = n("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() {
|
|
165
|
-
return null;
|
|
166
|
-
};
|
|
167
|
-
h = { react_stack_bottom_frame: function(e) {
|
|
168
|
-
return e();
|
|
169
|
-
} };
|
|
170
|
-
var P, F = {}, I = h.react_stack_bottom_frame.bind(h, s)(), L = N(a(s)), R = {};
|
|
171
|
-
e.Fragment = v, e.jsx = function(e, t, n) {
|
|
172
|
-
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
173
|
-
return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(a(e)) : L);
|
|
174
|
-
}, e.jsxs = function(e, t, n) {
|
|
175
|
-
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
176
|
-
return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(a(e)) : L);
|
|
177
|
-
};
|
|
178
|
-
})();
|
|
179
|
-
})), a = (/* @__PURE__ */ t(((e, t) => {
|
|
180
|
-
process.env.NODE_ENV === "production" ? t.exports = r() : t.exports = i();
|
|
181
|
-
})))();
|
|
182
|
-
function o({ as: e = "div", className: t = "", children: n, ...r }) {
|
|
183
|
-
return /* @__PURE__ */ (0, a.jsx)(e, {
|
|
184
|
-
className: t,
|
|
185
|
-
...r,
|
|
186
|
-
children: n
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
function s({ header: e, footer: t, leftSidePanel: n, rightSidePanel: r, children: i, className: s = "", headerClassName: c = "", footerClassName: l = "", leftSidePanelClassName: u = "", rightSidePanelClassName: d = "", contentClassName: f = "", ...p }) {
|
|
190
|
-
let m = e != null && e !== !1, h = t != null && t !== !1, g = n != null && n !== !1, _ = r != null && r !== !1, v = [
|
|
191
|
-
"nabs-ui-layout__body",
|
|
192
|
-
g && _ ? "nabs-ui-layout__body--with-both-panels" : "",
|
|
193
|
-
g && !_ ? "nabs-ui-layout__body--with-left-panel" : "",
|
|
194
|
-
!g && _ ? "nabs-ui-layout__body--with-right-panel" : ""
|
|
195
|
-
].filter(Boolean).join(" ");
|
|
196
|
-
return /* @__PURE__ */ (0, a.jsxs)("div", {
|
|
197
|
-
className: ["nabs-ui-layout", s].filter(Boolean).join(" "),
|
|
198
|
-
...p,
|
|
199
|
-
children: [
|
|
200
|
-
m ? /* @__PURE__ */ (0, a.jsx)(o, {
|
|
201
|
-
as: "header",
|
|
202
|
-
className: "nabs-ui-layout__headerWrapper",
|
|
203
|
-
children: /* @__PURE__ */ (0, a.jsx)("div", {
|
|
204
|
-
className: ["nabs-ui-layout__header", c].filter(Boolean).join(" "),
|
|
205
|
-
children: e
|
|
206
|
-
})
|
|
207
|
-
}) : null,
|
|
208
|
-
/* @__PURE__ */ (0, a.jsxs)("div", {
|
|
209
|
-
className: v,
|
|
210
|
-
children: [
|
|
211
|
-
g ? /* @__PURE__ */ (0, a.jsx)(o, {
|
|
212
|
-
as: "aside",
|
|
213
|
-
className: [
|
|
214
|
-
"nabs-ui-layout__panel",
|
|
215
|
-
"nabs-ui-layout__panel--left",
|
|
216
|
-
u
|
|
217
|
-
].filter(Boolean).join(" "),
|
|
218
|
-
children: n
|
|
219
|
-
}) : null,
|
|
220
|
-
/* @__PURE__ */ (0, a.jsx)(o, {
|
|
221
|
-
as: "section",
|
|
222
|
-
className: ["nabs-ui-layout__content", f].filter(Boolean).join(" "),
|
|
223
|
-
children: i
|
|
224
|
-
}),
|
|
225
|
-
_ ? /* @__PURE__ */ (0, a.jsx)(o, {
|
|
226
|
-
as: "aside",
|
|
227
|
-
className: [
|
|
228
|
-
"nabs-ui-layout__panel",
|
|
229
|
-
"nabs-ui-layout__panel--right",
|
|
230
|
-
d
|
|
231
|
-
].filter(Boolean).join(" "),
|
|
232
|
-
children: r
|
|
233
|
-
}) : null
|
|
234
|
-
]
|
|
235
|
-
}),
|
|
236
|
-
h ? /* @__PURE__ */ (0, a.jsx)(o, {
|
|
237
|
-
as: "footer",
|
|
238
|
-
className: "nabs-ui-layout__footerWrapper",
|
|
239
|
-
children: /* @__PURE__ */ (0, a.jsx)("div", {
|
|
240
|
-
className: ["nabs-ui-layout__footer", l].filter(Boolean).join(" "),
|
|
241
|
-
children: t
|
|
242
|
-
})
|
|
243
|
-
}) : null
|
|
244
|
-
]
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
//#endregion
|
|
2
|
+
import { Layout as t } from "@net-advantage/nabs-ui-layout/Layout";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
248
4
|
//#region src/Shell.tsx
|
|
249
|
-
var
|
|
250
|
-
let p = ["nabs-ui-shell",
|
|
251
|
-
return /* @__PURE__ */ (
|
|
5
|
+
var r = e(({ header: e, navigation: r, footer: i, children: a, className: o = "", headerClassName: s = "", navigationClassName: c = "", contentClassName: l = "", footerClassName: u = "", ...d }, f) => {
|
|
6
|
+
let p = ["nabs-ui-shell", o].filter(Boolean).join(" "), m = ["flex flex-wrap items-center justify-between gap-4 px-5 py-4", s].filter(Boolean).join(" "), h = ["flex h-full min-h-0 flex-col gap-4 overflow-y-auto p-4", c].filter(Boolean).join(" "), g = ["min-w-0", l].filter(Boolean).join(" "), _ = ["flex flex-wrap items-center justify-between gap-4 px-5 py-4", u].filter(Boolean).join(" ");
|
|
7
|
+
return /* @__PURE__ */ n("div", {
|
|
252
8
|
ref: f,
|
|
253
9
|
className: p,
|
|
254
10
|
...d,
|
|
255
|
-
children: /* @__PURE__ */ (
|
|
11
|
+
children: /* @__PURE__ */ n(t, {
|
|
256
12
|
className: "nabs-ui-shell__layout",
|
|
257
13
|
header: e,
|
|
258
|
-
footer:
|
|
259
|
-
leftSidePanel:
|
|
14
|
+
footer: i,
|
|
15
|
+
leftSidePanel: r,
|
|
260
16
|
headerClassName: m,
|
|
261
17
|
footerClassName: _,
|
|
262
18
|
leftSidePanelClassName: h,
|
|
263
19
|
contentClassName: g,
|
|
264
|
-
children:
|
|
20
|
+
children: a
|
|
265
21
|
})
|
|
266
22
|
});
|
|
267
23
|
});
|
|
268
|
-
|
|
24
|
+
r.displayName = "Shell";
|
|
269
25
|
//#endregion
|
|
270
|
-
export {
|
|
26
|
+
export { r as Shell };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@net-advantage/nabs-ui-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Reusable React app shell for the Nabs UI library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/nabs-ui-shell.cjs",
|
|
@@ -16,13 +16,9 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "vite build",
|
|
21
|
-
"dev": "vite"
|
|
22
|
-
},
|
|
23
19
|
"dependencies": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
20
|
+
"react": "^19.0.0",
|
|
21
|
+
"@net-advantage/nabs-ui-layout": "0.19.0"
|
|
26
22
|
},
|
|
27
23
|
"devDependencies": {
|
|
28
24
|
"@tailwindcss/vite": "^4.1.0",
|
|
@@ -30,5 +26,9 @@
|
|
|
30
26
|
"react-dom": "^19.2.6",
|
|
31
27
|
"tailwindcss": "^4.1.0",
|
|
32
28
|
"vite": "^8.0.12"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "vite build",
|
|
32
|
+
"dev": "vite"
|
|
33
33
|
}
|
|
34
34
|
}
|