@bizapps/ui 1.12.3 → 1.13.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/main.cjs CHANGED
@@ -10592,16 +10592,29 @@ function filterApps(apps, query) {
10592
10592
  (app) => `${app.label} ${app.description ?? ""}`.toLowerCase().includes(needle)
10593
10593
  );
10594
10594
  }
10595
+ var toneClasses = {
10596
+ green: "bg-green-100 text-green-800",
10597
+ yellow: "bg-yellow-200 text-yellow-800",
10598
+ navy: "bg-main-blue-primary/10 text-main-blue-primary",
10599
+ orange: "bg-orange-100 text-orange-800",
10600
+ purple: "bg-purple-100 text-purple-600",
10601
+ grey: "bg-light-200 text-main-grey",
10602
+ // Remaining apps catalogue colours, with the catalogue's own tile and ink pairs.
10603
+ // They have no DS scale, so they resolve to the Tailwind default palette.
10604
+ sky: "bg-sky-100 text-sky-600",
10605
+ rose: "bg-rose-100 text-rose-600",
10606
+ teal: "bg-teal-100 text-teal-600",
10607
+ indigo: "bg-indigo-100 text-indigo-600",
10608
+ slate: "bg-slate-100 text-slate-500",
10609
+ fuchsia: "bg-fuchsia-100 text-fuchsia-600"
10610
+ };
10611
+ function getAppHubTone(app) {
10612
+ if (app.locked || app.tone === void 0 || !Object.hasOwn(toneClasses, app.tone)) return "grey";
10613
+ return app.tone;
10614
+ }
10595
10615
  var appHubIconVariants = classVarianceAuthority.cva("relative flex shrink-0 items-center justify-center", {
10596
10616
  variants: {
10597
- tone: {
10598
- green: "bg-green-100 text-green-800",
10599
- yellow: "bg-yellow-200 text-yellow-800",
10600
- navy: "bg-main-blue-primary/10 text-main-blue-primary",
10601
- orange: "bg-orange-100 text-orange-800",
10602
- purple: "bg-purple-100 text-purple-600",
10603
- grey: "bg-light-200 text-main-grey"
10604
- },
10617
+ tone: toneClasses,
10605
10618
  size: {
10606
10619
  tile: "size-12 rounded-2xl [&_svg]:size-5",
10607
10620
  row: "size-9 rounded-xl [&_svg]:size-4.5",
@@ -10650,7 +10663,7 @@ function AppHubCounter({ count, className }) {
10650
10663
  function AppHubTile({ app, current = false }) {
10651
10664
  const { labels, appName } = useAppHubContext();
10652
10665
  const name = getAppAccessibleName(app, labels, appName);
10653
- const tone = app.tone ?? "grey";
10666
+ const tone = getAppHubTone(app);
10654
10667
  return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
10655
10668
  /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, "aria-describedby": void 0, children: /* @__PURE__ */ jsxRuntime.jsxs(
10656
10669
  AppHubLink,
@@ -10738,7 +10751,7 @@ function AppHubRow({
10738
10751
  {
10739
10752
  "aria-hidden": "true",
10740
10753
  className: appHubIconVariants({
10741
- tone: locked ? "grey" : app.tone ?? "grey",
10754
+ tone: getAppHubTone(app),
10742
10755
  size: variant === "panel" ? "row" : "sheet"
10743
10756
  }),
10744
10757
  children: app.icon