@papernote/ui 1.8.0 → 1.8.2

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 CHANGED
@@ -56700,6 +56700,21 @@ const AppLayout = ({ children, toolbarSections = [], className = '', showToolbar
56700
56700
  * </PageLayout>
56701
56701
  * ```
56702
56702
  *
56703
+ * @example With actions
56704
+ * ```tsx
56705
+ * <PageLayout
56706
+ * title="Products"
56707
+ * description="Manage your product catalog"
56708
+ * headerContent={<Breadcrumbs items={[{ label: 'Home', href: '/' }, { label: 'Products' }]} />}
56709
+ * actions={[
56710
+ * { id: 'export', label: 'Export', icon: <Download />, onClick: handleExport, variant: 'ghost' },
56711
+ * { id: 'add', label: 'Add Product', icon: <Plus />, onClick: handleAdd, variant: 'primary' },
56712
+ * ]}
56713
+ * >
56714
+ * <DataTable data={products} columns={columns} />
56715
+ * </PageLayout>
56716
+ * ```
56717
+ *
56703
56718
  * @example With Layout for sidebar and gutter
56704
56719
  * ```tsx
56705
56720
  * <Layout sidebar={<Sidebar items={items} />}>
@@ -56709,7 +56724,7 @@ const AppLayout = ({ children, toolbarSections = [], className = '', showToolbar
56709
56724
  * </Layout>
56710
56725
  * ```
56711
56726
  */
56712
- function PageLayout({ title, description, children, className = '', headerContent, maxWidth = '7xl', fixed = false }) {
56727
+ function PageLayout({ title, description, children, className = '', headerContent, maxWidth = '7xl', fixed = false, actions, rightContent, }) {
56713
56728
  // Responsive padding classes - fixed left/top, responsive right/bottom
56714
56729
  const paddingClasses = fixed
56715
56730
  ? 'p-6 pb-20'
@@ -56721,7 +56736,7 @@ function PageLayout({ title, description, children, className = '', headerConten
56721
56736
  '7xl': 'max-w-7xl',
56722
56737
  'full': 'max-w-full',
56723
56738
  };
56724
- return (jsxRuntime.jsxs(Page, { padding: "none", maxWidth: maxWidth, fixed: fixed, children: [headerContent, jsxRuntime.jsxs("div", { className: `${paddingClasses} ${maxWidthClasses[maxWidth]} mx-auto ${className}`, children: [jsxRuntime.jsxs("div", { className: "mb-8", children: [jsxRuntime.jsx("h1", { className: "text-3xl font-bold text-ink-900 mb-2", children: title }), description && (jsxRuntime.jsx("p", { className: "text-ink-600", children: description }))] }), children] })] }));
56739
+ return (jsxRuntime.jsx(Page, { padding: "none", maxWidth: maxWidth, fixed: fixed, children: jsxRuntime.jsxs("div", { className: `${paddingClasses} ${maxWidthClasses[maxWidth]} mx-auto ${className}`, children: [headerContent && jsxRuntime.jsx("div", { className: "mb-4", children: headerContent }), jsxRuntime.jsx("div", { className: "mb-8", children: jsxRuntime.jsxs(Stack, { direction: "horizontal", justify: "between", align: "start", gap: "md", children: [jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [jsxRuntime.jsx(Text, { as: "h1", size: "2xl", weight: "bold", className: "text-3xl mb-2", children: title }), description && (jsxRuntime.jsx(Text, { color: "muted", children: description }))] }), (actions || rightContent) && (jsxRuntime.jsxs(Stack, { direction: "horizontal", gap: "sm", className: "flex-shrink-0", children: [rightContent, actions?.map((action) => (jsxRuntime.jsx(Button, { variant: action.variant || 'secondary', icon: action.icon, onClick: action.onClick, disabled: action.disabled, loading: action.loading, className: action.hideOnMobile ? 'hidden sm:inline-flex' : '', children: action.label }, action.id)))] }))] }) }), children] }) }));
56725
56740
  }
56726
56741
 
56727
56742
  /**