@utilitywarehouse/hearth-react-native 0.6.0 → 0.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/.storybook/main.ts +12 -6
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-lint.log +1 -1
- package/CHANGELOG.md +18 -0
- package/build/components/Banner/Banner.d.ts +6 -0
- package/build/components/Banner/Banner.js +161 -0
- package/build/components/Banner/Banner.props.d.ts +82 -0
- package/build/components/Banner/Banner.props.js +1 -0
- package/build/components/Banner/index.d.ts +2 -0
- package/build/components/Banner/index.js +1 -0
- package/build/components/BottomSheet/BottomSheetBackdrop.js +1 -5
- package/build/components/BottomSheet/BottomSheetFlatList.js +1 -5
- package/build/components/BottomSheet/BottomSheetHandle.js +1 -5
- package/build/components/BottomSheet/useBottomSheetLogic.d.ts +1 -1
- package/build/components/Button/ButtonIcon.js +2 -1
- package/build/components/Button/ButtonRoot.js +2 -6
- package/build/components/Button/ButtonText.js +4 -1
- package/build/components/Card/Card.context.d.ts +7 -0
- package/build/components/Card/CardAction/CardAction.context.d.ts +9 -0
- package/build/components/Card/{CardAction.context.js → CardAction/CardAction.context.js} +7 -1
- package/build/components/Card/CardAction/CardAction.d.ts +18 -0
- package/build/components/Card/CardAction/CardAction.js +7 -0
- package/build/components/Card/CardAction/CardAction.props.d.ts +63 -0
- package/build/components/Card/CardAction/CardAction.props.js +1 -0
- package/build/components/Card/CardAction/CardActionContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionContent.js +13 -0
- package/build/components/Card/CardAction/CardActionHelperText.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionHelperText.js +13 -0
- package/build/components/Card/CardAction/CardActionIcon.d.ts +9 -0
- package/build/components/Card/CardAction/CardActionIcon.js +19 -0
- package/build/components/Card/CardAction/CardActionLeadingContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionLeadingContent.js +5 -0
- package/build/components/Card/CardAction/CardActionRoot.d.ts +12 -0
- package/build/components/Card/CardAction/CardActionRoot.js +155 -0
- package/build/components/Card/CardAction/CardActionText.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionText.js +9 -0
- package/build/components/Card/CardAction/CardActionTrailingContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionTrailingContent.js +5 -0
- package/build/components/Card/CardAction/CardActionTrailingIcon.d.ts +9 -0
- package/build/components/Card/CardAction/CardActionTrailingIcon.js +19 -0
- package/build/components/Card/CardAction/index.d.ts +10 -0
- package/build/components/Card/CardAction/index.js +9 -0
- package/build/components/Card/CardContent.d.ts +6 -0
- package/build/components/Card/CardContent.js +33 -0
- package/build/components/Card/CardPressHandler.context.d.ts +6 -0
- package/build/components/Card/CardPressHandler.context.js +6 -0
- package/build/components/Card/{CardAction.d.ts → CardPressHandler.d.ts} +3 -3
- package/build/components/Card/CardPressHandler.js +13 -0
- package/build/components/Card/CardRoot.js +103 -11
- package/build/components/Card/index.d.ts +3 -2
- package/build/components/Card/index.js +3 -2
- package/build/components/Checkbox/CheckboxIcon.js +2 -1
- package/build/components/Container/Container.js +3 -3
- package/build/components/CurrencyInput/CurrencyInput.js +1 -1
- package/build/components/Expandable/Expandable.d.ts +6 -0
- package/build/components/Expandable/Expandable.js +44 -0
- package/build/components/Expandable/Expandable.props.d.ts +38 -0
- package/build/components/Expandable/Expandable.props.js +1 -0
- package/build/components/Expandable/index.d.ts +2 -0
- package/build/components/Expandable/index.js +1 -0
- package/build/components/ExpandableCard/ExpandableCard.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCard.js +23 -0
- package/build/components/ExpandableCard/ExpandableCard.props.d.ts +69 -0
- package/build/components/ExpandableCard/ExpandableCard.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardContent.js +14 -0
- package/build/components/ExpandableCard/ExpandableCardExpandedContent.d.ts +11 -0
- package/build/components/ExpandableCard/ExpandableCardExpandedContent.js +18 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.js +17 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.props.d.ts +25 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardHelperText.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardHelperText.js +13 -0
- package/build/components/ExpandableCard/ExpandableCardIcon.d.ts +9 -0
- package/build/components/ExpandableCard/ExpandableCardIcon.js +19 -0
- package/build/components/ExpandableCard/ExpandableCardLeadingContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardLeadingContent.js +5 -0
- package/build/components/ExpandableCard/ExpandableCardText.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardText.js +7 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingContent.js +5 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingIcon.d.ts +9 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingIcon.js +17 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.d.ts +17 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.js +7 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.props.d.ts +44 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardTriggerRoot.d.ts +11 -0
- package/build/components/ExpandableCard/ExpandableCardTriggerRoot.js +91 -0
- package/build/components/ExpandableCard/index.d.ts +14 -0
- package/build/components/ExpandableCard/index.js +11 -0
- package/build/components/Helper/HelperIcon.js +2 -1
- package/build/components/HighlightBanner/HighlightBanner.d.ts +6 -0
- package/build/components/HighlightBanner/HighlightBanner.js +86 -0
- package/build/components/HighlightBanner/HighlightBanner.props.d.ts +14 -0
- package/build/components/HighlightBanner/HighlightBanner.props.js +1 -0
- package/build/components/HighlightBanner/index.d.ts +2 -0
- package/build/components/HighlightBanner/index.js +1 -0
- package/build/components/Icon/Icon.d.ts +2 -6
- package/build/components/IconButton/IconButtonIcon.js +2 -1
- package/build/components/IconContainer/IconContainer.d.ts +4 -3
- package/build/components/IconContainer/IconContainer.js +3 -3
- package/build/components/Input/InputField.js +4 -2
- package/build/components/Input/InputIcon.js +2 -1
- package/build/components/Link/LinkIcon.js +3 -2
- package/build/components/List/ListAction/ListActionTrailingIcon.js +2 -1
- package/build/components/List/ListItem/ListItemIcon.js +2 -1
- package/build/components/List/ListItem/ListItemTrailingIcon.js +2 -3
- package/build/components/Radio/RadioIcon.js +7 -2
- package/build/components/RadioCard/RadioCardIcon.js +3 -2
- package/build/components/Spinner/Spinner.web.d.ts +2 -1
- package/build/components/Switch/Switch.js +5 -3
- package/build/components/Textarea/TextareaField.js +1 -1
- package/build/components/ToggleButton/ToggleButtonIcon.js +2 -1
- package/build/components/ToggleButton/ToggleButtonRoot.js +2 -2
- package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.js +2 -1
- package/build/components/index.d.ts +5 -1
- package/build/components/index.js +5 -1
- package/build/core/index.d.ts +3 -3
- package/build/core/index.js +3 -3
- package/build/core/themes.d.ts +24 -12
- package/build/hooks/useColorMode.d.ts +1 -1
- package/build/hooks/useColorMode.js +7 -8
- package/build/tokens/components/dark/banner.d.ts +19 -0
- package/build/tokens/components/dark/banner.js +19 -0
- package/build/tokens/components/dark/card-action.d.ts +11 -0
- package/build/tokens/components/dark/card-action.js +10 -0
- package/build/tokens/components/dark/card-content.d.ts +25 -0
- package/build/tokens/components/dark/card-content.js +24 -0
- package/build/tokens/components/dark/drawer.d.ts +29 -0
- package/build/tokens/components/dark/drawer.js +28 -0
- package/build/tokens/components/dark/illustrations.d.ts +0 -1
- package/build/tokens/components/dark/illustrations.js +0 -1
- package/build/tokens/components/dark/index.d.ts +3 -0
- package/build/tokens/components/dark/index.js +3 -0
- package/build/tokens/components/light/banner.d.ts +19 -0
- package/build/tokens/components/light/banner.js +19 -0
- package/build/tokens/components/light/card-action.d.ts +11 -0
- package/build/tokens/components/light/card-action.js +10 -0
- package/build/tokens/components/light/card-content.d.ts +25 -0
- package/build/tokens/components/light/card-content.js +24 -0
- package/build/tokens/components/light/drawer.d.ts +29 -0
- package/build/tokens/components/light/drawer.js +28 -0
- package/build/tokens/components/light/illustrations.d.ts +0 -1
- package/build/tokens/components/light/illustrations.js +0 -1
- package/build/tokens/components/light/index.d.ts +3 -0
- package/build/tokens/components/light/index.js +3 -0
- package/build/tokens/layout.d.ts +6 -6
- package/build/tokens/layout.js +3 -3
- package/build/tokens/typography.d.ts +6 -0
- package/build/tokens/typography.js +3 -0
- package/docs/components/AllComponents.web.tsx +75 -4
- package/docs/components/NextPrevPage.tsx +5 -5
- package/docs/components/VariantTitle.tsx +17 -7
- package/package.json +16 -14
- package/src/components/Banner/Banner.docs.mdx +402 -0
- package/src/components/Banner/Banner.props.ts +106 -0
- package/src/components/Banner/Banner.stories.tsx +494 -0
- package/src/components/Banner/Banner.tsx +264 -0
- package/src/components/Banner/index.ts +2 -0
- package/src/components/BottomSheet/BottomSheetBackdrop.tsx +1 -2
- package/src/components/BottomSheet/BottomSheetFlatList.tsx +1 -3
- package/src/components/BottomSheet/BottomSheetHandle.tsx +0 -1
- package/src/components/Button/ButtonIcon.tsx +2 -1
- package/src/components/Button/ButtonRoot.tsx +2 -6
- package/src/components/Button/ButtonText.tsx +4 -1
- package/src/components/Card/Card.context.ts +7 -0
- package/src/components/Card/Card.docs.mdx +221 -15
- package/src/components/Card/Card.stories.tsx +50 -3
- package/src/components/Card/CardAction/CardAction.context.ts +22 -0
- package/src/components/Card/CardAction/CardAction.props.ts +87 -0
- package/src/components/Card/CardAction/CardAction.stories.tsx +265 -0
- package/src/components/Card/CardAction/CardAction.tsx +10 -0
- package/src/components/Card/CardAction/CardActionContent.tsx +20 -0
- package/src/components/Card/CardAction/CardActionHelperText.tsx +21 -0
- package/src/components/Card/CardAction/CardActionIcon.tsx +32 -0
- package/src/components/Card/CardAction/CardActionLeadingContent.tsx +9 -0
- package/src/components/Card/CardAction/CardActionRoot.tsx +258 -0
- package/src/components/Card/CardAction/CardActionText.tsx +17 -0
- package/src/components/Card/CardAction/CardActionTrailingContent.tsx +9 -0
- package/src/components/Card/CardAction/CardActionTrailingIcon.tsx +32 -0
- package/src/components/Card/CardAction/index.ts +10 -0
- package/src/components/Card/CardContent.tsx +40 -0
- package/src/components/Card/CardPressHandler.context.ts +12 -0
- package/src/components/Card/CardPressHandler.tsx +20 -0
- package/src/components/Card/CardRoot.tsx +128 -13
- package/src/components/Card/index.ts +3 -2
- package/src/components/Checkbox/CheckboxIcon.tsx +2 -1
- package/src/components/Container/Container.tsx +3 -3
- package/src/components/CurrencyInput/CurrencyInput.tsx +1 -1
- package/src/components/Expandable/Expandable.docs.mdx +201 -0
- package/src/components/Expandable/Expandable.props.ts +46 -0
- package/src/components/Expandable/Expandable.stories.tsx +284 -0
- package/src/components/Expandable/Expandable.tsx +92 -0
- package/src/components/Expandable/index.ts +2 -0
- package/src/components/ExpandableCard/ExpandableCard.docs.mdx +312 -0
- package/src/components/ExpandableCard/ExpandableCard.props.ts +85 -0
- package/src/components/ExpandableCard/ExpandableCard.stories.tsx +326 -0
- package/src/components/ExpandableCard/ExpandableCard.tsx +76 -0
- package/src/components/ExpandableCard/ExpandableCardContent.tsx +21 -0
- package/src/components/ExpandableCard/ExpandableCardExpandedContent.tsx +42 -0
- package/src/components/ExpandableCard/ExpandableCardGroup.props.ts +31 -0
- package/src/components/ExpandableCard/ExpandableCardGroup.tsx +40 -0
- package/src/components/ExpandableCard/ExpandableCardHelperText.tsx +21 -0
- package/src/components/ExpandableCard/ExpandableCardIcon.tsx +32 -0
- package/src/components/ExpandableCard/ExpandableCardLeadingContent.tsx +9 -0
- package/src/components/ExpandableCard/ExpandableCardText.tsx +14 -0
- package/src/components/ExpandableCard/ExpandableCardTrailingContent.tsx +9 -0
- package/src/components/ExpandableCard/ExpandableCardTrailingIcon.tsx +30 -0
- package/src/components/ExpandableCard/ExpandableCardTrigger.props.ts +47 -0
- package/src/components/ExpandableCard/ExpandableCardTrigger.tsx +10 -0
- package/src/components/ExpandableCard/ExpandableCardTriggerRoot.tsx +154 -0
- package/src/components/ExpandableCard/index.ts +14 -0
- package/src/components/Helper/HelperIcon.tsx +2 -1
- package/src/components/HighlightBanner/HighlightBanner.docs.mdx +277 -0
- package/src/components/HighlightBanner/HighlightBanner.props.ts +29 -0
- package/src/components/HighlightBanner/HighlightBanner.stories.tsx +259 -0
- package/src/components/HighlightBanner/HighlightBanner.tsx +122 -0
- package/src/components/HighlightBanner/index.ts +2 -0
- package/src/components/Icon/Icon.tsx +4 -3
- package/src/components/IconButton/IconButtonIcon.tsx +2 -1
- package/src/components/IconContainer/IconContainer.tsx +17 -19
- package/src/components/Input/InputField.tsx +2 -1
- package/src/components/Input/InputIcon.tsx +2 -1
- package/src/components/Link/LinkIcon.tsx +3 -2
- package/src/components/List/ListAction/ListActionTrailingIcon.tsx +2 -1
- package/src/components/List/ListItem/ListItemIcon.tsx +2 -1
- package/src/components/List/ListItem/ListItemTrailingIcon.tsx +2 -3
- package/src/components/Radio/RadioIcon.tsx +8 -3
- package/src/components/RadioCard/RadioCardIcon.tsx +4 -3
- package/src/components/Switch/Switch.tsx +10 -5
- package/src/components/Switch/Switch.web.tsx +1 -0
- package/src/components/Textarea/TextareaField.tsx +1 -1
- package/src/components/ToggleButton/ToggleButtonIcon.tsx +2 -1
- package/src/components/ToggleButton/ToggleButtonRoot.tsx +2 -2
- package/src/components/UnstyledIconButton/UnstyledIconButtonIcon.tsx +2 -1
- package/src/components/index.ts +5 -9
- package/src/core/index.ts +14 -11
- package/src/hooks/useColorMode.ts +9 -12
- package/src/tokens/components/dark/banner.ts +19 -0
- package/src/tokens/components/dark/card-action.ts +11 -0
- package/src/tokens/components/dark/card-content.ts +25 -0
- package/src/tokens/components/dark/drawer.ts +29 -0
- package/src/tokens/components/dark/illustrations.ts +0 -1
- package/src/tokens/components/dark/index.ts +3 -0
- package/src/tokens/components/light/banner.ts +19 -0
- package/src/tokens/components/light/card-action.ts +11 -0
- package/src/tokens/components/light/card-content.ts +25 -0
- package/src/tokens/components/light/drawer.ts +29 -0
- package/src/tokens/components/light/illustrations.ts +0 -1
- package/src/tokens/components/light/index.ts +3 -0
- package/src/tokens/layout.ts +3 -3
- package/src/tokens/typography.ts +3 -0
- package/build/components/Card/CardAction.context.d.ts +0 -6
- package/build/components/Card/CardAction.js +0 -13
- package/src/components/Card/CardAction.context.ts +0 -12
- package/src/components/Card/CardAction.tsx +0 -18
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ViewProps, ViewStyle } from 'react-native';
|
|
3
|
+
export interface ExpandableProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the content is expanded
|
|
6
|
+
*/
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Callback when expanded state changes
|
|
10
|
+
*/
|
|
11
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
12
|
+
/**
|
|
13
|
+
* The content to expand/collapse
|
|
14
|
+
*/
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Duration of the animation in milliseconds
|
|
18
|
+
* @default 200
|
|
19
|
+
*/
|
|
20
|
+
duration?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Additional style for the container
|
|
23
|
+
*/
|
|
24
|
+
style?: ViewStyle;
|
|
25
|
+
/**
|
|
26
|
+
* Accessibility label for screen readers
|
|
27
|
+
*/
|
|
28
|
+
accessibilityLabel?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Test ID for testing
|
|
31
|
+
*/
|
|
32
|
+
testID?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to animate opacity during expansion/collapse
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
animateOpacity?: boolean;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Expandable } from './Expandable';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type ExpandableCardProps from './ExpandableCard.props';
|
|
2
|
+
declare const ExpandableCard: {
|
|
3
|
+
({ expanded: controlledExpanded, onExpandedChange, heading, helperText, leadingIcon, leadingContent, badge, badgePosition, numericValue, expandedContent, duration, animateOpacity, disabled, testID, children, ...cardProps }: ExpandableCardProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default ExpandableCard;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Card } from '../Card';
|
|
4
|
+
import ExpandableCardExpandedContent from './ExpandableCardExpandedContent';
|
|
5
|
+
import ExpandableCardTrigger from './ExpandableCardTrigger';
|
|
6
|
+
const ExpandableCard = ({ expanded: controlledExpanded, onExpandedChange, heading, helperText, leadingIcon, leadingContent, badge, badgePosition = 'bottom', numericValue, expandedContent, duration = 200, animateOpacity = true, disabled = false, testID = 'expandable-card', children, ...cardProps }) => {
|
|
7
|
+
const [internalExpanded, setInternalExpanded] = useState(false);
|
|
8
|
+
// Use controlled or uncontrolled state
|
|
9
|
+
const isExpanded = controlledExpanded !== undefined ? controlledExpanded : internalExpanded;
|
|
10
|
+
const handlePress = () => {
|
|
11
|
+
if (disabled)
|
|
12
|
+
return;
|
|
13
|
+
const newExpanded = !isExpanded;
|
|
14
|
+
if (controlledExpanded === undefined) {
|
|
15
|
+
setInternalExpanded(newExpanded);
|
|
16
|
+
}
|
|
17
|
+
onExpandedChange?.(newExpanded);
|
|
18
|
+
};
|
|
19
|
+
const renderDefaultContent = () => (_jsxs(_Fragment, { children: [_jsx(ExpandableCardTrigger, { onPress: handlePress, disabled: disabled, heading: heading, helperText: helperText, leadingIcon: leadingIcon, leadingContent: leadingContent, badge: badge, badgePosition: badgePosition, numericValue: numericValue, isExpanded: isExpanded, testID: `${testID}-trigger` }), _jsx(ExpandableCardExpandedContent, { isExpanded: isExpanded, duration: duration, animateOpacity: animateOpacity, children: expandedContent })] }));
|
|
20
|
+
return (_jsx(Card, { noPadding: true, ...cardProps, testID: testID, children: children || renderDefaultContent() }));
|
|
21
|
+
};
|
|
22
|
+
ExpandableCard.displayName = 'ExpandableCard';
|
|
23
|
+
export default ExpandableCard;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import type BadgeProps from '../Badge/Badge.props';
|
|
3
|
+
import type CardProps from '../Card/Card.props';
|
|
4
|
+
export interface ExpandableCardProps extends Omit<CardProps, 'children'> {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the card is expanded
|
|
7
|
+
*/
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Callback when expanded state changes
|
|
11
|
+
*/
|
|
12
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
13
|
+
/**
|
|
14
|
+
* The heading text displayed in the trigger
|
|
15
|
+
*/
|
|
16
|
+
heading?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional helper text displayed below the heading
|
|
19
|
+
*/
|
|
20
|
+
helperText?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Leading icon component
|
|
23
|
+
*/
|
|
24
|
+
leadingIcon?: ComponentType;
|
|
25
|
+
/**
|
|
26
|
+
* Leading content (icon or custom element)
|
|
27
|
+
*/
|
|
28
|
+
leadingContent?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Badge to display
|
|
31
|
+
*/
|
|
32
|
+
badge?: BadgeProps;
|
|
33
|
+
/**
|
|
34
|
+
* Badge position
|
|
35
|
+
* @default 'bottom'
|
|
36
|
+
*/
|
|
37
|
+
badgePosition?: 'top' | 'bottom';
|
|
38
|
+
/**
|
|
39
|
+
* Numeric value to display on the right
|
|
40
|
+
*/
|
|
41
|
+
numericValue?: string | number;
|
|
42
|
+
/**
|
|
43
|
+
* The content to show when expanded
|
|
44
|
+
*/
|
|
45
|
+
expandedContent?: ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Duration of the expansion animation in milliseconds
|
|
48
|
+
* @default 200
|
|
49
|
+
*/
|
|
50
|
+
duration?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Whether to animate opacity during expansion
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
|
+
animateOpacity?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the card is disabled
|
|
58
|
+
*/
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Test ID for testing
|
|
62
|
+
*/
|
|
63
|
+
testID?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Custom children for advanced composition
|
|
66
|
+
*/
|
|
67
|
+
children?: ReactNode;
|
|
68
|
+
}
|
|
69
|
+
export default ExpandableCardProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
+
const ExpandableCardContent = ({ children, ...props }) => {
|
|
5
|
+
return (_jsx(View, { ...props, style: [styles.container, props.style], children: children }));
|
|
6
|
+
};
|
|
7
|
+
ExpandableCardContent.displayName = 'ExpandableCardContent';
|
|
8
|
+
const styles = StyleSheet.create(theme => ({
|
|
9
|
+
container: {
|
|
10
|
+
gap: theme.components.expandableCard.gapVertical,
|
|
11
|
+
flex: 1,
|
|
12
|
+
},
|
|
13
|
+
}));
|
|
14
|
+
export default ExpandableCardContent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ExpandableCardExpandedContentProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
isExpanded: boolean;
|
|
4
|
+
duration?: number;
|
|
5
|
+
animateOpacity?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const ExpandableCardExpandedContent: {
|
|
8
|
+
({ children, isExpanded, duration, animateOpacity, }: ExpandableCardExpandedContentProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export default ExpandableCardExpandedContent;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
+
import { Divider } from '../Divider';
|
|
5
|
+
import { Expandable } from '../Expandable';
|
|
6
|
+
const ExpandableCardExpandedContent = ({ children, isExpanded, duration = 200, animateOpacity = true, }) => {
|
|
7
|
+
return (_jsx(View, { style: styles.container, children: _jsx(Expandable, { expanded: isExpanded, duration: duration, animateOpacity: animateOpacity, children: _jsxs(View, { children: [_jsx(Divider, { space: "none" }), _jsx(View, { style: styles.content, children: children })] }) }) }));
|
|
8
|
+
};
|
|
9
|
+
ExpandableCardExpandedContent.displayName = 'ExpandableCardExpandedContent';
|
|
10
|
+
const styles = StyleSheet.create(theme => ({
|
|
11
|
+
container: {
|
|
12
|
+
width: '100%',
|
|
13
|
+
},
|
|
14
|
+
content: {
|
|
15
|
+
padding: theme.components.card.mobile.padding,
|
|
16
|
+
},
|
|
17
|
+
}));
|
|
18
|
+
export default ExpandableCardExpandedContent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type ExpandableCardGroupProps from './ExpandableCardGroup.props';
|
|
2
|
+
declare const ExpandableCardGroup: {
|
|
3
|
+
({ heading, helperText, headerTrailingContent, children, style, testID, ...props }: ExpandableCardGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default ExpandableCardGroup;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
+
import { SectionHeader } from '../SectionHeader';
|
|
5
|
+
const ExpandableCardGroup = ({ heading, helperText, headerTrailingContent, children, style, testID = 'expandable-card-group', ...props }) => {
|
|
6
|
+
return (_jsxs(View, { style: [styles.container, style], testID: testID, ...props, children: [heading ? (_jsx(SectionHeader, { heading: heading, helperText: helperText, trailingContent: headerTrailingContent })) : null, _jsx(View, { style: styles.cardsContainer, children: children })] }));
|
|
7
|
+
};
|
|
8
|
+
ExpandableCardGroup.displayName = 'ExpandableCardGroup';
|
|
9
|
+
const styles = StyleSheet.create(theme => ({
|
|
10
|
+
container: {
|
|
11
|
+
gap: theme.components.expandableCard.group.gap,
|
|
12
|
+
},
|
|
13
|
+
cardsContainer: {
|
|
14
|
+
gap: theme.components.expandableCard.group.gap,
|
|
15
|
+
},
|
|
16
|
+
}));
|
|
17
|
+
export default ExpandableCardGroup;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
export interface ExpandableCardGroupProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* Section heading
|
|
6
|
+
*/
|
|
7
|
+
heading?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Helper text displayed below the heading
|
|
10
|
+
*/
|
|
11
|
+
helperText?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Trailing content for the header (e.g., a link)
|
|
14
|
+
*/
|
|
15
|
+
headerTrailingContent?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* The ExpandableCard children
|
|
18
|
+
*/
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Test ID for testing
|
|
22
|
+
*/
|
|
23
|
+
testID?: string;
|
|
24
|
+
}
|
|
25
|
+
export default ExpandableCardGroupProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
3
|
+
import { BodyText } from '../BodyText';
|
|
4
|
+
const ExpandableCardHelperText = ({ children, ...props }) => {
|
|
5
|
+
return (_jsx(BodyText, { size: "md", ...props, style: [styles.text, props.style], children: children }));
|
|
6
|
+
};
|
|
7
|
+
ExpandableCardHelperText.displayName = 'ExpandableCardHelperText';
|
|
8
|
+
const styles = StyleSheet.create(theme => ({
|
|
9
|
+
text: {
|
|
10
|
+
color: theme.color.text.secondary,
|
|
11
|
+
},
|
|
12
|
+
}));
|
|
13
|
+
export default ExpandableCardHelperText;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { IconProps } from '../Icon';
|
|
3
|
+
declare const ExpandableCardIcon: {
|
|
4
|
+
({ children, ...props }: IconProps & {
|
|
5
|
+
as?: ComponentType;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default ExpandableCardIcon;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
const ExpandableCardIcon = ({ children, ...props }) => {
|
|
6
|
+
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
7
|
+
? // @ts-expect-error - style prop type issue
|
|
8
|
+
{ ...styles.icon, ...props.style }
|
|
9
|
+
: [styles.icon, props.style], children: children }));
|
|
10
|
+
};
|
|
11
|
+
ExpandableCardIcon.displayName = 'ExpandableCardIcon';
|
|
12
|
+
const styles = StyleSheet.create(theme => ({
|
|
13
|
+
icon: {
|
|
14
|
+
color: theme.color.icon.primary,
|
|
15
|
+
width: 24,
|
|
16
|
+
height: 24,
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
19
|
+
export default ExpandableCardIcon;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
const ExpandableCardLeadingContent = ({ children, ...props }) => (_jsx(View, { ...props, children: children }));
|
|
4
|
+
ExpandableCardLeadingContent.displayName = 'ExpandableCardLeadingContent';
|
|
5
|
+
export default ExpandableCardLeadingContent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BodyText } from '../BodyText';
|
|
3
|
+
const ExpandableCardText = ({ children, ...props }) => {
|
|
4
|
+
return (_jsx(BodyText, { size: "lg", ...props, children: children }));
|
|
5
|
+
};
|
|
6
|
+
ExpandableCardText.displayName = 'ExpandableCardText';
|
|
7
|
+
export default ExpandableCardText;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
const ExpandableCardTrailingContent = ({ children, ...props }) => (_jsx(View, { ...props, children: children }));
|
|
4
|
+
ExpandableCardTrailingContent.displayName = 'ExpandableCardTrailingContent';
|
|
5
|
+
export default ExpandableCardTrailingContent;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { IconProps } from '../Icon';
|
|
3
|
+
declare const ExpandableCardTrailingIcon: {
|
|
4
|
+
({ children, ...props }: IconProps & {
|
|
5
|
+
as?: ComponentType;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default ExpandableCardTrailingIcon;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
const ExpandableCardTrailingIcon = ({ children, ...props }) => {
|
|
6
|
+
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
7
|
+
? // @ts-expect-error - style prop type issue
|
|
8
|
+
{ ...styles.icon, ...props.style }
|
|
9
|
+
: [styles.icon, props.style], children: children }));
|
|
10
|
+
};
|
|
11
|
+
ExpandableCardTrailingIcon.displayName = 'ExpandableCardTrailingIcon';
|
|
12
|
+
const styles = StyleSheet.create(theme => ({
|
|
13
|
+
icon: {
|
|
14
|
+
color: theme.color.icon.primary,
|
|
15
|
+
},
|
|
16
|
+
}));
|
|
17
|
+
export default ExpandableCardTrailingIcon;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const ExpandableCardTrigger: import("react").ForwardRefExoticComponent<import("./ExpandableCardTrigger.props").ExpandableCardTriggerProps & {
|
|
2
|
+
states?: {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
} & Omit<import("react-native").PressableProps, "children"> & {
|
|
7
|
+
tabIndex?: 0 | -1 | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
children?: import("react").ReactNode | (({ hovered, pressed, focused, focusVisible, disabled, }: {
|
|
10
|
+
hovered?: boolean | undefined;
|
|
11
|
+
pressed?: boolean | undefined;
|
|
12
|
+
focused?: boolean | undefined;
|
|
13
|
+
focusVisible?: boolean | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
15
|
+
}) => import("react").ReactNode);
|
|
16
|
+
} & import("react").RefAttributes<unknown>>;
|
|
17
|
+
export default ExpandableCardTrigger;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createPressable } from '@gluestack-ui/pressable';
|
|
2
|
+
import ExpandableCardTriggerRoot from './ExpandableCardTriggerRoot';
|
|
3
|
+
const ExpandableCardTrigger = createPressable({
|
|
4
|
+
Root: ExpandableCardTriggerRoot,
|
|
5
|
+
});
|
|
6
|
+
ExpandableCardTrigger.displayName = 'ExpandableCardTrigger';
|
|
7
|
+
export default ExpandableCardTrigger;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { PressableProps } from 'react-native';
|
|
3
|
+
import type BadgeProps from '../Badge/Badge.props';
|
|
4
|
+
export interface ExpandableCardTriggerProps extends Omit<PressableProps, 'children'> {
|
|
5
|
+
/**
|
|
6
|
+
* The main heading text
|
|
7
|
+
*/
|
|
8
|
+
heading?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional helper text displayed below the heading
|
|
11
|
+
*/
|
|
12
|
+
helperText?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Leading icon component
|
|
15
|
+
*/
|
|
16
|
+
leadingIcon?: ComponentType;
|
|
17
|
+
/**
|
|
18
|
+
* Content to display on the left side (e.g., icon, avatar)
|
|
19
|
+
*/
|
|
20
|
+
leadingContent?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Optional badge to display
|
|
23
|
+
*/
|
|
24
|
+
badge?: BadgeProps;
|
|
25
|
+
/**
|
|
26
|
+
* Position of the badge relative to the heading
|
|
27
|
+
* @default 'bottom'
|
|
28
|
+
*/
|
|
29
|
+
badgePosition?: 'top' | 'bottom';
|
|
30
|
+
/**
|
|
31
|
+
* Optional numeric value to display
|
|
32
|
+
*/
|
|
33
|
+
numericValue?: string | number;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the expandable card is expanded
|
|
36
|
+
*/
|
|
37
|
+
isExpanded: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the trigger is disabled
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export default ExpandableCardTriggerProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type ExpandableCardTriggerProps from './ExpandableCardTrigger.props';
|
|
2
|
+
declare const ExpandableCardTriggerRoot: {
|
|
3
|
+
({ heading, helperText, leadingIcon, leadingContent, badge, badgePosition, numericValue, isExpanded, disabled, states, children, ...props }: ExpandableCardTriggerProps & {
|
|
4
|
+
states?: {
|
|
5
|
+
active?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export default ExpandableCardTriggerRoot;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDownSmallIcon, ChevronUpSmallIcon, } from '@utilitywarehouse/hearth-react-native-icons';
|
|
3
|
+
import { Pressable } from 'react-native';
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
|
+
import { Badge } from '../Badge';
|
|
6
|
+
import { DetailText } from '../DetailText';
|
|
7
|
+
import ExpandableCardContent from './ExpandableCardContent';
|
|
8
|
+
import ExpandableCardHelperText from './ExpandableCardHelperText';
|
|
9
|
+
import ExpandableCardIcon from './ExpandableCardIcon';
|
|
10
|
+
import ExpandableCardLeadingContent from './ExpandableCardLeadingContent';
|
|
11
|
+
import ExpandableCardText from './ExpandableCardText';
|
|
12
|
+
import ExpandableCardTrailingContent from './ExpandableCardTrailingContent';
|
|
13
|
+
import ExpandableCardTrailingIcon from './ExpandableCardTrailingIcon';
|
|
14
|
+
const ExpandableCardTriggerRoot = ({ heading, helperText, leadingIcon, leadingContent, badge, badgePosition = 'bottom', numericValue, isExpanded, disabled, states, children, ...props }) => {
|
|
15
|
+
const { active } = states || { active: false };
|
|
16
|
+
const testID = props.testID || 'expandable-card-trigger';
|
|
17
|
+
styles.useVariants({
|
|
18
|
+
active,
|
|
19
|
+
disabled: !!disabled,
|
|
20
|
+
});
|
|
21
|
+
const renderLeadingContent = () => {
|
|
22
|
+
if (leadingIcon) {
|
|
23
|
+
return (_jsx(ExpandableCardLeadingContent, { children: _jsx(ExpandableCardIcon, { as: leadingIcon }) }));
|
|
24
|
+
}
|
|
25
|
+
if (leadingContent) {
|
|
26
|
+
return _jsx(ExpandableCardLeadingContent, { children: leadingContent });
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
};
|
|
30
|
+
const renderTopBadge = () => {
|
|
31
|
+
if (badgePosition === 'top' && badge) {
|
|
32
|
+
return _jsx(Badge, { ...badge });
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
};
|
|
36
|
+
const renderBottomBadge = () => {
|
|
37
|
+
if (badgePosition === 'bottom' && badge) {
|
|
38
|
+
return _jsx(Badge, { ...badge });
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
};
|
|
42
|
+
const renderDefaultContent = () => (_jsxs(_Fragment, { children: [renderLeadingContent(), _jsxs(ExpandableCardContent, { children: [renderTopBadge(), _jsx(ExpandableCardText, { children: heading }), helperText && _jsx(ExpandableCardHelperText, { children: helperText }), renderBottomBadge()] }), numericValue && (_jsx(DetailText, { size: "lg", style: styles.numericValue, children: numericValue })), _jsx(ExpandableCardTrailingContent, { style: styles.chevron, children: _jsx(ExpandableCardTrailingIcon, { as: isExpanded ? ChevronUpSmallIcon : ChevronDownSmallIcon }) })] }));
|
|
43
|
+
return (_jsx(Pressable, { ...props, testID: testID, style: [styles.container, props.style], disabled: disabled, accessibilityRole: "button", accessibilityState: { expanded: isExpanded, disabled }, accessibilityLabel: `${heading}${helperText ? `, ${helperText}` : ''}`, children: children || renderDefaultContent() }));
|
|
44
|
+
};
|
|
45
|
+
ExpandableCardTriggerRoot.displayName = 'ExpandableCardTriggerRoot';
|
|
46
|
+
const styles = StyleSheet.create(theme => ({
|
|
47
|
+
container: {
|
|
48
|
+
paddingVertical: theme.components.card.mobile.padding,
|
|
49
|
+
paddingHorizontal: theme.components.card.mobile.padding,
|
|
50
|
+
flexDirection: 'row',
|
|
51
|
+
width: '100%',
|
|
52
|
+
gap: theme.components.expandableCard.gapHorizontal,
|
|
53
|
+
variants: {
|
|
54
|
+
disabled: {
|
|
55
|
+
true: {
|
|
56
|
+
cursor: 'auto',
|
|
57
|
+
opacity: theme.opacity.disabled,
|
|
58
|
+
},
|
|
59
|
+
false: {
|
|
60
|
+
_web: {
|
|
61
|
+
_hover: {
|
|
62
|
+
backgroundColor: theme.color.interactive.neutral.surface.subtle.hover,
|
|
63
|
+
},
|
|
64
|
+
_active: {
|
|
65
|
+
backgroundColor: theme.color.interactive.neutral.surface.subtle.active,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
active: {
|
|
71
|
+
true: {},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
compoundVariants: [
|
|
75
|
+
{
|
|
76
|
+
disabled: false,
|
|
77
|
+
active: true,
|
|
78
|
+
styles: {
|
|
79
|
+
backgroundColor: theme.color.interactive.neutral.surface.subtle.active,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
chevron: {
|
|
85
|
+
justifyContent: 'center',
|
|
86
|
+
},
|
|
87
|
+
numericValue: {
|
|
88
|
+
alignSelf: 'center',
|
|
89
|
+
},
|
|
90
|
+
}));
|
|
91
|
+
export default ExpandableCardTriggerRoot;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as ExpandableCard } from './ExpandableCard';
|
|
2
|
+
export type { default as ExpandableCardProps } from './ExpandableCard.props';
|
|
3
|
+
export { default as ExpandableCardContent } from './ExpandableCardContent';
|
|
4
|
+
export { default as ExpandableCardExpandedContent } from './ExpandableCardExpandedContent';
|
|
5
|
+
export { default as ExpandableCardGroup } from './ExpandableCardGroup';
|
|
6
|
+
export type { default as ExpandableCardGroupProps } from './ExpandableCardGroup.props';
|
|
7
|
+
export { default as ExpandableCardHelperText } from './ExpandableCardHelperText';
|
|
8
|
+
export { default as ExpandableCardIcon } from './ExpandableCardIcon';
|
|
9
|
+
export { default as ExpandableCardLeadingContent } from './ExpandableCardLeadingContent';
|
|
10
|
+
export { default as ExpandableCardText } from './ExpandableCardText';
|
|
11
|
+
export { default as ExpandableCardTrailingContent } from './ExpandableCardTrailingContent';
|
|
12
|
+
export { default as ExpandableCardTrailingIcon } from './ExpandableCardTrailingIcon';
|
|
13
|
+
export { default as ExpandableCardTrigger } from './ExpandableCardTrigger';
|
|
14
|
+
export type { default as ExpandableCardTriggerProps } from './ExpandableCardTrigger.props';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as ExpandableCard } from './ExpandableCard';
|
|
2
|
+
export { default as ExpandableCardContent } from './ExpandableCardContent';
|
|
3
|
+
export { default as ExpandableCardExpandedContent } from './ExpandableCardExpandedContent';
|
|
4
|
+
export { default as ExpandableCardGroup } from './ExpandableCardGroup';
|
|
5
|
+
export { default as ExpandableCardHelperText } from './ExpandableCardHelperText';
|
|
6
|
+
export { default as ExpandableCardIcon } from './ExpandableCardIcon';
|
|
7
|
+
export { default as ExpandableCardLeadingContent } from './ExpandableCardLeadingContent';
|
|
8
|
+
export { default as ExpandableCardText } from './ExpandableCardText';
|
|
9
|
+
export { default as ExpandableCardTrailingContent } from './ExpandableCardTrailingContent';
|
|
10
|
+
export { default as ExpandableCardTrailingIcon } from './ExpandableCardTrailingIcon';
|
|
11
|
+
export { default as ExpandableCardTrigger } from './ExpandableCardTrigger';
|
|
@@ -7,7 +7,8 @@ const HelperIcon = (props) => {
|
|
|
7
7
|
const { validationStatus } = useHelperContext();
|
|
8
8
|
styles.useVariants({ validationStatus });
|
|
9
9
|
return (_jsx(Icon, { style: Platform.OS === 'web'
|
|
10
|
-
?
|
|
10
|
+
? // @ts-expect-error - style prop type issue
|
|
11
|
+
{ ...styles.icon, ...props.style }
|
|
11
12
|
: [styles.icon, props.style], ...props }));
|
|
12
13
|
};
|
|
13
14
|
HelperIcon.displayName = 'HelperIcon';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type HighlightBannerProps from './HighlightBanner.props';
|
|
2
|
+
declare const HighlightBanner: {
|
|
3
|
+
({ heading, headingColor, image, imageContainerHeight, description, link, button, variant, style, ...props }: HighlightBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default HighlightBanner;
|