@cboxdk/cbox-ui 0.10.3 → 0.10.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.
- package/README.md +17 -2
- package/dist/index.d.ts +20 -5
- package/dist/index.js +60 -30
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/tailwind.preset.js +4 -0
- package/tokens/cbox.css +17 -0
- package/tokens/shell.css +10 -8
package/README.md
CHANGED
|
@@ -334,7 +334,7 @@ moves focus to `<main id={mainId}>` (default `main-content`).
|
|
|
334
334
|
| `level.listUrl` | `GET ?q=&parent=&cursor=&limit=` | `{ object: "list", data: ContextItem[], has_more, next_cursor }`. Loaded when a menu opens; every level below the first gets `parent`, the level above's id (projects of an organization, environments of a project). Answers are kept for the page and dropped when the context changes. |
|
|
335
335
|
| `level.createUrl` | `POST { name, parent? }` | `{ id, detailsUrl }` (or `details_url`). The person lands on `detailsUrl`. A 422 shows its first error under the field. |
|
|
336
336
|
| `account.switchAccountUrl` | A plain link (full page load) | Usually a redirect to Cbox ID's account chooser. |
|
|
337
|
-
| `context.switchUrl` | `POST { <level key>: id,
|
|
337
|
+
| `context.switchUrl` | `POST { select: { <level key>: id, … }, from }` (a form post through `navigate`; as a form, `select[project]=…&from=…`). laravel-console-kit's `/shell/switch` reads it. 0.10.3 and older posted the flat `{ <level key>: id, …, return_to }`, which console-kit 0.2.5 still accepts. | A redirect: the same page in the new context, or that area's list for an entity page (§5.6). |
|
|
338
338
|
| `palette.searchUrl` | `GET ?q=` | `{ data: [{ id, title, subtitle?, url }] }`, in the current context. |
|
|
339
339
|
| `palette.gotoUrl` | `GET ?q=` | `{ data: [{ title, subtitle?, levels?: { organization, project, … }, url? }] }` across organizations. |
|
|
340
340
|
| `apps.catalogUrl` | `GET` | The catalog below, plus `in_organization`, `admission_url`, `purpose` and `hue` per app. |
|
|
@@ -389,11 +389,20 @@ a prop of the header: Help needs it on the first paint and on pages without a he
|
|
|
389
389
|
⌘K / Ctrl+K opens the palette anywhere (↑↓ move, Enter opens, ⌘Enter opens in a new tab, Esc
|
|
390
390
|
closes). In the context menus ↑↓ Home End move, Enter picks, → makes a row's gear the active
|
|
391
391
|
option (Enter opens its settings; in the cascade a second → crosses to the environments), ←
|
|
392
|
-
goes back, Esc closes and Tab leaves; focus returns to the trigger. ↓
|
|
392
|
+
goes back, Esc closes and Tab leaves; focus returns to the trigger. ↓ on a context trigger
|
|
393
|
+
opens its menu, and focus moves into the menu when it opens: the search field with a fine
|
|
394
|
+
pointer, else the list itself (typing there goes on in the search). ↓ past the last row
|
|
393
395
|
reaches "New …" and ↑ above the first reaches "View all", so both work without a mouse; in the
|
|
394
396
|
app grid End and ↓ from the bottom row reach "All products". ⌘. collapses the subnav. Search fields focus themselves only with a fine pointer and
|
|
395
397
|
hover, never on touch. Sheets and the Help overlay trap focus; the docked column does not.
|
|
396
398
|
|
|
399
|
+
### Scrolling
|
|
400
|
+
|
|
401
|
+
The document scrolls, not a box inside the shell. The rail, the header, the subnav and docked
|
|
402
|
+
Help stay in view with `position: sticky`. So Inertia resets the scroll on a new page and
|
|
403
|
+
restores it on back and forward with no `scroll-region`, and a full-page screenshot shows the
|
|
404
|
+
whole page. A page that needs its own scroller (a wide table) brings one.
|
|
405
|
+
|
|
397
406
|
### Phone (< 768px)
|
|
398
407
|
|
|
399
408
|
The header holds ☰ (areas, pages, Switch app, notifications, the account), one context button
|
|
@@ -416,3 +425,9 @@ Core tokens now match the warm cream/ink design-system colors. Body text uses
|
|
|
416
425
|
the system stack; hosts self-host Plus Jakarta Sans for headings and JetBrains
|
|
417
426
|
Mono for technical values. Card/control/badge radii are 12/8/6px. The main canvas
|
|
418
427
|
uses the approved single radial wash at 30% 0 in both themes.
|
|
428
|
+
|
|
429
|
+
Words and icons in a tone use the tone's text token, not its fill: `--success-text`,
|
|
430
|
+
`--info-text`, `--warning-text` and `--destructive-text` (`text-success-text` and so on). They
|
|
431
|
+
reach 4.5:1 on the tone's soft tint over a card, the canvas or the background, in light and
|
|
432
|
+
dark; the fills (`--success` …) are for dots, squares and solid buttons. `StatusPill` and
|
|
433
|
+
`StatTile` use them. `tests/tokens/contrast.test.ts` checks every pair.
|
package/dist/index.d.ts
CHANGED
|
@@ -672,10 +672,23 @@ declare function settingsHref(level: Pick<ContextLevel, 'settingsUrl'>, id: stri
|
|
|
672
672
|
* name when the project has it, else its first. Undefined when the project has none.
|
|
673
673
|
*/
|
|
674
674
|
declare function environmentFor(environments: readonly ContextItem[], currentName: string | undefined): ContextItem | undefined;
|
|
675
|
+
/** The body `CboxShell` posts to `context.switchUrl`: laravel-console-kit's `select` and `from`. */
|
|
676
|
+
type SwitchBody = {
|
|
677
|
+
select: Record<string, string>;
|
|
678
|
+
from: string;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* The switch body (§5.6): every level above the chosen one keeps its current id, the chosen
|
|
682
|
+
* levels get theirs, and levels below are left to the server (it keeps the item with the same
|
|
683
|
+
* name, else the first). `from` is where the person is, so the server can stay on the same page.
|
|
684
|
+
* This is the shape `POST /shell/switch` reads in laravel-console-kit, and the same one its
|
|
685
|
+
* palette links use as a query (`?select[project]=…&from=…`).
|
|
686
|
+
*/
|
|
687
|
+
declare function switchBody(levels: readonly ContextLevel[], chosen: Record<string, string>, from: string): SwitchBody;
|
|
675
688
|
/**
|
|
676
|
-
* The
|
|
677
|
-
*
|
|
678
|
-
*
|
|
689
|
+
* @deprecated The flat body 0.10.3 and older posted, `{ <level key>: id, …, return_to }`, which
|
|
690
|
+
* laravel-console-kit 0.2.4 and older answered with a 404. `CboxShell` posts `switchBody()` now.
|
|
691
|
+
* Kept for one minor; removed in 0.11.
|
|
679
692
|
*/
|
|
680
693
|
declare function switchPayload(levels: readonly ContextLevel[], chosen: Record<string, string>, returnTo: string): Record<string, string>;
|
|
681
694
|
|
|
@@ -943,7 +956,9 @@ type SectionHeaderProps = {
|
|
|
943
956
|
};
|
|
944
957
|
/**
|
|
945
958
|
* Section header that sits inside a DataPanel. Title in semibold sans,
|
|
946
|
-
* optional muted lead, right-aligned actions slot.
|
|
959
|
+
* optional muted lead, right-aligned actions slot. The actions stay beside
|
|
960
|
+
* the title while there is room (also on a phone) and wrap under it, left
|
|
961
|
+
* aligned, when there is not; several actions wrap among themselves.
|
|
947
962
|
*/
|
|
948
963
|
declare function SectionHeader({ title, description, actions, className, }: SectionHeaderProps): react_jsx_runtime.JSX.Element;
|
|
949
964
|
/**
|
|
@@ -1472,4 +1487,4 @@ declare function Sparkline({ values, color, width, height }: {
|
|
|
1472
1487
|
height?: number;
|
|
1473
1488
|
}): react_jsx_runtime.JSX.Element | null;
|
|
1474
1489
|
|
|
1475
|
-
export { APP_HUES, AppContent, type AppKey, AppShell, CHART_PALETTE, CboxAppCatalog, type CboxAppCatalogProps, CboxAppIcon, type CboxAppIconProps, type CboxAppKey, type CboxAppLink, CboxBrand, type CboxBrandProps, type CboxIdContextValue, CboxIdProvider, CboxKnownApp, CboxLocalizationProvider, type CboxNotificationPreviewItem, type CboxNotificationsState, type CboxOrganization, CboxServiceMark, type CboxServiceMarkProps, CboxShell, type CboxShellProps, CboxSurfaces, type CboxSurfacesProps, type CboxTranslationValues, type CboxTranslator, type CboxUser, Combobox, type ComboboxAvatar, type ComboboxGroup, type ComboboxOption, type ComboboxProps, type ContextItem, type ContextLevel, type ContextTone, DataPanel, EmptyState, Heading, type HelpArticle, type HelpState, type HelpStore, type InboxState, type InferUrlState, KeyValue, KeyValueList, type ListPage, type NavArea, type NavPage, PageHeader, type PageIntent, PageShell, type PageTabSpec, PageTabs, type PageTabsProps, type PageWidth, type PaletteAction, PanelBody, type RealtimeState, type RealtimeStatus, RowLink, type RowLinkProps, SHELL_ICONS, SectionHeader, type Shell, type ShellAccount, type Link as ShellActionLink, type ShellApp, type ShellBanner, type ShellCatalogState, type ShellHelp, type ShellIcon, type ShellLinkComponent, type ShellNavigate, type ShellNotifications, type ShellOption, type ShellPreferenceChange, type ShellPreferences, type ShellTheme, Sparkline, StatTile, StatusPill, type SupportUpdate, type SurfaceArgs, type SurfaceConfig, type SurfaceController, type SurfaceId, type Transport, type UrlField, type UrlSchema, applyTheme, buildUrlSearch, cn, contextTrail, createHelpStore, defineUrlSchema, environmentFor, hueFor, initialsOf, interpolate, pageIntent, parseListPage, parseShellCatalog, parseUrlSearch, settingsHref, switchPayload, themeBootScript, urlBoolean, urlEnum, urlNumber, urlString, urlStringArray, useCboxId, useCboxIdOptional, useCboxLocalization, useCboxSurfaces, useCboxSurfacesOptional, useKnownAppCatalog, useShellHelp, withQuery };
|
|
1490
|
+
export { APP_HUES, AppContent, type AppKey, AppShell, CHART_PALETTE, CboxAppCatalog, type CboxAppCatalogProps, CboxAppIcon, type CboxAppIconProps, type CboxAppKey, type CboxAppLink, CboxBrand, type CboxBrandProps, type CboxIdContextValue, CboxIdProvider, CboxKnownApp, CboxLocalizationProvider, type CboxNotificationPreviewItem, type CboxNotificationsState, type CboxOrganization, CboxServiceMark, type CboxServiceMarkProps, CboxShell, type CboxShellProps, CboxSurfaces, type CboxSurfacesProps, type CboxTranslationValues, type CboxTranslator, type CboxUser, Combobox, type ComboboxAvatar, type ComboboxGroup, type ComboboxOption, type ComboboxProps, type ContextItem, type ContextLevel, type ContextTone, DataPanel, EmptyState, Heading, type HelpArticle, type HelpState, type HelpStore, type InboxState, type InferUrlState, KeyValue, KeyValueList, type ListPage, type NavArea, type NavPage, PageHeader, type PageIntent, PageShell, type PageTabSpec, PageTabs, type PageTabsProps, type PageWidth, type PaletteAction, PanelBody, type RealtimeState, type RealtimeStatus, RowLink, type RowLinkProps, SHELL_ICONS, SectionHeader, type Shell, type ShellAccount, type Link as ShellActionLink, type ShellApp, type ShellBanner, type ShellCatalogState, type ShellHelp, type ShellIcon, type ShellLinkComponent, type ShellNavigate, type ShellNotifications, type ShellOption, type ShellPreferenceChange, type ShellPreferences, type ShellTheme, Sparkline, StatTile, StatusPill, type SupportUpdate, type SurfaceArgs, type SurfaceConfig, type SurfaceController, type SurfaceId, type SwitchBody, type Transport, type UrlField, type UrlSchema, applyTheme, buildUrlSearch, cn, contextTrail, createHelpStore, defineUrlSchema, environmentFor, hueFor, initialsOf, interpolate, pageIntent, parseListPage, parseShellCatalog, parseUrlSearch, settingsHref, switchBody, switchPayload, themeBootScript, urlBoolean, urlEnum, urlNumber, urlString, urlStringArray, useCboxId, useCboxIdOptional, useCboxLocalization, useCboxSurfaces, useCboxSurfacesOptional, useKnownAppCatalog, useShellHelp, withQuery };
|
package/dist/index.js
CHANGED
|
@@ -157,7 +157,7 @@ function Popover({
|
|
|
157
157
|
return () => document.removeEventListener("pointerdown", down, true);
|
|
158
158
|
}, [open, anchor, onClose]);
|
|
159
159
|
if (!open) return null;
|
|
160
|
-
const style = position === null ? { position: "fixed", top: 0, left: 0,
|
|
160
|
+
const style = position === null ? { position: "fixed", top: 0, left: 0, opacity: 0, pointerEvents: "none" } : { position: "fixed", top: position.top, bottom: position.bottom, left: position.left, maxHeight: position.maxHeight };
|
|
161
161
|
return /* @__PURE__ */ jsx(
|
|
162
162
|
"div",
|
|
163
163
|
{
|
|
@@ -687,16 +687,19 @@ function environmentFor(environments, currentName) {
|
|
|
687
687
|
}
|
|
688
688
|
return environments[0];
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
const
|
|
690
|
+
function switchBody(levels, chosen, from) {
|
|
691
|
+
const select = {};
|
|
692
692
|
const deepest = Math.max(-1, ...levels.map((level, index) => chosen[level.key] !== void 0 ? index : -1));
|
|
693
693
|
levels.forEach((level, index) => {
|
|
694
694
|
const id = chosen[level.key];
|
|
695
|
-
if (id !== void 0)
|
|
696
|
-
else if (index < deepest)
|
|
695
|
+
if (id !== void 0) select[level.key] = id;
|
|
696
|
+
else if (index < deepest) select[level.key] = level.current.id;
|
|
697
697
|
});
|
|
698
|
-
|
|
699
|
-
|
|
698
|
+
return { select, from };
|
|
699
|
+
}
|
|
700
|
+
function switchPayload(levels, chosen, returnTo) {
|
|
701
|
+
const { select } = switchBody(levels, chosen, returnTo);
|
|
702
|
+
return { ...select, return_to: returnTo };
|
|
700
703
|
}
|
|
701
704
|
function cookie(name) {
|
|
702
705
|
if (typeof document === "undefined") return null;
|
|
@@ -782,16 +785,27 @@ var defaultNavigate = (url, options = {}) => {
|
|
|
782
785
|
const fields = { ...options.data ?? {} };
|
|
783
786
|
const token = csrfToken();
|
|
784
787
|
if (token !== null) fields._token = token;
|
|
785
|
-
for (const [name, value] of
|
|
788
|
+
for (const [name, value] of formFields(fields)) {
|
|
786
789
|
const input = document.createElement("input");
|
|
787
790
|
input.type = "hidden";
|
|
788
791
|
input.name = name;
|
|
789
|
-
input.value =
|
|
792
|
+
input.value = value;
|
|
790
793
|
form.append(input);
|
|
791
794
|
}
|
|
792
795
|
document.body.append(form);
|
|
793
796
|
form.submit();
|
|
794
797
|
};
|
|
798
|
+
function formFields(data, prefix) {
|
|
799
|
+
const out = [];
|
|
800
|
+
for (const [key, value] of Object.entries(data)) {
|
|
801
|
+
const name = prefix === void 0 ? key : `${prefix}[${key}]`;
|
|
802
|
+
if (value === void 0 || value === null) continue;
|
|
803
|
+
if (typeof value === "object" && !Array.isArray(value)) out.push(...formFields(value, name));
|
|
804
|
+
else if (Array.isArray(value)) value.forEach((item, index) => out.push([`${name}[${index}]`, String(item)]));
|
|
805
|
+
else out.push([name, String(value)]);
|
|
806
|
+
}
|
|
807
|
+
return out;
|
|
808
|
+
}
|
|
795
809
|
function currentLocation() {
|
|
796
810
|
if (typeof window === "undefined") return "/";
|
|
797
811
|
return window.location.pathname + window.location.search + window.location.hash;
|
|
@@ -929,7 +943,9 @@ function LevelPane({ level, parent, currentId, heading, viewAll = true, searchab
|
|
|
929
943
|
});
|
|
930
944
|
}, [list.status, list.items, q, currentId]);
|
|
931
945
|
useEffect(() => {
|
|
932
|
-
if (autoFocus
|
|
946
|
+
if (!autoFocus) return;
|
|
947
|
+
if (searchable && canAutofocus()) input.current?.focus();
|
|
948
|
+
else box.current?.focus({ preventScroll: true });
|
|
933
949
|
}, [autoFocus, searchable]);
|
|
934
950
|
const focusSelf = useCallback(() => {
|
|
935
951
|
if (searchable) input.current?.focus();
|
|
@@ -974,6 +990,10 @@ function LevelPane({ level, parent, currentId, heading, viewAll = true, searchab
|
|
|
974
990
|
};
|
|
975
991
|
const onKeyDown = (event) => {
|
|
976
992
|
if (event.target instanceof HTMLElement && event.target.closest(".cbx-create")) return;
|
|
993
|
+
if (searchable && event.target === box.current && event.key.length === 1 && !event.metaKey && !event.ctrlKey && !event.altKey) {
|
|
994
|
+
input.current?.focus();
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
977
997
|
if (event.target instanceof HTMLElement && event.target.closest("[data-pane-action]")) return;
|
|
978
998
|
const last = options.length - 1;
|
|
979
999
|
switch (event.key) {
|
|
@@ -1089,7 +1109,7 @@ function LevelPane({ level, parent, currentId, heading, viewAll = true, searchab
|
|
|
1089
1109
|
role: "listbox",
|
|
1090
1110
|
"aria-label": heading,
|
|
1091
1111
|
tabIndex: searchable ? -1 : 0,
|
|
1092
|
-
"aria-activedescendant":
|
|
1112
|
+
"aria-activedescendant": activeId,
|
|
1093
1113
|
className: "cbx-listbox",
|
|
1094
1114
|
children: options.map((option, index) => {
|
|
1095
1115
|
if (option.kind === "more") {
|
|
@@ -2410,7 +2430,7 @@ function CboxShell({ shell, children, navigate = defaultNavigate, LinkComponent
|
|
|
2410
2430
|
},
|
|
2411
2431
|
switchTo: (chosen) => {
|
|
2412
2432
|
setOverlay(null);
|
|
2413
|
-
navigate(switchUrl, { method: "post", data:
|
|
2433
|
+
navigate(switchUrl, { method: "post", data: switchBody(levels, chosen, currentLocation()) });
|
|
2414
2434
|
}
|
|
2415
2435
|
}),
|
|
2416
2436
|
[shell, t, navigate, LinkComponent, icons, preferences, setPreference, overlay, store, toggleHelp, levels, switchUrl]
|
|
@@ -2602,10 +2622,20 @@ function Header({ mobile }) {
|
|
|
2602
2622
|
const [organization, ...rest] = shell.context.levels;
|
|
2603
2623
|
const trail = shell.context.levels.map((level) => level.current.name).join(" / ");
|
|
2604
2624
|
const close = useCallback(() => setOverlay(null), [setOverlay]);
|
|
2625
|
+
const triggerKeyDown = (event, menu) => {
|
|
2626
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
2627
|
+
event.preventDefault();
|
|
2628
|
+
if (overlay !== menu) setOverlay(menu);
|
|
2629
|
+
else document.querySelector('.cbx-popover .cbx-pane-search input, .cbx-popover [role="listbox"]')?.focus();
|
|
2630
|
+
} else if (event.key === "Escape" && overlay === menu) {
|
|
2631
|
+
event.preventDefault();
|
|
2632
|
+
setOverlay(null);
|
|
2633
|
+
}
|
|
2634
|
+
};
|
|
2605
2635
|
return /* @__PURE__ */ jsxs("header", { className: "cbx-header", children: [
|
|
2606
2636
|
/* @__PURE__ */ jsx("button", { type: "button", className: "cbx-icon-button cbx-only-mobile", onClick: () => setOverlay("nav-sheet"), "aria-label": t("Open navigation"), "aria-haspopup": "dialog", children: /* @__PURE__ */ jsx(Menu, { size: 20, strokeWidth: 1.8, "aria-hidden": true }) }),
|
|
2607
2637
|
organization !== void 0 && /* @__PURE__ */ jsxs("div", { className: "cbx-context cbx-only-desktop", children: [
|
|
2608
|
-
/* @__PURE__ */ jsxs("button", { ref: org, type: "button", className: `cbx-trigger ${overlay === "org" ? "is-open" : ""}`, "aria-haspopup": "dialog", "aria-expanded": overlay === "org", "aria-label": t("{level}: {name}", { level: organization.label, name: organization.current.name }), onClick: () => setOverlay(overlay === "org" ? null : "org"), children: [
|
|
2638
|
+
/* @__PURE__ */ jsxs("button", { ref: org, type: "button", className: `cbx-trigger ${overlay === "org" ? "is-open" : ""}`, "aria-haspopup": "dialog", "aria-expanded": overlay === "org", "aria-label": t("{level}: {name}", { level: organization.label, name: organization.current.name }), onClick: () => setOverlay(overlay === "org" ? null : "org"), onKeyDown: (event) => triggerKeyDown(event, "org"), children: [
|
|
2609
2639
|
/* @__PURE__ */ jsx(Chip, { item: organization.current, tone: "solid" }),
|
|
2610
2640
|
/* @__PURE__ */ jsx("span", { className: "cbx-trigger-text", title: organization.current.name, children: organization.current.name }),
|
|
2611
2641
|
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "cbx-trigger-chevron", size: 14, strokeWidth: 1.8, "aria-hidden": true })
|
|
@@ -2613,7 +2643,7 @@ function Header({ mobile }) {
|
|
|
2613
2643
|
!mobile && /* @__PURE__ */ jsx(Popover, { open: overlay === "org", anchor: org, label: organization.label, onClose: close, children: /* @__PURE__ */ jsx(OrganizationMenu, { level: organization }) }),
|
|
2614
2644
|
rest.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2615
2645
|
/* @__PURE__ */ jsx("span", { className: "cbx-separator", "aria-hidden": "true", children: "/" }),
|
|
2616
|
-
/* @__PURE__ */ jsxs("button", { ref: second, type: "button", className: `cbx-trigger ${overlay === "context" ? "is-open" : ""}`, "aria-haspopup": "dialog", "aria-expanded": overlay === "context", "aria-label": rest.map((level) => t("{level}: {name}", { level: level.label, name: level.current.name })).join(", "), onClick: () => setOverlay(overlay === "context" ? null : "context"), children: [
|
|
2646
|
+
/* @__PURE__ */ jsxs("button", { ref: second, type: "button", className: `cbx-trigger ${overlay === "context" ? "is-open" : ""}`, "aria-haspopup": "dialog", "aria-expanded": overlay === "context", "aria-label": rest.map((level) => t("{level}: {name}", { level: level.label, name: level.current.name })).join(", "), onClick: () => setOverlay(overlay === "context" ? null : "context"), onKeyDown: (event) => triggerKeyDown(event, "context"), children: [
|
|
2617
2647
|
/* @__PURE__ */ jsx(CascadeLabel, { levels: rest }),
|
|
2618
2648
|
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "cbx-trigger-chevron", size: 14, strokeWidth: 1.8, "aria-hidden": true })
|
|
2619
2649
|
] }),
|
|
@@ -3100,7 +3130,7 @@ function FooterLink({
|
|
|
3100
3130
|
LinkComponent,
|
|
3101
3131
|
onAfterClick
|
|
3102
3132
|
}) {
|
|
3103
|
-
const className = "flex items-center gap-2 border-t border-border/60 px-3 py-2.5 text-[13px] font-medium text-info transition-colors hover:bg-info-soft";
|
|
3133
|
+
const className = "flex items-center gap-2 border-t border-border/60 px-3 py-2.5 text-[13px] font-medium text-info-text transition-colors hover:bg-info-soft";
|
|
3104
3134
|
if (LinkComponent !== void 0) {
|
|
3105
3135
|
return /* @__PURE__ */ jsxs(
|
|
3106
3136
|
LinkComponent,
|
|
@@ -3151,7 +3181,7 @@ function ComboboxAvatarChip({
|
|
|
3151
3181
|
style,
|
|
3152
3182
|
className: cn(
|
|
3153
3183
|
"flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-[9px] font-semibold tracking-tight",
|
|
3154
|
-
avatar.accent === void 0 && "bg-info-soft text-info"
|
|
3184
|
+
avatar.accent === void 0 && "bg-info-soft text-info-text"
|
|
3155
3185
|
),
|
|
3156
3186
|
children: initials2
|
|
3157
3187
|
}
|
|
@@ -3306,15 +3336,15 @@ function SectionHeader({
|
|
|
3306
3336
|
"header",
|
|
3307
3337
|
{
|
|
3308
3338
|
className: cn(
|
|
3309
|
-
"flex flex-
|
|
3339
|
+
"flex flex-wrap items-center justify-between gap-x-4 gap-y-3 border-b border-border px-5 py-4",
|
|
3310
3340
|
className
|
|
3311
3341
|
),
|
|
3312
3342
|
children: [
|
|
3313
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
3343
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-[1_1_12rem] space-y-1", children: [
|
|
3314
3344
|
/* @__PURE__ */ jsx("h2", { className: "text-[15px] leading-none font-semibold text-foreground", children: title }),
|
|
3315
3345
|
description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
|
|
3316
3346
|
] }),
|
|
3317
|
-
actions ? /* @__PURE__ */ jsx("div", { className: "flex
|
|
3347
|
+
actions ? /* @__PURE__ */ jsx("div", { className: "flex max-w-full flex-wrap items-center gap-2", children: actions }) : null
|
|
3318
3348
|
]
|
|
3319
3349
|
}
|
|
3320
3350
|
);
|
|
@@ -3778,10 +3808,10 @@ function RowLink({
|
|
|
3778
3808
|
);
|
|
3779
3809
|
}
|
|
3780
3810
|
var toneStyles = {
|
|
3781
|
-
info: { bg: "bg-info-soft", fg: "text-info" },
|
|
3782
|
-
success: { bg: "bg-success-soft", fg: "text-success" },
|
|
3783
|
-
warning: { bg: "bg-warning-soft", fg: "text-warning" },
|
|
3784
|
-
destructive: { bg: "bg-destructive-soft", fg: "text-destructive" },
|
|
3811
|
+
info: { bg: "bg-info-soft", fg: "text-info-text" },
|
|
3812
|
+
success: { bg: "bg-success-soft", fg: "text-success-text" },
|
|
3813
|
+
warning: { bg: "bg-warning-soft", fg: "text-warning-text" },
|
|
3814
|
+
destructive: { bg: "bg-destructive-soft", fg: "text-destructive-text" },
|
|
3785
3815
|
neutral: { bg: "bg-secondary", fg: "text-foreground" }
|
|
3786
3816
|
};
|
|
3787
3817
|
function StatTile({
|
|
@@ -3814,7 +3844,7 @@ function StatTile({
|
|
|
3814
3844
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-0.5", children: [
|
|
3815
3845
|
/* @__PURE__ */ jsx("p", { className: "tabular text-2xl leading-none font-semibold tracking-tight text-foreground", children: value }),
|
|
3816
3846
|
/* @__PURE__ */ jsx("p", { className: "truncate text-xs text-muted-foreground", children: label }),
|
|
3817
|
-
suffix ? /* @__PURE__ */ jsx("p", { className: "text-mono truncate text-[10px] text-muted-foreground
|
|
3847
|
+
suffix ? /* @__PURE__ */ jsx("p", { className: "text-mono truncate text-[10px] text-muted-foreground", children: suffix }) : null
|
|
3818
3848
|
] })
|
|
3819
3849
|
]
|
|
3820
3850
|
}
|
|
@@ -3822,10 +3852,10 @@ function StatTile({
|
|
|
3822
3852
|
}
|
|
3823
3853
|
var toneStyles2 = {
|
|
3824
3854
|
neutral: "border-border bg-secondary text-secondary-foreground",
|
|
3825
|
-
info: "border-info/20 bg-info-soft text-info",
|
|
3826
|
-
success: "border-success/20 bg-success-soft text-success",
|
|
3827
|
-
warning: "border-warning/20 bg-warning-soft text-warning",
|
|
3828
|
-
destructive: "border-destructive/20 bg-destructive-soft text-destructive",
|
|
3855
|
+
info: "border-info/20 bg-info-soft text-info-text",
|
|
3856
|
+
success: "border-success/20 bg-success-soft text-success-text",
|
|
3857
|
+
warning: "border-warning/20 bg-warning-soft text-warning-text",
|
|
3858
|
+
destructive: "border-destructive/20 bg-destructive-soft text-destructive-text",
|
|
3829
3859
|
muted: "border-border bg-card text-muted-foreground"
|
|
3830
3860
|
};
|
|
3831
3861
|
var dotStyles = {
|
|
@@ -4101,7 +4131,7 @@ function InboxSurface({ open, onClose }) {
|
|
|
4101
4131
|
)
|
|
4102
4132
|
] }) : /* @__PURE__ */ jsx("span", { children: "\u2014" }),
|
|
4103
4133
|
children: error !== null ? /* @__PURE__ */ jsxs("div", { className: "px-5 py-8 text-center", children: [
|
|
4104
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-destructive", children: t("Couldn't load inbox") }),
|
|
4134
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-destructive-text", children: t("Couldn't load inbox") }),
|
|
4105
4135
|
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: error })
|
|
4106
4136
|
] }) : loading && inbox === null ? /* @__PURE__ */ jsx("div", { className: "px-5 py-12 text-center text-sm text-muted-foreground", children: t("Loading\u2026") }) : filtered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-5 py-12", children: /* @__PURE__ */ jsx(
|
|
4107
4137
|
EmptyState,
|
|
@@ -4353,6 +4383,6 @@ function Sparkline({ values, color = "var(--chart-1)", width = 90, height = 20 }
|
|
|
4353
4383
|
] });
|
|
4354
4384
|
}
|
|
4355
4385
|
|
|
4356
|
-
export { APP_HUES, AppContent, AppShell, CHART_PALETTE, CboxAppCatalog, CboxAppIcon, CboxBrand, CboxIdProvider, CboxLocalizationProvider, CboxServiceMark, CboxShell, CboxSurfaces, Combobox, DataPanel, EmptyState, Heading, KeyValue, KeyValueList, PageHeader, PageShell, PageTabs, PanelBody, RowLink, SHELL_ICONS, SectionHeader, Sparkline, StatTile, StatusPill, applyTheme, buildUrlSearch, contextTrail, createHelpStore, defineUrlSchema, environmentFor, hueFor, initialsOf, interpolate, pageIntent, parseListPage, parseShellCatalog, parseUrlSearch, settingsHref, switchPayload, themeBootScript, urlBoolean, urlEnum, urlNumber, urlString, urlStringArray, useCboxId, useCboxIdOptional, useCboxLocalization, useCboxSurfaces, useCboxSurfacesOptional, useKnownAppCatalog, useShellHelp, withQuery };
|
|
4386
|
+
export { APP_HUES, AppContent, AppShell, CHART_PALETTE, CboxAppCatalog, CboxAppIcon, CboxBrand, CboxIdProvider, CboxLocalizationProvider, CboxServiceMark, CboxShell, CboxSurfaces, Combobox, DataPanel, EmptyState, Heading, KeyValue, KeyValueList, PageHeader, PageShell, PageTabs, PanelBody, RowLink, SHELL_ICONS, SectionHeader, Sparkline, StatTile, StatusPill, applyTheme, buildUrlSearch, contextTrail, createHelpStore, defineUrlSchema, environmentFor, hueFor, initialsOf, interpolate, pageIntent, parseListPage, parseShellCatalog, parseUrlSearch, settingsHref, switchBody, switchPayload, themeBootScript, urlBoolean, urlEnum, urlNumber, urlString, urlStringArray, useCboxId, useCboxIdOptional, useCboxLocalization, useCboxSurfaces, useCboxSurfacesOptional, useKnownAppCatalog, useShellHelp, withQuery };
|
|
4357
4387
|
//# sourceMappingURL=index.js.map
|
|
4358
4388
|
//# sourceMappingURL=index.js.map
|