@net-advantage/nabs-ui-shell 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.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # nabs-ui-shell
2
+
3
+ Reusable React app shell for the Nabs UI library.
4
+
5
+ ## Usage
6
+
7
+ ```tsx
8
+ import { Shell } from "@net-advantage/nabs-ui-shell/Shell";
9
+ import { Button } from "@net-advantage/nabs-ui-buttons/Button";
10
+
11
+ export function Example() {
12
+ return (
13
+ <Shell
14
+ header={<div>Header content</div>}
15
+ navigation={<nav>Navigation</nav>}
16
+ footer={<div>Footer content</div>}
17
+ >
18
+ <main>Main content</main>
19
+ </Shell>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Props
25
+
26
+ - `header` renders the shell header area.
27
+ - `navigation` renders the primary side navigation.
28
+ - `footer` renders the shell footer area.
29
+ - `children` renders the main content area.
30
+
31
+ The shell composes the `nabs-ui-layout` control and uses Tailwind utilities for its presentation styles.
32
+ Header and footer height are driven by their content, so they stay static around the main content area.
@@ -0,0 +1,6 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);let t=require("react");var n=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;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]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),r=e((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}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){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!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))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[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}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}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.`);else f(p);if(A.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,L[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
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;
@@ -0,0 +1,420 @@
1
+ .nabs-ui-layout {
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 */
76
+ @layer theme {
77
+ :root, :host {
78
+ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
79
+ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
80
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
81
+ "Courier New", monospace;
82
+ --spacing: .25rem;
83
+ --default-font-family: var(--font-sans);
84
+ --default-mono-font-family: var(--font-mono);
85
+ }
86
+ }
87
+
88
+ @layer base {
89
+ *, :after, :before, ::backdrop {
90
+ box-sizing: border-box;
91
+ border: 0 solid;
92
+ margin: 0;
93
+ padding: 0;
94
+ }
95
+
96
+ ::file-selector-button {
97
+ box-sizing: border-box;
98
+ border: 0 solid;
99
+ margin: 0;
100
+ padding: 0;
101
+ }
102
+
103
+ html, :host {
104
+ -webkit-text-size-adjust: 100%;
105
+ tab-size: 4;
106
+ line-height: 1.5;
107
+ font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
108
+ font-feature-settings: var(--default-font-feature-settings, normal);
109
+ font-variation-settings: var(--default-font-variation-settings, normal);
110
+ -webkit-tap-highlight-color: transparent;
111
+ }
112
+
113
+ hr {
114
+ height: 0;
115
+ color: inherit;
116
+ border-top-width: 1px;
117
+ }
118
+
119
+ abbr:where([title]) {
120
+ -webkit-text-decoration: underline dotted;
121
+ text-decoration: underline dotted;
122
+ }
123
+
124
+ h1, h2, h3, h4, h5, h6 {
125
+ font-size: inherit;
126
+ font-weight: inherit;
127
+ }
128
+
129
+ a {
130
+ color: inherit;
131
+ -webkit-text-decoration: inherit;
132
+ -webkit-text-decoration: inherit;
133
+ -webkit-text-decoration: inherit;
134
+ text-decoration: inherit;
135
+ }
136
+
137
+ b, strong {
138
+ font-weight: bolder;
139
+ }
140
+
141
+ code, kbd, samp, pre {
142
+ font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
143
+ font-feature-settings: var(--default-mono-font-feature-settings, normal);
144
+ font-variation-settings: var(--default-mono-font-variation-settings, normal);
145
+ font-size: 1em;
146
+ }
147
+
148
+ small {
149
+ font-size: 80%;
150
+ }
151
+
152
+ sub, sup {
153
+ vertical-align: baseline;
154
+ font-size: 75%;
155
+ line-height: 0;
156
+ position: relative;
157
+ }
158
+
159
+ sub {
160
+ bottom: -.25em;
161
+ }
162
+
163
+ sup {
164
+ top: -.5em;
165
+ }
166
+
167
+ table {
168
+ text-indent: 0;
169
+ border-color: inherit;
170
+ border-collapse: collapse;
171
+ }
172
+
173
+ :-moz-focusring {
174
+ outline: auto;
175
+ }
176
+
177
+ progress {
178
+ vertical-align: baseline;
179
+ }
180
+
181
+ summary {
182
+ display: list-item;
183
+ }
184
+
185
+ ol, ul, menu {
186
+ list-style: none;
187
+ }
188
+
189
+ img, svg, video, canvas, audio, iframe, embed, object {
190
+ vertical-align: middle;
191
+ display: block;
192
+ }
193
+
194
+ img, video {
195
+ max-width: 100%;
196
+ height: auto;
197
+ }
198
+
199
+ button, input, select, optgroup, textarea {
200
+ font: inherit;
201
+ font-feature-settings: inherit;
202
+ font-variation-settings: inherit;
203
+ letter-spacing: inherit;
204
+ color: inherit;
205
+ opacity: 1;
206
+ background-color: #0000;
207
+ border-radius: 0;
208
+ }
209
+
210
+ ::file-selector-button {
211
+ font: inherit;
212
+ font-feature-settings: inherit;
213
+ font-variation-settings: inherit;
214
+ letter-spacing: inherit;
215
+ color: inherit;
216
+ opacity: 1;
217
+ background-color: #0000;
218
+ border-radius: 0;
219
+ }
220
+
221
+ :where(select:is([multiple], [size])) optgroup {
222
+ font-weight: bolder;
223
+ }
224
+
225
+ :where(select:is([multiple], [size])) optgroup option {
226
+ padding-inline-start: 20px;
227
+ }
228
+
229
+ ::file-selector-button {
230
+ margin-inline-end: 4px;
231
+ }
232
+
233
+ ::placeholder {
234
+ opacity: 1;
235
+ }
236
+
237
+ @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
238
+ ::placeholder {
239
+ color: currentColor;
240
+ }
241
+
242
+ @supports (color: color-mix(in lab, red, red)) {
243
+ ::placeholder {
244
+ color: color-mix(in oklab, currentcolor 50%, transparent);
245
+ }
246
+ }
247
+ }
248
+
249
+ textarea {
250
+ resize: vertical;
251
+ }
252
+
253
+ ::-webkit-search-decoration {
254
+ -webkit-appearance: none;
255
+ }
256
+
257
+ ::-webkit-date-and-time-value {
258
+ min-height: 1lh;
259
+ text-align: inherit;
260
+ }
261
+
262
+ ::-webkit-datetime-edit {
263
+ display: inline-flex;
264
+ }
265
+
266
+ ::-webkit-datetime-edit-fields-wrapper {
267
+ padding: 0;
268
+ }
269
+
270
+ ::-webkit-datetime-edit {
271
+ padding-block: 0;
272
+ }
273
+
274
+ ::-webkit-datetime-edit-year-field {
275
+ padding-block: 0;
276
+ }
277
+
278
+ ::-webkit-datetime-edit-month-field {
279
+ padding-block: 0;
280
+ }
281
+
282
+ ::-webkit-datetime-edit-day-field {
283
+ padding-block: 0;
284
+ }
285
+
286
+ ::-webkit-datetime-edit-hour-field {
287
+ padding-block: 0;
288
+ }
289
+
290
+ ::-webkit-datetime-edit-minute-field {
291
+ padding-block: 0;
292
+ }
293
+
294
+ ::-webkit-datetime-edit-second-field {
295
+ padding-block: 0;
296
+ }
297
+
298
+ ::-webkit-datetime-edit-millisecond-field {
299
+ padding-block: 0;
300
+ }
301
+
302
+ ::-webkit-datetime-edit-meridiem-field {
303
+ padding-block: 0;
304
+ }
305
+
306
+ ::-webkit-calendar-picker-indicator {
307
+ line-height: 1;
308
+ }
309
+
310
+ :-moz-ui-invalid {
311
+ box-shadow: none;
312
+ }
313
+
314
+ button, input:where([type="button"], [type="reset"], [type="submit"]) {
315
+ appearance: button;
316
+ }
317
+
318
+ ::file-selector-button {
319
+ appearance: button;
320
+ }
321
+
322
+ ::-webkit-inner-spin-button {
323
+ height: auto;
324
+ }
325
+
326
+ ::-webkit-outer-spin-button {
327
+ height: auto;
328
+ }
329
+
330
+ [hidden]:where(:not([hidden="until-found"])) {
331
+ display: none !important;
332
+ }
333
+ }
334
+
335
+ @layer components;
336
+
337
+ @layer utilities {
338
+ .static {
339
+ position: static;
340
+ }
341
+
342
+ .flex {
343
+ display: flex;
344
+ }
345
+
346
+ .h-full {
347
+ height: 100%;
348
+ }
349
+
350
+ .min-h-0 {
351
+ min-height: 0;
352
+ }
353
+
354
+ .min-w-0 {
355
+ min-width: 0;
356
+ }
357
+
358
+ .flex-col {
359
+ flex-direction: column;
360
+ }
361
+
362
+ .flex-wrap {
363
+ flex-wrap: wrap;
364
+ }
365
+
366
+ .items-center {
367
+ align-items: center;
368
+ }
369
+
370
+ .justify-between {
371
+ justify-content: space-between;
372
+ }
373
+
374
+ .gap-4 {
375
+ gap: calc(var(--spacing) * 4);
376
+ }
377
+
378
+ .overflow-y-auto {
379
+ overflow-y: auto;
380
+ }
381
+
382
+ .p-4 {
383
+ padding: calc(var(--spacing) * 4);
384
+ }
385
+
386
+ .px-5 {
387
+ padding-inline: calc(var(--spacing) * 5);
388
+ }
389
+
390
+ .py-4 {
391
+ padding-block: calc(var(--spacing) * 4);
392
+ }
393
+ }
394
+
395
+ .nabs-ui-shell {
396
+ grid-template-rows: auto minmax(0, 1fr) auto;
397
+ min-width: 0;
398
+ height: 100dvh;
399
+ display: grid;
400
+ }
401
+
402
+ .nabs-ui-shell__layout {
403
+ height: 100%;
404
+ min-height: 0;
405
+ }
406
+
407
+ .nabs-ui-shell__layout .nabs-ui-layout__body {
408
+ min-height: 0;
409
+ }
410
+
411
+ .nabs-ui-shell__layout .nabs-ui-layout__panel--left {
412
+ min-height: 0;
413
+ overflow-y: auto;
414
+ }
415
+
416
+ .nabs-ui-shell__layout .nabs-ui-layout__content {
417
+ min-height: 0;
418
+ overflow: auto;
419
+ }
420
+ /*$vite$:1*/
@@ -0,0 +1,270 @@
1
+ import { forwardRef as e } from "react";
2
+ //#region \0rolldown/runtime.js
3
+ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
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
248
+ //#region src/Shell.tsx
249
+ var c = e(({ header: e, navigation: t, footer: n, children: r, className: i = "", headerClassName: o = "", navigationClassName: c = "", contentClassName: l = "", footerClassName: u = "", ...d }, f) => {
250
+ let p = ["nabs-ui-shell", i].filter(Boolean).join(" "), m = ["flex flex-wrap items-center justify-between gap-4 px-5 py-4", o].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(" ");
251
+ return /* @__PURE__ */ (0, a.jsx)("div", {
252
+ ref: f,
253
+ className: p,
254
+ ...d,
255
+ children: /* @__PURE__ */ (0, a.jsx)(s, {
256
+ className: "nabs-ui-shell__layout",
257
+ header: e,
258
+ footer: n,
259
+ leftSidePanel: t,
260
+ headerClassName: m,
261
+ footerClassName: _,
262
+ leftSidePanelClassName: h,
263
+ contentClassName: g,
264
+ children: r
265
+ })
266
+ });
267
+ });
268
+ c.displayName = "Shell";
269
+ //#endregion
270
+ export { c as Shell };
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@net-advantage/nabs-ui-shell",
3
+ "version": "0.1.0",
4
+ "description": "Reusable React app shell for the Nabs UI library.",
5
+ "type": "module",
6
+ "main": "./dist/nabs-ui-shell.cjs",
7
+ "module": "./dist/nabs-ui-shell.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/nabs-ui-shell.js",
11
+ "require": "./dist/nabs-ui-shell.cjs"
12
+ },
13
+ "./Shell": "./src/Shell.tsx",
14
+ "./style.css": "./dist/nabs-ui-shell.css"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "build": "vite build",
21
+ "dev": "vite"
22
+ },
23
+ "dependencies": {
24
+ "nabs-ui-layout": "file:../nabs-ui-layout",
25
+ "react": "^19.0.0"
26
+ },
27
+ "devDependencies": {
28
+ "@tailwindcss/vite": "^4.1.0",
29
+ "@vitejs/plugin-react": "^6.0.1",
30
+ "react-dom": "^19.2.6",
31
+ "tailwindcss": "^4.1.0",
32
+ "vite": "^8.0.12"
33
+ }
34
+ }