@artstorefronts/arthelper-nav 0.1.0-alpha.7 → 0.1.0
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/index.css +53 -7
- package/dist/nav-bar.d.ts.map +1 -1
- package/dist/nav-bar.js +10 -5
- package/dist/nav-bar.js.map +1 -1
- package/dist/resolve.d.ts +3 -3
- package/dist/resolve.js +3 -3
- package/package.json +1 -1
- package/dist/theme.d.ts +0 -13
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -21
- package/dist/theme.js.map +0 -1
package/dist/index.css
CHANGED
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
* come back as a second release, not a second runtime branch.
|
|
32
32
|
* ------------------------------------------------------------------------- */
|
|
33
33
|
.ahsuite-bar,
|
|
34
|
-
.ahsuite-docked
|
|
34
|
+
.ahsuite-docked,
|
|
35
|
+
.ahsuite-panel {
|
|
35
36
|
--ahsuite-bar-bg: #12211a;
|
|
36
37
|
--ahsuite-bar-border: #ffffff1f;
|
|
37
38
|
--ahsuite-waffle-icon: #c4d2c8;
|
|
@@ -110,14 +111,40 @@
|
|
|
110
111
|
visibility 0s linear 0s;
|
|
111
112
|
}
|
|
112
113
|
|
|
113
|
-
.ahsuite-bar
|
|
114
|
+
.ahsuite-bar *,
|
|
115
|
+
.ahsuite-panel,
|
|
116
|
+
.ahsuite-panel * {
|
|
114
117
|
box-sizing: border-box;
|
|
115
118
|
}
|
|
116
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Sticky is opt-in, and so is the stacking that comes with it. The z-index has to clear
|
|
122
|
+
* ordinary page content scrolling underneath and nothing else — in particular it must sit
|
|
123
|
+
* BELOW the host's modal layer, which is z-50 in both hosts (the shadcn/`@artstorefronts/ui`
|
|
124
|
+
* convention: `SheetContent`, `DialogContent` and their overlays are all `fixed z-50`,
|
|
125
|
+
* portaled to `document.body`).
|
|
126
|
+
*
|
|
127
|
+
* At 60 it outranked that layer, and because nothing between this bar and `<body>` opens a
|
|
128
|
+
* stacking context in either host, the comparison happened at the root: the bar painted
|
|
129
|
+
* through the top 56px of every modal. Below the md breakpoint the sidebar itself becomes
|
|
130
|
+
* one of those sheets, which is how it showed — the sidebar slid out with its head cut off.
|
|
131
|
+
* Client never saw it only because client mounts the bar without `sticky`, so it has no
|
|
132
|
+
* z-index at all and the portaled sheet wins by document order.
|
|
133
|
+
*
|
|
134
|
+
* It does NOT need to clear the host header (also z-50): the header sticks at the bar's own
|
|
135
|
+
* live height, so the two are never over the same pixels.
|
|
136
|
+
*
|
|
137
|
+
* `.ahsuite-panel` is why NavBar renders the panel as a SIBLING of the bar rather than a
|
|
138
|
+
* child. `.ahsuite-bar` sets `isolation: isolate`, so anything inside it is sealed into its
|
|
139
|
+
* stacking context and the panel's own z-index only ever ordered it against the bar's own
|
|
140
|
+
* children. The panel hangs DOWN over the host header and has to cover it — which needs a
|
|
141
|
+
* layer above 50 — while the bar needs one below 50. Nested, those two are the same number
|
|
142
|
+
* and cannot both hold; as siblings each gets the layer it actually needs.
|
|
143
|
+
*/
|
|
117
144
|
.ahsuite-bar--sticky {
|
|
118
145
|
position: sticky;
|
|
119
146
|
top: 0;
|
|
120
|
-
z-index:
|
|
147
|
+
z-index: 40;
|
|
121
148
|
}
|
|
122
149
|
|
|
123
150
|
/* Collapse ACTUALLY minimizes: the bar leaves layout completely, reserving
|
|
@@ -449,6 +476,11 @@ span.ahsuite-row {
|
|
|
449
476
|
flex: 0 0 18px;
|
|
450
477
|
}
|
|
451
478
|
|
|
479
|
+
/**
|
|
480
|
+
* Rendered as a sibling of `.ahsuite-bar`, never inside it — `.ahsuite-bar` isolates, and a
|
|
481
|
+
* descendant cannot out-stack anything the bar itself sits under. This layer has to clear
|
|
482
|
+
* the host header (z-50 in both hosts) because the panel hangs down across it.
|
|
483
|
+
*/
|
|
452
484
|
.ahsuite-panel {
|
|
453
485
|
display: none;
|
|
454
486
|
position: fixed;
|
|
@@ -570,15 +602,29 @@ span.ahsuite-row {
|
|
|
570
602
|
display: inline-flex;
|
|
571
603
|
}
|
|
572
604
|
|
|
573
|
-
/* Nothing to centre once the tile row is gone, so the balancing pair stands down
|
|
574
|
-
*
|
|
575
|
-
*
|
|
605
|
+
/* Nothing to centre once the tile row is gone, so the balancing pair stands down: the
|
|
606
|
+
* brand takes its content width at the left and the trigger is pushed to the opposite
|
|
607
|
+
* end, giving the mobile bar the two anchors it reads best with — identity left, the
|
|
608
|
+
* one action right — instead of both crowded against each other with dead space after.
|
|
609
|
+
*
|
|
610
|
+
* `margin-left: auto` on the trigger rather than `flex: 1 1 auto` on the counterweight:
|
|
611
|
+
* an auto margin absorbs the free space BEFORE the item, so the trigger's right edge
|
|
612
|
+
* lands on the bar's own 12px padding and mirrors the waffle's left edge exactly.
|
|
613
|
+
*
|
|
614
|
+
* `.ahsuite-balance` is removed outright rather than zeroed. It is empty, so a zero
|
|
615
|
+
* basis would still leave it a flex item, and the bar's 10px `gap` applies between
|
|
616
|
+
* items whether or not they have width — the trigger would sit 22px from the edge
|
|
617
|
+
* against the waffle's 12px. Off the layout entirely, the gap goes with it. */
|
|
576
618
|
.ahsuite-brand {
|
|
577
619
|
flex: 0 0 auto;
|
|
578
620
|
}
|
|
579
621
|
|
|
622
|
+
.ahsuite-trigger {
|
|
623
|
+
margin-left: auto;
|
|
624
|
+
}
|
|
625
|
+
|
|
580
626
|
.ahsuite-balance {
|
|
581
|
-
|
|
627
|
+
display: none;
|
|
582
628
|
}
|
|
583
629
|
|
|
584
630
|
.ahsuite-panel {
|
package/dist/nav-bar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-bar.d.ts","sourceRoot":"","sources":["../src/nav-bar.tsx"],"names":[],"mappings":"AA4BA,UAAU,WAAW;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsED,iBAAS,MAAM,CAAC,EAAE,MAAc,EAAE,SAAS,EAAE,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"nav-bar.d.ts","sourceRoot":"","sources":["../src/nav-bar.tsx"],"names":[],"mappings":"AA4BA,UAAU,WAAW;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsED,iBAAS,MAAM,CAAC,EAAE,MAAc,EAAE,SAAS,EAAE,EAAE,WAAW,2CAqJzD;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/nav-bar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronDown, X } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { useNav } from './context.js';
|
|
@@ -89,9 +89,14 @@ function NavBar({ sticky = false, className }) {
|
|
|
89
89
|
// on a CHANGE of `collapsed`, so it could never have policed a panel opened while
|
|
90
90
|
// already collapsed. What makes that unreachable is the stylesheet — a collapsed
|
|
91
91
|
// `.ahsuite-bar` is `visibility: hidden`, which takes `.ahsuite-trigger` out of the
|
|
92
|
-
// tab order and the
|
|
93
|
-
//
|
|
94
|
-
//
|
|
92
|
+
// tab order and the accessibility tree, so there is no way left to reach the control
|
|
93
|
+
// that opens the panel.
|
|
94
|
+
//
|
|
95
|
+
// This effect carries more weight than it used to. The panel is now a SIBLING of the
|
|
96
|
+
// bar rather than a descendant (see the stacking note below), so the bar's collapsed
|
|
97
|
+
// `visibility: hidden` no longer reaches it — an open panel would otherwise survive a
|
|
98
|
+
// collapse on screen with its trigger gone. Between the two, `hidden` on the panel is
|
|
99
|
+
// what removes it, and this is what sets it.
|
|
95
100
|
useEffect(() => {
|
|
96
101
|
if (!collapsed) {
|
|
97
102
|
return;
|
|
@@ -103,7 +108,7 @@ function NavBar({ sticky = false, className }) {
|
|
|
103
108
|
setOpen(false);
|
|
104
109
|
}, [activate]);
|
|
105
110
|
const classes = ['ahsuite-bar', sticky ? 'ahsuite-bar--sticky' : '', className ?? ''].filter(Boolean).join(' ');
|
|
106
|
-
return (_jsxs("div", { "aria-label": "ArtHelper suite", className: classes, "data-collapsed": collapsed ? 'true' : 'false', role: "navigation", children: [_jsxs("div", { className: "ahsuite-brand", children: [_jsx("button", { "aria-expanded": !collapsed, "aria-label": collapsed ? 'Show the suite bar' : 'Hide the suite bar', className: "ahsuite-waffle", onClick: toggle, type: "button", children: _jsx(WaffleIcon, {}) }), _jsxs("a", { "aria-label": `${WORDMARK_STRONG}${WORDMARK_LIGHT}`, className: "ahsuite-wordmark", href: WORDMARK_HREF, children: [_jsx("span", { className: "ahsuite-wordmark-strong", children: WORDMARK_STRONG }), _jsx("span", { className: "ahsuite-wordmark-light", children: WORDMARK_LIGHT })] })] }), _jsx("div", { className: "ahsuite-tiles", children: apps.map((entry) => (_jsx(Tile, { entry: entry, onActivate: onActivate }, entry.app.id))) }), _jsxs("button", { "aria-controls": "ahsuite-panel", "aria-expanded": open, "aria-haspopup": "true", className: "ahsuite-trigger", onClick: () => setOpen((current) => !current), ref: triggerRef, type: "button", children: [activeApp ? _jsx(Chip, { entry: activeApp }) : null, _jsx("span", { className: "ahsuite-trigger-label", children: activeApp?.app.label ?? 'Apps' }), _jsx(ChevronDown, { "aria-hidden": "true", className: "ahsuite-chevron", height: 18, strokeWidth: 2, width: 18 })] }), _jsx("span", { "aria-hidden": "true", className: "ahsuite-balance" }), _jsxs("div", { "aria-label": "Apps", className: "ahsuite-panel", hidden: !open, id: "ahsuite-panel", ref: panelRef, role: "dialog", children: [_jsxs("div", { className: "ahsuite-panel-head", children: [_jsx("span", { className: "ahsuite-panel-title", children: "Apps" }), _jsxs("button", { "aria-label": "Close", className: "ahsuite-close", onClick: () => setOpen(false), type: "button", children: [_jsx(X, { "aria-hidden": "true", className: "ahsuite-icon", height: 14, strokeWidth: 2, width: 14 }), _jsx("span", { children: "Close" })] })] }), apps.map((entry) => (_jsx(Row, { entry: entry, onActivate: onActivate }, entry.app.id)))] })] }));
|
|
111
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { "aria-label": "ArtHelper suite", className: classes, "data-collapsed": collapsed ? 'true' : 'false', role: "navigation", children: [_jsxs("div", { className: "ahsuite-brand", children: [_jsx("button", { "aria-expanded": !collapsed, "aria-label": collapsed ? 'Show the suite bar' : 'Hide the suite bar', className: "ahsuite-waffle", onClick: toggle, type: "button", children: _jsx(WaffleIcon, {}) }), _jsxs("a", { "aria-label": `${WORDMARK_STRONG}${WORDMARK_LIGHT}`, className: "ahsuite-wordmark", href: WORDMARK_HREF, children: [_jsx("span", { className: "ahsuite-wordmark-strong", children: WORDMARK_STRONG }), _jsx("span", { className: "ahsuite-wordmark-light", children: WORDMARK_LIGHT })] })] }), _jsx("div", { className: "ahsuite-tiles", children: apps.map((entry) => (_jsx(Tile, { entry: entry, onActivate: onActivate }, entry.app.id))) }), _jsxs("button", { "aria-controls": "ahsuite-panel", "aria-expanded": open, "aria-haspopup": "true", className: "ahsuite-trigger", onClick: () => setOpen((current) => !current), ref: triggerRef, type: "button", children: [activeApp ? _jsx(Chip, { entry: activeApp }) : null, _jsx("span", { className: "ahsuite-trigger-label", children: activeApp?.app.label ?? 'Apps' }), _jsx(ChevronDown, { "aria-hidden": "true", className: "ahsuite-chevron", height: 18, strokeWidth: 2, width: 18 })] }), _jsx("span", { "aria-hidden": "true", className: "ahsuite-balance" })] }), _jsxs("div", { "aria-label": "Apps", className: "ahsuite-panel", hidden: !open, id: "ahsuite-panel", ref: panelRef, role: "dialog", children: [_jsxs("div", { className: "ahsuite-panel-head", children: [_jsx("span", { className: "ahsuite-panel-title", children: "Apps" }), _jsxs("button", { "aria-label": "Close", className: "ahsuite-close", onClick: () => setOpen(false), type: "button", children: [_jsx(X, { "aria-hidden": "true", className: "ahsuite-icon", height: 14, strokeWidth: 2, width: 14 }), _jsx("span", { children: "Close" })] })] }), apps.map((entry) => (_jsx(Row, { entry: entry, onActivate: onActivate }, entry.app.id)))] })] }));
|
|
107
112
|
}
|
|
108
113
|
export { NavBar };
|
|
109
114
|
//# sourceMappingURL=nav-bar.js.map
|
package/dist/nav-bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-bar.js","sourceRoot":"","sources":["../src/nav-bar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGjD;;;;;;;;;;GAUG;AACH;;;;GAIG;AACH,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,cAAc,GAAG,QAAQ,CAAC;AAChC,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAYlD,SAAS,SAAS,CAAC,KAAqB;IACtC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,cAAc,CAAC;AAC7E,CAAC;AAED,SAAS,IAAI,CAAC,EAAE,KAAK,EAA6B;IAChD,OAAO,CACL,eAAM,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,YAC/B,KAAC,OAAO,IAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,GAAI,GAC5B,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAA0E;IACzG,MAAM,SAAS,G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ACnB,KAAC,GAAG,IAAC,KAAK,EAAE,KAAK,EAAqB,UAAU,EAAE,UAAU,IAApC,KAAK,CAAC,GAAG,CAAC,EAAE,CAA4B,CACjE,CAAC,IACE,IACL,CACJ,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/resolve.d.ts
CHANGED
|
@@ -23,9 +23,9 @@ declare function hasDestination(app: NavApp): boolean;
|
|
|
23
23
|
* `fallbackConfig` arrive here identically.
|
|
24
24
|
*
|
|
25
25
|
* Note this is not a licence to invent destinations: only the ids the compiled-in
|
|
26
|
-
* FALLBACK_CONFIG actually carries
|
|
27
|
-
*
|
|
28
|
-
* guessing at a domain that may not exist on the stage yet.
|
|
26
|
+
* FALLBACK_CONFIG actually carries can be resolved this way, which is why an empty
|
|
27
|
+
* payload leaves a satellite host whose id is absent there with a genuinely empty bar
|
|
28
|
+
* rather than guessing at a domain that may not exist on the stage yet.
|
|
29
29
|
*/
|
|
30
30
|
declare function resolveApps(config: NavConfigPayload, activeAppId: string, fallback: NavConfigPayload): ResolvedNavApp[];
|
|
31
31
|
export { hasDestination, resolveApps };
|
package/dist/resolve.js
CHANGED
|
@@ -31,9 +31,9 @@ function findApp(apps, id) {
|
|
|
31
31
|
* `fallbackConfig` arrive here identically.
|
|
32
32
|
*
|
|
33
33
|
* Note this is not a licence to invent destinations: only the ids the compiled-in
|
|
34
|
-
* FALLBACK_CONFIG actually carries
|
|
35
|
-
*
|
|
36
|
-
* guessing at a domain that may not exist on the stage yet.
|
|
34
|
+
* FALLBACK_CONFIG actually carries can be resolved this way, which is why an empty
|
|
35
|
+
* payload leaves a satellite host whose id is absent there with a genuinely empty bar
|
|
36
|
+
* rather than guessing at a domain that may not exist on the stage yet.
|
|
37
37
|
*/
|
|
38
38
|
function resolveApps(config, activeAppId, fallback) {
|
|
39
39
|
const visible = config.apps.filter((app) => app.id === activeAppId || (app.enabled && hasDestination(app)));
|
package/package.json
CHANGED
package/dist/theme.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react';
|
|
2
|
-
import type { NavTheme } from './types.js';
|
|
3
|
-
/**
|
|
4
|
-
* The palettes themselves live in index.css, keyed off data-theme, so switching
|
|
5
|
-
* mode is a config edit rather than a package release. Only the two tokens CSS
|
|
6
|
-
* cannot know in advance come through inline.
|
|
7
|
-
*
|
|
8
|
-
* accent_color replaces the active chip's two-stop gradient with a single flat
|
|
9
|
-
* fill: one value cannot define two stops, so nothing is derived from it.
|
|
10
|
-
*/
|
|
11
|
-
declare function themeVars(theme: NavTheme): CSSProperties;
|
|
12
|
-
export { themeVars };
|
|
13
|
-
//# sourceMappingURL=theme.d.ts.map
|
package/dist/theme.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;GAOG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,aAAa,CASjD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/theme.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
/**
|
|
3
|
-
* The palettes themselves live in index.css, keyed off data-theme, so switching
|
|
4
|
-
* mode is a config edit rather than a package release. Only the two tokens CSS
|
|
5
|
-
* cannot know in advance come through inline.
|
|
6
|
-
*
|
|
7
|
-
* accent_color replaces the active chip's two-stop gradient with a single flat
|
|
8
|
-
* fill: one value cannot define two stops, so nothing is derived from it.
|
|
9
|
-
*/
|
|
10
|
-
function themeVars(theme) {
|
|
11
|
-
const vars = {
|
|
12
|
-
'--ahsuite-tiles-justify': theme.alignment === 'centered' ? 'center' : 'flex-start',
|
|
13
|
-
};
|
|
14
|
-
if (theme.accent_color) {
|
|
15
|
-
vars['--ahsuite-chip-active-bg'] = theme.accent_color;
|
|
16
|
-
vars['--ahsuite-chip-active-image'] = 'none';
|
|
17
|
-
}
|
|
18
|
-
return vars;
|
|
19
|
-
}
|
|
20
|
-
export { themeVars };
|
|
21
|
-
//# sourceMappingURL=theme.js.map
|
package/dist/theme.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAKb;;;;;;;GAOG;AACH,SAAS,SAAS,CAAC,KAAe;IAChC,MAAM,IAAI,GAA2B;QACnC,yBAAyB,EAAE,KAAK,CAAC,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY;KACpF,CAAC;IACF,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;QACvB,IAAI,CAAC,0BAA0B,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;QACtD,IAAI,CAAC,6BAA6B,CAAC,GAAG,MAAM,CAAC;IAC/C,CAAC;IACD,OAAO,IAAqB,CAAC;AAC/B,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|