@burdenoff/fe-libs 2026.1115.2 → 2026.1115.4
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.
|
@@ -188,12 +188,29 @@ function B(e, t) {
|
|
|
188
188
|
function V() {
|
|
189
189
|
return typeof performance < "u" && performance.now() < u;
|
|
190
190
|
}
|
|
191
|
-
function H(e) {
|
|
191
|
+
async function H(e, t, n) {
|
|
192
|
+
let r = e.method.toUpperCase(), i = r !== "GET" && r !== "HEAD" && e.body !== null ? await e.arrayBuffer() : void 0, a = new Request(t, {
|
|
193
|
+
method: e.method,
|
|
194
|
+
headers: e.headers,
|
|
195
|
+
body: i,
|
|
196
|
+
keepalive: !0,
|
|
197
|
+
credentials: e.credentials,
|
|
198
|
+
mode: e.mode === "navigate" ? void 0 : e.mode,
|
|
199
|
+
cache: e.cache,
|
|
200
|
+
redirect: e.redirect,
|
|
201
|
+
referrer: e.referrer,
|
|
202
|
+
referrerPolicy: e.referrerPolicy,
|
|
203
|
+
integrity: e.integrity,
|
|
204
|
+
signal: e.signal
|
|
205
|
+
});
|
|
206
|
+
return n ? new Request(a, n) : a;
|
|
207
|
+
}
|
|
208
|
+
function U(e) {
|
|
192
209
|
let t = new Headers(e.headers), n = !1;
|
|
193
210
|
for (let e of v) t.has(e) && (t.delete(e), n = !0);
|
|
194
211
|
return n ? new Request(e, { headers: t }) : e;
|
|
195
212
|
}
|
|
196
|
-
function
|
|
213
|
+
function W(e, a) {
|
|
197
214
|
let l = r();
|
|
198
215
|
if (l) return l;
|
|
199
216
|
if (n()) {
|
|
@@ -204,7 +221,7 @@ function U(e, a) {
|
|
|
204
221
|
for (let e of d) if (u === e.hostname) return e.bases;
|
|
205
222
|
return a ?? c;
|
|
206
223
|
}
|
|
207
|
-
function
|
|
224
|
+
function G(e, t) {
|
|
208
225
|
let { globalBase: n, workspaceBase: r } = e;
|
|
209
226
|
if (!n || !r) return;
|
|
210
227
|
let i = P(e), a = globalThis.fetch.bind(globalThis), o = window.location.origin, s = /* @__PURE__ */ new Set([o, "https://gw-global.local.burdenoff.com"]), c = /* @__PURE__ */ new Set([o, "https://gw-wspace.local.burdenoff.com"]), u = (e) => /(?:^|\/)global\/graphql$/.test(e) ? "/global/graphql" : /(?:^|\/)workspaces\/graphql$/.test(e) ? "/workspaces/graphql" : "", d = (e) => {
|
|
@@ -214,7 +231,7 @@ function W(e, t) {
|
|
|
214
231
|
let n = /(?:^|\/)graphql$/.test(new URL(e.url).pathname);
|
|
215
232
|
if (i && n) return new Promise(() => void 0);
|
|
216
233
|
if (!(e.method.toUpperCase() === "POST" && n) || t || e.keepalive || e.cache === "no-store") return a(e);
|
|
217
|
-
let r = await e.clone().text(), o =
|
|
234
|
+
let r = await e.clone().text(), o = U(e.clone()), s = z(r);
|
|
218
235
|
if (!s?.length) return a(e);
|
|
219
236
|
let c = r.trimStart().startsWith("["), u = s.map((e) => R(o, e));
|
|
220
237
|
if (e.cache !== "reload" && e.cache !== "no-cache" && V() && u.every(Boolean)) {
|
|
@@ -237,16 +254,25 @@ function W(e, t) {
|
|
|
237
254
|
}, p = a, m = ((e, t) => {
|
|
238
255
|
if (e == null) return a(e, t);
|
|
239
256
|
let n = t?.keepalive === !0;
|
|
240
|
-
|
|
241
|
-
|
|
257
|
+
try {
|
|
258
|
+
if (e instanceof Request) return h(e, t, n);
|
|
259
|
+
let r = typeof e == "string" ? e : e.toString();
|
|
260
|
+
return f(new Request(d(r), t), n);
|
|
261
|
+
} catch (e) {
|
|
262
|
+
return Promise.reject(e);
|
|
263
|
+
}
|
|
264
|
+
}), h = (e, t, n) => {
|
|
265
|
+
let r = d(e.url), i = n || e.keepalive === !0;
|
|
266
|
+
if (r === e.url) return f(t ? new Request(e, t) : e, n);
|
|
267
|
+
if (!i) {
|
|
268
|
+
let i = new Request(r, e);
|
|
242
269
|
return f(t ? new Request(i, t) : i, n);
|
|
243
270
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
});
|
|
271
|
+
return H(e, r, t).then((e) => f(e, !0));
|
|
272
|
+
};
|
|
247
273
|
p.preconnect && (m.preconnect = p.preconnect), globalThis.fetch = m;
|
|
248
274
|
}
|
|
249
|
-
function
|
|
275
|
+
function K(e = "VITE_VERBOSE_CONSOLE") {
|
|
250
276
|
({
|
|
251
277
|
BASE_URL: "/",
|
|
252
278
|
DEV: !1,
|
|
@@ -255,4 +281,4 @@ function G(e = "VITE_VERBOSE_CONSOLE") {
|
|
|
255
281
|
SSR: !1
|
|
256
282
|
})[e] !== "true" && (console.log = () => {}, console.info = () => {}, console.debug = () => {});
|
|
257
283
|
}
|
|
258
|
-
export { x as clearGatewayGraphQLResponseCache,
|
|
284
|
+
export { x as clearGatewayGraphQLResponseCache, G as installGatewayFetchRewrite, W as resolveGatewayBases, K as suppressConsole };
|
|
@@ -5,6 +5,11 @@ export type CTAAction = {
|
|
|
5
5
|
intent?: 'default' | 'destructive';
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Why the action is disabled, for example "You don't have permission to create tags."
|
|
10
|
+
* Shown under the item's label while `disabled` is true (BOFF-10611). Pass translated text.
|
|
11
|
+
*/
|
|
12
|
+
disabledReason?: string;
|
|
8
13
|
/** Optional product-tour anchor, since collapsed menu items render no DOM node to target otherwise. */
|
|
9
14
|
dataTour?: string;
|
|
10
15
|
};
|
|
@@ -12,6 +17,12 @@ export type CTAPrimaryAction = {
|
|
|
12
17
|
label: string;
|
|
13
18
|
onSelect: () => void;
|
|
14
19
|
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Why the action is disabled, for example "You don't have permission to create tags."
|
|
22
|
+
* While `disabled` is true it shows in a tooltip on hover and keyboard focus, and is the
|
|
23
|
+
* button's accessible description (BOFF-10611). Pass translated text.
|
|
24
|
+
*/
|
|
25
|
+
disabledReason?: string;
|
|
15
26
|
icon?: ReactNode;
|
|
16
27
|
};
|
|
17
28
|
export type CTAOverflowMenuProps = {
|
|
@@ -24,6 +35,14 @@ export type CTAOverflowMenuProps = {
|
|
|
24
35
|
/** Optional className for the wrapping flex row. */
|
|
25
36
|
className?: string;
|
|
26
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* An overflow item's label. While the item is disabled and has a reason, the reason sits under
|
|
40
|
+
* the label in muted text, so a menu item explains itself without a hover (BOFF-10611).
|
|
41
|
+
* Exported for tests only; not part of the package's public `ui` entry.
|
|
42
|
+
*/
|
|
43
|
+
export declare function CTAActionLabel({ action, }: {
|
|
44
|
+
action: Pick<CTAAction, 'label' | 'disabled' | 'disabledReason'>;
|
|
45
|
+
}): import('react').JSX.Element;
|
|
27
46
|
/**
|
|
28
47
|
* CTAOverflowMenu — Boff UI 2.0 action-group primitive that enforces the
|
|
29
48
|
* "one primary CTA, everything else in a menu" rule. The primary action is a
|
|
@@ -2,39 +2,74 @@ import { cn as e } from "../shared-utils.js";
|
|
|
2
2
|
import { useShellLabel as t } from "../shared/providers/shell/useShellLabel.js";
|
|
3
3
|
import { Button as n } from "./button.js";
|
|
4
4
|
import { DropdownMenu as r, DropdownMenuContent as i, DropdownMenuItem as a, DropdownMenuTrigger as o } from "./dropdown-menu.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Tooltip as s, TooltipContent as c, TooltipTrigger as l } from "./tooltip.js";
|
|
6
|
+
import { useId as u } from "react";
|
|
7
|
+
import { MoreHorizontal as d } from "lucide-react";
|
|
8
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
9
|
// src/ui/cta-overflow-menu.tsx
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
function h({ primary: e }) {
|
|
11
|
+
let t = u(), r = e.disabled ? e.disabledReason?.trim() : void 0, i = /* @__PURE__ */ m(n, {
|
|
12
|
+
type: "button",
|
|
13
|
+
variant: "default",
|
|
14
|
+
onClick: e.onSelect,
|
|
15
|
+
disabled: e.disabled,
|
|
16
|
+
"aria-describedby": r ? t : void 0,
|
|
17
|
+
children: [e.icon, e.label]
|
|
18
|
+
});
|
|
19
|
+
return r ? /* @__PURE__ */ m(s, { children: [
|
|
20
|
+
/* @__PURE__ */ p(l, {
|
|
21
|
+
asChild: !0,
|
|
22
|
+
children: /* @__PURE__ */ p("span", {
|
|
23
|
+
"data-slot": "cta-primary-disabled",
|
|
24
|
+
tabIndex: 0,
|
|
25
|
+
"aria-describedby": t,
|
|
26
|
+
className: "inline-flex cursor-not-allowed rounded-button focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]",
|
|
27
|
+
children: i
|
|
28
|
+
})
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ p(c, { children: r }),
|
|
31
|
+
/* @__PURE__ */ p("span", {
|
|
32
|
+
id: t,
|
|
33
|
+
className: "sr-only",
|
|
34
|
+
children: r
|
|
35
|
+
})
|
|
36
|
+
] }) : i;
|
|
37
|
+
}
|
|
38
|
+
function g({ action: e }) {
|
|
39
|
+
let t = e.disabled ? e.disabledReason?.trim() : void 0;
|
|
40
|
+
return t ? /* @__PURE__ */ m("span", {
|
|
41
|
+
className: "flex flex-col",
|
|
42
|
+
children: [/* @__PURE__ */ p("span", { children: e.label }), /* @__PURE__ */ p("span", {
|
|
43
|
+
"data-slot": "cta-action-disabled-reason",
|
|
44
|
+
className: "text-xs text-text-muted",
|
|
45
|
+
children: t
|
|
46
|
+
})]
|
|
47
|
+
}) : /* @__PURE__ */ p(f, { children: e.label });
|
|
48
|
+
}
|
|
49
|
+
function _({ primary: s, actions: c, align: l = "end", className: u }) {
|
|
50
|
+
let f = t();
|
|
51
|
+
return /* @__PURE__ */ m("div", {
|
|
52
|
+
className: e("flex items-center gap-2", u),
|
|
53
|
+
children: [s ? /* @__PURE__ */ p(h, { primary: s }) : null, c.length > 0 ? /* @__PURE__ */ m(r, { children: [/* @__PURE__ */ p(o, {
|
|
19
54
|
asChild: !0,
|
|
20
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ p(n, {
|
|
21
56
|
type: "button",
|
|
22
57
|
variant: "outline",
|
|
23
58
|
size: "icon",
|
|
24
|
-
"aria-label":
|
|
25
|
-
children: /* @__PURE__ */
|
|
59
|
+
"aria-label": f("common.moreActions", "More actions"),
|
|
60
|
+
children: /* @__PURE__ */ p(d, {})
|
|
26
61
|
})
|
|
27
|
-
}), /* @__PURE__ */
|
|
28
|
-
align:
|
|
29
|
-
children:
|
|
62
|
+
}), /* @__PURE__ */ p(i, {
|
|
63
|
+
align: l,
|
|
64
|
+
children: c.map((t, n) => /* @__PURE__ */ m(a, {
|
|
30
65
|
"data-tour": t.dataTour,
|
|
31
66
|
disabled: t.disabled,
|
|
32
67
|
onSelect: t.onSelect,
|
|
33
68
|
className: e("gap-2", t.intent === "destructive" && "text-status-error-text focus:text-status-error-text focus:bg-status-error-bg-subtle"),
|
|
34
|
-
children: [t.icon, t
|
|
69
|
+
children: [t.icon, /* @__PURE__ */ p(g, { action: t })]
|
|
35
70
|
}, `${t.label}-${n}`))
|
|
36
71
|
})] }) : null]
|
|
37
72
|
});
|
|
38
73
|
}
|
|
39
|
-
|
|
40
|
-
export {
|
|
74
|
+
_.displayName = "CTAOverflowMenu";
|
|
75
|
+
export { g as CTAActionLabel, _ as CTAOverflowMenu };
|