@papernote/ui 1.8.0 → 1.8.1

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
@@ -11092,52 +11092,44 @@ function getAugmentedNamespace(n) {
11092
11092
  * (A1, A1:C5, ...)
11093
11093
  */
11094
11094
 
11095
- var collection;
11096
- var hasRequiredCollection;
11097
-
11098
- function requireCollection () {
11099
- if (hasRequiredCollection) return collection;
11100
- hasRequiredCollection = 1;
11101
- class Collection {
11102
-
11103
- constructor(data, refs) {
11104
- if (data == null && refs == null) {
11105
- this._data = [];
11106
- this._refs = [];
11107
- } else {
11108
- if (data.length !== refs.length)
11109
- throw Error('Collection: data length should match references length.');
11110
- this._data = data;
11111
- this._refs = refs;
11112
- }
11113
- }
11095
+ let Collection$3 = class Collection {
11114
11096
 
11115
- get data() {
11116
- return this._data;
11117
- }
11097
+ constructor(data, refs) {
11098
+ if (data == null && refs == null) {
11099
+ this._data = [];
11100
+ this._refs = [];
11101
+ } else {
11102
+ if (data.length !== refs.length)
11103
+ throw Error('Collection: data length should match references length.');
11104
+ this._data = data;
11105
+ this._refs = refs;
11106
+ }
11107
+ }
11118
11108
 
11119
- get refs() {
11120
- return this._refs;
11121
- }
11109
+ get data() {
11110
+ return this._data;
11111
+ }
11122
11112
 
11123
- get length() {
11124
- return this._data.length;
11125
- }
11113
+ get refs() {
11114
+ return this._refs;
11115
+ }
11126
11116
 
11127
- /**
11128
- * Add data and references to this collection.
11129
- * @param {{}} obj - data
11130
- * @param {{}} ref - reference
11131
- */
11132
- add(obj, ref) {
11133
- this._data.push(obj);
11134
- this._refs.push(ref);
11135
- }
11136
- }
11117
+ get length() {
11118
+ return this._data.length;
11119
+ }
11137
11120
 
11138
- collection = Collection;
11139
- return collection;
11140
- }
11121
+ /**
11122
+ * Add data and references to this collection.
11123
+ * @param {{}} obj - data
11124
+ * @param {{}} ref - reference
11125
+ */
11126
+ add(obj, ref) {
11127
+ this._data.push(obj);
11128
+ this._refs.push(ref);
11129
+ }
11130
+ };
11131
+
11132
+ var collection = Collection$3;
11141
11133
 
11142
11134
  var helpers;
11143
11135
  var hasRequiredHelpers;
@@ -11146,7 +11138,7 @@ function requireHelpers () {
11146
11138
  if (hasRequiredHelpers) return helpers;
11147
11139
  hasRequiredHelpers = 1;
11148
11140
  const FormulaError = requireError();
11149
- const Collection = requireCollection();
11141
+ const Collection = collection;
11150
11142
 
11151
11143
  const Types = {
11152
11144
  NUMBER: 0,
@@ -20800,7 +20792,7 @@ var engineering = EngineeringFunctions;
20800
20792
 
20801
20793
  const FormulaError$b = requireError();
20802
20794
  const {FormulaHelpers: FormulaHelpers$8, Types: Types$6, WildCard, Address: Address$3} = requireHelpers();
20803
- const Collection$2 = requireCollection();
20795
+ const Collection$2 = collection;
20804
20796
  const H$5 = FormulaHelpers$8;
20805
20797
 
20806
20798
  const ReferenceFunctions$1 = {
@@ -32428,7 +32420,7 @@ var parsing = {
32428
32420
  const FormulaError$4 = requireError();
32429
32421
  const {Address: Address$1} = requireHelpers();
32430
32422
  const {Prefix: Prefix$1, Postfix: Postfix$1, Infix: Infix$1, Operators: Operators$1} = operators;
32431
- const Collection$1 = requireCollection();
32423
+ const Collection$1 = collection;
32432
32424
  const MAX_ROW$1 = 1048576, MAX_COLUMN$1 = 16384;
32433
32425
  const {NotAllInputParsedException} = require$$4;
32434
32426
 
@@ -33190,7 +33182,7 @@ var hooks$1 = {
33190
33182
  const FormulaError$2 = requireError();
33191
33183
  const {FormulaHelpers: FormulaHelpers$1, Types, Address} = requireHelpers();
33192
33184
  const {Prefix, Postfix, Infix, Operators} = operators;
33193
- const Collection = requireCollection();
33185
+ const Collection = collection;
33194
33186
  const MAX_ROW = 1048576, MAX_COLUMN = 16384;
33195
33187
 
33196
33188
  let Utils$1 = class Utils {
@@ -56700,6 +56692,21 @@ const AppLayout = ({ children, toolbarSections = [], className = '', showToolbar
56700
56692
  * </PageLayout>
56701
56693
  * ```
56702
56694
  *
56695
+ * @example With actions
56696
+ * ```tsx
56697
+ * <PageLayout
56698
+ * title="Products"
56699
+ * description="Manage your product catalog"
56700
+ * headerContent={<Breadcrumbs items={[{ label: 'Home', href: '/' }, { label: 'Products' }]} />}
56701
+ * actions={[
56702
+ * { id: 'export', label: 'Export', icon: <Download />, onClick: handleExport, variant: 'ghost' },
56703
+ * { id: 'add', label: 'Add Product', icon: <Plus />, onClick: handleAdd, variant: 'primary' },
56704
+ * ]}
56705
+ * >
56706
+ * <DataTable data={products} columns={columns} />
56707
+ * </PageLayout>
56708
+ * ```
56709
+ *
56703
56710
  * @example With Layout for sidebar and gutter
56704
56711
  * ```tsx
56705
56712
  * <Layout sidebar={<Sidebar items={items} />}>
@@ -56709,7 +56716,7 @@ const AppLayout = ({ children, toolbarSections = [], className = '', showToolbar
56709
56716
  * </Layout>
56710
56717
  * ```
56711
56718
  */
56712
- function PageLayout({ title, description, children, className = '', headerContent, maxWidth = '7xl', fixed = false }) {
56719
+ function PageLayout({ title, description, children, className = '', headerContent, maxWidth = '7xl', fixed = false, actions, rightContent, }) {
56713
56720
  // Responsive padding classes - fixed left/top, responsive right/bottom
56714
56721
  const paddingClasses = fixed
56715
56722
  ? 'p-6 pb-20'
@@ -56721,7 +56728,7 @@ function PageLayout({ title, description, children, className = '', headerConten
56721
56728
  '7xl': 'max-w-7xl',
56722
56729
  'full': 'max-w-full',
56723
56730
  };
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] })] }));
56731
+ return (jsxRuntime.jsxs(Page, { padding: "none", maxWidth: maxWidth, fixed: fixed, children: [headerContent, jsxRuntime.jsxs("div", { className: `${paddingClasses} ${maxWidthClasses[maxWidth]} mx-auto ${className}`, children: [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
56732
  }
56726
56733
 
56727
56734
  /**