@papernote/ui 1.3.1 → 1.6.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/dist/components/ActionBar.d.ts +112 -0
- package/dist/components/ActionBar.d.ts.map +1 -0
- package/dist/components/BottomNavigation.d.ts +98 -0
- package/dist/components/BottomNavigation.d.ts.map +1 -0
- package/dist/components/Checkbox.d.ts +2 -0
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/CheckboxList.d.ts +81 -0
- package/dist/components/CheckboxList.d.ts.map +1 -0
- package/dist/components/Chip.d.ts +92 -1
- package/dist/components/Chip.d.ts.map +1 -1
- package/dist/components/ConfirmDialog.d.ts +43 -1
- package/dist/components/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/DataTable.d.ts +10 -1
- package/dist/components/DataTable.d.ts.map +1 -1
- package/dist/components/DataTableCardView.d.ts +99 -0
- package/dist/components/DataTableCardView.d.ts.map +1 -0
- package/dist/components/ExpandablePanel.d.ts +142 -0
- package/dist/components/ExpandablePanel.d.ts.map +1 -0
- package/dist/components/FloatingActionButton.d.ts +98 -0
- package/dist/components/FloatingActionButton.d.ts.map +1 -0
- package/dist/components/Input.d.ts +45 -1
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/MobileHeader.d.ts +98 -0
- package/dist/components/MobileHeader.d.ts.map +1 -0
- package/dist/components/MobileLayout.d.ts +121 -0
- package/dist/components/MobileLayout.d.ts.map +1 -0
- package/dist/components/Modal.d.ts +78 -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/PullToRefresh.d.ts +87 -0
- package/dist/components/PullToRefresh.d.ts.map +1 -0
- package/dist/components/QueryTransparency.d.ts +1 -1
- package/dist/components/QueryTransparency.d.ts.map +1 -1
- package/dist/components/SearchableList.d.ts +83 -0
- package/dist/components/SearchableList.d.ts.map +1 -0
- package/dist/components/Select.d.ts +16 -2
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Sidebar.d.ts +40 -1
- package/dist/components/Sidebar.d.ts.map +1 -1
- package/dist/components/SwipeActions.d.ts +93 -0
- package/dist/components/SwipeActions.d.ts.map +1 -0
- package/dist/components/Switch.d.ts +1 -0
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Textarea.d.ts +13 -0
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/index.d.ts +31 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/context/MobileContext.d.ts +168 -0
- package/dist/context/MobileContext.d.ts.map +1 -0
- package/dist/hooks/useResponsive.d.ts +158 -0
- package/dist/hooks/useResponsive.d.ts.map +1 -0
- package/dist/index.d.ts +1871 -51
- package/dist/index.esm.js +3025 -196
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3063 -194
- package/dist/index.js.map +1 -1
- package/dist/styles.css +434 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionBar.stories.tsx +246 -0
- package/src/components/ActionBar.tsx +242 -0
- package/src/components/BottomNavigation.stories.tsx +142 -0
- package/src/components/BottomNavigation.tsx +225 -0
- package/src/components/Checkbox.stories.tsx +162 -0
- package/src/components/Checkbox.tsx +22 -6
- package/src/components/CheckboxList.stories.tsx +311 -0
- package/src/components/CheckboxList.tsx +433 -0
- package/src/components/Chip.stories.tsx +389 -0
- package/src/components/Chip.tsx +182 -3
- package/src/components/ConfirmDialog.tsx +56 -4
- package/src/components/DataTable.tsx +60 -1
- package/src/components/DataTableCardView.stories.tsx +307 -0
- package/src/components/DataTableCardView.tsx +419 -0
- package/src/components/ExpandablePanel.stories.tsx +620 -0
- package/src/components/ExpandablePanel.tsx +383 -0
- package/src/components/FloatingActionButton.stories.tsx +197 -0
- package/src/components/FloatingActionButton.tsx +301 -0
- package/src/components/Grid.stories.tsx +16 -16
- package/src/components/Input.stories.tsx +214 -0
- package/src/components/Input.tsx +81 -4
- package/src/components/MobileHeader.stories.tsx +205 -0
- package/src/components/MobileHeader.tsx +233 -0
- package/src/components/MobileLayout.stories.tsx +338 -0
- package/src/components/MobileLayout.tsx +313 -0
- package/src/components/Modal.stories.tsx +388 -0
- package/src/components/Modal.tsx +122 -4
- package/src/components/PageHeader.stories.tsx +198 -0
- package/src/components/PageHeader.tsx +217 -0
- package/src/components/PullToRefresh.stories.tsx +321 -0
- package/src/components/PullToRefresh.tsx +294 -0
- package/src/components/QueryTransparency.tsx +1 -1
- package/src/components/SearchableList.stories.tsx +437 -0
- package/src/components/SearchableList.tsx +326 -0
- package/src/components/Select.stories.tsx +190 -0
- package/src/components/Select.tsx +353 -137
- package/src/components/Sidebar.tsx +193 -10
- package/src/components/SwipeActions.stories.tsx +327 -0
- package/src/components/SwipeActions.tsx +387 -0
- package/src/components/Switch.stories.tsx +158 -0
- package/src/components/Switch.tsx +12 -3
- package/src/components/Textarea.tsx +31 -1
- package/src/components/index.ts +69 -3
- package/src/context/MobileContext.tsx +296 -0
- package/src/hooks/useResponsive.ts +360 -0
- package/src/types/index.ts +4 -0
- package/tailwind.config.js +56 -1
package/dist/index.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ type ValidationState$1 = 'error' | 'success' | 'warning' | null;
|
|
|
155
155
|
/**
|
|
156
156
|
* Input component props
|
|
157
157
|
*/
|
|
158
|
-
interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
158
|
+
interface InputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
159
159
|
/** Input label text */
|
|
160
160
|
label?: string;
|
|
161
161
|
/** Helper text displayed below input */
|
|
@@ -186,6 +186,31 @@ interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement
|
|
|
186
186
|
onClear?: () => void;
|
|
187
187
|
/** Show loading spinner in input */
|
|
188
188
|
loading?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Input mode hint for mobile keyboards.
|
|
191
|
+
* 'none' - No virtual keyboard
|
|
192
|
+
* 'text' - Standard text keyboard (default)
|
|
193
|
+
* 'decimal' - Decimal number keyboard
|
|
194
|
+
* 'numeric' - Numeric keyboard
|
|
195
|
+
* 'tel' - Telephone keypad
|
|
196
|
+
* 'search' - Search optimized keyboard
|
|
197
|
+
* 'email' - Email optimized keyboard
|
|
198
|
+
* 'url' - URL optimized keyboard
|
|
199
|
+
*/
|
|
200
|
+
inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
201
|
+
/**
|
|
202
|
+
* Enter key hint for mobile keyboards.
|
|
203
|
+
* 'enter' - Standard enter key
|
|
204
|
+
* 'done' - Done action
|
|
205
|
+
* 'go' - Go/navigate action
|
|
206
|
+
* 'next' - Move to next field
|
|
207
|
+
* 'previous' - Move to previous field
|
|
208
|
+
* 'search' - Search action
|
|
209
|
+
* 'send' - Send action
|
|
210
|
+
*/
|
|
211
|
+
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
212
|
+
/** Size variant - 'md' is default, 'lg' provides larger touch target (44px min) */
|
|
213
|
+
size?: 'sm' | 'md' | 'lg';
|
|
189
214
|
}
|
|
190
215
|
/**
|
|
191
216
|
* Input - Text input component with validation, icons, and prefixes/suffixes
|
|
@@ -193,12 +218,19 @@ interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement
|
|
|
193
218
|
* A feature-rich text input with support for validation states, character counting,
|
|
194
219
|
* password visibility toggle, prefix/suffix text and icons, and clearable functionality.
|
|
195
220
|
*
|
|
221
|
+
* Mobile optimizations:
|
|
222
|
+
* - inputMode prop for appropriate mobile keyboard
|
|
223
|
+
* - enterKeyHint prop for mobile keyboard action button
|
|
224
|
+
* - Size variants with touch-friendly targets (44px for 'lg')
|
|
225
|
+
*
|
|
196
226
|
* @example Basic input with label
|
|
197
227
|
* ```tsx
|
|
198
228
|
* <Input
|
|
199
229
|
* label="Email"
|
|
200
230
|
* type="email"
|
|
201
231
|
* placeholder="Enter your email"
|
|
232
|
+
* inputMode="email"
|
|
233
|
+
* enterKeyHint="next"
|
|
202
234
|
* />
|
|
203
235
|
* ```
|
|
204
236
|
*
|
|
@@ -224,11 +256,23 @@ interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement
|
|
|
224
256
|
* />
|
|
225
257
|
* ```
|
|
226
258
|
*
|
|
259
|
+
* @example Mobile-optimized phone input
|
|
260
|
+
* ```tsx
|
|
261
|
+
* <Input
|
|
262
|
+
* label="Phone Number"
|
|
263
|
+
* type="tel"
|
|
264
|
+
* inputMode="tel"
|
|
265
|
+
* enterKeyHint="done"
|
|
266
|
+
* size="lg"
|
|
267
|
+
* />
|
|
268
|
+
* ```
|
|
269
|
+
*
|
|
227
270
|
* @example With prefix/suffix
|
|
228
271
|
* ```tsx
|
|
229
272
|
* <Input
|
|
230
273
|
* label="Amount"
|
|
231
274
|
* type="number"
|
|
275
|
+
* inputMode="decimal"
|
|
232
276
|
* prefixIcon={<DollarSign />}
|
|
233
277
|
* suffix="USD"
|
|
234
278
|
* clearable
|
|
@@ -310,12 +354,16 @@ interface SelectProps {
|
|
|
310
354
|
virtualHeight?: string;
|
|
311
355
|
/** Height of each option row in pixels (default: 42) */
|
|
312
356
|
virtualItemHeight?: number;
|
|
357
|
+
/** Size of the select trigger - 'lg' provides 44px touch-friendly target */
|
|
358
|
+
size?: 'sm' | 'md' | 'lg';
|
|
359
|
+
/** Mobile display mode - 'auto' uses BottomSheet on mobile, 'dropdown' always uses dropdown, 'native' uses native select on mobile */
|
|
360
|
+
mobileMode?: 'auto' | 'dropdown' | 'native';
|
|
313
361
|
}
|
|
314
362
|
/**
|
|
315
|
-
* Select - Dropdown select component with search, groups, and
|
|
363
|
+
* Select - Dropdown select component with search, groups, virtual scrolling, and mobile support
|
|
316
364
|
*
|
|
317
365
|
* A feature-rich select component supporting flat or grouped options, search/filter,
|
|
318
|
-
* option creation, virtual scrolling for large lists, and
|
|
366
|
+
* option creation, virtual scrolling for large lists, and mobile-optimized BottomSheet display.
|
|
319
367
|
*
|
|
320
368
|
* @example Basic select
|
|
321
369
|
* ```tsx
|
|
@@ -333,6 +381,16 @@ interface SelectProps {
|
|
|
333
381
|
* />
|
|
334
382
|
* ```
|
|
335
383
|
*
|
|
384
|
+
* @example Mobile-optimized with large touch targets
|
|
385
|
+
* ```tsx
|
|
386
|
+
* <Select
|
|
387
|
+
* options={options}
|
|
388
|
+
* size="lg"
|
|
389
|
+
* mobileMode="auto"
|
|
390
|
+
* placeholder="Select..."
|
|
391
|
+
* />
|
|
392
|
+
* ```
|
|
393
|
+
*
|
|
336
394
|
* @example Searchable with groups
|
|
337
395
|
* ```tsx
|
|
338
396
|
* const groups = [
|
|
@@ -413,6 +471,7 @@ interface SwitchProps {
|
|
|
413
471
|
label?: string;
|
|
414
472
|
description?: string;
|
|
415
473
|
disabled?: boolean;
|
|
474
|
+
/** Size variant - 'lg' provides better touch targets. On mobile, 'md' auto-upgrades to 'lg'. */
|
|
416
475
|
size?: 'sm' | 'md' | 'lg';
|
|
417
476
|
/** Show loading spinner (disables interaction) */
|
|
418
477
|
loading?: boolean;
|
|
@@ -437,6 +496,19 @@ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
|
437
496
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
438
497
|
/** Show loading spinner (for async operations like auto-save) */
|
|
439
498
|
loading?: boolean;
|
|
499
|
+
/**
|
|
500
|
+
* Size variant - 'md' is default, 'lg' provides larger touch-friendly text and padding.
|
|
501
|
+
* On mobile, 'md' is automatically upgraded to 'lg' for better touch targets.
|
|
502
|
+
*/
|
|
503
|
+
size?: 'sm' | 'md' | 'lg';
|
|
504
|
+
/**
|
|
505
|
+
* Enter key hint for mobile keyboards.
|
|
506
|
+
* 'enter' - Standard enter key (newline)
|
|
507
|
+
* 'done' - Done action
|
|
508
|
+
* 'go' - Go/navigate action
|
|
509
|
+
* 'send' - Send action
|
|
510
|
+
*/
|
|
511
|
+
enterKeyHint?: 'enter' | 'done' | 'go' | 'send';
|
|
440
512
|
}
|
|
441
513
|
declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
442
514
|
|
|
@@ -452,6 +524,8 @@ interface CheckboxProps {
|
|
|
452
524
|
name?: string;
|
|
453
525
|
/** Optional icon to display next to label */
|
|
454
526
|
icon?: React.ReactNode;
|
|
527
|
+
/** Size variant - 'lg' provides 44px touch-friendly targets. On mobile, 'md' auto-upgrades to 'lg'. */
|
|
528
|
+
size?: 'sm' | 'md' | 'lg';
|
|
455
529
|
}
|
|
456
530
|
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
457
531
|
|
|
@@ -1289,8 +1363,85 @@ interface ModalProps {
|
|
|
1289
1363
|
showCloseButton?: boolean;
|
|
1290
1364
|
/** Animation variant for modal entrance (default: 'scale') */
|
|
1291
1365
|
animation?: 'scale' | 'slide-up' | 'slide-down' | 'fade' | 'none';
|
|
1366
|
+
/** Enable automatic scrolling for content that exceeds viewport height */
|
|
1367
|
+
scrollable?: boolean;
|
|
1368
|
+
/** Maximum height of the modal content area (e.g., '70vh', '500px') */
|
|
1369
|
+
maxHeight?: string;
|
|
1370
|
+
/** Mobile display mode: 'auto' uses BottomSheet on mobile, 'modal' always uses modal, 'sheet' always uses BottomSheet */
|
|
1371
|
+
mobileMode?: 'auto' | 'modal' | 'sheet';
|
|
1372
|
+
/** Height preset for BottomSheet on mobile (default: 'lg') */
|
|
1373
|
+
mobileHeight?: 'sm' | 'md' | 'lg' | 'full';
|
|
1374
|
+
/** Show drag handle on BottomSheet (default: true) */
|
|
1375
|
+
mobileShowHandle?: boolean;
|
|
1292
1376
|
}
|
|
1293
|
-
|
|
1377
|
+
/**
|
|
1378
|
+
* Modal - Adaptive dialog component
|
|
1379
|
+
*
|
|
1380
|
+
* On desktop, renders as a centered modal dialog.
|
|
1381
|
+
* On mobile (when mobileMode='auto'), automatically renders as a BottomSheet
|
|
1382
|
+
* for better touch interaction and visibility.
|
|
1383
|
+
*
|
|
1384
|
+
* @example Basic modal
|
|
1385
|
+
* ```tsx
|
|
1386
|
+
* <Modal isOpen={isOpen} onClose={handleClose} title="Edit User">
|
|
1387
|
+
* <form>...</form>
|
|
1388
|
+
* <ModalFooter>
|
|
1389
|
+
* <Button onClick={handleClose}>Cancel</Button>
|
|
1390
|
+
* <Button variant="primary" onClick={handleSave}>Save</Button>
|
|
1391
|
+
* </ModalFooter>
|
|
1392
|
+
* </Modal>
|
|
1393
|
+
* ```
|
|
1394
|
+
*
|
|
1395
|
+
* @example Scrollable modal for long content
|
|
1396
|
+
* ```tsx
|
|
1397
|
+
* <Modal
|
|
1398
|
+
* isOpen={isOpen}
|
|
1399
|
+
* onClose={handleClose}
|
|
1400
|
+
* title="Terms and Conditions"
|
|
1401
|
+
* scrollable
|
|
1402
|
+
* >
|
|
1403
|
+
* {longContent}
|
|
1404
|
+
* </Modal>
|
|
1405
|
+
* ```
|
|
1406
|
+
*
|
|
1407
|
+
* @example Modal with custom max height
|
|
1408
|
+
* ```tsx
|
|
1409
|
+
* <Modal
|
|
1410
|
+
* isOpen={isOpen}
|
|
1411
|
+
* onClose={handleClose}
|
|
1412
|
+
* title="Document Preview"
|
|
1413
|
+
* maxHeight="70vh"
|
|
1414
|
+
* >
|
|
1415
|
+
* {documentContent}
|
|
1416
|
+
* </Modal>
|
|
1417
|
+
* ```
|
|
1418
|
+
*
|
|
1419
|
+
* @example Force modal on mobile
|
|
1420
|
+
* ```tsx
|
|
1421
|
+
* <Modal
|
|
1422
|
+
* isOpen={isOpen}
|
|
1423
|
+
* onClose={handleClose}
|
|
1424
|
+
* title="Settings"
|
|
1425
|
+
* mobileMode="modal"
|
|
1426
|
+
* >
|
|
1427
|
+
* ...
|
|
1428
|
+
* </Modal>
|
|
1429
|
+
* ```
|
|
1430
|
+
*
|
|
1431
|
+
* @example Always use BottomSheet
|
|
1432
|
+
* ```tsx
|
|
1433
|
+
* <Modal
|
|
1434
|
+
* isOpen={isOpen}
|
|
1435
|
+
* onClose={handleClose}
|
|
1436
|
+
* title="Select Option"
|
|
1437
|
+
* mobileMode="sheet"
|
|
1438
|
+
* mobileHeight="md"
|
|
1439
|
+
* >
|
|
1440
|
+
* ...
|
|
1441
|
+
* </Modal>
|
|
1442
|
+
* ```
|
|
1443
|
+
*/
|
|
1444
|
+
declare function Modal({ isOpen, onClose, title, children, size, showCloseButton, animation, scrollable, maxHeight, mobileMode, mobileHeight, mobileShowHandle, }: ModalProps): react_jsx_runtime.JSX.Element | null;
|
|
1294
1445
|
declare function ModalFooter({ children }: {
|
|
1295
1446
|
children: React__default.ReactNode;
|
|
1296
1447
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -1335,8 +1486,47 @@ interface ConfirmDialogProps {
|
|
|
1335
1486
|
variant?: 'danger' | 'warning' | 'info';
|
|
1336
1487
|
icon?: React__default.ReactNode;
|
|
1337
1488
|
isLoading?: boolean;
|
|
1489
|
+
/** Mobile display mode (inherited from Modal) */
|
|
1490
|
+
mobileMode?: ModalProps['mobileMode'];
|
|
1491
|
+
/** Height preset for BottomSheet on mobile */
|
|
1492
|
+
mobileHeight?: ModalProps['mobileHeight'];
|
|
1338
1493
|
}
|
|
1339
|
-
|
|
1494
|
+
/**
|
|
1495
|
+
* ConfirmDialog - Confirmation dialog with mobile support
|
|
1496
|
+
*
|
|
1497
|
+
* @example Basic usage
|
|
1498
|
+
* ```tsx
|
|
1499
|
+
* <ConfirmDialog
|
|
1500
|
+
* isOpen={isOpen}
|
|
1501
|
+
* onClose={handleClose}
|
|
1502
|
+
* onConfirm={handleDelete}
|
|
1503
|
+
* title="Delete Item"
|
|
1504
|
+
* message="Are you sure you want to delete this item? This action cannot be undone."
|
|
1505
|
+
* variant="danger"
|
|
1506
|
+
* />
|
|
1507
|
+
* ```
|
|
1508
|
+
*
|
|
1509
|
+
* @example With useConfirmDialog hook
|
|
1510
|
+
* ```tsx
|
|
1511
|
+
* const confirmDialog = useConfirmDialog();
|
|
1512
|
+
*
|
|
1513
|
+
* const handleDelete = () => {
|
|
1514
|
+
* confirmDialog.show({
|
|
1515
|
+
* title: 'Delete Item',
|
|
1516
|
+
* message: 'Are you sure?',
|
|
1517
|
+
* onConfirm: async () => await deleteItem(),
|
|
1518
|
+
* });
|
|
1519
|
+
* };
|
|
1520
|
+
*
|
|
1521
|
+
* return (
|
|
1522
|
+
* <>
|
|
1523
|
+
* <button onClick={handleDelete}>Delete</button>
|
|
1524
|
+
* <ConfirmDialog {...confirmDialog.props} />
|
|
1525
|
+
* </>
|
|
1526
|
+
* );
|
|
1527
|
+
* ```
|
|
1528
|
+
*/
|
|
1529
|
+
declare function ConfirmDialog({ isOpen, onClose, onConfirm, title, message, confirmLabel, cancelLabel, variant, icon, isLoading, mobileMode, mobileHeight, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
|
|
1340
1530
|
/**
|
|
1341
1531
|
* Hook for managing ConfirmDialog state
|
|
1342
1532
|
*
|
|
@@ -1966,8 +2156,262 @@ interface ChipProps {
|
|
|
1966
2156
|
disabled?: boolean;
|
|
1967
2157
|
className?: string;
|
|
1968
2158
|
onClick?: () => void;
|
|
2159
|
+
/** Whether the chip is in a selected state */
|
|
2160
|
+
selected?: boolean;
|
|
2161
|
+
/** Maximum width for text truncation */
|
|
2162
|
+
maxWidth?: string | number;
|
|
2163
|
+
/** Unique key for use in ChipGroup selection */
|
|
2164
|
+
chipKey?: string;
|
|
2165
|
+
}
|
|
2166
|
+
interface ChipGroupProps {
|
|
2167
|
+
children: ReactNode;
|
|
2168
|
+
/** Layout direction */
|
|
2169
|
+
direction?: 'horizontal' | 'vertical';
|
|
2170
|
+
/** Whether chips should wrap to next line */
|
|
2171
|
+
wrap?: boolean;
|
|
2172
|
+
/** Gap between chips */
|
|
2173
|
+
gap?: 'xs' | 'sm' | 'md' | 'lg';
|
|
2174
|
+
/** Selection mode */
|
|
2175
|
+
selectionMode?: 'none' | 'single' | 'multiple';
|
|
2176
|
+
/** Selected chip keys (controlled) */
|
|
2177
|
+
selectedKeys?: string[];
|
|
2178
|
+
/** Callback when selection changes */
|
|
2179
|
+
onSelectionChange?: (keys: string[]) => void;
|
|
2180
|
+
/** Additional CSS classes */
|
|
2181
|
+
className?: string;
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Chip - Compact element for displaying values with optional remove functionality
|
|
2185
|
+
*
|
|
2186
|
+
* @example Basic chip
|
|
2187
|
+
* ```tsx
|
|
2188
|
+
* <Chip>Tag Name</Chip>
|
|
2189
|
+
* ```
|
|
2190
|
+
*
|
|
2191
|
+
* @example Removable chip
|
|
2192
|
+
* ```tsx
|
|
2193
|
+
* <Chip onClose={() => removeTag(tag)}>
|
|
2194
|
+
* {tag.name}
|
|
2195
|
+
* </Chip>
|
|
2196
|
+
* ```
|
|
2197
|
+
*
|
|
2198
|
+
* @example With icon and selected state
|
|
2199
|
+
* ```tsx
|
|
2200
|
+
* <Chip
|
|
2201
|
+
* icon={<Star className="h-3 w-3" />}
|
|
2202
|
+
* selected={isSelected}
|
|
2203
|
+
* onClick={() => toggleSelection()}
|
|
2204
|
+
* >
|
|
2205
|
+
* Favorite
|
|
2206
|
+
* </Chip>
|
|
2207
|
+
* ```
|
|
2208
|
+
*/
|
|
2209
|
+
declare function Chip({ children, variant, size, onClose, icon, disabled, className, onClick, selected, maxWidth, chipKey, }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
2210
|
+
/**
|
|
2211
|
+
* ChipGroup - Container for multiple chips with layout and selection support
|
|
2212
|
+
*
|
|
2213
|
+
* @example Basic group
|
|
2214
|
+
* ```tsx
|
|
2215
|
+
* <ChipGroup wrap gap="sm">
|
|
2216
|
+
* {tags.map(tag => (
|
|
2217
|
+
* <Chip key={tag.id} onClose={() => removeTag(tag)}>
|
|
2218
|
+
* {tag.name}
|
|
2219
|
+
* </Chip>
|
|
2220
|
+
* ))}
|
|
2221
|
+
* </ChipGroup>
|
|
2222
|
+
* ```
|
|
2223
|
+
*
|
|
2224
|
+
* @example Selectable group (single)
|
|
2225
|
+
* ```tsx
|
|
2226
|
+
* <ChipGroup
|
|
2227
|
+
* selectionMode="single"
|
|
2228
|
+
* selectedKeys={[selectedCategory]}
|
|
2229
|
+
* onSelectionChange={(keys) => setSelectedCategory(keys[0])}
|
|
2230
|
+
* >
|
|
2231
|
+
* <Chip chipKey="all">All</Chip>
|
|
2232
|
+
* <Chip chipKey="active">Active</Chip>
|
|
2233
|
+
* <Chip chipKey="archived">Archived</Chip>
|
|
2234
|
+
* </ChipGroup>
|
|
2235
|
+
* ```
|
|
2236
|
+
*
|
|
2237
|
+
* @example Multi-select group
|
|
2238
|
+
* ```tsx
|
|
2239
|
+
* <ChipGroup
|
|
2240
|
+
* selectionMode="multiple"
|
|
2241
|
+
* selectedKeys={selectedTags}
|
|
2242
|
+
* onSelectionChange={setSelectedTags}
|
|
2243
|
+
* wrap
|
|
2244
|
+
* >
|
|
2245
|
+
* {availableTags.map(tag => (
|
|
2246
|
+
* <Chip key={tag} chipKey={tag}>{tag}</Chip>
|
|
2247
|
+
* ))}
|
|
2248
|
+
* </ChipGroup>
|
|
2249
|
+
* ```
|
|
2250
|
+
*/
|
|
2251
|
+
declare function ChipGroup({ children, direction, wrap, gap, selectionMode, selectedKeys, onSelectionChange, className, }: ChipGroupProps): react_jsx_runtime.JSX.Element;
|
|
2252
|
+
|
|
2253
|
+
interface CheckboxListItem<T = unknown> {
|
|
2254
|
+
key: string;
|
|
2255
|
+
label: string;
|
|
2256
|
+
description?: string;
|
|
2257
|
+
group?: string;
|
|
2258
|
+
disabled?: boolean;
|
|
2259
|
+
data?: T;
|
|
2260
|
+
}
|
|
2261
|
+
interface CheckboxListProps<T = unknown> {
|
|
2262
|
+
/** Array of items to display */
|
|
2263
|
+
items: CheckboxListItem<T>[];
|
|
2264
|
+
/** Currently selected item keys */
|
|
2265
|
+
selectedKeys: string[];
|
|
2266
|
+
/** Callback when selection changes */
|
|
2267
|
+
onSelectionChange: (selectedKeys: string[]) => void;
|
|
2268
|
+
/** Labels for groups (key -> display label) */
|
|
2269
|
+
groupLabels?: Record<string, string>;
|
|
2270
|
+
/** Keys of groups that should be expanded (controlled) */
|
|
2271
|
+
expandedGroups?: string[];
|
|
2272
|
+
/** Default expanded groups (uncontrolled) */
|
|
2273
|
+
defaultExpandedGroups?: string[];
|
|
2274
|
+
/** Callback when group expansion changes */
|
|
2275
|
+
onGroupToggle?: (groupKey: string, expanded: boolean) => void;
|
|
2276
|
+
/** Enable search functionality */
|
|
2277
|
+
searchable?: boolean;
|
|
2278
|
+
/** Search input placeholder */
|
|
2279
|
+
searchPlaceholder?: string;
|
|
2280
|
+
/** Custom filter function */
|
|
2281
|
+
filterFn?: (item: CheckboxListItem<T>, searchTerm: string) => boolean;
|
|
2282
|
+
/** Debounce delay for search in ms */
|
|
2283
|
+
debounceMs?: number;
|
|
2284
|
+
/** Maximum height with overflow scroll */
|
|
2285
|
+
maxHeight?: string | number;
|
|
2286
|
+
/** Show select all checkbox */
|
|
2287
|
+
showSelectAll?: boolean;
|
|
2288
|
+
/** Select all label text */
|
|
2289
|
+
selectAllLabel?: string;
|
|
2290
|
+
/** Show count of selected items */
|
|
2291
|
+
showSelectedCount?: boolean;
|
|
2292
|
+
/** Message when no items available */
|
|
2293
|
+
emptyMessage?: string;
|
|
2294
|
+
/** Message when search has no results */
|
|
2295
|
+
noResultsMessage?: string;
|
|
2296
|
+
/** Size variant */
|
|
2297
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2298
|
+
/** Visual variant */
|
|
2299
|
+
variant?: 'default' | 'bordered' | 'card';
|
|
2300
|
+
/** Additional CSS classes */
|
|
2301
|
+
className?: string;
|
|
2302
|
+
}
|
|
2303
|
+
/**
|
|
2304
|
+
* CheckboxList - Multi-select list with checkboxes, grouping, and search
|
|
2305
|
+
*
|
|
2306
|
+
* @example Basic usage
|
|
2307
|
+
* ```tsx
|
|
2308
|
+
* <CheckboxList
|
|
2309
|
+
* items={[
|
|
2310
|
+
* { key: '1', label: 'Option 1' },
|
|
2311
|
+
* { key: '2', label: 'Option 2' },
|
|
2312
|
+
* ]}
|
|
2313
|
+
* selectedKeys={selected}
|
|
2314
|
+
* onSelectionChange={setSelected}
|
|
2315
|
+
* />
|
|
2316
|
+
* ```
|
|
2317
|
+
*
|
|
2318
|
+
* @example With grouping and search
|
|
2319
|
+
* ```tsx
|
|
2320
|
+
* <CheckboxList
|
|
2321
|
+
* items={fields}
|
|
2322
|
+
* selectedKeys={selectedFields}
|
|
2323
|
+
* onSelectionChange={setSelectedFields}
|
|
2324
|
+
* groupLabels={{ table1: 'Users', table2: 'Orders' }}
|
|
2325
|
+
* searchable
|
|
2326
|
+
* searchPlaceholder="Search fields..."
|
|
2327
|
+
* showSelectAll
|
|
2328
|
+
* maxHeight="300px"
|
|
2329
|
+
* />
|
|
2330
|
+
* ```
|
|
2331
|
+
*/
|
|
2332
|
+
declare function CheckboxList<T = unknown>({ items, selectedKeys, onSelectionChange, groupLabels, expandedGroups: controlledExpandedGroups, defaultExpandedGroups, onGroupToggle, searchable, searchPlaceholder, filterFn, debounceMs, maxHeight, showSelectAll, selectAllLabel, showSelectedCount, emptyMessage, noResultsMessage, size, variant, className, }: CheckboxListProps<T>): react_jsx_runtime.JSX.Element;
|
|
2333
|
+
|
|
2334
|
+
interface SearchableListItem<T = unknown> {
|
|
2335
|
+
key: string;
|
|
2336
|
+
data: T;
|
|
2337
|
+
}
|
|
2338
|
+
interface SearchableListProps<T = unknown> {
|
|
2339
|
+
/** Array of items to display */
|
|
2340
|
+
items: SearchableListItem<T>[];
|
|
2341
|
+
/** Search input placeholder */
|
|
2342
|
+
searchPlaceholder?: string;
|
|
2343
|
+
/** Controlled search value */
|
|
2344
|
+
searchValue?: string;
|
|
2345
|
+
/** Callback when search changes */
|
|
2346
|
+
onSearchChange?: (value: string) => void;
|
|
2347
|
+
/** Custom filter function */
|
|
2348
|
+
filterFn?: (item: SearchableListItem<T>, searchTerm: string) => boolean;
|
|
2349
|
+
/** Debounce delay for search in ms */
|
|
2350
|
+
debounceMs?: number;
|
|
2351
|
+
/** Render function for each item */
|
|
2352
|
+
renderItem: (item: SearchableListItem<T>, index: number, isSelected: boolean, isHighlighted: boolean) => ReactNode;
|
|
2353
|
+
/** Currently selected item key */
|
|
2354
|
+
selectedKey?: string;
|
|
2355
|
+
/** Callback when item is selected */
|
|
2356
|
+
onSelect?: (item: SearchableListItem<T>) => void;
|
|
2357
|
+
/** Maximum height with overflow scroll */
|
|
2358
|
+
maxHeight?: string | number;
|
|
2359
|
+
/** Show result count */
|
|
2360
|
+
showResultCount?: boolean;
|
|
2361
|
+
/** Result count format function */
|
|
2362
|
+
formatResultCount?: (count: number, total: number) => string;
|
|
2363
|
+
/** Message when no items available */
|
|
2364
|
+
emptyMessage?: string | ReactNode;
|
|
2365
|
+
/** Message when search has no results */
|
|
2366
|
+
noResultsMessage?: string | ReactNode;
|
|
2367
|
+
/** Loading state */
|
|
2368
|
+
loading?: boolean;
|
|
2369
|
+
/** Loading message */
|
|
2370
|
+
loadingMessage?: string | ReactNode;
|
|
2371
|
+
/** Size variant */
|
|
2372
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2373
|
+
/** Visual variant */
|
|
2374
|
+
variant?: 'default' | 'bordered' | 'card';
|
|
2375
|
+
/** Additional CSS classes */
|
|
2376
|
+
className?: string;
|
|
2377
|
+
/** Enable keyboard navigation (arrow keys, enter) */
|
|
2378
|
+
enableKeyboardNavigation?: boolean;
|
|
2379
|
+
/** Auto-focus search input */
|
|
2380
|
+
autoFocus?: boolean;
|
|
1969
2381
|
}
|
|
1970
|
-
|
|
2382
|
+
/**
|
|
2383
|
+
* SearchableList - List component with integrated search/filter functionality
|
|
2384
|
+
*
|
|
2385
|
+
* @example Basic usage
|
|
2386
|
+
* ```tsx
|
|
2387
|
+
* <SearchableList
|
|
2388
|
+
* items={users.map(u => ({ key: u.id, data: u }))}
|
|
2389
|
+
* renderItem={(item) => <div>{item.data.name}</div>}
|
|
2390
|
+
* onSelect={(item) => setSelectedUser(item.data)}
|
|
2391
|
+
* searchable
|
|
2392
|
+
* searchPlaceholder="Search users..."
|
|
2393
|
+
* />
|
|
2394
|
+
* ```
|
|
2395
|
+
*
|
|
2396
|
+
* @example With custom filter and loading
|
|
2397
|
+
* ```tsx
|
|
2398
|
+
* <SearchableList
|
|
2399
|
+
* items={products}
|
|
2400
|
+
* renderItem={(item, index, isSelected) => (
|
|
2401
|
+
* <div className={isSelected ? 'bg-accent-50' : ''}>
|
|
2402
|
+
* {item.data.name} - ${item.data.price}
|
|
2403
|
+
* </div>
|
|
2404
|
+
* )}
|
|
2405
|
+
* filterFn={(item, term) =>
|
|
2406
|
+
* item.data.name.toLowerCase().includes(term.toLowerCase())
|
|
2407
|
+
* }
|
|
2408
|
+
* loading={isLoading}
|
|
2409
|
+
* loadingMessage="Fetching products..."
|
|
2410
|
+
* maxHeight="400px"
|
|
2411
|
+
* />
|
|
2412
|
+
* ```
|
|
2413
|
+
*/
|
|
2414
|
+
declare function SearchableList<T = unknown>({ items, searchPlaceholder, searchValue: controlledSearchValue, onSearchChange, filterFn, debounceMs, renderItem, selectedKey, onSelect, maxHeight, showResultCount, formatResultCount, emptyMessage, noResultsMessage, loading, loadingMessage, size, variant, className, enableKeyboardNavigation, autoFocus, }: SearchableListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1971
2415
|
|
|
1972
2416
|
interface NumberInputProps {
|
|
1973
2417
|
value?: number;
|
|
@@ -2082,12 +2526,153 @@ interface CollapsibleProps {
|
|
|
2082
2526
|
}
|
|
2083
2527
|
declare function Collapsible({ trigger, children, defaultOpen, open: controlledOpen, onOpenChange, disabled, showIcon, className, triggerClassName, contentClassName, }: CollapsibleProps): react_jsx_runtime.JSX.Element;
|
|
2084
2528
|
|
|
2085
|
-
|
|
2529
|
+
interface ExpandablePanelProps {
|
|
2530
|
+
/** Content shown in the collapsed header bar */
|
|
2531
|
+
collapsedContent: ReactNode;
|
|
2532
|
+
/** Full content shown when expanded */
|
|
2533
|
+
children: ReactNode;
|
|
2534
|
+
/** Position of the panel */
|
|
2535
|
+
position?: 'bottom' | 'top';
|
|
2536
|
+
/**
|
|
2537
|
+
* Positioning mode:
|
|
2538
|
+
* - 'viewport': Fixed to viewport edges (default, for standalone use)
|
|
2539
|
+
* - 'container': Sticky within parent container (for use inside Page/AppLayout)
|
|
2540
|
+
*/
|
|
2541
|
+
mode?: 'viewport' | 'container';
|
|
2542
|
+
/** Whether the panel is expanded (controlled) */
|
|
2543
|
+
expanded?: boolean;
|
|
2544
|
+
/** Default expanded state (uncontrolled) */
|
|
2545
|
+
defaultExpanded?: boolean;
|
|
2546
|
+
/** Callback when expanded state changes */
|
|
2547
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
2548
|
+
/** Height when expanded */
|
|
2549
|
+
expandedHeight?: string | number;
|
|
2550
|
+
/**
|
|
2551
|
+
* Maximum width of the panel (e.g., '1400px', '80%', 1200)
|
|
2552
|
+
* When set, the panel will be centered horizontally within its container/viewport
|
|
2553
|
+
*/
|
|
2554
|
+
maxWidth?: string | number;
|
|
2555
|
+
/** Whether to show the expand/collapse toggle button */
|
|
2556
|
+
showToggle?: boolean;
|
|
2557
|
+
/** Custom toggle button content */
|
|
2558
|
+
toggleContent?: ReactNode;
|
|
2559
|
+
/** Additional actions to show in the header (right side) */
|
|
2560
|
+
headerActions?: ReactNode;
|
|
2561
|
+
/** Close on Escape key */
|
|
2562
|
+
closeOnEscape?: boolean;
|
|
2563
|
+
/** Visual variant */
|
|
2564
|
+
variant?: 'default' | 'elevated' | 'bordered';
|
|
2565
|
+
/** Size variant affecting header height */
|
|
2566
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2567
|
+
/** Additional CSS classes for the container */
|
|
2568
|
+
className?: string;
|
|
2569
|
+
/** Additional CSS classes for the header */
|
|
2570
|
+
headerClassName?: string;
|
|
2571
|
+
/** Additional CSS classes for the content */
|
|
2572
|
+
contentClassName?: string;
|
|
2573
|
+
/** Z-index for the panel (only applies in viewport mode) */
|
|
2574
|
+
zIndex?: number;
|
|
2575
|
+
}
|
|
2576
|
+
/**
|
|
2577
|
+
* ExpandablePanel - A panel that sticks to the bottom (or top) and can expand/collapse
|
|
2578
|
+
*
|
|
2579
|
+
* For bottom position: expands UPWARD (content appears above header)
|
|
2580
|
+
* For top position: expands DOWNWARD (content appears below header)
|
|
2581
|
+
*
|
|
2582
|
+
* Two modes of operation:
|
|
2583
|
+
* - `viewport`: Fixed to the viewport (for standalone pages, covers StatusBar)
|
|
2584
|
+
* - `container`: Sticky within its parent container (for use inside Page/AppLayout, respects StatusBar)
|
|
2585
|
+
*
|
|
2586
|
+
* @example Basic usage (viewport mode - full page)
|
|
2587
|
+
* ```tsx
|
|
2588
|
+
* <ExpandablePanel
|
|
2589
|
+
* mode="viewport"
|
|
2590
|
+
* collapsedContent={<Text>3 items selected</Text>}
|
|
2591
|
+
* expandedHeight="300px"
|
|
2592
|
+
* >
|
|
2593
|
+
* {content}
|
|
2594
|
+
* </ExpandablePanel>
|
|
2595
|
+
* ```
|
|
2596
|
+
*
|
|
2597
|
+
* @example Inside Page/AppLayout (container mode - respects StatusBar)
|
|
2598
|
+
* ```tsx
|
|
2599
|
+
* <Page>
|
|
2600
|
+
* <ExpandablePanelContainer>
|
|
2601
|
+
* <div className="flex-1 overflow-auto">
|
|
2602
|
+
* {pageContent}
|
|
2603
|
+
* </div>
|
|
2604
|
+
* <ExpandablePanel
|
|
2605
|
+
* mode="container"
|
|
2606
|
+
* collapsedContent={<Text>3 items selected</Text>}
|
|
2607
|
+
* expandedHeight="300px"
|
|
2608
|
+
* >
|
|
2609
|
+
* {selectedItemsContent}
|
|
2610
|
+
* </ExpandablePanel>
|
|
2611
|
+
* </ExpandablePanelContainer>
|
|
2612
|
+
* </Page>
|
|
2613
|
+
* ```
|
|
2614
|
+
*
|
|
2615
|
+
* @example With maxWidth to match page content
|
|
2616
|
+
* ```tsx
|
|
2617
|
+
* <ExpandablePanel
|
|
2618
|
+
* mode="container"
|
|
2619
|
+
* maxWidth="1400px"
|
|
2620
|
+
* collapsedContent={<Text>Generated SQL</Text>}
|
|
2621
|
+
* expandedHeight="300px"
|
|
2622
|
+
* >
|
|
2623
|
+
* {sqlContent}
|
|
2624
|
+
* </ExpandablePanel>
|
|
2625
|
+
* ```
|
|
2626
|
+
*/
|
|
2627
|
+
declare function ExpandablePanel({ collapsedContent, children, position, mode, expanded: controlledExpanded, defaultExpanded, onExpandedChange, expandedHeight, maxWidth, showToggle, toggleContent, headerActions, closeOnEscape, variant, size, className, headerClassName, contentClassName, zIndex, }: ExpandablePanelProps): react_jsx_runtime.JSX.Element;
|
|
2628
|
+
/**
|
|
2629
|
+
* ExpandablePanelSpacer - Adds spacing to prevent content from being hidden behind the panel
|
|
2630
|
+
* Only needed in viewport mode. In container mode, the panel is part of the flex layout.
|
|
2631
|
+
*
|
|
2632
|
+
* @example
|
|
2633
|
+
* ```tsx
|
|
2634
|
+
* <div>
|
|
2635
|
+
* <MainContent />
|
|
2636
|
+
* <ExpandablePanelSpacer size="md" />
|
|
2637
|
+
* </div>
|
|
2638
|
+
* <ExpandablePanel mode="viewport" position="bottom" size="md" {...props} />
|
|
2639
|
+
* ```
|
|
2640
|
+
*/
|
|
2641
|
+
declare function ExpandablePanelSpacer({ size }: {
|
|
2642
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2643
|
+
}): react_jsx_runtime.JSX.Element;
|
|
2644
|
+
/**
|
|
2645
|
+
* ExpandablePanelContainer - Wrapper that sets up proper layout for container mode
|
|
2646
|
+
* Use this to wrap your page content when using ExpandablePanel with mode="container"
|
|
2647
|
+
*
|
|
2648
|
+
* This creates a relative container with full height so the panel can position absolutely
|
|
2649
|
+
* at the bottom while the content scrolls above it.
|
|
2650
|
+
*
|
|
2651
|
+
* @example
|
|
2652
|
+
* ```tsx
|
|
2653
|
+
* <Page>
|
|
2654
|
+
* <ExpandablePanelContainer>
|
|
2655
|
+
* <div className="flex-1 overflow-auto p-4">
|
|
2656
|
+
* {pageContent}
|
|
2657
|
+
* </div>
|
|
2658
|
+
* <ExpandablePanel mode="container" {...props}>
|
|
2659
|
+
* {panelContent}
|
|
2660
|
+
* </ExpandablePanel>
|
|
2661
|
+
* </ExpandablePanelContainer>
|
|
2662
|
+
* </Page>
|
|
2663
|
+
* ```
|
|
2664
|
+
*/
|
|
2665
|
+
declare function ExpandablePanelContainer({ children, className, }: {
|
|
2666
|
+
children: ReactNode;
|
|
2667
|
+
className?: string;
|
|
2668
|
+
}): react_jsx_runtime.JSX.Element;
|
|
2669
|
+
|
|
2670
|
+
type Breakpoint$1 = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
2086
2671
|
interface ResponsiveProps {
|
|
2087
2672
|
children: ReactNode;
|
|
2088
|
-
above?: Breakpoint;
|
|
2089
|
-
below?: Breakpoint;
|
|
2090
|
-
only?: Breakpoint;
|
|
2673
|
+
above?: Breakpoint$1;
|
|
2674
|
+
below?: Breakpoint$1;
|
|
2675
|
+
only?: Breakpoint$1;
|
|
2091
2676
|
className?: string;
|
|
2092
2677
|
}
|
|
2093
2678
|
/**
|
|
@@ -2130,14 +2715,6 @@ declare function Show({ children, above, below, only, className }: ResponsivePro
|
|
|
2130
2715
|
* </Hide>
|
|
2131
2716
|
*/
|
|
2132
2717
|
declare function Hide({ children, above, below, only, className }: ResponsiveProps): react_jsx_runtime.JSX.Element;
|
|
2133
|
-
/**
|
|
2134
|
-
* useMediaQuery hook - React hook for responsive logic in components
|
|
2135
|
-
*
|
|
2136
|
-
* @example
|
|
2137
|
-
* const isMobile = useMediaQuery('(max-width: 768px)');
|
|
2138
|
-
* const isDesktop = useMediaQuery('(min-width: 1024px)');
|
|
2139
|
-
*/
|
|
2140
|
-
declare function useMediaQuery(query: string): boolean;
|
|
2141
2718
|
|
|
2142
2719
|
interface BreadcrumbItem {
|
|
2143
2720
|
label: string;
|
|
@@ -2380,14 +2957,14 @@ interface FileUploadProps {
|
|
|
2380
2957
|
declare function FileUpload({ accept, multiple, maxSize, // 10MB default
|
|
2381
2958
|
maxFiles, onFilesSelected, onUpload, disabled, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
2382
2959
|
|
|
2383
|
-
interface Section$
|
|
2960
|
+
interface Section$2 {
|
|
2384
2961
|
id: string;
|
|
2385
2962
|
label: string;
|
|
2386
2963
|
}
|
|
2387
2964
|
interface PageNavigationProps {
|
|
2388
2965
|
className?: string;
|
|
2389
2966
|
/** External sections to display (overrides auto-detection) */
|
|
2390
|
-
sections?: Section$
|
|
2967
|
+
sections?: Section$2[];
|
|
2391
2968
|
}
|
|
2392
2969
|
declare const PageNavigation: React__default.FC<PageNavigationProps>;
|
|
2393
2970
|
|
|
@@ -2410,6 +2987,12 @@ interface SidebarProps {
|
|
|
2410
2987
|
header?: React__default.ReactNode;
|
|
2411
2988
|
footer?: React__default.ReactNode;
|
|
2412
2989
|
currentPath?: string;
|
|
2990
|
+
/** Whether sidebar is open on mobile (drawer mode) */
|
|
2991
|
+
mobileOpen?: boolean;
|
|
2992
|
+
/** Callback when mobile drawer should close */
|
|
2993
|
+
onMobileClose?: () => void;
|
|
2994
|
+
/** Width of the sidebar (default: 256px / w-64) */
|
|
2995
|
+
width?: string;
|
|
2413
2996
|
}
|
|
2414
2997
|
interface SidebarGroupProps {
|
|
2415
2998
|
title?: string;
|
|
@@ -2419,34 +3002,444 @@ interface SidebarGroupProps {
|
|
|
2419
3002
|
currentPath?: string;
|
|
2420
3003
|
}
|
|
2421
3004
|
declare function SidebarGroup({ title, items, onNavigate, defaultExpanded, currentPath }: SidebarGroupProps): react_jsx_runtime.JSX.Element;
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
3005
|
+
/**
|
|
3006
|
+
* Sidebar - Navigation sidebar with mobile drawer support
|
|
3007
|
+
*
|
|
3008
|
+
* On desktop: Renders as a fixed-width sidebar
|
|
3009
|
+
* On mobile: Renders as a drawer overlay when mobileOpen is true
|
|
3010
|
+
*
|
|
3011
|
+
* @example Desktop usage (no mobile props)
|
|
3012
|
+
* ```tsx
|
|
3013
|
+
* <Sidebar
|
|
3014
|
+
* items={navItems}
|
|
3015
|
+
* header={<Logo />}
|
|
3016
|
+
* footer={<UserProfile />}
|
|
3017
|
+
* currentPath={location.pathname}
|
|
3018
|
+
* onNavigate={(href) => navigate(href)}
|
|
3019
|
+
* />
|
|
3020
|
+
* ```
|
|
3021
|
+
*
|
|
3022
|
+
* @example With mobile drawer support
|
|
3023
|
+
* ```tsx
|
|
3024
|
+
* const [mobileOpen, setMobileOpen] = useState(false);
|
|
3025
|
+
*
|
|
3026
|
+
* <Sidebar
|
|
3027
|
+
* items={navItems}
|
|
3028
|
+
* header={<Logo />}
|
|
3029
|
+
* mobileOpen={mobileOpen}
|
|
3030
|
+
* onMobileClose={() => setMobileOpen(false)}
|
|
3031
|
+
* onNavigate={(href) => {
|
|
3032
|
+
* navigate(href);
|
|
3033
|
+
* setMobileOpen(false); // Close drawer on navigation
|
|
3034
|
+
* }}
|
|
3035
|
+
* />
|
|
3036
|
+
* ```
|
|
3037
|
+
*/
|
|
3038
|
+
declare function Sidebar({ items, onNavigate, className, header, footer, currentPath, mobileOpen, onMobileClose, width, }: SidebarProps): react_jsx_runtime.JSX.Element | null;
|
|
2445
3039
|
|
|
2446
|
-
|
|
2447
|
-
|
|
3040
|
+
/**
|
|
3041
|
+
* Bottom navigation item configuration
|
|
3042
|
+
*/
|
|
3043
|
+
interface BottomNavItem {
|
|
3044
|
+
/** Unique identifier for the nav item */
|
|
2448
3045
|
id: string;
|
|
2449
|
-
/** Display label
|
|
3046
|
+
/** Display label */
|
|
3047
|
+
label: string;
|
|
3048
|
+
/** Icon element (use lucide-react icons) */
|
|
3049
|
+
icon: React__default.ReactNode;
|
|
3050
|
+
/** Navigation URL (optional) */
|
|
3051
|
+
href?: string;
|
|
3052
|
+
/** Badge count for notifications */
|
|
3053
|
+
badge?: number;
|
|
3054
|
+
/** Click handler (alternative to href) */
|
|
3055
|
+
onClick?: () => void;
|
|
3056
|
+
/** Disabled state */
|
|
3057
|
+
disabled?: boolean;
|
|
3058
|
+
}
|
|
3059
|
+
/**
|
|
3060
|
+
* BottomNavigation component props
|
|
3061
|
+
*/
|
|
3062
|
+
interface BottomNavigationProps {
|
|
3063
|
+
/** Navigation items (max 5 recommended) */
|
|
3064
|
+
items: BottomNavItem[];
|
|
3065
|
+
/** Currently active item ID */
|
|
3066
|
+
activeId?: string;
|
|
3067
|
+
/** Navigation handler - receives item ID and href */
|
|
3068
|
+
onNavigate?: (id: string, href?: string) => void;
|
|
3069
|
+
/** Show labels below icons */
|
|
3070
|
+
showLabels?: boolean;
|
|
3071
|
+
/** Additional CSS classes */
|
|
3072
|
+
className?: string;
|
|
3073
|
+
/** Safe area handling for notched devices */
|
|
3074
|
+
safeArea?: boolean;
|
|
3075
|
+
}
|
|
3076
|
+
/**
|
|
3077
|
+
* BottomNavigation - Mobile-style bottom tab bar
|
|
3078
|
+
*
|
|
3079
|
+
* iOS/Android-style fixed bottom navigation with icons, labels, and badges.
|
|
3080
|
+
* Handles safe area insets for notched devices automatically.
|
|
3081
|
+
*
|
|
3082
|
+
* Best practices:
|
|
3083
|
+
* - Use 3-5 items maximum
|
|
3084
|
+
* - Keep labels short (1-2 words)
|
|
3085
|
+
* - Use consistent icon style
|
|
3086
|
+
*
|
|
3087
|
+
* @example Basic usage
|
|
3088
|
+
* ```tsx
|
|
3089
|
+
* import { BottomNavigation } from 'notebook-ui';
|
|
3090
|
+
* import { Home, Search, Bell, User } from 'lucide-react';
|
|
3091
|
+
*
|
|
3092
|
+
* const navItems = [
|
|
3093
|
+
* { id: 'home', label: 'Home', icon: <Home />, href: '/' },
|
|
3094
|
+
* { id: 'search', label: 'Search', icon: <Search />, href: '/search' },
|
|
3095
|
+
* { id: 'notifications', label: 'Alerts', icon: <Bell />, badge: 3 },
|
|
3096
|
+
* { id: 'profile', label: 'Profile', icon: <User />, href: '/profile' },
|
|
3097
|
+
* ];
|
|
3098
|
+
*
|
|
3099
|
+
* <BottomNavigation
|
|
3100
|
+
* items={navItems}
|
|
3101
|
+
* activeId="home"
|
|
3102
|
+
* onNavigate={(id, href) => navigate(href)}
|
|
3103
|
+
* />
|
|
3104
|
+
* ```
|
|
3105
|
+
*
|
|
3106
|
+
* @example With onClick handlers
|
|
3107
|
+
* ```tsx
|
|
3108
|
+
* const navItems = [
|
|
3109
|
+
* { id: 'home', label: 'Home', icon: <Home />, onClick: () => setTab('home') },
|
|
3110
|
+
* { id: 'add', label: 'Add', icon: <Plus />, onClick: openAddModal },
|
|
3111
|
+
* ];
|
|
3112
|
+
*
|
|
3113
|
+
* <BottomNavigation items={navItems} activeId={currentTab} />
|
|
3114
|
+
* ```
|
|
3115
|
+
*/
|
|
3116
|
+
declare function BottomNavigation({ items, activeId, onNavigate, showLabels, className, safeArea, }: BottomNavigationProps): react_jsx_runtime.JSX.Element;
|
|
3117
|
+
/**
|
|
3118
|
+
* BottomNavigationSpacer - Spacer to prevent content from being hidden behind BottomNavigation
|
|
3119
|
+
*
|
|
3120
|
+
* Place this at the bottom of your scrollable content when using BottomNavigation.
|
|
3121
|
+
*
|
|
3122
|
+
* @example
|
|
3123
|
+
* ```tsx
|
|
3124
|
+
* <div className="flex flex-col h-screen">
|
|
3125
|
+
* <main className="flex-1 overflow-auto">
|
|
3126
|
+
* {/* Your content *\/}
|
|
3127
|
+
* <BottomNavigationSpacer />
|
|
3128
|
+
* </main>
|
|
3129
|
+
* <BottomNavigation items={navItems} />
|
|
3130
|
+
* </div>
|
|
3131
|
+
* ```
|
|
3132
|
+
*/
|
|
3133
|
+
declare function BottomNavigationSpacer({ safeArea }: {
|
|
3134
|
+
safeArea?: boolean;
|
|
3135
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3136
|
+
|
|
3137
|
+
/**
|
|
3138
|
+
* MobileHeader component props
|
|
3139
|
+
*/
|
|
3140
|
+
interface MobileHeaderProps {
|
|
3141
|
+
/** Page/section title */
|
|
3142
|
+
title: string;
|
|
3143
|
+
/** Subtitle or breadcrumb text */
|
|
3144
|
+
subtitle?: string;
|
|
3145
|
+
/** Handler for menu button click (hamburger) */
|
|
3146
|
+
onMenuClick?: () => void;
|
|
3147
|
+
/** Handler for back button click - shows back arrow instead of menu */
|
|
3148
|
+
onBackClick?: () => void;
|
|
3149
|
+
/** Handler for close button click - shows X instead of menu */
|
|
3150
|
+
onCloseClick?: () => void;
|
|
3151
|
+
/** Right side action element (button, icon, etc.) */
|
|
3152
|
+
rightAction?: React__default.ReactNode;
|
|
3153
|
+
/** Left side action element (overrides menu/back/close buttons) */
|
|
3154
|
+
leftAction?: React__default.ReactNode;
|
|
3155
|
+
/** Make header sticky at top */
|
|
3156
|
+
sticky?: boolean;
|
|
3157
|
+
/** Show border at bottom */
|
|
3158
|
+
bordered?: boolean;
|
|
3159
|
+
/** Background style */
|
|
3160
|
+
variant?: 'solid' | 'transparent' | 'blur';
|
|
3161
|
+
/** Additional CSS classes */
|
|
3162
|
+
className?: string;
|
|
3163
|
+
/** Safe area handling for notched devices */
|
|
3164
|
+
safeArea?: boolean;
|
|
3165
|
+
}
|
|
3166
|
+
/**
|
|
3167
|
+
* MobileHeader - Mobile app header with navigation controls
|
|
3168
|
+
*
|
|
3169
|
+
* A flexible mobile header component with support for:
|
|
3170
|
+
* - Hamburger menu button (default)
|
|
3171
|
+
* - Back navigation arrow
|
|
3172
|
+
* - Close button (X)
|
|
3173
|
+
* - Custom left/right actions
|
|
3174
|
+
* - Sticky positioning
|
|
3175
|
+
* - Blur/transparent variants
|
|
3176
|
+
*
|
|
3177
|
+
* @example Basic with menu button
|
|
3178
|
+
* ```tsx
|
|
3179
|
+
* <MobileHeader
|
|
3180
|
+
* title="Dashboard"
|
|
3181
|
+
* onMenuClick={() => setDrawerOpen(true)}
|
|
3182
|
+
* />
|
|
3183
|
+
* ```
|
|
3184
|
+
*
|
|
3185
|
+
* @example With back button
|
|
3186
|
+
* ```tsx
|
|
3187
|
+
* <MobileHeader
|
|
3188
|
+
* title="User Details"
|
|
3189
|
+
* subtitle="Profile"
|
|
3190
|
+
* onBackClick={() => navigate(-1)}
|
|
3191
|
+
* />
|
|
3192
|
+
* ```
|
|
3193
|
+
*
|
|
3194
|
+
* @example With right action
|
|
3195
|
+
* ```tsx
|
|
3196
|
+
* <MobileHeader
|
|
3197
|
+
* title="Settings"
|
|
3198
|
+
* onMenuClick={openMenu}
|
|
3199
|
+
* rightAction={
|
|
3200
|
+
* <Button variant="ghost" iconOnly onClick={save}>
|
|
3201
|
+
* <Check className="w-5 h-5" />
|
|
3202
|
+
* </Button>
|
|
3203
|
+
* }
|
|
3204
|
+
* />
|
|
3205
|
+
* ```
|
|
3206
|
+
*
|
|
3207
|
+
* @example Transparent with blur
|
|
3208
|
+
* ```tsx
|
|
3209
|
+
* <MobileHeader
|
|
3210
|
+
* title="Photo Gallery"
|
|
3211
|
+
* variant="blur"
|
|
3212
|
+
* onBackClick={goBack}
|
|
3213
|
+
* />
|
|
3214
|
+
* ```
|
|
3215
|
+
*/
|
|
3216
|
+
declare function MobileHeader({ title, subtitle, onMenuClick, onBackClick, onCloseClick, rightAction, leftAction, sticky, bordered, variant, className, safeArea, }: MobileHeaderProps): react_jsx_runtime.JSX.Element;
|
|
3217
|
+
/**
|
|
3218
|
+
* MobileHeaderSpacer - Spacer to prevent content from being hidden behind sticky MobileHeader
|
|
3219
|
+
*
|
|
3220
|
+
* Place this at the top of your content when NOT using sticky header
|
|
3221
|
+
* to maintain consistent spacing.
|
|
3222
|
+
*
|
|
3223
|
+
* @example
|
|
3224
|
+
* ```tsx
|
|
3225
|
+
* <MobileHeader title="Page" sticky={false} />
|
|
3226
|
+
* <MobileHeaderSpacer />
|
|
3227
|
+
* <main>Content here</main>
|
|
3228
|
+
* ```
|
|
3229
|
+
*/
|
|
3230
|
+
declare function MobileHeaderSpacer({ safeArea }: {
|
|
3231
|
+
safeArea?: boolean;
|
|
3232
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3233
|
+
|
|
3234
|
+
/**
|
|
3235
|
+
* Action item for FAB menu
|
|
3236
|
+
*/
|
|
3237
|
+
interface FABAction {
|
|
3238
|
+
/** Unique identifier */
|
|
3239
|
+
id: string;
|
|
3240
|
+
/** Icon for the action */
|
|
3241
|
+
icon: React__default.ReactNode;
|
|
3242
|
+
/** Label text (shown on hover/long-press) */
|
|
3243
|
+
label: string;
|
|
3244
|
+
/** Click handler */
|
|
3245
|
+
onClick: () => void;
|
|
3246
|
+
/** Disabled state */
|
|
3247
|
+
disabled?: boolean;
|
|
3248
|
+
}
|
|
3249
|
+
/**
|
|
3250
|
+
* FloatingActionButton component props
|
|
3251
|
+
*/
|
|
3252
|
+
interface FloatingActionButtonProps {
|
|
3253
|
+
/** Primary action when FAB is clicked (without menu) */
|
|
3254
|
+
onClick?: () => void;
|
|
3255
|
+
/** Icon for the FAB - defaults to Plus */
|
|
3256
|
+
icon?: React__default.ReactNode;
|
|
3257
|
+
/** Secondary actions shown in menu */
|
|
3258
|
+
actions?: FABAction[];
|
|
3259
|
+
/** Position on screen */
|
|
3260
|
+
position?: 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
3261
|
+
/** Color variant */
|
|
3262
|
+
variant?: 'primary' | 'secondary' | 'accent';
|
|
3263
|
+
/** Size */
|
|
3264
|
+
size?: 'md' | 'lg';
|
|
3265
|
+
/** Accessible label */
|
|
3266
|
+
label?: string;
|
|
3267
|
+
/** Extended FAB with text label */
|
|
3268
|
+
extended?: boolean;
|
|
3269
|
+
/** Text for extended FAB */
|
|
3270
|
+
extendedLabel?: string;
|
|
3271
|
+
/** Hide FAB (useful for scroll-based show/hide) */
|
|
3272
|
+
hidden?: boolean;
|
|
3273
|
+
/** Custom offset from edge (in pixels) */
|
|
3274
|
+
offset?: {
|
|
3275
|
+
x?: number;
|
|
3276
|
+
y?: number;
|
|
3277
|
+
};
|
|
3278
|
+
/** Additional class names */
|
|
3279
|
+
className?: string;
|
|
3280
|
+
}
|
|
3281
|
+
/**
|
|
3282
|
+
* FloatingActionButton - Material Design style FAB for mobile
|
|
3283
|
+
*
|
|
3284
|
+
* A prominent button for the primary action on a screen.
|
|
3285
|
+
* Supports single action or expandable menu with multiple actions.
|
|
3286
|
+
*
|
|
3287
|
+
* @example Simple FAB
|
|
3288
|
+
* ```tsx
|
|
3289
|
+
* <FloatingActionButton
|
|
3290
|
+
* onClick={() => openCreateModal()}
|
|
3291
|
+
* label="Create new item"
|
|
3292
|
+
* />
|
|
3293
|
+
* ```
|
|
3294
|
+
*
|
|
3295
|
+
* @example FAB with action menu
|
|
3296
|
+
* ```tsx
|
|
3297
|
+
* <FloatingActionButton
|
|
3298
|
+
* actions={[
|
|
3299
|
+
* { id: 'photo', icon: <Camera />, label: 'Take Photo', onClick: takePhoto },
|
|
3300
|
+
* { id: 'upload', icon: <Upload />, label: 'Upload File', onClick: uploadFile },
|
|
3301
|
+
* { id: 'note', icon: <FileText />, label: 'Create Note', onClick: createNote },
|
|
3302
|
+
* ]}
|
|
3303
|
+
* />
|
|
3304
|
+
* ```
|
|
3305
|
+
*
|
|
3306
|
+
* @example Extended FAB
|
|
3307
|
+
* ```tsx
|
|
3308
|
+
* <FloatingActionButton
|
|
3309
|
+
* extended
|
|
3310
|
+
* extendedLabel="New Task"
|
|
3311
|
+
* icon={<Plus />}
|
|
3312
|
+
* onClick={createTask}
|
|
3313
|
+
* />
|
|
3314
|
+
* ```
|
|
3315
|
+
*/
|
|
3316
|
+
declare function FloatingActionButton({ onClick, icon, actions, position, variant, size, label, extended, extendedLabel, hidden, offset, className, }: FloatingActionButtonProps): React__default.ReactPortal;
|
|
3317
|
+
/**
|
|
3318
|
+
* Hook for scroll-based FAB visibility
|
|
3319
|
+
*
|
|
3320
|
+
* @example
|
|
3321
|
+
* ```tsx
|
|
3322
|
+
* const { hidden, scrollDirection } = useFABScroll();
|
|
3323
|
+
* <FloatingActionButton hidden={hidden} />
|
|
3324
|
+
* ```
|
|
3325
|
+
*/
|
|
3326
|
+
declare function useFABScroll(threshold?: number): {
|
|
3327
|
+
hidden: boolean;
|
|
3328
|
+
scrollDirection: 'up' | 'down' | null;
|
|
3329
|
+
};
|
|
3330
|
+
|
|
3331
|
+
/**
|
|
3332
|
+
* PullToRefresh component props
|
|
3333
|
+
*/
|
|
3334
|
+
interface PullToRefreshProps {
|
|
3335
|
+
/** Content to wrap */
|
|
3336
|
+
children: React__default.ReactNode;
|
|
3337
|
+
/** Async refresh handler - should return a Promise */
|
|
3338
|
+
onRefresh: () => Promise<void>;
|
|
3339
|
+
/** Disable pull-to-refresh */
|
|
3340
|
+
disabled?: boolean;
|
|
3341
|
+
/** Pull distance required to trigger refresh (default: 80) */
|
|
3342
|
+
pullThreshold?: number;
|
|
3343
|
+
/** Maximum pull distance (default: 120) */
|
|
3344
|
+
maxPull?: number;
|
|
3345
|
+
/** Custom loading indicator */
|
|
3346
|
+
loadingIndicator?: React__default.ReactNode;
|
|
3347
|
+
/** Custom pull indicator */
|
|
3348
|
+
pullIndicator?: React__default.ReactNode;
|
|
3349
|
+
/** Additional class names for container */
|
|
3350
|
+
className?: string;
|
|
3351
|
+
}
|
|
3352
|
+
/**
|
|
3353
|
+
* PullToRefresh - Mobile pull-to-refresh gesture handler
|
|
3354
|
+
*
|
|
3355
|
+
* Wraps content and provides native-feeling pull-to-refresh functionality.
|
|
3356
|
+
* Only activates when scrolled to top of content.
|
|
3357
|
+
*
|
|
3358
|
+
* @example Basic usage
|
|
3359
|
+
* ```tsx
|
|
3360
|
+
* <PullToRefresh onRefresh={async () => {
|
|
3361
|
+
* await fetchLatestData();
|
|
3362
|
+
* }}>
|
|
3363
|
+
* <div className="min-h-screen">
|
|
3364
|
+
* {content}
|
|
3365
|
+
* </div>
|
|
3366
|
+
* </PullToRefresh>
|
|
3367
|
+
* ```
|
|
3368
|
+
*
|
|
3369
|
+
* @example With custom threshold
|
|
3370
|
+
* ```tsx
|
|
3371
|
+
* <PullToRefresh
|
|
3372
|
+
* onRefresh={handleRefresh}
|
|
3373
|
+
* pullThreshold={100}
|
|
3374
|
+
* maxPull={150}
|
|
3375
|
+
* >
|
|
3376
|
+
* {content}
|
|
3377
|
+
* </PullToRefresh>
|
|
3378
|
+
* ```
|
|
3379
|
+
*/
|
|
3380
|
+
declare function PullToRefresh({ children, onRefresh, disabled, pullThreshold, maxPull, loadingIndicator, pullIndicator, className, }: PullToRefreshProps): react_jsx_runtime.JSX.Element;
|
|
3381
|
+
/**
|
|
3382
|
+
* usePullToRefresh - Hook for custom pull-to-refresh implementations
|
|
3383
|
+
*
|
|
3384
|
+
* @example
|
|
3385
|
+
* ```tsx
|
|
3386
|
+
* const { pullDistance, isRefreshing, bind } = usePullToRefresh({
|
|
3387
|
+
* onRefresh: async () => {
|
|
3388
|
+
* await fetchData();
|
|
3389
|
+
* }
|
|
3390
|
+
* });
|
|
3391
|
+
*
|
|
3392
|
+
* return (
|
|
3393
|
+
* <div {...bind}>
|
|
3394
|
+
* {isRefreshing && <Spinner />}
|
|
3395
|
+
* {content}
|
|
3396
|
+
* </div>
|
|
3397
|
+
* );
|
|
3398
|
+
* ```
|
|
3399
|
+
*/
|
|
3400
|
+
declare function usePullToRefresh({ onRefresh, pullThreshold, maxPull, disabled, }: {
|
|
3401
|
+
onRefresh: () => Promise<void>;
|
|
3402
|
+
pullThreshold?: number;
|
|
3403
|
+
maxPull?: number;
|
|
3404
|
+
disabled?: boolean;
|
|
3405
|
+
}): {
|
|
3406
|
+
pullDistance: number;
|
|
3407
|
+
isRefreshing: boolean;
|
|
3408
|
+
isReady: boolean;
|
|
3409
|
+
progress: number;
|
|
3410
|
+
bind: {
|
|
3411
|
+
onTouchStart: (e: React__default.TouchEvent) => void;
|
|
3412
|
+
onTouchMove: (e: React__default.TouchEvent) => void;
|
|
3413
|
+
onTouchEnd: () => Promise<void>;
|
|
3414
|
+
};
|
|
3415
|
+
};
|
|
3416
|
+
|
|
3417
|
+
interface LogoProps {
|
|
3418
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3419
|
+
showText?: boolean;
|
|
3420
|
+
text?: string;
|
|
3421
|
+
className?: string;
|
|
3422
|
+
}
|
|
3423
|
+
declare function Logo({ size, showText, text, className, }: LogoProps): react_jsx_runtime.JSX.Element;
|
|
3424
|
+
|
|
3425
|
+
interface UserProfileButtonProps {
|
|
3426
|
+
userName: string;
|
|
3427
|
+
userEmail?: string;
|
|
3428
|
+
userTitle?: string;
|
|
3429
|
+
initials: string;
|
|
3430
|
+
isOnline?: boolean;
|
|
3431
|
+
onProfileClick?: () => void;
|
|
3432
|
+
onSettingsClick?: () => void;
|
|
3433
|
+
onLogoutClick?: () => void;
|
|
3434
|
+
dropdownItems?: DropdownItem[];
|
|
3435
|
+
className?: string;
|
|
3436
|
+
}
|
|
3437
|
+
declare function UserProfileButton({ userName, userEmail, userTitle, initials, isOnline, onProfileClick, onSettingsClick, onLogoutClick, dropdownItems, className, }: UserProfileButtonProps): react_jsx_runtime.JSX.Element;
|
|
3438
|
+
|
|
3439
|
+
interface Section$1 {
|
|
3440
|
+
/** Unique identifier for the section */
|
|
3441
|
+
id: string;
|
|
3442
|
+
/** Display label for the section in navigation */
|
|
2450
3443
|
label: string;
|
|
2451
3444
|
}
|
|
2452
3445
|
interface LayoutProps {
|
|
@@ -2459,7 +3452,7 @@ interface LayoutProps {
|
|
|
2459
3452
|
/** Additional CSS classes to apply to the layout container */
|
|
2460
3453
|
className?: string;
|
|
2461
3454
|
/** Page sections for navigation dots in the gutter (auto-detected from section IDs in content) */
|
|
2462
|
-
sections?: Section[];
|
|
3455
|
+
sections?: Section$1[];
|
|
2463
3456
|
}
|
|
2464
3457
|
/**
|
|
2465
3458
|
* Layout - Complete application layout with sidebar, gutter, and scrollable content
|
|
@@ -2514,6 +3507,122 @@ interface LayoutProps {
|
|
|
2514
3507
|
*/
|
|
2515
3508
|
declare const Layout: React__default.FC<LayoutProps>;
|
|
2516
3509
|
|
|
3510
|
+
interface Section {
|
|
3511
|
+
/** Unique identifier for the section */
|
|
3512
|
+
id: string;
|
|
3513
|
+
/** Display label for the section in navigation */
|
|
3514
|
+
label: string;
|
|
3515
|
+
}
|
|
3516
|
+
interface MobileLayoutProps {
|
|
3517
|
+
/** Main page content */
|
|
3518
|
+
children: React__default.ReactNode;
|
|
3519
|
+
/** Sidebar navigation items (required for both desktop sidebar and mobile drawer) */
|
|
3520
|
+
sidebarItems: SidebarItem[];
|
|
3521
|
+
/** Current active path for highlighting */
|
|
3522
|
+
currentPath?: string;
|
|
3523
|
+
/** Handler for navigation clicks */
|
|
3524
|
+
onNavigate?: (href: string) => void;
|
|
3525
|
+
/** Header component for sidebar (logo, branding, etc.) */
|
|
3526
|
+
header?: React__default.ReactNode;
|
|
3527
|
+
/** User profile button for sidebar footer */
|
|
3528
|
+
userProfile?: React__default.ReactNode;
|
|
3529
|
+
/** Additional sidebar content */
|
|
3530
|
+
sidebarFooter?: React__default.ReactNode;
|
|
3531
|
+
/** Title displayed in mobile header (required for mobile layout) */
|
|
3532
|
+
title: string;
|
|
3533
|
+
/** Subtitle displayed in mobile header */
|
|
3534
|
+
subtitle?: string;
|
|
3535
|
+
/** Right action for mobile header */
|
|
3536
|
+
headerRightAction?: React__default.ReactNode;
|
|
3537
|
+
/** Custom left action for mobile header (overrides menu button) */
|
|
3538
|
+
headerLeftAction?: React__default.ReactNode;
|
|
3539
|
+
/** Mobile header variant */
|
|
3540
|
+
headerVariant?: MobileHeaderProps['variant'];
|
|
3541
|
+
/** Bottom navigation items for mobile (if not provided, uses sidebarItems) */
|
|
3542
|
+
bottomNavItems?: BottomNavItem[];
|
|
3543
|
+
/** Active bottom nav item ID */
|
|
3544
|
+
activeBottomNavId?: string;
|
|
3545
|
+
/** Show labels on bottom nav */
|
|
3546
|
+
showBottomNavLabels?: boolean;
|
|
3547
|
+
/** Optional status bar component displayed at the bottom (desktop only) */
|
|
3548
|
+
statusBar?: React__default.ReactNode;
|
|
3549
|
+
/** Additional CSS classes */
|
|
3550
|
+
className?: string;
|
|
3551
|
+
/** Page sections for navigation dots in desktop gutter */
|
|
3552
|
+
sections?: Section[];
|
|
3553
|
+
/** Force mobile layout even on desktop */
|
|
3554
|
+
forceMobile?: boolean;
|
|
3555
|
+
/** Force desktop layout even on mobile */
|
|
3556
|
+
forceDesktop?: boolean;
|
|
3557
|
+
/** Hide bottom navigation on mobile */
|
|
3558
|
+
hideBottomNav?: boolean;
|
|
3559
|
+
/** Hide mobile header */
|
|
3560
|
+
hideMobileHeader?: boolean;
|
|
3561
|
+
/** Use safe area insets for notched devices */
|
|
3562
|
+
safeArea?: boolean;
|
|
3563
|
+
}
|
|
3564
|
+
/**
|
|
3565
|
+
* MobileLayout - Auto-responsive layout that switches between desktop and mobile patterns
|
|
3566
|
+
*
|
|
3567
|
+
* This component automatically detects the viewport size and renders the appropriate layout:
|
|
3568
|
+
* - **Desktop** (≥1024px): Standard Layout with sidebar, gutter, and scrollable content
|
|
3569
|
+
* - **Mobile/Tablet** (<1024px): Mobile header, drawer navigation, bottom tab bar
|
|
3570
|
+
*
|
|
3571
|
+
* The mobile layout features:
|
|
3572
|
+
* - Sticky header with hamburger menu to open drawer
|
|
3573
|
+
* - Sidebar rendered as a slide-in drawer
|
|
3574
|
+
* - Bottom navigation bar for primary navigation
|
|
3575
|
+
* - Safe area support for notched devices
|
|
3576
|
+
*
|
|
3577
|
+
* @example Basic usage
|
|
3578
|
+
* ```tsx
|
|
3579
|
+
* <MobileLayout
|
|
3580
|
+
* sidebarItems={[
|
|
3581
|
+
* { id: 'home', label: 'Home', icon: <Home />, href: '/' },
|
|
3582
|
+
* { id: 'tasks', label: 'Tasks', icon: <CheckSquare />, href: '/tasks' },
|
|
3583
|
+
* { id: 'settings', label: 'Settings', icon: <Settings />, href: '/settings' }
|
|
3584
|
+
* ]}
|
|
3585
|
+
* currentPath={location.pathname}
|
|
3586
|
+
* onNavigate={(href) => navigate(href)}
|
|
3587
|
+
* title="My App"
|
|
3588
|
+
* header={<Logo />}
|
|
3589
|
+
* userProfile={<UserProfileButton user={user} />}
|
|
3590
|
+
* >
|
|
3591
|
+
* <Page>
|
|
3592
|
+
* <h1>Dashboard</h1>
|
|
3593
|
+
* </Page>
|
|
3594
|
+
* </MobileLayout>
|
|
3595
|
+
* ```
|
|
3596
|
+
*
|
|
3597
|
+
* @example With custom bottom nav items
|
|
3598
|
+
* ```tsx
|
|
3599
|
+
* <MobileLayout
|
|
3600
|
+
* sidebarItems={fullNavItems}
|
|
3601
|
+
* bottomNavItems={[
|
|
3602
|
+
* { id: 'home', label: 'Home', icon: <Home />, href: '/' },
|
|
3603
|
+
* { id: 'search', label: 'Search', icon: <Search />, href: '/search' },
|
|
3604
|
+
* { id: 'profile', label: 'Profile', icon: <User />, href: '/profile' }
|
|
3605
|
+
* ]}
|
|
3606
|
+
* currentPath={location.pathname}
|
|
3607
|
+
* title="My App"
|
|
3608
|
+
* >
|
|
3609
|
+
* {children}
|
|
3610
|
+
* </MobileLayout>
|
|
3611
|
+
* ```
|
|
3612
|
+
*
|
|
3613
|
+
* @example Force mobile layout for testing
|
|
3614
|
+
* ```tsx
|
|
3615
|
+
* <MobileLayout
|
|
3616
|
+
* sidebarItems={items}
|
|
3617
|
+
* title="Mobile Preview"
|
|
3618
|
+
* forceMobile
|
|
3619
|
+
* >
|
|
3620
|
+
* {children}
|
|
3621
|
+
* </MobileLayout>
|
|
3622
|
+
* ```
|
|
3623
|
+
*/
|
|
3624
|
+
declare const MobileLayout: React__default.FC<MobileLayoutProps>;
|
|
3625
|
+
|
|
2517
3626
|
interface TwoColumnContentProps {
|
|
2518
3627
|
/** Content for the left sidebar column */
|
|
2519
3628
|
sidebar: React__default.ReactNode;
|
|
@@ -2701,6 +3810,102 @@ interface NotificationIndicatorProps {
|
|
|
2701
3810
|
}
|
|
2702
3811
|
declare function NotificationIndicator({ count, onClick, className, maxCount, variant, }: NotificationIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
2703
3812
|
|
|
3813
|
+
/**
|
|
3814
|
+
* Configuration for how data should display in card view
|
|
3815
|
+
*/
|
|
3816
|
+
interface CardViewConfig<T> {
|
|
3817
|
+
/** Column key to use as the main title */
|
|
3818
|
+
titleKey: keyof T | string;
|
|
3819
|
+
/** Column key to use as subtitle (optional) */
|
|
3820
|
+
subtitleKey?: keyof T | string;
|
|
3821
|
+
/** Column keys to show as metadata rows */
|
|
3822
|
+
metadataKeys?: (keyof T | string)[];
|
|
3823
|
+
/** Column key to use for badge/status display */
|
|
3824
|
+
badgeKey?: keyof T | string;
|
|
3825
|
+
/** Column key for avatar/image (renders circular image) */
|
|
3826
|
+
avatarKey?: keyof T | string;
|
|
3827
|
+
/** Custom render function for entire card content */
|
|
3828
|
+
renderCard?: (item: T, columns: DataTableColumn<T>[]) => React__default.ReactNode;
|
|
3829
|
+
/** Show chevron indicator for clickable cards */
|
|
3830
|
+
showChevron?: boolean;
|
|
3831
|
+
}
|
|
3832
|
+
interface DataTableCardViewProps<T extends BaseDataItem$1> {
|
|
3833
|
+
/** Data items to display */
|
|
3834
|
+
data: T[];
|
|
3835
|
+
/** Column definitions (used for rendering values and getting column info) */
|
|
3836
|
+
columns: DataTableColumn<T>[];
|
|
3837
|
+
/** Card view configuration */
|
|
3838
|
+
cardConfig?: CardViewConfig<T>;
|
|
3839
|
+
/** Loading state */
|
|
3840
|
+
loading?: boolean;
|
|
3841
|
+
/** Number of skeleton cards to show while loading */
|
|
3842
|
+
loadingRows?: number;
|
|
3843
|
+
/** Empty state message */
|
|
3844
|
+
emptyMessage?: string;
|
|
3845
|
+
/** Click handler for card tap */
|
|
3846
|
+
onCardClick?: (item: T) => void;
|
|
3847
|
+
/** Long press / context menu handler */
|
|
3848
|
+
onCardLongPress?: (item: T, event: React__default.TouchEvent | React__default.MouseEvent) => void;
|
|
3849
|
+
/** Enable selection mode */
|
|
3850
|
+
selectable?: boolean;
|
|
3851
|
+
/** Currently selected row keys */
|
|
3852
|
+
selectedRows?: Set<string>;
|
|
3853
|
+
/** Selection change handler */
|
|
3854
|
+
onSelectionChange?: (selectedRows: string[]) => void;
|
|
3855
|
+
/** Function to extract unique key from row */
|
|
3856
|
+
keyExtractor?: (row: T) => string;
|
|
3857
|
+
/** Row actions (shown in action menu) */
|
|
3858
|
+
actions?: DataTableAction<T>[];
|
|
3859
|
+
/** Built-in edit handler */
|
|
3860
|
+
onEdit?: (item: T) => void;
|
|
3861
|
+
/** Built-in delete handler */
|
|
3862
|
+
onDelete?: (item: T) => void;
|
|
3863
|
+
/** Additional CSS classes */
|
|
3864
|
+
className?: string;
|
|
3865
|
+
/** Custom card class name */
|
|
3866
|
+
cardClassName?: string;
|
|
3867
|
+
/** Gap between cards */
|
|
3868
|
+
gap?: 'sm' | 'md' | 'lg';
|
|
3869
|
+
}
|
|
3870
|
+
/**
|
|
3871
|
+
* DataTableCardView - Mobile-friendly card view for data tables
|
|
3872
|
+
*
|
|
3873
|
+
* Renders data as cards instead of table rows, optimized for touch interaction.
|
|
3874
|
+
* Automatically uses column render functions for consistent data display.
|
|
3875
|
+
*
|
|
3876
|
+
* @example Basic usage
|
|
3877
|
+
* ```tsx
|
|
3878
|
+
* <DataTableCardView
|
|
3879
|
+
* data={users}
|
|
3880
|
+
* columns={columns}
|
|
3881
|
+
* cardConfig={{
|
|
3882
|
+
* titleKey: 'name',
|
|
3883
|
+
* subtitleKey: 'email',
|
|
3884
|
+
* metadataKeys: ['department', 'role'],
|
|
3885
|
+
* badgeKey: 'status',
|
|
3886
|
+
* }}
|
|
3887
|
+
* onCardClick={(user) => navigate(`/users/${user.id}`)}
|
|
3888
|
+
* />
|
|
3889
|
+
* ```
|
|
3890
|
+
*
|
|
3891
|
+
* @example With selection
|
|
3892
|
+
* ```tsx
|
|
3893
|
+
* <DataTableCardView
|
|
3894
|
+
* data={orders}
|
|
3895
|
+
* columns={columns}
|
|
3896
|
+
* cardConfig={{
|
|
3897
|
+
* titleKey: 'orderNumber',
|
|
3898
|
+
* subtitleKey: 'customer',
|
|
3899
|
+
* badgeKey: 'status',
|
|
3900
|
+
* }}
|
|
3901
|
+
* selectable
|
|
3902
|
+
* selectedRows={selectedOrders}
|
|
3903
|
+
* onSelectionChange={setSelectedOrders}
|
|
3904
|
+
* />
|
|
3905
|
+
* ```
|
|
3906
|
+
*/
|
|
3907
|
+
declare function DataTableCardView<T extends BaseDataItem$1>({ data, columns, cardConfig, loading, loadingRows, emptyMessage, onCardClick, onCardLongPress, selectable, selectedRows, onSelectionChange, keyExtractor, actions, onEdit, onDelete, className, cardClassName, gap, }: DataTableCardViewProps<T>): react_jsx_runtime.JSX.Element;
|
|
3908
|
+
|
|
2704
3909
|
/**
|
|
2705
3910
|
* Base data item interface - all data items must have an id
|
|
2706
3911
|
*
|
|
@@ -2921,6 +4126,14 @@ interface DataTableProps<T extends BaseDataItem$1 = BaseDataItem$1> {
|
|
|
2921
4126
|
onPageSizeChange?: (pageSize: number) => void;
|
|
2922
4127
|
/** Show page size selector (default: true when paginated) */
|
|
2923
4128
|
showPageSizeSelector?: boolean;
|
|
4129
|
+
/** Mobile view mode: 'auto' (detect viewport), 'card' (always cards), 'table' (always table) */
|
|
4130
|
+
mobileView?: 'auto' | 'card' | 'table';
|
|
4131
|
+
/** Configuration for card view layout */
|
|
4132
|
+
cardConfig?: CardViewConfig<T>;
|
|
4133
|
+
/** Gap between cards in card view */
|
|
4134
|
+
cardGap?: 'sm' | 'md' | 'lg';
|
|
4135
|
+
/** Custom class name for cards */
|
|
4136
|
+
cardClassName?: string;
|
|
2924
4137
|
}
|
|
2925
4138
|
/**
|
|
2926
4139
|
* DataTable - Feature-rich data table component
|
|
@@ -2966,7 +4179,98 @@ interface DataTableProps<T extends BaseDataItem$1 = BaseDataItem$1> {
|
|
|
2966
4179
|
* />
|
|
2967
4180
|
* ```
|
|
2968
4181
|
*/
|
|
2969
|
-
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, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
4182
|
+
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;
|
|
4183
|
+
|
|
4184
|
+
/**
|
|
4185
|
+
* Single swipe action configuration
|
|
4186
|
+
*/
|
|
4187
|
+
interface SwipeAction {
|
|
4188
|
+
/** Unique identifier */
|
|
4189
|
+
id: string;
|
|
4190
|
+
/** Action label (shown on the button) */
|
|
4191
|
+
label: string;
|
|
4192
|
+
/** Icon to display */
|
|
4193
|
+
icon?: React__default.ReactNode;
|
|
4194
|
+
/** Background color class (Tailwind) */
|
|
4195
|
+
color?: 'primary' | 'success' | 'warning' | 'error' | 'default';
|
|
4196
|
+
/** Click handler */
|
|
4197
|
+
onClick: () => void;
|
|
4198
|
+
/** Whether this is the primary action (full swipe triggers it) */
|
|
4199
|
+
primary?: boolean;
|
|
4200
|
+
}
|
|
4201
|
+
/**
|
|
4202
|
+
* SwipeActions component props
|
|
4203
|
+
*/
|
|
4204
|
+
interface SwipeActionsProps {
|
|
4205
|
+
/** Content to wrap with swipe actions */
|
|
4206
|
+
children: React__default.ReactNode;
|
|
4207
|
+
/** Actions shown when swiping left (appears on right side) */
|
|
4208
|
+
leftActions?: SwipeAction[];
|
|
4209
|
+
/** Actions shown when swiping right (appears on left side) */
|
|
4210
|
+
rightActions?: SwipeAction[];
|
|
4211
|
+
/** Swipe threshold in pixels to reveal actions (default: 80) */
|
|
4212
|
+
threshold?: number;
|
|
4213
|
+
/** Full swipe threshold percentage to trigger primary action (default: 0.5) */
|
|
4214
|
+
fullSwipeThreshold?: number;
|
|
4215
|
+
/** Enable full swipe to trigger primary action */
|
|
4216
|
+
fullSwipe?: boolean;
|
|
4217
|
+
/** Disable swipe gestures */
|
|
4218
|
+
disabled?: boolean;
|
|
4219
|
+
/** Callback when actions are revealed/hidden */
|
|
4220
|
+
onSwipeChange?: (direction: 'left' | 'right' | null) => void;
|
|
4221
|
+
/** Additional CSS classes */
|
|
4222
|
+
className?: string;
|
|
4223
|
+
}
|
|
4224
|
+
/**
|
|
4225
|
+
* SwipeActions - Touch-based swipe actions for list items
|
|
4226
|
+
*
|
|
4227
|
+
* Wraps any content with swipe-to-reveal actions, commonly used in mobile
|
|
4228
|
+
* list items for quick actions like delete, archive, edit, etc.
|
|
4229
|
+
*
|
|
4230
|
+
* Features:
|
|
4231
|
+
* - Left and right swipe actions
|
|
4232
|
+
* - Full swipe to trigger primary action
|
|
4233
|
+
* - Spring-back animation
|
|
4234
|
+
* - Touch and mouse support
|
|
4235
|
+
* - Customizable thresholds
|
|
4236
|
+
*
|
|
4237
|
+
* @example Basic delete action
|
|
4238
|
+
* ```tsx
|
|
4239
|
+
* <SwipeActions
|
|
4240
|
+
* leftActions={[
|
|
4241
|
+
* {
|
|
4242
|
+
* id: 'delete',
|
|
4243
|
+
* label: 'Delete',
|
|
4244
|
+
* icon: <Trash className="h-5 w-5" />,
|
|
4245
|
+
* color: 'error',
|
|
4246
|
+
* onClick: () => handleDelete(item),
|
|
4247
|
+
* primary: true,
|
|
4248
|
+
* },
|
|
4249
|
+
* ]}
|
|
4250
|
+
* >
|
|
4251
|
+
* <div className="p-4 bg-white">
|
|
4252
|
+
* List item content
|
|
4253
|
+
* </div>
|
|
4254
|
+
* </SwipeActions>
|
|
4255
|
+
* ```
|
|
4256
|
+
*
|
|
4257
|
+
* @example Multiple actions on both sides
|
|
4258
|
+
* ```tsx
|
|
4259
|
+
* <SwipeActions
|
|
4260
|
+
* leftActions={[
|
|
4261
|
+
* { id: 'delete', label: 'Delete', icon: <Trash />, color: 'error', onClick: handleDelete },
|
|
4262
|
+
* { id: 'archive', label: 'Archive', icon: <Archive />, color: 'warning', onClick: handleArchive },
|
|
4263
|
+
* ]}
|
|
4264
|
+
* rightActions={[
|
|
4265
|
+
* { id: 'edit', label: 'Edit', icon: <Edit />, color: 'primary', onClick: handleEdit },
|
|
4266
|
+
* ]}
|
|
4267
|
+
* fullSwipe
|
|
4268
|
+
* >
|
|
4269
|
+
* <ListItem />
|
|
4270
|
+
* </SwipeActions>
|
|
4271
|
+
* ```
|
|
4272
|
+
*/
|
|
4273
|
+
declare function SwipeActions({ children, leftActions, rightActions, threshold, fullSwipeThreshold, fullSwipe, disabled, onSwipeChange, className, }: SwipeActionsProps): react_jsx_runtime.JSX.Element;
|
|
2970
4274
|
|
|
2971
4275
|
/**
|
|
2972
4276
|
* Enhanced cell type with formula support
|
|
@@ -3465,7 +4769,7 @@ interface QueryTransparencyInfo {
|
|
|
3465
4769
|
relatedData?: Array<{
|
|
3466
4770
|
entity: string;
|
|
3467
4771
|
description: string;
|
|
3468
|
-
type: 'join' | 'include' | 'lookup';
|
|
4772
|
+
type: 'primary' | 'join' | 'include' | 'lookup';
|
|
3469
4773
|
}>;
|
|
3470
4774
|
calculations?: Array<{
|
|
3471
4775
|
field: string;
|
|
@@ -3571,6 +4875,201 @@ interface PageLayoutProps {
|
|
|
3571
4875
|
*/
|
|
3572
4876
|
declare function PageLayout({ title, description, children, className, headerContent, maxWidth, fixed }: PageLayoutProps): react_jsx_runtime.JSX.Element;
|
|
3573
4877
|
|
|
4878
|
+
interface PageHeaderAction {
|
|
4879
|
+
/** Unique identifier for the action */
|
|
4880
|
+
id: string;
|
|
4881
|
+
/** Button label text */
|
|
4882
|
+
label: string;
|
|
4883
|
+
/** Icon to display (from lucide-react) */
|
|
4884
|
+
icon?: ReactNode;
|
|
4885
|
+
/** Click handler */
|
|
4886
|
+
onClick: () => void;
|
|
4887
|
+
/** Button variant */
|
|
4888
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'outline';
|
|
4889
|
+
/** Disabled state */
|
|
4890
|
+
disabled?: boolean;
|
|
4891
|
+
/** Loading state */
|
|
4892
|
+
loading?: boolean;
|
|
4893
|
+
/** Hide on mobile */
|
|
4894
|
+
hideOnMobile?: boolean;
|
|
4895
|
+
}
|
|
4896
|
+
interface PageHeaderProps {
|
|
4897
|
+
/** Page title */
|
|
4898
|
+
title: string;
|
|
4899
|
+
/** Optional subtitle/description */
|
|
4900
|
+
subtitle?: string;
|
|
4901
|
+
/** Breadcrumb navigation items */
|
|
4902
|
+
breadcrumbs?: BreadcrumbItem[];
|
|
4903
|
+
/** Show home icon in breadcrumbs (default: true) */
|
|
4904
|
+
showHomeBreadcrumb?: boolean;
|
|
4905
|
+
/** Action buttons to display on the right */
|
|
4906
|
+
actions?: PageHeaderAction[];
|
|
4907
|
+
/** Custom content to render on the right (instead of actions) */
|
|
4908
|
+
rightContent?: ReactNode;
|
|
4909
|
+
/** Custom content to render below title */
|
|
4910
|
+
belowTitle?: ReactNode;
|
|
4911
|
+
/** Additional CSS classes */
|
|
4912
|
+
className?: string;
|
|
4913
|
+
/** Make header sticky at top */
|
|
4914
|
+
sticky?: boolean;
|
|
4915
|
+
/** Back button configuration */
|
|
4916
|
+
backButton?: {
|
|
4917
|
+
label?: string;
|
|
4918
|
+
onClick: () => void;
|
|
4919
|
+
};
|
|
4920
|
+
}
|
|
4921
|
+
/**
|
|
4922
|
+
* PageHeader - Standard page header with title, breadcrumbs, and actions
|
|
4923
|
+
*
|
|
4924
|
+
* A consistent header component for pages that provides:
|
|
4925
|
+
* - Page title and optional subtitle
|
|
4926
|
+
* - Breadcrumb navigation
|
|
4927
|
+
* - Action buttons (Create, Export, etc.)
|
|
4928
|
+
* - Optional back button
|
|
4929
|
+
* - Sticky positioning option
|
|
4930
|
+
*
|
|
4931
|
+
* @example Basic usage
|
|
4932
|
+
* ```tsx
|
|
4933
|
+
* <PageHeader
|
|
4934
|
+
* title="Products"
|
|
4935
|
+
* subtitle="Manage your product catalog"
|
|
4936
|
+
* breadcrumbs={[{ label: 'Inventory' }, { label: 'Products' }]}
|
|
4937
|
+
* actions={[
|
|
4938
|
+
* { id: 'export', label: 'Export', icon: <Download />, onClick: handleExport, variant: 'ghost' },
|
|
4939
|
+
* { id: 'add', label: 'Add Product', icon: <Plus />, onClick: handleAdd, variant: 'primary' },
|
|
4940
|
+
* ]}
|
|
4941
|
+
* />
|
|
4942
|
+
* ```
|
|
4943
|
+
*
|
|
4944
|
+
* @example With back button
|
|
4945
|
+
* ```tsx
|
|
4946
|
+
* <PageHeader
|
|
4947
|
+
* title="Edit Product"
|
|
4948
|
+
* backButton={{ label: 'Back to Products', onClick: () => navigate('/products') }}
|
|
4949
|
+
* />
|
|
4950
|
+
* ```
|
|
4951
|
+
*
|
|
4952
|
+
* @example With custom right content
|
|
4953
|
+
* ```tsx
|
|
4954
|
+
* <PageHeader
|
|
4955
|
+
* title="Dashboard"
|
|
4956
|
+
* rightContent={<DateRangePicker value={range} onChange={setRange} />}
|
|
4957
|
+
* />
|
|
4958
|
+
* ```
|
|
4959
|
+
*/
|
|
4960
|
+
declare function PageHeader({ title, subtitle, breadcrumbs, showHomeBreadcrumb, actions, rightContent, belowTitle, className, sticky, backButton, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
4961
|
+
|
|
4962
|
+
interface ActionBarAction {
|
|
4963
|
+
/** Unique identifier for the action */
|
|
4964
|
+
id: string;
|
|
4965
|
+
/** Button label text */
|
|
4966
|
+
label: string;
|
|
4967
|
+
/** Icon to display (from lucide-react) */
|
|
4968
|
+
icon?: ReactNode;
|
|
4969
|
+
/** Click handler */
|
|
4970
|
+
onClick: () => void;
|
|
4971
|
+
/** Button variant */
|
|
4972
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'outline';
|
|
4973
|
+
/** Disabled state */
|
|
4974
|
+
disabled?: boolean;
|
|
4975
|
+
/** Loading state */
|
|
4976
|
+
loading?: boolean;
|
|
4977
|
+
}
|
|
4978
|
+
interface ActionBarProps {
|
|
4979
|
+
/** Content to display on the left side (e.g., selection count, status text) */
|
|
4980
|
+
leftContent?: ReactNode;
|
|
4981
|
+
/** Content to display in the center */
|
|
4982
|
+
centerContent?: ReactNode;
|
|
4983
|
+
/** Content to display on the right side (overrides actions) */
|
|
4984
|
+
rightContent?: ReactNode;
|
|
4985
|
+
/** Action buttons to display on the right */
|
|
4986
|
+
actions?: ActionBarAction[];
|
|
4987
|
+
/** Position of the action bar */
|
|
4988
|
+
position?: 'top' | 'bottom';
|
|
4989
|
+
/** Make the bar sticky */
|
|
4990
|
+
sticky?: boolean;
|
|
4991
|
+
/** Show the action bar (useful for conditional display like bulk selection) */
|
|
4992
|
+
visible?: boolean;
|
|
4993
|
+
/** Callback when close/dismiss button is clicked */
|
|
4994
|
+
onDismiss?: () => void;
|
|
4995
|
+
/** Show dismiss button */
|
|
4996
|
+
showDismiss?: boolean;
|
|
4997
|
+
/** Additional CSS classes */
|
|
4998
|
+
className?: string;
|
|
4999
|
+
/** Background variant */
|
|
5000
|
+
variant?: 'default' | 'primary' | 'warning' | 'info';
|
|
5001
|
+
/** Compact mode with less padding */
|
|
5002
|
+
compact?: boolean;
|
|
5003
|
+
}
|
|
5004
|
+
/**
|
|
5005
|
+
* ActionBar - Flexible toolbar for page-level and contextual actions
|
|
5006
|
+
*
|
|
5007
|
+
* A versatile action container that can be used for:
|
|
5008
|
+
* - Bulk actions when rows are selected
|
|
5009
|
+
* - Page-level actions and controls
|
|
5010
|
+
* - Form action buttons (Save/Cancel)
|
|
5011
|
+
* - Contextual toolbars
|
|
5012
|
+
*
|
|
5013
|
+
* @example Basic bulk actions bar
|
|
5014
|
+
* ```tsx
|
|
5015
|
+
* <ActionBar
|
|
5016
|
+
* visible={selectedIds.length > 0}
|
|
5017
|
+
* leftContent={<Text weight="medium">{selectedIds.length} selected</Text>}
|
|
5018
|
+
* actions={[
|
|
5019
|
+
* { id: 'export', label: 'Export', icon: <Download />, onClick: handleExport },
|
|
5020
|
+
* { id: 'delete', label: 'Delete', icon: <Trash />, onClick: handleDelete, variant: 'danger' },
|
|
5021
|
+
* ]}
|
|
5022
|
+
* onDismiss={() => setSelectedIds([])}
|
|
5023
|
+
* showDismiss
|
|
5024
|
+
* />
|
|
5025
|
+
* ```
|
|
5026
|
+
*
|
|
5027
|
+
* @example Sticky bottom form actions
|
|
5028
|
+
* ```tsx
|
|
5029
|
+
* <ActionBar
|
|
5030
|
+
* position="bottom"
|
|
5031
|
+
* sticky
|
|
5032
|
+
* rightContent={
|
|
5033
|
+
* <>
|
|
5034
|
+
* <Button variant="ghost" onClick={handleCancel}>Cancel</Button>
|
|
5035
|
+
* <Button variant="primary" onClick={handleSave} loading={isSaving}>Save Changes</Button>
|
|
5036
|
+
* </>
|
|
5037
|
+
* }
|
|
5038
|
+
* />
|
|
5039
|
+
* ```
|
|
5040
|
+
*
|
|
5041
|
+
* @example Info bar with center content
|
|
5042
|
+
* ```tsx
|
|
5043
|
+
* <ActionBar
|
|
5044
|
+
* variant="info"
|
|
5045
|
+
* centerContent={
|
|
5046
|
+
* <Text size="sm">Showing results for "search term" - 42 items found</Text>
|
|
5047
|
+
* }
|
|
5048
|
+
* onDismiss={clearSearch}
|
|
5049
|
+
* showDismiss
|
|
5050
|
+
* />
|
|
5051
|
+
* ```
|
|
5052
|
+
*/
|
|
5053
|
+
declare function ActionBar({ leftContent, centerContent, rightContent, actions, position, sticky, visible, onDismiss, showDismiss, className, variant, compact, }: ActionBarProps): react_jsx_runtime.JSX.Element | null;
|
|
5054
|
+
/**
|
|
5055
|
+
* ActionBar.Left - Semantic wrapper for left content
|
|
5056
|
+
*/
|
|
5057
|
+
declare function ActionBarLeft({ children }: {
|
|
5058
|
+
children: ReactNode;
|
|
5059
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5060
|
+
/**
|
|
5061
|
+
* ActionBar.Center - Semantic wrapper for center content
|
|
5062
|
+
*/
|
|
5063
|
+
declare function ActionBarCenter({ children }: {
|
|
5064
|
+
children: ReactNode;
|
|
5065
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5066
|
+
/**
|
|
5067
|
+
* ActionBar.Right - Semantic wrapper for right content
|
|
5068
|
+
*/
|
|
5069
|
+
declare function ActionBarRight({ children }: {
|
|
5070
|
+
children: ReactNode;
|
|
5071
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5072
|
+
|
|
3574
5073
|
interface AdminModalTab {
|
|
3575
5074
|
id: string;
|
|
3576
5075
|
label: string;
|
|
@@ -3726,6 +5225,7 @@ declare function NotificationBar({ notifications, onDismiss }: NotificationBarPr
|
|
|
3726
5225
|
/**
|
|
3727
5226
|
* Core types for notebook-ui library
|
|
3728
5227
|
*/
|
|
5228
|
+
|
|
3729
5229
|
/**
|
|
3730
5230
|
* Base interface for all data items that can be displayed in tables
|
|
3731
5231
|
*/
|
|
@@ -3744,6 +5244,7 @@ interface PaginationResponse<T = BaseDataItem> {
|
|
|
3744
5244
|
pageSize: number;
|
|
3745
5245
|
executedQuery?: string;
|
|
3746
5246
|
executionTimeMs?: number;
|
|
5247
|
+
queryInfo?: QueryTransparencyInfo;
|
|
3747
5248
|
}
|
|
3748
5249
|
/**
|
|
3749
5250
|
* Parameters for fetching paginated data
|
|
@@ -4060,5 +5561,324 @@ declare function useColumnReorder<T>(initialColumns: T[], options?: UseColumnReo
|
|
|
4060
5561
|
resetOrder: () => void;
|
|
4061
5562
|
};
|
|
4062
5563
|
|
|
4063
|
-
|
|
4064
|
-
|
|
5564
|
+
/**
|
|
5565
|
+
* Tailwind breakpoint values in pixels
|
|
5566
|
+
*/
|
|
5567
|
+
declare const BREAKPOINTS: {
|
|
5568
|
+
readonly xs: 0;
|
|
5569
|
+
readonly sm: 640;
|
|
5570
|
+
readonly md: 768;
|
|
5571
|
+
readonly lg: 1024;
|
|
5572
|
+
readonly xl: 1280;
|
|
5573
|
+
readonly '2xl': 1536;
|
|
5574
|
+
};
|
|
5575
|
+
type Breakpoint = keyof typeof BREAKPOINTS;
|
|
5576
|
+
/**
|
|
5577
|
+
* Viewport size state
|
|
5578
|
+
*/
|
|
5579
|
+
interface ViewportSize {
|
|
5580
|
+
width: number;
|
|
5581
|
+
height: number;
|
|
5582
|
+
}
|
|
5583
|
+
/**
|
|
5584
|
+
* Orientation type
|
|
5585
|
+
*/
|
|
5586
|
+
type Orientation = 'portrait' | 'landscape';
|
|
5587
|
+
/**
|
|
5588
|
+
* useViewportSize - Returns current viewport dimensions
|
|
5589
|
+
*
|
|
5590
|
+
* Updates on window resize with debouncing for performance.
|
|
5591
|
+
* SSR-safe with sensible defaults.
|
|
5592
|
+
*
|
|
5593
|
+
* @example
|
|
5594
|
+
* const { width, height } = useViewportSize();
|
|
5595
|
+
* console.log(`Viewport: ${width}x${height}`);
|
|
5596
|
+
*/
|
|
5597
|
+
declare function useViewportSize(): ViewportSize;
|
|
5598
|
+
/**
|
|
5599
|
+
* useBreakpoint - Returns the current Tailwind breakpoint
|
|
5600
|
+
*
|
|
5601
|
+
* Automatically updates when viewport crosses breakpoint thresholds.
|
|
5602
|
+
*
|
|
5603
|
+
* @example
|
|
5604
|
+
* const breakpoint = useBreakpoint();
|
|
5605
|
+
* // Returns: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'
|
|
5606
|
+
*/
|
|
5607
|
+
declare function useBreakpoint(): Breakpoint;
|
|
5608
|
+
/**
|
|
5609
|
+
* useMediaQuery - React hook for CSS media queries
|
|
5610
|
+
*
|
|
5611
|
+
* SSR-safe implementation that returns false during SSR and
|
|
5612
|
+
* updates reactively when media query match state changes.
|
|
5613
|
+
*
|
|
5614
|
+
* @param query - CSS media query string (e.g., '(max-width: 768px)')
|
|
5615
|
+
* @returns boolean indicating if the media query matches
|
|
5616
|
+
*
|
|
5617
|
+
* @example
|
|
5618
|
+
* const isDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
|
|
5619
|
+
* const isReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');
|
|
5620
|
+
* const isPortrait = useMediaQuery('(orientation: portrait)');
|
|
5621
|
+
*/
|
|
5622
|
+
declare function useMediaQuery(query: string): boolean;
|
|
5623
|
+
/**
|
|
5624
|
+
* useIsMobile - Returns true when viewport is mobile-sized (< 768px)
|
|
5625
|
+
*
|
|
5626
|
+
* @example
|
|
5627
|
+
* const isMobile = useIsMobile();
|
|
5628
|
+
* return isMobile ? <MobileNav /> : <DesktopNav />;
|
|
5629
|
+
*/
|
|
5630
|
+
declare function useIsMobile(): boolean;
|
|
5631
|
+
/**
|
|
5632
|
+
* useIsTablet - Returns true when viewport is tablet-sized (768px - 1023px)
|
|
5633
|
+
*
|
|
5634
|
+
* @example
|
|
5635
|
+
* const isTablet = useIsTablet();
|
|
5636
|
+
*/
|
|
5637
|
+
declare function useIsTablet(): boolean;
|
|
5638
|
+
/**
|
|
5639
|
+
* useIsDesktop - Returns true when viewport is desktop-sized (>= 1024px)
|
|
5640
|
+
*
|
|
5641
|
+
* @example
|
|
5642
|
+
* const isDesktop = useIsDesktop();
|
|
5643
|
+
*/
|
|
5644
|
+
declare function useIsDesktop(): boolean;
|
|
5645
|
+
/**
|
|
5646
|
+
* useIsTouchDevice - Detects if the device supports touch input
|
|
5647
|
+
*
|
|
5648
|
+
* Uses multiple detection methods for reliability:
|
|
5649
|
+
* - Touch event support
|
|
5650
|
+
* - Pointer coarse media query
|
|
5651
|
+
* - Max touch points
|
|
5652
|
+
*
|
|
5653
|
+
* @example
|
|
5654
|
+
* const isTouchDevice = useIsTouchDevice();
|
|
5655
|
+
* // Show swipe hints on touch devices
|
|
5656
|
+
*/
|
|
5657
|
+
declare function useIsTouchDevice(): boolean;
|
|
5658
|
+
/**
|
|
5659
|
+
* useOrientation - Returns current screen orientation
|
|
5660
|
+
*
|
|
5661
|
+
* @returns 'portrait' | 'landscape'
|
|
5662
|
+
*
|
|
5663
|
+
* @example
|
|
5664
|
+
* const orientation = useOrientation();
|
|
5665
|
+
* // Adjust layout based on orientation
|
|
5666
|
+
*/
|
|
5667
|
+
declare function useOrientation(): Orientation;
|
|
5668
|
+
/**
|
|
5669
|
+
* useBreakpointValue - Returns different values based on breakpoint
|
|
5670
|
+
*
|
|
5671
|
+
* Mobile-first: Returns the value for the current breakpoint or the
|
|
5672
|
+
* closest smaller breakpoint that has a value defined.
|
|
5673
|
+
*
|
|
5674
|
+
* @param values - Object mapping breakpoints to values
|
|
5675
|
+
* @param defaultValue - Fallback value if no breakpoint matches
|
|
5676
|
+
*
|
|
5677
|
+
* @example
|
|
5678
|
+
* const columns = useBreakpointValue({ xs: 1, sm: 2, lg: 4 }, 1);
|
|
5679
|
+
* // Returns 1 on xs, 2 on sm/md, 4 on lg/xl/2xl
|
|
5680
|
+
*
|
|
5681
|
+
* const padding = useBreakpointValue({ xs: 'p-2', md: 'p-4', xl: 'p-8' });
|
|
5682
|
+
*/
|
|
5683
|
+
declare function useBreakpointValue<T>(values: Partial<Record<Breakpoint, T>>, defaultValue?: T): T | undefined;
|
|
5684
|
+
/**
|
|
5685
|
+
* useResponsiveCallback - Returns a memoized callback that receives responsive info
|
|
5686
|
+
*
|
|
5687
|
+
* Useful for callbacks that need to behave differently based on viewport.
|
|
5688
|
+
*
|
|
5689
|
+
* @example
|
|
5690
|
+
* const handleClick = useResponsiveCallback((isMobile) => {
|
|
5691
|
+
* if (isMobile) {
|
|
5692
|
+
* openBottomSheet();
|
|
5693
|
+
* } else {
|
|
5694
|
+
* openModal();
|
|
5695
|
+
* }
|
|
5696
|
+
* });
|
|
5697
|
+
*/
|
|
5698
|
+
declare function useResponsiveCallback<T extends (...args: any[]) => any>(callback: (isMobile: boolean, isTablet: boolean, isDesktop: boolean) => T): T;
|
|
5699
|
+
/**
|
|
5700
|
+
* useSafeAreaInsets - Returns safe area insets for notched devices
|
|
5701
|
+
*
|
|
5702
|
+
* Uses CSS environment variables (env(safe-area-inset-*)) to get
|
|
5703
|
+
* safe area dimensions for devices with notches or home indicators.
|
|
5704
|
+
*
|
|
5705
|
+
* @example
|
|
5706
|
+
* const { top, bottom } = useSafeAreaInsets();
|
|
5707
|
+
* // Add padding-bottom for home indicator
|
|
5708
|
+
*/
|
|
5709
|
+
declare function useSafeAreaInsets(): {
|
|
5710
|
+
top: number;
|
|
5711
|
+
right: number;
|
|
5712
|
+
bottom: number;
|
|
5713
|
+
left: number;
|
|
5714
|
+
};
|
|
5715
|
+
/**
|
|
5716
|
+
* usePrefersMobile - Checks if user prefers reduced data/animations (mobile-friendly)
|
|
5717
|
+
*
|
|
5718
|
+
* Combines multiple preferences that might indicate mobile/low-power usage.
|
|
5719
|
+
*/
|
|
5720
|
+
declare function usePrefersMobile(): boolean;
|
|
5721
|
+
|
|
5722
|
+
/**
|
|
5723
|
+
* Mobile context value interface
|
|
5724
|
+
*
|
|
5725
|
+
* Provides comprehensive responsive state for the entire application.
|
|
5726
|
+
*/
|
|
5727
|
+
interface MobileContextValue {
|
|
5728
|
+
/** True when viewport width < 768px */
|
|
5729
|
+
isMobile: boolean;
|
|
5730
|
+
/** True when viewport width is 768px - 1023px */
|
|
5731
|
+
isTablet: boolean;
|
|
5732
|
+
/** True when viewport width >= 1024px */
|
|
5733
|
+
isDesktop: boolean;
|
|
5734
|
+
/** True when device supports touch input */
|
|
5735
|
+
isTouchDevice: boolean;
|
|
5736
|
+
/** Current Tailwind breakpoint: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' */
|
|
5737
|
+
breakpoint: Breakpoint;
|
|
5738
|
+
/** Current orientation: 'portrait' | 'landscape' */
|
|
5739
|
+
orientation: Orientation;
|
|
5740
|
+
/** Current viewport dimensions */
|
|
5741
|
+
viewport: ViewportSize;
|
|
5742
|
+
/** Safe area insets for notched devices */
|
|
5743
|
+
safeAreaInsets: {
|
|
5744
|
+
top: number;
|
|
5745
|
+
right: number;
|
|
5746
|
+
bottom: number;
|
|
5747
|
+
left: number;
|
|
5748
|
+
};
|
|
5749
|
+
/** True when mobile OR touch device (useful for UI decisions) */
|
|
5750
|
+
useMobileUI: boolean;
|
|
5751
|
+
}
|
|
5752
|
+
/**
|
|
5753
|
+
* MobileProvider props
|
|
5754
|
+
*/
|
|
5755
|
+
interface MobileProviderProps {
|
|
5756
|
+
/** Child components that will have access to mobile context */
|
|
5757
|
+
children: ReactNode;
|
|
5758
|
+
/**
|
|
5759
|
+
* Force mobile UI mode regardless of device detection.
|
|
5760
|
+
* Useful for testing or forcing mobile layout on tablets.
|
|
5761
|
+
*/
|
|
5762
|
+
forceMobileUI?: boolean;
|
|
5763
|
+
/**
|
|
5764
|
+
* Force desktop UI mode regardless of device detection.
|
|
5765
|
+
* Useful for testing or forcing desktop layout on mobile.
|
|
5766
|
+
*/
|
|
5767
|
+
forceDesktopUI?: boolean;
|
|
5768
|
+
}
|
|
5769
|
+
/**
|
|
5770
|
+
* MobileProvider - Provides responsive state to the entire application
|
|
5771
|
+
*
|
|
5772
|
+
* Wrap your application with MobileProvider to enable auto-responsive
|
|
5773
|
+
* behavior in notebook-ui components.
|
|
5774
|
+
*
|
|
5775
|
+
* @example Basic usage
|
|
5776
|
+
* ```tsx
|
|
5777
|
+
* import { MobileProvider } from 'notebook-ui';
|
|
5778
|
+
*
|
|
5779
|
+
* function App() {
|
|
5780
|
+
* return (
|
|
5781
|
+
* <MobileProvider>
|
|
5782
|
+
* <YourApplication />
|
|
5783
|
+
* </MobileProvider>
|
|
5784
|
+
* );
|
|
5785
|
+
* }
|
|
5786
|
+
* ```
|
|
5787
|
+
*
|
|
5788
|
+
* @example Force mobile UI for testing
|
|
5789
|
+
* ```tsx
|
|
5790
|
+
* <MobileProvider forceMobileUI>
|
|
5791
|
+
* <YourApplication />
|
|
5792
|
+
* </MobileProvider>
|
|
5793
|
+
* ```
|
|
5794
|
+
*/
|
|
5795
|
+
declare function MobileProvider({ children, forceMobileUI, forceDesktopUI, }: MobileProviderProps): react_jsx_runtime.JSX.Element;
|
|
5796
|
+
/**
|
|
5797
|
+
* useMobileContext - Hook to access mobile responsive state
|
|
5798
|
+
*
|
|
5799
|
+
* Must be used within a MobileProvider. Returns comprehensive
|
|
5800
|
+
* responsive state for making UI decisions.
|
|
5801
|
+
*
|
|
5802
|
+
* @example
|
|
5803
|
+
* ```tsx
|
|
5804
|
+
* function MyComponent() {
|
|
5805
|
+
* const { isMobile, useMobileUI, breakpoint } = useMobileContext();
|
|
5806
|
+
*
|
|
5807
|
+
* return useMobileUI ? <MobileView /> : <DesktopView />;
|
|
5808
|
+
* }
|
|
5809
|
+
* ```
|
|
5810
|
+
*/
|
|
5811
|
+
declare function useMobileContext(): MobileContextValue;
|
|
5812
|
+
/**
|
|
5813
|
+
* withMobileContext - HOC to inject mobile context as props
|
|
5814
|
+
*
|
|
5815
|
+
* For class components or when you prefer props over hooks.
|
|
5816
|
+
*
|
|
5817
|
+
* @example
|
|
5818
|
+
* ```tsx
|
|
5819
|
+
* interface Props {
|
|
5820
|
+
* mobile: MobileContextValue;
|
|
5821
|
+
* }
|
|
5822
|
+
*
|
|
5823
|
+
* class MyComponent extends React.Component<Props> {
|
|
5824
|
+
* render() {
|
|
5825
|
+
* const { isMobile } = this.props.mobile;
|
|
5826
|
+
* return isMobile ? <Mobile /> : <Desktop />;
|
|
5827
|
+
* }
|
|
5828
|
+
* }
|
|
5829
|
+
*
|
|
5830
|
+
* export default withMobileContext(MyComponent);
|
|
5831
|
+
* ```
|
|
5832
|
+
*/
|
|
5833
|
+
declare function withMobileContext<P extends {
|
|
5834
|
+
mobile: MobileContextValue;
|
|
5835
|
+
}>(Component: React__default.ComponentType<P>): {
|
|
5836
|
+
(props: Omit<P, "mobile">): react_jsx_runtime.JSX.Element;
|
|
5837
|
+
displayName: string;
|
|
5838
|
+
};
|
|
5839
|
+
/**
|
|
5840
|
+
* MobileOnly - Renders children only on mobile devices
|
|
5841
|
+
*
|
|
5842
|
+
* @example
|
|
5843
|
+
* ```tsx
|
|
5844
|
+
* <MobileOnly>
|
|
5845
|
+
* <BottomNavigation items={navItems} />
|
|
5846
|
+
* </MobileOnly>
|
|
5847
|
+
* ```
|
|
5848
|
+
*/
|
|
5849
|
+
declare function MobileOnly({ children }: {
|
|
5850
|
+
children: ReactNode;
|
|
5851
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
5852
|
+
/**
|
|
5853
|
+
* DesktopOnly - Renders children only on desktop devices
|
|
5854
|
+
*
|
|
5855
|
+
* @example
|
|
5856
|
+
* ```tsx
|
|
5857
|
+
* <DesktopOnly>
|
|
5858
|
+
* <Sidebar items={navItems} />
|
|
5859
|
+
* </DesktopOnly>
|
|
5860
|
+
* ```
|
|
5861
|
+
*/
|
|
5862
|
+
declare function DesktopOnly({ children }: {
|
|
5863
|
+
children: ReactNode;
|
|
5864
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
5865
|
+
/**
|
|
5866
|
+
* Responsive - Renders different content based on device type
|
|
5867
|
+
*
|
|
5868
|
+
* @example
|
|
5869
|
+
* ```tsx
|
|
5870
|
+
* <Responsive
|
|
5871
|
+
* mobile={<MobileNavigation />}
|
|
5872
|
+
* tablet={<TabletNavigation />}
|
|
5873
|
+
* desktop={<DesktopNavigation />}
|
|
5874
|
+
* />
|
|
5875
|
+
* ```
|
|
5876
|
+
*/
|
|
5877
|
+
declare function Responsive({ mobile, tablet, desktop, }: {
|
|
5878
|
+
mobile?: ReactNode;
|
|
5879
|
+
tablet?: ReactNode;
|
|
5880
|
+
desktop?: ReactNode;
|
|
5881
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5882
|
+
|
|
5883
|
+
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, 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, 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, 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 };
|
|
5884
|
+
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, 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, 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 };
|