@burdenoff/fe-libs 2026.1119.5 → 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.
Files changed (94) hide show
  1. package/dist/chrome/HeaderThemeSwitcher.js +1 -1
  2. package/dist/chrome/PersonaSurfaceControls.js +82 -189
  3. package/dist/chrome/PersonaViewsList.d.ts +28 -0
  4. package/dist/chrome/PersonaViewsList.js +139 -0
  5. package/dist/chrome/ThemePreferences.js +16 -16
  6. package/dist/chrome/appearance/AppearanceColourSection.d.ts +17 -0
  7. package/dist/chrome/appearance/AppearanceColourSection.js +337 -0
  8. package/dist/chrome/appearance/AppearanceDisplaySection.d.ts +7 -0
  9. package/dist/chrome/appearance/AppearanceDisplaySection.js +137 -0
  10. package/dist/chrome/appearance/AppearanceModeDepth.d.ts +11 -0
  11. package/dist/chrome/appearance/AppearanceModeDepth.js +158 -0
  12. package/dist/chrome/appearance/AppearancePreferences.d.ts +13 -0
  13. package/dist/chrome/appearance/AppearancePreferences.js +308 -0
  14. package/dist/chrome/appearance/AppearancePreview.d.ts +23 -0
  15. package/dist/chrome/appearance/AppearancePreview.js +218 -0
  16. package/dist/chrome/appearance/AppearanceThemeSection.d.ts +14 -0
  17. package/dist/chrome/appearance/AppearanceThemeSection.js +162 -0
  18. package/dist/chrome/appearance/ColourPanel.d.ts +37 -0
  19. package/dist/chrome/appearance/ColourPanel.js +264 -0
  20. package/dist/chrome/appearance/ThemeDialog.d.ts +21 -0
  21. package/dist/chrome/appearance/ThemeDialog.js +378 -0
  22. package/dist/chrome/appearance/appearanceShared.d.ts +24 -0
  23. package/dist/chrome/appearance/appearanceShared.js +46 -0
  24. package/dist/chrome/appearance/appearanceUi.d.ts +49 -0
  25. package/dist/chrome/appearance/appearanceUi.js +98 -0
  26. package/dist/chrome/appearance/useAppearanceLabels.d.ts +181 -0
  27. package/dist/chrome/appearance/useAppearanceLabels.js +259 -0
  28. package/dist/chrome/index.d.ts +1 -0
  29. package/dist/chrome/personaViewOptions.d.ts +8 -0
  30. package/dist/chrome/personaViewOptions.js +14 -0
  31. package/dist/chrome/shell/NewMenu.d.ts +13 -1
  32. package/dist/chrome/shell/NewMenu.js +27 -14
  33. package/dist/chrome/shell/ShellSidebar.js +2 -0
  34. package/dist/chrome/shell/SidebarProfileMenu.d.ts +36 -4
  35. package/dist/chrome/shell/SidebarProfileMenu.js +423 -331
  36. package/dist/chrome/shell/WorkspaceAccountCard.d.ts +22 -0
  37. package/dist/chrome/shell/WorkspaceAccountCard.js +102 -0
  38. package/dist/chrome/shell/pageHost.d.ts +19 -0
  39. package/dist/chrome/shell/pageHost.js +21 -0
  40. package/dist/chrome/shell/pageWidth.d.ts +39 -0
  41. package/dist/chrome/shell/pageWidth.js +18 -0
  42. package/dist/chrome/shellLabelManifest.d.ts +6 -0
  43. package/dist/chrome.js +26 -25
  44. package/dist/platform-pages/AppearanceSettingsPage.d.ts +11 -1
  45. package/dist/platform-pages/AppearanceSettingsPage.js +15 -8
  46. package/dist/shared/assistant/ui/composer/AssistantComposer.js +346 -345
  47. package/dist/shared/backgrounds/BackgroundSettingsSection.d.ts +11 -0
  48. package/dist/shared/backgrounds/BackgroundSettingsSection.js +67 -0
  49. package/dist/shared/backgrounds/backgroundSectionLabels.d.ts +14 -0
  50. package/dist/shared/backgrounds/backgroundSectionLabels.js +36 -0
  51. package/dist/shared/backgrounds/index.d.ts +3 -0
  52. package/dist/shared/backgrounds/useBackgroundColors.js +3 -2
  53. package/dist/shared/backgrounds/useStartPageBackground.d.ts +12 -0
  54. package/dist/shared/backgrounds/useStartPageBackground.js +23 -0
  55. package/dist/shared/providers/AppShellProvider.d.ts +20 -1
  56. package/dist/shared/providers/AppShellProvider.js +230 -222
  57. package/dist/shared/providers/shell/PaletteThemeProvider.d.ts +13 -0
  58. package/dist/shared/providers/shell/PaletteThemeProvider.js +366 -0
  59. package/dist/shared/providers/shell/ThemeProvider.d.ts +9 -76
  60. package/dist/shared/providers/shell/ThemeProvider.js +63 -55
  61. package/dist/shared/providers/shell/appearance/colour.d.ts +29 -0
  62. package/dist/shared/providers/shell/appearance/colour.js +79 -0
  63. package/dist/shared/providers/shell/appearance/contrastFix.d.ts +70 -0
  64. package/dist/shared/providers/shell/appearance/contrastFix.js +117 -0
  65. package/dist/shared/providers/shell/appearance/index.d.ts +9 -0
  66. package/dist/shared/providers/shell/appearance/model.d.ts +68 -0
  67. package/dist/shared/providers/shell/appearance/model.js +92 -0
  68. package/dist/shared/providers/shell/appearance/operations.d.ts +70 -0
  69. package/dist/shared/providers/shell/appearance/operations.js +160 -0
  70. package/dist/shared/providers/shell/appearance/palettes.d.ts +111 -0
  71. package/dist/shared/providers/shell/appearance/palettes.js +460 -0
  72. package/dist/shared/providers/shell/appearance/storage.d.ts +39 -0
  73. package/dist/shared/providers/shell/appearance/storage.js +186 -0
  74. package/dist/shared/providers/shell/appearance/tokens.d.ts +5 -0
  75. package/dist/shared/providers/shell/appearance/tokens.js +43 -0
  76. package/dist/shared/providers/shell/appearance/types.d.ts +80 -0
  77. package/dist/shared/providers/shell/appearance/types.js +28 -0
  78. package/dist/shared/providers/shell/index.d.ts +1 -1
  79. package/dist/shared/providers/shell/responsiveDisplaySettings.d.ts +27 -0
  80. package/dist/shared/providers/shell/responsiveDisplaySettings.js +6 -0
  81. package/dist/shared/providers/shell/themeContext.d.ts +162 -0
  82. package/dist/shared/providers/shell/themeContext.js +4 -0
  83. package/dist/shared-backgrounds.js +4 -1
  84. package/dist/shell-native/system-bars.d.ts +5 -1
  85. package/dist/shell-native/system-bars.js +1 -1
  86. package/dist/ui/dropdown-menu.js +2 -0
  87. package/dist/ui/popover.js +1 -0
  88. package/dist/ui/select.js +1 -0
  89. package/package.json +5 -1
  90. package/src/shared/styles/page-widths.css +38 -0
  91. package/src/shared/tokens/build/brands/healthybowl.css +25 -3
  92. package/src/shared/tokens/build/themes.css +266 -0
  93. package/src/shared/tokens/display-settings.css +569 -0
  94. package/src/shared/tokens/tokens.css +4 -0
@@ -0,0 +1,43 @@
1
+ import { rgbaOf as e } from "./colour.js";
2
+ // src/shared/providers/shell/appearance/tokens.ts
3
+ var t = {
4
+ light: "10%",
5
+ dark: "22%"
6
+ };
7
+ function n(n) {
8
+ let { surfaces: r, text: i, accent: a, glows: o, scheme: s } = n, c = s === "dark", l = n.auto ? o.glow : a.ink, u = n.auto ? o.glowAlt : a.ink;
9
+ return {
10
+ colorScheme: s,
11
+ "--color-bg-canvas": r.canvas,
12
+ "--color-bg-surface": r.surface,
13
+ "--color-bg-elevated": r.elevated,
14
+ "--color-bg-sunken": r.sunken,
15
+ "--color-bg-muted": r.sunken,
16
+ "--color-overlay-popoverBg": r.popover,
17
+ "--color-border-default": r.borderDefault,
18
+ "--color-border-subtle": r.borderSubtle,
19
+ "--color-border-strong": r.borderStrong,
20
+ "--color-border-seam": r.borderSubtle,
21
+ "--color-text-primary": i.primary,
22
+ "--color-text-secondary": i.secondary,
23
+ "--color-text-tertiary": i.muted,
24
+ "--color-text-muted": i.muted,
25
+ "--color-muted-foreground": i.muted,
26
+ "--color-text-link": a.ink,
27
+ "--color-action-primary-bg": a.fill,
28
+ "--color-action-primary-bgHover": a.hover,
29
+ "--color-action-primary-bgActive": a.active,
30
+ "--color-action-primary-text": a.on,
31
+ "--color-action-primary-border": a.fill,
32
+ "--color-accent-primary": a.fill,
33
+ "--color-primary": a.fill,
34
+ "--color-accent-text": a.ink,
35
+ "--color-focus-ring": a.fill,
36
+ "--color-accent-soft": `color-mix(in oklab, ${a.fill} ${t[s]}, transparent)`,
37
+ "--color-accent-glow": l,
38
+ "--color-accent-glow-alt": u,
39
+ "--color-surface-glass": e(r.surface, c ? .66 : .72),
40
+ "--boff-on-glow": c ? r.canvas : r.elevated
41
+ };
42
+ }
43
+ export { n as lookTokenStyle };
@@ -0,0 +1,80 @@
1
+ /**
2
+ * BOFF-15524: the vocabulary of the palette appearance model (opt-in, `ThemeProvider
3
+ * paletteAppearance`). A theme is a palette that follows a Light / Dark / System mode, a dark
4
+ * depth and an accent; the person also keeps a palette of their own colours and saved looks.
5
+ */
6
+ /** The palettes, in the order Appearance shows them. `classic` is today's Light and Dark. */
7
+ export declare const PALETTE_NAMES: readonly ["fluidgrids", "classic", "forest", "ocean", "sunset", "high-contrast"];
8
+ export type PaletteName = (typeof PALETTE_NAMES)[number];
9
+ /** The Mode setting: Light, Dark, or follow the device. */
10
+ export declare const COLOR_MODE_SETTINGS: readonly ["light", "dark", "system"];
11
+ export type ColorModeSetting = (typeof COLOR_MODE_SETTINGS)[number];
12
+ /** What the Mode setting resolves to. */
13
+ export type ColorScheme = 'light' | 'dark';
14
+ /**
15
+ * How dark the dark mode gets: Dark (today's level), Darker (the fluidgrids.ai level, the
16
+ * default) and Black. Written to `<html data-dark-depth>`.
17
+ */
18
+ export declare const DARK_DEPTHS: readonly ["dark", "darker", "black"];
19
+ export type DarkDepth = (typeof DARK_DEPTHS)[number];
20
+ /** The accent presets Appearance offers (besides the theme's own colour). */
21
+ export declare const ACCENT_PRESET_IDS: readonly ["purple", "indigo", "blue", "cyan", "teal", "green", "amber", "rose", "fuchsia"];
22
+ export type AccentPresetId = (typeof ACCENT_PRESET_IDS)[number];
23
+ /**
24
+ * The accent choice, as stored: `auto` (the theme's own colour), `preset:<id>`,
25
+ * `colour:<id>` (one of the person's saved colours) or a `#RRGGBB` colour (a saved look's).
26
+ */
27
+ export type AccentChoice = 'auto' | `preset:${AccentPresetId}` | `colour:${string}` | `#${string}`;
28
+ /** A colour in the person's own palette (Appearance › Colour › My colours). */
29
+ export interface SavedColour {
30
+ id: string;
31
+ name: string;
32
+ /** `#RRGGBB` */
33
+ hex: string;
34
+ }
35
+ /** A saved look's mode: follow the Mode setting, or always light, or always dark. */
36
+ export type LookMode = 'keep' | ColorScheme;
37
+ /**
38
+ * A saved look (a custom theme): a palette, a colour and a mode. Display settings (density,
39
+ * text size, glass, motion) are NOT part of a look: they stay the person's own everywhere.
40
+ * The accent is never a `colour:<id>`: a look keeps the colour itself, so deleting a saved
41
+ * colour leaves the look as it was.
42
+ */
43
+ export interface SavedLook {
44
+ id: string;
45
+ name: string;
46
+ palette: PaletteName;
47
+ accent: 'auto' | `preset:${AccentPresetId}` | `#${string}`;
48
+ mode: LookMode;
49
+ }
50
+ /** What the person chose, kept per device. */
51
+ export interface AppearanceSettings {
52
+ palette: PaletteName;
53
+ mode: ColorModeSetting;
54
+ darkDepth: DarkDepth;
55
+ accent: AccentChoice;
56
+ colours: SavedColour[];
57
+ looks: SavedLook[];
58
+ /**
59
+ * The saved look the person last switched to, by id (null: none). It is on while the choices
60
+ * are still its; a copy made with Duplicate is a look of its own, so the one switched to is
61
+ * the one marked.
62
+ */
63
+ activeLookId: string | null;
64
+ }
65
+ /** A product's starting point (FluidGrids: its own palette, Dark, Darker). */
66
+ export interface AppearanceDefaults {
67
+ palette: PaletteName;
68
+ mode: ColorModeSetting;
69
+ darkDepth: DarkDepth;
70
+ }
71
+ /** The most colours the person's palette holds. */
72
+ export declare const MAX_SAVED_COLOURS = 24;
73
+ /** The longest name of a saved colour. */
74
+ export declare const COLOUR_NAME_MAX = 24;
75
+ /** The longest name of a saved look. */
76
+ export declare const LOOK_NAME_MAX = 32;
77
+ export declare const isPaletteName: (value: unknown) => value is PaletteName;
78
+ export declare const isColorModeSetting: (value: unknown) => value is ColorModeSetting;
79
+ export declare const isDarkDepth: (value: unknown) => value is DarkDepth;
80
+ export declare const isAccentPresetId: (value: unknown) => value is AccentPresetId;
@@ -0,0 +1,28 @@
1
+ // src/shared/providers/shell/appearance/types.ts
2
+ var e = [
3
+ "fluidgrids",
4
+ "classic",
5
+ "forest",
6
+ "ocean",
7
+ "sunset",
8
+ "high-contrast"
9
+ ], t = [
10
+ "light",
11
+ "dark",
12
+ "system"
13
+ ], n = [
14
+ "dark",
15
+ "darker",
16
+ "black"
17
+ ], r = [
18
+ "purple",
19
+ "indigo",
20
+ "blue",
21
+ "cyan",
22
+ "teal",
23
+ "green",
24
+ "amber",
25
+ "rose",
26
+ "fuchsia"
27
+ ], i = (t) => typeof t == "string" && e.includes(t), a = (e) => typeof e == "string" && t.includes(e), o = (e) => typeof e == "string" && n.includes(e), s = (e) => typeof e == "string" && r.includes(e);
28
+ export { r as ACCENT_PRESET_IDS, t as COLOR_MODE_SETTINGS, n as DARK_DEPTHS, e as PALETTE_NAMES, s as isAccentPresetId, a as isColorModeSetting, o as isDarkDepth, i as isPaletteName };
@@ -1,5 +1,5 @@
1
1
  export { ThemeProvider, useTheme } from './ThemeProvider';
2
- export type { ThemeMode, Brand, Density, Typography, ThemeContextValue, ThemeProviderProps, } from './ThemeProvider';
2
+ export type { ThemeMode, Brand, Density, Typography, ThemeContextValue, ThemeProviderProps, AppearanceControls, AppearanceSnapshot, DisplayDefaults, AccentChoice, AppearanceDefaults, AppearanceSettings, ColorModeSetting, ColorScheme, DarkDepth, LookMode, PaletteName, SavedColour, SavedLook, } from './ThemeProvider';
3
3
  export { I18nProvider, useI18n, useOptionalI18n, clearTranslationCache, isTranslationAttempted, LOCALE_DIRECTION, localeDirection, } from './I18nProvider';
4
4
  export type { Locale, TranslationDictionary, I18nContextValue, I18nProviderProps, FetchTranslationsFn, LoadTranslationsFn, TranslationLoadResult, LocaleLoadStatus, DirectionMode, TextDirection, } from './I18nProvider';
5
5
  export { useShellLabel, useShellNumberFormat } from './useShellLabel';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Density, Text size and Glass change the UI (BOFF-15525). Opt-in:
3
+ * `AppShellConfig.responsiveDisplaySettings` -> `ThemeProvider responsiveDisplaySettings`.
4
+ *
5
+ * Why: the three Appearance settings only flipped `data-density`, `data-typography` and
6
+ * `data-glass`, and almost nothing read them (buttons, inputs, cards and sidebar rows use
7
+ * fixed sizes; Tailwind's `text-*` scale is rem-fixed; one element per page was glass).
8
+ *
9
+ * While on, `<html data-display-settings="responsive">` is the stylesheet hook
10
+ * (`tokens/display-settings.css`): it turns the three attributes into the variables the
11
+ * primitives read, with a fallback equal to today's value at every use site, so an app that
12
+ * does not opt in renders exactly as before:
13
+ *
14
+ * --density-scale 0.875 / 1 / 1.125 control heights, paddings and list-row heights
15
+ * --font-scale 0.9 / 1 / 1.125 Tailwind's text-xs ... text-6xl
16
+ * --glass-blur 0 / 8px / 16px glass surfaces (floating sidebar, menus, composer)
17
+ * --glass-alpha 1 / 0.9 / 0.78 their fill's opacity (1 = the opaque surface)
18
+ *
19
+ * `prefers-reduced-transparency` forces glass off in the stylesheet; the user's own
20
+ * `data-reduce-motion` / `prefers-reduced-motion` already neutralise the transitions.
21
+ */
22
+ export declare const DISPLAY_SETTINGS_ATTRIBUTE = "data-display-settings";
23
+ export declare const DISPLAY_SETTINGS_RESPONSIVE = "responsive";
24
+ /**
25
+ * Applies the opt-in to `root` (`<html>`) and returns the undo (the attribute removed).
26
+ */
27
+ export declare function applyResponsiveDisplaySettings(root: HTMLElement): () => void;
@@ -0,0 +1,6 @@
1
+ // src/shared/providers/shell/responsiveDisplaySettings.ts
2
+ var e = "data-display-settings", t = "responsive";
3
+ function n(n) {
4
+ return n.setAttribute(e, t), () => n.removeAttribute(e);
5
+ }
6
+ export { e as DISPLAY_SETTINGS_ATTRIBUTE, t as DISPLAY_SETTINGS_RESPONSIVE, n as applyResponsiveDisplaySettings };
@@ -0,0 +1,162 @@
1
+ import { ReactNode } from 'react';
2
+ import { AccentChoice, AppearanceDefaults, AppearanceSettings, ColorModeSetting, DarkDepth, PaletteName, SavedColour, SavedLook } from './appearance/types';
3
+ import { ResolvedAppearance } from './appearance/model';
4
+ /**
5
+ * Boff UI theme axis. `mode` is the user's stored choice and may be any of the
6
+ * six concrete Boff UI themes, `system` (resolves to light/dark from the OS), or
7
+ * `custom` (a user-designed theme — see {@link CustomTheme}). The light/dark
8
+ * *family* is exposed separately as `resolvedTheme`, while `resolvedThemeName` is
9
+ * the concrete CSS theme written to `data-theme` on the document root.
10
+ */
11
+ export type ThemeMode = 'light' | 'dark' | 'forest' | 'ocean' | 'sunset' | 'high-contrast' | 'system' | 'custom';
12
+ /** The six concrete CSS themes (`data-theme` only ever receives one of these). */
13
+ export type ThemeName = Exclude<ThemeMode, 'system' | 'custom'>;
14
+ export type Brand = 'workspaces' | 'fluidgrids' | 'bigconsole' | 'botlit' | 'botmanor' | 'vibecontrols' | 'healthybowl' | 'housingvista' | 'adaptercloud' | 'artistrybase' | 'atheletebridge' | 'brainyrich' | 'buildmyiq' | 'collabkin' | 'comradecircle' | 'coolandlovely' | 'cosmicintersection' | 'crewfoundry' | 'ecoimpacthub' | 'eventfullymanaged' | 'ggnomad' | 'govcitizenhub' | 'headshotmarketing' | 'hookmovies' | 'intelwatchtower' | 'kadaikodi' | 'labsofscience' | 'manufacturedops' | 'movethewheels' | 'mybodyshield' | 'planmagnet' | 'proserviceworld' | 'semanticfed' | 'subscriberbot' | 'theculturepost' | 'theglobalfuel' | 'timecampus' | 'default';
15
+ export type Density = 'compact' | 'comfortable' | 'spacious';
16
+ export type Typography = 'default' | 'large' | 'small';
17
+ /** Glass intensity preference (drives `data-glass` → blur + opaque fallback). */
18
+ export type GlassIntensity = 'off' | 'subtle' | 'full';
19
+ /**
20
+ * A user-designed, saved theme. Reusable across every product (the storage key
21
+ * is shared across all shells). A custom theme inherits a light/dark base CSS
22
+ * block and redefines ONLY the action accent (which retints the whole UI via the
23
+ * existing `color-mix(... var(--color-action-primary-bg) ...)` tokens) plus the
24
+ * density / typography / glass / motion axes — no new token names.
25
+ */
26
+ export interface CustomTheme {
27
+ id: string;
28
+ name: string;
29
+ base: 'light' | 'dark';
30
+ /** single hex accent — feeds --color-action-primary-bg only */
31
+ accent: string;
32
+ density: Density;
33
+ typography: Typography;
34
+ glass: GlassIntensity;
35
+ reduceMotion: boolean;
36
+ }
37
+ /** Everything Appearance can put back with Undo: the choices and the display settings. */
38
+ export interface AppearanceSnapshot {
39
+ settings: AppearanceSettings;
40
+ density: Density;
41
+ typography: Typography;
42
+ glass: GlassIntensity;
43
+ reduceMotion: boolean;
44
+ }
45
+ /** The display settings a product starts on (what Reset puts back, and the "Default" tags). */
46
+ export interface DisplayDefaults {
47
+ density: Density;
48
+ typography: Typography;
49
+ glass: GlassIntensity;
50
+ }
51
+ /**
52
+ * BOFF-15524: the palette appearance model's controls (`ThemeProvider paletteAppearance`).
53
+ * A theme is a palette that follows the Mode setting and the dark depth; the accent is its
54
+ * own setting, always contrast-fixed; saved looks keep a palette, a colour and a mode only.
55
+ */
56
+ export interface AppearanceControls {
57
+ settings: AppearanceSettings;
58
+ defaults: AppearanceDefaults;
59
+ /** The product's display defaults (`defaultDensity`, `defaultTypography`, `defaultGlass`). */
60
+ displayDefaults: DisplayDefaults;
61
+ /** What the choices paint now (the app's `<html>`). */
62
+ resolved: ResolvedAppearance;
63
+ /** The device asks for dark (what System follows). */
64
+ systemDark: boolean;
65
+ /** The saved look that is on: the one last switched to, while the choices are still its. */
66
+ activeLook: SavedLook | null;
67
+ /** Picks a palette; a dark-only one turns a light Mode to Dark (`modeChanged`). */
68
+ setPalette: (palette: PaletteName) => {
69
+ modeChanged: boolean;
70
+ };
71
+ setColorMode: (mode: ColorModeSetting) => void;
72
+ setDarkDepth: (depth: DarkDepth) => void;
73
+ setAccent: (accent: AccentChoice) => void;
74
+ /** Saves a colour to the person's palette and switches to it; null when it is full. */
75
+ addColour: (colour: {
76
+ name: string;
77
+ hex: string;
78
+ }) => SavedColour | null;
79
+ updateColour: (id: string, patch: {
80
+ name?: string;
81
+ hex?: string;
82
+ }) => void;
83
+ deleteColour: (id: string) => void;
84
+ moveColour: (id: string, toIndex: number) => void;
85
+ /** Saves a look and switches to it. */
86
+ createLook: (look: Omit<SavedLook, 'id'>) => SavedLook;
87
+ /** Edits a look (it is not switched to: `applyLook` does that). */
88
+ updateLook: (id: string, patch: Partial<Omit<SavedLook, 'id'>>) => void;
89
+ duplicateLook: (id: string, name: string) => SavedLook | null;
90
+ /** Deletes a look; if it was on, the product's default theme comes back. */
91
+ deleteLook: (id: string) => void;
92
+ applyLook: (id: string) => void;
93
+ /** Theme, mode, depth, colour and display back to the product's defaults (colours and looks stay). */
94
+ resetToDefaults: () => void;
95
+ snapshot: () => AppearanceSnapshot;
96
+ restore: (snapshot: AppearanceSnapshot) => void;
97
+ }
98
+ export interface ThemeContextValue {
99
+ mode: ThemeMode;
100
+ brand: Brand;
101
+ density: Density;
102
+ typography: Typography;
103
+ glass: GlassIntensity;
104
+ reduceMotion: boolean;
105
+ /** light/dark family of the active theme */
106
+ resolvedTheme: 'light' | 'dark';
107
+ /** concrete theme written to data-theme (light|dark|forest|ocean|sunset|high-contrast) */
108
+ resolvedThemeName: ThemeName;
109
+ setMode: (mode: ThemeMode) => void;
110
+ setBrand: (brand: Brand) => void;
111
+ setDensity: (density: Density) => void;
112
+ setTypography: (typography: Typography) => void;
113
+ setGlass: (glass: GlassIntensity) => void;
114
+ setReduceMotion: (reduce: boolean) => void;
115
+ customThemes: CustomTheme[];
116
+ activeCustomId: string | null;
117
+ createCustomTheme: (t: Omit<CustomTheme, 'id'>) => CustomTheme;
118
+ updateCustomTheme: (id: string, patch: Partial<Omit<CustomTheme, 'id'>>) => void;
119
+ deleteCustomTheme: (id: string) => void;
120
+ /** Activate a saved custom theme (sets mode='custom'). */
121
+ applyCustomTheme: (id: string) => void;
122
+ colorMode: 'light' | 'dark';
123
+ toggleColorMode: () => void;
124
+ /**
125
+ * BOFF-15524: the palette appearance model, where the product opted in
126
+ * (`paletteAppearance`); null everywhere else.
127
+ */
128
+ appearance: AppearanceControls | null;
129
+ }
130
+ export declare const ThemeContext: import('react').Context<ThemeContextValue | null>;
131
+ export interface ThemeProviderProps {
132
+ children: ReactNode;
133
+ defaultMode?: ThemeMode;
134
+ defaultBrand?: Brand;
135
+ defaultDensity?: Density;
136
+ defaultTypography?: Typography;
137
+ defaultGlass?: GlassIntensity;
138
+ storageKey?: string;
139
+ /**
140
+ * BOFF-15413: scrollbars, select menus and the other controls the browser draws
141
+ * follow this theme instead of the OS (`themedNativeControls.ts`). Off by default.
142
+ */
143
+ themedNativeControls?: boolean;
144
+ /**
145
+ * BOFF-15525: Density, Text size and Glass change the UI (`responsiveDisplaySettings.ts`):
146
+ * `<html data-display-settings="responsive">` makes the primitives read the three settings.
147
+ * Off by default.
148
+ */
149
+ responsiveDisplaySettings?: boolean;
150
+ /**
151
+ * BOFF-15524: the palette appearance model. Themes become palettes that follow a Light /
152
+ * Dark / System mode and a dark depth (`<html data-dark-depth>`); the accent is its own,
153
+ * always contrast-fixed setting with the person's saved colours; custom themes become saved
154
+ * looks that no longer carry density, text size, glass or motion. Off by default: without
155
+ * it every product keeps today's six themes and custom themes exactly.
156
+ */
157
+ paletteAppearance?: boolean;
158
+ /** With `paletteAppearance`: the palette a device starts on (default `classic`). */
159
+ defaultPalette?: PaletteName;
160
+ /** With `paletteAppearance`: the dark depth a device starts on (default `darker`). */
161
+ defaultDarkDepth?: DarkDepth;
162
+ }
@@ -0,0 +1,4 @@
1
+ import { createContext as e } from "react";
2
+ // src/shared/providers/shell/themeContext.ts
3
+ var t = e(null);
4
+ export { t as ThemeContext };
@@ -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
- 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, E as CURSOR_WAVE_BACKGROUND, D as CURSOR_WAVE_COLORS, F as CURSOR_WAVE_DEFAULTS, c as CursorWave, C as DEFAULT_BACKGROUND_PREFERENCE, 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 };
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 };
@@ -5,7 +5,11 @@
5
5
  */
6
6
  export declare const DARK_FAMILY_THEMES: ReadonlySet<string>;
7
7
  export declare function isDarkThemeName(theme: string | null | undefined): boolean;
8
- /** Resolve the dark flag from the `<html>` element (`data-theme` or `.dark` class). */
8
+ /**
9
+ * Resolve the dark flag from the `<html>` element (`data-theme` or `.dark` class). A palette
10
+ * with a light and a dark version (BOFF-15524: `data-theme="fluidgrids"`) is dark by its
11
+ * `.dark` class, which ThemeProvider sets for every dark theme; a named theme decides alone.
12
+ */
9
13
  export declare function resolveDocumentIsDark(): boolean | null;
10
14
  export declare function applyStatusBarTheme(isDark: boolean): Promise<void>;
11
15
  export interface StatusBarThemeDetail {
@@ -14,7 +14,7 @@ function i(e) {
14
14
  function a() {
15
15
  if (typeof document > "u") return null;
16
16
  let e = document.documentElement, t = e.getAttribute("data-theme");
17
- return t ? i(t) : e.classList.contains("dark") ? !0 : !e.classList.contains("light") && null;
17
+ return t === "light" || i(t) ? i(t) : t ? e.classList.contains("dark") : e.classList.contains("dark") ? !0 : !e.classList.contains("light") && null;
18
18
  }
19
19
  async function o(r) {
20
20
  if (e("StatusBar")) try {
@@ -16,6 +16,7 @@ p.displayName = o.SubTrigger.displayName;
16
16
  function m({ ref: t, className: n, ...r }) {
17
17
  return /* @__PURE__ */ i(o.SubContent, {
18
18
  ref: t,
19
+ "data-glass-surface": "elevated",
19
20
  className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", n),
20
21
  ...r
21
22
  });
@@ -24,6 +25,7 @@ m.displayName = o.SubContent.displayName;
24
25
  function h({ ref: t, className: n, sideOffset: r = 4, ...a }) {
25
26
  return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ i(o.Content, {
26
27
  ref: t,
28
+ "data-glass-surface": "elevated",
27
29
  sideOffset: r,
28
30
  className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", n),
29
31
  ...a
@@ -19,6 +19,7 @@ function i({ ...e }) {
19
19
  function a({ className: r, align: i = "center", sideOffset: a = 4, ...o }) {
20
20
  return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(n.Content, {
21
21
  "data-slot": "popover-content",
22
+ "data-glass-surface": "elevated",
22
23
  align: i,
23
24
  sideOffset: a,
24
25
  className: e("bg-bg-elevated text-text-primary border-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border p-4 shadow-elevation-3 outline-hidden", r),
package/dist/ui/select.js CHANGED
@@ -42,6 +42,7 @@ x.displayName = h.ScrollDownButton.displayName;
42
42
  function S({ ref: e, className: t, children: r, position: i = "popper", ...a }) {
43
43
  return /* @__PURE__ */ p(h.Portal, { children: /* @__PURE__ */ m(h.Content, {
44
44
  ref: e,
45
+ "data-glass-surface": "elevated",
45
46
  className: n("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", i === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", t),
46
47
  position: i,
47
48
  ...a,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.1119.5",
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 - Auto-generated */
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: #15803D;
5
- --color-action-primary-bgActive: #166534;
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
  }