jfs-components 0.0.73 → 0.0.74
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/CHANGELOG.md +23 -6
- package/lib/commonjs/components/AccountCard/AccountCard.js +247 -0
- package/lib/commonjs/components/AppBar/AppBar.js +17 -11
- package/lib/commonjs/components/CardBankAccount/CardBankAccount.js +18 -2
- package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +40 -25
- package/lib/commonjs/components/Dropdown/Dropdown.js +214 -0
- package/lib/commonjs/components/DropdownInput/DropdownInput.js +542 -0
- package/lib/commonjs/components/FormField/FormField.js +328 -178
- package/lib/commonjs/components/LottieIntroBlock/LottieIntroBlock.js +150 -0
- package/lib/commonjs/components/PageHero/PageHero.js +153 -0
- package/lib/commonjs/components/PoweredByLabel/PoweredByLabel.js +135 -0
- package/lib/commonjs/components/PoweredByLabel/finvu.png +0 -0
- package/lib/commonjs/components/Text/Text.js +9 -2
- package/lib/commonjs/components/Tooltip/Tooltip.js +34 -27
- package/lib/commonjs/components/index.js +60 -0
- package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/AccountCard/AccountCard.js +241 -0
- package/lib/module/components/AppBar/AppBar.js +17 -11
- package/lib/module/components/CardBankAccount/CardBankAccount.js +17 -2
- package/lib/module/components/CheckboxItem/CheckboxItem.js +41 -26
- package/lib/module/components/Dropdown/Dropdown.js +206 -0
- package/lib/module/components/DropdownInput/DropdownInput.js +536 -0
- package/lib/module/components/FormField/FormField.js +330 -180
- package/lib/module/components/LottieIntroBlock/LottieIntroBlock.js +144 -0
- package/lib/module/components/PageHero/PageHero.js +147 -0
- package/lib/module/components/PoweredByLabel/PoweredByLabel.js +130 -0
- package/lib/module/components/PoweredByLabel/finvu.png +0 -0
- package/lib/module/components/Text/Text.js +9 -2
- package/lib/module/components/Tooltip/Tooltip.js +34 -27
- package/lib/module/components/index.js +7 -1
- package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/components/AccountCard/AccountCard.d.ts +81 -0
- package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +9 -2
- package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +18 -2
- package/lib/typescript/src/components/Dropdown/Dropdown.d.ts +62 -0
- package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +107 -0
- package/lib/typescript/src/components/FormField/FormField.d.ts +76 -19
- package/lib/typescript/src/components/LottieIntroBlock/LottieIntroBlock.d.ts +58 -0
- package/lib/typescript/src/components/PageHero/PageHero.d.ts +53 -0
- package/lib/typescript/src/components/PoweredByLabel/PoweredByLabel.d.ts +70 -0
- package/lib/typescript/src/components/Text/Text.d.ts +12 -2
- package/lib/typescript/src/components/Tooltip/Tooltip.d.ts +13 -2
- package/lib/typescript/src/components/index.d.ts +7 -1
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -3
- package/src/components/AccountCard/AccountCard.tsx +376 -0
- package/src/components/AppBar/AppBar.tsx +25 -14
- package/src/components/CardBankAccount/CardBankAccount.tsx +29 -3
- package/src/components/CheckboxItem/CheckboxItem.tsx +65 -30
- package/src/components/Dropdown/Dropdown.tsx +331 -0
- package/src/components/DropdownInput/DropdownInput.tsx +819 -0
- package/src/components/FormField/FormField.tsx +542 -215
- package/src/components/LottieIntroBlock/LottieIntroBlock.tsx +202 -0
- package/src/components/PageHero/PageHero.tsx +200 -0
- package/src/components/PoweredByLabel/PoweredByLabel.tsx +221 -0
- package/src/components/PoweredByLabel/finvu.png +0 -0
- package/src/components/Text/Text.tsx +24 -3
- package/src/components/Tooltip/Tooltip.tsx +50 -25
- package/src/components/index.ts +15 -1
- package/src/design-tokens/Coin Variables-variables-full.json +1 -1
- package/src/icons/registry.ts +1 -1
|
@@ -238,9 +238,25 @@ export function TooltipTrigger({ children, asChild, ...props }: TooltipTriggerPr
|
|
|
238
238
|
export type TooltipContentProps = {
|
|
239
239
|
children: ReactNode
|
|
240
240
|
sideOffset?: number
|
|
241
|
+
/**
|
|
242
|
+
* Vertical spacing between slot children, in pixels.
|
|
243
|
+
* The content area acts as a vertical slot: any children passed in
|
|
244
|
+
* (text, icons, custom views, etc.) are stacked top-to-bottom with this gap.
|
|
245
|
+
*/
|
|
246
|
+
gap?: number
|
|
247
|
+
/**
|
|
248
|
+
* Cross-axis alignment of slot children.
|
|
249
|
+
* Defaults to `flex-start` so multi-line/multi-element content lines up on the left.
|
|
250
|
+
*/
|
|
251
|
+
alignItems?: ViewStyle['alignItems']
|
|
241
252
|
}
|
|
242
253
|
|
|
243
|
-
export function TooltipContent({
|
|
254
|
+
export function TooltipContent({
|
|
255
|
+
children,
|
|
256
|
+
sideOffset = 4,
|
|
257
|
+
gap = 4,
|
|
258
|
+
alignItems = 'flex-start',
|
|
259
|
+
}: TooltipContentProps) {
|
|
244
260
|
const { isVisible, hide, triggerRect, setContentSize, contentSize, modes, placement: preferredPlacement } = useTooltipContext()
|
|
245
261
|
const insets = useSafeAreaInsets()
|
|
246
262
|
const { width: windowWidth, height: windowHeight } = Dimensions.get('window')
|
|
@@ -467,6 +483,37 @@ export function TooltipContent({ children, sideOffset = 4 }: TooltipContentProps
|
|
|
467
483
|
paddingVertical: paddingV,
|
|
468
484
|
}
|
|
469
485
|
|
|
486
|
+
// Vertical slot wrapper: stack arbitrary children top-to-bottom with a gap.
|
|
487
|
+
// Raw <Text> children still get auto-styled with the tooltip label tokens
|
|
488
|
+
// so the simple <TooltipContent><Text>label</Text></TooltipContent> usage
|
|
489
|
+
// keeps working without any changes.
|
|
490
|
+
const slotStyle: ViewStyle = {
|
|
491
|
+
flexDirection: 'column',
|
|
492
|
+
alignItems,
|
|
493
|
+
gap,
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
const renderSlotChildren = () => {
|
|
497
|
+
if (typeof children === 'string') {
|
|
498
|
+
return <Text style={textStyle}>{children}</Text>
|
|
499
|
+
}
|
|
500
|
+
return (
|
|
501
|
+
<View style={slotStyle}>
|
|
502
|
+
{React.Children.map(children, (child) => {
|
|
503
|
+
if (
|
|
504
|
+
React.isValidElement(child) &&
|
|
505
|
+
(child.type === Text || (child.type as any).displayName === 'Text')
|
|
506
|
+
) {
|
|
507
|
+
return React.cloneElement(child, {
|
|
508
|
+
style: [textStyle, (child.props as any).style],
|
|
509
|
+
} as any)
|
|
510
|
+
}
|
|
511
|
+
return child
|
|
512
|
+
})}
|
|
513
|
+
</View>
|
|
514
|
+
)
|
|
515
|
+
}
|
|
516
|
+
|
|
470
517
|
if (!hasMeasured) {
|
|
471
518
|
return (
|
|
472
519
|
<Modal transparent visible={isVisible} animationType="fade">
|
|
@@ -475,18 +522,7 @@ export function TooltipContent({ children, sideOffset = 4 }: TooltipContentProps
|
|
|
475
522
|
style={measureStyle}
|
|
476
523
|
onLayout={(e) => setContentSize(e.nativeEvent.layout)}
|
|
477
524
|
>
|
|
478
|
-
{
|
|
479
|
-
<Text style={textStyle}>{children}</Text>
|
|
480
|
-
) : (
|
|
481
|
-
<View>
|
|
482
|
-
{React.Children.map(children, child => {
|
|
483
|
-
if (React.isValidElement(child) && (child.type === Text || (child.type as any).displayName === 'Text')) {
|
|
484
|
-
return React.cloneElement(child, { style: [textStyle, (child.props as any).style] } as any)
|
|
485
|
-
}
|
|
486
|
-
return child
|
|
487
|
-
})}
|
|
488
|
-
</View>
|
|
489
|
-
)}
|
|
525
|
+
{renderSlotChildren()}
|
|
490
526
|
</View>
|
|
491
527
|
</View>
|
|
492
528
|
</Modal>
|
|
@@ -519,18 +555,7 @@ export function TooltipContent({ children, sideOffset = 4 }: TooltipContentProps
|
|
|
519
555
|
}
|
|
520
556
|
]}
|
|
521
557
|
>
|
|
522
|
-
{
|
|
523
|
-
<Text style={textStyle}>{children}</Text>
|
|
524
|
-
) : (
|
|
525
|
-
<View>
|
|
526
|
-
{React.Children.map(children, child => {
|
|
527
|
-
if (React.isValidElement(child) && (child.type === Text || (child.type as any).displayName === 'Text')) {
|
|
528
|
-
return React.cloneElement(child, { style: [textStyle, (child.props as any).style] } as any)
|
|
529
|
-
}
|
|
530
|
-
return child
|
|
531
|
-
})}
|
|
532
|
-
</View>
|
|
533
|
-
)}
|
|
558
|
+
{renderSlotChildren()}
|
|
534
559
|
|
|
535
560
|
{/* Arrow */}
|
|
536
561
|
{/* Render different arrow based on axis to avoid rotation gap issues */}
|
package/src/components/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { default as AccountCard, type AccountCardProps, type AccountCardState } from './AccountCard/AccountCard';
|
|
1
2
|
export { default as ActionFooter, type ActionFooterProps } from './ActionFooter/ActionFooter';
|
|
2
3
|
export { default as AppBar } from './AppBar/AppBar';
|
|
3
4
|
export { default as Avatar, type AvatarProps } from './Avatar/Avatar';
|
|
@@ -21,6 +22,8 @@ export { default as CardInsight, type CardInsightProps } from './CardInsight/Car
|
|
|
21
22
|
export { default as Disclaimer } from './Disclaimer/Disclaimer';
|
|
22
23
|
export { default as Divider, type DividerProps, type DividerDirection } from './Divider/Divider';
|
|
23
24
|
export { default as Drawer } from './Drawer/Drawer';
|
|
25
|
+
export { default as Dropdown, DropdownItem, type DropdownProps, type DropdownItemProps } from './Dropdown/Dropdown';
|
|
26
|
+
export { default as DropdownInput, type DropdownInputProps, type DropdownInputOption, type DropdownInputOptionValue } from './DropdownInput/DropdownInput';
|
|
24
27
|
export { default as CardCTA, type CardCTAProps, type CardCTAType } from './CardCTA/CardCTA'
|
|
25
28
|
export { default as DebitCard, type DebitCardProps } from './DebitCard/DebitCard';
|
|
26
29
|
export { default as FilterBar } from './FilterBar/FilterBar';
|
|
@@ -43,6 +46,7 @@ export { default as LazyList } from './LazyList/LazyList';
|
|
|
43
46
|
export { default as LinearMeter, type LinearMeterProps } from './LinearMeter/LinearMeter';
|
|
44
47
|
export { default as LinearProgress, type LinearProgressProps } from './LinearProgress/LinearProgress';
|
|
45
48
|
export { default as ListGroup } from './ListGroup/ListGroup';
|
|
49
|
+
export { default as LottieIntroBlock, type LottieIntroBlockProps } from './LottieIntroBlock/LottieIntroBlock';
|
|
46
50
|
export { default as ListItem } from './ListItem/ListItem';
|
|
47
51
|
export { default as MediaCard, type MediaCardProps } from './MediaCard/MediaCard';
|
|
48
52
|
export { default as MerchantProfile, type MerchantProfileProps } from './MerchantProfile/MerchantProfile';
|
|
@@ -61,7 +65,15 @@ export { StepLabel } from './Stepper/StepLabel';
|
|
|
61
65
|
export { default as TextInput } from './TextInput/TextInput';
|
|
62
66
|
export { default as StatusHero, type StatusHeroProps } from './StatusHero/StatusHero';
|
|
63
67
|
export { default as ThreadHero, type ThreadHeroProps } from './ThreadHero/ThreadHero';
|
|
64
|
-
export {
|
|
68
|
+
export {
|
|
69
|
+
Tooltip,
|
|
70
|
+
TooltipTrigger,
|
|
71
|
+
TooltipContent,
|
|
72
|
+
type TooltipProps,
|
|
73
|
+
type TooltipTriggerProps,
|
|
74
|
+
type TooltipContentProps,
|
|
75
|
+
type Placement as TooltipPlacement,
|
|
76
|
+
} from './Tooltip/Tooltip';
|
|
65
77
|
|
|
66
78
|
export { default as TransactionDetails } from './TransactionDetails/TransactionDetails';
|
|
67
79
|
export { default as TransactionStatus } from './TransactionStatus/TransactionStatus';
|
|
@@ -99,8 +111,10 @@ export { default as Toast, type ToastProps } from './Toast/Toast';
|
|
|
99
111
|
export { default as ToastProvider, type ToastProviderProps } from './Toast/ToastProvider';
|
|
100
112
|
export { useToast, addToast, closeToast, closeAll, type ToastOptions, type ToastEntry, type ToastPlacement } from './Toast/useToast';
|
|
101
113
|
export { default as AmountInput, type AmountInputProps } from './AmountInput/AmountInput';
|
|
114
|
+
export { default as PageHero, type PageHeroProps } from './PageHero/PageHero';
|
|
102
115
|
export { default as Popup, type PopupProps, type PopupRef } from './Popup/Popup';
|
|
103
116
|
export { default as PortfolioHero, type PortfolioHeroProps } from './PortfolioHero/PortfolioHero';
|
|
117
|
+
export { default as PoweredByLabel, type PoweredByLabelProps } from './PoweredByLabel/PoweredByLabel';
|
|
104
118
|
export { default as ProductLabel, type ProductLabelProps } from './ProductLabel/ProductLabel';
|
|
105
119
|
export { default as ProductOverview, type ProductOverviewProps, type ProductOverviewStat } from './ProductOverview/ProductOverview';
|
|
106
120
|
export { default as ProgressBadge, type ProgressBadgeProps } from './ProgressBadge/ProgressBadge';
|