@bizapps/ui 1.12.2 → 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/editor.cjs +1 -1
- package/dist/editor.cjs.map +1 -1
- package/dist/editor.js +1 -1
- package/dist/editor.js.map +1 -1
- package/dist/main.cjs +27 -14
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.cts +2 -2
- package/dist/main.d.ts +2 -2
- package/dist/main.js +27 -14
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
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
|
@@ -2690,7 +2690,7 @@ function DialogTitle({ className, ...props }) {
|
|
|
2690
2690
|
Dialog$1.Title,
|
|
2691
2691
|
{
|
|
2692
2692
|
"data-slot": "dialog-title",
|
|
2693
|
-
className: cn("font-heading text-lg leading-none font-bold", className),
|
|
2693
|
+
className: cn("font-heading text-lg leading-none font-bold wrap-anywhere", className),
|
|
2694
2694
|
...props
|
|
2695
2695
|
}
|
|
2696
2696
|
);
|
|
@@ -2704,7 +2704,7 @@ function DialogDescription({
|
|
|
2704
2704
|
{
|
|
2705
2705
|
"data-slot": "dialog-description",
|
|
2706
2706
|
className: cn(
|
|
2707
|
-
"text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",
|
|
2707
|
+
"text-muted-foreground *:[a]:hover:text-foreground text-sm wrap-anywhere *:[a]:underline *:[a]:underline-offset-3",
|
|
2708
2708
|
className
|
|
2709
2709
|
),
|
|
2710
2710
|
...props
|
|
@@ -2871,7 +2871,7 @@ function AlertDialogTitle({
|
|
|
2871
2871
|
AlertDialog$1.Title,
|
|
2872
2872
|
{
|
|
2873
2873
|
"data-slot": "alert-dialog-title",
|
|
2874
|
-
className: cn("font-heading text-lg font-bold", className),
|
|
2874
|
+
className: cn("font-heading text-lg font-bold wrap-anywhere", className),
|
|
2875
2875
|
...props
|
|
2876
2876
|
}
|
|
2877
2877
|
);
|
|
@@ -2885,7 +2885,7 @@ function AlertDialogDescription({
|
|
|
2885
2885
|
{
|
|
2886
2886
|
"data-slot": "alert-dialog-description",
|
|
2887
2887
|
className: cn(
|
|
2888
|
-
"text-muted-foreground *:[a]:hover:text-foreground text-xs text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",
|
|
2888
|
+
"text-muted-foreground *:[a]:hover:text-foreground text-xs text-balance wrap-anywhere md:text-pretty *:[a]:underline *:[a]:underline-offset-3",
|
|
2889
2889
|
className
|
|
2890
2890
|
),
|
|
2891
2891
|
...props
|
|
@@ -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
|
|
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:
|
|
10728
|
+
tone: getAppHubTone(app),
|
|
10716
10729
|
size: variant === "panel" ? "row" : "sheet"
|
|
10717
10730
|
}),
|
|
10718
10731
|
children: app.icon
|