@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 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 (_jsxs("nav", { style: { position: "relative", flex: "none" }, children: [_jsxs("div", { style: {
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",
@@ -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 app is always
27
- * kept), so every app shows the same "your apps" set without each one
28
- * re-implementing the filter. Omit to list every app in `apps`.
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. */
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skipleague/design",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "SkipUI — the SkipLeague design system: shared tokens and React components for every SkipLeague app.",
5
5
  "type": "module",
6
6
  "repository": {
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
- <nav style={{ position: "relative", flex: "none" }}>
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={{
@@ -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 app is always
32
- * kept), so every app shows the same "your apps" set without each one
33
- * re-implementing the filter. Omit to list every app in `apps`.
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 = enabledSlugs
114
- ? apps.filter((a) => a.slug === currentSlug || enabledSlugs.includes(a.slug))
115
- : apps;
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