@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.d.cts CHANGED
@@ -2526,7 +2526,7 @@ interface FloatingSidebarProps extends Omit<ComponentProps<'nav'>, 'children'> {
2526
2526
  */
2527
2527
  declare function FloatingSidebar({ modules, resolveIcon, renderLink, open: openProp, defaultOpen, onOpenChange, side, width, collapsedWidth, type, openModuleIds: openModulesProp, defaultOpenModuleIds, onOpenModulesChange, hideEmptyModules, activeItemId: activeItemProp, defaultActiveItemId, onItemSelect, favoriteIds: favoritesProp, defaultFavoriteIds, onFavoritesChange, showFavorites, loading, emptyState, mobileOpen: mobileOpenProp, defaultMobileOpen, onMobileOpenChange, shortcut, labels: labelsProp, className, ref, style, onPointerDownCapture, onFocusCapture, ...navProps }: FloatingSidebarProps): react.JSX.Element;
2528
2528
 
2529
- type AppHubTone = 'green' | 'yellow' | 'navy' | 'orange' | 'purple' | 'grey';
2529
+ type AppHubTone = 'green' | 'yellow' | 'navy' | 'orange' | 'purple' | 'grey' | 'sky' | 'rose' | 'teal' | 'indigo' | 'slate' | 'fuchsia';
2530
2530
  interface AppHubApp {
2531
2531
  /** Unique id; used as the React key and matched against `currentAppId`. */
2532
2532
  id: string;
@@ -2538,7 +2538,7 @@ interface AppHubApp {
2538
2538
  description?: string;
2539
2539
  /** Group heading. Ungrouped apps form a first, heading-less section. */
2540
2540
  group?: string;
2541
- /** Icon tone. Defaults to `'grey'`; locked apps always use grey. */
2541
+ /** Icon tone. Defaults to `'grey'`; locked apps and unknown values always use grey. */
2542
2542
  tone?: AppHubTone;
2543
2543
  /** Shows the app in the rail. Defaults to `false`; keep it to 6 or fewer. */
2544
2544
  inRail?: boolean;
package/dist/main.d.ts CHANGED
@@ -2526,7 +2526,7 @@ interface FloatingSidebarProps extends Omit<ComponentProps<'nav'>, 'children'> {
2526
2526
  */
2527
2527
  declare function FloatingSidebar({ modules, resolveIcon, renderLink, open: openProp, defaultOpen, onOpenChange, side, width, collapsedWidth, type, openModuleIds: openModulesProp, defaultOpenModuleIds, onOpenModulesChange, hideEmptyModules, activeItemId: activeItemProp, defaultActiveItemId, onItemSelect, favoriteIds: favoritesProp, defaultFavoriteIds, onFavoritesChange, showFavorites, loading, emptyState, mobileOpen: mobileOpenProp, defaultMobileOpen, onMobileOpenChange, shortcut, labels: labelsProp, className, ref, style, onPointerDownCapture, onFocusCapture, ...navProps }: FloatingSidebarProps): react.JSX.Element;
2528
2528
 
2529
- type AppHubTone = 'green' | 'yellow' | 'navy' | 'orange' | 'purple' | 'grey';
2529
+ type AppHubTone = 'green' | 'yellow' | 'navy' | 'orange' | 'purple' | 'grey' | 'sky' | 'rose' | 'teal' | 'indigo' | 'slate' | 'fuchsia';
2530
2530
  interface AppHubApp {
2531
2531
  /** Unique id; used as the React key and matched against `currentAppId`. */
2532
2532
  id: string;
@@ -2538,7 +2538,7 @@ interface AppHubApp {
2538
2538
  description?: string;
2539
2539
  /** Group heading. Ungrouped apps form a first, heading-less section. */
2540
2540
  group?: string;
2541
- /** Icon tone. Defaults to `'grey'`; locked apps always use grey. */
2541
+ /** Icon tone. Defaults to `'grey'`; locked apps and unknown values always use grey. */
2542
2542
  tone?: AppHubTone;
2543
2543
  /** Shows the app in the rail. Defaults to `false`; keep it to 6 or fewer. */
2544
2544
  inRail?: boolean;
package/dist/main.js CHANGED
@@ -10566,16 +10566,29 @@ function filterApps(apps, query) {
10566
10566
  (app) => `${app.label} ${app.description ?? ""}`.toLowerCase().includes(needle)
10567
10567
  );
10568
10568
  }
10569
+ var toneClasses = {
10570
+ green: "bg-green-100 text-green-800",
10571
+ yellow: "bg-yellow-200 text-yellow-800",
10572
+ navy: "bg-main-blue-primary/10 text-main-blue-primary",
10573
+ orange: "bg-orange-100 text-orange-800",
10574
+ purple: "bg-purple-100 text-purple-600",
10575
+ grey: "bg-light-200 text-main-grey",
10576
+ // Remaining apps catalogue colours, with the catalogue's own tile and ink pairs.
10577
+ // They have no DS scale, so they resolve to the Tailwind default palette.
10578
+ sky: "bg-sky-100 text-sky-600",
10579
+ rose: "bg-rose-100 text-rose-600",
10580
+ teal: "bg-teal-100 text-teal-600",
10581
+ indigo: "bg-indigo-100 text-indigo-600",
10582
+ slate: "bg-slate-100 text-slate-500",
10583
+ fuchsia: "bg-fuchsia-100 text-fuchsia-600"
10584
+ };
10585
+ function getAppHubTone(app) {
10586
+ if (app.locked || app.tone === void 0 || !Object.hasOwn(toneClasses, app.tone)) return "grey";
10587
+ return app.tone;
10588
+ }
10569
10589
  var appHubIconVariants = cva("relative flex shrink-0 items-center justify-center", {
10570
10590
  variants: {
10571
- tone: {
10572
- green: "bg-green-100 text-green-800",
10573
- yellow: "bg-yellow-200 text-yellow-800",
10574
- navy: "bg-main-blue-primary/10 text-main-blue-primary",
10575
- orange: "bg-orange-100 text-orange-800",
10576
- purple: "bg-purple-100 text-purple-600",
10577
- grey: "bg-light-200 text-main-grey"
10578
- },
10591
+ tone: toneClasses,
10579
10592
  size: {
10580
10593
  tile: "size-12 rounded-2xl [&_svg]:size-5",
10581
10594
  row: "size-9 rounded-xl [&_svg]:size-4.5",
@@ -10624,7 +10637,7 @@ function AppHubCounter({ count, className }) {
10624
10637
  function AppHubTile({ app, current = false }) {
10625
10638
  const { labels, appName } = useAppHubContext();
10626
10639
  const name = getAppAccessibleName(app, labels, appName);
10627
- const tone = app.tone ?? "grey";
10640
+ const tone = getAppHubTone(app);
10628
10641
  return /* @__PURE__ */ jsxs(Tooltip, { children: [
10629
10642
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, "aria-describedby": void 0, children: /* @__PURE__ */ jsxs(
10630
10643
  AppHubLink,
@@ -10712,7 +10725,7 @@ function AppHubRow({
10712
10725
  {
10713
10726
  "aria-hidden": "true",
10714
10727
  className: appHubIconVariants({
10715
- tone: locked ? "grey" : app.tone ?? "grey",
10728
+ tone: getAppHubTone(app),
10716
10729
  size: variant === "panel" ? "row" : "sheet"
10717
10730
  }),
10718
10731
  children: app.icon