@softure-ai/theme-notion 0.20.0 → 0.21.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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ Newest first. Each version lists what changed for an app that uses the theme. Wh
4
4
  production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
5
5
  "Definition of done").
6
6
 
7
+ ## 0.21.0
8
+
9
+ - `SidePanel footer` (#1312): an optional strip pinned below the scrolling content, with a top border
10
+ (`data-slot="side-panel-footer"`), for an action that belongs to the panel's foot; it is hidden with the panel.
11
+ Without `footer` the markup is unchanged. New optional prop only.
12
+ - Migration: none.
13
+
7
14
  ## 0.20.0
8
15
 
9
16
  - `ResizeHandle` (#1311): a vertical handle on a column's right edge that a pointer drags, or the keyboard steps, to set
package/README.md CHANGED
@@ -231,7 +231,9 @@ at once (`Sheet` is modal). It floats on `background` with `shadow-menu`, 24 rem
231
231
  heading and a ghost close button. Layouts: `over` (over the canvas's right side), `left` (over its left side),
232
232
  `beside` (after the canvas, which shrinks to at least 24 rem or half) and `list` (a 24 rem column before the canvas);
233
233
  `beside` and `list` cover the whole canvas on a phone. While closed it is `hidden`. Focus moves into it when it opens;
234
- Escape inside or the close button calls `onClose`, and the caller moves focus back to its opener.
234
+ Escape inside or the close button calls `onClose`, and the caller moves focus back to its opener. An optional
235
+ `footer` is a strip with a top border pinned below the scrolling content (`data-slot="side-panel-footer"`), for an
236
+ action that belongs to the panel's foot; without it the panel has no strip.
235
237
 
236
238
  ```tsx
237
239
  <div className="relative flex h-full">
@@ -8,7 +8,8 @@ export interface SidePanelProps {
8
8
  readonly onClose: () => void;
9
9
  readonly closeLabel?: string;
10
10
  readonly width?: number;
11
+ readonly footer?: ReactNode;
11
12
  readonly children: ReactNode;
12
13
  }
13
- export declare function SidePanel({ id, heading, layout, isOpen, onClose, closeLabel, width, children }: SidePanelProps): import("react").JSX.Element;
14
+ export declare function SidePanel({ id, heading, layout, isOpen, onClose, closeLabel, width, footer, children }: SidePanelProps): import("react").JSX.Element;
14
15
  //# sourceMappingURL=SidePanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanel.d.ts","sourceRoot":"","sources":["../../src/notion/SidePanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA6D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASlG,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAElE,MAAM,WAAW,cAAc;IAE7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEzB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAE7B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAG7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAID,wBAAgB,SAAS,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAqC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,cAAc,+BA6CzI"}
1
+ {"version":3,"file":"SidePanel.d.ts","sourceRoot":"","sources":["../../src/notion/SidePanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA6D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASlG,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAElE,MAAM,WAAW,cAAc;IAE7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEzB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAE7B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAG7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAID,wBAAgB,SAAS,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAqC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,cAAc,+BAkDjJ"}
@@ -7,7 +7,7 @@ import { Button } from "../ui/button.js";
7
7
  import { ICON_STROKE_WIDTH } from "./icon-stroke.js";
8
8
  // A non-modal panel at a side of a canvas (a map) that leaves the canvas usable. Its parent is a `relative` flex row
9
9
  // holding the canvas and the panel. Hidden while closed, so its content leaves the reading order.
10
- export function SidePanel({ id, heading, layout, isOpen, onClose, closeLabel = messages.sidePanel.close, width, children }) {
10
+ export function SidePanel({ id, heading, layout, isOpen, onClose, closeLabel = messages.sidePanel.close, width, footer, children }) {
11
11
  const panelRef = useRef(null);
12
12
  const wasOpenRef = useRef(isOpen);
13
13
  const headingId = `${id}-heading`;
@@ -23,6 +23,6 @@ export function SidePanel({ id, heading, layout, isOpen, onClose, closeLabel = m
23
23
  event.stopPropagation();
24
24
  onClose();
25
25
  }
26
- return (_jsxs("aside", { ref: panelRef, id: id, tabIndex: -1, "data-slot": "side-panel", className: "absolute inset-y-0 right-0 z-3 flex w-[min(24rem,100%)] flex-col border-l border-border bg-background text-foreground shadow-menu outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset data-[layout=beside]:relative data-[layout=beside]:w-auto data-[layout=beside]:max-w-full data-[layout=beside]:flex-[0_0_max(50%,24rem)] data-[layout=left]:right-auto data-[layout=left]:left-0 data-[layout=left]:border-r data-[layout=left]:border-l-0 max-sm:data-[layout=beside]:absolute max-sm:data-[layout=beside]:inset-0 max-sm:data-[layout=beside]:w-full max-sm:data-[layout=beside]:border-l-0 data-[layout=list]:relative data-[layout=list]:flex-none data-[layout=list]:border-r data-[layout=list]:border-l-0 max-sm:data-[layout=list]:absolute max-sm:data-[layout=list]:inset-0 max-sm:data-[layout=list]:w-full max-sm:data-[layout=list]:border-r-0 [&[hidden]]:hidden sm:data-[sized=true]:w-(--side-panel-width) sm:data-[sized=true]:flex-none", "data-layout": layout, "data-sized": width === undefined ? undefined : "true", style: width === undefined ? undefined : { "--side-panel-width": `${width}px` }, hidden: !isOpen, "aria-labelledby": headingId, "data-testid": id, onKeyDown: closeOnEscape, children: [_jsxs("div", { className: "flex items-center justify-between gap-2 border-b border-border py-2 pr-2 pl-4", children: [_jsx("h2", { id: headingId, className: "text-heading-3", children: heading }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": closeLabel, onClick: onClose, children: _jsx(X, { "aria-hidden": "true", strokeWidth: ICON_STROKE_WIDTH }) })] }), _jsx("div", { "data-slot": "side-panel-content", className: "grid flex-1 content-start gap-3 overflow-y-auto p-3", children: children })] }));
26
+ return (_jsxs("aside", { ref: panelRef, id: id, tabIndex: -1, "data-slot": "side-panel", className: "absolute inset-y-0 right-0 z-3 flex w-[min(24rem,100%)] flex-col border-l border-border bg-background text-foreground shadow-menu outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset data-[layout=beside]:relative data-[layout=beside]:w-auto data-[layout=beside]:max-w-full data-[layout=beside]:flex-[0_0_max(50%,24rem)] data-[layout=left]:right-auto data-[layout=left]:left-0 data-[layout=left]:border-r data-[layout=left]:border-l-0 max-sm:data-[layout=beside]:absolute max-sm:data-[layout=beside]:inset-0 max-sm:data-[layout=beside]:w-full max-sm:data-[layout=beside]:border-l-0 data-[layout=list]:relative data-[layout=list]:flex-none data-[layout=list]:border-r data-[layout=list]:border-l-0 max-sm:data-[layout=list]:absolute max-sm:data-[layout=list]:inset-0 max-sm:data-[layout=list]:w-full max-sm:data-[layout=list]:border-r-0 [&[hidden]]:hidden sm:data-[sized=true]:w-(--side-panel-width) sm:data-[sized=true]:flex-none", "data-layout": layout, "data-sized": width === undefined ? undefined : "true", style: width === undefined ? undefined : { "--side-panel-width": `${width}px` }, hidden: !isOpen, "aria-labelledby": headingId, "data-testid": id, onKeyDown: closeOnEscape, children: [_jsxs("div", { className: "flex items-center justify-between gap-2 border-b border-border py-2 pr-2 pl-4", children: [_jsx("h2", { id: headingId, className: "text-heading-3", children: heading }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": closeLabel, onClick: onClose, children: _jsx(X, { "aria-hidden": "true", strokeWidth: ICON_STROKE_WIDTH }) })] }), _jsx("div", { "data-slot": "side-panel-content", className: "grid flex-1 content-start gap-3 overflow-y-auto p-3", children: children }), footer === undefined ? null : (_jsx("div", { "data-slot": "side-panel-footer", className: "flex flex-none border-t border-border p-2", children: footer }))] }));
27
27
  }
28
28
  //# sourceMappingURL=SidePanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanel.js","sourceRoot":"","sources":["../../src/notion/SidePanel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,EAA0D,MAAM,OAAO,CAAC;AAElG,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAsBrD,qHAAqH;AACrH,kGAAkG;AAClG,MAAM,UAAU,SAAS,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE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KAAiC;QACtD,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ;YAAE,OAAO;QACnC,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,CACL,iBACE,GAAG,EAAE,QAAQ,EACb,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,CAAC,CAAC,eACF,YAAY,EACtB,SAAS,EAAC,g8BAAg8B,iBAC77B,MAAM,gBACP,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EACpD,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,EAAE,oBAAoB,EAAE,GAAG,KAAK,IAAI,EAAoB,EAClG,MAAM,EAAE,CAAC,MAAM,qBACE,SAAS,iBACb,EAAE,EACf,SAAS,EAAE,aAAa,aAExB,eAAK,SAAS,EAAC,+EAA+E,aAC5F,aAAI,EAAE,EAAE,SAAS,EAAE,SAAS,EAAC,gBAAgB,YAC1C,OAAO,GACL,EACL,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAa,UAAU,EAAE,OAAO,EAAE,OAAO,YACxF,KAAC,CAAC,mBAAa,MAAM,EAAC,WAAW,EAAE,iBAAiB,GAAI,GACjD,IACL,EACN,2BAAe,oBAAoB,EAAC,SAAS,EAAC,qDAAqD,YAChG,QAAQ,GACL,EACL,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC7B,2BAAe,mBAAmB,EAAC,SAAS,EAAC,2CAA2C,YACrF,MAAM,GACH,CACP,IACK,CACT,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softure-ai/theme-notion",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "SOFTURE AI Notion theme: shadcn/ui components (new-york v4, Radix, Tailwind CSS v4, lucide) with the Notion design system's tokens and deltas, ready to import.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,12 +25,14 @@ export interface SidePanelProps {
25
25
  // The panel's width in pixels on a wide screen (a `ResizeHandle` sets it); phone-wide `beside` and `list` keep
26
26
  // covering the canvas. Without it, the layout's own width.
27
27
  readonly width?: number;
28
+ // A strip pinned below the scrolling content (an action that belongs to the panel's foot); none: no strip.
29
+ readonly footer?: ReactNode;
28
30
  readonly children: ReactNode;
29
31
  }
30
32
 
31
33
  // A non-modal panel at a side of a canvas (a map) that leaves the canvas usable. Its parent is a `relative` flex row
32
34
  // holding the canvas and the panel. Hidden while closed, so its content leaves the reading order.
33
- export function SidePanel({ id, heading, layout, isOpen, onClose, closeLabel = messages.sidePanel.close, width, children }: SidePanelProps) {
35
+ export function SidePanel({ id, heading, layout, isOpen, onClose, closeLabel = messages.sidePanel.close, width, footer, children }: SidePanelProps) {
34
36
  const panelRef = useRef<HTMLElement>(null);
35
37
  const wasOpenRef = useRef(isOpen);
36
38
  const headingId = `${id}-heading`;
@@ -73,6 +75,11 @@ export function SidePanel({ id, heading, layout, isOpen, onClose, closeLabel = m
73
75
  <div data-slot="side-panel-content" className="grid flex-1 content-start gap-3 overflow-y-auto p-3">
74
76
  {children}
75
77
  </div>
78
+ {footer === undefined ? null : (
79
+ <div data-slot="side-panel-footer" className="flex flex-none border-t border-border p-2">
80
+ {footer}
81
+ </div>
82
+ )}
76
83
  </aside>
77
84
  );
78
85
  }