@base-framework/ui 1.2.1 → 1.2.2

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.
@@ -7,7 +7,7 @@ import { C as ft, b as pt } from "./tooltip-BFST5Fcz.js";
7
7
  import { f as C } from "./image-T4fJLqgd.js";
8
8
  import { Icons as u } from "./icons.es.js";
9
9
  import { F as z } from "./format-DE4rFWuD.js";
10
- import "./mobile-nav-wrapper-0Aq2acIa.js";
10
+ import "./mobile-nav-wrapper-DxcNwPu2.js";
11
11
  import "./aside-template-B9V-0xle.js";
12
12
  import "./full-page-CgVI1G7F.js";
13
13
  import "./bside-template-oLChzjxQ.js";
package/dist/index.es.js CHANGED
@@ -3,13 +3,13 @@ import { B as c, I as g, L as T, M as C, U as I, i as S, a as b } from "./button
3
3
  import { C as B, a as F, D as P, b as M, E as f, F as k, H as x, I as v, c as N, M as U, N as h, P as y, R as L, T as W, d as H, e as R, U as w, V as A, f as G, W as O } from "./image-T4fJLqgd.js";
4
4
  import { S as j } from "./skeleton-BlY3opxG.js";
5
5
  import { Icons as J, MaterialSymbols as q } from "./icons.es.js";
6
- import { A as K, B as Q, C as _, a as X, b as Y, c as Z, d as $, D as aa, e as ea, f as sa, g as oa, h as ta, i as ra, j as na, k as ia, l as la, m as pa, n as ma, o as da, E as ua, F as ca, p as ga, q as Ta, r as Ca, s as Ia, t as Sa, u as ba, v as Da, w as Ba, x as Fa, I as Pa, L as Ma, M as fa, y as ka, N as xa, z as va, P as Na, S as Ua, G as ha, H as ya, J as La, K as Wa, T as Ha, O as Ra, Q as wa, R as Aa, U as Ga } from "./empty-state-BeE1e4GL.js";
6
+ import { A as K, B as Q, C as _, a as X, b as Y, c as Z, d as $, D as aa, e as ea, f as sa, g as oa, h as ta, i as ra, j as na, k as ia, l as la, m as pa, n as ma, o as da, E as ua, F as ca, p as ga, q as Ta, r as Ca, s as Ia, t as Sa, u as ba, v as Da, w as Ba, x as Fa, I as Pa, L as Ma, M as fa, y as ka, N as xa, z as va, P as Na, S as Ua, G as ha, H as ya, J as La, K as Wa, T as Ha, O as Ra, Q as wa, R as Aa, U as Ga } from "./empty-state-CWha-IxF.js";
7
7
  import { A as Ea, B as ja, C as Va, a as Ja, b as qa, D as za, c as Ka, d as Qa, e as _a, f as Xa, g as Ya, F as Za, H as $a, M as ae, O as ee, P as se, R as oe, S as te, h as re, i as ne, j as ie, T as le, U as pe, k as me, l as de, m as ue, p as ce } from "./simple-search-input-Dbk3_QiK.js";
8
- import { B as Te, I as Ce, N as Ie, P as Se, S as be, T as De, a as Be, b as Fe, U as Pe, c as Me, d as fe, e as ke, W as xe, f as ve, g as Ne, h as Ue, i as he, j as ye, k as Le, l as We, m as He, n as Re } from "./signature-panel-o4xFn_he.js";
9
- import { B as Ae, I as Ge, M as Oe, a as Ee, b as je, N as Ve, c as Je, d as qe, e as ze, f as Ke, P as Qe, S as _e, T as Xe } from "./mobile-nav-wrapper-0Aq2acIa.js";
10
- import { S as Ze } from "./sidebar-menu-BFlRN7Am.js";
8
+ import { B as Te, I as Ce, N as Ie, P as Se, S as be, T as De, a as Be, b as Fe, U as Pe, c as Me, d as fe, e as ke, W as xe, f as ve, g as Ne, h as Ue, i as he, j as ye, k as Le, l as We, m as He, n as Re } from "./signature-panel-DIUiqroE.js";
9
+ import { B as Ae, I as Ge, M as Oe, a as Ee, b as je, N as Ve, c as Je, d as qe, e as ze, f as Ke, P as Qe, S as _e, T as Xe } from "./mobile-nav-wrapper-DxcNwPu2.js";
10
+ import { S as Ze } from "./sidebar-menu-BwgM82AG.js";
11
11
  import { B as as, F as es, M as ss, P as os } from "./full-page-CgVI1G7F.js";
12
- import { B as rs, C as ns, F as is, a as ls, S as ps } from "./sidebar-menu-page-CmgdfPy4.js";
12
+ import { B as rs, C as ns, F as is, a as ls, S as ps } from "./sidebar-menu-page-DVgAv5ZY.js";
13
13
  import { A as ds, F as us, M as cs, T as gs, a as Ts } from "./aside-template-B9V-0xle.js";
14
14
  import { B as Is } from "./bside-template-oLChzjxQ.js";
15
15
  import { F as bs, c as Ds } from "./format-DE4rFWuD.js";
@@ -1,6 +1,6 @@
1
- import { Button as k, Div as l, Label as g, Span as b, Ul as r, H4 as w, Nav as u, H3 as d, OnState as S, UseParent as B } from "@base-framework/atoms";
2
- import { Component as n, Atom as i, NavLink as N, router as L } from "@base-framework/base";
3
- import { U as o, B as h } from "./buttons-Dxnuce2_.js";
1
+ import { Button as g, Div as l, Label as b, Span as w, Ul as r, H4 as S, Nav as d, H3 as h, OnState as B, UseParent as N } from "@base-framework/atoms";
2
+ import { Component as n, Atom as i, NavLink as L, router as u } from "@base-framework/base";
3
+ import { U as o, B as p } from "./buttons-Dxnuce2_.js";
4
4
  import { Icons as c } from "./icons.es.js";
5
5
  class C extends n {
6
6
  /**
@@ -19,7 +19,7 @@ class C extends n {
19
19
  */
20
20
  render() {
21
21
  const e = this.state;
22
- return k({
22
+ return g({
23
23
  class: this.class || "",
24
24
  onState: [
25
25
  ["selected", {
@@ -79,8 +79,8 @@ const y = i(({ options: s, click: e }, t) => ({
79
79
  }, [
80
80
  o({ size: "sm" }, e)
81
81
  ]),
82
- g({ class: "label flex flex-auto text-sm items-center cursor-pointer whitespace-nowrap" }, s),
83
- t && b(
82
+ b({ class: "label flex flex-auto text-sm items-center cursor-pointer whitespace-nowrap" }, s),
83
+ t && w(
84
84
  {
85
85
  class: "flex justify-center items-center px-1 transition-all text-muted-foreground mr-2",
86
86
  onState: [
@@ -97,7 +97,7 @@ const y = i(({ options: s, click: e }, t) => ({
97
97
  ]
98
98
  )
99
99
  ];
100
- class p extends n {
100
+ class f extends n {
101
101
  /**
102
102
  * This will declare the props for the compiler.
103
103
  *
@@ -128,8 +128,8 @@ class p extends n {
128
128
  * @protected
129
129
  */
130
130
  addLink() {
131
- const e = this.options && this.options.length > 0, t = this.content || P(this.label, this.icon, e);
132
- return this.href ? new N(
131
+ const e = this.options && this.options.length > 0, t = this.content || P(String(this.label), this.icon, e);
132
+ return this.href ? new L(
133
133
  {
134
134
  class: "flex flex-auto flex-row rounded-md transition-all overflow-x-hidden",
135
135
  cache: "link",
@@ -157,7 +157,7 @@ class p extends n {
157
157
  }
158
158
  }
159
159
  const I = i(({ map: s }, e) => r({ class: "navigation-group flex flex-col gap-2 list-none m-0 py-2 px-0", map: s }, [
160
- w({ class: "text-muted-foreground text-sm py-0 px-4 whitespace-nowrap" }, e)
160
+ S({ class: "text-muted-foreground text-sm py-0 px-4 whitespace-nowrap" }, e)
161
161
  ]));
162
162
  class $ extends n {
163
163
  /**
@@ -175,7 +175,7 @@ class $ extends n {
175
175
  */
176
176
  render() {
177
177
  const e = this.mapOptions(this.options), t = this.class || "", a = this.mobileBorder ? "border md:border-0 rounded-md" : "";
178
- return u({ class: `navigation flex flex-auto flex-col ${t}` }, [
178
+ return d({ class: `navigation flex flex-auto flex-col ${t}` }, [
179
179
  r({
180
180
  class: `relative group flex flex-col gap-2 py-2 px-2 list-none m-0 ${a}`,
181
181
  map: e
@@ -217,10 +217,10 @@ class $ extends n {
217
217
  * @returns {object}
218
218
  */
219
219
  addLink(e) {
220
- return new p(e);
220
+ return new f(e);
221
221
  }
222
222
  }
223
- class f extends $ {
223
+ class x extends $ {
224
224
  onCreated() {
225
225
  this.links = [];
226
226
  }
@@ -255,7 +255,7 @@ class f extends $ {
255
255
  * @returns {object}
256
256
  */
257
257
  addLink(e) {
258
- const t = new p(e);
258
+ const t = new f(e);
259
259
  if (this.links.push(t), !t.options)
260
260
  return t;
261
261
  const a = this.addSubNav(t);
@@ -270,7 +270,7 @@ const z = (s, e) => new RegExp(`${s}($|/|\\.).*`).test(e), M = (s, e) => {
270
270
  const t = s.link.panel.pathname;
271
271
  return !t && s.isSelected() ? !0 : s.exact ? e === t : z(t, e);
272
272
  };
273
- class O extends f {
273
+ class O extends x {
274
274
  /**
275
275
  * This will declare the props for the compiler.
276
276
  *
@@ -286,7 +286,7 @@ class O extends f {
286
286
  */
287
287
  render() {
288
288
  const e = `navigation flex flex-auto flex-col sub ${this.mainClassName || ""}`, t = this.mapOptions(this.options);
289
- return u({ class: e, onState: this.onState() }, [
289
+ return d({ class: e, onState: this.onState() }, [
290
290
  r({ class: "relative group flex flex-col gap-2 py-2 px-0 list-none m-0" }, [...t, ...this.addSubs(), this.addWatcher()])
291
291
  ]);
292
292
  }
@@ -299,7 +299,7 @@ class O extends f {
299
299
  addWatcher() {
300
300
  return {
301
301
  watch: {
302
- value: ["[[path]]", L.data],
302
+ value: ["[[path]]", u.data],
303
303
  callBack: this.updateLinks.bind(this)
304
304
  }
305
305
  };
@@ -340,7 +340,8 @@ class O extends f {
340
340
  * @returns {void}
341
341
  */
342
342
  afterSetup() {
343
- this.updateLinks(path);
343
+ const e = u.data.path;
344
+ this.updateLinks(e);
344
345
  }
345
346
  /**
346
347
  * This will update the links.
@@ -356,8 +357,8 @@ class O extends f {
356
357
  this.parentLink.update(t);
357
358
  }
358
359
  }
359
- const E = (s) => d({ class: "text-lg ml-2" }, s), H = (s) => l({ class: "sticky flex flex-row items-center bg-popover lg:hidden top-0 z-10 border-0 border-b" }, [
360
- h({
360
+ const E = (s) => h({ class: "text-lg ml-2" }, s), H = (s) => l({ class: "sticky flex flex-row items-center bg-popover lg:hidden top-0 z-10 border-0 border-b" }, [
361
+ p({
361
362
  variant: "icon",
362
363
  class: "m-2",
363
364
  click: (e, { state: t }) => t.toggle("open"),
@@ -437,31 +438,31 @@ class U extends n {
437
438
  this.container = app.root;
438
439
  }
439
440
  }
440
- const x = () => h({ class: "m-2", variant: "ghost", addState() {
441
+ const m = () => p({ class: "m-2", variant: "ghost", addState() {
441
442
  return {
442
443
  open: !1
443
444
  };
444
445
  }, click: (s, { state: e }) => e.toggle("open") }, [
445
446
  o({}, c.bar.three)
446
- ]), A = (s) => d({ class: "text-lg ml-2" }, s), G = (s) => l({ class: "flex flex-auto flex-row items-center lg:hidden" }, [
447
- x(),
447
+ ]), A = (s) => h({ class: "text-lg ml-2" }, s), G = (s) => l({ class: "flex flex-auto flex-row items-center lg:hidden" }, [
448
+ m(),
448
449
  s.title && A(s.title)
449
- ]), m = (s, e) => {
450
+ ]), v = (s, e) => {
450
451
  s.forEach((t) => {
451
452
  if (t.options) {
452
- m(t.options, e);
453
+ v(t.options, e);
453
454
  return;
454
455
  }
455
456
  t.callBack = e;
456
457
  });
457
- }, v = (s) => l({ class: "bg-background flex flex-auto flex-col w-full relative" }, [
458
- S(
458
+ }, k = (s) => l({ class: "bg-background flex flex-auto flex-col w-full relative" }, [
459
+ B(
459
460
  "open",
460
461
  (e) => e ? [
461
462
  new U({ title: s.title }, [
462
- B(({ state: t }) => {
463
+ N(({ state: t }) => {
463
464
  const a = (W) => t.open = !1;
464
- return m(s.options, a), new f(
465
+ return v(s.options, a), new x(
465
466
  {
466
467
  options: s.options
467
468
  }
@@ -472,20 +473,20 @@ const x = () => h({ class: "m-2", variant: "ghost", addState() {
472
473
  )
473
474
  ]), q = i((s) => l({ cache: "mobileNav", class: "inline-flex relative lg:hidden" }, [
474
475
  l([
475
- x(),
476
- v(s)
476
+ m(),
477
+ k(s)
477
478
  ])
478
479
  ])), F = i((s) => l({ cache: "mobileNav", class: "flex flex-auto flex-col w-full relative lg:hidden" }, [
479
480
  l({ class: "flex flex-auto flex-col w-full" }, [
480
481
  G(s),
481
- v(s)
482
+ k(s)
482
483
  ])
483
484
  ]));
484
485
  export {
485
486
  T as B,
486
- f as I,
487
- p as M,
488
- x as N,
487
+ x as I,
488
+ f as M,
489
+ m as N,
489
490
  H as P,
490
491
  O as S,
491
492
  G as T,
@@ -1,4 +1,4 @@
1
- import { A as s, B as t, C as r, a as e, b as i, c as n, d as m, D as l, e as d, f as C, g as p, h as D, i as S, j as u, k as c, l as g, m as F, n as T, o as P, E as w, F as A, p as I, q as f, r as b, s as y, t as B, u as M, v as U, w as k, x, I as L, L as R, M as v, y as E, N, z as h, P as G, S as O, G as j, H as q, J as z, K as H, T as J, O as K, Q, R as _, U as V } from "./empty-state-BeE1e4GL.js";
1
+ import { A as s, B as t, C as r, a as e, b as i, c as n, d as m, D as l, e as d, f as C, g as p, h as D, i as S, j as u, k as c, l as g, m as F, n as T, o as P, E as w, F as A, p as I, q as f, r as b, s as y, t as B, u as M, v as U, w as k, x, I as L, L as R, M as v, y as E, N, z as h, P as G, S as O, G as j, H as q, J as z, K as H, T as J, O as K, Q, R as _, U as V } from "./empty-state-CWha-IxF.js";
2
2
  import { A as X, P as Y, m as Z } from "./simple-search-input-Dbk3_QiK.js";
3
3
  export {
4
4
  s as Alert,
@@ -1,7 +1,7 @@
1
1
  import { B as s, C as n, a as t, b as r, D as o, c as l, d as i, e as d, f as b, g as p, F as u, H as T, M as g, O as v, R as N, S as k, h as D, i as c, j as C, T as m, U as B, k as S, l as M, p as h } from "./simple-search-input-Dbk3_QiK.js";
2
- import { B as W, I as U, N as f, P as H, S as I, T as P, a as x, b as L, U as O, c as F, d as G, e as j, W as R, f as w, g as q, h as z, i as A, j as E, k as J, l as K, m as Q, n as V } from "./signature-panel-o4xFn_he.js";
3
- import { B as Y, I as Z, M as _, a as $, b as aa, N as ea, c as sa, d as na, e as ta, f as ra, P as oa, S as la, T as ia } from "./mobile-nav-wrapper-0Aq2acIa.js";
4
- import { S as ba } from "./sidebar-menu-BFlRN7Am.js";
2
+ import { B as W, I as U, N as f, P as H, S as I, T as P, a as x, b as L, U as O, c as F, d as G, e as j, W as R, f as w, g as q, h as z, i as A, j as E, k as J, l as K, m as Q, n as V } from "./signature-panel-DIUiqroE.js";
3
+ import { B as Y, I as Z, M as _, a as $, b as aa, N as ea, c as sa, d as na, e as ta, f as ra, P as oa, S as la, T as ia } from "./mobile-nav-wrapper-DxcNwPu2.js";
4
+ import { S as ba } from "./sidebar-menu-BwgM82AG.js";
5
5
  export {
6
6
  s as BackButton,
7
7
  Y as Backdrop,
package/dist/pages.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { B as s, F as P, M as g, P as n } from "./full-page-CgVI1G7F.js";
2
- import { B as r, C as o, F as i, a as t, S as F } from "./sidebar-menu-page-CmgdfPy4.js";
2
+ import { B as r, C as o, F as i, a as t, S as F } from "./sidebar-menu-page-DVgAv5ZY.js";
3
3
  export {
4
4
  s as BasicPage,
5
5
  r as BlankPage,
@@ -1,5 +1,5 @@
1
1
  import { Div as r, Header as x, H1 as c } from "@base-framework/atoms";
2
- import { I as n } from "./mobile-nav-wrapper-0Aq2acIa.js";
2
+ import { I as n } from "./mobile-nav-wrapper-DxcNwPu2.js";
3
3
  const g = ({ title: l, options: s, class: a = "", mobileBorder: t = !1, sticky: e = !1, topNav: o = null, bottomNav: p = null }) => r({ class: `pb-12 p-4 pt-0 lg:p-6 lg:border-r w-full lg:max-w-[300px] flex-auto flex-col ${a}` }, [
4
4
  o,
5
5
  l && x({ class: "pb-4 md:pb-2 px-6 flex" }, [
@@ -1,8 +1,8 @@
1
1
  import { Div as s } from "@base-framework/atoms";
2
2
  import { B as a, M as i, P as r } from "./full-page-CgVI1G7F.js";
3
3
  import { F as l, A as n } from "./aside-template-B9V-0xle.js";
4
- import { b as d } from "./mobile-nav-wrapper-0Aq2acIa.js";
5
- import { S as o } from "./sidebar-menu-BFlRN7Am.js";
4
+ import { b as d } from "./mobile-nav-wrapper-DxcNwPu2.js";
5
+ import { S as o } from "./sidebar-menu-BwgM82AG.js";
6
6
  class p extends a {
7
7
  /**
8
8
  * This will render the page.
@@ -345,12 +345,13 @@ class Mt extends k {
345
345
  updateLinks(t) {
346
346
  let e = !1;
347
347
  this.deactivateAllLinks();
348
- for (const i of this.links) {
349
- if (!i.rendered)
348
+ for (const a of this.links) {
349
+ if (!a.rendered)
350
350
  continue;
351
- K(i, i.getLinkPath(), t) ? (this.updateLink(i, !0), e = !0) : this.updateLink(i, !1);
351
+ K(a, a.getLinkPath(), t) ? (this.updateLink(a, !0), e = !0) : this.updateLink(a, !1);
352
352
  }
353
- !e && this.links[0] && this.updateLink(this.links[0], !0);
353
+ const i = this?.links[0] ?? null;
354
+ !e && i && this.updateLink(i, !0);
354
355
  }
355
356
  /**
356
357
  * This will deactivate all links.
@@ -9,6 +9,9 @@
9
9
  * @augments Navigation
10
10
  */
11
11
  export class InlineNavigation extends Navigation {
12
+ /**
13
+ * @type {array} links - This will hold the links for the navigation.
14
+ */
12
15
  links: any[];
13
16
  /**
14
17
  * This will set up the sub nav.
@@ -18,6 +18,9 @@ export class NavigationMenu extends Component {
18
18
  * @default ''
19
19
  */
20
20
  class: string;
21
+ /**
22
+ * @type {array} links - This will hold the links for the navigation.
23
+ */
21
24
  links: any[];
22
25
  /**
23
26
  * This will render the component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "This is a UI package that adds components and atoms that use Tailwind CSS and a theme based on Shadcn.",
5
5
  "main": "./dist/index.es.js",
6
6
  "scripts": {