@cboxdk/cbox-ui 0.15.6 → 0.15.7
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.js +37 -58
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { defineCboxAppSwitcher, subscribeKnownAppCatalog, readKnownAppCatalog, s
|
|
|
4
4
|
export { authorizeHref, parseAppCatalog, readKnownAppCatalog, rememberAppCatalog, secureIconUrl, signInTarget } from './chunk-AJCYF7SS.js';
|
|
5
5
|
import { createContext, forwardRef, Children, isValidElement, cloneElement, useContext, useMemo, useSyncExternalStore, useState, useId, useRef, useCallback, useEffect, createElement, useLayoutEffect, useImperativeHandle } from 'react';
|
|
6
6
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
7
|
-
import { Zap, Webhook, Wallet, Users, Timer, Tag, Sparkles, ShieldCheck, Shield, Settings, Server, Send, Search, Rocket, Receipt, Plug, Percent, Package, Network, MessageSquare, Mail, Lock, List, LifeBuoy, Layers, LayoutGrid, LayoutDashboard, Key, Inbox, Home, HardDrive, Globe, GitBranch, Folder, FileText, Database, CreditCard, Code, Cloud, Clock, Calendar, Building2, Briefcase, Boxes, BookOpen, Bell, BarChart3, Activity, ChevronDown, Plus, PinOff, Pin, PanelLeftOpen, PanelLeftClose, ChevronsUpDown, CircleHelp, ArrowLeftRight, CornerDownLeft, ArrowRight, MoreHorizontal, CircleAlert, ChevronRight, Ticket, ArrowUpRight, UserRound, ChevronLeft,
|
|
7
|
+
import { Zap, Webhook, Wallet, Users, Timer, Tag, Sparkles, ShieldCheck, Shield, Settings, Server, Send, Search, Rocket, Receipt, Plug, Percent, Package, Network, MessageSquare, Mail, Lock, List, LifeBuoy, Layers, LayoutGrid, LayoutDashboard, Key, Inbox, Home, HardDrive, Globe, GitBranch, Folder, FileText, Database, CreditCard, Code, Cloud, Clock, Calendar, Building2, Briefcase, Boxes, BookOpen, Bell, BarChart3, Activity, ChevronDown, Plus, PinOff, Pin, PanelLeftOpen, PanelLeftClose, ChevronsUpDown, CircleHelp, ArrowLeftRight, CornerDownLeft, ArrowRight, MoreHorizontal, CircleAlert, ChevronRight, Ticket, ArrowUpRight, UserRound, ChevronLeft, ArrowLeft, X, Circle, Monitor, Sun, Moon, LogOut, Check, ArrowUp } from 'lucide-react';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
|
|
10
10
|
var CboxIdContext = createContext(null);
|
|
@@ -2713,67 +2713,46 @@ function HelpColumn({ docked, mobile = false }) {
|
|
|
2713
2713
|
const onScroll = (top) => {
|
|
2714
2714
|
if (view !== "chat") store.set({ scrollTop: top });
|
|
2715
2715
|
};
|
|
2716
|
-
|
|
2717
|
-
return /* @__PURE__ */ jsx("div", { ref: scrim, className: "cbx-overlay cbx-sheet-backdrop", hidden: !open, ...scrimHandlers(close), children: /* @__PURE__ */ jsxs(
|
|
2718
|
-
"div",
|
|
2719
|
-
{
|
|
2720
|
-
ref: column,
|
|
2721
|
-
id: "cbx-help",
|
|
2722
|
-
className: "cbx-sheet cbx-sheet-bottom is-tall cbx-help-sheet",
|
|
2723
|
-
role: "dialog",
|
|
2724
|
-
"aria-modal": "true",
|
|
2725
|
-
"aria-label": t("Help with {page}", { page: topic }),
|
|
2726
|
-
tabIndex: -1,
|
|
2727
|
-
onKeyDown: (event) => {
|
|
2728
|
-
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
2729
|
-
event.preventDefault();
|
|
2730
|
-
close();
|
|
2731
|
-
}
|
|
2732
|
-
trapTab(event, column.current);
|
|
2733
|
-
},
|
|
2734
|
-
children: [
|
|
2735
|
-
/* @__PURE__ */ jsx("div", { className: "cbx-sheet-handle cbx-sheet-grab", "aria-hidden": "true" }),
|
|
2736
|
-
/* @__PURE__ */ jsxs("div", { className: `cbx-sheet-head cbx-sheet-grab ${view !== "home" ? "has-back" : ""}`, children: [
|
|
2737
|
-
view !== "home" && /* @__PURE__ */ jsx("button", { type: "button", className: "cbx-sheet-back", onClick: back, "aria-label": t("Back to Help"), children: /* @__PURE__ */ jsx(ChevronLeft, { size: 20, strokeWidth: 1.8, "aria-hidden": true }) }),
|
|
2738
|
-
/* @__PURE__ */ jsx("h2", { className: "cbx-sheet-title cbx-truncate", children: view === "article" ? t("Article") : view === "chat" ? t("Ask Cbox") : t("Help with {page}", { page: topic }) }),
|
|
2739
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: "cbx-icon-button", onClick: close, "aria-label": t("Close Help"), children: /* @__PURE__ */ jsx(X, { size: 18, strokeWidth: 1.8, "aria-hidden": true }) })
|
|
2740
|
-
] }),
|
|
2741
|
-
view === "chat" && context(true),
|
|
2742
|
-
/* @__PURE__ */ jsx("div", { ref: body, className: `cbx-sheet-body ${view === "chat" ? "is-chat" : ""}`, "data-cbx-sheet-scroll": "", onScroll: (event) => onScroll(event.currentTarget.scrollTop), children: content }),
|
|
2743
|
-
foot
|
|
2744
|
-
]
|
|
2745
|
-
}
|
|
2746
|
-
) });
|
|
2747
|
-
}
|
|
2748
|
-
return /* @__PURE__ */ jsxs(
|
|
2716
|
+
return /* @__PURE__ */ jsx(
|
|
2749
2717
|
"div",
|
|
2750
2718
|
{
|
|
2751
|
-
ref:
|
|
2752
|
-
|
|
2753
|
-
|
|
2719
|
+
ref: scrim,
|
|
2720
|
+
className: mobile ? "cbx-overlay cbx-sheet-backdrop" : void 0,
|
|
2721
|
+
style: mobile ? void 0 : { display: "contents" },
|
|
2754
2722
|
hidden: !open,
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2723
|
+
...mobile ? scrimHandlers(close) : {},
|
|
2724
|
+
children: /* @__PURE__ */ jsxs(
|
|
2725
|
+
"div",
|
|
2726
|
+
{
|
|
2727
|
+
ref: column,
|
|
2728
|
+
id: "cbx-help",
|
|
2729
|
+
className: mobile ? "cbx-sheet cbx-sheet-bottom is-tall cbx-help-sheet" : `cbx-help ${docked ? "is-docked" : "is-overlay"}`,
|
|
2730
|
+
hidden: !open,
|
|
2731
|
+
"data-restored": !mobile && restored ? "true" : void 0,
|
|
2732
|
+
"aria-label": mobile ? t("Help with {page}", { page: topic }) : t("Help"),
|
|
2733
|
+
role: !mobile && docked ? "complementary" : "dialog",
|
|
2734
|
+
"aria-modal": !mobile && docked ? void 0 : true,
|
|
2735
|
+
tabIndex: -1,
|
|
2736
|
+
onKeyDown: (event) => {
|
|
2737
|
+
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
2738
|
+
event.preventDefault();
|
|
2739
|
+
close();
|
|
2740
|
+
}
|
|
2741
|
+
if (mobile || !docked) trapTab(event, column.current);
|
|
2742
|
+
},
|
|
2743
|
+
children: [
|
|
2744
|
+
mobile && /* @__PURE__ */ jsx("div", { className: "cbx-sheet-handle cbx-sheet-grab", "aria-hidden": "true" }),
|
|
2745
|
+
/* @__PURE__ */ jsxs("div", { className: mobile ? `cbx-sheet-head cbx-sheet-grab ${view !== "home" ? "has-back" : ""}` : "cbx-help-head", children: [
|
|
2746
|
+
view !== "home" ? /* @__PURE__ */ jsx("button", { type: "button", className: mobile ? "cbx-sheet-back" : "cbx-icon-button", onClick: back, "aria-label": t("Back to Help"), children: mobile ? /* @__PURE__ */ jsx(ChevronLeft, { size: 20, strokeWidth: 1.8, "aria-hidden": true }) : /* @__PURE__ */ jsx(ArrowLeft, { size: 18, strokeWidth: 1.8, "aria-hidden": true }) }) : !mobile && /* @__PURE__ */ jsx(LifeBuoy, { className: "cbx-help-mark", size: 18, strokeWidth: 1.8, "aria-hidden": true }),
|
|
2747
|
+
/* @__PURE__ */ jsx("h2", { className: mobile ? "cbx-sheet-title cbx-truncate" : "cbx-help-title", children: view === "article" ? t("Article") : view === "chat" ? t("Ask Cbox") : mobile ? t("Help with {page}", { page: topic }) : t("Help") }),
|
|
2748
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "cbx-icon-button", onClick: close, "aria-label": t("Close Help"), children: /* @__PURE__ */ jsx(X, { size: 18, strokeWidth: 1.8, "aria-hidden": true }) })
|
|
2749
|
+
] }),
|
|
2750
|
+
view === "chat" && context(true),
|
|
2751
|
+
/* @__PURE__ */ jsx("div", { ref: body, className: `${mobile ? "cbx-sheet-body" : "cbx-help-body"} ${view === "chat" ? "is-chat" : ""}`, "data-cbx-sheet-scroll": mobile ? "" : void 0, onScroll: (event) => onScroll(event.currentTarget.scrollTop), children: content }),
|
|
2752
|
+
foot
|
|
2753
|
+
]
|
|
2764
2754
|
}
|
|
2765
|
-
|
|
2766
|
-
},
|
|
2767
|
-
children: [
|
|
2768
|
-
/* @__PURE__ */ jsxs("div", { className: "cbx-help-head", children: [
|
|
2769
|
-
view !== "home" ? /* @__PURE__ */ jsx("button", { type: "button", className: "cbx-icon-button", onClick: back, "aria-label": t("Back to Help"), children: /* @__PURE__ */ jsx(ArrowLeft, { size: 18, strokeWidth: 1.8, "aria-hidden": true }) }) : /* @__PURE__ */ jsx(LifeBuoy, { className: "cbx-help-mark", size: 18, strokeWidth: 1.8, "aria-hidden": true }),
|
|
2770
|
-
/* @__PURE__ */ jsx("h2", { className: "cbx-help-title", children: view === "article" ? t("Article") : view === "chat" ? t("Ask Cbox") : t("Help") }),
|
|
2771
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: "cbx-icon-button", onClick: close, "aria-label": t("Close Help"), children: /* @__PURE__ */ jsx(X, { size: 18, strokeWidth: 1.8, "aria-hidden": true }) })
|
|
2772
|
-
] }),
|
|
2773
|
-
view === "chat" && context(true),
|
|
2774
|
-
/* @__PURE__ */ jsx("div", { ref: body, className: `cbx-help-body ${view === "chat" ? "is-chat" : ""}`, onScroll: (event) => onScroll(event.currentTarget.scrollTop), children: content }),
|
|
2775
|
-
foot
|
|
2776
|
-
]
|
|
2755
|
+
)
|
|
2777
2756
|
}
|
|
2778
2757
|
);
|
|
2779
2758
|
}
|