@skipleague/design 0.4.6 → 0.4.8
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/BottomNav.js +6 -1
- package/dist/ProfileMenu.d.ts +5 -3
- package/dist/ProfileMenu.js +1 -1
- package/package.json +1 -1
- package/src/BottomNav.tsx +5 -1
- package/src/ProfileMenu.tsx +9 -6
package/dist/BottomNav.js
CHANGED
|
@@ -97,7 +97,12 @@ export function BottomNav({ tabs, action, groups }) {
|
|
|
97
97
|
const glow = activeTab?.color
|
|
98
98
|
? `0 0 22px 4px color-mix(in srgb, ${activeTab.color} 55%, transparent), 0 10px 22px color-mix(in srgb, ${activeTab.color} 30%, transparent)`
|
|
99
99
|
: ACTION_GLOW;
|
|
100
|
-
return (
|
|
100
|
+
return (
|
|
101
|
+
// `display: block` is set explicitly (not left to the nav default) so a host
|
|
102
|
+
// app's global `nav { display: grid/flex }` rule can't override it and
|
|
103
|
+
// collapse the full-width bar — the children below rely on normal block flow
|
|
104
|
+
// (the bar fills the width; the floating "+" is absolutely positioned).
|
|
105
|
+
_jsxs("nav", { style: { display: "block", position: "relative", flex: "none" }, children: [_jsxs("div", { style: {
|
|
101
106
|
background: "var(--skl-color-surface)",
|
|
102
107
|
borderTop: "1px solid var(--skl-color-border)",
|
|
103
108
|
position: "relative",
|
package/dist/ProfileMenu.d.ts
CHANGED
|
@@ -23,9 +23,11 @@ export interface ProfileMenuProps {
|
|
|
23
23
|
apps?: AppLink[];
|
|
24
24
|
/**
|
|
25
25
|
* Slugs of the apps THIS user has enabled (e.g. the platform's `app_slugs`).
|
|
26
|
-
* When provided, the switcher shows only those apps (the current
|
|
27
|
-
* kept), so every app shows the same "your apps" set without each
|
|
28
|
-
* re-implementing the filter. Omit to list every
|
|
26
|
+
* When provided and non-empty, the switcher shows only those apps (the current
|
|
27
|
+
* app is always kept), so every app shows the same "your apps" set without each
|
|
28
|
+
* one re-implementing the filter. Omit — or pass an EMPTY array — to list every
|
|
29
|
+
* app in `apps`. (Empty is treated as "show all" so super-admins, who are
|
|
30
|
+
* authorized without per-app slugs, don't get an empty switcher.)
|
|
29
31
|
*/
|
|
30
32
|
enabledSlugs?: string[];
|
|
31
33
|
/** Target of the "Manage account" link. Defaults to the platform account page. */
|
package/dist/ProfileMenu.js
CHANGED
|
@@ -37,7 +37,7 @@ export function ProfileMenu({ user, currentSlug, apps = SKIPLEAGUE_APPS, enabled
|
|
|
37
37
|
}, [open]);
|
|
38
38
|
// Show only the apps this user has enabled (always keeping the current app),
|
|
39
39
|
// when the caller passes the user's enabled slugs. Otherwise list every app.
|
|
40
|
-
const visibleApps = enabledSlugs
|
|
40
|
+
const visibleApps = enabledSlugs && enabledSlugs.length > 0
|
|
41
41
|
? apps.filter((a) => a.slug === currentSlug || enabledSlugs.includes(a.slug))
|
|
42
42
|
: apps;
|
|
43
43
|
const signedIn = !!(user?.displayName || user?.email);
|
package/package.json
CHANGED
package/src/BottomNav.tsx
CHANGED
|
@@ -168,7 +168,11 @@ export function BottomNav({ tabs, action, groups }: BottomNavProps) {
|
|
|
168
168
|
: ACTION_GLOW;
|
|
169
169
|
|
|
170
170
|
return (
|
|
171
|
-
|
|
171
|
+
// `display: block` is set explicitly (not left to the nav default) so a host
|
|
172
|
+
// app's global `nav { display: grid/flex }` rule can't override it and
|
|
173
|
+
// collapse the full-width bar — the children below rely on normal block flow
|
|
174
|
+
// (the bar fills the width; the floating "+" is absolutely positioned).
|
|
175
|
+
<nav style={{ display: "block", position: "relative", flex: "none" }}>
|
|
172
176
|
{/* Bar — clips the glow at its top edge ("the line"). */}
|
|
173
177
|
<div
|
|
174
178
|
style={{
|
package/src/ProfileMenu.tsx
CHANGED
|
@@ -28,9 +28,11 @@ export interface ProfileMenuProps {
|
|
|
28
28
|
apps?: AppLink[];
|
|
29
29
|
/**
|
|
30
30
|
* Slugs of the apps THIS user has enabled (e.g. the platform's `app_slugs`).
|
|
31
|
-
* When provided, the switcher shows only those apps (the current
|
|
32
|
-
* kept), so every app shows the same "your apps" set without each
|
|
33
|
-
* re-implementing the filter. Omit to list every
|
|
31
|
+
* When provided and non-empty, the switcher shows only those apps (the current
|
|
32
|
+
* app is always kept), so every app shows the same "your apps" set without each
|
|
33
|
+
* one re-implementing the filter. Omit — or pass an EMPTY array — to list every
|
|
34
|
+
* app in `apps`. (Empty is treated as "show all" so super-admins, who are
|
|
35
|
+
* authorized without per-app slugs, don't get an empty switcher.)
|
|
34
36
|
*/
|
|
35
37
|
enabledSlugs?: string[];
|
|
36
38
|
/** Target of the "Manage account" link. Defaults to the platform account page. */
|
|
@@ -110,9 +112,10 @@ export function ProfileMenu({
|
|
|
110
112
|
|
|
111
113
|
// Show only the apps this user has enabled (always keeping the current app),
|
|
112
114
|
// when the caller passes the user's enabled slugs. Otherwise list every app.
|
|
113
|
-
const visibleApps =
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
const visibleApps =
|
|
116
|
+
enabledSlugs && enabledSlugs.length > 0
|
|
117
|
+
? apps.filter((a) => a.slug === currentSlug || enabledSlugs.includes(a.slug))
|
|
118
|
+
: apps;
|
|
116
119
|
|
|
117
120
|
const signedIn = !!(user?.displayName || user?.email);
|
|
118
121
|
// Signed-out menu only when a sign-in handler is supplied — otherwise keep the
|