@eschoolbase/client-ui 0.3.0 → 0.3.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.
package/dist/index.js CHANGED
@@ -4428,22 +4428,25 @@ var $ = {
4428
4428
  panel: "cui-AccountPanel-module__panel--PinlA",
4429
4429
  "cui-account-in": "cui-AccountPanel-module__cui-account-in--QVNEb",
4430
4430
  panelSidebar: "cui-AccountPanel-module__panelSidebar--EuGZh",
4431
- identity: "cui-AccountPanel-module__identity--lZRA7",
4432
- email: "cui-AccountPanel-module__email--Ze3OW",
4433
- avatarRing: "cui-AccountPanel-module__avatarRing--FQrz4",
4434
- avatarInner: "cui-AccountPanel-module__avatarInner--5ZfEz",
4431
+ srOnly: "cui-AccountPanel-module__srOnly--1AcW9",
4432
+ profile: "cui-AccountPanel-module__profile--rxgQr",
4433
+ profileTop: "cui-AccountPanel-module__profileTop--D-PcN",
4434
+ profileText: "cui-AccountPanel-module__profileText--WVEl4",
4435
4435
  greeting: "cui-AccountPanel-module__greeting--am-j3",
4436
+ email: "cui-AccountPanel-module__email--Ze3OW",
4436
4437
  role: "cui-AccountPanel-module__role--E9lrf",
4437
- pills: "cui-AccountPanel-module__pills--5gSce",
4438
- pill: "cui-AccountPanel-module__pill--vK7aC",
4439
- actionIcon: "cui-AccountPanel-module__actionIcon--oReIE",
4440
- externalIcon: "cui-AccountPanel-module__externalIcon--dJc16",
4441
4438
  details: "cui-AccountPanel-module__details--MGxxd",
4442
- detailRow: "cui-AccountPanel-module__detailRow--VzvVD",
4439
+ detail: "cui-AccountPanel-module__detail--oHOW6",
4440
+ menu: "cui-AccountPanel-module__menu--w-dvl",
4441
+ menuItem: "cui-AccountPanel-module__menuItem--xo31j",
4442
+ menuIcon: "cui-AccountPanel-module__menuIcon--xwNdg",
4443
+ menuLabel: "cui-AccountPanel-module__menuLabel--GyzZQ",
4444
+ trailIcon: "cui-AccountPanel-module__trailIcon--ow4Ga",
4443
4445
  apps: "cui-AccountPanel-module__apps--KRMBA",
4444
- appsTitle: "cui-AccountPanel-module__appsTitle--mcvnH",
4446
+ sectionTitle: "cui-AccountPanel-module__sectionTitle--dZooS",
4445
4447
  grid: "cui-AccountPanel-module__grid--KYmem",
4446
4448
  app: "cui-AccountPanel-module__app--Dj--X",
4449
+ appIsCurrent: "cui-AccountPanel-module__appIsCurrent--PEjBw",
4447
4450
  tile: "cui-AccountPanel-module__tile--YKNda",
4448
4451
  tonePrimary: "cui-AccountPanel-module__tonePrimary--lAexZ",
4449
4452
  toneInfo: "cui-AccountPanel-module__toneInfo--yb-xj",
@@ -4452,8 +4455,10 @@ var $ = {
4452
4455
  toneDanger: "cui-AccountPanel-module__toneDanger--MP2rJ",
4453
4456
  toneNeutral: "cui-AccountPanel-module__toneNeutral--diEHz",
4454
4457
  appName: "cui-AccountPanel-module__appName--MJc25",
4458
+ currentDot: "cui-AccountPanel-module__currentDot--LuAsU",
4455
4459
  danger: "cui-AccountPanel-module__danger--t0t-L",
4456
- dangerAction: "cui-AccountPanel-module__dangerAction--jvJ7-"
4460
+ dangerAction: "cui-AccountPanel-module__dangerAction--jvJ7-",
4461
+ dangerIcon: "cui-AccountPanel-module__dangerIcon--Rkov-"
4457
4462
  }, Cr = 8, wr = 12, Tr = 352, Er = "a[href], button:not([disabled])", Dr = ({ href: e, className: t, title: n, onClick: r, children: i }) => /* @__PURE__ */ p("a", {
4458
4463
  href: e,
4459
4464
  className: t,
@@ -4470,7 +4475,23 @@ var $ = {
4470
4475
  };
4471
4476
  function kr() {
4472
4477
  return /* @__PURE__ */ p("svg", {
4473
- className: $.externalIcon,
4478
+ className: $.trailIcon,
4479
+ viewBox: "0 0 20 20",
4480
+ "aria-hidden": "true",
4481
+ focusable: "false",
4482
+ children: /* @__PURE__ */ p("path", {
4483
+ d: "M8 5l5 5-5 5",
4484
+ fill: "none",
4485
+ stroke: "currentColor",
4486
+ strokeWidth: "1.8",
4487
+ strokeLinecap: "round",
4488
+ strokeLinejoin: "round"
4489
+ })
4490
+ });
4491
+ }
4492
+ function Ar() {
4493
+ return /* @__PURE__ */ p("svg", {
4494
+ className: $.trailIcon,
4474
4495
  viewBox: "0 0 20 20",
4475
4496
  "aria-hidden": "true",
4476
4497
  focusable: "false",
@@ -4484,7 +4505,7 @@ function kr() {
4484
4505
  })
4485
4506
  });
4486
4507
  }
4487
- function Ar({ user: e, apps: t = [], actions: n = [], placement: r = "header", collapsed: i = !1, appsTitle: s = "All Apps", greeting: c = "Hi", renderLink: d = Dr, className: _ }) {
4508
+ function jr({ user: e, apps: t = [], actions: n = [], placement: r = "header", collapsed: i = !1, appsTitle: s = "All Apps", greeting: c = "Hi", renderLink: d = Dr, className: _ }) {
4488
4509
  let v = r === "sidebar", y = o(), b = l(null), x = l(null), S = l(null), [C, w] = u(!1), [T, E] = u(null), [D, k] = u(), j = () => {
4489
4510
  let e = x.current;
4490
4511
  if (!e) return;
@@ -4538,108 +4559,123 @@ function Ar({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
4538
4559
  onKeyDown: P,
4539
4560
  children: [
4540
4561
  /* @__PURE__ */ m("div", {
4541
- className: $.identity,
4542
- children: [
4543
- e.email ? /* @__PURE__ */ p("p", {
4544
- className: $.email,
4545
- children: e.email
4546
- }) : null,
4547
- /* @__PURE__ */ p("span", {
4548
- className: $.avatarRing,
4549
- children: /* @__PURE__ */ p("span", {
4550
- className: $.avatarInner,
4551
- children: /* @__PURE__ */ p(Sr, {
4552
- name: e.name,
4553
- src: e.avatarUrl,
4554
- size: "xl",
4555
- tone: "primary",
4556
- "aria-hidden": "true"
4557
- })
4558
- })
4559
- }),
4560
- /* @__PURE__ */ m("p", {
4561
- className: $.greeting,
4562
+ className: $.profile,
4563
+ children: [/* @__PURE__ */ m("div", {
4564
+ className: $.profileTop,
4565
+ children: [/* @__PURE__ */ p(Sr, {
4566
+ name: e.name,
4567
+ src: e.avatarUrl,
4568
+ size: "lg",
4569
+ tone: "primary",
4570
+ "aria-hidden": "true"
4571
+ }), /* @__PURE__ */ m("div", {
4572
+ className: $.profileText,
4562
4573
  children: [
4563
- c,
4564
- ", ",
4565
- F,
4566
- "!"
4574
+ /* @__PURE__ */ m("p", {
4575
+ className: $.greeting,
4576
+ children: [
4577
+ c,
4578
+ ", ",
4579
+ F,
4580
+ "!"
4581
+ ]
4582
+ }),
4583
+ e.email ? /* @__PURE__ */ p("p", {
4584
+ className: $.email,
4585
+ title: e.email,
4586
+ children: e.email
4587
+ }) : null,
4588
+ e.role ? /* @__PURE__ */ p("span", {
4589
+ className: $.role,
4590
+ children: e.role
4591
+ }) : null
4567
4592
  ]
4568
- }),
4569
- e.role ? /* @__PURE__ */ p("span", {
4570
- className: $.role,
4571
- children: e.role
4572
- }) : null,
4573
- I.length > 0 ? /* @__PURE__ */ p("div", {
4574
- className: $.pills,
4575
- children: I.map((e) => {
4576
- let t = /* @__PURE__ */ m(f, { children: [
4577
- e.icon ? /* @__PURE__ */ p("span", {
4578
- className: $.actionIcon,
4579
- "aria-hidden": "true",
4580
- children: e.icon
4581
- }) : null,
4582
- /* @__PURE__ */ p("span", { children: e.label }),
4583
- e.external ? /* @__PURE__ */ p(kr, {}) : null
4584
- ] });
4585
- return e.href && !e.disabled ? e.external ? /* @__PURE__ */ p("a", {
4586
- href: e.href,
4587
- target: "_blank",
4588
- rel: "noreferrer",
4589
- title: e.title,
4590
- className: $.pill,
4591
- onClick: () => N(),
4592
- children: t
4593
- }, e.id) : /* @__PURE__ */ p("span", {
4594
- className: $.contents,
4595
- children: d({
4596
- href: e.href,
4597
- className: $.pill ?? "",
4598
- title: e.title,
4599
- onClick: () => N(),
4600
- children: t
4601
- })
4602
- }, e.id) : /* @__PURE__ */ p("button", {
4603
- type: "button",
4604
- disabled: e.disabled,
4605
- title: e.title,
4606
- className: $.pill,
4607
- onClick: () => R(e),
4608
- children: t
4609
- }, e.id);
4610
- })
4611
- }) : null
4612
- ]
4593
+ })]
4594
+ }), e.details?.length ? /* @__PURE__ */ p("dl", {
4595
+ className: $.details,
4596
+ children: e.details.map((e) => /* @__PURE__ */ m("div", {
4597
+ className: $.detail,
4598
+ children: [/* @__PURE__ */ p("dt", { children: e.label }), /* @__PURE__ */ p("dd", {
4599
+ title: e.value,
4600
+ children: e.value
4601
+ })]
4602
+ }, e.label))
4603
+ }) : null]
4613
4604
  }),
4614
- e.details?.length ? /* @__PURE__ */ p("dl", {
4615
- className: $.details,
4616
- children: e.details.map((e) => /* @__PURE__ */ m("div", {
4617
- className: $.detailRow,
4618
- children: [/* @__PURE__ */ p("dt", { children: e.label }), /* @__PURE__ */ p("dd", { children: e.value })]
4619
- }, e.label))
4605
+ I.length > 0 ? /* @__PURE__ */ p("div", {
4606
+ className: $.menu,
4607
+ children: I.map((e) => {
4608
+ let t = /* @__PURE__ */ m(f, { children: [
4609
+ /* @__PURE__ */ p("span", {
4610
+ className: $.menuIcon,
4611
+ "aria-hidden": "true",
4612
+ children: e.icon ?? null
4613
+ }),
4614
+ /* @__PURE__ */ p("span", {
4615
+ className: $.menuLabel,
4616
+ children: e.label
4617
+ }),
4618
+ e.external ? /* @__PURE__ */ p(Ar, {}) : e.href ? /* @__PURE__ */ p(kr, {}) : null
4619
+ ] });
4620
+ return e.href && !e.disabled ? e.external ? /* @__PURE__ */ p("a", {
4621
+ href: e.href,
4622
+ target: "_blank",
4623
+ rel: "noreferrer",
4624
+ title: e.title,
4625
+ className: $.menuItem,
4626
+ onClick: () => N(),
4627
+ children: t
4628
+ }, e.id) : /* @__PURE__ */ p("span", {
4629
+ className: $.contents,
4630
+ children: d({
4631
+ href: e.href,
4632
+ className: $.menuItem ?? "",
4633
+ title: e.title,
4634
+ onClick: () => N(),
4635
+ children: t
4636
+ })
4637
+ }, e.id) : /* @__PURE__ */ p("button", {
4638
+ type: "button",
4639
+ disabled: e.disabled,
4640
+ title: e.title,
4641
+ className: $.menuItem,
4642
+ onClick: () => R(e),
4643
+ children: t
4644
+ }, e.id);
4645
+ })
4620
4646
  }) : null,
4621
4647
  t.length > 0 ? /* @__PURE__ */ m("section", {
4622
4648
  className: $.apps,
4623
4649
  "aria-label": s,
4624
4650
  children: [/* @__PURE__ */ p("p", {
4625
- className: $.appsTitle,
4651
+ className: $.sectionTitle,
4626
4652
  children: s
4627
4653
  }), /* @__PURE__ */ p("div", {
4628
4654
  className: $.grid,
4629
4655
  children: t.map((e) => {
4630
- let t = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
4631
- className: g($.tile, Or[e.tone ?? "primary"]),
4632
- "aria-hidden": "true",
4633
- children: e.icon
4634
- }), /* @__PURE__ */ p("span", {
4635
- className: $.appName,
4636
- children: e.name
4637
- })] });
4656
+ let t = /* @__PURE__ */ m(f, { children: [
4657
+ /* @__PURE__ */ p("span", {
4658
+ className: g($.tile, Or[e.tone ?? "primary"]),
4659
+ "aria-hidden": "true",
4660
+ children: e.icon
4661
+ }),
4662
+ /* @__PURE__ */ p("span", {
4663
+ className: $.appName,
4664
+ children: e.name
4665
+ }),
4666
+ e.current ? /* @__PURE__ */ p("span", {
4667
+ className: $.currentDot,
4668
+ children: /* @__PURE__ */ p("span", {
4669
+ className: $.srOnly,
4670
+ children: "(current app)"
4671
+ })
4672
+ }) : /* @__PURE__ */ p(Ar, {})
4673
+ ] });
4638
4674
  return e.current ? /* @__PURE__ */ p("span", {
4639
4675
  className: $.contents,
4640
4676
  children: d({
4641
4677
  href: e.url,
4642
- className: $.app ?? "",
4678
+ className: g($.app, $.appIsCurrent),
4643
4679
  title: e.description,
4644
4680
  onClick: () => N(),
4645
4681
  children: t
@@ -4664,7 +4700,7 @@ function Ar({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
4664
4700
  className: $.dangerAction,
4665
4701
  onClick: () => R(e),
4666
4702
  children: [e.icon ? /* @__PURE__ */ p("span", {
4667
- className: $.actionIcon,
4703
+ className: $.dangerIcon,
4668
4704
  "aria-hidden": "true",
4669
4705
  children: e.icon
4670
4706
  }) : null, e.label]
@@ -4703,7 +4739,7 @@ function Ar({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
4703
4739
  }), C && T ? h(z, ue()) : null]
4704
4740
  });
4705
4741
  }
4706
- var jr = {
4742
+ var Mr = {
4707
4743
  root: "cui-Typography-module__root--PebSf",
4708
4744
  h1: "cui-Typography-module__h1--pJqnF",
4709
4745
  h2: "cui-Typography-module__h2--8YqGv",
@@ -4730,7 +4766,7 @@ var jr = {
4730
4766
  "align-center": "cui-Typography-module__align-center--2Ng2u",
4731
4767
  "align-end": "cui-Typography-module__align-end--6LwA3",
4732
4768
  truncate: "cui-Typography-module__truncate--3B0O4"
4733
- }, Mr = {
4769
+ }, Nr = {
4734
4770
  h1: "h1",
4735
4771
  h2: "h2",
4736
4772
  h3: "h3",
@@ -4739,29 +4775,29 @@ var jr = {
4739
4775
  "body-sm": "p",
4740
4776
  caption: "span",
4741
4777
  label: "span"
4742
- }, Nr = {
4743
- h1: jr.h1,
4744
- h2: jr.h2,
4745
- h3: jr.h3,
4746
- h4: jr.h4,
4747
- body: jr.body,
4748
- "body-sm": jr.bodySm,
4749
- caption: jr.caption,
4750
- label: jr.label
4778
+ }, Pr = {
4779
+ h1: Mr.h1,
4780
+ h2: Mr.h2,
4781
+ h3: Mr.h3,
4782
+ h4: Mr.h4,
4783
+ body: Mr.body,
4784
+ "body-sm": Mr.bodySm,
4785
+ caption: Mr.caption,
4786
+ label: Mr.label
4751
4787
  };
4752
- function Pr({ variant: e = "body", as: n, color: r = "default", weight: i, align: a, truncate: o = !1, className: s, ...c }) {
4753
- return O() ? t(n ?? Mr[e], {
4788
+ function Fr({ variant: e = "body", as: n, color: r = "default", weight: i, align: a, truncate: o = !1, className: s, ...c }) {
4789
+ return O() ? t(n ?? Nr[e], {
4754
4790
  ...c,
4755
- className: g(jr.root, Nr[e], jr[`color-${r}`], i && jr[`weight-${i}`], a && jr[`align-${a}`], o && jr.truncate, s)
4791
+ className: g(Mr.root, Pr[e], Mr[`color-${r}`], i && Mr[`weight-${i}`], a && Mr[`align-${a}`], o && Mr.truncate, s)
4756
4792
  }) : /* @__PURE__ */ p(A, {});
4757
4793
  }
4758
- var Fr = {
4794
+ var Ir = {
4759
4795
  root: "cui-ThemeToggle-module__root--k2-Go",
4760
4796
  option: "cui-ThemeToggle-module__option--CngnC",
4761
4797
  input: "cui-ThemeToggle-module__input--0nC-Q",
4762
4798
  face: "cui-ThemeToggle-module__face--jX0TD",
4763
4799
  icon: "cui-ThemeToggle-module__icon--N0Uj1"
4764
- }, Ir = {
4800
+ }, Lr = {
4765
4801
  light: /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("circle", {
4766
4802
  cx: "12",
4767
4803
  cy: "12",
@@ -4775,12 +4811,12 @@ var Fr = {
4775
4811
  height: "12",
4776
4812
  rx: "2"
4777
4813
  }), /* @__PURE__ */ p("path", { d: "M8 20h8M12 16v4" })] })
4778
- }, Lr = {
4814
+ }, Rr = {
4779
4815
  light: "Light",
4780
4816
  dark: "Dark",
4781
4817
  system: "System"
4782
4818
  };
4783
- function Rr({ modes: e = [
4819
+ function zr({ modes: e = [
4784
4820
  "light",
4785
4821
  "dark",
4786
4822
  "system"
@@ -4790,11 +4826,11 @@ function Rr({ modes: e = [
4790
4826
  ...i,
4791
4827
  role: "radiogroup",
4792
4828
  "aria-label": r,
4793
- className: g(Fr.root, n),
4829
+ className: g(Ir.root, n),
4794
4830
  children: e.map((e) => {
4795
- let n = Lr[e] ?? e;
4831
+ let n = Rr[e] ?? e;
4796
4832
  return /* @__PURE__ */ m("label", {
4797
- className: Fr.option,
4833
+ className: Ir.option,
4798
4834
  title: t ? n : void 0,
4799
4835
  children: [/* @__PURE__ */ p("input", {
4800
4836
  type: "radio",
@@ -4802,12 +4838,12 @@ function Rr({ modes: e = [
4802
4838
  value: e,
4803
4839
  checked: a === e,
4804
4840
  onChange: () => s(e),
4805
- className: Fr.input,
4841
+ className: Ir.input,
4806
4842
  "aria-label": t ? n : void 0
4807
4843
  }), /* @__PURE__ */ m("span", {
4808
- className: Fr.face,
4809
- children: [Ir[e] ? /* @__PURE__ */ p("svg", {
4810
- className: Fr.icon,
4844
+ className: Ir.face,
4845
+ children: [Lr[e] ? /* @__PURE__ */ p("svg", {
4846
+ className: Ir.icon,
4811
4847
  viewBox: "0 0 24 24",
4812
4848
  fill: "none",
4813
4849
  stroke: "currentColor",
@@ -4816,7 +4852,7 @@ function Rr({ modes: e = [
4816
4852
  strokeLinejoin: "round",
4817
4853
  "aria-hidden": "true",
4818
4854
  focusable: "false",
4819
- children: Ir[e]
4855
+ children: Lr[e]
4820
4856
  }) : null, t ? null : n]
4821
4857
  })]
4822
4858
  }, e);
@@ -4824,6 +4860,6 @@ function Rr({ modes: e = [
4824
4860
  }) : /* @__PURE__ */ p(A, {});
4825
4861
  }
4826
4862
  //#endregion
4827
- export { Ar as AccountPanel, Sr as Avatar, pr as Badge, M as Button, Lt as Checkbox, ft as ConfirmDialog, Tn as DataTable, ge as DatePicker, we as DateTimePicker, ut as Drawer, Ut as DropdownMenu, Wn as FileInput, I as FormField, _r as FormSection, Pe as Input, ct as Modal, Oe as MonthPicker, Mt as PageHeader, xt as Pagination, Ie as PasswordInput, Re as SearchInput, vt as Select, Kt as SelectionBar, Gt as Skeleton, Ft as StatusPill, dr as Switch, Ct as Table, Tt as TableBody, At as TableCaption, kt as TableCell, Et as TableFoot, wt as TableHead, Ot as TableHeaderCell, Dt as TableRow, hr as Tabs, lr as Textarea, qe as ThemeProvider, Rr as ThemeToggle, Pr as Typography, g as cn, En as formatFileSize, br as getInitials, yt as getPageItems, w as setLicenseKey, P as useFormFieldControl, Je as useTheme };
4863
+ export { jr as AccountPanel, Sr as Avatar, pr as Badge, M as Button, Lt as Checkbox, ft as ConfirmDialog, Tn as DataTable, ge as DatePicker, we as DateTimePicker, ut as Drawer, Ut as DropdownMenu, Wn as FileInput, I as FormField, _r as FormSection, Pe as Input, ct as Modal, Oe as MonthPicker, Mt as PageHeader, xt as Pagination, Ie as PasswordInput, Re as SearchInput, vt as Select, Kt as SelectionBar, Gt as Skeleton, Ft as StatusPill, dr as Switch, Ct as Table, Tt as TableBody, At as TableCaption, kt as TableCell, Et as TableFoot, wt as TableHead, Ot as TableHeaderCell, Dt as TableRow, hr as Tabs, lr as Textarea, qe as ThemeProvider, zr as ThemeToggle, Fr as Typography, g as cn, En as formatFileSize, br as getInitials, yt as getPageItems, w as setLicenseKey, P as useFormFieldControl, Je as useTheme };
4828
4864
 
4829
4865
  //# sourceMappingURL=index.js.map