@exegia/corpora-ui 0.15.0 → 0.16.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.
@@ -16,6 +16,10 @@ export interface IPanel {
16
16
  id: string;
17
17
  name: string;
18
18
  component: ReactNode;
19
+ /** Replaces the default icon inside the panel's header trigger. The shell
20
+ * keeps the trigger button itself (toggle wiring, aria-label) — this only
21
+ * swaps what renders inside it. */
22
+ trigger?: ReactNode;
19
23
  open: boolean;
20
24
  defaultOpen?: boolean;
21
25
  side: "left" | "bottom" | "right" | "sidebar";
@@ -1,7 +1,7 @@
1
1
  import { HTMLMotionProps } from 'motion/react';
2
2
  import { ButtonHTMLAttributes, CSSProperties, HTMLAttributes, ReactNode } from 'react';
3
3
  export type SidebarSide = "left" | "right";
4
- /** Open flags keyed by side. Sides left out stay uncontrolled / at their
4
+ /** Open flags keyed by the side. Sides left out stay uncontrolled / at their
5
5
  * default — there is no per-side prop, the record IS the API. */
6
6
  export type SidebarOpenState = Partial<Record<SidebarSide, boolean>>;
7
7
  type SidebarVariant = "sidebar" | "floating" | "inset";
@@ -27,7 +27,7 @@ type SidebarProviderStyle = CSSProperties & {
27
27
  "--sidebar-width-mobile"?: string;
28
28
  };
29
29
  export interface AnimatedSidebarProviderProps extends HTMLAttributes<HTMLDivElement> {
30
- /** Controlled desktop open state, keyed by side. A side left undefined
30
+ /** Controlled desktop open state, keyed by the side. A side left undefined
31
31
  * stays uncontrolled. */
32
32
  open?: SidebarOpenState;
33
33
  /** Initial desktop open state, merged over `{ left: true, right: false }`. */
package/dist-lib/index.js CHANGED
@@ -2991,7 +2991,7 @@ var or = I(function({ side: e = "left", variant: t = "sidebar", collapsible: n =
2991
2991
  x: h ? e === "left" ? "-100%" : "100%" : "0%"
2992
2992
  },
2993
2993
  transition: f.reduce ? Jn : Vn,
2994
- className: K("sticky top-0 flex h-svh w-full flex-col overflow-hidden", n === "offcanvas" && "w-[var(--sidebar-width)]", t === "floating" && "m-2 h-[calc(100svh-1rem)]", t === "inset" && "m-2 h-[calc(100svh-1rem)]", c),
2994
+ className: K("sticky top-0 flex h-svh w-full flex-col overflow-hidden", n === "offcanvas" && "w-(--sidebar-width)", t === "floating" && "m-2 h-[calc(100svh-1rem)]", t === "inset" && "m-2 h-[calc(100svh-1rem)]", c),
2995
2995
  children: /* @__PURE__ */ i(tr.Provider, {
2996
2996
  value: {
2997
2997
  collapsed: m,
@@ -4101,7 +4101,7 @@ function ni({ children: e, variant: t = "desktop", panels: n, className: r, defa
4101
4101
  className: "flex h-16 items-center justify-between gap-3 px-4 sm:px-6",
4102
4102
  children: [/* @__PURE__ */ i("div", {
4103
4103
  className: "flex min-w-0 items-center gap-3",
4104
- children: /* @__PURE__ */ i(sr, { children: /* @__PURE__ */ i(Ee, {
4104
+ children: /* @__PURE__ */ i(sr, { children: n?.left?.trigger ?? /* @__PURE__ */ i(Ee, {
4105
4105
  name: "PanelLeft",
4106
4106
  size: 24,
4107
4107
  animation: "press"
@@ -4111,7 +4111,7 @@ function ni({ children: e, variant: t = "desktop", panels: n, className: r, defa
4111
4111
  children: /* @__PURE__ */ i(sr, {
4112
4112
  "aria-label": "Toggle panel",
4113
4113
  side: "right",
4114
- children: /* @__PURE__ */ i(Ee, {
4114
+ children: n?.right?.trigger ?? /* @__PURE__ */ i(Ee, {
4115
4115
  name: "PanelRight",
4116
4116
  size: 24,
4117
4117
  animation: "press"