@burdenoff/fe-libs 2026.1119.6 → 2026.1119.7
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/chrome/PersonaSurfaceControls.js +82 -189
- package/dist/chrome/PersonaViewsList.d.ts +28 -0
- package/dist/chrome/PersonaViewsList.js +139 -0
- package/dist/chrome/personaViewOptions.d.ts +8 -0
- package/dist/chrome/personaViewOptions.js +14 -0
- package/dist/chrome/shell/NewMenu.d.ts +13 -1
- package/dist/chrome/shell/NewMenu.js +27 -14
- package/dist/chrome/shell/SidebarProfileMenu.d.ts +36 -4
- package/dist/chrome/shell/SidebarProfileMenu.js +423 -331
- package/dist/chrome/shell/WorkspaceAccountCard.d.ts +22 -0
- package/dist/chrome/shell/WorkspaceAccountCard.js +102 -0
- package/dist/chrome/shell/pageHost.d.ts +19 -0
- package/dist/chrome/shell/pageHost.js +21 -0
- package/dist/chrome/shell/pageWidth.d.ts +39 -0
- package/dist/chrome/shell/pageWidth.js +18 -0
- package/dist/shared/backgrounds/BackgroundSettingsSection.d.ts +11 -0
- package/dist/shared/backgrounds/BackgroundSettingsSection.js +67 -0
- package/dist/shared/backgrounds/backgroundSectionLabels.d.ts +14 -0
- package/dist/shared/backgrounds/backgroundSectionLabels.js +36 -0
- package/dist/shared/backgrounds/index.d.ts +3 -0
- package/dist/shared/backgrounds/useStartPageBackground.d.ts +12 -0
- package/dist/shared/backgrounds/useStartPageBackground.js +23 -0
- package/dist/shared-backgrounds.js +4 -1
- package/package.json +5 -1
- package/src/shared/styles/page-widths.css +38 -0
- package/src/shared/tokens/build/brands/healthybowl.css +25 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
export interface WorkspaceAccountBranch {
|
|
3
|
+
/** Stable id; the item's test id is `all-tools-branch-<id>`. */
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon: ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface WorkspaceAccountCardProps {
|
|
13
|
+
/** The card's, the rail tooltip's and the menu's name (already translated). */
|
|
14
|
+
label: string;
|
|
15
|
+
branches: WorkspaceAccountBranch[];
|
|
16
|
+
/** The collapsed rail's icon button instead of the sidebar card. */
|
|
17
|
+
collapsed?: boolean;
|
|
18
|
+
/** Called before a branch's `onSelect` when collapsed: open the sidebar so its view shows. */
|
|
19
|
+
onExpandSidebar?: () => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function WorkspaceAccountCard({ label, branches, collapsed, onExpandSidebar, className, }: WorkspaceAccountCardProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { DropdownMenu as e, DropdownMenuContent as t, DropdownMenuItem as n, DropdownMenuTrigger as r } from "../../ui/dropdown-menu.js";
|
|
2
|
+
import { Tooltip as i, TooltipContent as a, TooltipTrigger as o } from "../../ui/tooltip.js";
|
|
3
|
+
import { MENU_SURFACE as s } from "./profileMenuClasses.js";
|
|
4
|
+
import { ShellRailTooltipLabel as c } from "./ShellSidebar.js";
|
|
5
|
+
import { ChevronRight as l, LayoutGrid as u } from "lucide-react";
|
|
6
|
+
import { clsx as d } from "clsx";
|
|
7
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
|
+
// src/chrome/shell/WorkspaceAccountCard.tsx
|
|
9
|
+
var m = "outline-none focus-visible:ring-2 focus-visible:ring-focus-ring";
|
|
10
|
+
function h({ label: h, branches: g, collapsed: _ = !1, onExpandSidebar: v, className: y }) {
|
|
11
|
+
let b = (e) => {
|
|
12
|
+
_ && v?.(), e.onSelect();
|
|
13
|
+
}, x = _ ? /* @__PURE__ */ p(i, {
|
|
14
|
+
delayDuration: 200,
|
|
15
|
+
children: [/* @__PURE__ */ f(o, {
|
|
16
|
+
asChild: !0,
|
|
17
|
+
children: /* @__PURE__ */ f(r, {
|
|
18
|
+
asChild: !0,
|
|
19
|
+
children: /* @__PURE__ */ f("button", {
|
|
20
|
+
type: "button",
|
|
21
|
+
"aria-label": h,
|
|
22
|
+
"data-testid": "rail-all-tools-trigger",
|
|
23
|
+
className: d("flex size-10 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary data-[state=open]:bg-bg-sunken", m, y),
|
|
24
|
+
children: /* @__PURE__ */ f(u, {
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
className: "size-4"
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
}), /* @__PURE__ */ f(a, {
|
|
31
|
+
side: "right",
|
|
32
|
+
sideOffset: 10,
|
|
33
|
+
className: "flex items-center gap-2 rounded-md border border-border-subtle bg-popover px-2 py-1 text-text-primary shadow-overlay",
|
|
34
|
+
children: /* @__PURE__ */ f(c, { label: h })
|
|
35
|
+
})]
|
|
36
|
+
}) : /* @__PURE__ */ f(r, {
|
|
37
|
+
asChild: !0,
|
|
38
|
+
children: /* @__PURE__ */ p("button", {
|
|
39
|
+
type: "button",
|
|
40
|
+
"data-testid": "sidebar-all-tools-trigger",
|
|
41
|
+
className: d("flex w-full min-w-0 items-center gap-2.5 rounded-card border border-border-default bg-text-primary/6 py-1.75 ps-1.75 pe-2 text-start text-text-primary transition-colors hover:border-border-strong hover:bg-text-primary/8 data-[state=open]:border-border-strong data-[state=open]:bg-text-primary/8", m, y),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ f("span", {
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
"data-testid": "sidebar-all-tools-icon",
|
|
46
|
+
className: "flex size-7 shrink-0 items-center justify-center rounded-button bg-accent-soft text-accent-primary",
|
|
47
|
+
children: /* @__PURE__ */ f(u, { className: "size-4" })
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ f("span", {
|
|
50
|
+
className: "line-clamp-2 min-w-0 flex-1 text-body-sm leading-tight",
|
|
51
|
+
children: h
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ f(l, {
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
className: "size-3.5 shrink-0 text-text-muted rtl:rotate-180"
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
return /* @__PURE__ */ p(e, {
|
|
61
|
+
modal: !1,
|
|
62
|
+
children: [x, /* @__PURE__ */ f(t, {
|
|
63
|
+
side: _ ? "right" : "top",
|
|
64
|
+
align: _ ? "end" : "start",
|
|
65
|
+
sideOffset: _ ? 6 : 8,
|
|
66
|
+
collisionPadding: 8,
|
|
67
|
+
"aria-label": h,
|
|
68
|
+
"data-testid": "all-tools-menu",
|
|
69
|
+
className: `${s} w-[290px]`,
|
|
70
|
+
children: g.map((e) => {
|
|
71
|
+
let t = e.icon;
|
|
72
|
+
return /* @__PURE__ */ p(n, {
|
|
73
|
+
onSelect: () => b(e),
|
|
74
|
+
"data-testid": `all-tools-branch-${e.id}`,
|
|
75
|
+
className: "items-start gap-3 rounded-button px-2.5 py-2 focus:bg-bg-sunken",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ f("span", {
|
|
78
|
+
"aria-hidden": "true",
|
|
79
|
+
className: "flex size-7 shrink-0 items-center justify-center rounded-button bg-accent-soft text-accent-primary",
|
|
80
|
+
children: /* @__PURE__ */ f(t, { className: "size-4" })
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ p("span", {
|
|
83
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
84
|
+
children: [/* @__PURE__ */ f("span", {
|
|
85
|
+
className: "text-body-sm font-semibold text-text-primary",
|
|
86
|
+
children: e.title
|
|
87
|
+
}), e.description ? /* @__PURE__ */ f("span", {
|
|
88
|
+
className: "text-xs text-text-muted",
|
|
89
|
+
children: e.description
|
|
90
|
+
}) : null]
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ f(l, {
|
|
93
|
+
"aria-hidden": "true",
|
|
94
|
+
className: "mt-1.5 size-4 shrink-0 text-text-muted rtl:rotate-180"
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}, e.id);
|
|
98
|
+
})
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
export { h as WorkspaceAccountCard };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/** The opt-in attribute on <html>, and its value. */
|
|
3
|
+
export declare const DEPTH_ATTRIBUTE = "data-depth";
|
|
4
|
+
export declare const DEPTH_RICH = "rich";
|
|
5
|
+
/** On the page box while its page rises in. */
|
|
6
|
+
export declare const PAGE_ENTER_ATTRIBUTE = "data-page-enter";
|
|
7
|
+
/**
|
|
8
|
+
* Sets `<html data-depth="rich">` while the calling shell is mounted. A layout effect, so the
|
|
9
|
+
* attribute is there before the shell's first paint.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useDepthOptIn(): void;
|
|
12
|
+
/** Restarts the box's rise-in: off, a reflow, then on again. */
|
|
13
|
+
export declare function replayPageEnter(box: HTMLElement): void;
|
|
14
|
+
/**
|
|
15
|
+
* The page box's ref. The box renders with `data-page-enter`, so the first page rises in; each
|
|
16
|
+
* later pathname replays the rise-in on the same box, in a layout effect, before the new page
|
|
17
|
+
* paints.
|
|
18
|
+
*/
|
|
19
|
+
export declare function usePageEnter(pathname: string): RefObject<HTMLDivElement | null>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useLayoutEffect as e, useRef as t } from "react";
|
|
2
|
+
// src/chrome/shell/pageHost.ts
|
|
3
|
+
var n = "data-depth", r = "rich", i = "data-page-enter";
|
|
4
|
+
function a() {
|
|
5
|
+
e(() => {
|
|
6
|
+
let e = document.documentElement;
|
|
7
|
+
return e.setAttribute(n, r), () => {
|
|
8
|
+
e.removeAttribute(n);
|
|
9
|
+
};
|
|
10
|
+
}, []);
|
|
11
|
+
}
|
|
12
|
+
function o(e) {
|
|
13
|
+
e.removeAttribute(i), e.getBoundingClientRect(), e.setAttribute(i, "");
|
|
14
|
+
}
|
|
15
|
+
function s(n) {
|
|
16
|
+
let r = t(null), i = t(n);
|
|
17
|
+
return e(() => {
|
|
18
|
+
i.current !== n && (i.current = n, r.current && o(r.current));
|
|
19
|
+
}, [n]), r;
|
|
20
|
+
}
|
|
21
|
+
export { n as DEPTH_ATTRIBUTE, r as DEPTH_RICH, i as PAGE_ENTER_ATTRIBUTE, o as replayPageEnter, a as useDepthOptIn, s as usePageEnter };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How wide each page may grow on a big screen (BOFF-15549, ported from FluidGrids' BOFF-14993).
|
|
3
|
+
*
|
|
4
|
+
* Opt-in. The shell's page box (the routed page's wrapper under the sticky top bar) carries
|
|
5
|
+
* `data-shell-page` and `data-page-width="<tier>"`, and `shared/styles/page-widths.css` caps and
|
|
6
|
+
* centres that box per tier, from a 112.5rem viewport:
|
|
7
|
+
*
|
|
8
|
+
* - `form`: forms, settings, single messages and reading pages, 1,200 px;
|
|
9
|
+
* - `standard`: lists, dashboards and detail pages, 1,600 px (the default);
|
|
10
|
+
* - `catalog`: card galleries, 1,840 px;
|
|
11
|
+
* - `tool`: tools that need the whole width, never capped. There is no `full` tier.
|
|
12
|
+
*
|
|
13
|
+
* Each product passes its own route table to `resolvePageWidthTier`; the first matching rule
|
|
14
|
+
* wins and an address no rule names is `standard`. Only the address decides, lower-cased as the
|
|
15
|
+
* router matches it: the ?query and #hash are dropped, so a page's tabs and filters never change
|
|
16
|
+
* its width, and so is a trailing "/".
|
|
17
|
+
*/
|
|
18
|
+
/** Every width tier, the values of the page box's `data-page-width`. `tool` is uncapped. */
|
|
19
|
+
export declare const PAGE_WIDTH_TIERS: readonly ["form", "standard", "catalog", "tool"];
|
|
20
|
+
/** A page's width tier; the value of the shell's `data-page-width`. */
|
|
21
|
+
export type PageWidthTier = (typeof PAGE_WIDTH_TIERS)[number];
|
|
22
|
+
/** One rule: an address pattern and the tier it gives. */
|
|
23
|
+
export type PageWidthRule = readonly [pattern: RegExp, tier: PageWidthTier];
|
|
24
|
+
/** A product's route table, in order (first match wins). */
|
|
25
|
+
export type PageWidthTable = ReadonlyArray<PageWidthRule>;
|
|
26
|
+
/** The tier of an address no rule names. */
|
|
27
|
+
export declare const DEFAULT_PAGE_WIDTH_TIER: PageWidthTier;
|
|
28
|
+
/**
|
|
29
|
+
* The address alone, lower-cased: no ?query or #hash, no trailing "/" (except on "/"). React
|
|
30
|
+
* Router matches paths case-insensitively, so /Workflows/New must get the same tier as
|
|
31
|
+
* /workflows/new.
|
|
32
|
+
*/
|
|
33
|
+
export declare function normalisePagePath(pathname: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* The width tier of the page at `pathname` in the product's `table`. A product that has
|
|
36
|
+
* shell-less routes (sign-in, public embeds) puts them in its table as `tool`, so the cap never
|
|
37
|
+
* touches them.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolvePageWidthTier(pathname: string, table: PageWidthTable): PageWidthTier;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/chrome/shell/pageWidth.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"form",
|
|
4
|
+
"standard",
|
|
5
|
+
"catalog",
|
|
6
|
+
"tool"
|
|
7
|
+
], t = "standard";
|
|
8
|
+
function n(e) {
|
|
9
|
+
let t = (e.split(/[?#]/)[0] ?? "").toLowerCase(), n = t.length;
|
|
10
|
+
for (; n > 0 && t[n - 1] === "/";) --n;
|
|
11
|
+
return n > 0 ? t.slice(0, n) : "/";
|
|
12
|
+
}
|
|
13
|
+
function r(e, r) {
|
|
14
|
+
let i = n(e);
|
|
15
|
+
for (let [e, t] of r) if (e.test(i)) return t;
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
export { t as DEFAULT_PAGE_WIDTH_TIER, e as PAGE_WIDTH_TIERS, n as normalisePagePath, r as resolvePageWidthTier };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BackgroundSectionLabels } from './backgroundSectionLabels';
|
|
2
|
+
import { BackgroundPreference } from './useBackgroundPreference';
|
|
3
|
+
export interface BackgroundSettingsSectionProps {
|
|
4
|
+
/** The keys' namespace; the same one `useStartPageBackground` reads. */
|
|
5
|
+
storageKey: string;
|
|
6
|
+
/** The product's own default (also what a reset returns to). Pass a module constant. */
|
|
7
|
+
defaults?: Partial<BackgroundPreference>;
|
|
8
|
+
/** Translated words; any missing group falls back to the English defaults. */
|
|
9
|
+
labels?: Partial<BackgroundSectionLabels>;
|
|
10
|
+
}
|
|
11
|
+
export declare function BackgroundSettingsSection({ storageKey, defaults, labels, }: BackgroundSettingsSectionProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Card as e, CardContent as t, CardDescription as n, CardHeader as r, CardTitle as i } from "../../ui/card.js";
|
|
2
|
+
import { resolveSectionLabels as a } from "./backgroundSectionLabels.js";
|
|
3
|
+
import { BackgroundOptionGroup as o, BackgroundPicker as s } from "./BackgroundPicker.js";
|
|
4
|
+
import { useBackgroundPreference as c } from "./useBackgroundPreference.js";
|
|
5
|
+
import { Sparkles as l } from "lucide-react";
|
|
6
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
// src/shared/backgrounds/BackgroundSettingsSection.tsx
|
|
8
|
+
function f({ storageKey: f, defaults: p, labels: m }) {
|
|
9
|
+
let h = a(m), g = c({
|
|
10
|
+
storageKey: f,
|
|
11
|
+
defaults: p
|
|
12
|
+
}), _ = Object.keys(h.colors).map((e) => ({
|
|
13
|
+
value: e,
|
|
14
|
+
label: h.colors[e]
|
|
15
|
+
})), v = Object.keys(h.strengths).map((e) => ({
|
|
16
|
+
value: e,
|
|
17
|
+
label: h.strengths[e]
|
|
18
|
+
})), y = g.effect === "none";
|
|
19
|
+
return /* @__PURE__ */ d(e, {
|
|
20
|
+
"data-testid": "appearance-background",
|
|
21
|
+
children: [/* @__PURE__ */ d(r, { children: [/* @__PURE__ */ d(i, {
|
|
22
|
+
className: "flex items-center gap-2",
|
|
23
|
+
children: [/* @__PURE__ */ u(l, {
|
|
24
|
+
className: "size-4 text-text-secondary",
|
|
25
|
+
"aria-hidden": "true"
|
|
26
|
+
}), h.title]
|
|
27
|
+
}), /* @__PURE__ */ u(n, { children: h.description })] }), /* @__PURE__ */ d(t, {
|
|
28
|
+
className: "flex flex-col gap-6",
|
|
29
|
+
children: [/* @__PURE__ */ u(s, {
|
|
30
|
+
value: g.effect,
|
|
31
|
+
onChange: g.setEffect,
|
|
32
|
+
label: h.title,
|
|
33
|
+
labels: h.effects,
|
|
34
|
+
colors: g.colors,
|
|
35
|
+
strength: g.strength
|
|
36
|
+
}), /* @__PURE__ */ d("div", {
|
|
37
|
+
className: "flex flex-col gap-6 sm:flex-row sm:flex-wrap",
|
|
38
|
+
children: [/* @__PURE__ */ d("div", {
|
|
39
|
+
className: "flex flex-col gap-2",
|
|
40
|
+
children: [/* @__PURE__ */ u("span", {
|
|
41
|
+
className: "text-sm font-medium text-text-primary",
|
|
42
|
+
children: h.colorsLabel
|
|
43
|
+
}), /* @__PURE__ */ u(o, {
|
|
44
|
+
value: g.colors,
|
|
45
|
+
onChange: g.setColors,
|
|
46
|
+
label: h.colorsLabel,
|
|
47
|
+
options: _,
|
|
48
|
+
className: y ? "opacity-60" : void 0
|
|
49
|
+
})]
|
|
50
|
+
}), /* @__PURE__ */ d("div", {
|
|
51
|
+
className: "flex flex-col gap-2",
|
|
52
|
+
children: [/* @__PURE__ */ u("span", {
|
|
53
|
+
className: "text-sm font-medium text-text-primary",
|
|
54
|
+
children: h.strengthLabel
|
|
55
|
+
}), /* @__PURE__ */ u(o, {
|
|
56
|
+
value: g.strength,
|
|
57
|
+
onChange: g.setStrength,
|
|
58
|
+
label: h.strengthLabel,
|
|
59
|
+
options: v,
|
|
60
|
+
className: y ? "opacity-60" : void 0
|
|
61
|
+
})]
|
|
62
|
+
})]
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
export { f as BackgroundSettingsSection };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BackgroundColorMode, BackgroundEffectName, BackgroundStrength } from './backgroundTypes';
|
|
2
|
+
/** Every word the section shows. */
|
|
3
|
+
export interface BackgroundSectionLabels {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
colorsLabel: string;
|
|
7
|
+
strengthLabel: string;
|
|
8
|
+
effects: Record<BackgroundEffectName, string>;
|
|
9
|
+
colors: Record<BackgroundColorMode, string>;
|
|
10
|
+
strengths: Record<BackgroundStrength, string>;
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_BACKGROUND_SECTION_LABELS: Readonly<BackgroundSectionLabels>;
|
|
13
|
+
/** The labels with every missing field (and every explicit `undefined`) filled from the defaults. */
|
|
14
|
+
export declare function resolveSectionLabels(labels: Partial<BackgroundSectionLabels> | undefined): BackgroundSectionLabels;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/shared/backgrounds/backgroundSectionLabels.ts
|
|
2
|
+
var e = {
|
|
3
|
+
title: "Background",
|
|
4
|
+
description: "An animated background behind the Assistant start page. Kept on this device.",
|
|
5
|
+
colorsLabel: "Color",
|
|
6
|
+
strengthLabel: "Strength",
|
|
7
|
+
effects: {
|
|
8
|
+
none: "None",
|
|
9
|
+
"dotted-waves": "Dotted waves",
|
|
10
|
+
glimmer: "Glimmer",
|
|
11
|
+
"cursor-wave": "Cursor wave"
|
|
12
|
+
},
|
|
13
|
+
colors: {
|
|
14
|
+
accent: "Accent",
|
|
15
|
+
original: "Original",
|
|
16
|
+
mono: "Mono"
|
|
17
|
+
},
|
|
18
|
+
strengths: {
|
|
19
|
+
subtle: "Subtle",
|
|
20
|
+
medium: "Medium",
|
|
21
|
+
bold: "Bold"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function t(t) {
|
|
25
|
+
let n = e;
|
|
26
|
+
return {
|
|
27
|
+
title: t?.title ?? n.title,
|
|
28
|
+
description: t?.description ?? n.description,
|
|
29
|
+
colorsLabel: t?.colorsLabel ?? n.colorsLabel,
|
|
30
|
+
strengthLabel: t?.strengthLabel ?? n.strengthLabel,
|
|
31
|
+
effects: t?.effects ?? n.effects,
|
|
32
|
+
colors: t?.colors ?? n.colors,
|
|
33
|
+
strengths: t?.strengths ?? n.strengths
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export { e as DEFAULT_BACKGROUND_SECTION_LABELS, t as resolveSectionLabels };
|
|
@@ -29,3 +29,6 @@ export { GLIMMER_DEFAULTS, type GlimmerDirection, type GlimmerParams } from './g
|
|
|
29
29
|
export { CURSOR_WAVE_DEFAULTS, type CursorWaveColor, type CursorWaveParams, type CursorWaveShape, } from './cursorWaveRenderer';
|
|
30
30
|
export { canvasScale, type CanvasFrame, type CanvasRenderer } from './canvasEffect';
|
|
31
31
|
export type { Rgba } from './color';
|
|
32
|
+
export { BackgroundSettingsSection, type BackgroundSettingsSectionProps, } from './BackgroundSettingsSection';
|
|
33
|
+
export { DEFAULT_BACKGROUND_SECTION_LABELS, type BackgroundSectionLabels, } from './backgroundSectionLabels';
|
|
34
|
+
export { useStartPageBackground, type StartPageBackground } from './useStartPageBackground';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UseBackgroundPreferenceOptions } from './useBackgroundPreference';
|
|
3
|
+
export interface StartPageBackground {
|
|
4
|
+
/** The background, or `null` for None (the page keeps its shape either way). */
|
|
5
|
+
background: ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* The ground it comes with: the original colours' black in the dark theme and white in the
|
|
8
|
+
* light theme; `null` for the accent and greys, which draw over the product's own canvas.
|
|
9
|
+
*/
|
|
10
|
+
backgroundGround: string | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function useStartPageBackground({ storageKey, defaults, }?: UseBackgroundPreferenceOptions): StartPageBackground;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useBackgroundGround as e } from "./backgroundGround.js";
|
|
2
|
+
import { BackgroundEffect as t } from "./BackgroundEffect.js";
|
|
3
|
+
import { useBackgroundPreference as n } from "./useBackgroundPreference.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/shared/backgrounds/useStartPageBackground.tsx
|
|
6
|
+
function i({ storageKey: i, defaults: a } = {}) {
|
|
7
|
+
let { effect: o, colors: s, strength: c } = n({
|
|
8
|
+
storageKey: i,
|
|
9
|
+
defaults: a
|
|
10
|
+
}), l = e(o, s);
|
|
11
|
+
return o === "none" ? {
|
|
12
|
+
background: null,
|
|
13
|
+
backgroundGround: null
|
|
14
|
+
} : {
|
|
15
|
+
background: /* @__PURE__ */ r(t, {
|
|
16
|
+
effect: o,
|
|
17
|
+
colors: s,
|
|
18
|
+
strength: c
|
|
19
|
+
}),
|
|
20
|
+
backgroundGround: l
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export { i as useStartPageBackground };
|
|
@@ -13,4 +13,7 @@ import { DOTTED_WAVES_DEFAULTS as N } from "./shared/backgrounds/dottedWavesRend
|
|
|
13
13
|
import { GLIMMER_DEFAULTS as P } from "./shared/backgrounds/glimmerRenderer.js";
|
|
14
14
|
import { CURSOR_WAVE_DEFAULTS as F } from "./shared/backgrounds/cursorWaveRenderer.js";
|
|
15
15
|
import { canvasScale as I } from "./shared/backgrounds/canvasEffect.js";
|
|
16
|
-
|
|
16
|
+
import { BackgroundSettingsSection as L } from "./shared/backgrounds/BackgroundSettingsSection.js";
|
|
17
|
+
import { DEFAULT_BACKGROUND_SECTION_LABELS as R } from "./shared/backgrounds/backgroundSectionLabels.js";
|
|
18
|
+
import { useStartPageBackground as z } from "./shared/backgrounds/useStartPageBackground.js";
|
|
19
|
+
export { e as BACKGROUND_COLOR_MODES, t as BACKGROUND_EFFECTS, n as BACKGROUND_MAX_PIXEL_RATIO, S as BACKGROUND_PREFERENCE_KEY, r as BACKGROUND_STRENGTHS, i as BACKGROUND_STRENGTH_OPACITY, u as BackgroundEffect, d as BackgroundOptionGroup, f as BackgroundPicker, L as BackgroundSettingsSection, E as CURSOR_WAVE_BACKGROUND, D as CURSOR_WAVE_COLORS, F as CURSOR_WAVE_DEFAULTS, c as CursorWave, C as DEFAULT_BACKGROUND_PREFERENCE, R as DEFAULT_BACKGROUND_SECTION_LABELS, O as DOTTED_WAVES_BACKGROUND, k as DOTTED_WAVES_COLORS, N as DOTTED_WAVES_DEFAULTS, a as DOTTED_WAVES_STILL_TIME, o as DottedWaves, A as GLIMMER_BACKGROUND, j as GLIMMER_COLORS, P as GLIMMER_DEFAULTS, s as Glimmer, M as ORIGINAL_LIGHT_BACKGROUND, b as backgroundGround, m as backgroundPalette, I as canvasScale, l as explicitPool, w as readBackgroundPreference, h as readBackgroundTheme, g as subscribeBackgroundTheme, _ as turnHue, v as useBackgroundColors, x as useBackgroundGround, T as useBackgroundPreference, y as useBackgroundTheme, p as useRovingRadio, z as useStartPageBackground };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/fe-libs",
|
|
3
|
-
"version": "2026.1119.
|
|
3
|
+
"version": "2026.1119.7",
|
|
4
4
|
"description": "Burdenoff frontend primitives and domain libraries",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -291,6 +291,10 @@
|
|
|
291
291
|
"style": "./src/shared/styles/depth-theme.css",
|
|
292
292
|
"default": "./src/shared/styles/depth-theme.css"
|
|
293
293
|
},
|
|
294
|
+
"./shared/styles/page-widths.css": {
|
|
295
|
+
"style": "./src/shared/styles/page-widths.css",
|
|
296
|
+
"default": "./src/shared/styles/page-widths.css"
|
|
297
|
+
},
|
|
294
298
|
"./shared/utils/lazyWithRetry": {
|
|
295
299
|
"types": "./dist/shared/utils/lazyWithRetry.d.ts",
|
|
296
300
|
"import": "./dist/shared/utils/lazyWithRetry.js"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* BOFF-15549: page width tiers on big screens (ported from FluidGrids' BOFF-14993).
|
|
2
|
+
*
|
|
3
|
+
* Opt-in and inert unless a host sets the page box's hooks: every selector starts with
|
|
4
|
+
* [data-shell-page][data-page-width], so nothing here can match <html> or :root, and a product
|
|
5
|
+
* that never sets them only downloads these rules. The box is the shell's routed-page wrapper
|
|
6
|
+
* under the sticky top bar (chrome/shell/pageWidth.ts picks its tier).
|
|
7
|
+
*
|
|
8
|
+
* Big screens only: the caps apply from a 112.5rem (1,800 px) viewport (a media query's rem is
|
|
9
|
+
* the browser's 16 px whatever the page's font size), so a laptop looks exactly as before and
|
|
10
|
+
* below that width no rule here touches the box.
|
|
11
|
+
*
|
|
12
|
+
* The caps are CONTENT widths: form 1,200 px, standard 1,600 px, catalog 1,840 px; a tool is
|
|
13
|
+
* never capped. Pages pad themselves with p-6 (--spacing-6, 24 px), so the box is capped at
|
|
14
|
+
* cap + 2 x 24 px. The padding token is --spacing-6, not --space-pagePadding (16 px in the
|
|
15
|
+
* compact density). The tool tier is left out of the sizing rule. The box is a flex item of the
|
|
16
|
+
* shell's column: auto inline margins centre it once a cap binds, and they stop the column
|
|
17
|
+
* stretching it, so it also takes an explicit full width. An unknown tier leaves --page-max
|
|
18
|
+
* unset, which makes the max-width invalid: no cap.
|
|
19
|
+
*
|
|
20
|
+
* Import it unlayered, next to tokens.css:
|
|
21
|
+
* @import '@burdenoff/fe-libs/shared/styles/page-widths.css';
|
|
22
|
+
*/
|
|
23
|
+
@media (min-width: 112.5rem) {
|
|
24
|
+
[data-shell-page][data-page-width]:not([data-page-width='tool']) {
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: calc(var(--page-max) + 2 * var(--spacing-6));
|
|
27
|
+
margin-inline: auto;
|
|
28
|
+
}
|
|
29
|
+
[data-shell-page][data-page-width='form'] {
|
|
30
|
+
--page-max: 1200px;
|
|
31
|
+
}
|
|
32
|
+
[data-shell-page][data-page-width='standard'] {
|
|
33
|
+
--page-max: 1600px;
|
|
34
|
+
}
|
|
35
|
+
[data-shell-page][data-page-width='catalog'] {
|
|
36
|
+
--page-max: 1840px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,6 +1,28 @@
|
|
|
1
|
-
/* HealthyBowl brand overrides -
|
|
1
|
+
/* HealthyBowl brand overrides (BOFF-15549, decisions D4 and D6)
|
|
2
|
+
*
|
|
3
|
+
* This file is the token source: there is no generator for the brand files in this repo (the
|
|
4
|
+
* old "auto-generated" header was stale), so edit it here. WCAG 2.1 AA (1.4.3):
|
|
5
|
+
* - light: green-700 #15803D carries a white label at 5.02:1; hover and pressed step darker
|
|
6
|
+
* (#166534, #14532D) so the white label only gains contrast.
|
|
7
|
+
* - dark: green-600 #16A34A carries a dark label (#0A0E16, 5.86:1); hover and pressed step
|
|
8
|
+
* LIGHTER (#22C55E, #4ADE80) so the dark label keeps its contrast in every state.
|
|
9
|
+
* - depth glow (opt-in layer, shared/tokens/depth.css): a green glow with a teal partner,
|
|
10
|
+
* both at least 3:1 on the canvas and on a card (shared/utils/healthybowlBrand.test.ts).
|
|
11
|
+
*/
|
|
2
12
|
[data-brand="healthybowl"] {
|
|
13
|
+
--color-action-primary-bg: #15803D;
|
|
14
|
+
--color-action-primary-bgHover: #166534;
|
|
15
|
+
--color-action-primary-bgActive: #14532D;
|
|
16
|
+
--color-accent-glow: #15803D;
|
|
17
|
+
--color-accent-glow-alt: #0F766E;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:root.dark[data-brand="healthybowl"],
|
|
21
|
+
[data-brand="healthybowl"].dark {
|
|
3
22
|
--color-action-primary-bg: #16A34A;
|
|
4
|
-
--color-action-primary-bgHover: #
|
|
5
|
-
--color-action-primary-bgActive: #
|
|
23
|
+
--color-action-primary-bgHover: #22C55E;
|
|
24
|
+
--color-action-primary-bgActive: #4ADE80;
|
|
25
|
+
--color-action-primary-text: #0A0E16;
|
|
26
|
+
--color-accent-glow: #4ADE80;
|
|
27
|
+
--color-accent-glow-alt: #2DD4BF;
|
|
6
28
|
}
|