@papernote/ui 1.5.0 → 1.7.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/README.md +3 -3
- package/dist/components/ActionBar.d.ts +112 -0
- package/dist/components/ActionBar.d.ts.map +1 -0
- package/dist/components/DataGrid.d.ts +182 -0
- package/dist/components/DataGrid.d.ts.map +1 -0
- package/dist/components/FormulaAutocomplete.d.ts +29 -0
- package/dist/components/FormulaAutocomplete.d.ts.map +1 -0
- package/dist/components/Modal.d.ts +29 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/PageHeader.d.ts +86 -0
- package/dist/components/PageHeader.d.ts.map +1 -0
- package/dist/components/Select.d.ts +2 -0
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.d.ts +419 -3
- package/dist/index.esm.js +2533 -350
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2543 -348
- package/dist/index.js.map +1 -1
- package/dist/styles.css +81 -0
- package/dist/utils/formulaDefinitions.d.ts +25 -0
- package/dist/utils/formulaDefinitions.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/ActionBar.stories.tsx +246 -0
- package/src/components/ActionBar.tsx +242 -0
- package/src/components/DataGrid.stories.tsx +356 -0
- package/src/components/DataGrid.tsx +1025 -0
- package/src/components/FormulaAutocomplete.tsx +417 -0
- package/src/components/Modal.stories.tsx +205 -0
- package/src/components/Modal.tsx +38 -1
- package/src/components/PageHeader.stories.tsx +198 -0
- package/src/components/PageHeader.tsx +217 -0
- package/src/components/Select.tsx +121 -7
- package/src/components/Sidebar.tsx +2 -2
- package/src/components/index.ts +36 -0
- package/src/utils/formulaDefinitions.ts +1228 -0
package/dist/index.d.ts
CHANGED
|
@@ -358,6 +358,8 @@ interface SelectProps {
|
|
|
358
358
|
size?: 'sm' | 'md' | 'lg';
|
|
359
359
|
/** Mobile display mode - 'auto' uses BottomSheet on mobile, 'dropdown' always uses dropdown, 'native' uses native select on mobile */
|
|
360
360
|
mobileMode?: 'auto' | 'dropdown' | 'native';
|
|
361
|
+
/** Render dropdown via portal (default: true). Set to false when overflow clipping is not an issue */
|
|
362
|
+
usePortal?: boolean;
|
|
361
363
|
}
|
|
362
364
|
/**
|
|
363
365
|
* Select - Dropdown select component with search, groups, virtual scrolling, and mobile support
|
|
@@ -1363,6 +1365,10 @@ interface ModalProps {
|
|
|
1363
1365
|
showCloseButton?: boolean;
|
|
1364
1366
|
/** Animation variant for modal entrance (default: 'scale') */
|
|
1365
1367
|
animation?: 'scale' | 'slide-up' | 'slide-down' | 'fade' | 'none';
|
|
1368
|
+
/** Enable automatic scrolling for content that exceeds viewport height */
|
|
1369
|
+
scrollable?: boolean;
|
|
1370
|
+
/** Maximum height of the modal content area (e.g., '70vh', '500px') */
|
|
1371
|
+
maxHeight?: string;
|
|
1366
1372
|
/** Mobile display mode: 'auto' uses BottomSheet on mobile, 'modal' always uses modal, 'sheet' always uses BottomSheet */
|
|
1367
1373
|
mobileMode?: 'auto' | 'modal' | 'sheet';
|
|
1368
1374
|
/** Height preset for BottomSheet on mobile (default: 'lg') */
|
|
@@ -1388,6 +1394,30 @@ interface ModalProps {
|
|
|
1388
1394
|
* </Modal>
|
|
1389
1395
|
* ```
|
|
1390
1396
|
*
|
|
1397
|
+
* @example Scrollable modal for long content
|
|
1398
|
+
* ```tsx
|
|
1399
|
+
* <Modal
|
|
1400
|
+
* isOpen={isOpen}
|
|
1401
|
+
* onClose={handleClose}
|
|
1402
|
+
* title="Terms and Conditions"
|
|
1403
|
+
* scrollable
|
|
1404
|
+
* >
|
|
1405
|
+
* {longContent}
|
|
1406
|
+
* </Modal>
|
|
1407
|
+
* ```
|
|
1408
|
+
*
|
|
1409
|
+
* @example Modal with custom max height
|
|
1410
|
+
* ```tsx
|
|
1411
|
+
* <Modal
|
|
1412
|
+
* isOpen={isOpen}
|
|
1413
|
+
* onClose={handleClose}
|
|
1414
|
+
* title="Document Preview"
|
|
1415
|
+
* maxHeight="70vh"
|
|
1416
|
+
* >
|
|
1417
|
+
* {documentContent}
|
|
1418
|
+
* </Modal>
|
|
1419
|
+
* ```
|
|
1420
|
+
*
|
|
1391
1421
|
* @example Force modal on mobile
|
|
1392
1422
|
* ```tsx
|
|
1393
1423
|
* <Modal
|
|
@@ -1413,7 +1443,7 @@ interface ModalProps {
|
|
|
1413
1443
|
* </Modal>
|
|
1414
1444
|
* ```
|
|
1415
1445
|
*/
|
|
1416
|
-
declare function Modal({ isOpen, onClose, title, children, size, showCloseButton, animation, mobileMode, mobileHeight, mobileShowHandle, }: ModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1446
|
+
declare function Modal({ isOpen, onClose, title, children, size, showCloseButton, animation, scrollable, maxHeight, mobileMode, mobileHeight, mobileShowHandle, }: ModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1417
1447
|
declare function ModalFooter({ children }: {
|
|
1418
1448
|
children: React__default.ReactNode;
|
|
1419
1449
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -4153,6 +4183,172 @@ interface DataTableProps<T extends BaseDataItem$1 = BaseDataItem$1> {
|
|
|
4153
4183
|
*/
|
|
4154
4184
|
declare function DataTable<T extends BaseDataItem$1 = BaseDataItem$1>({ data, columns, loading, error, emptyMessage, loadingRows, className, onSortChange, currentSort, onEdit, onDelete, actions, enableContextMenu, onRowClick, onRowDoubleClick, selectable, selectedRows: externalSelectedRows, onRowSelect, keyExtractor, expandable, expandedRows: externalExpandedRows, renderExpandedRow, expandedRowConfig, showExpandChevron, striped, stripedColor, density, rowClassName, rowHighlight, highlightedRowId, bordered, borderColor, disableHover, hiddenColumns, headerClassName, renderEmptyState: customRenderEmptyState, resizable, onColumnResize, reorderable, onColumnReorder, virtualized, virtualHeight, virtualRowHeight, paginated, currentPage, pageSize, totalItems, onPageChange, pageSizeOptions, onPageSizeChange, showPageSizeSelector, mobileView, cardConfig, cardGap, cardClassName, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
4155
4185
|
|
|
4186
|
+
/**
|
|
4187
|
+
* Cell value type - can be primitive or formula
|
|
4188
|
+
*/
|
|
4189
|
+
type CellValue = string | number | boolean | null;
|
|
4190
|
+
/**
|
|
4191
|
+
* Cell data structure
|
|
4192
|
+
*/
|
|
4193
|
+
interface DataGridCell {
|
|
4194
|
+
/** The display/computed value */
|
|
4195
|
+
value: CellValue;
|
|
4196
|
+
/** Optional formula (e.g., "=SUM(B2:B5)") */
|
|
4197
|
+
formula?: string;
|
|
4198
|
+
/** Read-only cell */
|
|
4199
|
+
readOnly?: boolean;
|
|
4200
|
+
/** Custom class name */
|
|
4201
|
+
className?: string;
|
|
4202
|
+
}
|
|
4203
|
+
/**
|
|
4204
|
+
* Column configuration
|
|
4205
|
+
*/
|
|
4206
|
+
interface DataGridColumn {
|
|
4207
|
+
/** Unique column key */
|
|
4208
|
+
key: string;
|
|
4209
|
+
/** Header text */
|
|
4210
|
+
header: string;
|
|
4211
|
+
/** Column width in pixels */
|
|
4212
|
+
width?: number;
|
|
4213
|
+
/** Minimum width */
|
|
4214
|
+
minWidth?: number;
|
|
4215
|
+
/** Text alignment */
|
|
4216
|
+
align?: 'left' | 'center' | 'right';
|
|
4217
|
+
/** Enable sorting */
|
|
4218
|
+
sortable?: boolean;
|
|
4219
|
+
/** Enable filtering */
|
|
4220
|
+
filterable?: boolean;
|
|
4221
|
+
/** Read-only column */
|
|
4222
|
+
readOnly?: boolean;
|
|
4223
|
+
/** Cell type for formatting */
|
|
4224
|
+
type?: 'text' | 'number' | 'currency' | 'percent' | 'date';
|
|
4225
|
+
/** Number format options */
|
|
4226
|
+
format?: {
|
|
4227
|
+
decimals?: number;
|
|
4228
|
+
prefix?: string;
|
|
4229
|
+
suffix?: string;
|
|
4230
|
+
};
|
|
4231
|
+
}
|
|
4232
|
+
/**
|
|
4233
|
+
* Frozen row mode options
|
|
4234
|
+
* - 'none': No frozen rows
|
|
4235
|
+
* - 'first': Freeze first data row (common for headers in data)
|
|
4236
|
+
* - 'selected': Freeze the currently selected row
|
|
4237
|
+
* - number: Freeze specific number of rows from top
|
|
4238
|
+
*/
|
|
4239
|
+
type FrozenRowMode = 'none' | 'first' | 'selected' | number;
|
|
4240
|
+
/**
|
|
4241
|
+
* DataGrid component props
|
|
4242
|
+
*/
|
|
4243
|
+
interface DataGridProps {
|
|
4244
|
+
/** 2D array of cell data */
|
|
4245
|
+
data: DataGridCell[][];
|
|
4246
|
+
/** Column configurations */
|
|
4247
|
+
columns: DataGridColumn[];
|
|
4248
|
+
/** Callback when data changes */
|
|
4249
|
+
onChange?: (data: DataGridCell[][], rowIndex: number, colIndex: number) => void;
|
|
4250
|
+
/** Row headers (e.g., ["1", "2", "3"] or true for auto) */
|
|
4251
|
+
rowHeaders?: boolean | string[];
|
|
4252
|
+
/**
|
|
4253
|
+
* Frozen rows configuration:
|
|
4254
|
+
* - 'none' or 0: No frozen rows
|
|
4255
|
+
* - 'first' or 1: Freeze first data row (common for headers in data)
|
|
4256
|
+
* - 'selected': Freeze the currently selected row (moves with selection)
|
|
4257
|
+
* - number > 1: Freeze specific number of rows from top
|
|
4258
|
+
*/
|
|
4259
|
+
frozenRows?: FrozenRowMode;
|
|
4260
|
+
/** Number of frozen columns at left */
|
|
4261
|
+
frozenColumns?: number;
|
|
4262
|
+
/** Show freeze row toggle button in toolbar */
|
|
4263
|
+
showFreezeRowToggle?: boolean;
|
|
4264
|
+
/** Enable zebra striping */
|
|
4265
|
+
zebraStripes?: boolean;
|
|
4266
|
+
/** Enable formula evaluation */
|
|
4267
|
+
formulas?: boolean;
|
|
4268
|
+
/** Read-only mode */
|
|
4269
|
+
readOnly?: boolean;
|
|
4270
|
+
/** Table height */
|
|
4271
|
+
height?: number | string;
|
|
4272
|
+
/** Table width */
|
|
4273
|
+
width?: number | string;
|
|
4274
|
+
/** Show toolbar */
|
|
4275
|
+
showToolbar?: boolean;
|
|
4276
|
+
/** Toolbar title */
|
|
4277
|
+
title?: string;
|
|
4278
|
+
/** Enable export */
|
|
4279
|
+
enableExport?: boolean;
|
|
4280
|
+
/** Export filename */
|
|
4281
|
+
exportFileName?: string;
|
|
4282
|
+
/** Enable save */
|
|
4283
|
+
enableSave?: boolean;
|
|
4284
|
+
/** Save handler */
|
|
4285
|
+
onSave?: (data: DataGridCell[][]) => Promise<void> | void;
|
|
4286
|
+
/** Custom toolbar actions */
|
|
4287
|
+
toolbarActions?: React__default.ReactNode;
|
|
4288
|
+
/** Custom class name */
|
|
4289
|
+
className?: string;
|
|
4290
|
+
/** Density */
|
|
4291
|
+
density?: 'compact' | 'normal' | 'comfortable';
|
|
4292
|
+
}
|
|
4293
|
+
/**
|
|
4294
|
+
* DataGrid imperative handle
|
|
4295
|
+
*/
|
|
4296
|
+
interface DataGridHandle {
|
|
4297
|
+
/** Get current data */
|
|
4298
|
+
getData: () => DataGridCell[][];
|
|
4299
|
+
/** Set cell value */
|
|
4300
|
+
setCell: (rowIndex: number, colIndex: number, value: CellValue | DataGridCell) => void;
|
|
4301
|
+
/** Clear all filters */
|
|
4302
|
+
clearFilters: () => void;
|
|
4303
|
+
/** Clear sorting */
|
|
4304
|
+
clearSort: () => void;
|
|
4305
|
+
/** Export to CSV */
|
|
4306
|
+
exportToCSV: () => void;
|
|
4307
|
+
/** Freeze/unfreeze the first row */
|
|
4308
|
+
toggleFreezeFirstRow: () => void;
|
|
4309
|
+
/** Freeze/unfreeze the selected row */
|
|
4310
|
+
toggleFreezeSelectedRow: () => void;
|
|
4311
|
+
/** Set frozen rows mode */
|
|
4312
|
+
setFrozenRows: (mode: FrozenRowMode) => void;
|
|
4313
|
+
}
|
|
4314
|
+
/**
|
|
4315
|
+
* DataGrid - Excel-like data grid component with formulas
|
|
4316
|
+
*
|
|
4317
|
+
* A grid-based spreadsheet component that provides:
|
|
4318
|
+
* - Cell-level editing with formula support (280+ Excel formulas)
|
|
4319
|
+
* - Sorting and filtering
|
|
4320
|
+
* - Frozen rows and columns
|
|
4321
|
+
* - Zebra striping
|
|
4322
|
+
* - CSV export
|
|
4323
|
+
* - Keyboard navigation
|
|
4324
|
+
*
|
|
4325
|
+
* Uses fast-formula-parser (MIT licensed) for formula evaluation.
|
|
4326
|
+
*
|
|
4327
|
+
* @example Basic usage
|
|
4328
|
+
* ```tsx
|
|
4329
|
+
* const columns = [
|
|
4330
|
+
* { key: 'name', header: 'Name' },
|
|
4331
|
+
* { key: 'q1', header: 'Q1', type: 'number' },
|
|
4332
|
+
* { key: 'q2', header: 'Q2', type: 'number' },
|
|
4333
|
+
* { key: 'total', header: 'Total', type: 'number' },
|
|
4334
|
+
* ];
|
|
4335
|
+
*
|
|
4336
|
+
* const data = [
|
|
4337
|
+
* [{ value: 'Widget A' }, { value: 100 }, { value: 150 }, { value: 0, formula: '=SUM(B1:C1)' }],
|
|
4338
|
+
* [{ value: 'Widget B' }, { value: 200 }, { value: 250 }, { value: 0, formula: '=SUM(B2:C2)' }],
|
|
4339
|
+
* ];
|
|
4340
|
+
*
|
|
4341
|
+
* <DataGrid
|
|
4342
|
+
* data={data}
|
|
4343
|
+
* columns={columns}
|
|
4344
|
+
* formulas
|
|
4345
|
+
* zebraStripes
|
|
4346
|
+
* frozenRows={1}
|
|
4347
|
+
* />
|
|
4348
|
+
* ```
|
|
4349
|
+
*/
|
|
4350
|
+
declare const DataGrid: React__default.ForwardRefExoticComponent<DataGridProps & React__default.RefAttributes<DataGridHandle>>;
|
|
4351
|
+
|
|
4156
4352
|
/**
|
|
4157
4353
|
* Single swipe action configuration
|
|
4158
4354
|
*/
|
|
@@ -4847,6 +5043,201 @@ interface PageLayoutProps {
|
|
|
4847
5043
|
*/
|
|
4848
5044
|
declare function PageLayout({ title, description, children, className, headerContent, maxWidth, fixed }: PageLayoutProps): react_jsx_runtime.JSX.Element;
|
|
4849
5045
|
|
|
5046
|
+
interface PageHeaderAction {
|
|
5047
|
+
/** Unique identifier for the action */
|
|
5048
|
+
id: string;
|
|
5049
|
+
/** Button label text */
|
|
5050
|
+
label: string;
|
|
5051
|
+
/** Icon to display (from lucide-react) */
|
|
5052
|
+
icon?: ReactNode;
|
|
5053
|
+
/** Click handler */
|
|
5054
|
+
onClick: () => void;
|
|
5055
|
+
/** Button variant */
|
|
5056
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'outline';
|
|
5057
|
+
/** Disabled state */
|
|
5058
|
+
disabled?: boolean;
|
|
5059
|
+
/** Loading state */
|
|
5060
|
+
loading?: boolean;
|
|
5061
|
+
/** Hide on mobile */
|
|
5062
|
+
hideOnMobile?: boolean;
|
|
5063
|
+
}
|
|
5064
|
+
interface PageHeaderProps {
|
|
5065
|
+
/** Page title */
|
|
5066
|
+
title: string;
|
|
5067
|
+
/** Optional subtitle/description */
|
|
5068
|
+
subtitle?: string;
|
|
5069
|
+
/** Breadcrumb navigation items */
|
|
5070
|
+
breadcrumbs?: BreadcrumbItem[];
|
|
5071
|
+
/** Show home icon in breadcrumbs (default: true) */
|
|
5072
|
+
showHomeBreadcrumb?: boolean;
|
|
5073
|
+
/** Action buttons to display on the right */
|
|
5074
|
+
actions?: PageHeaderAction[];
|
|
5075
|
+
/** Custom content to render on the right (instead of actions) */
|
|
5076
|
+
rightContent?: ReactNode;
|
|
5077
|
+
/** Custom content to render below title */
|
|
5078
|
+
belowTitle?: ReactNode;
|
|
5079
|
+
/** Additional CSS classes */
|
|
5080
|
+
className?: string;
|
|
5081
|
+
/** Make header sticky at top */
|
|
5082
|
+
sticky?: boolean;
|
|
5083
|
+
/** Back button configuration */
|
|
5084
|
+
backButton?: {
|
|
5085
|
+
label?: string;
|
|
5086
|
+
onClick: () => void;
|
|
5087
|
+
};
|
|
5088
|
+
}
|
|
5089
|
+
/**
|
|
5090
|
+
* PageHeader - Standard page header with title, breadcrumbs, and actions
|
|
5091
|
+
*
|
|
5092
|
+
* A consistent header component for pages that provides:
|
|
5093
|
+
* - Page title and optional subtitle
|
|
5094
|
+
* - Breadcrumb navigation
|
|
5095
|
+
* - Action buttons (Create, Export, etc.)
|
|
5096
|
+
* - Optional back button
|
|
5097
|
+
* - Sticky positioning option
|
|
5098
|
+
*
|
|
5099
|
+
* @example Basic usage
|
|
5100
|
+
* ```tsx
|
|
5101
|
+
* <PageHeader
|
|
5102
|
+
* title="Products"
|
|
5103
|
+
* subtitle="Manage your product catalog"
|
|
5104
|
+
* breadcrumbs={[{ label: 'Inventory' }, { label: 'Products' }]}
|
|
5105
|
+
* actions={[
|
|
5106
|
+
* { id: 'export', label: 'Export', icon: <Download />, onClick: handleExport, variant: 'ghost' },
|
|
5107
|
+
* { id: 'add', label: 'Add Product', icon: <Plus />, onClick: handleAdd, variant: 'primary' },
|
|
5108
|
+
* ]}
|
|
5109
|
+
* />
|
|
5110
|
+
* ```
|
|
5111
|
+
*
|
|
5112
|
+
* @example With back button
|
|
5113
|
+
* ```tsx
|
|
5114
|
+
* <PageHeader
|
|
5115
|
+
* title="Edit Product"
|
|
5116
|
+
* backButton={{ label: 'Back to Products', onClick: () => navigate('/products') }}
|
|
5117
|
+
* />
|
|
5118
|
+
* ```
|
|
5119
|
+
*
|
|
5120
|
+
* @example With custom right content
|
|
5121
|
+
* ```tsx
|
|
5122
|
+
* <PageHeader
|
|
5123
|
+
* title="Dashboard"
|
|
5124
|
+
* rightContent={<DateRangePicker value={range} onChange={setRange} />}
|
|
5125
|
+
* />
|
|
5126
|
+
* ```
|
|
5127
|
+
*/
|
|
5128
|
+
declare function PageHeader({ title, subtitle, breadcrumbs, showHomeBreadcrumb, actions, rightContent, belowTitle, className, sticky, backButton, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
5129
|
+
|
|
5130
|
+
interface ActionBarAction {
|
|
5131
|
+
/** Unique identifier for the action */
|
|
5132
|
+
id: string;
|
|
5133
|
+
/** Button label text */
|
|
5134
|
+
label: string;
|
|
5135
|
+
/** Icon to display (from lucide-react) */
|
|
5136
|
+
icon?: ReactNode;
|
|
5137
|
+
/** Click handler */
|
|
5138
|
+
onClick: () => void;
|
|
5139
|
+
/** Button variant */
|
|
5140
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'outline';
|
|
5141
|
+
/** Disabled state */
|
|
5142
|
+
disabled?: boolean;
|
|
5143
|
+
/** Loading state */
|
|
5144
|
+
loading?: boolean;
|
|
5145
|
+
}
|
|
5146
|
+
interface ActionBarProps {
|
|
5147
|
+
/** Content to display on the left side (e.g., selection count, status text) */
|
|
5148
|
+
leftContent?: ReactNode;
|
|
5149
|
+
/** Content to display in the center */
|
|
5150
|
+
centerContent?: ReactNode;
|
|
5151
|
+
/** Content to display on the right side (overrides actions) */
|
|
5152
|
+
rightContent?: ReactNode;
|
|
5153
|
+
/** Action buttons to display on the right */
|
|
5154
|
+
actions?: ActionBarAction[];
|
|
5155
|
+
/** Position of the action bar */
|
|
5156
|
+
position?: 'top' | 'bottom';
|
|
5157
|
+
/** Make the bar sticky */
|
|
5158
|
+
sticky?: boolean;
|
|
5159
|
+
/** Show the action bar (useful for conditional display like bulk selection) */
|
|
5160
|
+
visible?: boolean;
|
|
5161
|
+
/** Callback when close/dismiss button is clicked */
|
|
5162
|
+
onDismiss?: () => void;
|
|
5163
|
+
/** Show dismiss button */
|
|
5164
|
+
showDismiss?: boolean;
|
|
5165
|
+
/** Additional CSS classes */
|
|
5166
|
+
className?: string;
|
|
5167
|
+
/** Background variant */
|
|
5168
|
+
variant?: 'default' | 'primary' | 'warning' | 'info';
|
|
5169
|
+
/** Compact mode with less padding */
|
|
5170
|
+
compact?: boolean;
|
|
5171
|
+
}
|
|
5172
|
+
/**
|
|
5173
|
+
* ActionBar - Flexible toolbar for page-level and contextual actions
|
|
5174
|
+
*
|
|
5175
|
+
* A versatile action container that can be used for:
|
|
5176
|
+
* - Bulk actions when rows are selected
|
|
5177
|
+
* - Page-level actions and controls
|
|
5178
|
+
* - Form action buttons (Save/Cancel)
|
|
5179
|
+
* - Contextual toolbars
|
|
5180
|
+
*
|
|
5181
|
+
* @example Basic bulk actions bar
|
|
5182
|
+
* ```tsx
|
|
5183
|
+
* <ActionBar
|
|
5184
|
+
* visible={selectedIds.length > 0}
|
|
5185
|
+
* leftContent={<Text weight="medium">{selectedIds.length} selected</Text>}
|
|
5186
|
+
* actions={[
|
|
5187
|
+
* { id: 'export', label: 'Export', icon: <Download />, onClick: handleExport },
|
|
5188
|
+
* { id: 'delete', label: 'Delete', icon: <Trash />, onClick: handleDelete, variant: 'danger' },
|
|
5189
|
+
* ]}
|
|
5190
|
+
* onDismiss={() => setSelectedIds([])}
|
|
5191
|
+
* showDismiss
|
|
5192
|
+
* />
|
|
5193
|
+
* ```
|
|
5194
|
+
*
|
|
5195
|
+
* @example Sticky bottom form actions
|
|
5196
|
+
* ```tsx
|
|
5197
|
+
* <ActionBar
|
|
5198
|
+
* position="bottom"
|
|
5199
|
+
* sticky
|
|
5200
|
+
* rightContent={
|
|
5201
|
+
* <>
|
|
5202
|
+
* <Button variant="ghost" onClick={handleCancel}>Cancel</Button>
|
|
5203
|
+
* <Button variant="primary" onClick={handleSave} loading={isSaving}>Save Changes</Button>
|
|
5204
|
+
* </>
|
|
5205
|
+
* }
|
|
5206
|
+
* />
|
|
5207
|
+
* ```
|
|
5208
|
+
*
|
|
5209
|
+
* @example Info bar with center content
|
|
5210
|
+
* ```tsx
|
|
5211
|
+
* <ActionBar
|
|
5212
|
+
* variant="info"
|
|
5213
|
+
* centerContent={
|
|
5214
|
+
* <Text size="sm">Showing results for "search term" - 42 items found</Text>
|
|
5215
|
+
* }
|
|
5216
|
+
* onDismiss={clearSearch}
|
|
5217
|
+
* showDismiss
|
|
5218
|
+
* />
|
|
5219
|
+
* ```
|
|
5220
|
+
*/
|
|
5221
|
+
declare function ActionBar({ leftContent, centerContent, rightContent, actions, position, sticky, visible, onDismiss, showDismiss, className, variant, compact, }: ActionBarProps): react_jsx_runtime.JSX.Element | null;
|
|
5222
|
+
/**
|
|
5223
|
+
* ActionBar.Left - Semantic wrapper for left content
|
|
5224
|
+
*/
|
|
5225
|
+
declare function ActionBarLeft({ children }: {
|
|
5226
|
+
children: ReactNode;
|
|
5227
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5228
|
+
/**
|
|
5229
|
+
* ActionBar.Center - Semantic wrapper for center content
|
|
5230
|
+
*/
|
|
5231
|
+
declare function ActionBarCenter({ children }: {
|
|
5232
|
+
children: ReactNode;
|
|
5233
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5234
|
+
/**
|
|
5235
|
+
* ActionBar.Right - Semantic wrapper for right content
|
|
5236
|
+
*/
|
|
5237
|
+
declare function ActionBarRight({ children }: {
|
|
5238
|
+
children: ReactNode;
|
|
5239
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5240
|
+
|
|
4850
5241
|
interface AdminModalTab {
|
|
4851
5242
|
id: string;
|
|
4852
5243
|
label: string;
|
|
@@ -5308,6 +5699,31 @@ interface MultiSheetExcelOptions {
|
|
|
5308
5699
|
}
|
|
5309
5700
|
declare function createMultiSheetExcel({ filename, sheets }: MultiSheetExcelOptions): void;
|
|
5310
5701
|
|
|
5702
|
+
/**
|
|
5703
|
+
* Formula definitions for DataGrid intellisense
|
|
5704
|
+
* Based on fast-formula-parser supported functions
|
|
5705
|
+
*/
|
|
5706
|
+
interface FormulaParameter {
|
|
5707
|
+
name: string;
|
|
5708
|
+
description: string;
|
|
5709
|
+
optional?: boolean;
|
|
5710
|
+
}
|
|
5711
|
+
interface FormulaDefinition {
|
|
5712
|
+
name: string;
|
|
5713
|
+
category: FormulaCategory;
|
|
5714
|
+
description: string;
|
|
5715
|
+
syntax: string;
|
|
5716
|
+
parameters: FormulaParameter[];
|
|
5717
|
+
example?: string;
|
|
5718
|
+
}
|
|
5719
|
+
type FormulaCategory = 'Math' | 'Statistical' | 'Lookup' | 'Text' | 'Logical' | 'Date' | 'Information' | 'Financial';
|
|
5720
|
+
declare const FORMULA_DEFINITIONS: FormulaDefinition[];
|
|
5721
|
+
declare const FORMULA_NAMES: string[];
|
|
5722
|
+
declare const getFormulasByCategory: (category: FormulaCategory) => FormulaDefinition[];
|
|
5723
|
+
declare const searchFormulas: (query: string) => FormulaDefinition[];
|
|
5724
|
+
declare const getFormula: (name: string) => FormulaDefinition | undefined;
|
|
5725
|
+
declare const FORMULA_CATEGORIES: FormulaCategory[];
|
|
5726
|
+
|
|
5311
5727
|
interface UseColumnResizeOptions {
|
|
5312
5728
|
tableId?: string;
|
|
5313
5729
|
persist?: boolean;
|
|
@@ -5657,5 +6073,5 @@ declare function Responsive({ mobile, tablet, desktop, }: {
|
|
|
5657
6073
|
desktop?: ReactNode;
|
|
5658
6074
|
}): react_jsx_runtime.JSX.Element;
|
|
5659
6075
|
|
|
5660
|
-
export { Accordion, ActionButton, AdminModal, Alert, AlertDialog, AppLayout, Autocomplete, Avatar, BREAKPOINTS, Badge, BottomNavigation, BottomNavigationSpacer, BottomSheet, Box, Breadcrumbs, Button, ButtonGroup, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardView, Carousel, Checkbox, CheckboxList, Chip, ChipGroup, Collapsible, ColorPicker, Combobox, ComingSoon, CommandPalette, ConfirmDialog, ContextMenu, ControlBar, CurrencyDisplay, CurrencyInput, Dashboard, DashboardContent, DashboardHeader, DataTable, DataTableCardView, DateDisplay, DatePicker, DateRangePicker, DateTimePicker, DesktopOnly, Drawer, DrawerFooter, DropZone, Dropdown, DropdownTrigger, EmptyState, ErrorBoundary, ExpandablePanel, ExpandablePanelContainer, ExpandablePanelSpacer, ExpandableRowButton, ExpandableToolbar, ExpandedRowEditForm, ExportButton, FieldArray, FileUpload, FilterBar, FilterControls, FilterStatusBanner, FloatingActionButton, Form, FormContext, FormControl, FormWizard, Grid, GridItem, Hide, HoverCard, InfiniteScroll, Input, KanbanBoard, Layout, Loading, LoadingOverlay, Logo, MarkdownEditor, MaskedInput, Menu, MenuDivider, MobileHeader, MobileHeaderSpacer, MobileLayout, MobileOnly, MobileProvider, Modal, ModalFooter, MultiSelect, NotificationBar, NotificationIndicator, NumberInput, Page, PageLayout, PageNavigation, Pagination, PasswordInput, Popover, Progress, PullToRefresh, QueryTransparency, RadioGroup, Rating, Responsive, RichTextEditor, SearchBar, SearchableList, Select, Separator, Show, Sidebar, SidebarGroup, Skeleton, SkeletonCard, SkeletonTable, Slider, Spreadsheet, SpreadsheetReport, Stack, StatCard$1 as StatCard, StatItem, StatsCardGrid, StatsGrid, StatusBadge, StatusBar, StepIndicator, Stepper, SwipeActions, Switch, Tabs, Text, Textarea, ThemeToggle, TimePicker, Timeline, Toast, ToastContainer, Tooltip, Transfer, TreeView, TwoColumnContent, UserProfileButton, addErrorMessage, addInfoMessage, addSuccessMessage, addWarningMessage, calculateColumnWidth, createActionsSection, createFiltersSection, createMultiSheetExcel, createPageControlsSection, createQueryDetailsSection, exportDataTableToExcel, exportToExcel, formatStatisticValue, formatStatistics, loadColumnOrder, loadColumnWidths, reorderArray, saveColumnOrder, saveColumnWidths, statusManager, useBreakpoint, useBreakpointValue, useColumnReorder, useColumnResize, useCommandPalette, useConfirmDialog, useFABScroll, useFormContext, useIsDesktop, useIsMobile, useIsTablet, useIsTouchDevice, useMediaQuery, useMobileContext, useOrientation, usePrefersMobile, usePullToRefresh, useResponsiveCallback, useSafeAreaInsets, useViewportSize, withMobileContext };
|
|
5661
|
-
export type { AccordionItem, AccordionProps, ActionButtonProps, ActionsSectionProps, AdminModalProps, AdminModalTab, AlertDialogAction, AlertDialogProps, AlertProps, AppLayoutProps, AppliedFilter, AutocompleteHandle, AutocompleteOption, AutocompleteProps, AvatarProps, BadgeProps, BaseDataItem, BottomNavItem, BottomNavigationProps, BottomSheetProps, BoxProps, BreadcrumbItem, BreadcrumbsProps, Breakpoint, ButtonGroupOption, ButtonGroupProps, ButtonProps, CalendarEvent, CalendarProps, CardProps, CardViewConfig, CardViewItem, CarouselItem, CarouselProps, CheckboxFormField, CheckboxListItem, CheckboxListProps, CheckboxProps, ChipGroupProps, ChipProps, CollapsibleProps, ColorPickerProps, ColumnOrder, ColumnResize, ComboboxHandle, ComboboxOption, ComboboxProps, ComingSoonProps, Command, CommandPaletteProps, ConfirmDialogProps, ContextMenuProps, ControlBarProps, ControlBarSection, CurrencyDisplayProps, CurrencyInputProps, DashboardContentProps, DashboardHeaderProps, DashboardProps, DataFetchParams, DataTableAction, DataTableCardViewProps, DataTableColumn, DataTableExportOptions, DateDisplayProps, DatePickerHandle, DatePickerProps, DateRange, DateRangePickerHandle, DateRangePickerProps, DateTimePickerProps, DrawerProps, DropZoneProps, DropdownItem, DropdownProps, EmptyStateProps, ErrorBoundaryProps, ExcelColumn, ExpandablePanelProps, ExpandableRowButtonProps, ExpandableToolbarProps, ExpandedRowConfig, ExpandedRowEditFormProps, ExpansionMode, ExportButtonProps, ExportFormat, ExportToExcelOptions, FABAction, FieldArrayProps, FieldErrors, FileUploadProps, FilterBarProps, FilterConfig, FiltersSectionProps, FloatingActionButtonProps, FormContextValue, FormControlProps, FormField, FormFieldType, FormProps, FormWizardProps, FormattedStatistic, GridItemProps, GridProps, HoverCardProps, InfiniteScrollProps, InputProps, KanbanBoardProps, KanbanCard, KanbanColumn, LayoutProps, LoadingOverlayProps, LoadingProps, LogoProps, MarkdownEditorProps, MaskType, MaskedInputHandle, MaskedInputProps, MenuItem, MenuProps, MobileContextValue, MobileHeaderProps, MobileLayoutProps, MobileProviderProps, ModalProps, MultiSelectHandle, MultiSelectOption, MultiSelectProps, MultiSheetExcelOptions, NotificationIndicatorProps, NumberInputProps, Orientation, PageControlsSectionProps, PageNavigationProps, PageProps, PaginationProps, PaginationResponse, PasswordInputHandle, PasswordInputProps, PasswordStrength, PopoverProps, ProgressProps, PullToRefreshProps, QueryDetailsSectionProps, QueryTransparencyInfo, QueryTransparencyProps, RadioGroupProps, RadioOption, RatingProps, RichTextEditorProps, SearchBarProps, SearchableListItem, SearchableListProps, SelectFormField, SelectHandle, SelectOption, SelectProps, SeparatorProps, SidebarGroupProps, SidebarItem, SidebarProps, SliderProps, SortConfig, SpreadsheetCell, SpreadsheetProps, StackProps, StatCardProps, StatItemProps, StatisticConfig, StatisticFormat, StatsGridProps, StatusBadgeProps, StatusBarProps, StatusMessage, StatusType, Step, StepConfig, StepIndicatorProps, StepperProps, SwipeAction, SwipeActionsProps, SwitchFormField, SwitchProps, Tab, TabsProps, TextFormField, TextProps, TextareaFormField, TextareaProps, ThemeToggleProps, TimePickerHandle, TimePickerProps, TimelineItem, TimelineProps, ToastProps, ToastType, ToolbarSection, TooltipProps, TransferItem, TransferProps, TreeNode, TreeViewProps, TwoColumnContentProps, UploadedFile, UseColumnReorderOptions, UseColumnResizeOptions, UseDataTableOptions, UseDataTableReturn, UserProfileButtonProps, ValidationRule, ValidationState$1 as ValidationState, ViewportSize, WizardStep };
|
|
6076
|
+
export { Accordion, ActionBar, ActionBarCenter, ActionBarLeft, ActionBarRight, ActionButton, AdminModal, Alert, AlertDialog, AppLayout, Autocomplete, Avatar, BREAKPOINTS, Badge, BottomNavigation, BottomNavigationSpacer, BottomSheet, Box, Breadcrumbs, Button, ButtonGroup, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardView, Carousel, Checkbox, CheckboxList, Chip, ChipGroup, Collapsible, ColorPicker, Combobox, ComingSoon, CommandPalette, ConfirmDialog, ContextMenu, ControlBar, CurrencyDisplay, CurrencyInput, Dashboard, DashboardContent, DashboardHeader, DataGrid, DataTable, DataTableCardView, DateDisplay, DatePicker, DateRangePicker, DateTimePicker, DesktopOnly, Drawer, DrawerFooter, DropZone, Dropdown, DropdownTrigger, EmptyState, ErrorBoundary, ExpandablePanel, ExpandablePanelContainer, ExpandablePanelSpacer, ExpandableRowButton, ExpandableToolbar, ExpandedRowEditForm, ExportButton, FORMULA_CATEGORIES, FORMULA_DEFINITIONS, FORMULA_NAMES, FieldArray, FileUpload, FilterBar, FilterControls, FilterStatusBanner, FloatingActionButton, Form, FormContext, FormControl, FormWizard, Grid, GridItem, Hide, HoverCard, InfiniteScroll, Input, KanbanBoard, Layout, Loading, LoadingOverlay, Logo, MarkdownEditor, MaskedInput, Menu, MenuDivider, MobileHeader, MobileHeaderSpacer, MobileLayout, MobileOnly, MobileProvider, Modal, ModalFooter, MultiSelect, NotificationBar, NotificationIndicator, NumberInput, Page, PageHeader, PageLayout, PageNavigation, Pagination, PasswordInput, Popover, Progress, PullToRefresh, QueryTransparency, RadioGroup, Rating, Responsive, RichTextEditor, SearchBar, SearchableList, Select, Separator, Show, Sidebar, SidebarGroup, Skeleton, SkeletonCard, SkeletonTable, Slider, Spreadsheet, SpreadsheetReport, Stack, StatCard$1 as StatCard, StatItem, StatsCardGrid, StatsGrid, StatusBadge, StatusBar, StepIndicator, Stepper, SwipeActions, Switch, Tabs, Text, Textarea, ThemeToggle, TimePicker, Timeline, Toast, ToastContainer, Tooltip, Transfer, TreeView, TwoColumnContent, UserProfileButton, addErrorMessage, addInfoMessage, addSuccessMessage, addWarningMessage, calculateColumnWidth, createActionsSection, createFiltersSection, createMultiSheetExcel, createPageControlsSection, createQueryDetailsSection, exportDataTableToExcel, exportToExcel, formatStatisticValue, formatStatistics, getFormula, getFormulasByCategory, loadColumnOrder, loadColumnWidths, reorderArray, saveColumnOrder, saveColumnWidths, searchFormulas, statusManager, useBreakpoint, useBreakpointValue, useColumnReorder, useColumnResize, useCommandPalette, useConfirmDialog, useFABScroll, useFormContext, useIsDesktop, useIsMobile, useIsTablet, useIsTouchDevice, useMediaQuery, useMobileContext, useOrientation, usePrefersMobile, usePullToRefresh, useResponsiveCallback, useSafeAreaInsets, useViewportSize, withMobileContext };
|
|
6077
|
+
export type { AccordionItem, AccordionProps, ActionBarAction, ActionBarProps, ActionButtonProps, ActionsSectionProps, AdminModalProps, AdminModalTab, AlertDialogAction, AlertDialogProps, AlertProps, AppLayoutProps, AppliedFilter, AutocompleteHandle, AutocompleteOption, AutocompleteProps, AvatarProps, BadgeProps, BaseDataItem, BottomNavItem, BottomNavigationProps, BottomSheetProps, BoxProps, BreadcrumbItem, BreadcrumbsProps, Breakpoint, ButtonGroupOption, ButtonGroupProps, ButtonProps, CalendarEvent, CalendarProps, CardProps, CardViewConfig, CardViewItem, CarouselItem, CarouselProps, CellValue, CheckboxFormField, CheckboxListItem, CheckboxListProps, CheckboxProps, ChipGroupProps, ChipProps, CollapsibleProps, ColorPickerProps, ColumnOrder, ColumnResize, ComboboxHandle, ComboboxOption, ComboboxProps, ComingSoonProps, Command, CommandPaletteProps, ConfirmDialogProps, ContextMenuProps, ControlBarProps, ControlBarSection, CurrencyDisplayProps, CurrencyInputProps, DashboardContentProps, DashboardHeaderProps, DashboardProps, DataFetchParams, DataGridCell, DataGridColumn, DataGridHandle, DataGridProps, DataTableAction, DataTableCardViewProps, DataTableColumn, DataTableExportOptions, DateDisplayProps, DatePickerHandle, DatePickerProps, DateRange, DateRangePickerHandle, DateRangePickerProps, DateTimePickerProps, DrawerProps, DropZoneProps, DropdownItem, DropdownProps, EmptyStateProps, ErrorBoundaryProps, ExcelColumn, ExpandablePanelProps, ExpandableRowButtonProps, ExpandableToolbarProps, ExpandedRowConfig, ExpandedRowEditFormProps, ExpansionMode, ExportButtonProps, ExportFormat, ExportToExcelOptions, FABAction, FieldArrayProps, FieldErrors, FileUploadProps, FilterBarProps, FilterConfig, FiltersSectionProps, FloatingActionButtonProps, FormContextValue, FormControlProps, FormField, FormFieldType, FormProps, FormWizardProps, FormattedStatistic, FormulaCategory, FormulaDefinition, FormulaParameter, FrozenRowMode, GridItemProps, GridProps, HoverCardProps, InfiniteScrollProps, InputProps, KanbanBoardProps, KanbanCard, KanbanColumn, LayoutProps, LoadingOverlayProps, LoadingProps, LogoProps, MarkdownEditorProps, MaskType, MaskedInputHandle, MaskedInputProps, MenuItem, MenuProps, MobileContextValue, MobileHeaderProps, MobileLayoutProps, MobileProviderProps, ModalProps, MultiSelectHandle, MultiSelectOption, MultiSelectProps, MultiSheetExcelOptions, NotificationIndicatorProps, NumberInputProps, Orientation, PageControlsSectionProps, PageHeaderAction, PageHeaderProps, PageNavigationProps, PageProps, PaginationProps, PaginationResponse, PasswordInputHandle, PasswordInputProps, PasswordStrength, PopoverProps, ProgressProps, PullToRefreshProps, QueryDetailsSectionProps, QueryTransparencyInfo, QueryTransparencyProps, RadioGroupProps, RadioOption, RatingProps, RichTextEditorProps, SearchBarProps, SearchableListItem, SearchableListProps, SelectFormField, SelectHandle, SelectOption, SelectProps, SeparatorProps, SidebarGroupProps, SidebarItem, SidebarProps, SliderProps, SortConfig, SpreadsheetCell, SpreadsheetProps, StackProps, StatCardProps, StatItemProps, StatisticConfig, StatisticFormat, StatsGridProps, StatusBadgeProps, StatusBarProps, StatusMessage, StatusType, Step, StepConfig, StepIndicatorProps, StepperProps, SwipeAction, SwipeActionsProps, SwitchFormField, SwitchProps, Tab, TabsProps, TextFormField, TextProps, TextareaFormField, TextareaProps, ThemeToggleProps, TimePickerHandle, TimePickerProps, TimelineItem, TimelineProps, ToastProps, ToastType, ToolbarSection, TooltipProps, TransferItem, TransferProps, TreeNode, TreeViewProps, TwoColumnContentProps, UploadedFile, UseColumnReorderOptions, UseColumnResizeOptions, UseDataTableOptions, UseDataTableReturn, UserProfileButtonProps, ValidationRule, ValidationState$1 as ValidationState, ViewportSize, WizardStep };
|