@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.
- package/dist/chrome/HeaderThemeSwitcher.js +1 -1
- 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/ThemePreferences.js +16 -16
- package/dist/chrome/appearance/AppearanceColourSection.d.ts +17 -0
- package/dist/chrome/appearance/AppearanceColourSection.js +337 -0
- package/dist/chrome/appearance/AppearanceDisplaySection.d.ts +7 -0
- package/dist/chrome/appearance/AppearanceDisplaySection.js +137 -0
- package/dist/chrome/appearance/AppearanceModeDepth.d.ts +11 -0
- package/dist/chrome/appearance/AppearanceModeDepth.js +158 -0
- package/dist/chrome/appearance/AppearancePreferences.d.ts +13 -0
- package/dist/chrome/appearance/AppearancePreferences.js +308 -0
- package/dist/chrome/appearance/AppearancePreview.d.ts +23 -0
- package/dist/chrome/appearance/AppearancePreview.js +218 -0
- package/dist/chrome/appearance/AppearanceThemeSection.d.ts +14 -0
- package/dist/chrome/appearance/AppearanceThemeSection.js +162 -0
- package/dist/chrome/appearance/ColourPanel.d.ts +37 -0
- package/dist/chrome/appearance/ColourPanel.js +264 -0
- package/dist/chrome/appearance/ThemeDialog.d.ts +21 -0
- package/dist/chrome/appearance/ThemeDialog.js +378 -0
- package/dist/chrome/appearance/appearanceShared.d.ts +24 -0
- package/dist/chrome/appearance/appearanceShared.js +46 -0
- package/dist/chrome/appearance/appearanceUi.d.ts +49 -0
- package/dist/chrome/appearance/appearanceUi.js +98 -0
- package/dist/chrome/appearance/useAppearanceLabels.d.ts +181 -0
- package/dist/chrome/appearance/useAppearanceLabels.js +259 -0
- package/dist/chrome/index.d.ts +1 -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/ShellSidebar.js +2 -0
- 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/chrome/shellLabelManifest.d.ts +6 -0
- package/dist/chrome.js +26 -25
- package/dist/platform-pages/AppearanceSettingsPage.d.ts +11 -1
- package/dist/platform-pages/AppearanceSettingsPage.js +15 -8
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +346 -345
- 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/useBackgroundColors.js +3 -2
- package/dist/shared/backgrounds/useStartPageBackground.d.ts +12 -0
- package/dist/shared/backgrounds/useStartPageBackground.js +23 -0
- package/dist/shared/providers/AppShellProvider.d.ts +20 -1
- package/dist/shared/providers/AppShellProvider.js +230 -222
- package/dist/shared/providers/shell/PaletteThemeProvider.d.ts +13 -0
- package/dist/shared/providers/shell/PaletteThemeProvider.js +366 -0
- package/dist/shared/providers/shell/ThemeProvider.d.ts +9 -76
- package/dist/shared/providers/shell/ThemeProvider.js +63 -55
- package/dist/shared/providers/shell/appearance/colour.d.ts +29 -0
- package/dist/shared/providers/shell/appearance/colour.js +79 -0
- package/dist/shared/providers/shell/appearance/contrastFix.d.ts +70 -0
- package/dist/shared/providers/shell/appearance/contrastFix.js +117 -0
- package/dist/shared/providers/shell/appearance/index.d.ts +9 -0
- package/dist/shared/providers/shell/appearance/model.d.ts +68 -0
- package/dist/shared/providers/shell/appearance/model.js +92 -0
- package/dist/shared/providers/shell/appearance/operations.d.ts +70 -0
- package/dist/shared/providers/shell/appearance/operations.js +160 -0
- package/dist/shared/providers/shell/appearance/palettes.d.ts +111 -0
- package/dist/shared/providers/shell/appearance/palettes.js +460 -0
- package/dist/shared/providers/shell/appearance/storage.d.ts +39 -0
- package/dist/shared/providers/shell/appearance/storage.js +186 -0
- package/dist/shared/providers/shell/appearance/tokens.d.ts +5 -0
- package/dist/shared/providers/shell/appearance/tokens.js +43 -0
- package/dist/shared/providers/shell/appearance/types.d.ts +80 -0
- package/dist/shared/providers/shell/appearance/types.js +28 -0
- package/dist/shared/providers/shell/index.d.ts +1 -1
- package/dist/shared/providers/shell/responsiveDisplaySettings.d.ts +27 -0
- package/dist/shared/providers/shell/responsiveDisplaySettings.js +6 -0
- package/dist/shared/providers/shell/themeContext.d.ts +162 -0
- package/dist/shared/providers/shell/themeContext.js +4 -0
- package/dist/shared-backgrounds.js +4 -1
- package/dist/shell-native/system-bars.d.ts +5 -1
- package/dist/shell-native/system-bars.js +1 -1
- package/dist/ui/dropdown-menu.js +2 -0
- package/dist/ui/popover.js +1 -0
- package/dist/ui/select.js +1 -0
- package/package.json +5 -1
- package/src/shared/styles/page-widths.css +38 -0
- package/src/shared/tokens/build/brands/healthybowl.css +25 -3
- package/src/shared/tokens/build/themes.css +266 -0
- package/src/shared/tokens/display-settings.css +569 -0
- package/src/shared/tokens/tokens.css +4 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { ColorScheme } from '../../shared/providers/shell/appearance/types';
|
|
2
|
+
export declare function useAppearanceLabels(): {
|
|
3
|
+
product: string;
|
|
4
|
+
site: string;
|
|
5
|
+
palettes: Record<"fluidgrids" | "classic" | "forest" | "ocean" | "sunset" | "high-contrast", {
|
|
6
|
+
name: string;
|
|
7
|
+
hint: string;
|
|
8
|
+
}>;
|
|
9
|
+
presets: Record<"blue" | "cyan" | "fuchsia" | "green" | "indigo" | "purple" | "teal" | "amber" | "rose", string>;
|
|
10
|
+
schemes: Record<ColorScheme, string>;
|
|
11
|
+
depths: Record<"dark" | "black" | "darker", {
|
|
12
|
+
name: string;
|
|
13
|
+
hint: string;
|
|
14
|
+
}>;
|
|
15
|
+
title: string;
|
|
16
|
+
subtitle: string;
|
|
17
|
+
subtitlePlain: string;
|
|
18
|
+
reset: string;
|
|
19
|
+
resetAsk: string;
|
|
20
|
+
resetBody: string;
|
|
21
|
+
resetBodyPlain: string;
|
|
22
|
+
resetConfirm: string;
|
|
23
|
+
resetDone: string;
|
|
24
|
+
cancel: string;
|
|
25
|
+
undo: string;
|
|
26
|
+
undone: string;
|
|
27
|
+
keptOnDevice: string;
|
|
28
|
+
tagDefault: string;
|
|
29
|
+
tagNew: string;
|
|
30
|
+
tagDarkOnly: string;
|
|
31
|
+
tagYours: string;
|
|
32
|
+
themeTitle: string;
|
|
33
|
+
themeDescription: string;
|
|
34
|
+
createTheme: string;
|
|
35
|
+
createThemeHint: string;
|
|
36
|
+
themeNowDark: (theme: string) => string;
|
|
37
|
+
lookSummary: (theme: string, colour: string) => string;
|
|
38
|
+
lookSummaryMode: (theme: string, colour: string, mode: string) => string;
|
|
39
|
+
lookMore: (name: string) => string;
|
|
40
|
+
lookUse: string;
|
|
41
|
+
lookEdit: string;
|
|
42
|
+
lookDuplicate: string;
|
|
43
|
+
lookDelete: string;
|
|
44
|
+
lookDeleteAsk: (name: string) => string;
|
|
45
|
+
lookDeleteBody: string;
|
|
46
|
+
lookCreated: (name: string) => string;
|
|
47
|
+
lookSaved: (name: string) => string;
|
|
48
|
+
lookDuplicated: (name: string) => string;
|
|
49
|
+
lookCopyName: (name: string) => string;
|
|
50
|
+
lookDeleted: (name: string) => string;
|
|
51
|
+
lookDeletedActive: (name: string) => string;
|
|
52
|
+
modeTitle: string;
|
|
53
|
+
modeDescription: string;
|
|
54
|
+
system: string;
|
|
55
|
+
lightHint: string;
|
|
56
|
+
darkHint: string;
|
|
57
|
+
noLight: (theme: string) => string;
|
|
58
|
+
systemHint: (mode: string) => string;
|
|
59
|
+
staysDark: (theme: string) => string;
|
|
60
|
+
depthTitle: string;
|
|
61
|
+
depthDescription: string;
|
|
62
|
+
depthPage: string;
|
|
63
|
+
depthCard: string;
|
|
64
|
+
depthMenu: string;
|
|
65
|
+
depthNone: string;
|
|
66
|
+
depthLightNote: string;
|
|
67
|
+
colourTitle: string;
|
|
68
|
+
colourDescription: string;
|
|
69
|
+
colourFixed: string;
|
|
70
|
+
presetsTitle: string;
|
|
71
|
+
themeColour: string;
|
|
72
|
+
mine: string;
|
|
73
|
+
mineHint: string;
|
|
74
|
+
mineEmpty: string;
|
|
75
|
+
addColour: string;
|
|
76
|
+
manage: string;
|
|
77
|
+
done: string;
|
|
78
|
+
adjusted: string;
|
|
79
|
+
adjustedLine: (name: string, mode: string, fill: string, ratio: string, ink: string) => string;
|
|
80
|
+
addTitle: string;
|
|
81
|
+
editTitle: string;
|
|
82
|
+
panelHint: string;
|
|
83
|
+
pick: string;
|
|
84
|
+
hex: string;
|
|
85
|
+
name: string;
|
|
86
|
+
hexError: string;
|
|
87
|
+
fromSite: string;
|
|
88
|
+
saveColour: string;
|
|
89
|
+
saveChanges: string;
|
|
90
|
+
colourDefaultName: (count: number) => string;
|
|
91
|
+
colourSaved: (name: string) => string;
|
|
92
|
+
colourUpdated: (name: string) => string;
|
|
93
|
+
colourDeleted: (name: string) => string;
|
|
94
|
+
colourDeletedAccent: (name: string) => string;
|
|
95
|
+
colourFull: string;
|
|
96
|
+
colourRenamed: (name: string) => string;
|
|
97
|
+
colourMoved: (name: string) => string;
|
|
98
|
+
manageHint: string;
|
|
99
|
+
nameFor: (name: string) => string;
|
|
100
|
+
moveUp: (name: string) => string;
|
|
101
|
+
moveDown: (name: string) => string;
|
|
102
|
+
changeColour: (name: string) => string;
|
|
103
|
+
deleteColour: (name: string) => string;
|
|
104
|
+
dragHandle: string;
|
|
105
|
+
contrastLabel: string;
|
|
106
|
+
contrastWhere: string;
|
|
107
|
+
contrastIn: (mode: string) => string;
|
|
108
|
+
contrastButtons: string;
|
|
109
|
+
contrastButtonsRule: string;
|
|
110
|
+
contrastLinks: string;
|
|
111
|
+
contrastLinkSample: string;
|
|
112
|
+
contrastLinksRule: string;
|
|
113
|
+
contrastOutlines: string;
|
|
114
|
+
contrastOutlinesRule: string;
|
|
115
|
+
contrastOk: string;
|
|
116
|
+
contrastYours: (ratio: string) => string;
|
|
117
|
+
contrastReadable: string;
|
|
118
|
+
contrastTooLight: string;
|
|
119
|
+
contrastTooDark: string;
|
|
120
|
+
displayTitle: string;
|
|
121
|
+
displayDescription: string;
|
|
122
|
+
density: string;
|
|
123
|
+
densityHint: string;
|
|
124
|
+
textSize: string;
|
|
125
|
+
textSizeHint: string;
|
|
126
|
+
glass: string;
|
|
127
|
+
glassHint: string;
|
|
128
|
+
glassSolid: string;
|
|
129
|
+
reduceMotion: string;
|
|
130
|
+
reduceMotionHint: string;
|
|
131
|
+
densities: {
|
|
132
|
+
compact: string;
|
|
133
|
+
comfortable: string;
|
|
134
|
+
spacious: string;
|
|
135
|
+
};
|
|
136
|
+
textSizes: {
|
|
137
|
+
small: string;
|
|
138
|
+
default: string;
|
|
139
|
+
large: string;
|
|
140
|
+
};
|
|
141
|
+
glasses: {
|
|
142
|
+
off: string;
|
|
143
|
+
subtle: string;
|
|
144
|
+
full: string;
|
|
145
|
+
};
|
|
146
|
+
previewTitle: string;
|
|
147
|
+
previewHide: string;
|
|
148
|
+
previewShow: string;
|
|
149
|
+
previewUnsaved: string;
|
|
150
|
+
previewLabel: string;
|
|
151
|
+
previewAssistant: string;
|
|
152
|
+
previewWelcome: string;
|
|
153
|
+
previewWelcomeSub: string;
|
|
154
|
+
previewAsk: string;
|
|
155
|
+
previewSuggestion1: string;
|
|
156
|
+
previewSuggestion2: string;
|
|
157
|
+
dialogCreate: string;
|
|
158
|
+
dialogEdit: string;
|
|
159
|
+
dialogNameError: string;
|
|
160
|
+
dialogStartFrom: string;
|
|
161
|
+
dialogColour: string;
|
|
162
|
+
dialogAnyColour: string;
|
|
163
|
+
dialogPickAny: string;
|
|
164
|
+
dialogHex: string;
|
|
165
|
+
dialogMode: string;
|
|
166
|
+
dialogKeep: string;
|
|
167
|
+
dialogAlwaysLight: string;
|
|
168
|
+
dialogAlwaysDark: string;
|
|
169
|
+
dialogDarkOnly: (theme: string) => string;
|
|
170
|
+
dialogFixed: string;
|
|
171
|
+
dialogSave: string;
|
|
172
|
+
dialogSaveChanges: string;
|
|
173
|
+
dialogDelete: string;
|
|
174
|
+
dialogDeleteYes: string;
|
|
175
|
+
dialogKeepIt: string;
|
|
176
|
+
dialogClose: string;
|
|
177
|
+
dialogDefaultName: (count: number) => string;
|
|
178
|
+
dialogReadable: (ratio: string) => string;
|
|
179
|
+
dialogAdjusted: (fill: string, ratio: string) => string;
|
|
180
|
+
};
|
|
181
|
+
export type AppearanceLabels = ReturnType<typeof useAppearanceLabels>;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { useAppShell as e } from "../../shared/providers/shell/AppShellContext.js";
|
|
2
|
+
import { PICKER_FALLBACK as t } from "../../shared/providers/shell/appearance/palettes.js";
|
|
3
|
+
import { useShellLabel as n } from "../../shared/providers/shell/useShellLabel.js";
|
|
4
|
+
import { useMemo as r } from "react";
|
|
5
|
+
// src/chrome/appearance/useAppearanceLabels.ts
|
|
6
|
+
function i() {
|
|
7
|
+
let i = n(), { productName: a, domain: o } = e();
|
|
8
|
+
return r(() => {
|
|
9
|
+
let e = a, n = o || a;
|
|
10
|
+
return {
|
|
11
|
+
product: e,
|
|
12
|
+
site: n,
|
|
13
|
+
palettes: {
|
|
14
|
+
fluidgrids: {
|
|
15
|
+
name: i("appearance.palette.fluidgrids", "FluidGrids"),
|
|
16
|
+
hint: i("appearance.palette.fluidgridsHint", "The colours of fluidgrids.ai, in light and dark.")
|
|
17
|
+
},
|
|
18
|
+
classic: {
|
|
19
|
+
name: i("appearance.palette.classic", "Classic"),
|
|
20
|
+
hint: i("appearance.palette.classicHint", "The original Light and Dark.")
|
|
21
|
+
},
|
|
22
|
+
forest: {
|
|
23
|
+
name: i("themeSwitcher.forest", "Forest"),
|
|
24
|
+
hint: i("appearance.palette.forestHint", "Deep green surfaces, green accent.")
|
|
25
|
+
},
|
|
26
|
+
ocean: {
|
|
27
|
+
name: i("themeSwitcher.ocean", "Ocean"),
|
|
28
|
+
hint: i("appearance.palette.oceanHint", "Deep blue surfaces, blue accent.")
|
|
29
|
+
},
|
|
30
|
+
sunset: {
|
|
31
|
+
name: i("themeSwitcher.sunset", "Sunset"),
|
|
32
|
+
hint: i("appearance.palette.sunsetHint", "Warm plum surfaces, orange accent.")
|
|
33
|
+
},
|
|
34
|
+
"high-contrast": {
|
|
35
|
+
name: i("themeSwitcher.highContrastMenu", "High contrast"),
|
|
36
|
+
hint: i("appearance.palette.highContrastHint", "Pure black and white, solid surfaces, yellow focus.")
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
presets: {
|
|
40
|
+
purple: i("appearance.colour.purple", "Purple"),
|
|
41
|
+
indigo: i("appearance.colour.indigo", "Indigo"),
|
|
42
|
+
blue: i("appearance.colour.blue", "Blue"),
|
|
43
|
+
cyan: i("appearance.colour.cyan", "Cyan"),
|
|
44
|
+
teal: i("appearance.colour.teal", "Teal"),
|
|
45
|
+
green: i("appearance.colour.green", "Green"),
|
|
46
|
+
amber: i("appearance.colour.amber", "Amber"),
|
|
47
|
+
rose: i("appearance.colour.rose", "Rose"),
|
|
48
|
+
fuchsia: i("appearance.colour.fuchsia", "Fuchsia")
|
|
49
|
+
},
|
|
50
|
+
schemes: {
|
|
51
|
+
light: i("themeSwitcher.light", "Light"),
|
|
52
|
+
dark: i("themeSwitcher.dark", "Dark")
|
|
53
|
+
},
|
|
54
|
+
depths: {
|
|
55
|
+
dark: {
|
|
56
|
+
name: i("appearance.depth.dark", "Dark"),
|
|
57
|
+
hint: i("appearance.depth.darkHint", "The original level of dark.")
|
|
58
|
+
},
|
|
59
|
+
darker: {
|
|
60
|
+
name: i("appearance.depth.darker", "Darker"),
|
|
61
|
+
hint: i("appearance.depth.darkerHint", "As dark as {{site}}.", { site: n })
|
|
62
|
+
},
|
|
63
|
+
black: {
|
|
64
|
+
name: i("appearance.depth.black", "Black"),
|
|
65
|
+
hint: i("appearance.depth.blackHint", "Pure black. Best on OLED screens.")
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
title: i("appearance.title", "Appearance"),
|
|
69
|
+
subtitle: i("appearance.subtitle", "Theme, colour, display and background for {{product}} on this device.", { product: e }),
|
|
70
|
+
subtitlePlain: i("appearance.subtitlePlain", "Theme, colour and display for {{product}} on this device.", { product: e }),
|
|
71
|
+
reset: i("appearance.reset", "Reset to defaults"),
|
|
72
|
+
resetAsk: i("appearance.resetAsk", "Reset appearance?"),
|
|
73
|
+
resetBody: i("appearance.resetBody", "Theme, mode, depth, colour, display and background go back to the {{product}} defaults. Your saved colours and themes stay.", { product: e }),
|
|
74
|
+
resetBodyPlain: i("appearance.resetBodyPlain", "Theme, mode, depth, colour and display go back to the {{product}} defaults. Your saved colours and themes stay.", { product: e }),
|
|
75
|
+
resetConfirm: i("appearance.resetConfirm", "Reset"),
|
|
76
|
+
resetDone: i("appearance.resetDone", "Appearance is back to the {{product}} defaults.", { product: e }),
|
|
77
|
+
cancel: i("common.actions.cancel", "Cancel"),
|
|
78
|
+
undo: i("appearance.undo", "Undo"),
|
|
79
|
+
undone: i("appearance.undone", "Undone."),
|
|
80
|
+
keptOnDevice: i("appearance.keptOnDevice", "Appearance is kept on this device."),
|
|
81
|
+
tagDefault: i("appearance.tag.default", "Default"),
|
|
82
|
+
tagNew: i("appearance.tag.new", "New"),
|
|
83
|
+
tagDarkOnly: i("appearance.tag.darkOnly", "Dark only"),
|
|
84
|
+
tagYours: i("appearance.tag.yours", "Yours"),
|
|
85
|
+
themeTitle: i("appearance.theme.title", "Theme"),
|
|
86
|
+
themeDescription: i("appearance.theme.description", "The {{product}} theme is the default. Every theme from before stays.", { product: e }),
|
|
87
|
+
createTheme: i("appearance.theme.create", "Create a theme"),
|
|
88
|
+
createThemeHint: i("appearance.theme.createHint", "Start from any theme and add your colour. Your themes are kept on this device."),
|
|
89
|
+
themeNowDark: (e) => i("appearance.mode.nowDark", "{{theme}} is dark only, so Mode is now Dark.", { theme: e }),
|
|
90
|
+
lookSummary: (e, t) => i("appearance.look.summary", "{{theme}} · {{colour}}", {
|
|
91
|
+
theme: e,
|
|
92
|
+
colour: t
|
|
93
|
+
}),
|
|
94
|
+
lookSummaryMode: (e, t, n) => i("appearance.look.summaryMode", "{{theme}} · {{colour}} · {{mode}}", {
|
|
95
|
+
theme: e,
|
|
96
|
+
colour: t,
|
|
97
|
+
mode: n
|
|
98
|
+
}),
|
|
99
|
+
lookMore: (e) => i("appearance.look.more", "More for {{name}}", { name: e }),
|
|
100
|
+
lookUse: i("appearance.look.use", "Use this theme"),
|
|
101
|
+
lookEdit: i("appearance.look.edit", "Edit or rename"),
|
|
102
|
+
lookDuplicate: i("appearance.look.duplicate", "Duplicate"),
|
|
103
|
+
lookDelete: i("appearance.look.delete", "Delete"),
|
|
104
|
+
lookDeleteAsk: (e) => i("appearance.look.deleteAsk", "Delete “{{name}}”?", { name: e }),
|
|
105
|
+
lookDeleteBody: i("appearance.look.deleteBody", "Your colours stay."),
|
|
106
|
+
lookCreated: (e) => i("appearance.look.created", "Created “{{name}}” and switched to it.", { name: e }),
|
|
107
|
+
lookSaved: (e) => i("appearance.look.saved", "Saved “{{name}}”.", { name: e }),
|
|
108
|
+
lookDuplicated: (e) => i("appearance.look.duplicated", "Duplicated as “{{name}}”.", { name: e }),
|
|
109
|
+
lookCopyName: (e) => i("appearance.look.copyName", "{{name}} copy", { name: e }),
|
|
110
|
+
lookDeleted: (e) => i("appearance.look.deleted", "Deleted “{{name}}”.", { name: e }),
|
|
111
|
+
lookDeletedActive: (t) => i("appearance.look.deletedActive", "Deleted “{{name}}”. {{product}} is back to its default theme.", {
|
|
112
|
+
name: t,
|
|
113
|
+
product: e
|
|
114
|
+
}),
|
|
115
|
+
modeTitle: i("appearance.mode.title", "Mode"),
|
|
116
|
+
modeDescription: i("appearance.mode.description", "Light, dark, or follow your device."),
|
|
117
|
+
system: i("themeSwitcher.system", "System"),
|
|
118
|
+
lightHint: i("appearance.mode.lightHint", "Bright surfaces for daytime."),
|
|
119
|
+
darkHint: i("appearance.mode.darkHint", "Easier on the eyes at night."),
|
|
120
|
+
noLight: (e) => i("appearance.mode.noLight", "{{theme}} has no light version.", { theme: e }),
|
|
121
|
+
systemHint: (e) => i("appearance.mode.systemHint", "Follows your device. Now {{mode}}.", { mode: e }),
|
|
122
|
+
staysDark: (e) => i("appearance.mode.staysDark", "{{theme}} stays dark.", { theme: e }),
|
|
123
|
+
depthTitle: i("appearance.depth.title", "Dark depth"),
|
|
124
|
+
depthDescription: i("appearance.depth.description", "How dark the dark mode gets, for every dark theme."),
|
|
125
|
+
depthPage: i("appearance.depth.page", "Page"),
|
|
126
|
+
depthCard: i("appearance.depth.card", "Card"),
|
|
127
|
+
depthMenu: i("appearance.depth.menu", "Menu"),
|
|
128
|
+
depthNone: i("appearance.depth.none", "High contrast is already pure black, so it has no depth setting."),
|
|
129
|
+
depthLightNote: i("appearance.depth.lightNote", "You’re in Light mode. Depth applies whenever {{product}} is dark.", { product: e }),
|
|
130
|
+
colourTitle: i("appearance.colour.title", "Colour"),
|
|
131
|
+
colourDescription: i("appearance.colour.description", "Buttons, links, highlights and the current item in the sidebar."),
|
|
132
|
+
colourFixed: i("appearance.colour.fixed", "High contrast keeps its own colours so every control stays at its strongest contrast."),
|
|
133
|
+
presetsTitle: i("appearance.colour.presets", "Presets"),
|
|
134
|
+
themeColour: i("appearance.colour.themeColour", "Theme colour"),
|
|
135
|
+
mine: i("appearance.colour.mine", "My colours"),
|
|
136
|
+
mineHint: i("appearance.colour.mineHint", "Saved on this device"),
|
|
137
|
+
mineEmpty: i("appearance.colour.none", "No colours yet."),
|
|
138
|
+
addColour: i("appearance.colour.add", "Add colour"),
|
|
139
|
+
manage: i("appearance.colour.manage", "Rename, reorder or delete"),
|
|
140
|
+
done: i("appearance.colour.done", "Done"),
|
|
141
|
+
adjusted: i("appearance.colour.adjustedTag", "Adjusted"),
|
|
142
|
+
adjustedLine: (e, t, n, r, a) => i("appearance.colour.adjustedLine", "{{name}} is adjusted so it stays readable in {{mode}}: buttons use {{fill}} ({{ratio}}), links use {{ink}}. Your exact colour still shows in glows and the background.", {
|
|
143
|
+
name: e,
|
|
144
|
+
mode: t,
|
|
145
|
+
fill: n,
|
|
146
|
+
ratio: r,
|
|
147
|
+
ink: a
|
|
148
|
+
}),
|
|
149
|
+
addTitle: i("appearance.colour.addTitle", "Add a colour"),
|
|
150
|
+
editTitle: i("appearance.colour.editTitle", "Edit colour"),
|
|
151
|
+
panelHint: i("appearance.colour.panelHint", "The preview shows it before you save."),
|
|
152
|
+
pick: i("appearance.colour.pick", "Pick"),
|
|
153
|
+
hex: i("appearance.colour.hex", "Hex"),
|
|
154
|
+
name: i("common.name", "Name"),
|
|
155
|
+
hexError: i("appearance.colour.hexError", "Use 6 hex digits, like {{example}}.", { example: t }),
|
|
156
|
+
fromSite: i("appearance.colour.fromSite", "From {{site}}:", { site: n }),
|
|
157
|
+
saveColour: i("appearance.colour.save", "Save colour"),
|
|
158
|
+
saveChanges: i("appearance.colour.saveChanges", "Save changes"),
|
|
159
|
+
colourDefaultName: (e) => i("appearance.colour.defaultName", "Colour {{count}}", { count: e }),
|
|
160
|
+
colourSaved: (e) => i("appearance.colour.saved", "Saved {{name}} to My colours and switched to it.", { name: e }),
|
|
161
|
+
colourUpdated: (e) => i("appearance.colour.updated", "Saved {{name}}.", { name: e }),
|
|
162
|
+
colourDeleted: (e) => i("appearance.colour.deleted", "Deleted {{name}}.", { name: e }),
|
|
163
|
+
colourDeletedAccent: (e) => i("appearance.colour.deletedAccent", "Deleted {{name}}. The colour goes back to the theme colour.", { name: e }),
|
|
164
|
+
colourFull: i("appearance.colour.full", "My colours holds 24. Delete one to add another."),
|
|
165
|
+
colourRenamed: (e) => i("appearance.colour.renamed", "Renamed to {{name}}.", { name: e }),
|
|
166
|
+
colourMoved: (e) => i("appearance.colour.moved", "Moved {{name}}.", { name: e }),
|
|
167
|
+
manageHint: i("appearance.colour.manageHint", "Drag a row or use the arrows to reorder. A deleted colour comes back with Undo."),
|
|
168
|
+
nameFor: (e) => i("appearance.colour.nameFor", "Name for {{name}}", { name: e }),
|
|
169
|
+
moveUp: (e) => i("appearance.colour.moveUp", "Move {{name}} up", { name: e }),
|
|
170
|
+
moveDown: (e) => i("appearance.colour.moveDown", "Move {{name}} down", { name: e }),
|
|
171
|
+
changeColour: (e) => i("appearance.colour.change", "Change {{name}}", { name: e }),
|
|
172
|
+
deleteColour: (e) => i("appearance.colour.delete", "Delete {{name}}", { name: e }),
|
|
173
|
+
dragHandle: i("appearance.colour.dragHandle", "Drag to reorder"),
|
|
174
|
+
contrastLabel: i("appearance.contrast.label", "Contrast check"),
|
|
175
|
+
contrastWhere: i("appearance.contrast.where", "Where it’s used"),
|
|
176
|
+
contrastIn: (e) => i("appearance.contrast.in", "In {{mode}}", { mode: e }),
|
|
177
|
+
contrastButtons: i("appearance.contrast.buttons", "Buttons"),
|
|
178
|
+
contrastButtonsRule: i("appearance.contrast.buttonsRule", "Label on the colour, 4.5:1"),
|
|
179
|
+
contrastLinks: i("appearance.contrast.links", "Links and text"),
|
|
180
|
+
contrastLinkSample: i("appearance.contrast.linkSample", "Link"),
|
|
181
|
+
contrastLinksRule: i("appearance.contrast.linksRule", "On the page, 4.5:1"),
|
|
182
|
+
contrastOutlines: i("appearance.contrast.outlines", "Outlines and toggles"),
|
|
183
|
+
contrastOutlinesRule: i("appearance.contrast.outlinesRule", "Against the page, 3:1"),
|
|
184
|
+
contrastOk: i("appearance.contrast.ok", "OK"),
|
|
185
|
+
contrastYours: (e) => i("appearance.contrast.yours", "Yours: {{ratio}}", { ratio: e }),
|
|
186
|
+
contrastReadable: i("appearance.contrast.readable", "Readable everywhere. Buttons, links and outlines use your exact colour."),
|
|
187
|
+
contrastTooLight: i("appearance.contrast.tooLight", "Too light as it is where it says Adjusted, so {{product}} shifts it just enough there. Your exact colour still shows in glows and the background.", { product: e }),
|
|
188
|
+
contrastTooDark: i("appearance.contrast.tooDark", "Too dark as it is where it says Adjusted, so {{product}} shifts it just enough there. Your exact colour still shows in glows and the background.", { product: e }),
|
|
189
|
+
displayTitle: i("appearance.display.title", "Display"),
|
|
190
|
+
displayDescription: i("appearance.display.description", "Spacing, text size, glass and motion. They apply on every page, with any theme."),
|
|
191
|
+
density: i("themeSwitcher.density", "Density"),
|
|
192
|
+
densityHint: i("appearance.display.densityHint", "Rows, buttons, menus and the sidebar"),
|
|
193
|
+
textSize: i("appearance.display.textSize", "Text size"),
|
|
194
|
+
textSizeHint: i("appearance.display.textSizeHint", "All text in the app"),
|
|
195
|
+
glass: i("themeSwitcher.glass", "Glass"),
|
|
196
|
+
glassHint: i("appearance.display.glassHint", "See-through sidebar and panels over the background"),
|
|
197
|
+
glassSolid: i("appearance.display.glassSolid", "High contrast keeps surfaces solid"),
|
|
198
|
+
reduceMotion: i("themeSwitcher.reduceMotion", "Reduce motion"),
|
|
199
|
+
reduceMotionHint: i("appearance.display.reduceMotionHint", "Stops the background and page animations. Your device setting is respected either way."),
|
|
200
|
+
densities: {
|
|
201
|
+
compact: i("themeSwitcher.compact", "Compact"),
|
|
202
|
+
comfortable: i("themeSwitcher.comfortable", "Comfortable"),
|
|
203
|
+
spacious: i("themeSwitcher.spacious", "Spacious")
|
|
204
|
+
},
|
|
205
|
+
textSizes: {
|
|
206
|
+
small: i("themeSwitcher.small", "Small"),
|
|
207
|
+
default: i("themeSwitcher.default", "Default"),
|
|
208
|
+
large: i("themeSwitcher.large", "Large")
|
|
209
|
+
},
|
|
210
|
+
glasses: {
|
|
211
|
+
off: i("themeSwitcher.off", "Off"),
|
|
212
|
+
subtle: i("themeSwitcher.subtle", "Subtle"),
|
|
213
|
+
full: i("themeSwitcher.full", "Full")
|
|
214
|
+
},
|
|
215
|
+
previewTitle: i("appearance.preview.title", "Live preview"),
|
|
216
|
+
previewHide: i("appearance.preview.hide", "Hide"),
|
|
217
|
+
previewShow: i("appearance.preview.show", "Show"),
|
|
218
|
+
previewUnsaved: i("appearance.preview.unsaved", "Previewing, not saved"),
|
|
219
|
+
previewLabel: i("appearance.preview.label", "Preview of the Assistant start page"),
|
|
220
|
+
previewAssistant: i("appearance.preview.assistant", "{{product}} Assistant", { product: e }),
|
|
221
|
+
previewWelcome: i("appearance.preview.welcome", "Welcome to {{product}}", { product: e }),
|
|
222
|
+
previewWelcomeSub: i("appearance.preview.welcomeSub", "Tell me what you’d like to do. I’ll help you, step by step."),
|
|
223
|
+
previewAsk: i("appearance.preview.ask", "Ask me anything…"),
|
|
224
|
+
previewSuggestion1: i("appearance.preview.suggestion1", "Summarise my week"),
|
|
225
|
+
previewSuggestion2: i("appearance.preview.suggestion2", "What can you do?"),
|
|
226
|
+
dialogCreate: i("appearance.dialog.create", "Create a theme"),
|
|
227
|
+
dialogEdit: i("appearance.dialog.edit", "Edit theme"),
|
|
228
|
+
dialogNameError: i("appearance.dialog.nameError", "Give the theme a name."),
|
|
229
|
+
dialogStartFrom: i("appearance.dialog.startFrom", "Start from"),
|
|
230
|
+
dialogColour: i("appearance.dialog.colour", "Colour"),
|
|
231
|
+
dialogAnyColour: i("appearance.dialog.anyColour", "Or any colour"),
|
|
232
|
+
dialogPickAny: i("appearance.dialog.pickAny", "Pick any colour"),
|
|
233
|
+
dialogHex: i("appearance.dialog.hex", "Hex colour"),
|
|
234
|
+
dialogMode: i("appearance.dialog.mode", "Mode"),
|
|
235
|
+
dialogKeep: i("appearance.dialog.keep", "Follow my Mode setting"),
|
|
236
|
+
dialogAlwaysLight: i("appearance.dialog.alwaysLight", "Always light"),
|
|
237
|
+
dialogAlwaysDark: i("appearance.dialog.alwaysDark", "Always dark"),
|
|
238
|
+
dialogDarkOnly: (e) => i("appearance.dialog.darkOnly", "{{theme}} is dark only.", { theme: e }),
|
|
239
|
+
dialogFixed: i("appearance.dialog.fixed", "High contrast keeps its own colours."),
|
|
240
|
+
dialogSave: i("appearance.dialog.save", "Save theme"),
|
|
241
|
+
dialogSaveChanges: i("appearance.dialog.saveChanges", "Save changes"),
|
|
242
|
+
dialogDelete: i("appearance.dialog.delete", "Delete theme"),
|
|
243
|
+
dialogDeleteYes: i("appearance.dialog.deleteYes", "Delete"),
|
|
244
|
+
dialogKeepIt: i("appearance.dialog.keepIt", "Keep"),
|
|
245
|
+
dialogClose: i("appearance.dialog.close", "Close"),
|
|
246
|
+
dialogDefaultName: (e) => i("appearance.dialog.defaultName", "My theme {{count}}", { count: e }),
|
|
247
|
+
dialogReadable: (e) => i("appearance.dialog.readable", "Readable as it is: button text {{ratio}}.", { ratio: e }),
|
|
248
|
+
dialogAdjusted: (e, t) => i("appearance.dialog.adjusted", "Adjusted here so text stays readable: buttons use {{fill}} ({{ratio}}).", {
|
|
249
|
+
fill: e,
|
|
250
|
+
ratio: t
|
|
251
|
+
})
|
|
252
|
+
};
|
|
253
|
+
}, [
|
|
254
|
+
i,
|
|
255
|
+
a,
|
|
256
|
+
o
|
|
257
|
+
]);
|
|
258
|
+
}
|
|
259
|
+
export { i as useAppearanceLabels };
|
package/dist/chrome/index.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ export { PluginContextMenuTarget } from './PluginContextMenuTarget';
|
|
|
121
121
|
export type { PluginContextMenuTargetProps } from './PluginContextMenuTarget';
|
|
122
122
|
export { PluginFooterStrip } from './PluginFooterStrip';
|
|
123
123
|
export { ThemePreferences, type ThemePreferencesProps } from './ThemePreferences';
|
|
124
|
+
export { AppearancePreferences, type AppearancePreferencesProps, } from './appearance/AppearancePreferences';
|
|
124
125
|
export { BrandMark, DecorativeBrandMarkScope, type BrandMarkProps } from './BrandMark';
|
|
125
126
|
export { MobileTabBar, type MobileTabBarProps } from './MobileTabBar';
|
|
126
127
|
export { useMobileTabBarVisible } from './mobileTabBar/useMobileTabBarVisible';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PersonaSurfaceContextValue } from '../shared/providers/shell/PersonaSurfaceProvider';
|
|
2
|
+
export interface ViewOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** The view the user's role resolves to: marked "Your role". */
|
|
6
|
+
isOwnRole: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function buildViewOptions(persona: PersonaSurfaceContextValue, everythingLabel: string): ViewOption[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "../shared/providers/shell/PersonaSurfaceProvider.js";
|
|
2
|
+
// src/chrome/personaViewOptions.ts
|
|
3
|
+
function e(e, t) {
|
|
4
|
+
let { surfaces: n, availableSurfaceIds: r, roleSurfaceId: i } = e, a = (e) => e === "everything" ? t : n.find((t) => t.id === e)?.label ?? e, o = [...r];
|
|
5
|
+
return o.sort((e, t) => {
|
|
6
|
+
let n = (e) => e === i ? 0 : e === "everything" ? 2 : 1;
|
|
7
|
+
return n(e) - n(t);
|
|
8
|
+
}), o.map((e) => ({
|
|
9
|
+
id: e,
|
|
10
|
+
label: a(e),
|
|
11
|
+
isOwnRole: e === i
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
export { e as buildViewOptions };
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { ShellMenuItem, ShellSidebarAppearance } from './types';
|
|
2
|
+
export interface NewMenuSection {
|
|
3
|
+
/** Stable id; the caption's test id is `shell-new-section-<id>`. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The caption (already translated). */
|
|
6
|
+
label: string;
|
|
7
|
+
items: ShellMenuItem[];
|
|
8
|
+
}
|
|
2
9
|
export interface NewMenuProps {
|
|
3
10
|
items: ShellMenuItem[];
|
|
4
11
|
moreItems?: ShellMenuItem[];
|
|
12
|
+
/**
|
|
13
|
+
* BOFF-15549, opt-in: labelled groups (e.g. Record / Add / More) drawn after `items` and
|
|
14
|
+
* before `moreItems`, each under its caption. Unset or empty: nothing is added.
|
|
15
|
+
*/
|
|
16
|
+
sections?: NewMenuSection[];
|
|
5
17
|
collapsed?: boolean;
|
|
6
18
|
/**
|
|
7
19
|
* BOFF-15168: `floating` makes the expanded button 32 px tall, matching the
|
|
@@ -9,4 +21,4 @@ export interface NewMenuProps {
|
|
|
9
21
|
*/
|
|
10
22
|
appearance?: ShellSidebarAppearance;
|
|
11
23
|
}
|
|
12
|
-
export declare function NewMenu({ items, moreItems, collapsed, appearance, }: NewMenuProps): import('react').JSX.Element;
|
|
24
|
+
export declare function NewMenu({ items, moreItems, sections, collapsed, appearance, }: NewMenuProps): import('react').JSX.Element;
|
|
@@ -30,11 +30,11 @@ function y(e) {
|
|
|
30
30
|
]
|
|
31
31
|
}, e.id);
|
|
32
32
|
}
|
|
33
|
-
function b({ items: a, moreItems: o = [],
|
|
34
|
-
let
|
|
33
|
+
function b({ items: a, moreItems: o = [], sections: _ = [], collapsed: b = !1, appearance: x = "default" }) {
|
|
34
|
+
let S = t(), C = S("shell.newMenu.new", "New"), w = S("shell.newMenu.label", "Create something new");
|
|
35
35
|
return /* @__PURE__ */ m(r, {
|
|
36
36
|
modal: !1,
|
|
37
|
-
children: [
|
|
37
|
+
children: [b ? /* @__PURE__ */ m(c, {
|
|
38
38
|
delayDuration: 200,
|
|
39
39
|
children: [/* @__PURE__ */ p(u, {
|
|
40
40
|
asChild: !0,
|
|
@@ -42,7 +42,7 @@ function b({ items: a, moreItems: o = [], collapsed: _ = !1, appearance: b = "de
|
|
|
42
42
|
asChild: !0,
|
|
43
43
|
children: /* @__PURE__ */ p("button", {
|
|
44
44
|
type: "button",
|
|
45
|
-
"aria-label":
|
|
45
|
+
"aria-label": C,
|
|
46
46
|
"data-testid": "shell-new-trigger",
|
|
47
47
|
className: "flex size-10 items-center justify-center rounded-button text-text-secondary outline-none transition-colors hover:bg-bg-sunken hover:text-text-primary focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:bg-bg-sunken",
|
|
48
48
|
children: /* @__PURE__ */ p(d, {
|
|
@@ -55,7 +55,7 @@ function b({ items: a, moreItems: o = [], collapsed: _ = !1, appearance: b = "de
|
|
|
55
55
|
side: "right",
|
|
56
56
|
sideOffset: 10,
|
|
57
57
|
className: "rounded-md border border-border-subtle bg-popover px-2 py-1 text-text-primary shadow-overlay",
|
|
58
|
-
children:
|
|
58
|
+
children: C
|
|
59
59
|
})]
|
|
60
60
|
}) : /* @__PURE__ */ p(s, {
|
|
61
61
|
asChild: !0,
|
|
@@ -63,21 +63,34 @@ function b({ items: a, moreItems: o = [], collapsed: _ = !1, appearance: b = "de
|
|
|
63
63
|
type: "button",
|
|
64
64
|
size: "sm",
|
|
65
65
|
"data-testid": "shell-new-trigger",
|
|
66
|
-
className: h[
|
|
67
|
-
children: [/* @__PURE__ */ p(d, { "aria-hidden": "true" }),
|
|
66
|
+
className: h[x],
|
|
67
|
+
children: [/* @__PURE__ */ p(d, { "aria-hidden": "true" }), C]
|
|
68
68
|
})
|
|
69
69
|
}), /* @__PURE__ */ m(i, {
|
|
70
|
-
side:
|
|
70
|
+
side: b ? "right" : "bottom",
|
|
71
71
|
align: "start",
|
|
72
72
|
sideOffset: 6,
|
|
73
|
-
"aria-label":
|
|
73
|
+
"aria-label": w,
|
|
74
74
|
"data-testid": "shell-new-menu",
|
|
75
75
|
className: e(g, "w-[290px]"),
|
|
76
|
-
children: [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
children: [
|
|
77
|
+
a.map(y),
|
|
78
|
+
_.filter((e) => e.items.length > 0).map((e) => /* @__PURE__ */ m("div", {
|
|
79
|
+
role: "group",
|
|
80
|
+
"aria-label": e.label,
|
|
81
|
+
children: [/* @__PURE__ */ p("div", {
|
|
82
|
+
role: "presentation",
|
|
83
|
+
className: v,
|
|
84
|
+
"data-testid": `shell-new-section-${e.id}`,
|
|
85
|
+
children: e.label
|
|
86
|
+
}), e.items.map(y)]
|
|
87
|
+
}, e.id)),
|
|
88
|
+
o.length > 0 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
89
|
+
role: "presentation",
|
|
90
|
+
className: v,
|
|
91
|
+
children: S("shell.newMenu.more", "More")
|
|
92
|
+
}), o.map(y)] })
|
|
93
|
+
]
|
|
81
94
|
})]
|
|
82
95
|
});
|
|
83
96
|
}
|
|
@@ -604,6 +604,7 @@ function ge(n) {
|
|
|
604
604
|
className: C.aside,
|
|
605
605
|
children: S ? /* @__PURE__ */ D("div", {
|
|
606
606
|
"data-shell-panel": "",
|
|
607
|
+
"data-glass-surface": "",
|
|
607
608
|
className: me,
|
|
608
609
|
children: z
|
|
609
610
|
}) : z
|
|
@@ -855,6 +856,7 @@ function we(n) {
|
|
|
855
856
|
className: j.aside,
|
|
856
857
|
children: k ? /* @__PURE__ */ D("div", {
|
|
857
858
|
"data-shell-panel": "",
|
|
859
|
+
"data-glass-surface": "",
|
|
858
860
|
className: me,
|
|
859
861
|
children: H
|
|
860
862
|
}) : H
|
|
@@ -3,7 +3,17 @@ import { Account } from '../ProfileSwitcher';
|
|
|
3
3
|
import { ShellDoor, ShellHelpMenu, ShellMenuItem } from './types';
|
|
4
4
|
export type { ShellDoor } from './types';
|
|
5
5
|
export type ShellThemeValue = 'dark' | 'light' | 'system';
|
|
6
|
-
|
|
6
|
+
/** One Appearance choice a host passes in `theme.options` (BOFF-15549). */
|
|
7
|
+
export interface ShellThemeOption<T extends string = string> {
|
|
8
|
+
value: T;
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* `T` is the host's theme type. It defaults to the built-in union, so a host that passes none of
|
|
13
|
+
* the opt-in props and has a setter typed with that union (FluidGrids' `setMode`) compiles
|
|
14
|
+
* unchanged; a host with its own themes passes `options` and `T` is inferred from `value`.
|
|
15
|
+
*/
|
|
16
|
+
export interface SidebarProfileMenuProps<T extends string = ShellThemeValue> {
|
|
7
17
|
user: {
|
|
8
18
|
name: string;
|
|
9
19
|
email?: string;
|
|
@@ -34,8 +44,20 @@ export interface SidebarProfileMenuProps {
|
|
|
34
44
|
/** Right-hand hint on the Settings row, e.g. "Ctrl ,". */
|
|
35
45
|
settingsShortcut?: string;
|
|
36
46
|
theme: {
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
/** The host's current theme; one of `options` when the host passes them. */
|
|
48
|
+
value: T;
|
|
49
|
+
onChange(v: T): void;
|
|
50
|
+
/**
|
|
51
|
+
* Opt-in (BOFF-15549): the host's own Appearance choices (e.g. System, Light, Dark, Forest,
|
|
52
|
+
* Ocean, Sunset, High contrast), replacing the built-in Dark / Light / Match my device. The
|
|
53
|
+
* selection follows `value` and a pick calls `onChange(value)`.
|
|
54
|
+
*/
|
|
55
|
+
options?: ShellThemeOption<T>[];
|
|
56
|
+
/** Opt-in (BOFF-15549): one extra row under the choices, e.g. "More appearance settings…". */
|
|
57
|
+
more?: {
|
|
58
|
+
label: string;
|
|
59
|
+
onSelect(): void;
|
|
60
|
+
};
|
|
39
61
|
};
|
|
40
62
|
language: {
|
|
41
63
|
current: string;
|
|
@@ -52,6 +74,16 @@ export interface SidebarProfileMenuProps {
|
|
|
52
74
|
* a 340 px sub-menu and on the phone sheet. Unset: today's flat list.
|
|
53
75
|
*/
|
|
54
76
|
help?: ShellHelpMenu;
|
|
77
|
+
/**
|
|
78
|
+
* Opt-in "View ›" (BOFF-15549): a sub-menu in the popover, a section on the sheet, with the
|
|
79
|
+
* content and behaviour of `PersonaSurfaceControls` (search, Everything, the role views, My
|
|
80
|
+
* views, "New view from current…", Preview a role, Exit preview). Drawn only under a
|
|
81
|
+
* `PersonaSurfaceProvider`. Unset: nothing is added. "Customize menu" stays a host row
|
|
82
|
+
* (`extraItems`).
|
|
83
|
+
*/
|
|
84
|
+
personaViews?: {
|
|
85
|
+
label: string;
|
|
86
|
+
};
|
|
55
87
|
/** Keyboard shortcuts row (popover only). */
|
|
56
88
|
onKeyboardShortcuts?(): void;
|
|
57
89
|
/** Avatar-only trigger (collapsed sidebar). */
|
|
@@ -77,4 +109,4 @@ export interface PlanUsageCardProps {
|
|
|
77
109
|
* collapses to the name and "Manage" — no invented numbers.
|
|
78
110
|
*/
|
|
79
111
|
export declare function PlanUsageCard({ planName, onManage, used, limit, caption }: PlanUsageCardProps): import('react').JSX.Element;
|
|
80
|
-
export declare function SidebarProfileMenu({ user, roleLabel, orgName, planChip, accounts, activeAccountId, onSwitchAccount, onAddAccount, onRemoveAccount, onViewProfile, onLogout, planCard, doors, extraItems, onOpenSettings, settingsShortcut, theme, language, helpItems, help, onKeyboardShortcuts, collapsed, variant, open: openProp, onOpenChange, trigger, }: SidebarProfileMenuProps): import('react').JSX.Element | null;
|
|
112
|
+
export declare function SidebarProfileMenu<T extends string = ShellThemeValue>({ user, roleLabel, orgName, planChip, accounts, activeAccountId, onSwitchAccount, onAddAccount, onRemoveAccount, onViewProfile, onLogout, planCard, doors, extraItems, onOpenSettings, settingsShortcut, theme, language, helpItems, help, personaViews, onKeyboardShortcuts, collapsed, variant, open: openProp, onOpenChange, trigger, }: SidebarProfileMenuProps<T>): import('react').JSX.Element | null;
|