@papernote/ui 1.7.6 → 1.8.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/Autocomplete.d.ts +4 -0
- package/dist/components/Autocomplete.d.ts.map +1 -1
- package/dist/components/Badge.d.ts +3 -1
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/BottomSheet.d.ts +72 -8
- package/dist/components/BottomSheet.d.ts.map +1 -1
- package/dist/components/CompactStat.d.ts +52 -0
- package/dist/components/CompactStat.d.ts.map +1 -0
- package/dist/components/HorizontalScroll.d.ts +43 -0
- package/dist/components/HorizontalScroll.d.ts.map +1 -0
- package/dist/components/NotificationBanner.d.ts +53 -0
- package/dist/components/NotificationBanner.d.ts.map +1 -0
- package/dist/components/Progress.d.ts +2 -2
- package/dist/components/Progress.d.ts.map +1 -1
- package/dist/components/PullToRefresh.d.ts +23 -71
- package/dist/components/PullToRefresh.d.ts.map +1 -1
- package/dist/components/Stack.d.ts +2 -1
- package/dist/components/Stack.d.ts.map +1 -1
- package/dist/components/SwipeableCard.d.ts +65 -0
- package/dist/components/SwipeableCard.d.ts.map +1 -0
- package/dist/components/Text.d.ts +9 -2
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/components/index.d.ts +11 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.d.ts +321 -86
- package/dist/index.esm.js +999 -267
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1004 -266
- package/dist/index.js.map +1 -1
- package/dist/styles.css +191 -8
- package/package.json +1 -1
- package/src/components/Autocomplete.tsx +95 -32
- package/src/components/Badge.tsx +13 -2
- package/src/components/BottomSheet.tsx +227 -98
- package/src/components/Card.tsx +1 -1
- package/src/components/CompactStat.tsx +150 -0
- package/src/components/HorizontalScroll.tsx +275 -0
- package/src/components/NotificationBanner.tsx +238 -0
- package/src/components/Progress.tsx +6 -3
- package/src/components/PullToRefresh.tsx +158 -196
- package/src/components/Stack.tsx +4 -1
- package/src/components/SwipeableCard.tsx +347 -0
- package/src/components/Text.tsx +45 -3
- package/src/components/index.ts +16 -3
- package/src/styles/index.css +32 -0
|
@@ -8,6 +8,8 @@ export interface AutocompleteOption {
|
|
|
8
8
|
label: string;
|
|
9
9
|
description?: string;
|
|
10
10
|
metadata?: Record<string, unknown>;
|
|
11
|
+
/** If true, renders as a non-selectable section header */
|
|
12
|
+
isHeader?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export interface AutocompleteProps {
|
|
13
15
|
value: string;
|
|
@@ -25,6 +27,8 @@ export interface AutocompleteProps {
|
|
|
25
27
|
maxResults?: number;
|
|
26
28
|
clearable?: boolean;
|
|
27
29
|
className?: string;
|
|
30
|
+
/** Show static options dropdown on focus when input is empty. Default: true */
|
|
31
|
+
showOptionsOnFocus?: boolean;
|
|
28
32
|
}
|
|
29
33
|
declare const Autocomplete: React.ForwardRefExoticComponent<AutocompleteProps & React.RefAttributes<AutocompleteHandle>>;
|
|
30
34
|
export default Autocomplete;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../src/components/Autocomplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8E,MAAM,OAAO,CAAC;AAGnG,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../src/components/Autocomplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8E,MAAM,OAAO,CAAC;AAGnG,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,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ot?: boolean;
|
|
11
|
+
/** Use pill shape (more rounded, compact padding) for inline use */
|
|
12
|
+
pill?: boolean;
|
|
11
13
|
}
|
|
12
|
-
export default function Badge({ children, variant, size, icon, onRemove, className, dot, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default function Badge({ children, variant, size, icon, onRemove, className, dot, pill, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,QAAQ,EACR,OAAmB,EACnB,IAAW,EACX,IAAI,EACJ,QAAQ,EACR,SAAc,EACd,GAAW,EACX,IAAY,GACb,EAAE,UAAU,2CAiFZ"}
|
|
@@ -1,16 +1,80 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
export interface BottomSheetProps {
|
|
3
|
-
|
|
2
|
+
/** Whether the bottom sheet is open (alias: isOpen) */
|
|
3
|
+
open?: boolean;
|
|
4
|
+
/** Whether the bottom sheet is open (alias for open, for Modal compatibility) */
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
/** Callback when the sheet should close */
|
|
4
7
|
onClose: () => void;
|
|
5
|
-
|
|
8
|
+
/** Content of the bottom sheet */
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
/** Title displayed in header (if provided, renders built-in header) */
|
|
6
11
|
title?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
/** Height of the sheet - 'auto' adjusts to content, 'sm'/'md'/'lg'/'full' presets, or specify px/% */
|
|
13
|
+
height?: 'auto' | 'sm' | 'md' | 'lg' | 'full' | number | string;
|
|
14
|
+
/** Maximum height of the sheet */
|
|
15
|
+
maxHeight?: string;
|
|
16
|
+
/** Snap points for partial expansion (e.g., ['50%', '90%']) */
|
|
17
|
+
snapPoints?: string[];
|
|
18
|
+
/** Close when clicking overlay */
|
|
10
19
|
closeOnOverlayClick?: boolean;
|
|
20
|
+
/** Close when pressing Escape */
|
|
11
21
|
closeOnEscape?: boolean;
|
|
12
|
-
|
|
22
|
+
/** Show drag handle at top */
|
|
23
|
+
showHandle?: boolean;
|
|
24
|
+
/** Show close button in header (requires title) */
|
|
25
|
+
showCloseButton?: boolean;
|
|
26
|
+
/** Prevent body scroll when open */
|
|
27
|
+
preventScroll?: boolean;
|
|
28
|
+
/** Additional class name */
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface BottomSheetHeaderProps {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface BottomSheetContentProps {
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface BottomSheetActionsProps {
|
|
40
|
+
children: React.ReactNode;
|
|
13
41
|
className?: string;
|
|
14
42
|
}
|
|
15
|
-
|
|
43
|
+
/**
|
|
44
|
+
* BottomSheet - Mobile-friendly modal that slides up from the bottom
|
|
45
|
+
*
|
|
46
|
+
* Designed for mobile contexts with touch-friendly interactions:
|
|
47
|
+
* - Drag handle for swipe-to-dismiss
|
|
48
|
+
* - Snap points for partial expansion
|
|
49
|
+
* - Sticky action area at thumb zone
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <BottomSheet open={isOpen} onClose={() => setIsOpen(false)}>
|
|
54
|
+
* <BottomSheetHeader>
|
|
55
|
+
* <Text weight="bold">Transaction Details</Text>
|
|
56
|
+
* </BottomSheetHeader>
|
|
57
|
+
* <BottomSheetContent>
|
|
58
|
+
* {content}
|
|
59
|
+
* </BottomSheetContent>
|
|
60
|
+
* <BottomSheetActions>
|
|
61
|
+
* <Button fullWidth>Approve</Button>
|
|
62
|
+
* </BottomSheetActions>
|
|
63
|
+
* </BottomSheet>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare function BottomSheet({ open, isOpen, onClose, children, title, height, maxHeight, snapPoints, closeOnOverlayClick, closeOnEscape, showHandle, showCloseButton, preventScroll, className, }: BottomSheetProps): import("react").ReactPortal | null;
|
|
67
|
+
/**
|
|
68
|
+
* BottomSheetHeader - Header section with title and optional close button
|
|
69
|
+
*/
|
|
70
|
+
export declare function BottomSheetHeader({ children, className }: BottomSheetHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
/**
|
|
72
|
+
* BottomSheetContent - Scrollable content area
|
|
73
|
+
*/
|
|
74
|
+
export declare function BottomSheetContent({ children, className }: BottomSheetContentProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
/**
|
|
76
|
+
* BottomSheetActions - Sticky footer for action buttons (thumb zone)
|
|
77
|
+
*/
|
|
78
|
+
export declare function BottomSheetActions({ children, className }: BottomSheetActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export default BottomSheet;
|
|
16
80
|
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../src/components/BottomSheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../src/components/BottomSheet.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,uDAAuD;IACvD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kCAAkC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sGAAsG;IACtG,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChE,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,kCAAkC;IAClC,mBAAmB,CAAC,EAAE,OA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{
|
|
2
|
+
/** Direction of the trend */
|
|
3
|
+
direction: 'up' | 'down' | 'neutral';
|
|
4
|
+
/** Value to display (e.g., "+$1,247" or "+12%") */
|
|
5
|
+
value: string;
|
|
6
|
+
/** Color override (defaults based on direction) */
|
|
7
|
+
color?: 'success' | 'error' | 'warning' | 'neutral';
|
|
8
|
+
}
|
|
9
|
+
export interface CompactStatProps {
|
|
10
|
+
/** The main value to display */
|
|
11
|
+
value: string;
|
|
12
|
+
/** Label describing the stat */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Optional trend indicator */
|
|
15
|
+
trend?: CompactStatTrend;
|
|
16
|
+
/** Size variant */
|
|
17
|
+
size?: 'sm' | 'md' | 'lg';
|
|
18
|
+
/** Text alignment */
|
|
19
|
+
align?: 'left' | 'center' | 'right';
|
|
20
|
+
/** Additional class name */
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* CompactStat - Single stat display optimized for mobile
|
|
25
|
+
*
|
|
26
|
+
* Designed for dashboard stats in 2-column mobile layouts:
|
|
27
|
+
* - Compact presentation with value, label, and optional trend
|
|
28
|
+
* - Responsive sizing
|
|
29
|
+
* - Trend indicators with color coding
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Grid columns={2} gap="sm">
|
|
34
|
+
* <CompactStat
|
|
35
|
+
* value="$62,329"
|
|
36
|
+
* label="Net Worth"
|
|
37
|
+
* trend={{
|
|
38
|
+
* direction: 'up',
|
|
39
|
+
* value: '+$1,247',
|
|
40
|
+
* color: 'success'
|
|
41
|
+
* }}
|
|
42
|
+
* />
|
|
43
|
+
* <CompactStat
|
|
44
|
+
* value="$4,521"
|
|
45
|
+
* label="Monthly Income"
|
|
46
|
+
* />
|
|
47
|
+
* </Grid>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function CompactStat({ value, label, trend, size, align, className, }: CompactStatProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export default CompactStat;
|
|
52
|
+
//# sourceMappingURL=CompactStat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompactStat.d.ts","sourceRoot":"","sources":["../../src/components/CompactStat.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;IACrC,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CACrD;AAED,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAW,EACX,KAAc,EACd,SAAc,GACf,EAAE,gBAAgB,2CAsFlB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type GapSize = 'none' | 'sm' | 'md' | 'lg' | number;
|
|
3
|
+
export interface HorizontalScrollProps {
|
|
4
|
+
/** Items to display in horizontal scroll */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Gap between items */
|
|
7
|
+
gap?: GapSize;
|
|
8
|
+
/** Pixels of next item visible as hint that more content exists */
|
|
9
|
+
peekAmount?: number;
|
|
10
|
+
/** Show dot indicators below */
|
|
11
|
+
showIndicators?: boolean;
|
|
12
|
+
/** Snap scroll to item boundaries */
|
|
13
|
+
snapToItem?: boolean;
|
|
14
|
+
/** When to show navigation arrows */
|
|
15
|
+
showArrows?: 'hover' | 'always' | 'never';
|
|
16
|
+
/** Scroll behavior */
|
|
17
|
+
scrollBehavior?: 'smooth' | 'auto';
|
|
18
|
+
/** Additional class name for container */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Additional class name for scroll container */
|
|
21
|
+
scrollClassName?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* HorizontalScroll - Horizontally scrollable container with peek indicators
|
|
25
|
+
*
|
|
26
|
+
* Designed for mobile carousels of cards with:
|
|
27
|
+
* - Touch-friendly momentum scrolling
|
|
28
|
+
* - Peek hint showing more items exist
|
|
29
|
+
* - Optional snap scrolling
|
|
30
|
+
* - Navigation arrows for desktop
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <HorizontalScroll gap="md" peekAmount={24} showIndicators>
|
|
35
|
+
* <Card>Bill 1</Card>
|
|
36
|
+
* <Card>Bill 2</Card>
|
|
37
|
+
* <Card>Bill 3</Card>
|
|
38
|
+
* </HorizontalScroll>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function HorizontalScroll({ children, gap, peekAmount, showIndicators, snapToItem, showArrows, scrollBehavior, className, scrollClassName, }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export default HorizontalScroll;
|
|
43
|
+
//# sourceMappingURL=HorizontalScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HorizontalScroll.d.ts","sourceRoot":"","sources":["../../src/components/HorizontalScroll.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,KAAK,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IACpC,4CAA4C;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wBAAwB;IACxB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC1C,sBAAsB;IACtB,cAAc,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACnC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,GAAU,EACV,UAAe,EACf,cAAsB,EACtB,UAAiB,EACjB,UAAoB,EACpB,cAAyB,EACzB,SAAc,EACd,eAAoB,GACrB,EAAE,qBAAqB,2CA0NvB;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface NotificationBannerAction {
|
|
3
|
+
/** Button label */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Click handler */
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface NotificationBannerProps {
|
|
9
|
+
/** Banner variant determining color scheme */
|
|
10
|
+
variant?: 'info' | 'success' | 'warning' | 'error';
|
|
11
|
+
/** Custom icon (defaults based on variant) */
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
/** Primary message/title */
|
|
14
|
+
title: string;
|
|
15
|
+
/** Optional secondary description text */
|
|
16
|
+
description?: string;
|
|
17
|
+
/** Optional action button */
|
|
18
|
+
action?: NotificationBannerAction;
|
|
19
|
+
/** Callback when dismissed - if provided, shows dismiss button */
|
|
20
|
+
onDismiss?: () => void;
|
|
21
|
+
/** Can be swiped away on mobile */
|
|
22
|
+
dismissible?: boolean;
|
|
23
|
+
/** Stick to top of container on scroll */
|
|
24
|
+
sticky?: boolean;
|
|
25
|
+
/** Additional class name */
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* NotificationBanner - Dismissible banner for important alerts
|
|
30
|
+
*
|
|
31
|
+
* Displays at top of screen for alerts that need attention but aren't blocking:
|
|
32
|
+
* - Money Found alerts
|
|
33
|
+
* - System messages
|
|
34
|
+
* - Promotional info
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <NotificationBanner
|
|
39
|
+
* variant="warning"
|
|
40
|
+
* icon={<DollarSign />}
|
|
41
|
+
* title="Found $33.98 in potential savings"
|
|
42
|
+
* description="Tap to review"
|
|
43
|
+
* action={{
|
|
44
|
+
* label: "Review",
|
|
45
|
+
* onClick: handleReview
|
|
46
|
+
* }}
|
|
47
|
+
* onDismiss={() => setShowBanner(false)}
|
|
48
|
+
* />
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare function NotificationBanner({ variant, icon, title, description, action, onDismiss, dismissible, sticky, className, }: NotificationBannerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
52
|
+
export default NotificationBanner;
|
|
53
|
+
//# sourceMappingURL=NotificationBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationBanner.d.ts","sourceRoot":"","sources":["../../src/components/NotificationBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,MAAM,WAAW,wBAAwB;IACvC,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACnD,8CAA8C;IAC9C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAgB,EAChB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,WAAkB,EAClB,MAAc,EACd,SAAc,GACf,EAAE,uBAAuB,kDA2KzB;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface ProgressProps {
|
|
2
2
|
/** Progress value (0-100) */
|
|
3
3
|
value: number;
|
|
4
|
-
/** Progress variant */
|
|
5
|
-
variant?: 'linear' | 'circular';
|
|
4
|
+
/** Progress variant ('ring' is alias for 'circular') */
|
|
5
|
+
variant?: 'linear' | 'circular' | 'ring';
|
|
6
6
|
/** Size variant */
|
|
7
7
|
size?: 'sm' | 'md' | 'lg';
|
|
8
8
|
/** Color variant */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../src/components/Progress.tsx"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC5B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../src/components/Progress.tsx"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC5B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IACzC,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,oBAAoB;IACpB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACpD,iCAAiC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,KAAK,EACL,OAAkB,EAClB,IAAW,EACX,KAAiB,EACjB,SAAiB,EACjB,KAAK,EACL,OAAe,EACf,QAAgB,EAChB,SAAc,GACf,EAAE,aAAa,2CA8Hf"}
|
|
@@ -1,87 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* PullToRefresh component props
|
|
4
|
-
*/
|
|
5
2
|
export interface PullToRefreshProps {
|
|
6
|
-
/** Content to wrap */
|
|
3
|
+
/** Content to wrap with pull-to-refresh functionality */
|
|
7
4
|
children: React.ReactNode;
|
|
8
|
-
/** Async refresh
|
|
5
|
+
/** Async callback when refresh is triggered - should return when refresh is complete */
|
|
9
6
|
onRefresh: () => Promise<void>;
|
|
7
|
+
/** Pixels to pull before triggering refresh */
|
|
8
|
+
threshold?: number;
|
|
10
9
|
/** Disable pull-to-refresh */
|
|
11
10
|
disabled?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
/** Custom
|
|
17
|
-
|
|
18
|
-
/** Custom
|
|
19
|
-
|
|
20
|
-
/** Additional class
|
|
11
|
+
/** Custom content shown while pulling */
|
|
12
|
+
pullingContent?: React.ReactNode;
|
|
13
|
+
/** Custom content shown when ready to release */
|
|
14
|
+
releaseContent?: React.ReactNode;
|
|
15
|
+
/** Custom content shown while refreshing */
|
|
16
|
+
refreshingContent?: React.ReactNode;
|
|
17
|
+
/** Custom content shown when refresh completes (briefly) */
|
|
18
|
+
completeContent?: React.ReactNode;
|
|
19
|
+
/** Additional class name for container */
|
|
21
20
|
className?: string;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
|
-
* PullToRefresh -
|
|
25
|
-
*
|
|
26
|
-
* Wraps content and provides native-feeling pull-to-refresh functionality.
|
|
27
|
-
* Only activates when scrolled to top of content.
|
|
28
|
-
*
|
|
29
|
-
* @example Basic usage
|
|
30
|
-
* ```tsx
|
|
31
|
-
* <PullToRefresh onRefresh={async () => {
|
|
32
|
-
* await fetchLatestData();
|
|
33
|
-
* }}>
|
|
34
|
-
* <div className="min-h-screen">
|
|
35
|
-
* {content}
|
|
36
|
-
* </div>
|
|
37
|
-
* </PullToRefresh>
|
|
38
|
-
* ```
|
|
23
|
+
* PullToRefresh - Pull-down refresh indicator and handler for mobile lists
|
|
39
24
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* pullThreshold={100}
|
|
45
|
-
* maxPull={150}
|
|
46
|
-
* >
|
|
47
|
-
* {content}
|
|
48
|
-
* </PullToRefresh>
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export default function PullToRefresh({ children, onRefresh, disabled, pullThreshold, maxPull, loadingIndicator, pullIndicator, className, }: PullToRefreshProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
/**
|
|
53
|
-
* usePullToRefresh - Hook for custom pull-to-refresh implementations
|
|
25
|
+
* Wraps content to enable pull-to-refresh behavior on mobile:
|
|
26
|
+
* - Pull down to trigger refresh
|
|
27
|
+
* - Visual feedback showing progress
|
|
28
|
+
* - Custom content for each state
|
|
54
29
|
*
|
|
55
30
|
* @example
|
|
56
31
|
* ```tsx
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* }
|
|
61
|
-
* });
|
|
62
|
-
*
|
|
63
|
-
* return (
|
|
64
|
-
* <div {...bind}>
|
|
65
|
-
* {isRefreshing && <Spinner />}
|
|
66
|
-
* {content}
|
|
67
|
-
* </div>
|
|
68
|
-
* );
|
|
32
|
+
* <PullToRefresh onRefresh={async () => { await syncData(); }}>
|
|
33
|
+
* <TransactionList transactions={transactions} />
|
|
34
|
+
* </PullToRefresh>
|
|
69
35
|
* ```
|
|
70
36
|
*/
|
|
71
|
-
export declare function
|
|
72
|
-
|
|
73
|
-
pullThreshold?: number;
|
|
74
|
-
maxPull?: number;
|
|
75
|
-
disabled?: boolean;
|
|
76
|
-
}): {
|
|
77
|
-
pullDistance: number;
|
|
78
|
-
isRefreshing: boolean;
|
|
79
|
-
isReady: boolean;
|
|
80
|
-
progress: number;
|
|
81
|
-
bind: {
|
|
82
|
-
onTouchStart: (e: React.TouchEvent) => void;
|
|
83
|
-
onTouchMove: (e: React.TouchEvent) => void;
|
|
84
|
-
onTouchEnd: () => Promise<void>;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
37
|
+
export declare function PullToRefresh({ children, onRefresh, threshold, disabled, pullingContent, releaseContent, refreshingContent, completeContent, className, }: PullToRefreshProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export default PullToRefresh;
|
|
87
39
|
//# sourceMappingURL=PullToRefresh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PullToRefresh.d.ts","sourceRoot":"","sources":["../../src/components/PullToRefresh.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE
|
|
1
|
+
{"version":3,"file":"PullToRefresh.d.ts","sourceRoot":"","sources":["../../src/components/PullToRefresh.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wFAAwF;IACxF,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,iDAAiD;IACjD,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,4DAA4D;IAC5D,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,SAAc,EACd,QAAgB,EAChB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,SAAc,GACf,EAAE,kBAAkB,2CA0MpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type SpacingValue = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
|
+
type SpacingValue = 'none' | 'tight' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
3
|
export interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/** Content to stack */
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -25,6 +25,7 @@ export interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
*
|
|
26
26
|
* Spacing scale (use either `spacing` or `gap` prop - they're aliases):
|
|
27
27
|
* - none: 0
|
|
28
|
+
* - tight: 0.25rem (1) - for mobile-density layouts
|
|
28
29
|
* - xs: 0.5rem (2)
|
|
29
30
|
* - sm: 0.75rem (3)
|
|
30
31
|
* - md: 1.5rem (6)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/components/Stack.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,KAAK,YAAY,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/components/Stack.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,KAAK,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExE,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yBAAyB;IACzB,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACtC,yCAAyC;IACzC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,yBAAyB;IACzB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IAC/C,sBAAsB;IACtB,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC5D,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,KAAK,mFAmEhB,CAAC;AAIH,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SwipeAction {
|
|
3
|
+
/** Icon to display in action area */
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
/** Background color variant */
|
|
6
|
+
color: 'success' | 'error' | 'warning' | 'neutral' | 'primary';
|
|
7
|
+
/** Label for accessibility */
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SwipeableCardProps {
|
|
11
|
+
/** Card content */
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
/** Handler called when swiped right past threshold */
|
|
14
|
+
onSwipeRight?: () => void;
|
|
15
|
+
/** Handler called when swiped left past threshold */
|
|
16
|
+
onSwipeLeft?: () => void;
|
|
17
|
+
/** Right swipe action configuration */
|
|
18
|
+
rightAction?: SwipeAction;
|
|
19
|
+
/** Left swipe action configuration */
|
|
20
|
+
leftAction?: SwipeAction;
|
|
21
|
+
/** Pixels of swipe before action triggers */
|
|
22
|
+
swipeThreshold?: number;
|
|
23
|
+
/** Enable haptic feedback on mobile (if supported) */
|
|
24
|
+
hapticFeedback?: boolean;
|
|
25
|
+
/** Disable swipe interactions */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Callback when swipe starts */
|
|
28
|
+
onSwipeStart?: () => void;
|
|
29
|
+
/** Callback when swipe ends (regardless of trigger) */
|
|
30
|
+
onSwipeEnd?: () => void;
|
|
31
|
+
/** Additional class name */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* SwipeableCard - Card component with swipe-to-action functionality
|
|
36
|
+
*
|
|
37
|
+
* Designed for mobile approval workflows:
|
|
38
|
+
* - Swipe right to approve/confirm
|
|
39
|
+
* - Swipe left to see options/alternatives
|
|
40
|
+
* - Visual feedback showing action being revealed
|
|
41
|
+
* - Haptic feedback on mobile devices
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <SwipeableCard
|
|
46
|
+
* onSwipeRight={() => handleApprove()}
|
|
47
|
+
* onSwipeLeft={() => handleShowOptions()}
|
|
48
|
+
* rightAction={{
|
|
49
|
+
* icon: <Check />,
|
|
50
|
+
* color: 'success',
|
|
51
|
+
* label: 'Approve'
|
|
52
|
+
* }}
|
|
53
|
+
* leftAction={{
|
|
54
|
+
* icon: <MoreHorizontal />,
|
|
55
|
+
* color: 'neutral',
|
|
56
|
+
* label: 'Options'
|
|
57
|
+
* }}
|
|
58
|
+
* >
|
|
59
|
+
* <TransactionContent />
|
|
60
|
+
* </SwipeableCard>
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function SwipeableCard({ children, onSwipeRight, onSwipeLeft, rightAction, leftAction, swipeThreshold, hapticFeedback, disabled, onSwipeStart, onSwipeEnd, className, }: SwipeableCardProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export default SwipeableCard;
|
|
65
|
+
//# sourceMappingURL=SwipeableCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwipeableCard.d.ts","sourceRoot":"","sources":["../../src/components/SwipeableCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,+BAA+B;IAC/B,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAC/D,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,mBAAmB;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,uCAAuC;IACvC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sCAAsC;IACtC,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,WAIC,EACD,UAIC,EACD,cAAoB,EACpB,cAAqB,EACrB,QAAgB,EAChB,YAAY,EACZ,UAAU,EACV,SAAc,GACf,EAAE,kBAAkB,2CAkQpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type TextElement = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label';
|
|
3
|
+
type TextSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl';
|
|
3
4
|
export interface TextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'> {
|
|
4
5
|
/** Text content */
|
|
5
6
|
children: React.ReactNode;
|
|
6
7
|
/** HTML element to render */
|
|
7
8
|
as?: TextElement;
|
|
8
|
-
/** Size variant */
|
|
9
|
-
size?:
|
|
9
|
+
/** Size variant (base size) */
|
|
10
|
+
size?: TextSize;
|
|
11
|
+
/** Size on small screens (640px+) - overrides base size */
|
|
12
|
+
smSize?: TextSize;
|
|
13
|
+
/** Size on medium screens (768px+) - overrides smaller breakpoints */
|
|
14
|
+
mdSize?: TextSize;
|
|
15
|
+
/** Size on large screens (1024px+) - overrides smaller breakpoints */
|
|
16
|
+
lgSize?: TextSize;
|
|
10
17
|
/** Weight variant */
|
|
11
18
|
weight?: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
12
19
|
/** Color variant */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,KAAK,WAAW,GAAG,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;AAE5F,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACjF,mBAAmB;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,6BAA6B;IAC7B,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,KAAK,WAAW,GAAG,GAAG,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;AAE5F,KAAK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{ default as ContextMenu } from './ContextMenu';
|
|
|
122
122
|
export type { ContextMenuProps } from './ContextMenu';
|
|
123
123
|
export { default as ErrorBoundary } from './ErrorBoundary';
|
|
124
124
|
export type { ErrorBoundaryProps } from './ErrorBoundary';
|
|
125
|
-
export { default as BottomSheet } from './BottomSheet';
|
|
126
|
-
export type { BottomSheetProps } from './BottomSheet';
|
|
125
|
+
export { default as BottomSheet, BottomSheetHeader, BottomSheetContent, BottomSheetActions } from './BottomSheet';
|
|
126
|
+
export type { BottomSheetProps, BottomSheetHeaderProps, BottomSheetContentProps, BottomSheetActionsProps } from './BottomSheet';
|
|
127
127
|
export { default as Collapsible } from './Collapsible';
|
|
128
128
|
export type { CollapsibleProps } from './Collapsible';
|
|
129
129
|
export { default as ExpandablePanel, ExpandablePanelSpacer, ExpandablePanelContainer } from './ExpandablePanel';
|
|
130
130
|
export type { ExpandablePanelProps } from './ExpandablePanel';
|
|
131
131
|
export { Show, Hide } from './ResponsiveUtilities';
|
|
132
|
+
export { default as HorizontalScroll } from './HorizontalScroll';
|
|
133
|
+
export type { HorizontalScrollProps } from './HorizontalScroll';
|
|
134
|
+
export { default as SwipeableCard } from './SwipeableCard';
|
|
135
|
+
export type { SwipeableCardProps, SwipeAction as SwipeableCardAction } from './SwipeableCard';
|
|
136
|
+
export { default as NotificationBanner } from './NotificationBanner';
|
|
137
|
+
export type { NotificationBannerProps, NotificationBannerAction } from './NotificationBanner';
|
|
138
|
+
export { default as CompactStat } from './CompactStat';
|
|
139
|
+
export type { CompactStatProps, CompactStatTrend } from './CompactStat';
|
|
132
140
|
export { default as Breadcrumbs, useBreadcrumbReset } from './Breadcrumbs';
|
|
133
141
|
export type { BreadcrumbsProps, BreadcrumbItem, BreadcrumbNavigationState } from './Breadcrumbs';
|
|
134
142
|
export { default as Tabs } from './Tabs';
|
|
@@ -165,7 +173,7 @@ export { default as MobileHeader, MobileHeaderSpacer } from './MobileHeader';
|
|
|
165
173
|
export type { MobileHeaderProps } from './MobileHeader';
|
|
166
174
|
export { default as FloatingActionButton, useFABScroll } from './FloatingActionButton';
|
|
167
175
|
export type { FloatingActionButtonProps, FABAction } from './FloatingActionButton';
|
|
168
|
-
export { default as PullToRefresh
|
|
176
|
+
export { default as PullToRefresh } from './PullToRefresh';
|
|
169
177
|
export type { PullToRefreshProps } from './PullToRefresh';
|
|
170
178
|
export { default as Logo } from './Logo';
|
|
171
179
|
export type { LogoProps } from './Logo';
|