@utilitywarehouse/hearth-react-native 0.36.1 → 0.36.2
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/SKILL.md +27 -16
- package/build/components/Accordion/Accordion.d.ts +4 -0
- package/build/components/Accordion/Accordion.js +4 -0
- package/build/components/Accordion/Accordion.props.d.ts +2 -0
- package/build/components/Alert/Alert.d.ts +4 -0
- package/build/components/Alert/Alert.js +4 -0
- package/build/components/Avatar/Avatar.d.ts +4 -0
- package/build/components/Avatar/Avatar.js +4 -0
- package/build/components/Badge/Badge.d.ts +4 -0
- package/build/components/Badge/Badge.js +4 -0
- package/build/components/Badge/Badge.props.d.ts +19 -0
- package/build/components/Banner/Banner.d.ts +5 -0
- package/build/components/Banner/Banner.js +5 -0
- package/build/components/Banner/BannerIllustration.d.ts +4 -0
- package/build/components/Banner/BannerIllustration.js +4 -0
- package/build/components/Banner/BannerImage.d.ts +4 -0
- package/build/components/Banner/BannerImage.js +4 -0
- package/build/components/BodyText/BodyText.d.ts +4 -0
- package/build/components/BodyText/BodyText.js +4 -0
- package/build/components/BottomSheet/BottomSheet.d.ts +6 -0
- package/build/components/BottomSheet/BottomSheet.js +6 -0
- package/build/components/BottomSheet/BottomSheet.props.d.ts +2 -0
- package/build/components/Box/Box.d.ts +4 -0
- package/build/components/Box/Box.js +4 -0
- package/build/components/Box/Box.props.d.ts +2 -0
- package/build/components/Button/Button.d.ts +4 -0
- package/build/components/Button/Button.js +4 -0
- package/build/components/Button/Button.props.d.ts +129 -0
- package/build/components/Card/Card.d.ts +4 -0
- package/build/components/Card/Card.js +4 -0
- package/build/components/Card/Card.props.d.ts +19 -1
- package/build/components/Card/CardAction/CardAction.d.ts +4 -0
- package/build/components/Card/CardAction/CardAction.js +4 -0
- package/build/components/Card/CardAction/CardAction.props.d.ts +23 -0
- package/build/components/Card/CardPressHandler.d.ts +8 -3
- package/build/components/Card/CardPressHandler.js +3 -0
- package/build/components/Carousel/Carousel.d.ts +3 -0
- package/build/components/Carousel/Carousel.js +3 -0
- package/build/components/Carousel/Carousel.props.d.ts +37 -0
- package/build/components/Center/Center.d.ts +3 -0
- package/build/components/Center/Center.js +3 -0
- package/build/components/Checkbox/Checkbox.d.ts +3 -0
- package/build/components/Checkbox/Checkbox.js +3 -0
- package/build/components/Checkbox/Checkbox.props.d.ts +20 -0
- package/build/components/Checkbox/CheckboxGroup.d.ts +3 -0
- package/build/components/Checkbox/CheckboxGroup.js +3 -0
- package/build/components/Checkbox/CheckboxGroup.props.d.ts +24 -0
- package/build/components/Combobox/Combobox.d.ts +3 -0
- package/build/components/Combobox/Combobox.js +3 -0
- package/build/components/Container/Container.d.ts +3 -0
- package/build/components/Container/Container.js +3 -0
- package/build/components/CurrencyInput/CurrencyInput.d.ts +3 -0
- package/build/components/CurrencyInput/CurrencyInput.js +3 -0
- package/build/components/CurrencyInput/CurrencyInput.props.d.ts +25 -0
- package/build/components/DateInput/DateInput.d.ts +4 -0
- package/build/components/DateInput/DateInput.js +4 -0
- package/build/components/DateInput/DateInput.props.d.ts +3 -0
- package/build/components/DatePicker/DatePicker.d.ts +14 -0
- package/build/components/DatePicker/DatePicker.js +4 -0
- package/build/components/DatePicker/DatePicker.props.d.ts +78 -0
- package/build/components/DatePickerInput/DatePickerInput.d.ts +4 -0
- package/build/components/DatePickerInput/DatePickerInput.js +4 -0
- package/build/components/DatePickerInput/DatePickerInput.props.d.ts +21 -0
- package/build/components/DescriptionList/DescriptionList.d.ts +4 -0
- package/build/components/DescriptionList/DescriptionList.js +4 -0
- package/build/components/DescriptionList/DescriptionList.props.d.ts +4 -0
- package/build/components/DetailText/DetailText.d.ts +4 -0
- package/build/components/DetailText/DetailText.js +4 -0
- package/build/components/Divider/Divider.d.ts +4 -0
- package/build/components/Divider/Divider.js +4 -0
- package/build/components/Divider/Divider.props.d.ts +10 -0
- package/build/components/Expandable/Expandable.d.ts +5 -0
- package/build/components/Expandable/Expandable.js +5 -0
- package/build/components/ExpandableCard/ExpandableCard.d.ts +4 -0
- package/build/components/ExpandableCard/ExpandableCard.js +4 -0
- package/build/components/Flex/Flex.d.ts +4 -0
- package/build/components/Flex/Flex.js +4 -0
- package/build/components/Flex/Flex.props.d.ts +20 -0
- package/build/components/FormField/FormField.d.ts +5 -0
- package/build/components/FormField/FormField.js +5 -0
- package/build/components/FormField/FormField.props.d.ts +24 -0
- package/build/components/Grid/Grid.d.ts +4 -0
- package/build/components/Grid/Grid.js +4 -0
- package/build/components/HTMLElements/ListItem.d.ts +5 -0
- package/build/components/HTMLElements/OrderedList.d.ts +10 -0
- package/build/components/HTMLElements/OrderedList.js +4 -0
- package/build/components/HTMLElements/UnorderedList.d.ts +10 -0
- package/build/components/HTMLElements/UnorderedList.js +4 -0
- package/build/components/Heading/Heading.d.ts +4 -0
- package/build/components/Heading/Heading.js +4 -0
- package/build/components/HighlightBanner/HighlightBanner.d.ts +5 -0
- package/build/components/HighlightBanner/HighlightBanner.js +5 -0
- package/build/components/HighlightBanner/HighlightBanner.props.d.ts +14 -0
- package/build/components/HighlightBanner/HighlightBannerImage.d.ts +4 -0
- package/build/components/HighlightBanner/HighlightBannerImage.js +4 -0
- package/build/components/Icon/Icon.d.ts +4 -0
- package/build/components/Icon/Icon.js +4 -0
- package/build/components/Icon/Icon.props.d.ts +8 -0
- package/build/components/IconButton/IconButton.d.ts +5 -0
- package/build/components/IconButton/IconButton.js +5 -0
- package/build/components/IconButton/IconButton.props.d.ts +9 -0
- package/build/components/IconContainer/IconContainer.d.ts +4 -0
- package/build/components/IconContainer/IconContainer.js +4 -0
- package/build/components/IndicatorIconButton/IndicatorIconButton.d.ts +6 -0
- package/build/components/IndicatorIconButton/IndicatorIconButton.js +6 -0
- package/build/components/InlineLink/InlineLink.d.ts +1 -0
- package/build/components/InlineLink/InlineLink.js +1 -0
- package/build/components/InlineLink/InlineLink.props.d.ts +4 -0
- package/build/components/Input/Input.d.ts +5 -0
- package/build/components/Input/Input.js +5 -0
- package/build/components/Input/Input.props.d.ts +54 -0
- package/build/components/Link/Link.d.ts +5 -0
- package/build/components/Link/Link.js +5 -0
- package/build/components/Link/Link.props.d.ts +15 -0
- package/build/components/List/List.d.ts +1 -0
- package/build/components/List/List.js +1 -0
- package/build/components/List/List.props.d.ts +8 -0
- package/build/components/Menu/Menu.d.ts +1 -0
- package/build/components/Menu/Menu.js +1 -0
- package/build/components/Modal/Modal.d.ts +5 -0
- package/build/components/Modal/Modal.js +5 -0
- package/build/components/Modal/Modal.props.d.ts +6 -0
- package/build/components/Modal/Modal.shared.types.d.ts +32 -0
- package/build/components/Modal/ModalImage.d.ts +1 -0
- package/build/components/Modal/ModalImage.js +1 -0
- package/build/components/NavModal/NavModal.d.ts +8 -0
- package/build/components/NavModal/NavModal.js +8 -0
- package/build/components/NavModal/NavModal.props.d.ts +10 -0
- package/build/components/Pagination/Pagination.d.ts +5 -0
- package/build/components/Pagination/Pagination.js +5 -0
- package/build/components/PillGroup/Pill.d.ts +1 -0
- package/build/components/PillGroup/Pill.js +1 -0
- package/build/components/PillGroup/PillGroup.d.ts +5 -0
- package/build/components/PillGroup/PillGroup.js +5 -0
- package/build/components/ProgressBar/ProgressBar.d.ts +5 -0
- package/build/components/ProgressBar/ProgressBar.js +5 -0
- package/build/components/ProgressBar/ProgressBar.props.d.ts +4 -0
- package/build/components/ProgressStepper/ProgressStep.d.ts +13 -0
- package/build/components/ProgressStepper/ProgressStep.js +5 -0
- package/build/components/ProgressStepper/ProgressStepper.d.ts +5 -0
- package/build/components/ProgressStepper/ProgressStepper.js +5 -0
- package/build/components/Radio/Radio.d.ts +5 -0
- package/build/components/Radio/Radio.js +5 -0
- package/build/components/Radio/Radio.props.d.ts +17 -0
- package/build/components/Radio/RadioGroup.d.ts +5 -0
- package/build/components/Radio/RadioGroup.js +5 -0
- package/build/components/Radio/RadioGroup.props.d.ts +25 -0
- package/build/components/RadioCard/RadioCard.d.ts +10 -0
- package/build/components/RadioCard/RadioCard.js +10 -0
- package/build/components/RadioCard/RadioCard.props.d.ts +14 -0
- package/build/components/RadioCard/RadioCardGroup.d.ts +4 -0
- package/build/components/RadioCard/RadioCardGroup.js +4 -0
- package/build/components/RadioCard/RadioCardGroup.props.d.ts +17 -0
- package/build/components/Rating/Rating.d.ts +5 -0
- package/build/components/Rating/Rating.js +5 -0
- package/build/components/Roundel/Roundel.d.ts +1 -0
- package/build/components/Roundel/Roundel.js +1 -0
- package/build/components/SectionHeader/SectionHeader.d.ts +1 -0
- package/build/components/SectionHeader/SectionHeader.js +1 -0
- package/build/components/SectionHeader/SectionHeader.props.d.ts +7 -0
- package/build/components/SegmentedControl/SegmentedControl.d.ts +5 -0
- package/build/components/SegmentedControl/SegmentedControl.js +5 -0
- package/build/components/Select/Select.d.ts +5 -0
- package/build/components/Select/Select.js +5 -0
- package/build/components/Skeleton/Skeleton.d.ts +1 -0
- package/build/components/Skeleton/Skeleton.js +1 -0
- package/build/components/Skeleton/Skeleton.props.d.ts +4 -0
- package/build/components/Spinner/Spinner.d.ts +4 -0
- package/build/components/Spinner/Spinner.js +8 -0
- package/build/components/Spinner/Spinner.props.d.ts +5 -0
- package/build/components/Spinner/Spinner.web.d.ts +4 -0
- package/build/components/Spinner/Spinner.web.js +8 -0
- package/build/components/StepperInput/StepperInput.d.ts +4 -0
- package/build/components/StepperInput/StepperInput.js +4 -0
- package/build/components/StepperInput/StepperInput.props.d.ts +44 -0
- package/build/components/Switch/Switch.d.ts +4 -0
- package/build/components/Switch/Switch.js +4 -0
- package/build/components/Switch/Switch.props.d.ts +5 -0
- package/build/components/Table/Table.d.ts +4 -0
- package/build/components/Table/Table.js +4 -0
- package/build/components/Table/Table.props.d.ts +6 -0
- package/build/components/Table/TableHeader.d.ts +3 -0
- package/build/components/Table/TableHeader.js +3 -0
- package/build/components/Table/TableHeaderCell.d.ts +6 -0
- package/build/components/Table/TableHeaderCell.js +3 -0
- package/build/components/Tabs/Tabs.d.ts +5 -0
- package/build/components/Tabs/Tabs.js +5 -0
- package/build/components/Textarea/Textarea.d.ts +6 -0
- package/build/components/Textarea/Textarea.js +6 -0
- package/build/components/Textarea/Textarea.props.d.ts +14 -0
- package/build/components/TimePicker/TimePicker.d.ts +5 -0
- package/build/components/TimePicker/TimePicker.js +5 -0
- package/build/components/TimePickerInput/TimePickerInput.d.ts +5 -0
- package/build/components/TimePickerInput/TimePickerInput.js +5 -0
- package/build/components/TimePickerInput/TimePickerInput.props.d.ts +28 -0
- package/build/components/Timeline/Timeline.d.ts +5 -0
- package/build/components/Timeline/Timeline.js +5 -0
- package/build/components/Timeline/TimelineItem.d.ts +4 -0
- package/build/components/Timeline/TimelineItem.js +4 -0
- package/build/components/Toast/Toast.context.d.ts +4 -0
- package/build/components/Toast/Toast.context.js +4 -0
- package/build/components/Toast/Toast.props.d.ts +7 -0
- package/build/components/ToggleButton/ToggleButton.d.ts +4 -0
- package/build/components/ToggleButton/ToggleButton.js +4 -0
- package/build/components/ToggleButton/ToggleButton.props.d.ts +6 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.d.ts +8 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.js +8 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.props.d.ts +9 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.props.d.ts +15 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.d.ts +5 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.js +5 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +17 -0
- package/build/components/VerificationInput/VerificationInput.d.ts +4 -0
- package/build/components/VerificationInput/VerificationInput.js +4 -0
- package/package.json +8 -5
- package/public/llms/docs/introduction.md +1 -1
package/SKILL.md
CHANGED
|
@@ -48,14 +48,22 @@ There are 2 options for discovering existing components and documentation:
|
|
|
48
48
|
- MCP server: `hearth-react-native` MCP hosted on a remote URL
|
|
49
49
|
- Raw markdown files: located in the `public` folder of the `hearth-react-native` package
|
|
50
50
|
|
|
51
|
-
**Default to the
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
**Default to the MCP server** for component lookups and general/cross-cutting
|
|
52
|
+
guidance (design tokens, styling, layout, getting started, dark mode). For a
|
|
53
|
+
component, fetch both its plain `stories-<component>` entry (props + story
|
|
54
|
+
code) and its `components-<component>--docs` entry (narrative usage,
|
|
55
|
+
accessibility, and examples) — together they cover what the local markdown
|
|
56
|
+
file documents.
|
|
57
|
+
|
|
58
|
+
Subcomponents (e.g. `ModalImage`, `CardAction`) are listed as their own
|
|
59
|
+
`stories-<subcomponent>` entries in `list-all-documentation` — fetch them
|
|
60
|
+
directly by their own id rather than relying on the parent's `--docs` page.
|
|
61
|
+
They don't have a separate `--docs` entry of their own; their narrative usage
|
|
62
|
+
stays documented inline in the parent's `components-<parent>--docs` entry.
|
|
63
|
+
|
|
64
|
+
**Fall back to the raw markdown files** for a specific story's exact code
|
|
65
|
+
beyond what's already surfaced by `get-documentation` or
|
|
66
|
+
`get-documentation-for-story`.
|
|
59
67
|
|
|
60
68
|
Whatever source you use, review what is available before writing any code.
|
|
61
69
|
|
|
@@ -68,6 +76,17 @@ prop the library added later (e.g. `List`'s own `heading`/`helperText` props
|
|
|
68
76
|
vs. a sibling `SectionHeader` or `Heading`). Prefer the documented, current shorthand over
|
|
69
77
|
an older local convention when they diverge.
|
|
70
78
|
|
|
79
|
+
### MCP Server
|
|
80
|
+
|
|
81
|
+
You can use the **`hearth-react-native`** MCP server if available (`https://main--68e3ad5c6e80b57678cad6c6.chromatic.com/mcp`):
|
|
82
|
+
|
|
83
|
+
1. `list-all-documentation` — get an index of all Hearth React Native components and docs
|
|
84
|
+
2. `get-documentation` — get props, API, and usage examples for a specific
|
|
85
|
+
component or docs entry. Pass the plain `stories-<component>` id (e.g.
|
|
86
|
+
`stories-modal`) for props and story code, or the `components-<component>--docs`
|
|
87
|
+
id (e.g. `components-modal--docs`) for narrative usage and accessibility docs
|
|
88
|
+
3. `get-documentation-for-story` — get story code and docs for a specific story
|
|
89
|
+
|
|
71
90
|
### Raw markdown files
|
|
72
91
|
|
|
73
92
|
Full component API reference is available in the installed package. First,
|
|
@@ -82,14 +101,6 @@ The docs are then at:
|
|
|
82
101
|
- `<hearth-react-native-root>/public/llms/docs/` — design tokens, styling, layout, hooks, dark mode
|
|
83
102
|
- `<hearth-react-native-root>/public/llms.txt` — index of all available docs
|
|
84
103
|
|
|
85
|
-
### MCP Server
|
|
86
|
-
|
|
87
|
-
You can use the **`hearth-react-native`** MCP server if available (`https://main--68e3ad5c6e80b57678cad6c6.chromatic.com/mcp`):
|
|
88
|
-
|
|
89
|
-
1. `list-all-documentation` — get an index of all Hearth React Native components
|
|
90
|
-
2. `get-documentation` — get props, API, and usage examples for a specific component
|
|
91
|
-
3. `get-documentation-for-story` — get story code and docs for a specific story
|
|
92
|
-
|
|
93
104
|
## Plan before writing
|
|
94
105
|
|
|
95
106
|
For anything beyond a trivial change — a new screen, a multi-component feature, an
|
|
@@ -14,6 +14,10 @@ export declare const AccordionContent: import("react").ForwardRefExoticComponent
|
|
|
14
14
|
export declare const AccordionContentText: import("react").ForwardRefExoticComponent<import("react-native").TextProps & import("react").RefAttributes<import("react-native").TextProps>>;
|
|
15
15
|
export declare const AccordionIcon: import("react").ForwardRefExoticComponent<import("..").IconProps & import("react").RefAttributes<import("..").IconProps>>;
|
|
16
16
|
export declare const AccordionTitleText: import("react").ForwardRefExoticComponent<import("react-native").TextProps & import("react").RefAttributes<import("react-native").TextProps>>;
|
|
17
|
+
/**
|
|
18
|
+
* A vertically stacked set of interactive headers that each reveal a section of
|
|
19
|
+
* content. Use it to condense large amounts of information into a more manageable format.
|
|
20
|
+
*/
|
|
17
21
|
declare const Accordion: {
|
|
18
22
|
({ children, collapsible, type, heading, helperText, ...props }: AccordionProps): import("react").JSX.Element;
|
|
19
23
|
displayName: string;
|
|
@@ -28,6 +28,10 @@ export const AccordionContent = AccordionComponent.Content;
|
|
|
28
28
|
export const AccordionContentText = AccordionComponent.ContentText;
|
|
29
29
|
export const AccordionIcon = AccordionComponent.Icon;
|
|
30
30
|
export const AccordionTitleText = AccordionComponent.TitleText;
|
|
31
|
+
/**
|
|
32
|
+
* A vertically stacked set of interactive headers that each reveal a section of
|
|
33
|
+
* content. Use it to condense large amounts of information into a more manageable format.
|
|
34
|
+
*/
|
|
31
35
|
const Accordion = ({ children, collapsible, type = 'multiple', heading, helperText, ...props }) => (_jsxs(AccordionComponent, { isDisabled: props.disabled, isCollapsible: collapsible, type: type, contentNoPadding: props.contentNoPadding, ...props, children: [heading ? _jsx(SectionHeader, { heading: heading, helperText: helperText }) : null, children] }));
|
|
32
36
|
let accordionItemCounter = 0;
|
|
33
37
|
export const AccordionItem = ({ children, value, title, expanded, triggerContent, testID, ...props }) => {
|
|
@@ -37,6 +37,8 @@ export interface AccordionProps extends ViewProps {
|
|
|
37
37
|
* @default false
|
|
38
38
|
*/
|
|
39
39
|
contentNoPadding?: boolean;
|
|
40
|
+
/** Heading text to display above the accordion. */
|
|
40
41
|
heading?: string;
|
|
42
|
+
/** Helper text to display alongside the heading. */
|
|
41
43
|
helperText?: string;
|
|
42
44
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { AlertProps } from './Alert.props';
|
|
2
|
+
/**
|
|
3
|
+
* Displays an inline message to draw attention to feedback, a status change, or
|
|
4
|
+
* information the user needs to act on, styled by colour scheme.
|
|
5
|
+
*/
|
|
2
6
|
declare const Alert: {
|
|
3
7
|
({ text, title, link, onPressLink, colorScheme, onPressIconButton, onClose, children, onPress, iconButtonTestID, linkTestID, style, ...props }: AlertProps): import("react").JSX.Element;
|
|
4
8
|
displayName: string;
|
|
@@ -10,6 +10,10 @@ import AlertIconButton from './AlertIconButton';
|
|
|
10
10
|
import AlertLink from './AlertLink';
|
|
11
11
|
import AlertText from './AlertText';
|
|
12
12
|
import AlertTitle from './AlertTitle';
|
|
13
|
+
/**
|
|
14
|
+
* Displays an inline message to draw attention to feedback, a status change, or
|
|
15
|
+
* information the user needs to act on, styled by colour scheme.
|
|
16
|
+
*/
|
|
13
17
|
const Alert = ({ text, title, link, onPressLink, colorScheme = 'info', onPressIconButton, onClose, children, onPress, iconButtonTestID, linkTestID, style, ...props }) => {
|
|
14
18
|
useEffect(() => {
|
|
15
19
|
if (__DEV__) {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import AvatarProps from './Avatar.props';
|
|
2
|
+
/**
|
|
3
|
+
* Displays a user's profile image, initials, or a fallback icon, connecting the
|
|
4
|
+
* product experience to the person it represents.
|
|
5
|
+
*/
|
|
2
6
|
declare const Avatar: {
|
|
3
7
|
({ src, name, size, delayMs, onLoadingStatusChange, style, ...props }: AvatarProps): import("react").JSX.Element;
|
|
4
8
|
displayName: string;
|
|
@@ -5,6 +5,10 @@ import { Image, View } from 'react-native';
|
|
|
5
5
|
import { StyleSheet } from 'react-native-unistyles';
|
|
6
6
|
import { getInitials } from '../../utils';
|
|
7
7
|
import BodyText from '../BodyText/BodyText';
|
|
8
|
+
/**
|
|
9
|
+
* Displays a user's profile image, initials, or a fallback icon, connecting the
|
|
10
|
+
* product experience to the person it represents.
|
|
11
|
+
*/
|
|
8
12
|
const Avatar = ({ src, name, size = 'md', delayMs = 0, onLoadingStatusChange, style, ...props }) => {
|
|
9
13
|
const [status, setStatus] = useState('idle');
|
|
10
14
|
const [isDelayed, setIsDelayed] = useState(delayMs > 0);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type BadgeProps from './Badge.props';
|
|
2
|
+
/**
|
|
3
|
+
* Draws attention to another interface element or provides additional context,
|
|
4
|
+
* such as a status. Badge is stateless: it has no pressed, disabled, or active states.
|
|
5
|
+
*/
|
|
2
6
|
declare const Badge: {
|
|
3
7
|
({ children, ...props }: BadgeProps): import("react").JSX.Element;
|
|
4
8
|
displayName: string;
|
|
@@ -5,6 +5,10 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
5
5
|
import { BadgeContext } from './Badge.context';
|
|
6
6
|
import BadgeIcon from './BadgeIcon';
|
|
7
7
|
import BadgeText from './BadgeText';
|
|
8
|
+
/**
|
|
9
|
+
* Draws attention to another interface element or provides additional context,
|
|
10
|
+
* such as a status. Badge is stateless: it has no pressed, disabled, or active states.
|
|
11
|
+
*/
|
|
8
12
|
const Badge = ({ children, ...props }) => {
|
|
9
13
|
const { variant = 'subtle', icon, colorScheme = 'info', flatBase = false, size = 'sm', style, text, numberOfLines, ...rest } = props;
|
|
10
14
|
const value = useMemo(() => ({ colorScheme, flatBase, variant, size }), [colorScheme, flatBase, variant, size]);
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
3
|
interface BadgeProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* The visual style of the badge.
|
|
6
|
+
* @default 'subtle'
|
|
7
|
+
*/
|
|
4
8
|
variant?: 'subtle' | 'emphasis' | 'outline';
|
|
9
|
+
/**
|
|
10
|
+
* The color scheme used for the badge.
|
|
11
|
+
* @default 'info'
|
|
12
|
+
*/
|
|
5
13
|
colorScheme?: 'info' | 'positive' | 'danger' | 'warning' | 'functional' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'pig' | 'highlight';
|
|
14
|
+
/**
|
|
15
|
+
* The size of the badge.
|
|
16
|
+
* @default 'sm'
|
|
17
|
+
*/
|
|
6
18
|
size?: 'sm' | 'md';
|
|
19
|
+
/** Icon component to display in the badge. */
|
|
7
20
|
icon?: ComponentType;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the badge has a flat base.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
8
25
|
flatBase?: boolean;
|
|
26
|
+
/** Text to display in the badge, taking precedence over `children`. */
|
|
9
27
|
text?: string | number;
|
|
28
|
+
/** Maximum number of lines to render for the badge text. */
|
|
10
29
|
numberOfLines?: number;
|
|
11
30
|
}
|
|
12
31
|
export default BadgeProps;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type BannerProps from './Banner.props';
|
|
2
|
+
/**
|
|
3
|
+
* A versatile card-based component for displaying informational content with an
|
|
4
|
+
* icon, image, or illustration. Supports horizontal and vertical layouts, a
|
|
5
|
+
* pressable state, a close button, and an optional button or link action.
|
|
6
|
+
*/
|
|
2
7
|
declare const Banner: {
|
|
3
8
|
({ icon, iconContainerVariant, iconContainerSize, iconContainerColor, illustration, image, heading, description, direction, link, button, onPress, onClose, variant, alignChevron, style, ...props }: BannerProps): import("react").JSX.Element;
|
|
4
9
|
displayName: string;
|
|
@@ -9,6 +9,11 @@ import { Heading } from '../Heading';
|
|
|
9
9
|
import { IconContainer } from '../IconContainer';
|
|
10
10
|
import { UnstyledIconButton } from '../UnstyledIconButton';
|
|
11
11
|
import BannerContext from './Banner.context';
|
|
12
|
+
/**
|
|
13
|
+
* A versatile card-based component for displaying informational content with an
|
|
14
|
+
* icon, image, or illustration. Supports horizontal and vertical layouts, a
|
|
15
|
+
* pressable state, a close button, and an optional button or link action.
|
|
16
|
+
*/
|
|
12
17
|
const Banner = ({ icon, iconContainerVariant = 'subtle', iconContainerSize = 'md', iconContainerColor = 'pig', illustration, image, heading, description, direction = 'horizontal', link, button, onPress, onClose, variant = 'subtle', alignChevron = 'center', style, ...props }) => {
|
|
13
18
|
const hasIllustration = Boolean(illustration);
|
|
14
19
|
styles.useVariants({
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ImageProps } from 'react-native';
|
|
2
2
|
import { ThemedImageProps } from '../ThemedImage';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a themed illustration inside a `Banner`, adapting its size to the
|
|
5
|
+
* banner's layout direction and switching between light and dark sources.
|
|
6
|
+
*/
|
|
3
7
|
declare const BannerIllustration: (props: ImageProps | ThemedImageProps) => import("react").JSX.Element;
|
|
4
8
|
export default BannerIllustration;
|
|
@@ -4,6 +4,10 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
4
4
|
import { isThemedImageProps } from '../../utils';
|
|
5
5
|
import { ThemedImage } from '../ThemedImage';
|
|
6
6
|
import { useBannerContext } from './Banner.context';
|
|
7
|
+
/**
|
|
8
|
+
* Renders a themed illustration inside a `Banner`, adapting its size to the
|
|
9
|
+
* banner's layout direction and switching between light and dark sources.
|
|
10
|
+
*/
|
|
7
11
|
const BannerIllustration = (props) => {
|
|
8
12
|
const { direction } = useBannerContext();
|
|
9
13
|
styles.useVariants({ direction });
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ImageProps } from 'react-native';
|
|
2
2
|
import { ThemedImageProps } from '../ThemedImage';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a themed image inside a `Banner`, adapting its size to the banner's
|
|
5
|
+
* layout direction and switching between light and dark sources.
|
|
6
|
+
*/
|
|
3
7
|
declare const BannerImage: (props: ImageProps | ThemedImageProps) => import("react").JSX.Element;
|
|
4
8
|
export default BannerImage;
|
|
@@ -4,6 +4,10 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
4
4
|
import { isThemedImageProps } from '../../utils';
|
|
5
5
|
import { ThemedImage } from '../ThemedImage';
|
|
6
6
|
import { useBannerContext } from './Banner.context';
|
|
7
|
+
/**
|
|
8
|
+
* Renders a themed image inside a `Banner`, adapting its size to the banner's
|
|
9
|
+
* layout direction and switching between light and dark sources.
|
|
10
|
+
*/
|
|
7
11
|
const BannerImage = (props) => {
|
|
8
12
|
const { direction } = useBannerContext();
|
|
9
13
|
styles.useVariants({ direction });
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type BodyTextProps from './BodyText.props';
|
|
2
|
+
/**
|
|
3
|
+
* Renders body copy, the default text component for paragraphs and general
|
|
4
|
+
* reading content, with size, weight, and colour variants.
|
|
5
|
+
*/
|
|
2
6
|
declare const BodyText: {
|
|
3
7
|
({ children, color, size, truncated, weight, underline, strikeThrough, italic, textTransform, textAlign, textAlignVertical, textDecorationColor, textDecorationLine, textDecorationStyle, userSelect, inverted, ...props }: BodyTextProps): import("react").JSX.Element;
|
|
4
8
|
displayName: string;
|
|
@@ -3,6 +3,10 @@ import { Text } from 'react-native';
|
|
|
3
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
4
4
|
import { useStyleProps } from '../../hooks';
|
|
5
5
|
import { getFlattenedColorValue, resolveThemeValueWithFallback } from '../../utils';
|
|
6
|
+
/**
|
|
7
|
+
* Renders body copy, the default text component for paragraphs and general
|
|
8
|
+
* reading content, with size, weight, and colour variants.
|
|
9
|
+
*/
|
|
6
10
|
const BodyText = ({ children, color, size = 'md', truncated, weight = 'regular', underline, strikeThrough, italic, textTransform, textAlign, textAlignVertical, textDecorationColor, textDecorationLine, textDecorationStyle, userSelect, inverted, ...props }) => {
|
|
7
11
|
// Extract margin utility props from remaining props
|
|
8
12
|
const { computedStyles: utilityStyles, remainingProps } = useStyleProps(props);
|
|
@@ -2,6 +2,12 @@ import { BottomSheetMethods } from '@gorhom/bottom-sheet/lib/typescript/types';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type BottomSheetProps from './BottomSheet.props';
|
|
4
4
|
type BottomSheet = BottomSheetMethods;
|
|
5
|
+
/**
|
|
6
|
+
* A drawer-like interface that slides up from the bottom of the screen, used to
|
|
7
|
+
* display additional content or actions without navigating away from the
|
|
8
|
+
* current screen. Rendered inline with page content, so use `BottomSheetModal`
|
|
9
|
+
* for most cases instead, since it appears over the page.
|
|
10
|
+
*/
|
|
5
11
|
declare const BottomSheet: {
|
|
6
12
|
({ children, containerStyle, handleStyle, backdrop, showHandle, ref, ...rest }: BottomSheetProps): React.JSX.Element;
|
|
7
13
|
displayName: string;
|
|
@@ -5,6 +5,12 @@ import { StyleSheet, withUnistyles } from 'react-native-unistyles';
|
|
|
5
5
|
import { BottomSheetContext } from './BottomSheet.context';
|
|
6
6
|
import useBottomSheetLogic from './useBottomSheetLogic';
|
|
7
7
|
const StyledBottomSheetCore = withUnistyles(BottomSheetCore);
|
|
8
|
+
/**
|
|
9
|
+
* A drawer-like interface that slides up from the bottom of the screen, used to
|
|
10
|
+
* display additional content or actions without navigating away from the
|
|
11
|
+
* current screen. Rendered inline with page content, so use `BottomSheetModal`
|
|
12
|
+
* for most cases instead, since it appears over the page.
|
|
13
|
+
*/
|
|
8
14
|
const BottomSheet = ({ children, containerStyle, handleStyle, backdrop = true, showHandle = true, ref, ...rest }) => {
|
|
9
15
|
const bottomSheetRef = React.useRef(null);
|
|
10
16
|
const parentContext = React.useContext(BottomSheetContext);
|
|
@@ -28,7 +28,9 @@ interface BottomSheetProps extends Omit<GorhomBottomSheetProps, 'handleComponent
|
|
|
28
28
|
* @default true
|
|
29
29
|
*/
|
|
30
30
|
showHandle?: boolean;
|
|
31
|
+
/** Style for the bottom sheet content container. */
|
|
31
32
|
contentStyle?: ViewStyle;
|
|
33
|
+
/** Ref exposing imperative methods for controlling the bottom sheet. */
|
|
32
34
|
ref?: Ref<BottomSheetMethods> | Ref<BottomSheetModalMethods<any>>;
|
|
33
35
|
}
|
|
34
36
|
export default BottomSheetProps;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type BoxProps from './Box.props';
|
|
3
|
+
/**
|
|
4
|
+
* A low-level layout primitive that renders a `View` (or another element via
|
|
5
|
+
* `as`) with style utility props for spacing, sizing, color, and layout.
|
|
6
|
+
*/
|
|
3
7
|
declare const BoxComponent: {
|
|
4
8
|
({ as, style, children, ...props }: BoxProps): React.JSX.Element;
|
|
5
9
|
displayName: string;
|
|
@@ -4,6 +4,10 @@ import { View } from 'react-native';
|
|
|
4
4
|
import { StyleSheet } from 'react-native-unistyles';
|
|
5
5
|
import { propStyleMapping, resolveThemeKey, resolveThemeValueWithFallback, semanticPropMapping, themeStyleFallbackMapping, themeStyleMapping, viewStyleProps, } from '../../utils';
|
|
6
6
|
// --- Box component definition ---
|
|
7
|
+
/**
|
|
8
|
+
* A low-level layout primitive that renders a `View` (or another element via
|
|
9
|
+
* `as`) with style utility props for spacing, sizing, color, and layout.
|
|
10
|
+
*/
|
|
7
11
|
const BoxComponent = ({ as, style, children, ...props }) => {
|
|
8
12
|
const { computedProps } = useMemo(() => {
|
|
9
13
|
const computedProps = {};
|
|
@@ -2,7 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
3
|
import type { AllUtilityProps, SpacingValues } from '../../types';
|
|
4
4
|
interface CustomBoxProps {
|
|
5
|
+
/** The component or element type to render the Box as, in place of `View`. */
|
|
5
6
|
as?: React.ElementType;
|
|
7
|
+
/** Gap between child elements. */
|
|
6
8
|
spacing?: SpacingValues;
|
|
7
9
|
}
|
|
8
10
|
export interface BoxProps extends AllUtilityProps, ViewProps, CustomBoxProps {
|
|
@@ -15,6 +15,10 @@ export declare const ButtonGroupComponent: import("react").ForwardRefExoticCompo
|
|
|
15
15
|
space?: import("../../types").SpacingValues;
|
|
16
16
|
spacing?: import("../../types").SpacingValues;
|
|
17
17
|
} & import("@gluestack-ui/button/lib/typescript/types").IButtonGroupProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Triggers an action or event, such as submitting a form, opening a dialog,
|
|
20
|
+
* cancelling an action, or performing a delete operation.
|
|
21
|
+
*/
|
|
18
22
|
declare const Button: {
|
|
19
23
|
({ children, disabled, pressed, text, ...props }: ButtonProps): import("react").JSX.Element;
|
|
20
24
|
displayName: string;
|
|
@@ -22,6 +22,10 @@ export const ButtonGroupComponent = ButtonComponent.Group;
|
|
|
22
22
|
ButtonText.displayName = 'ButtonText';
|
|
23
23
|
ButtonSpinner.displayName = 'ButtonSpinner';
|
|
24
24
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
25
|
+
/**
|
|
26
|
+
* Triggers an action or event, such as submitting a form, opening a dialog,
|
|
27
|
+
* cancelling an action, or performing a delete operation.
|
|
28
|
+
*/
|
|
25
29
|
const Button = ({ children, disabled = false, pressed, text, ...props }) => {
|
|
26
30
|
const { disabled: groupDisabled, loading: groupLoading } = useButtonGroupContext();
|
|
27
31
|
const { loading } = props;
|
|
@@ -1,52 +1,181 @@
|
|
|
1
1
|
import type { ComponentType, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import type { PressableProps, ViewProps } from 'react-native';
|
|
3
3
|
export type ButtonVariants = {
|
|
4
|
+
/**
|
|
5
|
+
* The variant of the button.
|
|
6
|
+
* @default 'solid'
|
|
7
|
+
*/
|
|
4
8
|
variant?: 'solid';
|
|
9
|
+
/**
|
|
10
|
+
* The color scheme of the button.
|
|
11
|
+
* @default 'highlight'
|
|
12
|
+
*/
|
|
5
13
|
colorScheme?: 'affirmative' | 'destructive';
|
|
14
|
+
/**
|
|
15
|
+
* Whether the button uses an inverted (light-on-dark) style, for use on
|
|
16
|
+
* `midnight` or `purple` backgrounds.
|
|
17
|
+
*/
|
|
6
18
|
inverted?: never;
|
|
7
19
|
} | {
|
|
20
|
+
/**
|
|
21
|
+
* The variant of the button.
|
|
22
|
+
* @default 'solid'
|
|
23
|
+
*/
|
|
8
24
|
variant?: 'outline';
|
|
25
|
+
/**
|
|
26
|
+
* The color scheme of the button.
|
|
27
|
+
* @default 'highlight'
|
|
28
|
+
*/
|
|
9
29
|
colorScheme: 'affirmative' | 'destructive';
|
|
30
|
+
/**
|
|
31
|
+
* Whether the button uses an inverted (light-on-dark) style, for use on
|
|
32
|
+
* `midnight` or `purple` backgrounds.
|
|
33
|
+
*/
|
|
10
34
|
inverted?: never;
|
|
11
35
|
} | {
|
|
36
|
+
/**
|
|
37
|
+
* The variant of the button.
|
|
38
|
+
* @default 'solid'
|
|
39
|
+
*/
|
|
12
40
|
variant?: 'ghost';
|
|
41
|
+
/**
|
|
42
|
+
* The color scheme of the button.
|
|
43
|
+
* @default 'highlight'
|
|
44
|
+
*/
|
|
13
45
|
colorScheme: 'affirmative' | 'destructive';
|
|
46
|
+
/**
|
|
47
|
+
* Whether the button uses an inverted (light-on-dark) style, for use on
|
|
48
|
+
* `midnight` or `purple` backgrounds.
|
|
49
|
+
*/
|
|
14
50
|
inverted?: never;
|
|
15
51
|
} | {
|
|
52
|
+
/**
|
|
53
|
+
* The variant of the button.
|
|
54
|
+
* @default 'solid'
|
|
55
|
+
*/
|
|
16
56
|
variant?: 'emphasis';
|
|
57
|
+
/**
|
|
58
|
+
* The color scheme of the button.
|
|
59
|
+
* @default 'highlight'
|
|
60
|
+
*/
|
|
17
61
|
colorScheme?: 'highlight';
|
|
62
|
+
/**
|
|
63
|
+
* Whether the button uses an inverted (light-on-dark) style, for use on
|
|
64
|
+
* `midnight` or `purple` backgrounds.
|
|
65
|
+
*/
|
|
18
66
|
inverted?: boolean;
|
|
19
67
|
} | {
|
|
68
|
+
/**
|
|
69
|
+
* The variant of the button.
|
|
70
|
+
* @default 'solid'
|
|
71
|
+
*/
|
|
20
72
|
variant?: 'solid';
|
|
73
|
+
/**
|
|
74
|
+
* The color scheme of the button.
|
|
75
|
+
* @default 'highlight'
|
|
76
|
+
*/
|
|
21
77
|
colorScheme?: 'highlight';
|
|
78
|
+
/**
|
|
79
|
+
* Whether the button uses an inverted (light-on-dark) style, for use on
|
|
80
|
+
* `midnight` or `purple` backgrounds.
|
|
81
|
+
*/
|
|
22
82
|
inverted?: boolean;
|
|
23
83
|
} | {
|
|
84
|
+
/**
|
|
85
|
+
* The variant of the button.
|
|
86
|
+
* @default 'solid'
|
|
87
|
+
*/
|
|
24
88
|
variant?: 'outline';
|
|
89
|
+
/**
|
|
90
|
+
* The color scheme of the button.
|
|
91
|
+
* @default 'highlight'
|
|
92
|
+
*/
|
|
25
93
|
colorScheme: 'functional';
|
|
94
|
+
/**
|
|
95
|
+
* Whether the button uses an inverted (light-on-dark) style, for use on
|
|
96
|
+
* `midnight` or `purple` backgrounds.
|
|
97
|
+
*/
|
|
26
98
|
inverted?: boolean;
|
|
27
99
|
} | {
|
|
100
|
+
/**
|
|
101
|
+
* The variant of the button.
|
|
102
|
+
* @default 'solid'
|
|
103
|
+
*/
|
|
28
104
|
variant?: 'ghost';
|
|
105
|
+
/**
|
|
106
|
+
* The color scheme of the button.
|
|
107
|
+
* @default 'highlight'
|
|
108
|
+
*/
|
|
29
109
|
colorScheme: 'functional';
|
|
110
|
+
/**
|
|
111
|
+
* Whether the button uses an inverted (light-on-dark) style, for use on
|
|
112
|
+
* `midnight` or `purple` backgrounds.
|
|
113
|
+
*/
|
|
30
114
|
inverted?: boolean;
|
|
31
115
|
};
|
|
32
116
|
export type BaseButtonProps = Omit<PressableProps, 'children'> & {
|
|
117
|
+
/**
|
|
118
|
+
* If `true`, the button will be disabled.
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
33
121
|
disabled?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* The size of the button.
|
|
124
|
+
* @default 'md'
|
|
125
|
+
*/
|
|
34
126
|
size?: 'sm' | 'md';
|
|
127
|
+
/**
|
|
128
|
+
* Changes the button to a pressed state.
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
35
131
|
pressed?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Removes the horizontal padding from the button (only applies to `sm` size `ghost` variant buttons).
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
36
136
|
paddingNone?: boolean;
|
|
137
|
+
/** Content rendered inside the button. */
|
|
37
138
|
children?: ViewProps['children'];
|
|
38
139
|
} & ButtonVariants;
|
|
39
140
|
export type ButtonWithoutChildrenProps = BaseButtonProps & {
|
|
40
141
|
children?: never;
|
|
142
|
+
/** Text to display in the button, used in place of `children`. */
|
|
41
143
|
text?: string;
|
|
144
|
+
/**
|
|
145
|
+
* The icon to display on the button.
|
|
146
|
+
* @default undefined
|
|
147
|
+
*/
|
|
42
148
|
icon?: ComponentType;
|
|
149
|
+
/**
|
|
150
|
+
* The position of the icon.
|
|
151
|
+
* @default 'left'
|
|
152
|
+
*/
|
|
43
153
|
iconPosition?: 'left' | 'right';
|
|
154
|
+
/**
|
|
155
|
+
* If `true`, the button will show a spinner.
|
|
156
|
+
* @default false
|
|
157
|
+
*/
|
|
44
158
|
loading?: boolean;
|
|
45
159
|
};
|
|
46
160
|
export type ButtonWithStringChildrenProps = BaseButtonProps & {
|
|
161
|
+
/**
|
|
162
|
+
* The content of the button.
|
|
163
|
+
*/
|
|
47
164
|
children: string | number | null | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* The icon to display on the button.
|
|
167
|
+
* @default undefined
|
|
168
|
+
*/
|
|
48
169
|
icon?: ComponentType;
|
|
170
|
+
/**
|
|
171
|
+
* The position of the icon.
|
|
172
|
+
* @default 'left'
|
|
173
|
+
*/
|
|
49
174
|
iconPosition?: 'left' | 'right';
|
|
175
|
+
/**
|
|
176
|
+
* If `true`, the button will show a spinner.
|
|
177
|
+
* @default false
|
|
178
|
+
*/
|
|
50
179
|
loading?: boolean;
|
|
51
180
|
text?: never;
|
|
52
181
|
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A visual container that groups related content and actions. Use it to present a distinct block
|
|
3
|
+
* of information, optionally with `CardAction` items, inside a bordered, coloured surface.
|
|
4
|
+
*/
|
|
1
5
|
declare const Card: import("react").ForwardRefExoticComponent<Omit<import("./Card.props").default & {
|
|
2
6
|
states?: {
|
|
3
7
|
active?: boolean;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { createPressable } from '@gluestack-ui/pressable';
|
|
2
2
|
import CardRoot from './CardRoot';
|
|
3
|
+
/**
|
|
4
|
+
* A visual container that groups related content and actions. Use it to present a distinct block
|
|
5
|
+
* of information, optionally with `CardAction` items, inside a bordered, coloured surface.
|
|
6
|
+
*/
|
|
3
7
|
const Card = createPressable({
|
|
4
8
|
Root: CardRoot,
|
|
5
9
|
});
|
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
import { PressableProps } from 'react-native';
|
|
2
2
|
import { DisplayProps, FlexLayoutProps, GapProps, MarginProps, SpacingValues } from '../../types';
|
|
3
3
|
interface CardProps extends PressableProps, MarginProps, GapProps, FlexLayoutProps, Omit<DisplayProps, 'direction'> {
|
|
4
|
+
/** Visual emphasis of the card.
|
|
5
|
+
* @default 'subtle'
|
|
6
|
+
*/
|
|
4
7
|
variant?: 'emphasis' | 'subtle';
|
|
8
|
+
/**
|
|
9
|
+
* The card's color scheme.
|
|
10
|
+
* @default 'neutralStrong'
|
|
11
|
+
*/
|
|
5
12
|
colorScheme?: 'neutralStrong' | 'neutralSubtle' | 'brand' | 'energy' | 'broadband' | 'highlight' | 'mobile' | 'insurance' | 'cashback' | 'pig';
|
|
13
|
+
/** The color of the card's shadow. */
|
|
6
14
|
shadowColor?: 'functional' | 'brand' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'pig';
|
|
15
|
+
/** Removes the card's default padding.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
7
18
|
noPadding?: boolean;
|
|
19
|
+
/** Disables interaction and applies a disabled visual style.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
8
22
|
disabled?: boolean;
|
|
23
|
+
/** The space between the card's content. */
|
|
9
24
|
spacing?: SpacingValues;
|
|
10
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* The space between the card's content.
|
|
27
|
+
* @deprecated Use `spacing` instead. The `space` prop will be removed in a future release.
|
|
28
|
+
*/
|
|
11
29
|
space?: SpacingValues;
|
|
12
30
|
}
|
|
13
31
|
export default CardProps;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pressable, consistently styled row for an actionable item inside a `Card`. Use it, wrapped in
|
|
3
|
+
* `CardActions`, to list navigable or triggerable actions within a card.
|
|
4
|
+
*/
|
|
1
5
|
declare const CardAction: import("react").ForwardRefExoticComponent<(Omit<import("./CardAction.props").CardActionWithChildren & {
|
|
2
6
|
states?: {
|
|
3
7
|
active?: boolean;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { createPressable } from '@gluestack-ui/pressable';
|
|
2
2
|
import CardActionRoot from './CardActionRoot';
|
|
3
|
+
/**
|
|
4
|
+
* A pressable, consistently styled row for an actionable item inside a `Card`. Use it, wrapped in
|
|
5
|
+
* `CardActions`, to list navigable or triggerable actions within a card.
|
|
6
|
+
*/
|
|
3
7
|
const CardAction = createPressable({
|
|
4
8
|
Root: CardActionRoot,
|
|
5
9
|
});
|