@utilitywarehouse/hearth-react-native 0.36.0 → 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 -1
- 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/components/checkbox.md +6 -1
- package/public/llms/components/expandable-card.md +2 -2
- package/public/llms/components/modal.md +4 -0
- package/public/llms/docs/introduction.md +1 -1
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { PressableProps } from 'react-native';
|
|
2
2
|
export interface ToggleButtonProps extends PressableProps {
|
|
3
|
+
/** The text label of the button. */
|
|
3
4
|
text?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Whether the button is in the toggled (pressed/selected) state.
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
4
9
|
toggled?: boolean;
|
|
10
|
+
/** Called with the new toggled state whenever the button is pressed. */
|
|
5
11
|
onToggle?: (toggled: boolean) => void;
|
|
6
12
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import ToggleButtonCardProps from './ToggleButtonCard.props';
|
|
2
2
|
import ToggleButtonCardGroupProps from './ToggleButtonCardGroup.props';
|
|
3
|
+
/**
|
|
4
|
+
* Groups a set of `ToggleButtonCard`s so only one can be selected at a time, laid out as a
|
|
5
|
+
* flexbox row or a grid. Use it for forms or surveys that present multiple selectable options.
|
|
6
|
+
*/
|
|
3
7
|
declare const ToggleButtonCardGroup: {
|
|
4
8
|
({ onChange, onValueChange, ...props }: ToggleButtonCardGroupProps): import("react").JSX.Element;
|
|
5
9
|
displayName: string;
|
|
6
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* A selectable card used as a single option within a `ToggleButtonCardGroup`. Use it to let
|
|
13
|
+
* users pick one option from a set of predefined choices in forms or surveys.
|
|
14
|
+
*/
|
|
7
15
|
declare const ToggleButtonCard: {
|
|
8
16
|
({ children, contentStyle, ...props }: ToggleButtonCardProps): import("react").JSX.Element;
|
|
9
17
|
displayName: string;
|
|
@@ -12,11 +12,19 @@ const ToggleButtonCardComponent = createRadio({
|
|
|
12
12
|
Label: () => null,
|
|
13
13
|
});
|
|
14
14
|
const ToggleButtonCardGroupComponent = ToggleButtonCardComponent.Group;
|
|
15
|
+
/**
|
|
16
|
+
* Groups a set of `ToggleButtonCard`s so only one can be selected at a time, laid out as a
|
|
17
|
+
* flexbox row or a grid. Use it for forms or surveys that present multiple selectable options.
|
|
18
|
+
*/
|
|
15
19
|
const ToggleButtonCardGroup = ({ onChange, onValueChange, ...props }) => (_jsx(ToggleButtonCardGroupComponent, { ...props, onChange: (value) => {
|
|
16
20
|
onChange?.(value);
|
|
17
21
|
onValueChange?.(value);
|
|
18
22
|
} }));
|
|
19
23
|
ToggleButtonCardGroup.displayName = 'ToggleButtonCardGroup';
|
|
24
|
+
/**
|
|
25
|
+
* A selectable card used as a single option within a `ToggleButtonCardGroup`. Use it to let
|
|
26
|
+
* users pick one option from a set of predefined choices in forms or surveys.
|
|
27
|
+
*/
|
|
20
28
|
const ToggleButtonCard = ({ children, contentStyle, ...props }) => {
|
|
21
29
|
const { computedStyles } = useStyleProps(props);
|
|
22
30
|
return (_jsx(ToggleButtonCardComponent, { ...props, children: !!children && _jsx(View, { style: [computedStyles, contentStyle], children: children }) }));
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import type { PressableProps, ViewProps, ViewStyle } from 'react-native';
|
|
2
2
|
import { SpaceValue } from '../../types';
|
|
3
3
|
interface ToggleButtonCardProps extends Omit<PressableProps, 'children'> {
|
|
4
|
+
/** The value used for the toggle button, returned on form submission. */
|
|
4
5
|
value: string;
|
|
6
|
+
/** Called when the state of the toggle button changes. */
|
|
5
7
|
onChange?: (isSelected: boolean) => void;
|
|
6
8
|
children?: ViewProps['children'];
|
|
9
|
+
/** The label to be displayed next to the toggle button. */
|
|
7
10
|
label?: string;
|
|
11
|
+
/** Flex direction. */
|
|
8
12
|
flexDirection?: ViewStyle['flexDirection'];
|
|
13
|
+
/** Flex wrap. */
|
|
9
14
|
flexWrap?: ViewStyle['flexWrap'];
|
|
15
|
+
/** Align items. */
|
|
10
16
|
alignItems?: ViewStyle['alignItems'];
|
|
17
|
+
/** Justify content. */
|
|
11
18
|
justifyContent?: ViewStyle['justifyContent'];
|
|
19
|
+
/** Style applied to the content wrapper around `children`. */
|
|
12
20
|
contentStyle?: ViewStyle;
|
|
21
|
+
/** Gap between child elements. */
|
|
13
22
|
gap?: SpaceValue;
|
|
14
23
|
}
|
|
15
24
|
export default ToggleButtonCardProps;
|
|
@@ -2,22 +2,37 @@ import { ViewProps, ViewStyle } from 'react-native';
|
|
|
2
2
|
import { space } from '../../tokens';
|
|
3
3
|
import { GridProps } from '../Grid';
|
|
4
4
|
type ToggleButtonCardGroupBaseProps = {
|
|
5
|
+
/** The value of the currently selected toggle button card. */
|
|
5
6
|
value?: string;
|
|
7
|
+
/** Called when the selected toggle button card changes. */
|
|
6
8
|
onValueChange?: (value: string) => void;
|
|
7
9
|
/**
|
|
10
|
+
* Called when any child ToggleButtonCard is checked or unchecked.
|
|
8
11
|
* @deprecated Use `onValueChange` instead.
|
|
9
12
|
*/
|
|
10
13
|
onChange?: (value: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Gap between child elements.
|
|
16
|
+
* @default '200'
|
|
17
|
+
*/
|
|
11
18
|
gap?: keyof typeof space;
|
|
12
19
|
} & ViewProps;
|
|
13
20
|
type ToggleButtonCardGroupFlexProps = {
|
|
14
21
|
columns?: never;
|
|
22
|
+
/**
|
|
23
|
+
* Flex direction.
|
|
24
|
+
* @default 'row'
|
|
25
|
+
*/
|
|
15
26
|
flexDirection?: ViewStyle['flexDirection'];
|
|
27
|
+
/** Flex wrap. */
|
|
16
28
|
flexWrap?: ViewStyle['flexWrap'];
|
|
29
|
+
/** Align items. */
|
|
17
30
|
alignItems?: ViewStyle['alignItems'];
|
|
31
|
+
/** Justify content. */
|
|
18
32
|
justifyContent?: ViewStyle['justifyContent'];
|
|
19
33
|
};
|
|
20
34
|
type ToggleButtonCardGroupGridProps = {
|
|
35
|
+
/** Number of grid columns. When set, the group uses a grid layout instead of flexbox. */
|
|
21
36
|
columns: GridProps['columns'];
|
|
22
37
|
flexDirection?: never;
|
|
23
38
|
flexWrap?: never;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { UnstyledIconButtonProps } from './UnstyledIconButton.props';
|
|
2
|
+
/**
|
|
3
|
+
* A pressable icon with no default visual styling, used as a building block for buttons that
|
|
4
|
+
* need bespoke appearance (such as input adornments) while keeping button accessibility and
|
|
5
|
+
* loading behaviour.
|
|
6
|
+
*/
|
|
2
7
|
declare const UnstyledIconButton: {
|
|
3
8
|
({ icon, disabled, pressed, size, inverted, iconStyle, ...props }: UnstyledIconButtonProps): import("react").JSX.Element;
|
|
4
9
|
displayName: string;
|
|
@@ -15,6 +15,11 @@ const UnstyledIconButtonSpinner = UnstyledIconButtonComponent.Spinner;
|
|
|
15
15
|
const UnstyledIconButtonIcon = UnstyledIconButtonComponent.Icon;
|
|
16
16
|
UnstyledIconButtonSpinner.displayName = 'UnstyledIconButtonSpinner';
|
|
17
17
|
UnstyledIconButtonIcon.displayName = 'UnstyledIconButtonIcon';
|
|
18
|
+
/**
|
|
19
|
+
* A pressable icon with no default visual styling, used as a building block for buttons that
|
|
20
|
+
* need bespoke appearance (such as input adornments) while keeping button accessibility and
|
|
21
|
+
* loading behaviour.
|
|
22
|
+
*/
|
|
18
23
|
const UnstyledIconButton = ({ icon, disabled = false, pressed, size = 'md', inverted = false, iconStyle, ...props }) => {
|
|
19
24
|
const { disabled: groupDisabled, loading: groupLoading } = useButtonGroupContext();
|
|
20
25
|
const { loading, accessibilityRole = 'button', accessible = true, focusable = true, importantForAccessibility = 'yes', ...restProps } = props;
|
|
@@ -3,12 +3,29 @@ import type { PressableProps, ViewProps } from 'react-native';
|
|
|
3
3
|
import { ColorValue } from '../../types';
|
|
4
4
|
export type UnstyledIconButtonProps = {
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
/** Whether the button is currently pressed. */
|
|
6
7
|
pressed?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The icon component displayed on the button.
|
|
10
|
+
*/
|
|
7
11
|
icon: ComponentType;
|
|
12
|
+
/**
|
|
13
|
+
* If `true`, the button will show a spinner.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
8
16
|
loading?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The size of the button.
|
|
19
|
+
* @default 'md'
|
|
20
|
+
*/
|
|
9
21
|
size?: 'sm' | 'md';
|
|
22
|
+
/**
|
|
23
|
+
* If `true`, the button colours will be inverted.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
10
26
|
inverted?: boolean;
|
|
11
27
|
children?: React.ReactNode;
|
|
28
|
+
/** Style applied to the icon. */
|
|
12
29
|
iconStyle?: ViewProps['style'] & {
|
|
13
30
|
color?: ColorValue;
|
|
14
31
|
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { VerificationInputHandle, VerificationInputProps } from './VerificationInput.props';
|
|
2
|
+
/**
|
|
3
|
+
* Captures a one-time password or other verification code as a sequence of single-character slots.
|
|
4
|
+
* Use it for OTP and SMS/email verification flows.
|
|
5
|
+
*/
|
|
2
6
|
declare const VerificationInput: import("react").ForwardRefExoticComponent<VerificationInputProps & import("react").RefAttributes<VerificationInputHandle>>;
|
|
3
7
|
export default VerificationInput;
|
|
@@ -6,6 +6,10 @@ import { useFormFieldAccessibility } from '../../hooks';
|
|
|
6
6
|
import { FormField } from '../FormField';
|
|
7
7
|
import { getNextIndexFromValueChange } from './VerificationInput.utils';
|
|
8
8
|
import { VerificationInputSlot } from './VerificationInputSlot';
|
|
9
|
+
/**
|
|
10
|
+
* Captures a one-time password or other verification code as a sequence of single-character slots.
|
|
11
|
+
* Use it for OTP and SMS/email verification flows.
|
|
12
|
+
*/
|
|
9
13
|
const VerificationInput = forwardRef(({ value = '', onChangeText, label, labelVariant = 'body', helperText, helperIcon, validationStatus = 'initial', validText, invalidText, disabled = false, readonly = false, secureTextEntry = false, autoFocus = false, style, testID, ...props }, ref) => {
|
|
10
14
|
const length = 6;
|
|
11
15
|
const inputRef = useRef(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilitywarehouse/hearth-react-native",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.2",
|
|
4
4
|
"description": "Utility Warehouse React Native UI library",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"@vitest/browser": "^3.2.4",
|
|
60
60
|
"@vitest/coverage-v8": "^3.2.4",
|
|
61
61
|
"globals": "^15.15.0",
|
|
62
|
+
"oversight-lint": "^0.7.0",
|
|
62
63
|
"playwright": "^1.59.1",
|
|
63
64
|
"prismjs": "^1.30.0",
|
|
64
65
|
"react": "19.2.3",
|
|
@@ -75,15 +76,16 @@
|
|
|
75
76
|
"react-native-worklets": "0.10.1",
|
|
76
77
|
"remark-gfm": "^4.0.1",
|
|
77
78
|
"storybook": "^10.5.6",
|
|
79
|
+
"storybook-addon-oversight": "^0.7.0",
|
|
78
80
|
"vite": "^7.1.3",
|
|
79
81
|
"vite-plugin-svgr": "^4.5.0",
|
|
80
82
|
"vitest": "^4.1.7",
|
|
81
83
|
"@utilitywarehouse/hearth-fonts": "^0.1.1",
|
|
82
|
-
"@utilitywarehouse/hearth-react-native-icons": "^0.9.2",
|
|
83
|
-
"@utilitywarehouse/hearth-svg-assets": "^0.6.6",
|
|
84
84
|
"@utilitywarehouse/hearth-react-icons": "^0.9.2",
|
|
85
85
|
"@utilitywarehouse/hearth-storybook-utils": "0.0.0",
|
|
86
|
-
"@utilitywarehouse/hearth-
|
|
86
|
+
"@utilitywarehouse/hearth-svg-assets": "^0.6.6",
|
|
87
|
+
"@utilitywarehouse/hearth-react-native-icons": "^0.9.2",
|
|
88
|
+
"@utilitywarehouse/hearth-tokens": "^0.4.7"
|
|
87
89
|
},
|
|
88
90
|
"peerDependencies": {
|
|
89
91
|
"@gorhom/bottom-sheet": ">=5.0.0",
|
|
@@ -115,6 +117,7 @@
|
|
|
115
117
|
"dev": "storybook dev -p 6006",
|
|
116
118
|
"dev:docs": "storybook dev -p 6002 --no-open",
|
|
117
119
|
"build:storybook": "storybook build",
|
|
118
|
-
"build:storybook:docs": "storybook build --docs"
|
|
120
|
+
"build:storybook:docs": "storybook build --docs",
|
|
121
|
+
"lint:oversight": "oversight"
|
|
119
122
|
}
|
|
120
123
|
}
|
|
@@ -121,7 +121,12 @@ The `CheckboxGroup` component is used to group multiple checkbox inputs together
|
|
|
121
121
|
|
|
122
122
|
```jsx
|
|
123
123
|
// Example usage
|
|
124
|
-
import {
|
|
124
|
+
import {
|
|
125
|
+
Checkbox,
|
|
126
|
+
CheckboxGroup,
|
|
127
|
+
CheckboxIndicator,
|
|
128
|
+
CheckboxLabel,
|
|
129
|
+
} from '@utilitywarehouse/hearth-react-native';
|
|
125
130
|
|
|
126
131
|
import { TickSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
127
132
|
|
|
@@ -407,7 +407,7 @@ If you need to use the `ExpandableCard` component in a more advanced way, you ca
|
|
|
407
407
|
|
|
408
408
|
```tsx
|
|
409
409
|
// Example usage
|
|
410
|
-
<
|
|
410
|
+
<View style={{ display: 'flex', flexDirection: 'column', gap: 16, width: 350 }}>
|
|
411
411
|
<ExpandableCard
|
|
412
412
|
expanded={triggerContentExpanded}
|
|
413
413
|
onExpandedChange={setTriggerContentExpanded}
|
|
@@ -446,7 +446,7 @@ If you need to use the `ExpandableCard` component in a more advanced way, you ca
|
|
|
446
446
|
<BodyText>Last Updated: 12/11/25</BodyText>
|
|
447
447
|
</ExpandableCardExpandedContent>
|
|
448
448
|
</ExpandableCard>
|
|
449
|
-
</
|
|
449
|
+
</View>
|
|
450
450
|
```
|
|
451
451
|
|
|
452
452
|
```tsx
|
|
@@ -300,6 +300,7 @@ Use the `image` prop to display an image-centric modal with centered content:
|
|
|
300
300
|
showCloseButton
|
|
301
301
|
primaryButtonText="Primary"
|
|
302
302
|
secondaryButtonText="Cancel"
|
|
303
|
+
loadingHeading="Loading"
|
|
303
304
|
onPressCloseButton={() => null}
|
|
304
305
|
onPressPrimaryButton={() => null}
|
|
305
306
|
onPressSecondaryButton={() => null}
|
|
@@ -396,6 +397,7 @@ Add custom content between the header and footer sections:
|
|
|
396
397
|
showCloseButton
|
|
397
398
|
primaryButtonText="Primary"
|
|
398
399
|
secondaryButtonText="Cancel"
|
|
400
|
+
loadingHeading="Loading"
|
|
399
401
|
onPressCloseButton={() => null}
|
|
400
402
|
onPressPrimaryButton={() => null}
|
|
401
403
|
onPressSecondaryButton={() => null}
|
|
@@ -460,6 +462,7 @@ Replace the built-in buttons with a custom sticky footer when you need custom la
|
|
|
460
462
|
showCloseButton
|
|
461
463
|
primaryButtonText="Primary"
|
|
462
464
|
secondaryButtonText="Cancel"
|
|
465
|
+
loadingHeading="Loading"
|
|
463
466
|
onPressCloseButton={() => null}
|
|
464
467
|
onPressPrimaryButton={() => null}
|
|
465
468
|
onPressSecondaryButton={() => null}
|
|
@@ -519,6 +522,7 @@ Show a loading spinner while processing:
|
|
|
519
522
|
showCloseButton
|
|
520
523
|
primaryButtonText="Primary"
|
|
521
524
|
secondaryButtonText="Cancel"
|
|
525
|
+
loadingHeading="Loading"
|
|
522
526
|
onPressCloseButton={() => null}
|
|
523
527
|
onPressPrimaryButton={() => null}
|
|
524
528
|
onPressSecondaryButton={() => null}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Hearth React Native
|
|
2
2
|
|
|
3
3
|
React Native component library for building UIs at Utility Warehouse.<br/>
|
|
4
|
-
Current version: v0.36.
|
|
4
|
+
Current version: v0.36.2
|
|
5
5
|
|
|
6
6
|
Hearth React Native is a comprehensive design system library for React Native, providing reusable components, consistent styling, and tools to streamline UI development. It is built to enhance productivity and maintain design consistency across projects.
|
|
7
7
|
|